#include <OgreGuiPressable.h>
Inheritance diagram for Ogre::GuiPressable:
Public Methods | |
GuiPressable (const String &name) | |
virtual | ~GuiPressable () |
void | setSource (GuiElement *source) |
const String & | getActionCommand () const |
void | setActionCommand (const String &action) |
bool | isPressed () const |
virtual void | setPressed (bool b) |
void | mouseClicked (MouseEvent *e) |
Invoked when the mouse has been clicked on a component. | |
void | mouseEntered (MouseEvent *e) |
Invoked when the mouse enters a component. | |
void | mouseExited (MouseEvent *e) |
Invoked when the mouse exits a component. | |
void | mousePressed (MouseEvent *e) |
Invoked when a mouse button has been pressed on a component. | |
void | mouseReleased (MouseEvent *e) |
Invoked when a mouse button has been released on a component. | |
virtual void | mouseDragEntered (MouseEvent *e) |
virtual void | mouseDragExited (MouseEvent *e) |
virtual void | mouseDragDropped (MouseEvent *e) |
virtual bool | isMulticaster () const |
Returns whether or not the listener is a multicaster. | |
Protected Methods | |
void | fireActionPerformed () |
Protected Attributes | |
String | mActionCommand |
bool | mPressed |
bool | mButtonDown |
GuiElement * | mSource |
(To track mouse moves and mouse drags, use the MouseMotionListener.)
The class that is interested in processing a mouse event either implements this interface (and all the methods it contains) or extends the abstract MouseAdapter
class (overriding only the methods of interest).
The listener object created from that class is then registered with a component using the component's addMouseListener
method. A mouse event is generated when the mouse is pressed, released clicked (pressed and released). A mouse event is also generated when the mouse cursor enters or leaves a component. When a mouse event occurs the relevant method in the listener object is invoked, and the MouseEvent
is passed to it.
Definition at line 54 of file OgreGuiPressable.h.
|
Definition at line 35 of file OgreGuiPressable.cpp. References mActionCommand, mPressed, and Ogre::String. |
|
Definition at line 66 of file OgreGuiPressable.h. |
|
Definition at line 73 of file OgreGuiPressable.cpp. References getActionCommand(), mSource, and Ogre::GuiElement::processEvent(). Referenced by mouseClicked(), and Ogre::PopupMenuGuiElement::mouseReleased(). |
|
Definition at line 49 of file OgreGuiPressable.cpp. References mActionCommand, and Ogre::String. Referenced by fireActionPerformed(). |
|
Returns whether or not the listener is a multicaster.
Reimplemented in Ogre::EventMulticaster. Definition at line 65 of file OgreEventListeners.h. Referenced by Ogre::EventMulticaster::convertListenerToMulti(), and Ogre::EventMulticaster::removeInternal(). |
|
Definition at line 61 of file OgreGuiPressable.cpp. References mPressed. Referenced by Ogre::PopupMenuGuiElement::mouseMoved(), Ogre::ButtonGuiElement::updateMaterials(), and Ogre::BorderButtonGuiElement::updateMaterials(). |
|
Invoked when the mouse has been clicked on a component.
Implements Ogre::MouseListener. Definition at line 81 of file OgreGuiPressable.cpp. References fireActionPerformed(). |
|
Definition at line 104 of file OgreEventListeners.h. Referenced by Ogre::MouseTarget::processMouseEvent(). |
|
Definition at line 102 of file OgreEventListeners.h. Referenced by Ogre::MouseTarget::processMouseEvent(). |
|
Definition at line 103 of file OgreEventListeners.h. Referenced by Ogre::MouseTarget::processMouseEvent(). |
|
Invoked when the mouse enters a component.
Implements Ogre::MouseListener. Definition at line 85 of file OgreGuiPressable.cpp. |
|
Invoked when the mouse exits a component.
Implements Ogre::MouseListener. Definition at line 88 of file OgreGuiPressable.cpp. |
|
Invoked when a mouse button has been pressed on a component.
Implements Ogre::MouseListener. Definition at line 91 of file OgreGuiPressable.cpp. References setPressed(). |
|
Invoked when a mouse button has been released on a component.
Implements Ogre::MouseListener. Definition at line 95 of file OgreGuiPressable.cpp. References setPressed(). |
|
Definition at line 55 of file OgreGuiPressable.cpp. References mActionCommand, and Ogre::String. Referenced by Ogre::PopupMenuGuiElement::mouseReleased(). |
|
Definition at line 67 of file OgreGuiPressable.cpp. References mPressed. Referenced by mousePressed(), mouseReleased(), Ogre::BorderButtonGuiElement::setBorderUpMaterialName(), and Ogre::ButtonGuiElement::setUpMaterialName(). |
|
Definition at line 40 of file OgreGuiPressable.cpp. References Ogre::MouseTarget::addMouseListener(), and mSource. Referenced by Ogre::BorderButtonGuiElement::BorderButtonGuiElement(), Ogre::ButtonGuiElement::ButtonGuiElement(), and Ogre::PopupMenuGuiElement::PopupMenuGuiElement(). |
|
Definition at line 57 of file OgreGuiPressable.h. Referenced by getActionCommand(), GuiPressable(), and setActionCommand(). |
|
Reimplemented in Ogre::ButtonGuiElement. Definition at line 59 of file OgreGuiPressable.h. Referenced by Ogre::BorderButtonGuiElement::BorderButtonGuiElement(), and Ogre::BorderButtonGuiElement::updateMaterials(). |
|
Definition at line 58 of file OgreGuiPressable.h. Referenced by GuiPressable(), isPressed(), and setPressed(). |
|
Definition at line 60 of file OgreGuiPressable.h. Referenced by fireActionPerformed(), and setSource(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:02 2004