GG
|
Encapsulates a Wnd event that is passed from the singleton GUI to a Wnd. More...
#include <WndEvent.h>
Public Types | |
enum | EventType |
Public Member Functions | |
WndEvent (EventType type, const Pt &pt, Flags< ModKey > mod_keys) | |
WndEvent (EventType type, const Pt &pt, const Pt &move, Flags< ModKey > mod_keys) | |
WndEvent (EventType type, const Pt &pt, int move, Flags< ModKey > mod_keys) | |
WndEvent (EventType type, const Pt &pt, const std::map< Wnd *, Pt > &drag_drop_wnds, Flags< ModKey > mod_keys) | |
WndEvent (EventType type, Key key, boost::uint32_t code_point, Flags< ModKey > mod_keys) | |
WndEvent (EventType type, unsigned int ticks, Timer *timer) | |
WndEvent (EventType type) | |
EventType | Type () const |
const Pt & | Point () const |
Key | GetKey () const |
boost::uint32_t | KeyCodePoint () const |
Flags< ModKey > | ModKeys () const |
const Pt & | DragMove () const |
int | WheelMove () const |
const std::map< Wnd *, Pt > & | DragDropWnds () const |
unsigned int | Ticks () const |
Timer * | GetTimer () const |
Encapsulates a Wnd event that is passed from the singleton GUI to a Wnd.
The various types of WndEvents correspond to the various message member functions of Wnd, some of which have different parameterizations. Rather than have a less-efficient but more-easily-extensible hierarchy of WndEvent types, a single WndEvent type exists that has all possible parameters to a Wnd message function call. Therefore, not all of WndEvent's accessors will return sensical results, depending on the WndEventType of the WndEvent. Note that Wnd events may be filtered before they actually reach the target Wnd
Definition at line 74 of file WndEvent.h.
The types of Wnd events. Each of these corresponds to a Wnd member function of the same name.
Definition at line 79 of file WndEvent.h.
Constructs an WndEvent that is used to invoke a function taking parameters (const GG::Pt& pt, Flags<ModKey> mod_keys), eg LButtonDown().
Constructs an WndEvent that is used to invoke a function taking parameters (const Pt& pt, const Pt& move, Flags<ModKey> mod_keys), eg LDrag().
Constructs an WndEvent that is used to invoke a function taking parameters (const Pt& pt, int move, Flags<ModKey> mod_keys), eg MouseWheel().
GG::WndEvent::WndEvent | ( | EventType | type, |
const Pt & | pt, | ||
const std::map< Wnd *, Pt > & | drag_drop_wnds, | ||
Flags< ModKey > | mod_keys | ||
) |
Constructs an WndEvent that is used to invoke a function taking parameters (const Pt& pt, const std::map<Wnd*, Pt>& drag_drop_wnds, Flags<ModKey> mod_keys), eg DragDropEnter().
GG::WndEvent::WndEvent | ( | EventType | type, |
Key | key, | ||
boost::uint32_t | code_point, | ||
Flags< ModKey > | mod_keys | ||
) |
Constructs an WndEvent that is used to invoke a function taking parameters (Key key, Flags<ModKey> mod_keys), eg KeyPress().
Constructs an WndEvent that is used to invoke a function taking parameters (unsigned int, Timer*), eg TimerFiring().
GG::WndEvent::WndEvent | ( | EventType | type | ) | [explicit] |
Constructs an WndEvent that is used to invoke a function taking no parameters, eg GainingFocus().
boost::uint32_t GG::WndEvent::KeyCodePoint | ( | ) | const |
returns the Unicode code point for the key pressed or released in the WndEvent, if any.