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

touchgfx::ToggleButton class

@class ToggleButton ToggleButton.hpp touchgfx/widgets/ToggleButton.hpp A ToggleButton is a Button specialization that swaps the two bitmaps when clicked. A ToggleButton is a Button specialization that swaps the two bitmaps when clicked, such that the previous "pressed" bitmap, now becomes the one displayed when button is not pressed. @see Button

Syntax

class ToggleButton : public Button { public:     ToggleButton();     virtual void setBitmaps(const Bitmap& bmpReleased, const Bitmap& bmpPressed)     {         originalPressed = bmpPressed;         Button::setBitmaps(bmpReleased, bmpPressed);     }     void forceState(bool activeState);     bool getState() const     {         return up == originalPressed;     }     virtual void handleClickEvent(const ClickEvent& event);     virtual uint16_t getType() const     {         return (uint16_t)TYPE_TOGGLEBUTTON;     } protected:     Bitmap originalPressed;  };

Fields

originalPressed

No summary provided. Read more...

Methods

setBitmaps()

@fn virtual void ToggleButton::setBitmaps(const Bitmap& bmpReleased, const Bitmap& bmpPressed) Sets the bitmaps. Sets the bitmaps. @see Button::setBitmaps. Read more...

forceState()

@fn void ToggleButton::forceState(bool activeState); Force the button into a specific state. Use this function to force the button in one of the two possible states. If button is forced to the active state, then the pressed bitmap from the last call to setBitmaps becomes the one displayed when button is not pressed. Read more...

getState() const

@fn bool ToggleButton::getState() const Gets the state. Gets the state. Read more...

handleClickEvent()

@fn virtual void ToggleButton::handleClickEvent(const ClickEvent& event); Overrides handleClickEvent. Overrides handleClickEvent in order to swap the bitmaps after being clicked. Read more...

getType() const

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

Examples

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

References

LocationText
ToggleButton.hpp:34
class ToggleButton : public Button

Class Tree

Child classes
touchgfx::ToggleButton
all items filtered out