Progress bar for progress visualization.
More...
|
| gui_handle_p | gui_progbar_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 progress bar widget. More...
|
| |
| uint8_t | gui_progbar_setcolor (gui_handle_p h, gui_progbar_color_t index, gui_color_t color) |
| | Set color to specific part of widget. More...
|
| |
| uint8_t | gui_progbar_setmin (gui_handle_p h, int32_t val) |
| | Set progress bar minimal value. More...
|
| |
| uint8_t | gui_progbar_setmax (gui_handle_p h, int32_t val) |
| | Set progress bar maximal value. More...
|
| |
| uint8_t | gui_progbar_setvalue (gui_handle_p h, int32_t val) |
| | Set progress bar current value. More...
|
| |
| uint8_t | gui_progbar_setanimation (gui_handle_p h, uint8_t anim) |
| | Set progress bar to animation mode. More...
|
| |
| int32_t | gui_progbar_getmin (gui_handle_p h) |
| | Get progress bar minimal value. More...
|
| |
| int32_t | gui_progbar_getmax (gui_handle_p h) |
| | Get progress bar maximal value. More...
|
| |
| int32_t | gui_progbar_getvalue (gui_handle_p h) |
| | Get progress bar current value. More...
|
| |
| uint8_t | gui_progbar_setpercentmode (gui_handle_p h, uint8_t enable) |
| | Sets percent mode. When in this mode, widget text is in percent according to current value between minimum and maximum. More...
|
| |
Progress bar for progress visualization.
Progress bar is used to show single progress value according to minimal, maximal and current values set to widget.
Progress bars
Example code of image above:
◆ gui_progbar_color_t
Progress bar color list enumeration.
| Enumerator |
|---|
| GUI_PROGBAR_COLOR_BG | Background color index
|
| GUI_PROGBAR_COLOR_FG | Foreground (active part) color index
|
| GUI_PROGBAR_COLOR_BORDER | Border color index
|
◆ gui_progbar_create()
| gui_handle_p gui_progbar_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 progress bar widget.
- Parameters
-
| [in] | id | Widget unique ID to use for identity for callback processing |
| [in] | x | Widget X position relative to parent widget |
| [in] | y | Widget Y position relative to parent widget |
| [in] | width | Widget width in units of pixels |
| [in] | height | Widget height in units of pixels |
| [in] | parent | Parent widget handle. Set to NULL to use current active parent widget |
| [in] | evt_fn | Custom widget callback function. Set to NULL to use default callback |
| [in] | flags | flags for create procedure |
- Returns
- Widget handle on success,
NULL otherwise
◆ gui_progbar_getmax()
| int32_t gui_progbar_getmax |
( |
gui_handle_p |
h | ) |
|
Get progress bar maximal value.
- Parameters
-
- Returns
- Maximal value
◆ gui_progbar_getmin()
| int32_t gui_progbar_getmin |
( |
gui_handle_p |
h | ) |
|
Get progress bar minimal value.
- Parameters
-
- Returns
- Minimal value
◆ gui_progbar_getvalue()
| int32_t gui_progbar_getvalue |
( |
gui_handle_p |
h | ) |
|
Get progress bar current value.
- Parameters
-
- Returns
- Current value
◆ gui_progbar_setanimation()
| uint8_t gui_progbar_setanimation |
( |
gui_handle_p |
h, |
|
|
uint8_t |
anim |
|
) |
| |
Set progress bar to animation mode.
- Parameters
-
| [in] | h | Widget handle |
| [in] | anim | New animation value either 1 (enable) or 0 (disable) |
- Returns
1 on success, 0 otherwise
◆ gui_progbar_setcolor()
Set color to specific part of widget.
- Parameters
-
| [in] | h | Widget handle |
| [in] | index | Color index |
| [in] | color | Color value |
- Returns
1 on success, 0 otherwise
◆ gui_progbar_setmax()
| uint8_t gui_progbar_setmax |
( |
gui_handle_p |
h, |
|
|
int32_t |
val |
|
) |
| |
Set progress bar maximal value.
- Parameters
-
| [in] | h | Widget handle |
| [in] | val | New maximal value |
- Returns
1 on success, 0 otherwise
◆ gui_progbar_setmin()
| uint8_t gui_progbar_setmin |
( |
gui_handle_p |
h, |
|
|
int32_t |
val |
|
) |
| |
Set progress bar minimal value.
- Parameters
-
| [in] | h | Widget handle |
| [in] | val | New minimal value |
- Returns
1 on success, 0 otherwise
◆ gui_progbar_setpercentmode()
| uint8_t gui_progbar_setpercentmode |
( |
gui_handle_p |
h, |
|
|
uint8_t |
enable |
|
) |
| |
Sets percent mode. When in this mode, widget text is in percent according to current value between minimum and maximum.
- Parameters
-
| [in] | h | Widget handle |
| [in] | enable | Value either to enable or disable mode |
- Returns
1 on success, 0 otherwise
◆ gui_progbar_setvalue()
| uint8_t gui_progbar_setvalue |
( |
gui_handle_p |
h, |
|
|
int32_t |
val |
|
) |
| |
Set progress bar current value.
- Parameters
-
| [in] | h | Widget handle |
| [in] | val | New current value |
- Returns
1 on success, 0 otherwise