NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
INextionBooleanValued.h
Go to the documentation of this file.
1 
3 #ifndef __NEONEXTION_INEXTIONBOOLEANVALUED
4 #define __NEONEXTION_INEXTIONBOOLEANVALUED
5 
6 #include "Nextion.h"
8 #include "NextionTypes.h"
9 
17 {
18 public:
22  INextionBooleanValued(Nextion &nex, uint8_t page, uint8_t component,
23  const char *name)
24  : INextionWidget(nex, page, component, name)
25  , INextionNumericalValued(nex, page, component, name)
26  {
27  }
28 
33  bool isActive()
34  {
35  return getValue();
36  }
37 
43  bool setActive(bool active)
44  {
45  return setValue((uint32_t)active);
46  }
47 };
48 
49 #endif
Interface for widgets that store a numerical value.
Definition: INextionNumericalValued.h:16
bool setActive(bool active)
Sets the state of the boolean value.
Definition: INextionBooleanValued.h:43
Abstract class for all UI widgets.
Definition: INextionWidget.h:15
bool setValue(uint32_t value)
Sets the numerical value.
Definition: INextionNumericalValued.h:44
uint32_t getValue()
Gets the numerical value.
Definition: INextionNumericalValued.h:33
bool isActive()
Gets the state of the boolean value of the control.
Definition: INextionBooleanValued.h:33
Interface for widgets that store a boolean value.
Definition: INextionBooleanValued.h:16
INextionBooleanValued(Nextion &nex, uint8_t page, uint8_t component, const char *name)
Create a new widget adapter.
Definition: INextionBooleanValued.h:22
Driver for a physical Nextion device.
Definition: Nextion.h:31