WindowInputGenerator
Engine/source/windowManager/windowInputGenerator.h
Classes:
Accelerator key map.
Protected Attributes
bool
bool
We store this off to avoid polling the OS constantly.
bool
This tells us if the last key we pressed was used from the global action map.
This is the scale factor which relates mouse movement in pixels (one unit of mouse movement is a mickey) to units in the GUI.
Protected Functions
generateInputEvent(InputEventInfo & inputEvent)
handleAppEvent(WindowId did, S32 event)
handleCharInput(WindowId did, U32 modifier, U16 key)
Public Functions
WindowInputGenerator(PlatformWindow * window)
bool
Tells us if the last key was used within the global action map.
removeAcceleratorKey(void * hnd, U32 keycode, U32 modifier)
removeAcceleratorKeys(void * hnd)
setInputController(IProcessInput * inputController)
bool
wantAsKeyboardEvent(U32 modifiers, U32 key)
Returns true if the given keypress event should be send as a raw keyboard event even if it maps to a character input event.
Detailed Description
Protected Attributes
Vector< AccKeyMap > mAcceleratorMap
bool mClampToWindow
bool mFocused
We store this off to avoid polling the OS constantly.
IProcessInput * mInputController
Point2I mLastCursorPos
bool mLastPressWasGlobalActionMap
This tells us if the last key we pressed was used from the global action map.
F32 mPixelsPerMickey
This is the scale factor which relates mouse movement in pixels (one unit of mouse movement is a mickey) to units in the GUI.
PlatformWindow * mWindow
Protected Functions
generateInputEvent(InputEventInfo & inputEvent)
handleAppEvent(WindowId did, S32 event)
handleCharInput(WindowId did, U32 modifier, U16 key)
handleInputEvent(U32 deviceInst, F32 fValue, F32 fValue2, F32 fValue3, F32 fValue4, S32 iValue, U16 deviceType, U16 objType, U16 ascii, U16 objInst, U8 action, U8 modifier)
handleKeyboard(WindowId did, U32 modifier, U32 action, U16 key)
handleMouseButton(WindowId did, U32 modifier, U32 action, U16 button)
handleMouseMove(WindowId did, U32 modifier, S32 x, S32 y, bool isRelative)
handleMouseWheel(WindowId did, U32 modifier, S32 wheelDeltaX, S32 wheelDeltaY)
Public Functions
WindowInputGenerator(PlatformWindow * window)
~WindowInputGenerator()
addAcceleratorKey(void * hnd, const String & cmd, U32 keycode, U32 modifier)
lastKeyWasGlobalActionMap()
Tells us if the last key was used within the global action map.
true if the key was a global action map key, false otherwise.
note:Useful and currently used to tell if we just opened the console by using the console key. Currently this is used to fix a bug in SDL but it is not limited to that use.
removeAcceleratorKey(void * hnd, U32 keycode, U32 modifier)
removeAcceleratorKeys(void * hnd)
setInputController(IProcessInput * inputController)
wantAsKeyboardEvent(U32 modifiers, U32 key)
Returns true if the given keypress event should be send as a raw keyboard event even if it maps to a character input event.