API
For Arduino developers
Public Member Functions | List of all members
NexText Class Reference

NexText,subclass of NexTouch,provides simple methods to control text component. More...

#include <NexText.h>

Inheritance diagram for NexText:
NexTouch

Public Member Functions

 NexText (NexPid pid, NexCid cid, char *name, NexTouchEventCb pop=NULL, void *pop_ptr=NULL)
 Constructor,inherited NexTouch's constructor function.
 
void attachPop (NexTouchEventCb pop, void *ptr=NULL)
 Register text pop callback function. More...
 
void detachPop (void)
 Unload text pop callback function.
 
uint16_t getText (char *buffer, uint16_t len)
 Get the value of text. More...
 
bool setText (const char *buffer)
 Set the value of text. More...
 
- Public Member Functions inherited from NexTouch
 NexTouch (NexPid pid, NexCid cid, char *name, NexTouchEventCb pop=NULL, void *pop_ptr=NULL, NexTouchEventCb push=NULL, void *push_ptr=NULL)
 Constructor of Nextouch. More...
 
NexPid getPid (void)
 Get page id. More...
 
NexCid getCid (void)
 Get component id. More...
 
const char * getObjName (void)
 Get component name. More...
 

Detailed Description

NexText,subclass of NexTouch,provides simple methods to control text component.

Examples:
CompSlider.ino, and CompText.ino.

Definition at line 26 of file NexText.h.

Member Function Documentation

void NexText::attachPop ( NexTouchEventCb  pop,
void *  ptr = NULL 
)

Register text pop callback function.

Parameters
pop- the pointer to text pop callback function.
ptr- the parameter to be transmitted to text pop callback function.

Definition at line 70 of file NexText.cpp.

uint16_t NexText::getText ( char *  buffer,
uint16_t  len 
)

Get the value of text.

Parameters
buffer- text value buffer.
len- the length of text value buffer.
Returns
the length of text value buffer.
Examples:
CompText.ino.

Definition at line 35 of file NexText.cpp.

bool NexText::setText ( const char *  buffer)

Set the value of text.

Parameters
buffer- text value buffer.
Return values
true- success.
false- failed.
Examples:
CompSlider.ino, and CompText.ino.

Definition at line 53 of file NexText.cpp.


The documentation for this class was generated from the following files: