Esp32-RBGridUI
Library for creating UIs for the RBController app
Loading...
Searching...
No Matches
widgets
input.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
widget.h
"
4
5
namespace
gridui
{
6
9
class
Input
:
public
Widget
{
10
template
<
typename
Self,
typename
Finished>
11
friend
class
builder::BuilderMixin
;
12
13
using
Widget::Widget
;
14
15
public
:
16
void
setText
(
const
std::string&
text
) {
17
m_state
->
set
(
"text"
,
new
rbjson::String(
text
));
18
}
19
20
std::string
text
()
const
{
21
return
m_state
->
getString
(
"text"
);
22
}
23
24
void
setColor
(
const
std::string&
color
) {
25
m_state
->
set
(
"color"
,
new
rbjson::String(
color
));
26
}
27
28
std::string
color
()
const
{
29
return
m_state
->
getString
(
"color"
);
30
}
31
32
void
setType
(
const
std::string&
type
) {
33
m_state
->
set
(
"type"
,
new
rbjson::String(
type
));
34
}
35
36
std::string
type
()
const
{
37
return
m_state
->
getString
(
"type"
);
38
}
39
40
void
setDisabled
(
bool
disabled
) {
41
m_state
->
set
(
"disabled"
,
new
rbjson::Bool(
disabled
));
42
}
43
44
bool
disabled
()
const
{
45
return
m_state
->
getBool
(
"disabled"
);
46
}
47
};
48
49
};
gridui::Input
Definition
input.h:9
gridui::Input::color
std::string color() const
Definition
input.h:28
gridui::Input::setType
void setType(const std::string &type)
Definition
input.h:32
gridui::Input::disabled
bool disabled() const
Definition
input.h:44
gridui::Input::text
std::string text() const
Definition
input.h:20
gridui::Input::setDisabled
void setDisabled(bool disabled)
Definition
input.h:40
gridui::Input::setColor
void setColor(const std::string &color)
Definition
input.h:24
gridui::Input::setText
void setText(const std::string &text)
Definition
input.h:16
gridui::Input::type
std::string type() const
Definition
input.h:36
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::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