Normative baseline for standardized tree control and tree indicator widget classes
FROG — Free Open Graphical Language
- Widgets index
- Expression widget instances
- Expression widget interaction
- Expression widget realization
- Widget package publication
- Executable UI primitives
- Default realization — Tree
frog.widgets.tree_controlfrog.widgets.tree_indicator
The Tree family defines standardized widgets for finite hierarchical node structures in FROG. It provides a public tree value model, node identity model, expansion model, selection model, viewport model, optional editing and drag posture, checkbox posture, icon posture, and stable public part model.
A Tree widget is suitable for hierarchical data display, project navigation, configuration trees, object browsers, inspection trees, hierarchical results, file-like navigation, and structured runtime UI selection.
The intrinsic Tree baseline is not a filesystem API, database browser, object-reflection API, scene graph, or IDE-private navigator. Those integrations may use the Tree family, but they remain downstream from the widget class law.
- family: hierarchical selection / navigation widget family
- primary value: present
- value type:
frog.tree - public value-facing surface: yes
- object-style access surface: yes
- primary value mirror property:
value - common label property:
label.text - common caption property:
caption.text - common visibility property:
interaction.visible
The family separates:
value— the class-owned tree payload,nodes.*— node data, identity, children, and display posture,selection.*— selected node posture,expansion.*— expanded / collapsed node posture,viewport.*— visible scroll window and indentation posture,editing.*— optional node editing posture,check.*— optional checkbox or check-state posture,drag.*anddrop.*— optional drag/drop posture,- realization-private row pools, renderer caches, virtualized node handles, host-native tree handles, and IDE-private node objects.
- class_id:
frog.widgets.tree_control - family:
tree_widget - compatible role:
control
- primary value: present
- value type:
frog.tree - natural value participation: yes
- user-mutable: yes where editing, selection, expansion, or check-state surfaces are exposed
- diagram-mutable: yes
- mirrored property:
value
A tree control may allow node selection, expansion/collapse, editing labels, reordering nodes, toggling check state, and drag/drop when those capabilities are enabled by the active class posture or profile. The intrinsic class does not require every host to support full drag/drop or virtualized editing.
- class_id:
frog.widgets.tree_indicator - family:
tree_widget - compatible role:
indicator
- primary value: present
- value type:
frog.tree - natural value participation: yes
- user-mutable: no for tree value in the standard portable posture
- diagram-mutable: yes
- mirrored property:
value
A tree indicator is display-oriented. It may still support viewport changes, node expansion for inspection, and selection readout when those interactions do not mutate the tree value.
The canonical portable tree value is a structured finite hierarchy. The baseline recognizes:
| Field | Meaning | Baseline status |
|---|---|---|
nodes | Node table or recursive node list. | required |
root_ids | Top-level node identifiers. | required when nodes are flat-indexed |
selected_node_ids | Optional current selection mirror. | optional |
expanded_node_ids | Optional expansion mirror. | optional |
metadata | Optional tree-level metadata. | optional |
Each node may expose:
nodes[].id— stable node identifier,nodes[].parent_id— optional parent identifier,nodes[].childrenornodes[].child_ids,nodes[].label,nodes[].value,nodes[].icon,nodes[].depthwhere derived or declared,nodes[].path,nodes[].expanded,nodes[].selectable,nodes[].editable,nodes[].checkedwhen check state is exposed,nodes[].visible,nodes[].metadata.
Node identity SHOULD be stable when the tree participates in selection, expansion, check state, or editing. Selection and expansion SHOULD be expressed by node id or node path, not by host-private row handles.
A node path is a stable public path-like address through the hierarchy. Path syntax is realization-independent. It may be represented as an array of node ids or as a canonicalized path string where allowed by the active profile.
selection.mode—none,single_node,multi_node, orrangeselection.selected_node_idsselection.active_node_idselection.active_column_idselection.active_cell_idselection.anchor_node_idselection.selected_paths
Selection is distinct from tree value.
Changing selection does not mutate node payloads unless an explicit edit or method mutates tree data.
When a tabular Tree surface exposes columns, selection.active_column_id and selection.active_cell_id may identify the currently focused cell while selection.active_node_id remains the selected node used by ordinary node-selection dataflow.
expansion.expanded_node_idsexpansion.collapsed_node_idsexpansion.auto_expand_on_searchexpansion.default_state—expandedorcollapsed
Expansion is a view posture. It does not mutate the underlying hierarchy unless explicitly treated as part of the value by a profile or program.
Tree widgets may expose node check states when useful for configuration trees or multi-selection workflows.
check.enabledcheck.mode—none,boolean, ortri_statecheck.checked_node_idscheck.indeterminate_node_idsnodes[].checked
Tri-state check behavior is optional and belongs to the Tree check surface. It does not redefine scalar boolean widgets.
viewport.node_offsetviewport.visible_node_countviewport.row_heightviewport.indent_widthviewport.horizontal_offset
search.querysearch.matchessearch.active_matchfilter.expressionfilter.visible_node_count
Search and filtering are view postures unless explicitly modeled as value transformations elsewhere.
editing.enabledediting.active_node_idediting.pending_labelediting.commit_policy
drag.enableddrag.active_node_idsdrop.enableddrop.target_node_iddrop.position—before,inside, orafter
Drag/drop is optional. Hosts that do not support portable drag/drop may still support selection and expansion.
valuelabel.textlabel.visiblecaption.textcaption.visibleinteraction.visibleinteraction.enabled
nodes.countnodes.root_idsnodes.childrennodes.labelnodes.valuenodes.iconnodes.pathnodes.depthnodes.visible
display.column_headers_visibledisplay.column_headers_fixeddisplay.row_headers_visibledisplay.vertical_scrollbar_visibledisplay.horizontal_scrollbar_visibledisplay.vertical_lines_visibledisplay.horizontal_lines_visibledisplay.hierarchy_lines_visibledisplay.symbols_visibledisplay.expand_contract_symbols_visibledisplay.checkboxes_visible
style.scrollbar.track_fill_colorstyle.scrollbar.border_colorstyle.scrollbar.border_widthstyle.scrollbar.thumb_fill_colorstyle.scrollbar.vertical_thumb_width_percentstyle.scrollbar.vertical_thumb_bleedstyle.scrollbar.horizontal_thumb_height_percent
Tree item symbols, expand/collapse controls, and optional checkbox surfaces are separate visual affordances. A realization or runtime host must not drive them from one shared style bucket because doing so makes an item icon look like a button, or a button look like ordinary decoration.
style.node_icon_slot.fill_colorstyle.node_icon_slot.icon_fill_colorstyle.node_icon_slot.border_colorstyle.node_icon_slot.border_widthstyle.node_icon_slot.sizestyle.node_icon_slot.margin_rightstyle.expander.fill_colorstyle.expander.hover_fill_colorstyle.expander.text_colorstyle.expander.border_colorstyle.expander.border_widthstyle.expander.sizestyle.expander.font_sizestyle.expander.glyph_sizestyle.expander.glyph_stroke_widthstyle.expander.frame_visiblestyle.expander.margin_rightstyle.checkbox.fill_colorstyle.checkbox.checked_fill_colorstyle.checkbox.check_colorstyle.checkbox.border_colorstyle.checkbox.border_widthstyle.checkbox.sizestyle.checkbox.font_sizestyle.checkbox.margin_right
selection.*expansion.*check.*viewport.*search.*filter.*editing.*drag.*drop.*
focus()clear_selection()set_selection(selection)select_node(node_id)select_path(path)expand_node(node_id)collapse_node(node_id)toggle_node(node_id)expand_all()collapse_all()scroll_to_node(node_id)scroll_to_path(path)set_node_label(node_id, label)set_node_value(node_id, value)append_child(parent_id, node)insert_before(reference_node_id, node)remove_node(node_id)move_node(node_id, target_parent_id, position)set_checked(node_id, checked)find_nodes(query)clear_filter()
value_changednode_addednode_removednode_movednode_label_changednode_value_changedselection_changedexpansion_changednode_expandednode_collapsedcheck_changedviewport_changedsearch_changedfilter_changededit_startededit_committededit_cancellednode_clickednode_double_clickeddrag_starteddrop_completedfocus_gainedfocus_lost
rootlabelcaptionframenode_regioncolumn_headersnode_rownode_indentnode_connectorexpander_facecheckbox_facenode_iconnode_labelactive_nodeactive_cellselection_faceedit_overlaydrag_feedbackdrop_targetvertical_scrollbarhorizontal_scrollbarfocus_ring
Node rows, expanders, connectors, checkbox faces, icons, labels, and selection surfaces are public part categories.
Tree node icons are source-owned enum/string values that must resolve through realization-published item-symbol assets when display.symbols_visible is enabled; a host must not invent fallback icon artwork. The item icon is static per node. Expand/collapse state is rendered only through expander_face and style.expander.*, not by mutating the node icon.
The item icon slot, expand/collapse face, and checkbox face have distinct style surfaces:
style.node_icon_slot.*, style.expander.*, and
style.checkbox.*.
When a tabular Tree exposes cell focus, active_cell is the published cell-selection surface and its fill, border color, and border width remain source-owned style properties.
Virtualized node renderers, host-native row handles, recycled item views, or IDE-private node references remain realization-private.
The Tree family supports:
- natural value participation through
widget_value, - property access through
frog.ui.property_readandfrog.ui.property_write, - method invocation where legal,
- event observation where legal.
Ordinary tree dataflow should prefer widget_value.
Object-style access should be used for selection, expansion, check state, node editing, viewport, search, filter, or drag/drop interaction.
Validators SHOULD diagnose at least:
- non-tree
valuepayloads, - duplicate node identifiers,
- missing root nodes,
- parent-child cycles,
- children that reference unknown node ids,
- selection ids outside the tree,
- expansion ids outside the tree,
- check-state ids outside the tree,
- invalid node paths,
- invalid viewport offsets,
- unsupported edit or drag/drop operations on indicators,
- attempts to treat realization-only row handles, virtualized node handles, host-native tree handles, or IDE-private node objects as public semantic storage.
The Tree family provides the standard portable finite hierarchical data baseline of FROG:
frog.widgets.tree_controlfrog.widgets.tree_indicator
It covers node identity, hierarchy, selection, expansion, optional check state, viewport, editing, drag/drop posture, and a stable part model while keeping host-native virtualization and renderer internals downstream from class law.