ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::Action Struct Reference

#include <action.h>

Collaboration diagram for Common::Action:

List of all members.

Public Member Functions

 Action (const char *id, const String &description)
void setEvent (const Event &evt)
void setEvent (const EventType evtType)
void setCustomBackendActionEvent (const CustomEventType evtType)
void setCustomBackendActionAxisEvent (const CustomEventType evtType)
void setCustomEngineActionEvent (const CustomEventType evtType)
void setKeyEvent (const KeyState &ks)
void setLeftClickEvent ()
void setMiddleClickEvent ()
void setRightClickEvent ()
void setMouseWheelUpEvent ()
void setMouseWheelDownEvent ()
void setX1ClickEvent ()
void setX2ClickEvent ()
void allowKbdRepeats ()
 Allows an action bound to a keyboard event to be repeatedly triggered by key repeats.
bool shouldTriggerOnKbdRepeats () const
void addDefaultInputMapping (const String &hwId)
 Add a default input mapping for the action.
const Array< String > & getDefaultInputMapping () const

Public Attributes

const char * id
 unique id used for saving/loading to config
String description
 Human readable description.
Event event
 Event to be sent when mapped key is pressed.

Private Attributes

Array< String_defaultInputMapping
bool _shouldTriggerOnKbdRepeats

Detailed Description

Definition at line 41 of file action.h.


Constructor & Destructor Documentation

Common::Action::Action ( const char *  id,
const String description 
)

Definition at line 29 of file action.cpp.


Member Function Documentation

void Common::Action::addDefaultInputMapping ( const String hwId  ) 

Add a default input mapping for the action.

Unknown hardware inputs will be silently ignored. Having keyboard bindings by default will not cause trouble on devices without a keyboard.

Parameters:
hwId Hardware input identifier as registered with the keymapper

Definition at line 36 of file action.cpp.

void Common::Action::allowKbdRepeats (  )  [inline]

Allows an action bound to a keyboard event to be repeatedly triggered by key repeats.

Note that key repeat events should probably not be used for anything else than text input as they do not trigger when the action is bound to something else than a keyboard key. Furthermore, the frequency at which they trigger and whether they trigger at all is operating system controlled.

Definition at line 128 of file action.h.

const Array<String>& Common::Action::getDefaultInputMapping (  )  const [inline]

Definition at line 145 of file action.h.

void Common::Action::setCustomBackendActionAxisEvent ( const CustomEventType  evtType  )  [inline]

Definition at line 72 of file action.h.

void Common::Action::setCustomBackendActionEvent ( const CustomEventType  evtType  )  [inline]

Definition at line 66 of file action.h.

void Common::Action::setCustomEngineActionEvent ( const CustomEventType  evtType  )  [inline]

Definition at line 78 of file action.h.

void Common::Action::setEvent ( const EventType  evtType  )  [inline]

Definition at line 61 of file action.h.

void Common::Action::setEvent ( const Event evt  )  [inline]

Definition at line 57 of file action.h.

void Common::Action::setKeyEvent ( const KeyState ks  )  [inline]

Definition at line 84 of file action.h.

void Common::Action::setLeftClickEvent (  )  [inline]

Definition at line 90 of file action.h.

void Common::Action::setMiddleClickEvent (  )  [inline]

Definition at line 94 of file action.h.

void Common::Action::setMouseWheelDownEvent (  )  [inline]

Definition at line 106 of file action.h.

void Common::Action::setMouseWheelUpEvent (  )  [inline]

Definition at line 102 of file action.h.

void Common::Action::setRightClickEvent (  )  [inline]

Definition at line 98 of file action.h.

void Common::Action::setX1ClickEvent (  )  [inline]

Definition at line 110 of file action.h.

void Common::Action::setX2ClickEvent (  )  [inline]

Definition at line 114 of file action.h.

bool Common::Action::shouldTriggerOnKbdRepeats (  )  const [inline]

Definition at line 132 of file action.h.


Member Data Documentation

Definition at line 51 of file action.h.

Definition at line 52 of file action.h.

Human readable description.

Definition at line 45 of file action.h.

Event to be sent when mapped key is pressed.

Definition at line 48 of file action.h.

const char* Common::Action::id

unique id used for saving/loading to config

Definition at line 43 of file action.h.


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


Generated on Sat Jul 4 2020 05:03:25 for ResidualVM by doxygen 1.7.1
curved edge   curved edge