Raspberry Pi Weighting Control System
This project serves as a simple weighting control system, that was realized as a Bachelor Thesis
|
This is a wrapper for various ImGui input types. More...
#include <gui_input.h>
Public Member Functions | |
gui_input (input_type type, void *data, int data_size, int x=-1, int y=-1, int width=-1, const char *label=nullptr, app_workspace_ns::font_size font_size=app_workspace_ns::font_size::NORMAL_FONT) | |
Construct a new gui input object. More... | |
void | render_element () |
input_type | get_type () |
app_workspace_ns::kb_input_type | get_in_type () |
void | set_min_max (int min=INT_MIN, int max=INT_MAX) |
void | set_min_max (float min=FLT_MIN, float max=FLT_MAX) |
void | set_min_max (double min=DBL_MIN, double max=DBL_MAX) |
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 |
This is a wrapper for various ImGui input types.
Definition at line 24 of file gui_input.h.
gui_input::gui_input | ( | input_type | type, |
void * | data, | ||
int | data_size, | ||
int | x = -1 , |
||
int | y = -1 , |
||
int | width = -1 , |
||
const char * | label = nullptr , |
||
app_workspace_ns::font_size | font_size = app_workspace_ns::font_size::NORMAL_FONT |
||
) |
Construct a new gui input object.
type | input data type |
data | container for input data, this should correspond to chosen @type |
data_size | max data size, this is used mainly for text input |
x | if set to -1, isn't used |
y | if set to -1, isn't used |
width | if set to -1, isn't used |
label | input can have a label (name), nullptr when not used |
font_size | Default font size is NORMAL |
Definition at line 6 of file gui_input.cpp.
app_workspace_ns::kb_input_type gui_input::get_in_type | ( | ) |
Returns keyboard input type, that is determined by data input type
Definition at line 107 of file gui_input.cpp.
input_type gui_input::get_type | ( | ) |
|
virtual |
Override of parent function, that is required, because it does the actual rendering of the element
Reimplemented from gui_element.
Definition at line 19 of file gui_input.cpp.
void gui_input::set_min_max | ( | double | min = DBL_MIN , |
double | max = DBL_MAX |
||
) |
Setter for minimal and maximal values for DOUBLE inputs
Definition at line 132 of file gui_input.cpp.
void gui_input::set_min_max | ( | float | min = FLT_MIN , |
float | max = FLT_MAX |
||
) |
Setter for minimal and maximal values for FLOAT inputs
Definition at line 126 of file gui_input.cpp.
void gui_input::set_min_max | ( | int | min = INT_MIN , |
int | max = INT_MAX |
||
) |
Setter for minimal and maximal values for INT inputs
Definition at line 120 of file gui_input.cpp.
void gui_input::set_value_change_action | ( | void(*)() | callback | ) |
Sets input value gchange listener
Definition at line 138 of file gui_input.cpp.