SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
ui_button.h
Go to the documentation of this file.
1#ifndef _SENSESP_UI_UI_BUTTON_H_
2#define _SENSESP_UI_UI_BUTTON_H_
3
4#include <map>
5
6#include "Arduino.h"
8
9namespace sensesp {
10
17class UIButton : public Observable {
18 public:
21
22 const bool get_must_confirm() { return must_confirm_; }
23 const String get_title() { return title_; }
24 const String get_name() { return name_; }
25
26 static const std::map<String, UIButton*>& get_ui_buttons() {
27 return ui_buttons_;
28 }
29
30 static UIButton* add(String name, String title, bool must_confirm = true) {
33
34 return new_cmd;
35 }
36
37 protected:
41
42 static std::map<String, UIButton*> ui_buttons_;
43};
44
45} // namespace sensesp
46
47#endif
Construct a new transform based on a single function.
A base class which allow observers to attach callbacks to themselves. The callbacks will be called wh...
Definition observable.h:16
UIButton implements a button interface on the web UI.
Definition ui_button.h:17
static const std::map< String, UIButton * > & get_ui_buttons()
Definition ui_button.h:26
UIButton(String title, String name, bool must_confirm)
Definition ui_button.h:19
const bool get_must_confirm()
Definition ui_button.h:22
static std::map< String, UIButton * > ui_buttons_
Definition ui_button.h:42
const String get_name()
Definition ui_button.h:24
const String get_title()
Definition ui_button.h:23
static UIButton * add(String name, String title, bool must_confirm=true)
Definition ui_button.h:30