28           const std::string& name = 
"",
    29           unsigned int holdTime = 0,
    30           unsigned int buttonCode = 0);
    31   CAction(
int actionID, 
wchar_t unicode);
    38           float velocityX = 0.0f,
    39           float velocityY = 0.0f,
    40           const std::string& name = 
"");
    41   CAction(
int actionID, 
const std::string& name, 
const CKey& key);
    42   CAction(
int actionID, 
const std::string& name);
    50   int GetID()
 const { 
return m_id; }
    57   bool IsGesture() 
const;
    62   const std::string& 
GetName()
 const { 
return m_name; }
    67   const std::string& 
GetText()
 const { 
return m_text; }
    72   void SetText(
const std::string& text) { m_text = text; }
    80     return (index < max_amounts) ? m_amount[index] : 0;
   107   bool IsAnalog() 
const;
   113   static const unsigned int max_amounts = 6; 
   114   float m_amount[max_amounts] = {};
   116   float m_repeat = 0.0f;
   117   unsigned int m_holdTime = 0;
   118   unsigned int m_buttonCode = 0;
   119   wchar_t m_unicode = 0;
 float GetRepeat() const
Time since last repeat in ms. 
Definition: Action.h:100
void ClearAmount()
Reset all amount values to zero. 
Definition: Action.cpp:140
int GetID() const
Identifier of the action. 
Definition: Action.h:50
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
unsigned int GetHoldTime() const
Time in ms that the key has been held. 
Definition: Action.h:95
unsigned int GetButtonCode() const
Button code that triggered this action. 
Definition: Action.h:105
void SetText(const std::string &text)
Set the text payload of the action. 
Definition: Action.h:72
wchar_t GetUnicode() const
Unicode value associated with this action. 
Definition: Action.h:90
float GetAmount(unsigned int index=0) const
Get an amount associated with this action. 
Definition: Action.h:78
bool IsMouse() const
Is this an action from the mouse. 
Definition: Action.cpp:146
const std::string & GetText() const
Text of the action if any. 
Definition: Action.h:67
const std::string & GetName() const
Human-readable name of the action. 
Definition: Action.h:62