API
For Arduino developers
NexButton.h
Go to the documentation of this file.
1 
16 #ifndef __NEXBUTTON_H__
17 #define __NEXBUTTON_H__
18 #ifdef __cplusplus
19 #include "NexTouch.h"
20 
25 class NexButton: public NexTouch
26 {
27 public: /* methods */
28  NexButton(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL);
29 
30  void attachPop(NexTouchEventCb pop, void *ptr = NULL);
31  void detachPop(void);
32 
33  uint16_t getText(char *buffer, uint16_t len);
34  bool setText(const char *buffer);
35 };
36 
37 #endif /* #ifdef __cplusplus */
38 #endif /* #ifndef __NEXBUTTON_H__ */
NexButton(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop=NULL, void *pop_ptr=NULL)
Constructor,inherited NexTouch's constructor function.
Definition: NexButton.cpp:22
uint16_t getText(char *buffer, uint16_t len)
Get text value from button component.
Definition: NexButton.cpp:35
void attachPop(NexTouchEventCb pop, void *ptr=NULL)
Register button pop callback function.
Definition: NexButton.cpp:70
NexButton,subclass of NexTouch,provides simple methods to control button component.
Definition: NexButton.h:25
bool setText(const char *buffer)
Set text value of button component.
Definition: NexButton.cpp:53
API of Nextion.
void detachPop(void)
Unload button pop callback function.
Definition: NexButton.cpp:79
Root Class of Nextion Components.
Definition: NexTouch.h:57