Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 1.5 KB

File metadata and controls

36 lines (30 loc) · 1.5 KB

Example 14 - Button Latch When Released

Example 14 is a bounded Button widget acceptance slice for behavior.mechanical_action=latch_when_released. It uses one Button control labelled Trigger and one read-only Boolean indicator labelled Latched.

The Button is a command/value widget: the press edge only arms the physical interaction, the release edge latches TRUE, the running program reads one TRUE value, and that read resets the stored Button value back to FALSE. The Boolean indicator shows the consumed program pulse, not a persistent switch state.

trigger_button.value -> latched_indicator.value
trigger_button.value -> public output latched

The visible UI must consume the Default Button SVG and Default Boolean SVG assets through the .frog instance data and the .wfrog realization package. The runtime may provide host input overlays, but those overlays must align to the SVG-published Button face part and must not define a fallback Button visual.

The C++ behavior was accepted first, then the Python and Rust reference runtime source surfaces were aligned to the same Button latch contract. The reference runtimes can execute the Button value copy through the manifest-declared native bool kernel artifact while still consuming the .wfrog package and Default SVG realizations. LLVM remains a backend producer of the native artifact; it is not the runtime identity.