| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Hledger.UI.TransactionScreen
Synopsis
- tsNew :: AccountName -> Bool -> [NumberedTransaction] -> NumberedTransaction -> Screen
- tsUpdate :: UIOpts -> Day -> Journal -> TransactionScreenState -> TransactionScreenState
- tsDraw :: TransactionScreenState -> UIState -> [Widget Name]
- tsHandle :: TransactionScreenState -> BrickEvent Name AppEvent -> EventM Name UIState ()
Documentation
tsNew :: AccountName -> Bool -> [NumberedTransaction] -> NumberedTransaction -> Screen Source #
Construct a transaction screen showing one of a given list of transactions, with the ability to step back and forth through the list. Screen-specific arguments: the account whose transactions are being shown, whether that register included subaccounts, the list of showable transactions, the currently shown transaction.
tsUpdate :: UIOpts -> Day -> Journal -> TransactionScreenState -> TransactionScreenState Source #
Update a transaction screen: rebuild its transaction list from the (possibly reloaded) journal, and reselect the same transaction by its journal index, so the screen refreshes in place on reload. If that transaction is gone, fall back to the one at the same position, else the last, else a blank.