Solo Controller Documentation 1.0
Documentation for the Solo Controller
 
Loading...
Searching...
No Matches
ImmediateButton Class Reference

#include <Button.h>

Inheritance diagram for ImmediateButton:
Button

Public Member Functions

Constructors and Destructors
 ImmediateButton (Canvas &DestCanvas, const Block_Image &DestLoc, callback_function callback)
 ImmediateButton Constructor.
 
 ~ImmediateButton (void)=default
 Default destructor.
 
General Methods
bool press (FT5316::TouchLocation loc) override
 Presses the button if loc is within the bounds of the button.
 
- Public Member Functions inherited from Button
 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 void release (void)
 Releases the button if it has been pressed.
 
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.
 

Additional Inherited Members

- Public Types inherited from Button
typedef void(* callback_function) (void)
 
- Protected Member Functions inherited from Button
void _resetToState0 (void)
 Internal method for resetting the button to state 0.
 

Constructor & Destructor Documentation

◆ ImmediateButton()

ImmediateButton::ImmediateButton ( Canvas & DestCanvas,
const Block_Image & DestLoc,
callback_function callback )
inline

ImmediateButton Constructor.

Parameters
[in]DestCanvasDestination canvas to where the current button image is copied
[in]DestLocUL x-y coordinate within DestCanvas where the button is to be copied
[in]callbackCallback function when the button transitions to state 0

◆ ~ImmediateButton()

ImmediateButton::~ImmediateButton ( void )
default

Default destructor.

Parameters
None.

Member Function Documentation

◆ press()

bool ImmediateButton::press ( FT5316::TouchLocation loc)
overridevirtual

Presses the button if loc is within the bounds of the button.

Parameters
[in]locx-y coordinate where the TFT screen has been touched

Reimplemented from Button.


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