Esp32-RBGridUI
Library for creating UIs for the RBController app
Loading...
Searching...
No Matches
widgets
bar.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
widget.h
"
4
5
namespace
gridui
{
6
9
class
Bar
:
public
Widget
{
10
template
<
typename
Self,
typename
Finished>
11
friend
class
builder::BuilderMixin
;
12
13
using
Widget::Widget
;
14
15
public
:
16
void
setColor
(
const
std::string&
color
) {
17
m_state
->
set
(
"color"
,
new
rbjson::String(
color
));
18
}
19
20
std::string
color
()
const
{
21
return
m_state
->
getString
(
"color"
);
22
}
23
24
void
setFontSize
(
float
fontSize
) {
25
m_state
->
set
(
"fontSize"
,
new
rbjson::Number(
fontSize
));
26
}
27
28
float
fontSize
()
const
{
29
return
m_state
->
getDouble
(
"fontSize"
);
30
}
31
32
void
setMin
(
float
min
) {
33
m_state
->
set
(
"min"
,
new
rbjson::Number(
min
));
34
}
35
36
float
min
()
const
{
37
return
m_state
->
getDouble
(
"min"
);
38
}
39
40
void
setMax
(
float
max
) {
41
m_state
->
set
(
"max"
,
new
rbjson::Number(
max
));
42
}
43
44
float
max
()
const
{
45
return
m_state
->
getDouble
(
"max"
);
46
}
47
48
void
setValue
(
float
value
) {
49
m_state
->
set
(
"value"
,
new
rbjson::Number(
value
));
50
}
51
52
float
value
()
const
{
53
return
m_state
->
getDouble
(
"value"
);
54
}
55
56
void
setShowValue
(
bool
showValue
) {
57
m_state
->
set
(
"showValue"
,
new
rbjson::Bool(
showValue
));
58
}
59
60
bool
showValue
()
const
{
61
return
m_state
->
getBool
(
"showValue"
);
62
}
63
};
64
65
};
gridui::Bar
Definition
bar.h:9
gridui::Bar::setValue
void setValue(float value)
Definition
bar.h:48
gridui::Bar::setMin
void setMin(float min)
Definition
bar.h:32
gridui::Bar::setShowValue
void setShowValue(bool showValue)
Definition
bar.h:56
gridui::Bar::value
float value() const
Definition
bar.h:52
gridui::Bar::setColor
void setColor(const std::string &color)
Definition
bar.h:16
gridui::Bar::color
std::string color() const
Definition
bar.h:20
gridui::Bar::setMax
void setMax(float max)
Definition
bar.h:40
gridui::Bar::fontSize
float fontSize() const
Definition
bar.h:28
gridui::Bar::max
float max() const
Definition
bar.h:44
gridui::Bar::showValue
bool showValue() const
Definition
bar.h:60
gridui::Bar::min
float min() const
Definition
bar.h:36
gridui::Bar::setFontSize
void setFontSize(float fontSize)
Definition
bar.h:24
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:24 for Esp32-RBGridUI by
1.9.8