ManaPlus
|
#include <actionevent.h>
Public Member Functions | |
ActionEvent (Widget *const source, const std::string &id) | |
const std::string & | getId () const |
Public Member Functions inherited from Event | |
Event (Widget *const source) | |
virtual | ~Event () |
Widget * | getSource () const |
Protected Attributes | |
std::string | mId |
Protected Attributes inherited from Event | |
Widget * | mSource |
Represents an action event. An action event is an event that can be fired by a widget whenever an action has occured. What exactly an action is is up to the widget that fires the action event. An example is a Button which fires an action event as soon as the Button is clicked, another example is TextField which fires an action event as soon as the enter key is pressed.
Any object can listen for actions from widgets by implementing the ActionListener interface.
If you have implement a widget of your own it's a good idea to let the widget fire action events whenever you feel an action has occured so action listeners of the widget can be informed of the state of the widget.
Definition at line 97 of file actionevent.h.
|
inline |
Constructor.
source | The source widget of the event. |
id | An identifier of the event. |
Definition at line 106 of file actionevent.h.
|
inline |
Gets the identifier of the event. An identifier can be used to distinguish from two actions from the same widget or to let many widgets fire the same widgets that should be treated equally.
Definition at line 122 of file actionevent.h.
References mId.
Referenced by TabbedArea::action(), Pincode::action(), SetupItem::action(), SetupItemSound::action(), SetupQuickItem::action(), ConfirmDialog::action(), EditDialog::action(), HelpWindow::action(), OkDialog::action(), QuitDialog::action(), StatusWindow::action(), TextDialog::action(), WhoIsOnline::action(), AwayListener::action(), ChangePincodeListener::action(), CharRenameListener::action(), ErrorListener::action(), InputActionRemoteListener::action(), InputActionReplayListener::action(), NewPincodeListener::action(), PincodeListener::action(), PlayerListener::action(), RenameListener::action(), ShopRenameListener::action(), SkillWarpListener::action(), TextSkillListener::action(), WrongDataNoticeListener::action(), and NpcSellDialog::sellAction().
|
protected |
Holds the identifier of the event.
Definition at line 129 of file actionevent.h.
Referenced by getId().