Esp32-RBGridUI
Library for creating UIs for the RBController app
Loading...
Searching...
No Matches
builder
input.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "../widgets/input.h"
4
#include "
widget.h
"
5
6
namespace
gridui
{
7
namespace
builder {
8
11
class
Input
:
public
Widget
,
public
BuilderMixin
<Input, gridui::Input> {
12
static
const
char
* name() {
return
"Input"
; }
13
14
friend
class
gridui::_GridUi
;
15
using
Widget::Widget
;
16
17
public
:
18
Input
&
text
(
const
std::string&
text
) {
19
extra
().set(
"text"
,
text
);
20
return
*
this
;
21
}
22
23
Input
&
color
(
const
std::string&
color
) {
24
extra
().set(
"color"
,
color
);
25
return
*
this
;
26
}
27
28
Input
&
type
(
const
std::string&
type
) {
29
extra
().set(
"type"
,
type
);
30
return
*
this
;
31
}
32
33
Input
&
disabled
(
bool
disabled
) {
34
extra
().set(
"disabled"
,
new
rbjson::Bool(
disabled
));
35
return
*
this
;
36
}
37
40
Input
&
onChanged
(
callback_t
cb) {
41
addCallback
(
"changed"
, cb);
42
return
*
this
;
43
}
44
};
45
46
};
47
};
gridui::Widget::Widget
Widget()
Definition
widget.h:180
gridui::_GridUi
Definition
gridui.h:42
gridui::builder::BuilderMixin
Definition
widget.h:33
gridui::builder::BuilderMixin< Input, gridui::Input >::callback_t
std::function< void(gridui::Input &)> callback_t
Definition
widget.h:41
gridui::builder::BuilderMixin< Input, gridui::Input >::addCallback
void addCallback(const std::string &name, const callback_t &cb)
Definition
widget.h:54
gridui::builder::Input
Definition
input.h:11
gridui::builder::Input::text
Input & text(const std::string &text)
Definition
input.h:18
gridui::builder::Input::color
Input & color(const std::string &color)
Definition
input.h:23
gridui::builder::Input::type
Input & type(const std::string &type)
Definition
input.h:28
gridui::builder::Input::disabled
Input & disabled(bool disabled)
Definition
input.h:33
gridui::builder::Widget
Definition
widget.h:74
gridui::builder::Widget::extra
rbjson::Object & extra()
Definition
widget.cpp:16
gridui::builder::Input::onChanged
Input & onChanged(callback_t cb)
Definition
input.h:40
gridui
Definition
arm.h:8
widget.h
Generated on Tue Jul 9 2024 10:04:33 for Esp32-RBGridUI by
1.9.8