NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
INextionFontStyleable.h
Go to the documentation of this file.
1 
3 #ifndef __NEONEXTION_INEXTIONFONTSTYLEABLE
4 #define __NEONEXTION_INEXTIONFONTSTYLEABLE
5 
6 #include "Nextion.h"
7 #include "INextionWidget.h"
8 #include "NextionTypes.h"
9 
14 class INextionFontStyleable : public virtual INextionWidget
15 {
16 public:
17  INextionFontStyleable(Nextion &nex, uint8_t page, uint8_t component,
18  const char *name);
19 
20  bool setFont(uint8_t id, bool refresh = true);
21  uint8_t getFont();
22 
23  bool setHAlignment(NextionFontAlignment align, bool refresh = true);
25 
26  bool setVAlignment(NextionFontAlignment align, bool refresh = true);
28 
29  bool afterSet(bool result, bool refresh);
30 };
31 
32 #endif
bool setHAlignment(NextionFontAlignment align, bool refresh=true)
Sets the horizontal alignment of the text.
Definition: INextionFontStyleable.cpp:44
INextionFontStyleable(Nextion &nex, uint8_t page, uint8_t component, const char *name)
Create a new widget adapter.
Definition: INextionFontStyleable.cpp:8
NextionFontAlignment getHAlignment()
Gets the horizontal alignment of the text.
Definition: INextionFontStyleable.cpp:55
bool setFont(uint8_t id, bool refresh=true)
Sets the active font for the text.
Definition: INextionFontStyleable.cpp:22
uint8_t getFont()
Gets the active font for the text.
Definition: INextionFontStyleable.cpp:32
Abstract class for all UI widgets.
Definition: INextionWidget.h:15
NextionFontAlignment getVAlignment()
Gets the vertical alignment of the text.
Definition: INextionFontStyleable.cpp:86
bool setVAlignment(NextionFontAlignment align, bool refresh=true)
Sets the vertical alignment of the text.
Definition: INextionFontStyleable.cpp:75
Driver for a physical Nextion device.
Definition: Nextion.h:31
NextionFontAlignment
Font alignment modes.
Definition: NextionTypes.h:35
bool afterSet(bool result, bool refresh)
Handles refreshing the page after a style has been changed.
Definition: INextionFontStyleable.cpp:105
Interface for widgets that can have their fonts styled.
Definition: INextionFontStyleable.h:14