GG: GG::WndEvent Class Reference

GG

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
GG::WndEvent Class Reference

`#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

## Detailed Description

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

See Also
  Wnd

Definition at line 74 of file WndEvent.h.

## Member Enumeration Documentation

enum GG::WndEvent::EventType

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.

## Constructor & Destructor Documentation

GG::WndEvent::WndEvent | ( | EventType | type,
|  | const Pt & | pt,
|  | Flags< ModKey > | mod_keys
| ) |  |

Constructs an WndEvent that is used to invoke a function taking parameters (const GG::Pt& pt, Flags<ModKey> mod_keys), eg LButtonDown().

GG::WndEvent::WndEvent | ( | EventType | type,
|  | const Pt & | pt,
|  | const Pt & | move,
|  | Flags< ModKey > | mod_keys
| ) |  |

Constructs an WndEvent that is used to invoke a function taking parameters (const Pt& pt, const Pt& move, Flags<ModKey> mod_keys), eg LDrag().

GG::WndEvent::WndEvent | ( | EventType | type,
|  | const Pt & | pt,
|  | int | move,
|  | Flags< ModKey > | mod_keys
| ) |  |

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().

GG::WndEvent::WndEvent | ( | EventType | type,
|  | unsigned int | ticks,
|  | Timer * | timer
| ) |  |

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().

## Member Function Documentation

boost::uint32_t GG::WndEvent::KeyCodePoint | ( |  | ) | const

returns the Unicode code point for the key pressed or released in the WndEvent, if any.

Note
  This may be zero, even in a KeyPress or KeyRelease event, if Unicode support is unavailable.

The documentation for this class was generated from the following file:

- WndEvent.h