Raspberry Pi Weighting Control System
This project serves as a simple weighting control system, that was realized as a Bachelor Thesis
include
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
:
13
app_workspace_ns::font_size
font_size =
app_workspace_ns::font_size::NORMAL_FONT
;
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,
32
app_workspace_ns::font_size
font_size =
app_workspace_ns::font_size::NORMAL_FONT
);
33
35
void
render_element
();
36
};
37
38
#endif
app_workspace.h
gui_button
Wrapper for ImGui::Button.
Definition:
gui_button.h:11
gui_button::render_element
void render_element()
Definition:
gui_button.cpp:17
gui_button::gui_button
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
gui_element
Paren class for other gui elements.
Definition:
gui_element.h:8
gui_element::y
int y
Definition:
gui_element.h:11
gui_element::width
int width
Definition:
gui_element.h:10
gui_element::x
int x
Definition:
gui_element.h:11
gui_element.h
app_workspace_ns::font_size
font_size
This enum defines sizes of corresponding fonts. E.g.: SMALL_FONT is 12px.
Definition:
app_workspace.h:105
app_workspace_ns::NORMAL_FONT
@ NORMAL_FONT
Definition:
app_workspace.h:107
Generated by
1.9.1