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