NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
INextionWidget.h
Go to the documentation of this file.
1 
3 #ifndef __NEONEXTION_INEXTIONWIDGET
4 #define __NEONEXTION_INEXTIONWIDGET
5 
6 #include "Nextion.h"
7 
16 {
17 public:
18  INextionWidget(Nextion &nex, uint8_t page, uint8_t component,
19  const char *name);
20 
21  uint8_t getPageID();
22  uint8_t getComponentID();
23 
24  bool setNumberProperty(char *propertyName, uint32_t value);
25  uint32_t getNumberProperty(char *propertyName);
26  bool setStringProperty(char *propertyName, char *value);
27  size_t getStringProperty(char *propertyName, char *value, size_t len);
28 
29 protected:
30  bool sendCommand(char *commandStr, bool checkComplete = true);
31 
32 protected:
34  uint8_t m_pageID;
35  uint8_t m_componentID;
36  const char *m_name;
37 };
38 
39 #endif
const char * m_name
Name of this widget.
Definition: INextionWidget.h:36
bool setStringProperty(char *propertyName, char *value)
Sets the value of a string property of this widget.
Definition: INextionWidget.cpp:77
size_t getStringProperty(char *propertyName, char *value, size_t len)
Gets the value of a string property of this widget.
Definition: INextionWidget.cpp:92
uint8_t m_componentID
Component ID of this widget.
Definition: INextionWidget.h:35
Abstract class for all UI widgets.
Definition: INextionWidget.h:15
uint32_t getNumberProperty(char *propertyName)
Gets the value of a numerical property of this widget.
Definition: INextionWidget.cpp:58
Nextion & m_nextion
Reference to the Nextion driver.
Definition: INextionWidget.h:33
uint8_t getPageID()
Gets the ID of the page this widget resides on.
Definition: INextionWidget.cpp:25
uint8_t getComponentID()
Gets the component ID of this widget.
Definition: INextionWidget.cpp:34
uint8_t m_pageID
ID of page this widget is on.
Definition: INextionWidget.h:34
INextionWidget(Nextion &nex, uint8_t page, uint8_t component, const char *name)
Create a new widget adapter.
Definition: INextionWidget.cpp:12
bool setNumberProperty(char *propertyName, uint32_t value)
Sets the value of a numerical property of this widget.
Definition: INextionWidget.cpp:45
Driver for a physical Nextion device.
Definition: Nextion.h:31