Skip to content

Latest commit

 

History

History
132 lines (102 loc) · 5.53 KB

File metadata and controls

132 lines (102 loc) · 5.53 KB

FROG logo

Default Realization — Tree Widgets

Default realization posture for the standardized tree widgets
FROG — Free Open Graphical Language


Target Classes

  • frog.widgets.tree_control
  • frog.widgets.tree_indicator

Purpose

This default realization publishes the portable Tree geometry needed by runtimes and IDE hosts. It intentionally keeps the SVG asset small: the shell publishes only stable anchors and geometry surfaces. Rows, hierarchy affordances, active node or cell selection, editing, drag/drop feedback, and scrollbar thumbs are runtime host overlays generated from .frog instance data and this .wfrog realization contract.

This realization is downstream from widget class law. It does not define tree value semantics, editing semantics, check-state propagation, filesystem behavior, object-browser behavior, or host-native virtualization semantics. It also does not keep hidden prototype visuals in the SVG; unused visual fragments must be removed rather than disabled by runtime CSS.


Static Shell Parts

  • root
  • label
  • caption
  • node_region
  • vertical_scrollbar
  • horizontal_scrollbar

Dynamic Overlay Parts

The following public parts are realized by host overlays aligned to the static shell geometry:

  • column_headers
  • node_row
  • node_indent
  • node_connector
  • expander_face
  • checkbox_face
  • node_icon
  • node_label
  • active_node
  • active_cell
  • selection_face
  • edit_overlay
  • drag_feedback
  • drop_target

Published Assets

  • assets/tree/templates/tree_shell.svg

Rendering Posture

  • node_region anchors the visible tree body.
  • column_headers is generated as a host overlay. Its visibility and fixed/scrolling posture are controlled by .frog display properties.
  • vertical_scrollbar anchors the vertical scrollbar host overlay.
  • horizontal_scrollbar anchors the horizontal scrollbar host overlay.
  • label and caption expose movable text anchors owned by the .frog instance.
  • Tree rows, text, expand/collapse controls, selection, edits, and scroll thumbs are generated overlays, not hidden SVG artwork.
  • node_icon consumes realization-published item-symbol SVG assets and style.node_icon_slot.* for the item icon slot.
  • expander_face consumes style.expander.*; it must not share the item icon slot style. The square frame may be hidden with style.expander.frame_visible while keeping the plus/minus glyph and expansion behavior.
  • checkbox_face consumes style.checkbox.*; it must not share the expander or item icon slot style.

A runtime may replace the SVG-backed tree with a host-native virtual tree when it preserves the published part model and public property/method/event surfaces.


Resizable Host Posture

The Tree shell SVG uses a viewBox and published static geometry parts, so the realization can be resized by an IDE or runtime host without bitmap pixelation. The host must still recompute its dynamic overlays from the source-owned widget bounds, viewport settings, row and column records, text metrics, and this realization's published parts.

Scaling the SVG does not authorize hardcoded runtime visuals. Rows, cells, scrollbars, expanders, checkboxes, item icons, active selection, edit overlays, labels, and captions remain bound to .frog instance data and the .wfrog asset/part contract. Browser, Qt, native desktop, or GPU-backed hosts may all render this widget when they preserve that same contract.


Validation Expectations

  • All declared public parts must exist in widget class law.
  • The declared SVG resource must resolve relative to this package.
  • The shell SVG must expose only static anchor and geometry data-frog-part markers.
  • Dynamic Tree parts must be generated as host overlays aligned to the static geometry markers.
  • Resources must not become semantic owners of tree value.
  • Item icon slots, expanders, and checkbox faces must remain independently styleable through style.node_icon_slot.*, style.expander.*, and style.checkbox.*.
  • The expander plus/minus glyph must be visually centered inside its expander face; hiding the frame must not remove the glyph or change expansion semantics.
  • Host-native virtualization must not expose private node or row handles as public members.
  • Unused prototype visuals must be removed from the SVG and .wfrog, not hidden in the runtime.