#include <PVLE/Export.h>
#include <PVLE/Util/Util.h>
#include <bitset>
#include <osg/Vec3>
#include <PVLE/Config.h>
#include <map>
#include <boost/filesystem/path.hpp>


Go to the source code of this file.
Classes | |
| class | ControlState |
| A control state is a set of values describing at any moment the state of switches (keys and buttons) and axis. More... | |
| class | ControlEvent |
| Describes a change in a ControlState and some other useful data. More... | |
| union | ControlEvent::TEventDependantData |
| Data of an event of a control, which can be an axis or a switch (union). More... | |
| class | NetControlEvent |
| class | Controler |
| Base class defining a storage for control state and events. More... | |
| class | AxisControl |
| Represents a controlled axis (mouse, joystick. More... | |
Namespaces | |
| namespace | TNL |
| namespace | boost |
| namespace | boost::serialization |
Typedefs | |
| typedef std::vector< ControlEvent > | ControlEventList |
| typedef void | TNL::EventConnection |
| typedef std::map< int, ControlState::ESwitchId > | Bindings |
| Switch (keys and buttons) bindings map. | |
| typedef std::map< int, AxisControl > | AxisBindings |
| Axis bindings map. | |
Functions | |
| PVLE_EXPORT void | saveBindings (const Bindings &k, const AxisBindings &a, const boost::filesystem::path &path, const char **userSwitchesNames=NULL, UINT nbUserSwitchesNames=0, UINT userBindingsFileVersion=0) |
| Saves key and axis bindings. | |
| PVLE_EXPORT bool | loadBindings (Bindings &k, AxisBindings &a, const boost::filesystem::path &path, const char **userSwitchesNames=NULL, UINT nbUserSwitchesNames=0, UINT userBindingsFileVersion=0) |
| PVLE_EXPORT void | setDefaultBindings (Bindings &k, AxisBindings &a) |
Variables | |
| const UINT | BUTTON_MOUSE_MODIFIER = 0x10000 |
| Offset applied to mouse buttons for Bindings map key (ex : if a key is BUTTON_MOUSE_MODIFIER +n then it represents the mouse button n). | |
| const UINT | BUTTON_JOY_MODIFIER = 0x10020 |
| Similar to BUTTON_MOUSE_MODIFIER. | |
| const UINT | AXIS_MOUSE_MODIFIER = 0 |
| Offset applied to mouse axis for AxisBindings map key (ex : if a key is AXIS_MOUSE_MODIFIER +n then it represents the mouse axis n). | |
| const UINT | AXIS_JOY_MODIFIER = 0x10 |
| Similar to AXIS_MOUSE_MODIFIER. | |
Definition in file Control.h.
| typedef std::map<int, AxisControl> AxisBindings |
| typedef std::map<int, ControlState::ESwitchId> Bindings |
| typedef std::vector<ControlEvent> ControlEventList |
| PVLE_EXPORT bool loadBindings | ( | Bindings & | k, | |
| AxisBindings & | a, | |||
| const boost::filesystem::path & | path, | |||
| const char ** | userSwitchesNames = NULL, |
|||
| UINT | nbUserSwitchesNames = 0, |
|||
| UINT | userBindingsFileVersion = 0 | |||
| ) |
| PVLE_EXPORT void saveBindings | ( | const Bindings & | k, | |
| const AxisBindings & | a, | |||
| const boost::filesystem::path & | path, | |||
| const char ** | userSwitchesNames = NULL, |
|||
| UINT | nbUserSwitchesNames = 0, |
|||
| UINT | userBindingsFileVersion = 0 | |||
| ) |
Saves key and axis bindings.
Quick 'n' dirty : boost::serialization seems to have problems serializing the map... :( Please note that userSwitchesNames[] must be given if you use custom swiches (>= USER_SWITCH_0). In that case, textual representation of switch USER_SWITCH_0+n is userSwitchesNames[n].
| PVLE_EXPORT void setDefaultBindings | ( | Bindings & | k, | |
| AxisBindings & | a | |||
| ) |
Referenced by loadBindings().
| const UINT AXIS_JOY_MODIFIER = 0x10 |
Similar to AXIS_MOUSE_MODIFIER.
Definition at line 405 of file Control.h.
Referenced by loadBindings(), and saveBindings().
| const UINT AXIS_MOUSE_MODIFIER = 0 |
Offset applied to mouse axis for AxisBindings map key (ex : if a key is AXIS_MOUSE_MODIFIER +n then it represents the mouse axis n).
Definition at line 403 of file Control.h.
Referenced by ControlMapper::handle(), loadBindings(), saveBindings(), and setDefaultBindings().
| const UINT BUTTON_JOY_MODIFIER = 0x10020 |
| const UINT BUTTON_MOUSE_MODIFIER = 0x10000 |
Offset applied to mouse buttons for Bindings map key (ex : if a key is BUTTON_MOUSE_MODIFIER +n then it represents the mouse button n).
Definition at line 363 of file Control.h.
Referenced by ControlMapper::handle(), and setDefaultBindings().
1.5.9