Raspberry Pi Weighting Control System
This project serves as a simple weighting control system, that was realized as a Bachelor Thesis
|
Wrapper for ImGui combo box structure. More...
#include <gui_combobox.h>
Public Member Functions | |
gui_combobox (const char **list, int list_size, int *selected_index, const char *label=nullptr, int x=-1, int y=-1, int width=-1, app_workspace_ns::font_size font_size=app_workspace_ns::font_size::NORMAL_FONT) | |
Construct a new gui combobox object. More... | |
void | render_element () |
int | get_selected_index () |
const char * | get_selected_item () |
void | set_value_change_action (void(*callback)()) |
![]() | |
void | set_refresh_screen (bool *refresh_flag) |
Additional Inherited Members | |
![]() | |
int | index = -1 |
![]() | |
int | width = -1 |
int | x = -1 |
int | y = -1 |
bool * | refresh_screen = nullptr |
Wrapper for ImGui combo box structure.
Definition at line 11 of file gui_combobox.h.
gui_combobox::gui_combobox | ( | const char ** | list, |
int | list_size, | ||
int * | selected_index, | ||
const char * | label = nullptr , |
||
int | x = -1 , |
||
int | y = -1 , |
||
int | width = -1 , |
||
app_workspace_ns::font_size | font_size = app_workspace_ns::font_size::NORMAL_FONT |
||
) |
Construct a new gui combobox object.
list | is an array of labels, that the combobox selection consists of |
list_size | label array size |
selected_index | this variable contains selected index |
label | combox can have a label (name), nullptr when not used |
x | if set to -1, isn't used |
y | if set to -1, isn't used |
width | if set to -1, isn't used |
font_size | Default font size is NORMAL |
Definition at line 4 of file gui_combobox.cpp.
int gui_combobox::get_selected_index | ( | ) |
Returns selected index, that is used internally. This is for legacy reasons, only selected_index could be used
Definition at line 62 of file gui_combobox.cpp.
const char * gui_combobox::get_selected_item | ( | ) |
Returns selected label
Definition at line 66 of file gui_combobox.cpp.
|
virtual |
Override of parent function, that is required, because it does the actual rendering of the element
Reimplemented from gui_element.
Definition at line 17 of file gui_combobox.cpp.
void gui_combobox::set_value_change_action | ( | void(*)() | callback | ) |
Sets value change action
Definition at line 70 of file gui_combobox.cpp.