EasyGUI  Version v1.0
Dialog base element

Base element for dialog, usually parent of dialog window. More...

Data Structures

struct  gui_dialog_t
 Dialog object structure. More...
 
struct  dissmissed_dialog_list_t
 Dismissed dialog object structure (private) More...
 

Functions

gui_handle_p gui_dialog_create (gui_id_t id, float x, float y, float width, float height, gui_widget_createfunc_t 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_t 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...
 

Detailed Description

Base element for dialog, usually parent of dialog window.

Function Documentation

◆ gui_dialog_create()

gui_handle_p gui_dialog_create ( gui_id_t  id,
float  x,
float  y,
float  width,
float  height,
gui_widget_createfunc_t  func,
gui_widget_evt_fn  evt_fn,
uint16_t  flags 
)

Create new dialog base element without any "design" style.

Parameters
[in]idWidget unique ID to use for identity for callback processing
[in]xWidget X position relative to parent widget
[in]yWidget Y position relative to parent widget
[in]widthWidget width in units of pixels
[in]heightWidget height in units of pixels
[in]funcWidget create function used as dialog base. In most cases gui_container_create will be used to create empty container
[in]evt_fnCustom widget callback function. Set to NULL to use default callback
[in]flagsflags for widget creation
Returns
Widget handle on success, NULL otherwise

◆ gui_dialog_createblocking()

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_t  func,
gui_widget_evt_fn  evt_fn,
uint16_t  flags 
)

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]idWidget unique ID to use for identity for callback processing
[in]xWidget X position relative to parent widget
[in]yWidget Y position relative to parent widget
[in]widthWidget width in units of pixels
[in]heightWidget height in units of pixels
[in]funcWidget create function used as dialog base. In most cases gui_container_create will be used to create empty container
[in]evt_fnCustom widget callback function. Set to NULL to use default callback
[in]flagsflags 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]hWidget handle
[in]statusDismiss status. Do not use value -1 as it is reserved for error detection
Returns
1 on success, 0 otherwise