#include <togglebutton.h>
Inheritance diagram for wftk::ToggleButton:
Public Member Functions | |
ToggleButton (const std::string &text, const Font &font=Font::registry.find("button_font")) | |
Create a ToggleButton with the given text as a label. | |
virtual bool | buttonEvent (Mouse::Button button, bool pressed_val, const Point &pos) |
triggered when a button event happens | |
virtual bool | keyEvent (const SDL_keysym &sym, bool pressed_val) |
triggered when a keyboard event happens | |
virtual void | lostMouse () |
as opposed to the Button class, this does nothing | |
virtual void | lostFocus () |
as opposed to the Button class, this does nothing |
This class implements a different behavior to Button. The button stays pressed until it is clicked again. The autorepeat flag is ignored.
|
Create a ToggleButton with the given text as a label.
|
|
triggered when a button event happens
Reimplemented from wftk::Button.
|
|
triggered when a keyboard event happens
Reimplemented from wftk::Button.
|
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.