Raspberry Pi Weighting Control System
This project serves as a simple weighting control system, that was realized as a Bachelor Thesis
gui_selectable.h
Go to the documentation of this file.
1 #ifndef GUI_SELECTABLE_H
2 #define GUI_SELECTABLE_H
3 
4 #include <string>
5 #include "gui_element.h"
6 #include "imgui.h"
7 
12 class gui_selectable : public gui_element {
13  private:
14  int *selector = nullptr;
15  int index = -1;
16  const char *label = nullptr;
17  int height = -1;
18  void (*callback)() = nullptr;
19  ImGuiSelectableFlags flags = 0;
20  std::string inner_label;
21 
22  public:
34  gui_selectable(const char *label, int index, int *selector, void (*callback)(),
35  int width = -1, int height = -1, ImGuiSelectableFlags flags = 0);
36 
37  void render_element();
38 };
39 
40 #endif
Paren class for other gui elements.
Definition: gui_element.h:8
This creates an ImGui::Seletable, which can serve as a label that can be navigated to.
gui_selectable(const char *label, int index, int *selector, void(*callback)(), int width=-1, int height=-1, ImGuiSelectableFlags flags=0)
Construct a new gui selectable object.