EasyGUI  v0.1
Platform independent GUI Library
Dialog base element

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

Data Structures

struct  GUI_DIALOG_t
 Dialog object structure. More...
 

Functions

GUI_HANDLE_p gui_dialog_create (GUI_ID_t id, GUI_iDim_t x, GUI_iDim_t y, GUI_Dim_t width, GUI_Dim_t height, GUI_WIDGET_CreateFunc_t func, GUI_WIDGET_CALLBACK_t cb, uint16_t flags)
 Create new dialog base element without any "design" style. More...
 
int gui_dialog_createblocking (GUI_ID_t id, GUI_iDim_t x, GUI_iDim_t y, GUI_Dim_t width, GUI_Dim_t height, GUI_WIDGET_CreateFunc_t func, GUI_WIDGET_CALLBACK_t cb, 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_HANDLE_p gui_dialog_create ( GUI_ID_t  id,
GUI_iDim_t  x,
GUI_iDim_t  y,
GUI_Dim_t  width,
GUI_Dim_t  height,
GUI_WIDGET_CreateFunc_t  func,
GUI_WIDGET_CALLBACK_t  cb,
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 uints of pixels
[in]funcWidget create function used as dialog base. In most cases gui_container_create will be used to create empty container
[in]cbPointer to GUI_WIDGET_CALLBACK_t callback function. Set to NULL to use default widget callback
[in]flagsFlags for widget creation
Return values
>0: GUI_HANDLE_p object of created widget
0Widget creation failed
int gui_dialog_createblocking ( GUI_ID_t  id,
GUI_iDim_t  x,
GUI_iDim_t  y,
GUI_Dim_t  width,
GUI_Dim_t  height,
GUI_WIDGET_CreateFunc_t  func,
GUI_WIDGET_CALLBACK_t  cb,
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 uints of pixels
[in]funcWidget create function used as dialog base. In most cases gui_container_create will be used to create empty container
[in]cbPointer to GUI_WIDGET_CALLBACK_t callback function. Set to NULL to use default widget callback
[in]flagsFlags for widget creation
Return values
-1Widget creation fail
intValue passed to gui_dialog_dismiss when dialog is dismissed
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
Return values
1Dialog was dismissed ok
0Dialog was not dismissed