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