EasyGUI  v0.1
Platform independent GUI Library

Size management functions. More...

Functions

uint8_t gui_widget_setsize (GUI_HANDLE_p h, GUI_Dim_t width, GUI_Dim_t height)
 Set widget size in units of pixels. More...
 
uint8_t gui_widget_setsizepercent (GUI_HANDLE_p h, float width, float height)
 Set widget size in units of percent. More...
 
uint8_t gui_widget_setwidth (GUI_HANDLE_p h, GUI_Dim_t width)
 Set width of widget in units of pixels. More...
 
uint8_t gui_widget_setheight (GUI_HANDLE_p h, GUI_Dim_t height)
 Set height of widget in units of pixels. More...
 
uint8_t gui_widget_setwidthpercent (GUI_HANDLE_p h, float width)
 Set width of widget in percentage relative to parent widget. More...
 
uint8_t gui_widget_setheightpercent (GUI_HANDLE_p h, float height)
 Set height of widget in percentage relative to parent widget. More...
 
GUI_Dim_t gui_widget_getwidth (GUI_HANDLE_p h)
 Get total width of widget effective on screen in units of pixels Function returns width of widget according to current widget setup (expanded, fill, percent, etc.) More...
 
GUI_Dim_t gui_widget_getheight (GUI_HANDLE_p h)
 Get total height of widget effective on screen in units of pixels Function returns height of widget according to current widget setup (expanded, fill, percent, etc.) More...
 
uint8_t gui_widget_setexpanded (GUI_HANDLE_p h, uint8_t state)
 Set expandend mode on widget. When enabled, widget will be at X,Y = 0,0 relative to parent and will have width,height = 100%,100%. More...
 
uint8_t gui_widget_isexpanded (GUI_HANDLE_p h)
 Get widget expanded status. More...
 

Detailed Description

Size management functions.

Function Documentation

GUI_Dim_t gui_widget_getheight ( GUI_HANDLE_p  h)

Get total height of widget effective on screen in units of pixels Function returns height of widget according to current widget setup (expanded, fill, percent, etc.)

Note
Even if percentage height is used, function will always return value in pixels
Parameters
[in]hPointer to GUI_HANDLE_p structure
Return values
Totalheight in units of pixels
See also
gui_widget_getwidth, gui_widget_setheight
GUI_Dim_t gui_widget_getwidth ( GUI_HANDLE_p  h)

Get total width of widget effective on screen in units of pixels Function returns width of widget according to current widget setup (expanded, fill, percent, etc.)

Note
Even if percentage width is used, function will always return value in pixels
Parameters
[in]hPointer to GUI_HANDLE_p structure
Return values
Totalwidth in units of pixels
See also
gui_widget_getheight, gui_widget_setwidth
uint8_t gui_widget_isexpanded ( GUI_HANDLE_p  h)

Get widget expanded status.

Parameters
[in,out]hWidget handle
Return values
1Widget is expanded
0Widget is not expanded
See also
gui_widget_setexpanded
uint8_t gui_widget_setexpanded ( GUI_HANDLE_p  h,
uint8_t  state 
)

Set expandend mode on widget. When enabled, widget will be at X,Y = 0,0 relative to parent and will have width,height = 100%,100%.

Parameters
[in,out]hWidget handle
[in]stateState for expanded mode
Return values
1Widget expandend status set ok
0Widget expandend status was not set
See also
gui_widget_isexpanded
uint8_t gui_widget_setheight ( GUI_HANDLE_p  h,
GUI_Dim_t  height 
)

Set height of widget in units of pixels.

Parameters
[in,out]hWidget handle
[in]heightHeight in units of pixels
Return values
1Height was set ok
0Height was not set
See also
gui_widget_setwidth, gui_widget_setwidthpercent, gui_widget_setheightpercent
uint8_t gui_widget_setheightpercent ( GUI_HANDLE_p  h,
float  height 
)

Set height of widget in percentage relative to parent widget.

Parameters
[in,out]hWidget handle
[in]heightHeight in percentage
Return values
1Height was set ok
0Height was not set
See also
gui_widget_setwidth, gui_widget_setheight, gui_widget_setwidthpercent
uint8_t gui_widget_setsize ( GUI_HANDLE_p  h,
GUI_Dim_t  width,
GUI_Dim_t  height 
)

Set widget size in units of pixels.

Widget size management

Parameters
[in,out]hWidget handle
[in]widthWidth value
[in]heightHeight value
Return values
1Size was set ok
0Size was not set
See also
gui_widget_setsizepercent
uint8_t gui_widget_setsizepercent ( GUI_HANDLE_p  h,
float  width,
float  height 
)

Set widget size in units of percent.

Parameters
[in,out]hWidget handle
[in]widthWidth value
[in]heightHeight value
Return values
1Size was set ok
0Size was not set
See also
gui_widget_setsize
uint8_t gui_widget_setwidth ( GUI_HANDLE_p  h,
GUI_Dim_t  width 
)

Set width of widget in units of pixels.

Parameters
[in,out]hWidget handle
[in]widthWidth in units of pixels
Return values
1Width was set ok
0Width was not set
See also
gui_widget_setheight, gui_widget_setwidthpercent, gui_widget_setheightpercent
uint8_t gui_widget_setwidthpercent ( GUI_HANDLE_p  h,
float  width 
)

Set width of widget in percentage relative to parent widget.

Parameters
[in,out]hWidget handle
[in]widthWidth in percentage
Return values
1Width was set ok
0Width was not set
See also
gui_widget_setwidth, gui_widget_setheight, gui_widget_setheightpercent