NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
INextionTouchable.h
Go to the documentation of this file.
1 
3 #ifndef __NEONEXTION_INEXTIONTOUCHABLE
4 #define __NEONEXTION_INEXTIONTOUCHABLE
5 
6 #include "Nextion.h"
7 #include "INextionWidget.h"
8 #include "INextionCallback.h"
10 
15 class INextionTouchable : public virtual INextionWidget
16 {
17 public:
18  INextionTouchable(Nextion &nex, uint8_t page, uint8_t component,
19  const char *name);
20 
21  bool processEvent(uint8_t pageID, uint8_t componentID, uint8_t eventType);
22 
25  void detachCallback();
26 
27 private:
28  INextionCallback *m_callback;
29 };
30 
31 #endif
INextionTouchable(Nextion &nex, uint8_t page, uint8_t component, const char *name)
Create a new widget adapter.
Definition: INextionTouchable.cpp:8
Abstract class for all UI widgets.
Definition: INextionWidget.h:15
void detachCallback()
Removes the callback handler from this widget.
Definition: INextionTouchable.cpp:91
Interface for widgets that can be touched.
Definition: INextionTouchable.h:15
void(* NextionFunction)(NextionEventType, INextionTouchable *)
Event handler function for display events.
Definition: NextionCallbackFunctionHandler.h:19
bool attachCallback(NextionCallbackFunctionHandler::NextionFunction cb)
Attaches a callback function to this widget.
Definition: INextionTouchable.cpp:55
Driver for a physical Nextion device.
Definition: Nextion.h:31
Interface for classes that handle callbacks from a display device.
Definition: INextionCallback.h:12
bool processEvent(uint8_t pageID, uint8_t componentID, uint8_t eventType)
Processes a touch event.
Definition: INextionTouchable.cpp:23