Skip to main content

Module splits

Module splits 

Source
Expand description

Multi-row split editor widget for the transaction create and edit forms.

§Key scheme (while Splits field is focused)

KeyEffect
TabNext cell (col→next row’s first col); at the last cell of
the last row it YIELDS to the outer form (→ Date)
BackTabPrevious cell; at (row 0, col 0) it YIELDS to the outer
form (→ Note)
UpPrev Select option (col is Select) / prev row
DownNext Select option (col is Select) / next row
EnterSubmit the transaction (from anywhere in the form)
Ctrl+N / +Add a new row below (inherits the fetched option lists)
- / Ctrl+DRemove the focused row (minimum 1 kept)
Ctrl+TOpen the focused split’s tag list (again: back to splits)

In the tag list Tab/BackTab walk the cells (name, value, description, side), Ctrl+N adds a tag, Ctrl+D removes one, Up/Down pick the side, Ctrl+O fills the name or value from the suggestions and Esc goes back to the splits.

The outer form cycles Date→Note→Splits→Date; the boundary yields above let the user leave the Splits editor by Tab/BackTab without submitting.

Structs§

SplitRow
One from→to split row with four account/commodity selects and two amount editors.
SplitsWidget
Multi-row split editor.

Enums§

FocusedSubWidget
Mutable reference to the focused sub-widget for intent routing in event.rs.

Constants§

COL_FROM
COL_FROM_COMM
COL_TO
COL_TO_AMOUNT
COL_TO_COMM
COL_VALUE

Functions§

columns
The visible cells of a split row, in descriptor order. key and hidden exist only for edit round trips and are not shown on create.
row_fields
The widget’s columns: create and edit share one split row definition (pinned by a test), so either descriptor names them.
rows_of
The row fields of a form’s splits field.
tag_fields
The cells of a split tag row; create and edit share them like the split row.