| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Hledger.UI.AccountsScreen
Synopsis
- asNew :: UIOpts -> Day -> Journal -> Maybe AccountName -> Screen
- asUpdate :: UIOpts -> Day -> Journal -> AccountsScreenState -> AccountsScreenState
- asDraw :: UIState -> [Widget Name]
- asDrawHelper :: UIState -> ReportOpts -> String -> [Widget Name]
- asHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()
- handleHelpMode :: BrickEvent Name AppEvent -> EventM Name UIState ()
- handleMinibufferMode :: Editor String Name -> BrickEvent n e -> EventM Name UIState ()
- asHandleNormalMode :: AccountsLikeScreen -> BrickEvent Name AppEvent -> EventM Name UIState ()
- enterRegisterScreen :: Day -> AccountName -> UIState -> EventM Name UIState ()
- asSetSelectedAccount :: AccountName -> Screen -> Screen
Documentation
asNew :: UIOpts -> Day -> Journal -> Maybe AccountName -> Screen Source #
Construct an accounts screen listing the appropriate set of accounts, with the appropriate one selected. Screen-specific arguments: the account to select if any.
asUpdate :: UIOpts -> Day -> Journal -> AccountsScreenState -> AccountsScreenState Source #
Update an accounts screen's state from these options, reporting date, and journal.
asDrawHelper :: UIState -> ReportOpts -> String -> [Widget Name] Source #
Help draw any accounts-like screen (all accounts, balance sheet, income statement..). The provided ReportOpts are used instead of the ones in the UIState. The other argument is the screen display name.
asHandle :: BrickEvent Name AppEvent -> EventM Name UIState () Source #
Handle events on any accounts-like screen (all accounts, balance sheet, income statement..).
handleHelpMode :: BrickEvent Name AppEvent -> EventM Name UIState () Source #
Handle events when in help mode on any screen.
handleMinibufferMode :: Editor String Name -> BrickEvent n e -> EventM Name UIState () Source #
Handle events when in minibuffer mode on any screen.
asHandleNormalMode :: AccountsLikeScreen -> BrickEvent Name AppEvent -> EventM Name UIState () Source #
Handle events when in normal mode on any accounts-like screen. The provided AccountsLikeScreen should correspond to the ui state's current screen.
asSetSelectedAccount :: AccountName -> Screen -> Screen Source #
Set the selected account on any of the accounts screens. Has no effect on other screens. Sets the high-level property _assSelectedAccount and also selects the corresponding or best alternative item in the list widget (_assList).