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
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.
Child classes
touchgfx::ToggleButton