Documentation: NexTouch Class Reference

| Documentation For Arduino users

- Main Page
- Related Pages
- Modules
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
NexTouch Class Reference
Touch Event

Father class of the components with touch events. More...

`#include <NexTouch.h>`

Inherits NexObject.

Inherited by NexButton, NexCheckbox, NexCrop, NexDSButton, NexHotspot, NexNumber, NexPage, NexPicture, NexRadio, NexScrolltext, NexSlider, NexText, NexTimer, and NexVariable.

## Public Member Functions

| NexTouch (uint8_t pid, uint8_t cid, const char *name)
| Constructor. More...
void | attachPush (NexTouchEventCb push, void *ptr=NULL)
| Attach an callback function of push touch event. More...
void | detachPush (void)
| Detach an callback function. More...
void | attachPop (NexTouchEventCb pop, void *ptr=NULL)
| Attach an callback function of pop touch event. More...
void | detachPop (void)
| Detach an callback function. More...
Public Member Functions inherited from NexObject
| NexObject (uint8_t pid, uint8_t cid, const char *name)
| Constructor. More...
void | printObjInfo (void)
| Print current object'address, page id, component id and name. More...

## Detailed Description

Father class of the components with touch events.

Derives from NexObject and provides methods allowing user to attach (or detach) a callback function called when push(or pop) touch event occurs.

Definition at line 53 of file NexTouch.h.

## Constructor & Destructor Documentation

NexTouch::NexTouch | ( | uint8_t | pid,
|  | uint8_t | cid,
|  | const char * | name
| ) |  |

Constructor.

Parameters

  pid | - page id.
  cid | - component id.
  name | - pointer to an unique name in range of all components.

Definition at line 18 of file NexTouch.cpp.

## Member Function Documentation

void NexTouch::attachPop | ( | NexTouchEventCb | pop,
|  | void * | ptr = `NULL`
| ) |  |

Attach an callback function of pop touch event.

Parameters

  pop | - callback called with ptr when a pop touch event occurs.
  ptr | - parameter passed into pop[default:NULL].

Returns
  none.

Note
  If calling this method multiply, the last call is valid.

Definition at line 39 of file NexTouch.cpp.

void NexTouch::attachPush | ( | NexTouchEventCb | push,
|  | void * | ptr = `NULL`
| ) |  |

Attach an callback function of push touch event.

Parameters

  push | - callback called with ptr when a push touch event occurs.
  ptr | - parameter passed into push[default:NULL].

Returns
  none.

Note
  If calling this method multiply, the last call is valid.

Definition at line 27 of file NexTouch.cpp.

void NexTouch::detachPop | ( | void |  | ) |

Detach an callback function.

Returns
  none.

Definition at line 45 of file NexTouch.cpp.

void NexTouch::detachPush | ( | void |  | ) |

Detach an callback function.

Returns
  none.

Definition at line 33 of file NexTouch.cpp.

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

- NexTouch.h
- NexTouch.cpp