TouchGFX + 0/4 examples
CodeScope will show references to touchgfx::AbstractButton from the following samples and libraries:
Examples
STM32469I-Discovery
Demonstrations
STM32469I_EVAL
Demonstrations
STM324x9I_EVAL
Demonstrations
STM32F429I-Discovery
Demonstrations
 
Symbols
loading...
Files
loading...

touchgfx::AbstractButton class

@class AbstractButton AbstractButton.hpp touchgfx/widgets/AbstractButton.hpp This class defines an abstract interface for button-like elements. This class defines an abstract interface for button-like elements. A button is a clickable element that has two states - pressed or released - and executes an action when the pressed->released transition is made. @see Widget

Syntax

class AbstractButton : public Widget { public:     AbstractButton() : Widget(), action(), pressed(false)     {         setTouchable(true);     }     virtual void handleClickEvent(const ClickEvent& event);     void setAction(GenericCallback< const AbstractButton& >& callback)     {         action = &callback;     }     virtual bool getPressedState() const     {         return pressed;     }     virtual uint16_t getType() const     {         return (uint16_t)TYPE_ABSTRACTBUTTON;     } protected:     GenericCallback< const AbstractButton& >* action;      bool pressed;  };

Fields

action

No summary provided. Read more...

pressed

No summary provided. Read more...

Methods

handleClickEvent()

@fn virtual void AbstractButton::handleClickEvent(const ClickEvent& event); Updates the current state of the button. Updates the current state of the button - pressed or released - and invalidates it. If a transition from the pressed to the released state was made, the associated action is executed and then the Widget is invalidated. @see Drawable::handleClickEvent(). Read more...

setAction()

@fn void AbstractButton::setAction(GenericCallback& callback) Associates an action to be performed when the AbstractButton is clicked. Associates an action to be performed when the AbstractButton is clicked. @see GenericCallback. Read more...

getPressedState() const

@fn virtual bool AbstractButton::getPressedState() const Function to determine whether this AbstractButton is currently pressed. Function to determine whether this AbstractButton is currently pressed. Read more...

getType() const

@fn virtual uint16_t AbstractButton::getType() const For GUI testing only. For GUI testing only. Returns type of this drawable. Read more...

Examples

touchgfx::AbstractButton is referenced by 4 libraries and example projects.

References

LocationReferrerScopeText
AbstractButton.hpp:35
class AbstractButton : public Widget
Button.hpp:34touchgfx::Buttontouchgfx
class Button : public AbstractButton
Button.hpp:45touchgfx::Button::Button()
Button() : AbstractButton(), up(), down(), alpha(255) { }
Button.hpp:131touchgfx::Button::getCurrentlyDisplayedBitmap() const
return (AbstractButton::pressed ? down : up);
RadioButton.hpp:36touchgfx::RadioButtontouchgfx
class RadioButton : public AbstractButton
RadioButton.hpp:47touchgfx::RadioButton::RadioButton()
RadioButton() : AbstractButton(), bitmapUnselected(), bitmapUnselectedPressed(), bitmapSelected(), bitmapSelectedPressed(), alpha(255), selected(false), deselectionEnabled(false), deselectedAction(0)
RadioButton.hpp:226touchgfx::RadioButton::getCurrentlyDisplayedBitmap() const
return (selected ? (AbstractButton::pressed ? bitmapSelectedPressed : bitmapSelected) : (AbstractButton::pressed ? bitmapUnselectedPressed : bitmapUnselected));
RadioButtonGroup.hpp:248touchgfx::RadioButtonGroup::radioButtonClickedHandler()::radioButtontouchgfx::RadioButtonGroup::radioButtonClickedHandler()
virtual void radioButtonClickedHandler(const AbstractButton& radioButton)
RadioButtonGroup.hpp:277touchgfx::RadioButtonGroup::radioButtonDeselectedHandler()::radioButtontouchgfx::RadioButtonGroup::radioButtonDeselectedHandler()
virtual void radioButtonDeselectedHandler(const AbstractButton& radioButton)
TouchArea.hpp:34touchgfx::TouchAreatouchgfx
class TouchArea : public AbstractButton
TouchArea.hpp:44touchgfx::TouchArea::TouchArea()
TouchArea() : AbstractButton(), pressedAction(0)

Class Tree

Parent classes
Child classes
touchgfx::AbstractButton
all items filtered out