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

# Ogre::SDLInput Class Reference

`#include <OgreSDLInput.h>`

Inheritance diagram for Ogre::SDLInput:

[legend]
List of all members.

## Public Methods

| SDLInput ()
virtual | ~SDLInput ()
void | initialise (RenderWindow *pWindow, bool useKeyboard=true, bool useMouse=true, bool useGameController=false)
| Initialise the input system.
void | capture ()
| Captures the state of all the input devices.
void | setGrabMode (GrabMode mode)
| Sets how to grab the mouse.
virtual long | getMouseRelX () const
| Retrieves the relative (compared to the last input poll) mouse movement on the X (horizontal) axis.
virtual long | getMouseRelY () const
| Retrieves the relative (compared to the last input poll) mouse movement on the Y (vertical) axis.
virtual long | getMouseRelZ () const
| Retrieves the relative (compared to the last input poll) mouse movement on the Z (mouse wheel) axis.
virtual long | getMouseAbsX () const
| Retrieves the absolute mouse position on the X (horizontal) axis.
virtual long | getMouseAbsY () const
| Retrieves the absolute mouse position on the Y (vertical) axis.
virtual long | getMouseAbsZ () const
| Retrieves the absolute mouse position on the Z (mouse wheel) axis.
virtual void | getMouseState (MouseState &state) const
| Retrieves the current state of the mouse.
virtual bool | getMouseButton (uchar button) const
| Retrieves the state of a mouse button.
void | useBufferedInput (EventQueue *pEventQueue, bool keys=true, bool mouse=true)
| Tells the reader to use buffered input and update the passed in queue.
virtual void | setBufferedInput (bool keys, bool mouse)
virtual bool | isKeyDown (KeyCode kc) const
| Determines if the specified key is currently depressed.
virtual long | getMouseRelativeX () const
| Retrieves the relative position of the mouse when capture was called relative to the last time.
virtual long | getMouseRelativeY () const
| Retrieves the relative position of the mouse when capture was called relative to the last time.
virtual long | getMouseRelativeZ () const
| Retrieves the relative position of the mouse when capture was called relative to the last time.
void | addCursorMoveListener (MouseMotionListener *c)
| Adds a mouse motion listener to the cursor object.
void | removeCursorMoveListener (MouseMotionListener *c)
| Remove a mouse motion listener to the cursor object.

## Static Public Methods

char | getKeyChar (int keyCode, long modifiers=0)

## Protected Types

typedef std::set< KeyCode > | BufferedKeysDownSet
| Set of all the keys currently depressed based on buffered input events.

## Protected Methods

void | mouseMoved ()
| Creates mouse moved or dragged events depending if any button is pressed.
void | createMouseEvent (int id, int button)
| Creates a MouseEvent that first gets processed by the cursor, then gets pushed on the queue.
void | triggerMouseButton (int nMouseCode, bool mousePressed)
| Creates mouse pressed, released, and clicked events.
void | createKeyEvent (int id, int key)
void | keyChanged (int key, bool down)
void | setupKeyChars ()

## Protected Attributes

