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

Ogre::ActionEvent Class Reference

#include <OgreActionEvent.h>

Inheritance diagram for Ogre::ActionEvent:

Ogre::InputEvent List of all members.

Public Types

enum  { AE_ACTION_FIRST = 1001, AE_ACTION_LAST = 1001 }
enum  { AE_ACTION_PERFORMED = AE_ACTION_FIRST }
 This event id indicates that a meaningful action occured. More...

enum  {
  SHIFT_MASK = 1 << 0, CTRL_MASK = 1 << 1, META_MASK = 1 << 2, ALT_MASK = 1 << 3,
  BUTTON0_MASK = 1 << 4, BUTTON1_MASK = 1 << 5, BUTTON2_MASK = 1 << 6, BUTTON3_MASK = 1 << 7,
  BUTTON_ANY_MASK = 0x1111 << 4
}

Public Methods

 ActionEvent (ActionTarget *source, int id, Real when, int modifiers, const String &actionCommand)
 Constructs a ActionEvent object with the specified source GuiElement, type, modifiers, coordinates, and click count. More...

const StringgetActionCommand () const
 Returns the command string associated with this action. More...

String paramString ()
 Returns a parameter string identifying this action event. More...

void consume ()
 Consumes this event so that it will not be processed in the default manner by the source which originated it. More...

int getModifiers ()
 Returns the modifiers flag for this event. More...

Real getWhen ()
 Returns the timestamp of when this event occurred. More...

bool isAltDown ()
 Returns whether or not the Alt modifier is down on this event. More...

bool isConsumed ()
 Returns whether or not this event has been consumed. More...

bool isControlDown ()
 Returns whether or not the Control modifier is down on this event. More...

bool isMetaDown ()
 Returns whether or not the Meta modifier is down on this event. More...

bool isShiftDown ()
 Returns whether or not the Shift modifier is down on this event. More...

bool isEventBetween (int start, int end)
int getID ()
EventTargetgetSource ()

Protected Attributes

String mActionCommand
 The nonlocalized string that gives more details of what actually caused the event. More...

Real mWhen
 Not implemented yet. More...

int mModifiers
 The state of the modifier keys at the time the input event was fired. More...

EventTargetmSource
 The target to process the event. More...

int mId
 The ID of the event. More...

bool mConsumed
 whether the event has been consumed. More...


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
AE_ACTION_FIRST  The first number in the range of ids used for action events.
AE_ACTION_LAST  The last number in the range of ids used for action events.

anonymous enum
 

This event id indicates that a meaningful action occured.

Enumeration values:
AE_ACTION_PERFORMED 

anonymous enum [inherited]
 

Enumeration values:
SHIFT_MASK  This flag indicates that the Shift key was down when the event occurred.
CTRL_MASK  This flag indicates that the Control key was down when the event occurred.
META_MASK  This flag indicates that the Meta key was down when the event occurred.

For mouse events, this flag indicates that the right button was pressed or released.

ALT_MASK  This flag indicates that the Alt key was down when the event occurred.

For mouse events, this flag indicates that the middle mouse button was pressed or released.

BUTTON0_MASK 
BUTTON1_MASK 
BUTTON2_MASK 
BUTTON3_MASK 
BUTTON_ANY_MASK 


Constructor & Destructor Documentation

Ogre::ActionEvent::ActionEvent ActionTarget   source,
int    id,
Real    when,
int    modifiers,
const String   actionCommand
 

Constructs a ActionEvent object with the specified source GuiElement, type, modifiers, coordinates, and click count.

Parameters:
source  the GuiElement that originated the event
id  the integer that identifies the event
when  a long int that gives the time the event occurred
modifiers  the modifier keys down during event (shift, ctrl, alt, meta)
x  the horizontal x coordinate for the mouse location
y  the vertical y coordinate for the mouse location
actionCommand  The nonlocalized string that gives more details of what actually caused the event.


Member Function Documentation

void Ogre::InputEvent::consume   [inherited]
 

Consumes this event so that it will not be processed in the default manner by the source which originated it.

const String & Ogre::ActionEvent::getActionCommand   const
 

Returns the command string associated with this action.

This string allows a "modal" component to specify one of several commands, depending on its state. For example, a single button might toggle between "show details" and "hide details". The source object and the event would be the same in each case, but the command string would identify the intended action.

Returns:
the string identifying the command for this event

int Ogre::InputEvent::getID   [inherited]
 

int Ogre::InputEvent::getModifiers   [inherited]
 

Returns the modifiers flag for this event.

EventTarget * Ogre::InputEvent::getSource   [inherited]
 

Real Ogre::InputEvent::getWhen   [inherited]
 

Returns the timestamp of when this event occurred.

Not implemented yet

bool Ogre::InputEvent::isAltDown   [inherited]
 

Returns whether or not the Alt modifier is down on this event.

bool Ogre::InputEvent::isConsumed   [inherited]
 

Returns whether or not this event has been consumed.

See also:
consume

bool Ogre::InputEvent::isControlDown   [inherited]
 

Returns whether or not the Control modifier is down on this event.

bool Ogre::InputEvent::isEventBetween int    start,
int    end
[inherited]
 

bool Ogre::InputEvent::isMetaDown   [inherited]
 

Returns whether or not the Meta modifier is down on this event.

bool Ogre::InputEvent::isShiftDown   [inherited]
 

Returns whether or not the Shift modifier is down on this event.

String Ogre::ActionEvent::paramString  
 

Returns a parameter string identifying this action event.

This method is useful for event-logging and for debugging.

Returns:
a string identifying the event and its associated command


Member Data Documentation

String Ogre::ActionEvent::mActionCommand [protected]
 

The nonlocalized string that gives more details of what actually caused the event.

This information is very specific to the component that fired it.

bool Ogre::InputEvent::mConsumed [protected, inherited]
 

whether the event has been consumed.

int Ogre::InputEvent::mId [protected, inherited]
 

The ID of the event.

int Ogre::InputEvent::mModifiers [protected, inherited]
 

The state of the modifier keys at the time the input event was fired.

EventTarget* Ogre::InputEvent::mSource [protected, inherited]
 

The target to process the event.

This is ususally found by the dispatcher

Real Ogre::InputEvent::mWhen [protected, inherited]
 

Not implemented yet.

Copyright © 2002 by The OGRE Team