xbmc
Public Member Functions | List of all members
CAction Class Reference

Class encapsulating information regarding a particular user action to be sent to windows and controls. More...

#include <Action.h>

Public Member Functions

 CAction (int actionID, float amount1=1.0f, float amount2=0.0f, const std::string &name="", unsigned int holdTime=0, unsigned int buttonCode=0)
 
 CAction (int actionID, wchar_t unicode)
 
 CAction (int actionID, unsigned int state, float posX, float posY, float offsetX, float offsetY, float velocityX=0.0f, float velocityY=0.0f, const std::string &name="")
 
 CAction (int actionID, const std::string &name, const CKey &key)
 
 CAction (int actionID, const std::string &name)
 
 CAction (const CAction &other)
 
CActionoperator= (const CAction &rhs)
 
int GetID () const
 Identifier of the action. More...
 
bool IsMouse () const
 Is this an action from the mouse. More...
 
bool IsGesture () const
 
const std::string & GetName () const
 Human-readable name of the action. More...
 
const std::string & GetText () const
 Text of the action if any. More...
 
void SetText (const std::string &text)
 Set the text payload of the action. More...
 
float GetAmount (unsigned int index=0) const
 Get an amount associated with this action. More...
 
void ClearAmount ()
 Reset all amount values to zero.
 
wchar_t GetUnicode () const
 Unicode value associated with this action. More...
 
unsigned int GetHoldTime () const
 Time in ms that the key has been held. More...
 
float GetRepeat () const
 Time since last repeat in ms. More...
 
unsigned int GetButtonCode () const
 Button code that triggered this action. More...
 
bool IsAnalog () const
 

Detailed Description

Class encapsulating information regarding a particular user action to be sent to windows and controls.

Member Function Documentation

◆ GetAmount()

float CAction::GetAmount ( unsigned int  index = 0) const
inline

Get an amount associated with this action.

Parameters
zero-basedindex of amount to retrieve, defaults to 0
Returns
an amount associated with this action

◆ GetButtonCode()

unsigned int CAction::GetButtonCode ( ) const
inline

Button code that triggered this action.

Returns
button code

◆ GetHoldTime()

unsigned int CAction::GetHoldTime ( ) const
inline

Time in ms that the key has been held.

Returns
time that the key has been held down in ms.

◆ GetID()

int CAction::GetID ( void  ) const
inline

Identifier of the action.

Returns
id of the action

◆ GetName()

const std::string& CAction::GetName ( ) const
inline

Human-readable name of the action.

Returns
name of the action

◆ GetRepeat()

float CAction::GetRepeat ( ) const
inline

Time since last repeat in ms.

Returns
time since last repeat in ms. Returns 0 if unknown.

◆ GetText()

const std::string& CAction::GetText ( ) const
inline

Text of the action if any.

Returns
text payload of this action.

◆ GetUnicode()

wchar_t CAction::GetUnicode ( ) const
inline

Unicode value associated with this action.

Returns
unicode value associated with this action, for keyboard input.

◆ IsMouse()

bool CAction::IsMouse ( ) const

Is this an action from the mouse.

Returns
true if this is a mouse action, false otherwise

◆ SetText()

void CAction::SetText ( const std::string &  text)
inline

Set the text payload of the action.

Parameters
textto be set

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