Defines a single state button containing text with both a value and units component.
More...
|
|
| | TextBoxButton (const char *buttonName, Canvas &Destination, const ConfigTextBox_t &config, ButtonState::buttonCallbackFunction callback) |
| | Constructor for button containing text with both a value and units component.
|
| |
| | ~TextBoxButton (void)=default |
| | Default destructor.
|
| |
|
| void | begin (void) override |
| | Initializes the button. This method should be called before first use of the object.
|
| |
| void | update (const char *text) |
| | Updates the value inside the button. Assumes that the string is null terminated.
|
| |
| void | update (int value) |
| | Updates the numerical value (int) inside the button.
|
| |
| void | setUnits (const char *text) |
| | Updates the units text inside the button. Assumes that the string is null terminated.
|
| |
| | Button (const char *buttonName, Canvas &DestCanvas, uint16_t dest_x, uint16_t dest_y, uint16_t width, uint16_t height, callback_type whenCallback) |
| | Constructor for creating a Button object.
|
| |
| virtual | ~Button (void)=default |
| | Default destructor.
|
| |
| virtual bool | press (FT5316::TouchLocation loc) |
| | Presses the button if loc is within the bounds of the button.
|
| |
| virtual void | release (void) |
| | Called when the button is released.
|
| |
| void | enable (void) |
| | Enables the button, making it accept button presses.
|
| |
| void | disable (void) |
| | Disables the button, so that it ignores button presses.
|
| |
| void | setState (uint8_t state) |
| | Sets the button to the specified state.
|
| |
| void | nextState (void) |
| | Advances the button to the next state.
|
| |
| void | draw (void) |
| | Draws the image from the current ButtonState onto the destination canvas.
|
| |
| void | draw (Canvas &newCanvas) |
| | Draws the image from the current ButtonState onto the specified canvas.
|
| |
| bool | isEnabled (void) const |
| | Indicates whether the Button is enabled.
|
| |
| uint16_t | width (void) const |
| | Returns the width of the button in pixels.
|
| |
| uint16_t | height (void) const |
| | Returns the height of the button in pixels.
|
| |
| uint8_t | state (void) const |
| | Returns the current state of the button.
|
| |
Defines a single state button containing text with both a value and units component.
The text displayed within the button has both a value and units component.