forked from DanNixon/NeoNextion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINextionColourable.h
38 lines (28 loc) · 1013 Bytes
/
INextionColourable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*! \file */
#ifndef __NEONEXTION_INEXTIONCOLOURABLE
#define __NEONEXTION_INEXTIONCOLOURABLE
#include "Nextion.h"
#include "INextionWidget.h"
#include "NextionTypes.h"
/*!
* \class INextionColourable
* \brief Interface for widgets that can be coloured.
*/
class INextionColourable : public virtual INextionWidget
{
public:
INextionColourable(Nextion &nex, uint8_t page, uint8_t component,
const char *name);
bool setForegroundColour(uint32_t colour, bool refresh = true);
uint32_t getForegroundColour();
bool setEventForegroundColour(uint32_t colour, bool refresh = true);
uint32_t getEventForegroundColour();
bool setBackgroundColour(uint32_t colour, bool refresh = true);
uint32_t getBackgroundColour();
bool setEventBackgroundColour(uint32_t colour, bool refresh = true);
uint32_t getEventBackgroundColour();
bool setColour(char *type, uint32_t colour, bool refresh);
uint32_t getColour(char *type);
bool afterSet(bool result, bool refresh);
};
#endif