39 lines
800 B
Haskell
39 lines
800 B
Haskell
module UI where
|
|
|
|
import Brick
|
|
import Brick.Main
|
|
|
|
data Ident = Nil
|
|
|
|
data AppS = Null
|
|
|
|
app :: App AppS () Ident
|
|
app = App
|
|
{ appDraw = draw
|
|
, appChooseCursor = chooseCursor
|
|
, appHandleEvent = eventHandler
|
|
, appStartEvent = startEvent
|
|
, appAttrMap = attributeMap
|
|
}
|
|
|
|
runApp :: IO AppS
|
|
runApp = defaultMain app initialState
|
|
|
|
initialState :: AppS
|
|
initialState = undefined
|
|
|
|
startEvent :: EventM Ident (Next Apps)
|
|
startEvent = return -- replace if needed
|
|
|
|
draw :: AppS -> [Widget Ident]
|
|
draw = undefined
|
|
|
|
chooseCursor :: AppS -> [CursorLocation Ident] -> Maybe (CursorLocation Ident)
|
|
chooseCursor = showFirstCursor -- replace if needed
|
|
|
|
eventHandler :: AppS -> BrickEvent Identifier () -> EventM Ident (Next AppS)
|
|
eventHandler = undefined
|
|
|
|
attributeMap :: AttrMap
|
|
attributeMap = undefined
|