EasyGUI  Version v1.0

Container widget holding widgets. More...

Data Structures

struct  gui_container_t
 Container object structure. More...


enum  gui_container_color_t { GUI_CONTAINER_COLOR_BG = 0x00 }
 Container colors. More...


gui_handle_p gui_container_create (gui_id_t id, float x, float y, float width, float height, gui_handle_p parent, gui_widget_callback_t cb, uint16_t flags)
 Create new container widget. More...
uint8_t gui_container_setcolor (gui_handle_p h, gui_container_color_t index, gui_color_t color)
 Set color to specific part of widget. More...

Detailed Description

Container widget holding widgets.

Container is basic widget suitable for custom children widgets.

It is similar to Window widget except it does not implement any controls like hide, maximize and minimize

Enumeration Type Documentation

◆ gui_container_color_t

Container colors.


Background color index

Function Documentation

◆ gui_container_create()

gui_handle_p gui_container_create ( gui_id_t  id,
float  x,
float  y,
float  width,
float  height,
gui_handle_p  parent,
gui_widget_callback_t  cb,
uint16_t  flags 

Create new container widget.

[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]parentParent widget handle. Set to NULL to use current active parent widget
[in]cbPointer to gui_widget_callback_t callback function. Set to NULL to use default widget callback
[in]flagsflags for widget creation
gui_handle_p object of created widget on success, NULL otherwise

◆ gui_container_setcolor()

uint8_t gui_container_setcolor ( gui_handle_p  h,
gui_container_color_t  index,
gui_color_t  color 

Set color to specific part of widget.

[in,out]hWidget handle
[in]indexColor index. This parameter can be a value of gui_container_color_t enumeration
[in]colorColor value
1 on success, 0 otherwise