class
Prostore::TUI::RecordGrid
- Prostore::TUI::RecordGrid
- Reference
- Object
Included Modules
- TUI::Pickable
- TUI::Scrollable
Defined in:
prostore/tui/widgets/record_grid.crConstant Summary
-
MIN_COL_WIDTH =
8 -
PAGE_SIZE =
50
Constructors
Instance Method Summary
-
#content_size : Int32
Paginated (server-side), not scrolled — SplitWindow's scrollbar would be misleading if this reported @total, so it reports only what's on the current page (never more than fits in one screen).
-
#handle_click(local_row : Int32, local_col : Int32, scroll : ::TUI::ScrollControl) : Bool
A positional (mouse) event, pre-translated by Window into content-local row/col (0,0 = content's own first cell).
-
#handle_key(ev : ::TUI::KeyEvent, scroll : ::TUI::ScrollControl) : Bool
Everything but positional mouse hit-testing.
- #load_table(table : String) : Nil
- #on_new_row : Proc(String, Nil) | Nil
- #on_new_row=(on_new_row : Proc(String, Nil) | Nil)
- #on_open_detail : Proc(String, String, Nil) | Nil
- #on_open_detail=(on_open_detail : Proc(String, String, Nil) | Nil)
- #reload : Nil
-
#render_content(buffer : ::TUI::Buffer, scroll : ::TUI::ScrollControl) : Nil
Render into
buffer, a region already sized to the content area (border/scrollbar column already excluded by Window). - #search_active? : Bool
-
#selected_pk : String | Nil
Returns the PK value of the currently highlighted row, or nil.
-
#selected_value : String | Nil
Pickable — used when this grid is wrapped as an FK picker.
- #status_hint : String
- #table : String | Nil
- #title : String
Constructor Detail
Instance Method Detail
Paginated (server-side), not scrolled — SplitWindow's scrollbar would be misleading if this reported @total, so it reports only what's on the current page (never more than fits in one screen).
A positional (mouse) event, pre-translated by Window into content-local row/col (0,0 = content's own first cell).
Everything but positional mouse hit-testing.
Render into buffer, a region already sized to the content area
(border/scrollbar column already excluded by Window). Row 0 is
content's own first row.