Planeshift
|
psMouseBinds holds set of psMouseAction More...
#include <psmousebinds.h>
Public Member Functions | |
void | Bind (const csString &action, csMouseEventData &event) |
Binds a mouse event to an action. | |
void | Bind (const csString &action, csString &event, csString &ctrl) |
void | Bind (const csString &action, int button, int modifier) |
bool | CheckBind (const csString &action, int button, int modifiers) |
Checks if a specific bind matches the given button and modifiers. | |
bool | GetBind (const csString &action, csMouseEventData &event) |
Gets the mouse event that triggers the specified action. | |
bool | GetBind (const csString &action, csString &button) |
bool | GetInt (const csString &option, csString &value) |
Gets the integer value of the specified option. | |
bool | GetInt (const csString &option, int &value) |
bool | GetOnOff (const csString &option, csString &value) |
Gets the boolean value of the specified option. | |
bool | GetOnOff (const csString &option, bool &value) |
bool | LoadFromFile (iObjectRegistry *object_reg, const csString &filename) |
Loads the mouse actions from a file. | |
psMouseBinds () | |
void | RemoveInt (const csString &option) |
Removes an int option. | |
void | RemoveOnOff (const csString &option) |
Removes an OnOff option. | |
bool | SaveToFile (iObjectRegistry *object_reg, const csString &filename) |
Saves the mouse actions to a file. | |
void | SetInt (const csString &option, csString &value) |
Sets the integer setting of the specified option. | |
void | SetInt (const csString &option, int value) |
void | SetOnOff (const csString &option, csString &value) |
Sets the boolean setting of the specified option. | |
void | SetOnOff (const csString &option, bool value) |
void | Unbind (const csString &action) |
Removes an action. | |
void | UnbindAll () |
Removes all actions/options. | |
Static Public Member Functions | |
static csString | MouseButtonToString (uint button, uint32 modifiers) |
static bool | StringToMouseButton (const csString &str, uint &button, uint32 &modifiers) |
Protected Member Functions | |
psMouseBind * | FindAction (const csString &action) |
Finds the action in the list. | |
psMouseInt * | FindInt (const csString &option) |
Finds the int option in the list. | |
psMouseOnOff * | FindOnOff (const csString &option) |
Finds the OnOff option in the list. | |
Protected Attributes | |
csPDelArray< psMouseBind > | binds |
list of the binds | |
csPDelArray< psMouseOnOff > | boolOptions |
csPDelArray< psMouseInt > | intOptions |
psMouseBinds holds set of psMouseAction
Definition at line 64 of file psmousebinds.h.
psMouseBinds::psMouseBinds | ( | ) | [inline] |
Definition at line 67 of file psmousebinds.h.
void psMouseBinds::Bind | ( | const csString & | action, |
csMouseEventData & | event | ||
) |
Binds a mouse event to an action.
action | the action that will be bound |
event | the mouse event that will trigger the action |
void psMouseBinds::Bind | ( | const csString & | action, |
csString & | event, | ||
csString & | ctrl | ||
) |
Checks if a specific bind matches the given button and modifiers.
action | the action to query. |
button | the button that you want to check against. |
modifiers | the modifiers that you want to check against. |
psMouseBind* psMouseBinds::FindAction | ( | const csString & | action | ) | [protected] |
Finds the action in the list.
action | the action to search for |
psMouseInt* psMouseBinds::FindInt | ( | const csString & | option | ) | [protected] |
Finds the int option in the list.
option | the option to search for |
psMouseOnOff* psMouseBinds::FindOnOff | ( | const csString & | option | ) | [protected] |
Finds the OnOff option in the list.
option | the option to search for |
bool psMouseBinds::GetBind | ( | const csString & | action, |
csMouseEventData & | event | ||
) |
Gets the mouse event that triggers the specified action.
action | the action to query |
event | a variable that will hold the event |
bool psMouseBinds::GetBind | ( | const csString & | action, |
csString & | button | ||
) |
bool psMouseBinds::GetInt | ( | const csString & | option, |
int & | value | ||
) |
bool psMouseBinds::GetInt | ( | const csString & | option, |
csString & | value | ||
) |
Gets the integer value of the specified option.
option | the option to query |
value | a variable that will hold the option value |
bool psMouseBinds::GetOnOff | ( | const csString & | option, |
csString & | value | ||
) |
Gets the boolean value of the specified option.
option | the option to query |
value | a variable that will hold the option value |
bool psMouseBinds::GetOnOff | ( | const csString & | option, |
bool & | value | ||
) |
bool psMouseBinds::LoadFromFile | ( | iObjectRegistry * | object_reg, |
const csString & | filename | ||
) |
Loads the mouse actions from a file.
object_reg | The object registry |
filename | the vfs filename and path |
static csString psMouseBinds::MouseButtonToString | ( | uint | button, |
uint32 | modifiers | ||
) | [static] |
void psMouseBinds::RemoveInt | ( | const csString & | option | ) |
Removes an int option.
option | the option to remove |
void psMouseBinds::RemoveOnOff | ( | const csString & | option | ) |
Removes an OnOff option.
option | the option to remove |
bool psMouseBinds::SaveToFile | ( | iObjectRegistry * | object_reg, |
const csString & | filename | ||
) |
Saves the mouse actions to a file.
object_reg | The object registry |
filename | the vfs filename and path |
void psMouseBinds::SetInt | ( | const csString & | option, |
int | value | ||
) |
void psMouseBinds::SetInt | ( | const csString & | option, |
csString & | value | ||
) |
Sets the integer setting of the specified option.
option | the name of the option to set |
value | the value to set the option to |
void psMouseBinds::SetOnOff | ( | const csString & | option, |
csString & | value | ||
) |
Sets the boolean setting of the specified option.
option | the name of the option to set |
value | the value to set the option to |
void psMouseBinds::SetOnOff | ( | const csString & | option, |
bool | value | ||
) |
static bool psMouseBinds::StringToMouseButton | ( | const csString & | str, |
uint & | button, | ||
uint32 & | modifiers | ||
) | [static] |
void psMouseBinds::Unbind | ( | const csString & | action | ) |
Removes an action.
action | the action to remove |
void psMouseBinds::UnbindAll | ( | ) |
Removes all actions/options.
csPDelArray<psMouseBind> psMouseBinds::binds [protected] |
list of the binds
Definition at line 225 of file psmousebinds.h.
csPDelArray<psMouseOnOff> psMouseBinds::boolOptions [protected] |
Definition at line 226 of file psmousebinds.h.
csPDelArray<psMouseInt> psMouseBinds::intOptions [protected] |
Definition at line 227 of file psmousebinds.h.