Utility Properties & Usage
gtk_ui
Properties
file:stringpath to the Gtk .ui file to loadid:stringid of the widget to load
Example
gtk_ui("./example.ui", "my_button")widget_control
trigger:localsignaltriggered when localsignal prints somethingactions:arrayan array of strings with desired action
Actions
add-class: add a class to child widget (e.g.add-class example)remove-class: remove a class from child widget (e.g.remove-class example)set-property: set a property of child widget (e.g.set-property label Hello)
Example
// widget_control is triggered when localsingal prints anything
let time = localsignal(#{ type: "poll", cmd: "echo", interval: "1s" });
widget_control(#{
trigger: time,
actions: ["add-class highlight", "set-property label 'Hello, World'"]
}, [
button(#{ label: "initial" })
])