GUI Panels
dev.gui.panels - wire path g\c - generated from fwMenuGUIPanels.
add_panel
Add Panel. Reinitializes the custom panel for controls.
Wire command: g\c\a
| Arg | Wire type |
|---|---|
| use_tile | bool |
| tile_id | decS32 |
| color | color |
| show_menu | bool |
Returns: none (Ok/Err only)
dev.gui.panels.add_panel(use_tile: bool, tile_id: int, color: int | str, show_menu: bool) -> Result
ow_status ow_gui_panels_add_panel(ow_device* dev, bool use_tile, int32_t tile_id, const char* color, bool show_menu);
dev.gui().panels().add_panel(use_tile: bool, tile_id: i32, color: &str, show_menu: bool) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.panels.add_panel(use_tile, tile_id, color, show_menu) # check dev.ok
add_panel_picklist
Add Panel Picklist. Shows a panel that allows user to pick from a list.
Wire command: g\c\b
| Arg | Wire type |
|---|---|
| use_tile | bool |
| tile_id | decS32 |
| icon_id | decS32 |
| log_index | decS32 |
| back_color | color |
| fore_color | color |
| caption | string |
Returns: none (Ok/Err only)
dev.gui.panels.add_panel_picklist(use_tile: bool, tile_id: int, icon_id: int, log_index: int, back_color: int | str, fore_color: int | str, caption: str) -> Result
ow_status ow_gui_panels_add_panel_picklist(ow_device* dev, bool use_tile, int32_t tile_id, int32_t icon_id, int32_t log_index, const char* back_color, const char* fore_color, const char* caption);
dev.gui().panels().add_panel_picklist(use_tile: bool, tile_id: i32, icon_id: i32, log_index: i32, back_color: &str, fore_color: &str, caption: &str) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.panels.add_panel_picklist(use_tile, tile_id, icon_id, log_index, back_color, fore_color, caption) # check dev.ok
show_panel
Show Panel.
Wire command: g\c\c
| Arg | Wire type |
|---|---|
| index | decS32 |
Returns: none (Ok/Err only)
dev.gui.panels.show_panel(index: int) -> Result
ow_status ow_gui_panels_show_panel(ow_device* dev, int32_t index);
dev.gui().panels().show_panel(index: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.panels.show_panel(index) # check dev.ok