Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::MouseTarget Class Reference

Handles the adding and removing of MouseListeners. More...

`#include <OgreMouseTarget.h>`

Inheritance diagram for Ogre::MouseTarget:

[legend]
List of all members.

## Public Methods

| MouseTarget ()
void | processMouseEvent (MouseEvent *e)
void | addMouseListener (MouseListener *l)
void | removeMouseListener (MouseListener *l)
bool | isMouseWithin () const
virtual Real | getLeft (void) const=0
| Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right).
virtual Real | getTop (void) const=0
| Gets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom).
virtual PositionTarget * | getPositionTargetParent () const=0
virtual bool | isKeyEnabled () const=0
virtual void | processEvent (InputEvent *e)=0

## Protected Attributes

MouseListener * | mMouseListener
bool | mMouseWithin

## Detailed Description

Handles the adding and removing of MouseListeners.

Remarks:
  This is implemented through the use of a binary multicaster. See EventMulticaster.

GuiElements (or other components) that process the Mouse Event should subclass this class and call processMouseEvent when that event is identified.

Definition at line 57 of file OgreMouseTarget.h.

## Constructor & Destructor Documentation

Ogre::MouseTarget::MouseTarget | ( |  | ) |

| Definition at line 39 of file OgreMouseTarget.cpp. References mMouseListener, and mMouseWithin.

## Member Function Documentation

void Ogre::MouseTarget::addMouseListener | ( | MouseListener * | l | ) |

| Definition at line 87 of file OgreMouseTarget.cpp. References mMouseListener. Referenced by Ogre::ListGuiElement::addListItem(), Ogre::ScrollBarGuiElement::setScrollBitName(), and Ogre::GuiPressable::setSource().

virtual Real Ogre::PositionTarget::getLeft | ( | void |  | ) | const`[pure virtual, inherited]`

| Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right). Implemented in Ogre::Cursor, Ogre::EventProcessor, and Ogre::GuiElement.

virtual PositionTarget* Ogre::PositionTarget::getPositionTargetParent | ( |  | ) | const`[pure virtual, inherited]`

| Implemented in Ogre::Cursor, Ogre::EventProcessor, and Ogre::GuiElement.

virtual Real Ogre::PositionTarget::getTop | ( | void |  | ) | const`[pure virtual, inherited]`

| Gets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom). Implemented in Ogre::Cursor, Ogre::EventProcessor, and Ogre::GuiElement.

virtual bool Ogre::PositionTarget::isKeyEnabled | ( |  | ) | const`[pure virtual, inherited]`

| Implemented in Ogre::Cursor, Ogre::EventProcessor, Ogre::GuiElement, and Ogre::TextBoxGuiElement. Referenced by Ogre::EventDispatcher::trackKeyEnterExit().

bool Ogre::MouseTarget::isMouseWithin | ( |  | ) | const

| Definition at line 106 of file OgreMouseTarget.cpp. References mMouseWithin. Referenced by Ogre::ButtonGuiElement::updateMaterials(), and Ogre::BorderButtonGuiElement::updateMaterials().

virtual void Ogre::EventTarget::processEvent | ( | InputEvent * | e | ) | `[pure virtual, inherited]`

| Implemented in Ogre::Cursor, Ogre::EventProcessor, Ogre::GuiControl, Ogre::GuiElement, Ogre::OverlayManager, Ogre::BorderButtonGuiElement, Ogre::ButtonGuiElement, Ogre::ScrollBarGuiElement, and Ogre::TextBoxGuiElement. Referenced by Ogre::EventDispatcher::processKeyEvent(), Ogre::EventDispatcher::retargetKeyEvent(), and Ogre::EventDispatcher::retargetMouseEvent().

void Ogre::MouseTarget::processMouseEvent | ( | MouseEvent * | e | ) |

Definition at line 47 of file OgreMouseTarget.cpp.

References Ogre::InputEvent::getID(), mMouseListener, mMouseWithin, Ogre::MouseListener::mouseClicked(), Ogre::MouseListener::mouseDragDropped(), Ogre::MouseListener::mouseDragEntered(), Ogre::MouseListener::mouseDragExited(), Ogre::MouseListener::mouseEntered(), Ogre::MouseListener::mouseExited(), Ogre::MouseListener::mousePressed(), and Ogre::MouseListener::mouseReleased().

Referenced by Ogre::GuiElement::processEvent(), Ogre::EventProcessor::processEvent(), and Ogre::Cursor::processEvent().

void Ogre::MouseTarget::removeMouseListener | ( | MouseListener * | l | ) |

| Definition at line 96 of file OgreMouseTarget.cpp. References mMouseListener.

## Member Data Documentation

MouseListener* Ogre::MouseTarget::mMouseListener`[protected]`

| Definition at line 60 of file OgreMouseTarget.h. Referenced by addMouseListener(), Ogre::GuiElement::GuiElement(), MouseTarget(), processMouseEvent(), and removeMouseListener().

bool Ogre::MouseTarget::mMouseWithin`[protected]`

| Definition at line 63 of file OgreMouseTarget.h. Referenced by isMouseWithin(), MouseTarget(), and processMouseEvent().

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

- OgreMouseTarget.h
- OgreMouseTarget.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:17 2004