MyGUI  3.2.1
Public Member Functions | Data Fields
MyGUI::InputManager Class Reference

#include <MyGUI_InputManager.h>

+ Inheritance diagram for MyGUI::InputManager:

Public Member Functions

 InputManager ()
void initialise ()
void shutdown ()
bool injectMouseMove (int _absx, int _absy, int _absz)
bool injectMousePress (int _absx, int _absy, MouseButton _id)
bool injectMouseRelease (int _absx, int _absy, MouseButton _id)
bool injectKeyPress (KeyCode _key, Char _text=0)
bool injectKeyRelease (KeyCode _key)
bool isFocusMouse () const
bool isFocusKey () const
bool isCaptureMouse () const
void setKeyFocusWidget (Widget *_widget)
void resetKeyFocusWidget (Widget *_widget)
void resetKeyFocusWidget ()
WidgetgetMouseFocusWidget () const
WidgetgetKeyFocusWidget () const
const IntPointgetLastPressedPosition (MouseButton _id) const
const IntPointgetMousePosition () const
IntPoint getMousePositionByLayer ()
void addWidgetModal (Widget *_widget)
void removeWidgetModal (Widget *_widget)
bool isModalAny () const
bool isControlPressed () const
bool isShiftPressed () const
void resetMouseCaptureWidget ()
void unlinkWidget (Widget *_widget)
void _resetMouseFocusWidget ()

Data Fields

delegates::CMultiDelegate1
< Widget * > 
eventChangeMouseFocus
delegates::CMultiDelegate1
< Widget * > 
eventChangeKeyFocus

Detailed Description

Definition at line 27 of file MyGUI_InputManager.h.


Constructor & Destructor Documentation

Definition at line 26 of file MyGUI_InputManager.cpp.


Member Function Documentation

Definition at line 438 of file MyGUI_InputManager.cpp.

Add modal widget - all other widgets inaccessible while modal widget exist

Definition at line 495 of file MyGUI_InputManager.cpp.

Get key focused widget

Definition at line 635 of file MyGUI_InputManager.cpp.

Get position of last mouse button press. Position calculated on specific layer where mouse was pressed.

Definition at line 640 of file MyGUI_InputManager.cpp.

Get mouse focused widget

Definition at line 630 of file MyGUI_InputManager.cpp.

Get current mouse position on screen

Definition at line 649 of file MyGUI_InputManager.cpp.

Get mouse position on current layer. This position might different from getMousePosition() if mouse is over non-2d layer.

Definition at line 598 of file MyGUI_InputManager.cpp.

Definition at line 43 of file MyGUI_InputManager.cpp.

bool MyGUI::InputManager::injectKeyPress ( KeyCode  _key,
Char  _text = 0 
)

Inject KeyPress event

Returns:
true if event has been processed by GUI

Definition at line 341 of file MyGUI_InputManager.cpp.

Inject KeyRelease event

Returns:
true if event has been processed by GUI

Definition at line 360 of file MyGUI_InputManager.cpp.

bool MyGUI::InputManager::injectMouseMove ( int  _absx,
int  _absy,
int  _absz 
)

Inject MouseMove event

Returns:
true if event has been processed by GUI

Definition at line 82 of file MyGUI_InputManager.cpp.

bool MyGUI::InputManager::injectMousePress ( int  _absx,
int  _absy,
MouseButton  _id 
)

Inject MousePress event

Returns:
true if event has been processed by GUI

Definition at line 220 of file MyGUI_InputManager.cpp.

bool MyGUI::InputManager::injectMouseRelease ( int  _absx,
int  _absy,
MouseButton  _id 
)

Inject MouseRelease event

Returns:
true if event has been processed by GUI

Definition at line 288 of file MyGUI_InputManager.cpp.

Is any widget captured mouse

Definition at line 615 of file MyGUI_InputManager.cpp.

Is control button pressed

Definition at line 659 of file MyGUI_InputManager.cpp.

Is any widget have key focus (any widget might have it, not only EditBox or something similar)

Definition at line 610 of file MyGUI_InputManager.cpp.

Is any widget have mouse focus

Definition at line 605 of file MyGUI_InputManager.cpp.

Return true if any modal widget exist

Definition at line 654 of file MyGUI_InputManager.cpp.

Is shift button pressed

Definition at line 664 of file MyGUI_InputManager.cpp.

Remove modal widget

Definition at line 509 of file MyGUI_InputManager.cpp.

Drop key focus for _widget

Definition at line 592 of file MyGUI_InputManager.cpp.

Drop any key focus

Definition at line 625 of file MyGUI_InputManager.cpp.

Reset mouse capture. For example when we dragging and application lost focus you should call this.

Definition at line 669 of file MyGUI_InputManager.cpp.

Set key focus for _widget

Definition at line 384 of file MyGUI_InputManager.cpp.

Definition at line 70 of file MyGUI_InputManager.cpp.

Unlink widget from input manager.

Definition at line 677 of file MyGUI_InputManager.cpp.


Field Documentation

Event : MultiDelegate. Key focus was changed.
signature : void method(MyGUI::Widget* _widget)

Parameters:
_widget

Definition at line 125 of file MyGUI_InputManager.h.

Event : MultiDelegate. Mouse focus was changed.
signature : void method(MyGUI::Widget* _widget)

Parameters:
_widget

Definition at line 119 of file MyGUI_InputManager.h.


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