| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Hledger.UI.AccountsScreen
Synopsis
- asNew :: AccountsScreenKind -> UIOpts -> Day -> Journal -> Maybe AccountName -> Screen
- asUpdate :: UIOpts -> Day -> Journal -> AccountsScreenState -> AccountsScreenState
- asDraw :: AccountsScreenState -> UIState -> [Widget Name]
- asDrawHelper :: AccountsScreenState -> UIState -> ReportOpts -> String -> [Widget Name]
- asHandle :: AccountsScreenState -> BrickEvent Name AppEvent -> EventM Name UIState ()
- handleHelpMode :: BrickEvent Name AppEvent -> EventM Name UIState ()
- handleMinibufferMode :: Editor String Name -> BrickEvent n e -> EventM Name UIState ()
- asHandleNormalMode :: AccountsScreenState -> BrickEvent Name AppEvent -> EventM Name UIState ()
- enterRegisterScreen :: Day -> AccountName -> UIState -> EventM Name UIState ()
- asSetSelectedAccount :: AccountName -> Screen -> Screen
Documentation
asNew :: AccountsScreenKind -> UIOpts -> Day -> Journal -> Maybe AccountName -> Screen Source #
Construct an accounts-like screen (all accounts, cash, balance sheet or income statement, selected by the AccountsScreenKind), listing the appropriate set of accounts, with the appropriate one selected. Screen-specific arguments: the kind of screen, and the account to select if any.
asUpdate :: UIOpts -> Day -> Journal -> AccountsScreenState -> AccountsScreenState Source #
Update an accounts-like screen's state from these options, reporting date, and journal. The report is restricted and accumulated according to the screen's kind (_assKind).
asDrawHelper :: AccountsScreenState -> 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 :: AccountsScreenState -> 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 :: AccountsScreenState -> BrickEvent Name AppEvent -> EventM Name UIState () Source #
Handle events when in normal mode on any accounts-like screen. The provided state should be 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).