#include <OgreEventDispatcher.h>
Public Member Functions | |
EventDispatcher (TargetManager *pTargetManager) | |
virtual | ~EventDispatcher () |
bool | dispatchEvent (InputEvent *e) |
Dispatches an event to a PositionTarget if necessary, and returns whether or not the event was forwarded to a sub-PositionTarget. | |
void | setDragDrop (bool dragDropOn) |
Enables or disables the mouse drag/drop events on the next mouse drag sequence. | |
Real | getMouseX () const |
Returns the X screen coordinate of the current mouse position. | |
Real | getMouseY () const |
Returns the Y screen coordinate of the current mouse position. | |
Protected Member Functions | |
bool | processKeyEvent (KeyEvent *e) |
bool | processMouseEvent (MouseEvent *e) |
This method attempts to distribute a mouse event to a lightweight PositionTarget. | |
void | retargetMouseEvent (PositionTarget *target, MouseEvent *e) |
Sends a mouse event to the current mouse event recipient using the given event (sent to the windowed host) as a srcEvent. | |
void | retargetMouseEvent (PositionTarget *target, int id, MouseEvent *e, bool consume=false) |
Sends a mouse event to the current mouse event recipient using the given event (sent to the windowed host) as a srcEvent. | |
void | retargetKeyEvent (PositionTarget *target, int id, MouseEvent *e) |
Sends a key event to the current mouse event recipient using the given event (sent to the windowed host) as a srcEvent. | |
void | trackMouseEnterExit (PositionTarget *targetOver, MouseEvent *e) |
void | trackKeyEnterExit (PositionTarget *targetOver, MouseEvent *e) |
Protected Attributes | |
TargetManager * | mTargetManager |
PositionTarget * | mFocus |
The current PositionTarget that has focus that is being hosted by this GuiContainer. | |
PositionTarget * | mMouseDragSource |
The current PositionTarget, over which, the current drag operation originated. | |
PositionTarget * | mKeyCursorOn |
PositionTarget the Keycursor is on. | |
PositionTarget * | mTargetLastEntered |
The last PositionTarget entered. | |
Real | mMouseX |
Screen coordinates of the last (or current) mouse event. | |
Real | mMouseY |
bool | mDragging |
Indicates if the mouse pointer is currently being dragged... | |
bool | mDragDropOn |
Indicates whether or not Drag/Drop event will be generated during the next drag sequence. | |
bool | mDragDropActive |
Indicates whether or not Drag/Drop events are currently being generated. | |
int | mEventMask |
Definition at line 58 of file OgreEventDispatcher.h.
|
|
|
|
|
Dispatches an event to a PositionTarget if necessary, and returns whether or not the event was forwarded to a sub-PositionTarget.
|
|
Returns the X screen coordinate of the current mouse position.
Definition at line 202 of file OgreEventDispatcher.h. References Ogre::Real. |
|
Returns the Y screen coordinate of the current mouse position.
Definition at line 206 of file OgreEventDispatcher.h. References Ogre::Real. |
|
|
|
This method attempts to distribute a mouse event to a lightweight PositionTarget. It tries to avoid doing any unnecessary probes down into the PositionTarget tree to minimize the overhead of determining where to route the event, since mouse movement events tend to come in large and frequent amounts. |
|
Sends a key event to the current mouse event recipient using the given event (sent to the windowed host) as a srcEvent.
|
|
Sends a mouse event to the current mouse event recipient using the given event (sent to the windowed host) as a srcEvent. If the mouse event target is still in the PositionTarget tree, the coordinates of the event are translated to those of the target. If the target has been removed, we don't bother to send the message. |
|
Sends a mouse event to the current mouse event recipient using the given event (sent to the windowed host) as a srcEvent. If the mouse event target is still in the PositionTarget tree, the coordinates of the event are translated to those of the target. If the target has been removed, we don't bother to send the message. |
|
Enables or disables the mouse drag/drop events on the next mouse drag sequence. It has no effect on the current drag sequence, if any. Drag/drop events are typically enabled when the mouse enters the area of a particular PositionTarget.
|
|
|
|
|
|
Indicates whether or not Drag/Drop events are currently being generated.
Definition at line 112 of file OgreEventDispatcher.h. |
|
Indicates whether or not Drag/Drop event will be generated during the next drag sequence.
Definition at line 107 of file OgreEventDispatcher.h. |
|
Indicates if the mouse pointer is currently being dragged... this is needed because we may receive exit events while dragging and need to keep the current mouse target in this case. Definition at line 99 of file OgreEventDispatcher.h. |
|
Definition at line 114 of file OgreEventDispatcher.h. |
|
The current PositionTarget that has focus that is being hosted by this GuiContainer. If this is a null reference then there is currently no focus on a PositionTarget being hosted by this GuiContainer Definition at line 69 of file OgreEventDispatcher.h. |
|
PositionTarget the Keycursor is on.
Definition at line 80 of file OgreEventDispatcher.h. |
|
The current PositionTarget, over which, the current drag operation originated. Only valid when mDragging is true. May be null. Definition at line 75 of file OgreEventDispatcher.h. |
|
Screen coordinates of the last (or current) mouse event. Will eventually be useful for managing mouse cursors. Definition at line 91 of file OgreEventDispatcher.h. |
|
Definition at line 92 of file OgreEventDispatcher.h. |
|
The last PositionTarget entered.
Definition at line 85 of file OgreEventDispatcher.h. |
|
Definition at line 61 of file OgreEventDispatcher.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:38:48 2006