|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <event.hpp>
Public Member Functions | |
| Event (Widget *source) | |
| Widget * | getSource () const |
Protected Attributes | |
| Widget * | mSource {nullptr} |
Base class for all GUI event objects.
An event is a signal that something has happened in the GUI. Events are used to notify widgets of user actions. The event class is the base class for all events in the GUI.
|
explicit |
Constructor.
| source | The source widget of the event. |
Definition at line 9 of file event.cpp.
References mSource.
Referenced by fcn::ActionEvent::ActionEvent(), fcn::ContainerEvent::ContainerEvent(), fcn::InputEvent::InputEvent(), and fcn::SelectionEvent::SelectionEvent().
| Widget * fcn::Event::getSource | ( | ) | const |
Gets the source widget of the event.
The function is used to tell which widget fired an event.
Definition at line 11 of file event.cpp.
References mSource.
Referenced by fcn::TabbedArea::action(), fcn::DropDown::death(), fcn::GuiDeathListener::death(), fcn::FocusHandler::distributeFocusGainedEvent(), fcn::FocusHandler::distributeFocusLostEvent(), fcn::Gui::distributeKeyEvent(), fcn::Window::mouseDragged(), fcn::DropDown::mousePressed(), fcn::TabbedArea::mousePressed(), fcn::Window::mousePressed(), fcn::DropDown::mouseWheelMovedDown(), fcn::DropDown::mouseWheelMovedUp(), fcn::VisibilityEventHandler::widgetHidden(), and fcn::VisibilityEventHandler::widgetShown().
|
protected |
Holds the source widget of the event.
Definition at line 45 of file event.hpp.
Referenced by Event(), and getSource().