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 U32String &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
U32String 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 42 of file action.h.


Constructor & Destructor Documentation

Common::Action::Action ( const char *  id,
const U32String 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 129 of file action.h.

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

Definition at line 146 of file action.h.

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

Definition at line 73 of file action.h.

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

Definition at line 67 of file action.h.

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

Definition at line 79 of file action.h.

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

Definition at line 62 of file action.h.

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

Definition at line 58 of file action.h.

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

Definition at line 85 of file action.h.

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

Definition at line 91 of file action.h.

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

Definition at line 95 of file action.h.

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

Definition at line 107 of file action.h.

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

Definition at line 103 of file action.h.

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

Definition at line 99 of file action.h.

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

Definition at line 111 of file action.h.

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

Definition at line 115 of file action.h.

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

Definition at line 133 of file action.h.


Member Data Documentation

Definition at line 52 of file action.h.

Definition at line 53 of file action.h.

Human readable description.

Definition at line 46 of file action.h.

Event to be sent when mapped key is pressed.

Definition at line 49 of file action.h.

const char* Common::Action::id

unique id used for saving/loading to config

Definition at line 44 of file action.h.


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


Generated on Sat Sep 12 2020 05:04:15 for ResidualVM by doxygen 1.7.1
curved edge   curved edge