The BindTextLabel class represents a text label UI element for use with BindCanvas. More...
#include <BindTextLabel.hpp>
Public Member Functions | |
BindTextLabel (const char *cstr) | |
Constructs a BindTextLabel with a custom label. | |
BindTextLabel () | |
Constructs a BindTextLabel with a default label. | |
void | setlabel (const char *cstr) |
void | setLabel (const char *cstr) |
Sets the label text for the text label. | |
uint16_t | getBytes (uint8_t *out) override |
Retrieves the bytes representing the text label for synchronization. | |
Public Attributes | |
int16_t | x |
X-coordinate position of the text label. | |
int16_t | y |
Y-coordinate position of the text label. | |
uint8_t | cmdId = 0 |
Command ID for the text label. See the notes for possible cmdId values. | |
int16_t | fontSize |
Font size for the text label. | |
int32_t | color |
Text color for the text label. | |
![]() | |
int16_t | tag |
The BindTextLabel class represents a text label UI element for use with BindCanvas.
BindTextLabel is a class that defines a text label UI element that can be used within BindCanvas-based applications. It inherits from the BindView class and provides functionality to create and customize text labels, including setting labels, positions, font size, and text color.
Text labels created with BindTextLabel can be synchronized with BindCanvas through the Bind framework, allowing dynamic text content to be displayed in various applications.
BindTextLabel::BindTextLabel | ( | const char * | cstr | ) |
Constructs a BindTextLabel with a custom label.
This constructor creates a BindTextLabel with a custom text label provided as 'cstr.' The label can be used to define the text content of the label.
cstr | A pointer to the character array representing the custom label for the text label. |
|
inline |
Constructs a BindTextLabel with a default label.
This constructor creates a BindTextLabel with a default label of "TextLabel." You can customize the label later using the 'setLabel' function.
|
inlineoverridevirtual |
Retrieves the bytes representing the text label for synchronization.
This function is used to gather the bytes that represent the text label's properties for synchronization.
out | A pointer to the output buffer where the text label data will be stored. |
Reimplemented from BindView.
|
inline |
Sets the label text for the text label.
This function allows you to set the text label for the text label UI element, providing the content to be displayed.
cstr | A pointer to the character array representing the label text. |