EasyGUI  Version v1.0
Container

Container widget holding widgets. More...

Data Structures

struct  gui_container_t
 Container object structure. More...
 

Enumerations

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

Functions

gui_handle_p gui_container_create (gui_id_t id, float x, float y, float width, float height, gui_handle_p parent, gui_widget_evt_fn evt_fn, 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.

Enumerator
GUI_CONTAINER_COLOR_BG 

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_evt_fn  evt_fn,
uint16_t  flags 
)

Create new container widget.

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]parentParent widget handle. Set to NULL to use current active parent widget
[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_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.

Parameters
[in]hWidget handle
[in]indexColor index
[in]colorColor value
Returns
1 on success, 0 otherwise