Copyright | (c) Itai Y. Efrat 2020-2021 |
---|---|
License | GPLv2-or-later (see LICENSE) |
Maintainer | Itai Y. Efrat <itai3397@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
The starting point of Hum's logic. Contains things like building the initial state, shared keypresses, and the UI drawing function.
Synopsis
- app :: App HumState HumEvent Name
- drawUI :: HumState -> [Widget Name]
- chooseCursor :: HumState -> [CursorLocation Name] -> Maybe (CursorLocation Name)
- buildInitialState :: BChan HumEvent -> IO HumState
- humStartEvent :: HumState -> EventM Name HumState
- handleEvent :: HumState -> BrickEvent Name HumEvent -> EventM Name (Next HumState)
Documentation
drawUI :: HumState -> [Widget Name] Source #
Draws shared UI elements and dispatches for view specific ones.
chooseCursor :: HumState -> [CursorLocation Name] -> Maybe (CursorLocation Name) Source #
Make sure cursor is displayed when editing text.
buildInitialState :: BChan HumEvent -> IO HumState Source #
builds 'HumState
for the first time. A lot of overlap with functions from
| Hum.Rebuild, but they are hard to reuse because HumState
is strict.