NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
NextionCallbackFunctionHandler.h
Go to the documentation of this file.
1 
3 #ifndef __NEONEXTION_NEXTIONCALLBACKFUNCTIONHANDLER
4 #define __NEONEXTION_NEXTIONCALLBACKFUNCTIONHANDLER
5 
6 #include "INextionCallback.h"
7 
13 {
14 public:
20 
26  : m_function(f)
27  {
28  }
29 
36  {
37  if (m_function != NULL)
38  m_function(type, widget);
39  }
40 
41 private:
42  NextionFunction m_function;
43 };
44 
45 #endif
Event handler for function pointers.
Definition: NextionCallbackFunctionHandler.h:12
NextionEventType
Type of events received from device.
Definition: NextionTypes.h:76
Interface for widgets that can be touched.
Definition: INextionTouchable.h:15
void handleNextionEvent(NextionEventType type, INextionTouchable *widget)
Handle a callback.
Definition: NextionCallbackFunctionHandler.h:35
NextionCallbackFunctionHandler(NextionFunction f)
Creates a new function pointer callback handler.
Definition: NextionCallbackFunctionHandler.h:25
void(* NextionFunction)(NextionEventType, INextionTouchable *)
Event handler function for display events.
Definition: NextionCallbackFunctionHandler.h:19
Interface for classes that handle callbacks from a display device.
Definition: INextionCallback.h:12