Esp32-RBGridUI
Library for creating UIs for the RBController app
Loading...
Searching...
No Matches
widgets
checkbox.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
widget.h
"
4
5
namespace
gridui
{
6
9
class
Checkbox
:
public
Widget
{
10
template
<
typename
Self,
typename
Finished>
11
friend
class
builder::BuilderMixin
;
12
13
using
Widget::Widget
;
14
15
public
:
16
void
setFontSize
(
float
fontSize
) {
17
m_state
->
set
(
"fontSize"
,
new
rbjson::Number(
fontSize
));
18
}
19
20
float
fontSize
()
const
{
21
return
m_state
->
getDouble
(
"fontSize"
);
22
}
23
24
void
setChecked
(
bool
checked
) {
25
m_state
->
set
(
"checked"
,
new
rbjson::Bool(
checked
));
26
}
27
28
bool
checked
()
const
{
29
return
m_state
->
getBool
(
"checked"
);
30
}
31
32
void
setColor
(
const
std::string&
color
) {
33
m_state
->
set
(
"color"
,
new
rbjson::String(
color
));
34
}
35
36
std::string
color
()
const
{
37
return
m_state
->
getString
(
"color"
);
38
}
39
40
void
setText
(
const
std::string&
text
) {
41
m_state
->
set
(
"text"
,
new
rbjson::String(
text
));
42
}
43
44
std::string
text
()
const
{
45
return
m_state
->
getString
(
"text"
);
46
}
47
};
48
49
};
gridui::Checkbox
Definition
checkbox.h:9
gridui::Checkbox::setFontSize
void setFontSize(float fontSize)
Definition
checkbox.h:16
gridui::Checkbox::setColor
void setColor(const std::string &color)
Definition
checkbox.h:32
gridui::Checkbox::color
std::string color() const
Definition
checkbox.h:36
gridui::Checkbox::setChecked
void setChecked(bool checked)
Definition
checkbox.h:24
gridui::Checkbox::fontSize
float fontSize() const
Definition
checkbox.h:20
gridui::Checkbox::setText
void setText(const std::string &text)
Definition
checkbox.h:40
gridui::Checkbox::checked
bool checked() const
Definition
checkbox.h:28
gridui::Checkbox::text
std::string text() const
Definition
checkbox.h:44
gridui::WidgetState::set
bool set(const std::string &key, rbjson::Value *value)
Definition
widget.cpp:47
gridui::WidgetState::getString
std::string getString(const std::string &key, std::string def="") const
Definition
widget.cpp:27
gridui::WidgetState::getBool
bool getBool(const std::string &key, bool def=false) const
Definition
widget.cpp:42
gridui::WidgetState::getDouble
double getDouble(const std::string &key, double def=0.0) const
Definition
widget.cpp:37
gridui::Widget
Definition
widget.h:189
gridui::Widget::m_state
WidgetState * m_state
Definition
widget.h:275
gridui::Widget::Widget
Widget()
Definition
widget.h:191
gridui::builder::BuilderMixin
Definition
widget.h:33
gridui
Definition
arm.h:8
widget.h
Generated on Sun Jan 19 2025 14:54:25 for Esp32-RBGridUI by
1.9.8