mudbox::Action Class Reference

#include <interface.h>

Inheritance diagram for mudbox::Action:

Inheritance graph
[legend]
List of all members.

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.


Public Types

enum   Hotkeys {
  keyAlt = 0x00010000, keyShift = 0x00020000, keyCtrl = 0x00040000, keyMeta = 0x00080000,
  keyLMB = 0x00000100, keyMMB = 0x00000200, keyRMB = 0x00000400, keyWheel = 0x00000800,
  keyLeft = 0x01000012, keyUp = 0x01000013, keyRight = 0x01000014, keyDown = 0x01000015
}

Public Member Functions

virtual const mudbox::ClassDesc RuntimeClass (void) const
  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: leyCtrl+'J'.
virtual bool  IsSticky (void) const
  Returns true if the action is sticky, i.e. can be activated independently from other actions.
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.

Static Public Member Functions

const mudbox::ClassDesc StaticClass (void)
mudbox::Node CreateInstances (unsigned int iCount=1)

Member Enumeration Documentation

enum mudbox::Action::Hotkeys
 
Enumeration values:
keyAlt 
keyShift  value for the alt key, can be used as a modifier
keyCtrl  value for the shift key, can be used as a modifier
keyMeta  value for the ctrl key, can be used as a modifier
keyLMB 
keyMMB  value for the left mouse button
keyRMB  value for the middle mouse button
keyWheel  value for the right mouse button
keyLeft  value for the mouse wheel
keyUp  value for the left cursor button
keyRight  value for the up cursor button
keyDown  value for the right cursor button
00058         {
00059             keyAlt = 0x00010000,        
00060             keyShift = 0x00020000,  
00061             keyCtrl = 0x00040000,   
00062             keyMeta = 0x00080000,
00063             keyLMB = 0x00000100,    
00064             keyMMB   = 0x00000200,  
00065             keyRMB = 0x00000400,    
00066             keyWheel = 0x00000800,
00067             keyLeft = 0x01000012,   
00068             keyUp = 0x01000013,     
00069             keyRight = 0x01000014,  
00070             keyDown = 0x01000015    
00071         };

Constructor & Destructor Documentation

mudbox::Action::Action void   ) 
 
mudbox::Action::~Action void   ) 
 

Member Function Documentation

virtual const mudbox::ClassDesc* mudbox::Action::RuntimeClass void   )  const [inline, virtual]
 

Reimplemented from mudbox::Node.

00058 {
const mudbox::ClassDesc* mudbox::Action::StaticClass void   )  [static]
 

Reimplemented from mudbox::Node.

mudbox::Node* mudbox::Action::CreateInstances unsigned int  iCount = 1  )  [static]
 

Reimplemented from mudbox::Node.

virtual int mudbox::Action::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: leyCtrl+'J'.

virtual bool mudbox::Action::IsSticky void   )  const [virtual]
 

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

virtual void mudbox::Action::OnActivate bool  bRepeat  )  [virtual]
 

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

Parameters:
bRepeat  [in] True if the Activation is not the initial, but is a result of a repeated keypress.
virtual void mudbox::Action::OnDeactivate void   )  [virtual]
 

Called when the action is deactivated, i.e. the user released the hotkey.

virtual void mudbox::Action::OnCursorMove float  fXPosition,
float  fYPosition,
float  fXChange,
float  fYChange
[virtual]
 

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

Parameters:
fXPosition  [in] Horizontal position of the cursor on the screen, between 0-1 (0 means the very left)
fYPosition  [in] Vertical position of the cursor on the screen, between 0-1 (0 means top of the screen)
fXChange  [in] Horizontal change of the cursor position.
fYChange  [in] Vertical change of the cursor position.
virtual void mudbox::Action::OnOptions void   )  [virtual]
 

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


mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action
mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action mudbox::Action