All Classes Files Functions Typedefs Groups Pages
NexDSButton Class Reference
Nextion Component

`#include <NexDualStateButton.h>`

Inheritance diagram for NexDSButton:

## Public Member Functions

| NexDSButton (uint8_t pid, uint8_t cid, const char *name)
bool | getValue (uint32_t *number)
bool | setValue (uint32_t number)
uint16_t | getText (char *buffer, uint16_t len)
bool | setText (const char *buffer)
uint32_t | Get_state0_color_bco0 (uint32_t *number)
bool | Set_state0_color_bco0 (uint32_t number)
uint32_t | Get_state1_color_bco1 (uint32_t *number)
bool | Set_state1_color_bco1 (uint32_t number)
uint32_t | Get_font_color_pco (uint32_t *number)
bool | Set_font_color_pco (uint32_t number)
uint32_t | Get_place_xcen (uint32_t *number)
bool | Set_place_xcen (uint32_t number)
uint32_t | Get_place_ycen (uint32_t *number)
bool | Set_place_ycen (uint32_t number)
uint32_t | getFont (uint32_t *number)
bool | setFont (uint32_t number)
uint32_t | Get_state0_crop_picc0 (uint32_t *number)
bool | Set_state0_crop_picc0 (uint32_t number)
uint32_t | Get_state1_crop_picc1 (uint32_t *number)
bool | Set_state1_crop_picc1 (uint32_t number)
uint32_t | Get_state0_image_pic0 (uint32_t *number)
bool | Set_state0_image_pic0 (uint32_t number)
uint32_t | Get_state1_image_pic1 (uint32_t *number)
bool | Set_state1_image_pic1 (uint32_t number)
Public Member Functions inherited from NexTouch
| NexTouch (uint8_t pid, uint8_t cid, const char *name)
void | attachPush (NexTouchEventCb push, void *ptr=NULL)
void | detachPush (void)
void | attachPop (NexTouchEventCb pop, void *ptr=NULL)
void | detachPop (void)
Public Member Functions inherited from NexObject
| NexObject (uint8_t pid, uint8_t cid, const char *name)
void | printObjInfo (void)

## Additional Inherited Members

Static Public Member Functions inherited from NexTouch
static void | iterate (NexTouch **list, uint8_t pid, uint8_t cid, int32_t event)
Protected Member Functions inherited from NexObject
uint8_t | getObjPid (void)
uint8_t | getObjCid (void)
const char * | getObjName (void)

## Detailed Description

NexDSButton component.

Commonly, you want to do something after push and pop it. It is recommanded that only call NexTouch::attachPop to satisfy your purpose.

Warning
  Please do not call NexTouch::attachPush on this component, even though you can.

## Constructor & Destructor Documentation

NexDSButton::NexDSButton | ( | 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.

## Member Function Documentation

uint32_t NexDSButton::Get_font_color_pco | ( | uint32_t * | number | ) |

Get pco attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_place_xcen | ( | uint32_t * | number | ) |

Get xcen attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_place_ycen | ( | uint32_t * | number | ) |

Get ycen attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_state0_color_bco0 | ( | uint32_t * | number | ) |

Get bco0 attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_state0_crop_picc0 | ( | uint32_t * | number | ) |

Get picc0 attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_state0_image_pic0 | ( | uint32_t * | number | ) |

Get pic0 attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_state1_color_bco1 | ( | uint32_t * | number | ) |

Get bco1 attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_state1_crop_picc1 | ( | uint32_t * | number | ) |

Get picc1 attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::Get_state1_image_pic1 | ( | uint32_t * | number | ) |

Get pic1 attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint32_t NexDSButton::getFont | ( | uint32_t * | number | ) |

Get font attribute of component

Parameters

  number | - buffer storing data retur

Returns
  the length of the data

uint16_t NexDSButton::getText | ( | char * | buffer,
|  | uint16_t | len
| ) |  |

Get text attribute of component.

Parameters

  buffer | - buffer storing text returned.
  len | - length of buffer.

Returns
  The real length of text returned.

bool NexDSButton::getValue | ( | uint32_t * | number | ) |

Get number attribute of component.

Parameters

  number | - buffer storing text returned.

Returns
  The real length of text returned.

bool NexDSButton::Set_font_color_pco | ( | uint32_t | number | ) |

Set pco attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_place_xcen | ( | uint32_t | number | ) |

Set xcen attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_place_ycen | ( | uint32_t | number | ) |

Set ycen attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_state0_color_bco0 | ( | uint32_t | number | ) |

Set bco0 attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_state0_crop_picc0 | ( | uint32_t | number | ) |

Set picc0 attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_state0_image_pic0 | ( | uint32_t | number | ) |

Set pic0 attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_state1_color_bco1 | ( | uint32_t | number | ) |

Set bco1 attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_state1_crop_picc1 | ( | uint32_t | number | ) |

Set picc1 attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::Set_state1_image_pic1 | ( | uint32_t | number | ) |

Set pic1 attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::setFont | ( | uint32_t | number | ) |

Set font attribute of component

Parameters

  number | - To set up the data

Returns
  true if success, false for failure

bool NexDSButton::setText | ( | const char * | buffer | ) |

Set text attribute of component.

Parameters

  buffer | - text buffer terminated with '\0'.

Returns
  true if success, false for failure.

bool NexDSButton::setValue | ( | uint32_t | number | ) |

Set number attribute of component.

Parameters

  number | - number buffer.

Returns
  true if success, false for failure.

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

- NexDualStateButton.h
- NexDualStateButton.cpp