Esp32-RBGridUI
Library for creating UIs for the RBController app
Loading...
Searching...
No Matches
text.h
Go to the documentation of this file.
1#pragma once
2
3#include "../widgets/text.h"
4#include "widget.h"
5
6namespace gridui {
7namespace builder {
8
11class Text : public Widget, public BuilderMixin<Text, gridui::Text> {
12 static const char* name() { return "Text"; }
13
14 friend class gridui::_GridUi;
15 using Widget::Widget;
16
17public:
18 Text& text(const std::string& text) {
19 extra().set("text", text);
20 return *this;
21 }
22
24 extra().set("fontSize", fontSize);
25 return *this;
26 }
27
28 Text& color(const std::string& color) {
29 extra().set("color", color);
30 return *this;
31 }
32
33 Text& background(const std::string& background) {
34 extra().set("background", background);
35 return *this;
36 }
37
38 Text& align(const std::string& align) {
39 extra().set("align", align);
40 return *this;
41 }
42
43 Text& valign(const std::string& valign) {
44 extra().set("valign", valign);
45 return *this;
46 }
47
48 Text& prefix(const std::string& prefix) {
49 extra().set("prefix", prefix);
50 return *this;
51 }
52
53 Text& suffix(const std::string& suffix) {
54 extra().set("suffix", suffix);
55 return *this;
56 }
57};
58
59};
60};
Text & suffix(const std::string &suffix)
Definition text.h:53
Text & fontSize(float fontSize)
Definition text.h:23
Text & valign(const std::string &valign)
Definition text.h:43
Text & text(const std::string &text)
Definition text.h:18
Text & align(const std::string &align)
Definition text.h:38
Text & prefix(const std::string &prefix)
Definition text.h:48
Text & background(const std::string &background)
Definition text.h:33
Text & color(const std::string &color)
Definition text.h:28
rbjson::Object & extra()
Definition widget.cpp:16
Definition arm.h:8