Base element for dialog, usually parent of dialog window.
More...
|
| gui_handle_p | gui_dialog_create (gui_id_t id, float x, float y, float width, float height, gui_widget_createfunc_fn func, gui_widget_evt_fn evt_fn, uint16_t flags) |
| | Create new dialog base element without any "design" style. More...
|
| |
| int | gui_dialog_createblocking (gui_id_t id, gui_dim_t x, gui_dim_t y, gui_dim_t width, gui_dim_t height, gui_widget_createfunc_fn func, gui_widget_evt_fn evt_fn, uint16_t flags) |
| | Create new dialog base element without any "design" style and wait for dismiss status. More...
|
| |
| uint8_t | gui_dialog_dismiss (gui_handle_p h, int status) |
| | Dismiss (close) dialog with status. More...
|
| |
Base element for dialog, usually parent of dialog window.
◆ gui_dialog_create()
Create new dialog base element without any "design" style.
- Parameters
-
| [in] | id | Widget unique ID to use for identity for callback processing |
| [in] | x | Widget X position relative to parent widget |
| [in] | y | Widget Y position relative to parent widget |
| [in] | width | Widget width in units of pixels |
| [in] | height | Widget height in units of pixels |
| [in] | func | Widget create function used as dialog base. In most cases gui_container_create will be used to create empty container |
| [in] | evt_fn | Custom widget callback function. Set to NULL to use default callback |
| [in] | flags | flags for widget creation |
- Returns
- Widget handle on success,
NULL otherwise
◆ gui_dialog_createblocking()
Create new dialog base element without any "design" style and wait for dismiss status.
- Note
- Function will block thread until dialog is dismissed using gui_dialog_dismiss function by user
- Parameters
-
| [in] | id | Widget unique ID to use for identity for callback processing |
| [in] | x | Widget X position relative to parent widget |
| [in] | y | Widget Y position relative to parent widget |
| [in] | width | Widget width in units of pixels |
| [in] | height | Widget height in units of pixels |
| [in] | func | Widget create function used as dialog base. In most cases gui_container_create will be used to create empty container |
| [in] | evt_fn | Custom widget callback function. Set to NULL to use default callback |
| [in] | flags | flags for widget creation |
- Returns
- Value passed to gui_dialog_dismiss when dialog is dismissed on success,
-1 otherwise
◆ gui_dialog_dismiss()
| uint8_t gui_dialog_dismiss |
( |
gui_handle_p |
h, |
|
|
int |
status |
|
) |
| |
Dismiss (close) dialog with status.
- Parameters
-
| [in] | h | Widget handle |
| [in] | status | Dismiss status. Do not use value -1 as it is reserved for error detection |
- Returns
1 on success, 0 otherwise