NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
INextionStringValued Class Reference

Interface for widgets that hold a string value. More...

#include <INextionStringValued.h>

Inheritance diagram for INextionStringValued:
Inheritance graph
[legend]
Collaboration diagram for INextionStringValued:
Collaboration graph
[legend]

Public Member Functions

 INextionStringValued (Nextion &nex, uint8_t page, uint8_t component, const char *name)
 Create a new widget adapter. More...
 
size_t getText (char *buffer, size_t len)
 Gets the value of the string. More...
 
bool setText (char *buffer)
 Sets the value of the string. More...
 
bool setTextAsNumber (uint32_t value)
 Sets the text by a numercal value. More...
 
uint32_t getTextAsNumber ()
 Gets the text parsed as a number. More...
 
- Public Member Functions inherited from INextionWidget
 INextionWidget (Nextion &nex, uint8_t page, uint8_t component, const char *name)
 Create a new widget adapter. More...
 
uint8_t getPageID ()
 Gets the ID of the page this widget resides on. More...
 
uint8_t getComponentID ()
 Gets the component ID of this widget. More...
 
bool setNumberProperty (char *propertyName, uint32_t value)
 Sets the value of a numerical property of this widget. More...
 
uint32_t getNumberProperty (char *propertyName)
 Gets the value of a numerical property of this widget. More...
 
bool setStringProperty (char *propertyName, char *value)
 Sets the value of a string property of this widget. More...
 
size_t getStringProperty (char *propertyName, char *value, size_t len)
 Gets the value of a string property of this widget. More...
 

Additional Inherited Members

- Protected Member Functions inherited from INextionWidget
bool sendCommand (char *commandStr, bool checkComplete=true)
 
- Protected Attributes inherited from INextionWidget
Nextionm_nextion
 Reference to the Nextion driver.
 
uint8_t m_pageID
 ID of page this widget is on.
 
uint8_t m_componentID
 Component ID of this widget.
 
const char * m_name
 Name of this widget.
 

Detailed Description

Interface for widgets that hold a string value.

Assumes that the string value is a property named "txt".

Constructor & Destructor Documentation

INextionStringValued::INextionStringValued ( Nextion nex,
uint8_t  page,
uint8_t  component,
const char *  name 
)
inline

Create a new widget adapter.

Parameters
nexReference to the Nextion driver
pageID of page this widget is on
componentComponent ID of this widget
nameName of this widget

Member Function Documentation

size_t INextionStringValued::getText ( char *  buffer,
size_t  len 
)
inline

Gets the value of the string.

Parameters
bufferPointer to storage to strore string in
lenMaximum length of string
Returns
Actual length of string
See Also
INextionStringValued::setText
uint32_t INextionStringValued::getTextAsNumber ( )
inline

Gets the text parsed as a number.

Returns
Numerical value
See Also
INextionStringValued::setTextAsNumber
bool INextionStringValued::setText ( char *  buffer)
inline

Sets the value of the string.

Parameters
bufferValue
Returns
True if successful
See Also
INextionStringValued::getText
bool INextionStringValued::setTextAsNumber ( uint32_t  value)
inline

Sets the text by a numercal value.

Parameters
valueNumerical value
Returns
True if successful
See Also
INextionStringValued::getTextAsNumber

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