Raspberry Pi Weighting Control System
This project serves as a simple weighting control system, that was realized as a Bachelor Thesis
gui_button.h
Go to the documentation of this file.
1 #ifndef GUI_BUTTON_H
2 #define GUI_BUTTON_H
3 
4 #include "gui_element.h"
5 #include "app_workspace.h"
6 
11 class gui_button : public gui_element {
12  private:
14  int height = -1;
16  void (*callback)() = nullptr;
17  const char *label = "BTN_TXT";
18 
19  public:
31  gui_button(const char *label, void (*callback)(), int x = -1, int y = -1, int width = -1, int height = -1,
33 
35  void render_element();
36 };
37 
38 #endif
Wrapper for ImGui::Button.
Definition: gui_button.h:11
void render_element()
Definition: gui_button.cpp:17
gui_button(const char *label, void(*callback)(), int x=-1, int y=-1, int width=-1, int height=-1, app_workspace_ns::font_size font_size=app_workspace_ns::font_size::NORMAL_FONT)
Construct a new gui button object.
Definition: gui_button.cpp:5
Paren class for other gui elements.
Definition: gui_element.h:8
font_size
This enum defines sizes of corresponding fonts. E.g.: SMALL_FONT is 12px.