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, GUI_iDim_t x, GUI_iDim_t y, GUI_Dim_t width, GUI_Dim_t 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.

Enumerator
GUI_CONTAINER_COLOR_BG 

Background color index

Function Documentation

◆ gui_container_create()

GUI_HANDLE_p gui_container_create ( GUI_ID_t  id,
GUI_iDim_t  x,
GUI_iDim_t  y,
GUI_Dim_t  width,
GUI_Dim_t  height,
GUI_HANDLE_p  parent,
GUI_WIDGET_CALLBACK_t  cb,
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 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
Return values
>0: GUI_HANDLE_p object of created widget
0Widget creation failed

◆ 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,out]hWidget handle
[in]indexColor index. This parameter can be a value of GUI_CONTAINER_COLOR_t enumeration
[in]colorColor value
Return values
1Color was set ok
0Color was not set