Kigs Framework
Doc version 0.8
Open source multi purpose Rapid Application Development framework
|
#include <ModuleInput.h>
Inherits ModuleBase.
Public Member Functions | |
ModuleInput (const kstl::string &name, DECLARE_CLASS_NAME_TREE_ARG) | |
constructor More... | |
void | Init (KigsCore *core, const kstl::vector< CoreModifiableAttribute * > *params) override |
initialize module More... | |
void | Close () override |
close module | |
void | Update (const Timer &timer, void *addParam) override |
update module More... | |
MouseDevice * | GetMouse () |
return mouse if any More... | |
MultiTouchDevice * | GetMultiTouch () |
return multiTouch if any More... | |
JoystickDevice * | GetJoystick (int index) |
return joystick by index More... | |
KeyboardDevice * | GetKeyboard () |
return keyboard if any More... | |
unsigned int | GetJoystickCount () |
return joystick count More... | |
bool | addItem (const CMSP &item, ItemPosition pos=Last DECLARE_DEFAULT_LINK_NAME) override |
method to manage CoreModifiable Tree : add a son More... | |
bool | getActiveWindowPos (CoreModifiable *w, MouseDevice::MOUSE_BUTTONS buttonId, kfloat &X, kfloat &Y) |
get the position of a click for a given button on a given window More... | |
void | addWindowClick (WindowClick *w) |
add a WindowClick to the list More... | |
void | removeWindowClick (WindowClick *w) |
remove a WindowClick to the list More... | |
WindowClick * | getWindowClick (CoreModifiable *w) |
get the WindowClick which watch a given Window More... | |
Static Public Member Functions | |
static void | WindowClickEvent (CoreModifiable *w, int buttonId, kfloat X, kfloat Y, bool isDown) |
function called when a window get a mouse click More... | |
static void | WindowDestroyEvent (CoreModifiable *w) |
function called when a window is destroyed More... | |
Protected Attributes | |
std::list< WindowClick * > | mActiveWindows |
list of WindowClick | |
Generic module for input management.
ModuleInput::ModuleInput | ( | const kstl::string & | name, |
DECLARE_CLASS_NAME_TREE_ARG | |||
) |
constructor
name | : instance name |
DECLARE_CLASS_NAME_TREE_ARG | : list of arguments |
|
overridevirtual |
method to manage CoreModifiable Tree : add a son
item | : item to add |
linkName | : name of the added item |
Reimplemented from CoreModifiable.
|
inline |
add a WindowClick to the list
w | : watched window |
bool ModuleInput::getActiveWindowPos | ( | CoreModifiable * | w, |
MouseDevice::MOUSE_BUTTONS | buttonId, | ||
kfloat & | X, | ||
kfloat & | Y | ||
) |
get the position of a click for a given button on a given window
w | : given window |
buttonId | : Id of the button |
X | : position on X axis [0.0, 1.0] (out param) |
Y | : position on Y axis [0.0, 1.0] (out param) |
JoystickDevice * ModuleInput::GetJoystick | ( | int | index | ) |
return joystick by index
index | : index of the Joystick |
|
inline |
return joystick count
|
inline |
return keyboard if any
|
inline |
return mouse if any
update module
timer | : timer global |
|
inline |
return multiTouch if any
update module
timer | : timer global |
|
inline |
get the WindowClick which watch a given Window
w | : watched window |
|
override |
initialize module
core | : link to the core, NOT NULL |
params | : list of parameters |
|
inline |
remove a WindowClick to the list
w | : watched window |
|
overridevirtual |
|
static |
function called when a window get a mouse click
w | : clicked window |
buttonId | : Id of the button |
X | : position on X axis [0.0, 1.0] |
Y | : position on Y axis [0.0, 1.0] |
|
static |
function called when a window is destroyed
w | : clicked window |