long | mModifiers
| The modifiers are a binary flags that represent what buttons are pressed, and what key modifiers are down (e.g.
Cursor * | mCursor
| Internal Cursor object.
EventQueue * | mEventQueue
| EventQueue is used for buffered input support.
bool | mUseBufferedKeys
| Wether to use buffering input support - buffering support relies on using an EventQueue.
bool | mUseBufferedMouse
| Wether to use buffering input support - buffering support relies on using an EventQueue.
MouseState | mMouseState
| The mouse state in immediate mode.
BufferedKeysDownSet | mBufferedKeysDown

## Static Protected Attributes

bool | sKeysInitialised = false

## Private Types

typedef std::map< SDLKey, KeyCode > | InputKeyMap

## Private Methods

void | processBufferedKeyboard ()
void | processBufferedMouse ()
void | _grabMouse ()
void | _releaseMouse ()
bool | isKeyDownImmediate (KeyCode kc) const
| Return whether a key is down in immediate mode.

## Private Attributes

Uint8 * | mKeyboardBuffer
int | mMaxKey
int | mMouseX
int | mMouseY
int | mMouseRelativeX
int | mMouseRelativeY
int | mMouseRelativeZ
Real | mScale
Uint8 | mMouseKeys
bool | _visible
bool | mMouseGrabbed
bool | mUseMouse
bool | mGrabMouse
bool | mMouseLeft
int | mGrabMode
InputKeyMap | _key_map
bool | warpMouse

## Static Private Attributes

const unsigned int | mWheelStep = 60

## Member Typedef Documentation

typedef std::set<KeyCode> Ogre::InputReader::BufferedKeysDownSet`[protected, inherited]`

| Set of all the keys currently depressed based on buffered input events. Definition at line 345 of file OgreInput.h.

typedef std::map<SDLKey, KeyCode> Ogre::SDLInput::InputKeyMap`[private]`

| Definition at line 98 of file OgreSDLInput.h.

## Constructor & Destructor Documentation

Ogre::SDLInput::SDLInput | ( |  | ) |

Definition at line 33 of file OgreSDLInput.cpp.

References _key_map, Ogre::GRAB_NONE, Ogre::KC_0, Ogre::KC_1, Ogre::KC_2, Ogre::KC_3, Ogre::KC_4, Ogre::KC_5, Ogre::KC_6, Ogre::KC_7, Ogre::KC_8, Ogre::KC_9, Ogre::KC_A, Ogre::KC_ADD, Ogre::KC_APOSTROPHE, Ogre::KC_B, Ogre::KC_BACK, Ogre::KC_BACKSLASH, Ogre::KC_C, Ogre::KC_CAPITAL, Ogre::KC_COLON, Ogre::KC_COMMA, Ogre::KC_D, Ogre::KC_DECIMAL, Ogre::KC_DELETE, Ogre::KC_DIVIDE, Ogre::KC_DOWN, Ogre::KC_E, Ogre::KC_END, Ogre::KC_EQUALS, Ogre::KC_ESCAPE, Ogre::KC_F, Ogre::KC_F1, Ogre::KC_F10, Ogre::KC_F11, Ogre::KC_F12, Ogre::KC_F13, Ogre::KC_F14, Ogre::KC_F15, Ogre::KC_F2, Ogre::KC_F3, Ogre::KC_F4, Ogre::KC_F5, Ogre::KC_F6, Ogre::KC_F7, Ogre::KC_F8, Ogre::KC_F9, Ogre::KC_G, Ogre::KC_GRAVE, Ogre::KC_H, Ogre::KC_HOME, Ogre::KC_I, Ogre::KC_INSERT, Ogre::KC_J, Ogre::KC_K, Ogre::KC_L, Ogre::KC_LCONTROL, Ogre::KC_LEFT, Ogre::KC_LMENU, Ogre::KC_LSHIFT, Ogre::KC_LWIN, Ogre::KC_M, Ogre::KC_MINUS, Ogre::KC_MULTIPLY, Ogre::KC_N, Ogre::KC_NUMLOCK, Ogre::KC_NUMPAD0, Ogre::KC_NUMPAD1, Ogre::KC_NUMPAD2, Ogre::KC_NUMPAD3, Ogre::KC_NUMPAD4, Ogre::KC_NUMPAD5, Ogre::KC_NUMPAD6, Ogre::KC_NUMPAD7, Ogre::KC_NUMPAD8, Ogre::KC_NUMPAD9, Ogre::KC_NUMPADEQUALS, Ogre::KC_O, Ogre::KC_P, Ogre::KC_PERIOD, Ogre::KC_PGDOWN, Ogre::KC_PGUP, Ogre::KC_Q, Ogre::KC_R, Ogre::KC_RETURN, Ogre::KC_RIGHT, Ogre::KC_RMENU, Ogre::KC_RSHIFT, Ogre::KC_RWIN, Ogre::KC_S, Ogre::KC_SCROLL, Ogre::KC_SEMICOLON, Ogre::KC_SPACE, Ogre::KC_SUBTRACT, Ogre::KC_SYSRQ, Ogre::KC_T, Ogre::KC_TAB, Ogre::KC_U, Ogre::KC_UP, Ogre::KC_V, Ogre::KC_W, Ogre::KC_X, Ogre::KC_Y, Ogre::KC_Z, Ogre::InputReader::mEventQueue, mGrabMode, mGrabMouse, mMouseGrabbed, and mMouseLeft.

Ogre::SDLInput::~SDLInput | ( |  | ) | `[virtual]`

| Definition at line 147 of file OgreSDLInput.cpp.

## Member Function Documentation

void Ogre::SDLInput::_grabMouse | ( |  | ) | `[private]`

| Definition at line 198 of file OgreSDLInput.cpp. References mGrabMouse, and mMouseGrabbed. Referenced by capture(), initialise(), and processBufferedMouse().

void Ogre::SDLInput::_releaseMouse | ( |  | ) | `[private]`

| Definition at line 189 of file OgreSDLInput.cpp. References mGrabMouse, mMouseGrabbed, and mMouseLeft. Referenced by capture().

void Ogre::InputReader::addCursorMoveListener | ( | MouseMotionListener * | c | ) | `[inherited]`

| Adds a mouse motion listener to the cursor object. This keeps the Cursor object hidden. Definition at line 174 of file OgreInput.cpp. References Ogre::MouseMotionTarget::addMouseMotionListener(), and Ogre::InputReader::mCursor. Referenced by Ogre::EventProcessor::addCursorMoveListener().

void Ogre::SDLInput::capture | ( |  | ) | `[virtual]`

Captures the state of all the input devices.

Remarks:
  This method captures the state of all input devices and stores it internally for use when the enquiry methods are next called. This is done to ensure that all input is captured at once and therefore combinations of input are not subject to time differences when methods are called.

Implements Ogre::InputReader.

Definition at line 206 of file OgreSDLInput.cpp.

References _grabMouse(), _releaseMouse(), _visible, Ogre::MouseState::Buttons, Ogre::GRAB_MOUSE_CLICK, Ogre::GRAB_MOUSE_OVER, mGrabMode, mGrabMouse, mKeyboardBuffer, mMouseGrabbed, mMouseKeys, mMouseLeft, mMouseRelativeX, mMouseRelativeY, mMouseRelativeZ, Ogre::InputReader::mMouseState, mMouseX, mMouseY, mWheelStep, processBufferedKeyboard(), processBufferedMouse(), Ogre::MouseState::Xabs, Ogre::MouseState::Xrel, Ogre::MouseState::Yabs, Ogre::MouseState::Yrel, Ogre::MouseState::Zabs, and Ogre::MouseState::Zrel.

void Ogre::InputReader::createKeyEvent | ( | int | id,
|  | int | key
| ) | `[protected, inherited]`

| Definition at line 152 of file OgreInput.cpp. References Ogre::InputReader::mEventQueue, Ogre::InputReader::mModifiers, and Ogre::EventQueue::push(). Referenced by Ogre::InputReader::keyChanged().

void Ogre::InputReader::createMouseEvent | ( | int | id,
|  | int | button
| ) | `[protected, inherited]`

Creates a MouseEvent that first gets processed by the cursor, then gets pushed on the queue.

Definition at line 132 of file OgreInput.cpp.

References Ogre::Cursor::getRelX(), Ogre::Cursor::getRelY(), Ogre::Cursor::getRelZ(), Ogre::Cursor::getX(), Ogre::Cursor::getY(), Ogre::Cursor::getZ(), Ogre::InputReader::mCursor, Ogre::InputReader::mEventQueue, Ogre::InputReader::mModifiers, Ogre::Cursor::processEvent(), and Ogre::EventQueue::push().

Referenced by Ogre::InputReader::mouseMoved(), and Ogre::InputReader::triggerMouseButton().

char Ogre::InputReader::getKeyChar | ( | int | keyCode,
|  | long | modifiers = 0
| ) | `[static, inherited]`

| Definition at line 238 of file OgreInput.cpp. References Ogre::KEYCODE(), and Ogre::sKeyChars.

long Ogre::SDLInput::getMouseAbsX | ( |  | ) | const`[virtual]`

| Retrieves the absolute mouse position on the X (horizontal) axis. Implements Ogre::InputReader. Definition at line 628 of file OgreSDLInput.cpp. References mMouseX.

long Ogre::SDLInput::getMouseAbsY | ( |  | ) | const`[virtual]`

| Retrieves the absolute mouse position on the Y (vertical) axis. Implements Ogre::InputReader. Definition at line 633 of file OgreSDLInput.cpp. References mMouseY.

long Ogre::SDLInput::getMouseAbsZ | ( |  | ) | const`[virtual]`

| Retrieves the absolute mouse position on the Z (mouse wheel) axis. Implements Ogre::InputReader. Definition at line 638 of file OgreSDLInput.cpp.

bool Ogre::SDLInput::getMouseButton | ( | uchar | button | ) | const`[virtual]`

| Retrieves the state of a mouse button. Implements Ogre::InputReader. Definition at line 643 of file OgreSDLInput.cpp. References Ogre::MouseState::isButtonDown(), Ogre::InputReader::mMouseState, and Ogre::uchar.

virtual long Ogre::InputReader::getMouseRelativeX | ( |  | ) | const`[virtual, inherited]`

| Retrieves the relative position of the mouse when capture was called relative to the last time. Definition at line 272 of file OgreInput.h.

virtual long Ogre::InputReader::getMouseRelativeY | ( |  | ) | const`[virtual, inherited]`

| Retrieves the relative position of the mouse when capture was called relative to the last time. Definition at line 276 of file OgreInput.h.

virtual long Ogre::InputReader::getMouseRelativeZ | ( |  | ) | const`[virtual, inherited]`

| Retrieves the relative position of the mouse when capture was called relative to the last time. Definition at line 280 of file OgreInput.h.

long Ogre::SDLInput::getMouseRelX | ( |  | ) | const`[virtual]`

| Retrieves the relative (compared to the last input poll) mouse movement on the X (horizontal) axis. Implements Ogre::InputReader. Definition at line 613 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState, and Ogre::MouseState::Xrel.

long Ogre::SDLInput::getMouseRelY | ( |  | ) | const`[virtual]`

| Retrieves the relative (compared to the last input poll) mouse movement on the Y (vertical) axis. Implements Ogre::InputReader. Definition at line 618 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState, and Ogre::MouseState::Yrel.

long Ogre::SDLInput::getMouseRelZ | ( |  | ) | const`[virtual]`

| Retrieves the relative (compared to the last input poll) mouse movement on the Z (mouse wheel) axis. Implements Ogre::InputReader. Definition at line 623 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState, and Ogre::MouseState::Zrel.

void Ogre::SDLInput::getMouseState | ( | MouseState & | state | ) | const`[virtual]`

| Retrieves the current state of the mouse. Implements Ogre::InputReader. Definition at line 751 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState.

void Ogre::SDLInput::initialise | ( | RenderWindow * | pWindow,
|  | bool | useKeyboard = true,
|  | bool | useMouse = true,
|  | bool | useGameController = false
| ) | `[virtual]`

Initialise the input system.

Note:
  Only keyboard and mouse currently implemented.

Parameters:

  pWindow | The window to capture input for
  useKeyboard | If true, keyboard input will be supported.
  useMouse | If true, mouse input will be supported.
  useGameController | If true, joysticks/gamepads will be supported.

Implements Ogre::InputReader.

Definition at line 156 of file OgreSDLInput.cpp.

References _grabMouse(), Ogre::RenderWindow::getMetrics(), Ogre::GRAB_MOUSE_CLICK, Ogre::GRAB_NONE, mGrabMode, mGrabMouse, mMouseLeft, mMouseX, mMouseY, and mUseMouse.

bool Ogre::InputReader::isKeyDown | ( | KeyCode | kc | ) | const`[virtual, inherited]`

Determines if the specified key is currently depressed.

Note:
  In immediate mode, this enquiry method uses the state of the keyboard at the last 'capture' call.

Definition at line 370 of file OgreInput.cpp.

References Ogre::InputReader::isKeyDownImmediate(), Ogre::KeyCode, and Ogre::InputReader::mBufferedKeysDown.

Referenced by Ogre::Win32Input8::getKeyModifiers().

bool Ogre::SDLInput::isKeyDownImmediate | ( | KeyCode | kc | ) | const`[private, virtual]`

Return whether a key is down in immediate mode.

Implements Ogre::InputReader.

Definition at line 349 of file OgreSDLInput.cpp.

References Ogre::KC_0, Ogre::KC_1, Ogre::KC_2, Ogre::KC_3, Ogre::KC_4, Ogre::KC_5, Ogre::KC_6, Ogre::KC_7, Ogre::KC_8, Ogre::KC_9, Ogre::KC_A, Ogre::KC_ABNT_C1, Ogre::KC_ABNT_C2, Ogre::KC_ADD, Ogre::KC_APOSTROPHE, Ogre::KC_APPS, Ogre::KC_AT, Ogre::KC_AX, Ogre::KC_B, Ogre::KC_BACK, Ogre::KC_BACKSLASH, Ogre::KC_C, Ogre::KC_CALCULATOR, Ogre::KC_CAPITAL, Ogre::KC_COLON, Ogre::KC_COMMA, Ogre::KC_CONVERT, Ogre::KC_D, Ogre::KC_DECIMAL, Ogre::KC_DELETE, Ogre::KC_DIVIDE, Ogre::KC_DOWN, Ogre::KC_E, Ogre::KC_END, Ogre::KC_EQUALS, Ogre::KC_ESCAPE, Ogre::KC_F, Ogre::KC_F1, Ogre::KC_F10, Ogre::KC_F11, Ogre::KC_F12, Ogre::KC_F13, Ogre::KC_F14, Ogre::KC_F15, Ogre::KC_F2, Ogre::KC_F3, Ogre::KC_F4, Ogre::KC_F5, Ogre::KC_F6, Ogre::KC_F7, Ogre::KC_F8, Ogre::KC_F9, Ogre::KC_G, Ogre::KC_GRAVE, Ogre::KC_H, Ogre::KC_HOME, Ogre::KC_I, Ogre::KC_INSERT, Ogre::KC_J, Ogre::KC_K, Ogre::KC_KANA, Ogre::KC_KANJI, Ogre::KC_L, Ogre::KC_LBRACKET, Ogre::KC_LCONTROL, Ogre::KC_LEFT, Ogre::KC_LMENU, Ogre::KC_LSHIFT, Ogre::KC_LWIN, Ogre::KC_M, Ogre::KC_MAIL, Ogre::KC_MEDIASELECT, Ogre::KC_MEDIASTOP, Ogre::KC_MINUS, Ogre::KC_MULTIPLY, Ogre::KC_MUTE, Ogre::KC_MYCOMPUTER, Ogre::KC_N, Ogre::KC_NEXTTRACK, Ogre::KC_NOCONVERT, Ogre::KC_NUMLOCK, Ogre::KC_NUMPAD0, Ogre::KC_NUMPAD1, Ogre::KC_NUMPAD2, Ogre::KC_NUMPAD3, Ogre::KC_NUMPAD4, Ogre::KC_NUMPAD5, Ogre::KC_NUMPAD6, Ogre::KC_NUMPAD7, Ogre::KC_NUMPAD8, Ogre::KC_NUMPAD9, Ogre::KC_NUMPADCOMMA, Ogre::KC_NUMPADENTER, Ogre::KC_NUMPADEQUALS, Ogre::KC_O, Ogre::KC_OEM_102, Ogre::KC_P, Ogre::KC_PAUSE, Ogre::KC_PERIOD, Ogre::KC_PGDOWN, Ogre::KC_PGUP, Ogre::KC_PLAYPAUSE, Ogre::KC_POWER, Ogre::KC_PREVTRACK, Ogre::KC_Q, Ogre::KC_R, Ogre::KC_RBRACKET, Ogre::KC_RCONTROL, Ogre::KC_RETURN, Ogre::KC_RIGHT, Ogre::KC_RMENU, Ogre::KC_RSHIFT, Ogre::KC_RWIN, Ogre::KC_S, Ogre::KC_SCROLL, Ogre::KC_SEMICOLON, Ogre::KC_SLASH, Ogre::KC_SLEEP, Ogre::KC_SPACE, Ogre::KC_STOP, Ogre::KC_SUBTRACT, Ogre::KC_SYSRQ, Ogre::KC_T, Ogre::KC_TAB, Ogre::KC_U, Ogre::KC_UNDERLINE, Ogre::KC_UNLABELED, Ogre::KC_UP, Ogre::KC_V, Ogre::KC_VOLUMEDOWN, Ogre::KC_VOLUMEUP, Ogre::KC_W, Ogre::KC_WAKE, Ogre::KC_WEBBACK, Ogre::KC_WEBFAVORITES, Ogre::KC_WEBFORWARD, Ogre::KC_WEBHOME, Ogre::KC_WEBREFRESH, Ogre::KC_WEBSEARCH, Ogre::KC_WEBSTOP, Ogre::KC_X, Ogre::KC_Y, Ogre::KC_YEN, Ogre::KC_Z, Ogre::KeyCode, and mKeyboardBuffer.

void Ogre::InputReader::keyChanged | ( | int | key,
|  | bool | down
| ) | `[protected, inherited]`

| Definition at line 185 of file OgreInput.cpp. References Ogre::InputReader::createKeyEvent(), Ogre::KC_LCONTROL, Ogre::KC_LMENU, Ogre::KC_LSHIFT, Ogre::KC_RCONTROL, Ogre::KC_RMENU, Ogre::KC_RSHIFT, Ogre::InputReader::mBufferedKeysDown, and Ogre::InputReader::mModifiers. Referenced by Ogre::GLXInput::capture(), processBufferedKeyboard(), and Ogre::Win32Input8::readBufferedKeyboardData().

void Ogre::InputReader::mouseMoved | ( |  | ) | `[protected, inherited]`

| Creates mouse moved or dragged events depending if any button is pressed. Definition at line 161 of file OgreInput.cpp. References Ogre::InputReader::createMouseEvent(), and Ogre::InputReader::mModifiers. Referenced by Ogre::GLXInput::capture(), processBufferedMouse(), and Ogre::Win32Input8::readBufferedMouseData().

void Ogre::SDLInput::processBufferedKeyboard | ( |  | ) | `[private]`

| Definition at line 648 of file OgreSDLInput.cpp. References _key_map, and Ogre::InputReader::keyChanged(). Referenced by capture().

void Ogre::SDLInput::processBufferedMouse | ( |  | ) | `[private]`

| Definition at line 669 of file OgreSDLInput.cpp. References _grabMouse(), _visible, Ogre::Cursor::addToX(), Ogre::Cursor::addToY(), Ogre::GRAB_MOUSE_CLICK, Ogre::InputReader::mCursor, mGrabMode, mGrabMouse, mMouseGrabbed, Ogre::InputReader::mouseMoved(), mScale, and Ogre::InputReader::triggerMouseButton(). Referenced by capture().

void Ogre::InputReader::removeCursorMoveListener | ( | MouseMotionListener * | c | ) | `[inherited]`

| Remove a mouse motion listener to the cursor object. This keeps the Cursor object hidden. Definition at line 179 of file OgreInput.cpp. References Ogre::InputReader::mCursor, and Ogre::MouseMotionTarget::removeMouseMotionListener(). Referenced by Ogre::EventProcessor::removeCursorMoveListener().

void Ogre::InputReader::setBufferedInput | ( | bool | keys,
|  | bool | mouse
| ) | `[virtual, inherited]`

| Reimplemented in Ogre::Win32Input8. Definition at line 71 of file OgreInput.cpp. References Ogre::InputReader::mUseBufferedKeys, and Ogre::InputReader::mUseBufferedMouse.

void Ogre::SDLInput::setGrabMode | ( | GrabMode | mode | ) |

| Sets how to grab the mouse. Possible values for mode are GRAB_MOUSE_OVER or GRAB_MOUSE_BUTTON. The first will grab the mouse if the pointer is over the application window and the latter will wait for a mouse button click to aquire the mouse. Default is GRAB_MOUSE_CLICK. Definition at line 64 of file OgreSDLInput.h. References Ogre::GrabMode, and mGrabMode.

void Ogre::InputReader::setupKeyChars | ( |  | ) | `[protected, inherited]`

Definition at line 248 of file OgreInput.cpp.

References Ogre::KC_0, Ogre::KC_1, Ogre::KC_2, Ogre::KC_3, Ogre::KC_4, Ogre::KC_5, Ogre::KC_6, Ogre::KC_7, Ogre::KC_8, Ogre::KC_9, Ogre::KC_A, Ogre::KC_ADD, Ogre::KC_APOSTROPHE, Ogre::KC_AT, Ogre::KC_B, Ogre::KC_BACKSLASH, Ogre::KC_C, Ogre::KC_COLON, Ogre::KC_COMMA, Ogre::KC_D, Ogre::KC_DECIMAL, Ogre::KC_DIVIDE, Ogre::KC_E, Ogre::KC_EQUALS, Ogre::KC_F, Ogre::KC_G, Ogre::KC_GRAVE, Ogre::KC_H, Ogre::KC_I, Ogre::KC_J, Ogre::KC_K, Ogre::KC_L, Ogre::KC_LBRACKET, Ogre::KC_M, Ogre::KC_MINUS, Ogre::KC_MULTIPLY, Ogre::KC_N, Ogre::KC_NUMPAD0, Ogre::KC_NUMPAD1, Ogre::KC_NUMPAD2, Ogre::KC_NUMPAD3, Ogre::KC_NUMPAD4, Ogre::KC_NUMPAD5, Ogre::KC_NUMPAD6, Ogre::KC_NUMPAD7, Ogre::KC_NUMPAD8, Ogre::KC_NUMPAD9, Ogre::KC_NUMPADCOMMA, Ogre::KC_NUMPADEQUALS, Ogre::KC_O, Ogre::KC_P, Ogre::KC_PERIOD, Ogre::KC_Q, Ogre::KC_R, Ogre::KC_RBRACKET, Ogre::KC_S, Ogre::KC_SEMICOLON, Ogre::KC_SLASH, Ogre::KC_SPACE, Ogre::KC_SUBTRACT, Ogre::KC_T, Ogre::KC_U, Ogre::KC_UNDERLINE, Ogre::KC_V, Ogre::KC_W, Ogre::KC_X, Ogre::KC_Y, Ogre::KC_Z, Ogre::KEYCODE(), and Ogre::sKeyChars.

Referenced by Ogre::InputReader::InputReader().

void Ogre::InputReader::triggerMouseButton | ( | int | nMouseCode,
|  | bool | mousePressed
| ) | `[protected, inherited]`

| Creates mouse pressed, released, and clicked events. Definition at line 88 of file OgreInput.cpp. References Ogre::MouseState::Buttons, Ogre::InputReader::createMouseEvent(), Ogre::InputReader::mModifiers, and Ogre::InputReader::mMouseState. Referenced by Ogre::GLXInput::capture(), processBufferedMouse(), and Ogre::Win32Input8::readBufferedMouseData().

void Ogre::InputReader::useBufferedInput | ( | EventQueue * | pEventQueue,
|  | bool | keys = true,
|  | bool | mouse = true
| ) | `[inherited]`

Tells the reader to use buffered input and update the passed in queue.

Remarks:
  The default behaviour of the input reader is simply to capture the current state of the mouse / keyboard on demand. An alternative is to use buffered input where all events are registered on a queue.

Definition at line 54 of file OgreInput.cpp.

References Ogre::InputReader::mCursor, Ogre::InputReader::mEventQueue, Ogre::InputReader::mUseBufferedKeys, and Ogre::InputReader::mUseBufferedMouse.

Referenced by Ogre::EventProcessor::initialise().

## Member Data Documentation

InputKeyMap Ogre::SDLInput::_key_map`[private]`

| Definition at line 99 of file OgreSDLInput.h. Referenced by processBufferedKeyboard(), and SDLInput().

bool Ogre::SDLInput::_visible`[private]`

| Definition at line 89 of file OgreSDLInput.h. Referenced by capture(), and processBufferedMouse().

BufferedKeysDownSet Ogre::InputReader::mBufferedKeysDown`[protected, inherited]`

| Definition at line 346 of file OgreInput.h. Referenced by Ogre::InputReader::isKeyDown(), and Ogre::InputReader::keyChanged().

Cursor* Ogre::InputReader::mCursor`[protected, inherited]`

Internal Cursor object.

Remarks:
  This is a mathematical representation of where the cursor is, it does not draw a cursor.

See also:
  CursorGuiElement.

Definition at line 331 of file OgreInput.h.

Referenced by Ogre::InputReader::addCursorMoveListener(), Ogre::GLXInput::capture(), Ogre::InputReader::createMouseEvent(), Ogre::InputReader::InputReader(), processBufferedMouse(), Ogre::Win32Input8::readBufferedMouseData(), Ogre::InputReader::removeCursorMoveListener(), Ogre::InputReader::useBufferedInput(), and Ogre::InputReader::~InputReader().

EventQueue* Ogre::InputReader::mEventQueue`[protected, inherited]`

| EventQueue is used for buffered input support. Definition at line 334 of file OgreInput.h. Referenced by Ogre::InputReader::createKeyEvent(), Ogre::InputReader::createMouseEvent(), Ogre::GLXInput::GLXInput(), Ogre::InputReader::InputReader(), SDLInput(), Ogre::InputReader::useBufferedInput(), and Ogre::Win32Input8::Win32Input8().

int Ogre::SDLInput::mGrabMode`[private]`

| Definition at line 96 of file OgreSDLInput.h. Referenced by capture(), initialise(), processBufferedMouse(), SDLInput(), and setGrabMode().

bool Ogre::SDLInput::mGrabMouse`[private]`

| Definition at line 93 of file OgreSDLInput.h. Referenced by _grabMouse(), _releaseMouse(), capture(), initialise(), processBufferedMouse(), and SDLInput().

Uint8* Ogre::SDLInput::mKeyboardBuffer`[private]`

| Definition at line 83 of file OgreSDLInput.h. Referenced by capture(), and isKeyDownImmediate().

int Ogre::SDLInput::mMaxKey`[private]`

| Definition at line 84 of file OgreSDLInput.h.

long Ogre::InputReader::mModifiers`[protected, inherited]`

The modifiers are a binary flags that represent what buttons are pressed, and what key modifiers are down (e.g.

shift/alt).

Definition at line 321 of file OgreInput.h.

Referenced by Ogre::Win32Input8::capture(), Ogre::InputReader::createKeyEvent(), Ogre::InputReader::createMouseEvent(), Ogre::Win32Input8::getKeyModifiers(), Ogre::InputReader::InputReader(), Ogre::InputReader::keyChanged(), Ogre::InputReader::mouseMoved(), and Ogre::InputReader::triggerMouseButton().

bool Ogre::SDLInput::mMouseGrabbed`[private]`

| Definition at line 91 of file OgreSDLInput.h. Referenced by _grabMouse(), _releaseMouse(), capture(), processBufferedMouse(), and SDLInput().

Uint8 Ogre::SDLInput::mMouseKeys`[private]`

| Definition at line 88 of file OgreSDLInput.h. Referenced by capture().

bool Ogre::SDLInput::mMouseLeft`[private]`

| Definition at line 94 of file OgreSDLInput.h. Referenced by _releaseMouse(), capture(), initialise(), and SDLInput().

int Ogre::SDLInput::mMouseRelativeX`[private]`

| Definition at line 86 of file OgreSDLInput.h. Referenced by capture().

int Ogre::SDLInput::mMouseRelativeY`[private]`

| Definition at line 86 of file OgreSDLInput.h. Referenced by capture().

int Ogre::SDLInput::mMouseRelativeZ`[private]`

| Definition at line 86 of file OgreSDLInput.h. Referenced by capture().

MouseState Ogre::InputReader::mMouseState`[protected, inherited]`

The mouse state in immediate mode.

Definition at line 342 of file OgreInput.h.

Referenced by capture(), Ogre::GLXInput::capture(), Ogre::Win32Input8::captureMouse(), Ogre::Win32Input8::getMouseAbsX(), Ogre::GLXInput::getMouseAbsX(), Ogre::Win32Input8::getMouseAbsY(), Ogre::GLXInput::getMouseAbsY(), Ogre::Win32Input8::getMouseAbsZ(), Ogre::GLXInput::getMouseAbsZ(), Ogre::Win32Input8::getMouseButton(), getMouseButton(), Ogre::GLXInput::getMouseButton(), Ogre::Win32Input8::getMouseRelX(), getMouseRelX(), Ogre::GLXInput::getMouseRelX(), Ogre::Win32Input8::getMouseRelY(), getMouseRelY(), Ogre::GLXInput::getMouseRelY(), Ogre::Win32Input8::getMouseRelZ(), getMouseRelZ(), Ogre::GLXInput::getMouseRelZ(), Ogre::Win32Input8::getMouseState(), getMouseState(), Ogre::GLXInput::getMouseState(), Ogre::GLXInput::GrabCursor(), Ogre::GLXInput::initialise(), Ogre::Win32Input8::initialiseImmediateMouse(), and Ogre::InputReader::triggerMouseButton().

int Ogre::SDLInput::mMouseX`[private]`

| Definition at line 85 of file OgreSDLInput.h. Referenced by capture(), getMouseAbsX(), and initialise().

int Ogre::SDLInput::mMouseY`[private]`

| Definition at line 85 of file OgreSDLInput.h. Referenced by capture(), getMouseAbsY(), and initialise().

Real Ogre::SDLInput::mScale`[private]`

| Definition at line 87 of file OgreSDLInput.h. Referenced by processBufferedMouse().

bool Ogre::InputReader::mUseBufferedKeys`[protected, inherited]`

Wether to use buffering input support - buffering support relies on using an EventQueue.

See also:
  class EventQueue

Definition at line 339 of file OgreInput.h.

Referenced by Ogre::InputReader::InputReader(), Ogre::Win32Input8::setBufferedInput(), Ogre::InputReader::setBufferedInput(), and Ogre::InputReader::useBufferedInput().

bool Ogre::InputReader::mUseBufferedMouse`[protected, inherited]`

Wether to use buffering input support - buffering support relies on using an EventQueue.

See also:
  class EventQueue

Definition at line 339 of file OgreInput.h.

Referenced by Ogre::GLXInput::capture(), Ogre::InputReader::InputReader(), Ogre::Win32Input8::setBufferedInput(), Ogre::InputReader::setBufferedInput(), and Ogre::InputReader::useBufferedInput().

bool Ogre::SDLInput::mUseMouse`[private]`

| Definition at line 92 of file OgreSDLInput.h. Referenced by initialise().

const unsigned int Ogre::SDLInput::mWheelStep = 60`[static, private]`

| Definition at line 107 of file OgreSDLInput.h. Referenced by capture().

bool Ogre::InputReader::sKeysInitialised = false`[static, protected, inherited]`

| Definition at line 37 of file OgreInput.cpp. Referenced by Ogre::InputReader::InputReader().

bool Ogre::SDLInput::warpMouse`[private]`

| Definition at line 100 of file OgreSDLInput.h.

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

- OgreSDLInput.h
- OgreSDLInput.cpp

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