Skip to content

Latest commit

 

History

History
164 lines (134 loc) · 6.54 KB

File metadata and controls

164 lines (134 loc) · 6.54 KB

FROG logo

Path Widget Example Reference

Current Example 09 Path control and indicator proof surface
FROG - Free Open Graphical Language


Scope

The stabilized Path slice is Examples/09_path_value_roundtrip. It proves frog.widgets.path_control and frog.widgets.path_indicator using one normal path row and one preview row with the icon hidden.

path_input.value
  -> path_result.value
  -> public result_path

The secondary no-icon row is a visual-configuration proof. It demonstrates that hiding the icon can tighten the field without creating a dead empty gap.


FROG-Owned Instance Data

  • Examples/09_path_value_roundtrip/main.frog
  • front panel canvas: 700 x 300 panel pixels
  • primary control widget: path_input, frog.widgets.path_control
  • primary indicator widget: path_result, frog.widgets.path_indicator
  • no-icon preview control: path_input_no_icon
  • no-icon preview indicator: path_result_no_icon
  • widget layout, caption placement, value text, icon visibility, browse-button visibility, and visual styling live in .frog

Current instance-level properties proven by the example include:

  • path.kind, path.display_value, and path.validation_state
  • display.icon_visible, display.text_overflow_visible, and display.validation_marker_visible
  • browse.enabled and browse.button_visible
  • style.path_face.* including fill, hover fill, border color, hover border color, and border width
  • style.path_display.* including color, font size, font weight, padding, and baseline offset
  • style.path_icon.* including folder colors and highlight color
  • style.browse_button.* including fill, hover fill, border color, border width, text color, and text size
  • interaction.enabled and interaction.read_only

Published Parts And Configurable Properties

Surface Current source properties Runtime obligation
Caption caption.text, caption.anchor.x/y, caption.align.horizontal Place each label from its own instance and never cross-bind rows.
Path field style.path_face.*, style.path_display.*, path.display_value Keep path text vertically aligned, clipped safely, and visually contained inside the field.
Folder icon display.icon_visible, style.path_icon.* Use the SVG folder part and tighten the text region when the icon is hidden.
Browse button browse.enabled, browse.button_visible, style.browse_button.* Show a flat, instance-styled button that can open the host file picker for the owning control only.
Validation and overflow markers display.validation_marker_visible, display.text_overflow_visible, path.validation_state Keep optional markers controlled by instance properties rather than always-visible runtime decorations.
Independent rows binding.output_id, binding.preview_input_id, binding.preview_output_id Preserve separate primary and no-icon bindings; editing one control must not update the other control.

The Default Path SVG currently exposes these public parts: browse_button, browse_button_text, caption, focus_ring, frame, label, path_display, path_face, path_icon, root, text_overflow_marker, and validation_marker.


WFROG-Owned Realization Data

The example package is:

Examples/09_path_value_roundtrip/ui/path_panel.wfrog
  • Default package: Libraries/Realizations/Default/path.default.wfrog
  • SVG asset: Libraries/Realizations/Default/assets/path/templates/path_rectangular_field.svg
  • asset id consumed by runtimes: path_rectangular_field_svg
  • host capability: optional_file_picker

Runtime Expectations

  • The folder icon is a labeled SVG part, not a runtime-hardcoded icon.
  • The browse button is a labeled widget part and can be visible or hidden by instance properties.
  • When the icon is hidden, the value text region must tighten so the field does not keep an unused icon gap.
  • Hover effects must apply only over the active field or browse button, not over an invisible oversized frame.
  • The file picker updates the relevant control instance only; independent controls must not cross-update each other.
  • The runtime must reject fallback markers such as path-card.

Native Kernel Posture

  • native manifest: Implementations/Reference/LLVM/examples/09_path_value_roundtrip/native_kernel_manifest.json
  • LLVM kernel: Implementations/Reference/LLVM/examples/09_path_value_roundtrip/kernel.ll
  • native ABI entry: frog_example09_run
  • runtime languages validated: C++, Python, Rust

Validation Notes

  • The canonical test value is C:/FROG/hello_world.txt.
  • The primary row and no-icon row must stay visually distinct and independently bound.
  • The text baseline must keep the path legible and contained inside the field.
  • There must be no local duplicated Path SVG under the example directory.