This class represents an action which can be triggered by the user.
The action with it's current name will appear in the hotkey dialog, where users can change the hotkey for the action. When the users press the hotkey, the OnActivate function will be called for the object.
Definition at line 68 of file interface.h.
#include <interface.h>
Public Member Functions |
|
Action (void) | |
~Action (void) | |
virtual int | DefaultHotkey (void) const |
This function should return the default
hotkey for the action, which can be a combination of more than one
values. For example: keyCtrl+'J'. |
|
virtual bool | IsSticky (void) const |
Returns true if the action is sticky, i.e.
can be activated independently from other actions. |
|
virtual bool | IsHide (void) const |
Returns true if the action is hide in hotkey
dialog, i.e. only add the action in Marking Menus. |
|
virtual bool | IsEnabled (void) const |
Returns true if the action is enabled else
false. |
|
virtual void | SetEnabled (bool bEnabled) |
Set the enable status. |
|
virtual void | OnActivate (bool bRepeat) |
This function is called when the action is
activated, i.e. when the user pressed the hotkey. |
|
virtual void | OnDeactivate (void) |
Called when the action is deactivated, i.e.
the user released the hotkey. |
|
virtual void | OnCursorMove (float fXPosition, float fYPosition, float fXChange, float fYChange) |
Called when the cursor is moved by the user
while the action is active. |
|
virtual void | OnOptions (void) |
Called when the user requested to set
options for this action. |
Action | ( | void | ) |
~Action | ( | void | ) |
virtual int DefaultHotkey | ( | void | ) | const [virtual] |
This function should return the default hotkey for the action, which can be a combination of more than one values. For example: keyCtrl+'J'.
virtual bool IsSticky | ( | void | ) | const [virtual] |
Returns true if the action is sticky, i.e. can be activated independently from other actions.
virtual bool IsHide | ( | void | ) | const [virtual] |
Returns true if the action is hide in hotkey dialog, i.e. only add the action in Marking Menus.
virtual bool IsEnabled | ( | void | ) | const [virtual] |
Returns true if the action is enabled else false.
virtual void SetEnabled | ( | bool | bEnabled | ) | [virtual] |
Set the enable status.
virtual void OnActivate | ( | bool | bRepeat | ) | [virtual] |
This function is called when the action is activated, i.e. when the user pressed the hotkey.
[in] | bRepeat | True if the Activation is not the initial, but is a result of a repeated keypress. |
virtual void OnDeactivate | ( | void | ) | [virtual] |
Called when the action is deactivated, i.e. the user released the hotkey.
virtual void OnCursorMove | ( | float | fXPosition, |
float | fYPosition, | ||
float | fXChange, | ||
float | fYChange | ||
) | [virtual] |
Called when the cursor is moved by the user while the action is active.
[in] | fXPosition | Horizontal position of the cursor on the screen, between 0-1 (0 means the very left) |
[in] | fYPosition | Vertical position of the cursor on the screen, between 0-1 (0 means top of the screen) |
[in] | fXChange | Horizontal change of the cursor position. |
[in] | fYChange | Vertical change of the cursor position. |
virtual void OnOptions | ( | void | ) | [virtual] |
Called when the user requested to set options for this action.