- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# Action Class Reference

Search for all occurrences

## Detailed Description

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 348 of file interface.h.

`#include <interface.h>`

Inheritance diagram for Action:
[legend]

List of all members.

## 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.

## Constructor & Destructor Documentation

Action | ( | void |  | ) |

~Action | ( | void |  | ) |

## Member Function Documentation

virtual int DefaultHotkey | ( | void |  | ) | const `[virtual]`

Search for all occurrences

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]`

Search for all occurrences

Returns true if the action is sticky, i.e. can be activated independently from other actions.

virtual bool IsHide | ( | void |  | ) | const `[virtual]`

Search for all occurrences

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]`

Search for all occurrences

Returns true if the action is enabled else false.

virtual void SetEnabled | ( | bool | bEnabled | ) | `[virtual]`

Search for all occurrences

Set the enable status.

virtual void OnActivate | ( | bool | bRepeat | ) | `[virtual]`

Search for all occurrences

This function is called when the action is activated, i.e. when the user pressed the hotkey.

Parameters:

  [in] | bRepeat | True if the Activation is not the initial, but is a result of a repeated keypress.

virtual void OnDeactivate | ( | void |  | ) | `[virtual]`

Search for all occurrences

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]`

Search for all occurrences

Called when the cursor is moved by the user while the action is active.

Parameters:

  [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]`

Search for all occurrences

Called when the user requested to set options for this action.

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

- Mudbox/interface.h

Action Action Action Action Action Action Action Action Action Action
Action Action Action Action Action Action Action Action Action Action