GUI Getting Started¶
Quick start guide for creating GUI applications.
Minimal GUI App¶
gui_init("com.example.app");
let window = gui_window("My App", 400, 300);
let label = gui_label("Hello, GUI!");
gui_add(window, label);
gui_run();
With Button¶
gui_init("com.example.button");
let window = gui_window("Button Demo", 300, 200);
let button = gui_button("Click Me");
fn on_click() {
print "Button clicked!";
}
gui_on(button, "clicked", "on_click");
gui_add(window, button);
gui_run();
With Layout¶
gui_init("com.example.layout");
let window = gui_window("Layout Demo", 400, 300);
let box = gui_box("vertical", 10);
let label = gui_label("Enter your name:");
let entry = gui_entry("Name");
let button = gui_button("Submit");
gui_add(box, label);
gui_add(box, entry);
gui_add(box, button);
gui_add(window, box);
gui_run();