NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
INextionColourable.h
Go to the documentation of this file.
1 
3 #ifndef __NEONEXTION_INEXTIONCOLOURABLE
4 #define __NEONEXTION_INEXTIONCOLOURABLE
5 
6 #include "Nextion.h"
7 #include "INextionWidget.h"
8 #include "NextionTypes.h"
9 
14 class INextionColourable : public virtual INextionWidget
15 {
16 public:
17  INextionColourable(Nextion &nex, uint8_t page, uint8_t component,
18  const char *name);
19 
20  bool setForegroundColour(uint32_t colour, bool refresh = true);
21  uint32_t getForegroundColour();
22 
23  bool setEventForegroundColour(uint32_t colour, bool refresh = true);
24  uint32_t getEventForegroundColour();
25 
26  bool setBackgroundColour(uint32_t colour, bool refresh = true);
27  uint32_t getBackgroundColour();
28 
29  bool setEventBackgroundColour(uint32_t colour, bool refresh = true);
30  uint32_t getEventBackgroundColour();
31 
32  bool setColour(char *type, uint32_t colour, bool refresh);
33  uint32_t getColour(char *type);
34 
35  bool afterSet(bool result, bool refresh);
36 };
37 
38 #endif
uint32_t getForegroundColour()
Gets the normal foreground colour.
Definition: INextionColourable.cpp:31
bool afterSet(bool result, bool refresh)
Handles refreshing the page after a colour has been changed.
Definition: INextionColourable.cpp:132
uint32_t getEventForegroundColour()
Gets the foreground colour when a touch event is active.
Definition: INextionColourable.cpp:53
bool setForegroundColour(uint32_t colour, bool refresh=true)
Sets the normal foreground colour.
Definition: INextionColourable.cpp:21
INextionColourable(Nextion &nex, uint8_t page, uint8_t component, const char *name)
Create a new widget adapter.
Definition: INextionColourable.cpp:8
bool setEventForegroundColour(uint32_t colour, bool refresh=true)
Sets the foreground colour when a touch event is active.
Definition: INextionColourable.cpp:43
Abstract class for all UI widgets.
Definition: INextionWidget.h:15
uint32_t getEventBackgroundColour()
Sets the background colour when a touch event is active.
Definition: INextionColourable.cpp:97
uint32_t getBackgroundColour()
Gets the normal background colour.
Definition: INextionColourable.cpp:75
bool setEventBackgroundColour(uint32_t colour, bool refresh=true)
Sets the background colour when a touch event is active.
Definition: INextionColourable.cpp:87
Interface for widgets that can be coloured.
Definition: INextionColourable.h:14
bool setColour(char *type, uint32_t colour, bool refresh)
Sets a colour by its property name.
Definition: INextionColourable.cpp:109
bool setBackgroundColour(uint32_t colour, bool refresh=true)
Sets the normal background colour.
Definition: INextionColourable.cpp:65
uint32_t getColour(char *type)
Gets a colour by its property name.
Definition: INextionColourable.cpp:120
Driver for a physical Nextion device.
Definition: Nextion.h:31