#include <Button.h>
|
|
| | MomentaryButton (Canvas &DestCanvas, const Block_Image &DestLoc, callback_function callback) |
| | Constructor for creating a Momentary button.
|
| |
| | ~MomentaryButton (void)=default |
| | Default destructor.
|
| |
|
| virtual void | release (void) |
| | Releases the button if it has been pressed.
|
| |
| | Button (Canvas &DestCanvas, const Block_Image &DestLoc, const DRAM_Canvas *Imgs, uint8_t maxNumStates) |
| | Constructor for creating a Button.
|
| |
| | ~Button (void)=default |
| | Default destructor.
|
| |
| void | begin (void) |
| | Initializes the button. This method should be called before first use.
|
| |
| virtual bool | press (FT5316::TouchLocation loc) |
| | Presses the button if loc is within the bounds of the button.
|
| |
| void | enable (void) |
| | Enables the button, makking it accept button presses.
|
| |
| void | disable (void) |
| | Disables the button, so that it ignores button presses.
|
| |
| 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.
|
| |
◆ MomentaryButton()
Constructor for creating a Momentary button.
- Parameters
-
| [in] | DestCanvas | Destination canvas to where the current button image is copied |
| [in] | DestLoc | UL x-y coordinate within DestCanvas where the button is to be copied |
| [in] | SrcCanvas | Source Canvas containing button images |
| [in] | Img0 | Location within SrcCanvas for button in state 0 |
| [in] | Img1 | Location within SrcCanvas for button in state 1 |
| [in] | callback | Callback function when the button is released |
This constructor assumes that all button images are located on the same SrcCanvas. The locations, Img0 and Img1, point to locations within SrcCanvas.
◆ ~MomentaryButton()
| MomentaryButton::~MomentaryButton |
( |
void | | ) |
|
|
default |
Default destructor.
- Parameters
- None.
◆ release()
| virtual void MomentaryButton::release |
( |
void | | ) |
|
|
inlinevirtual |
Releases the button if it has been pressed.
- Parameters
- None.
Reimplemented from Button.
The documentation for this class was generated from the following file:
- C:/Users/david/Documents/PlatformIO/Solo_Controller/Solo_Controller_Repo/src/Button.h