GGUI::GGDataSource struct

Items, how they relate, and what each shows. Implemented by the integration layer, one per relation.

Public variables

void* Context
the source's own
uint32_t(* ChildCount
How many children parent has (RootItem: top-level items).
ItemID(* Child
parent's child at index.
ItemID(* Parent
item's parent: RootItem for a top-level item.
uint32_t(* ColumnCount
How many columns it has.
ColumnInfo(* Column
Column column.
CellValue(* Cell
item's cell in column column.
bool(* SetCell
Commit an edited cell: text, or a number if the cell showed one. Return true if accepted. The owner decides what happens; the table re-reads Cell afterwards.
bool(* CellField
For sources whose cells are fields (reflected data). Return true and fill of and field to have the cell host the field's registered editor, bound as ui.Editor binds it.
const GGRevision* Structure
Bumped by the owner when items are added, removed, or re-parented. Views watch it and rebuild. Value-only changes go through bindings instead.