This reference page is linked to from the following overview topics: Classes Involved in the Action System, Building Action Tables, Action Interfaces.
Manages a set of ActionTables, ActionCallbacks and ActionContext.
The manager handles the keyboard accelerator tables for each ActionTable as well. You can get a pointer to a class implementing this interface using Interface::GetActionManager().
#include <actiontable.h>
Public Member Functions |
|
virtual void | RegisterActionTable (ActionTable *pTable)=0 |
Register an action table with the manager.
|
|
virtual int | NumActionTables ()=0 |
Returns the number of ActionTables. |
|
virtual ActionTable * | GetTable (int i)=0 |
Returns a pointer to the nth
ActionTable. |
|
virtual int | ActivateActionTable (ActionCallback *pCallback, ActionTableId id)=0 |
Activate the action table. |
|
virtual int | DeactivateActionTable (ActionCallback *pCallback, ActionTableId id)=0 |
Deactivates the action table. |
|
virtual ActionTable * | FindTable (ActionTableId id)=0 |
Returns a pointer to an action table.
|
|
virtual BOOL | GetShortcutString (ActionTableId tableId, int commandId, MCHAR *buf)=0 |
Retrieves the string that describes the
keyboard shortcut for the specified ActionItem.
|
|
virtual BOOL | GetActionDescription (ActionTableId tableId, int commandId, MCHAR *buf)=0 |
Retrieves a string that descibes the
specified operation from the action table whose ID is passed.
|
|
virtual BOOL | RegisterActionContext (ActionContextId contextId, MCHAR *pName)=0 |
Registers an action context. |
|
virtual int | NumActionContexts ()=0 |
Returns the number of ActionContexts.
|
|
virtual ActionContext * | GetActionContext (int i)=0 |
Returns a pointer to the nth
ActionContext. |
|
virtual ActionContext * | FindContext (ActionContextId contextId)=0 |
Returns a pointer to the specified
ActionContext. |
|
virtual BOOL | IsContextActive (ActionContextId contextId)=0 |
Checks if an
ActionContext is active or not. |
|
Internal Methods |
|
enum | ActionManagerFps
{ executeAction, saveKeyboardFile, loadKeyboardFile, getKeyboardFile, numActionTables, getActionTable, getActionContext } |
IDs for function published (Fps) methods and properties. More... |
|
virtual MCHAR * | GetShortcutFile ()=0 |
virtual MCHAR * | GetShortcutDir ()=0 |
virtual int | IdToIndex (ActionTableId id)=0 |
virtual void | SaveAllContextsToINI ()=0 |
virtual int | MakeActionSetCurrent (MCHAR *pDir, MCHAR *pFile)=0 |
virtual int | LoadAccelConfig (LPACCEL *accel, int *cts, ActionTableId tableId=-1, BOOL forceDefault=FALSE)=0 |
virtual int | SaveAccelConfig (LPACCEL *accel, int *cts)=0 |
virtual int | GetCurrentActionSet (MCHAR *buf)=0 |
virtual BOOL | SaveKeyboardFile (MCHAR *pFileName)=0 |
virtual BOOL | LoadKeyboardFile (MCHAR *pFileName)=0 |
virtual MCHAR * | GetKeyboardFile ()=0 |
enum ActionManagerFps |
IDs for function published (Fps) methods and properties.
executeAction | |
saveKeyboardFile | |
loadKeyboardFile | |
getKeyboardFile | |
numActionTables | |
getActionTable | |
getActionContext |
{ executeAction, #ifndef NO_CUI // russom - 02/12/02 saveKeyboardFile, loadKeyboardFile, getKeyboardFile, #endif // NO_CUI numActionTables, getActionTable, getActionContext, };
virtual void RegisterActionTable | ( | ActionTable * | pTable | ) | [pure virtual] |
Register an action table with the manager.
Note that plug-ins that expose their action tables via their ClassDesc::NumActionTables() method. do not need to register their action tables explicitely, as 3ds Max will do it for them. Also note that plug-ins do not need to unregister or destroy their action tables and action items, as 3ds Max will take care of this when it shuts down. Also note that an action table needs to be activated once registered. For more information see IActionManager::ActivateActionTable() See ClassDesc Action Table Methods.
pTable | Points to the Action Table to register. |
virtual int NumActionTables | ( | ) | [pure virtual] |
Returns the number of ActionTables.
virtual ActionTable* GetTable | ( | int | i | ) | [pure virtual] |
Returns a pointer to the nth ActionTable.
i | The zero based index of the table. |
virtual int ActivateActionTable | ( | ActionCallback * | pCallback, |
ActionTableId | id | ||
) | [pure virtual] |
Activate the action table.
Action tables need to be activated by their owners. Some plug-ins (for instance Modifiers or Geometric Objects) may only want to activate the table when they are being edited in the command panel (between BeginEditParams() and EndEditParams()). Others, for instance Global Utility Plug-ins, may wish to do so when they are initially loaded so the actions are always available. Note that if this method is called multiple times, only the callback from the last call will be used.
pCallback | Points to the callback object which is responsible for executing the action. |
id | This is the ID of the table to activate. |
virtual int DeactivateActionTable | ( | ActionCallback * | pCallback, |
ActionTableId | id | ||
) | [pure virtual] |
Deactivates the action table.
After the table is deactivated (for example in EndEditParams()) the callback object can be deleted. Tables are initially active, please do not call this method without a preceding call to ActivateActionTable().
pCallback | Points to the callback object responsible for executing the action. Pass the same callback that was originally passed to ActivateActionTable() and do not set this to NULL. |
id | The ID of the table to deactivate. |
virtual ActionTable* FindTable | ( | ActionTableId | id | ) | [pure virtual] |
Returns a pointer to an action table.
id | The ID of the table to find. |
virtual BOOL GetShortcutString | ( | ActionTableId | tableId, |
int | commandId, | ||
MCHAR * | buf | ||
) | [pure virtual] |
Retrieves the string that describes the keyboard shortcut for the specified ActionItem.
tableId | The ID of the action table. | |
commandId | The ID of the command for the action. | |
[out] | buf | String to contain the retrieved text. |
virtual BOOL GetActionDescription | ( | ActionTableId | tableId, |
int | commandId, | ||
MCHAR * | buf | ||
) | [pure virtual] |
Retrieves a string that descibes the specified operation from the action table whose ID is passed.
tableId | The ID of the action table. |
commandId | The ID of the command. |
MCHAR* | buf Points to storage for the description string. |
virtual BOOL RegisterActionContext | ( | ActionContextId | contextId, |
MCHAR * | pName | ||
) | [pure virtual] |
Registers an action context.
This is called when you create the action table that uses this context.
contextId | The context ID. |
pName | The name for the action context. |
virtual int NumActionContexts | ( | ) | [pure virtual] |
Returns the number of ActionContexts.
virtual ActionContext* GetActionContext | ( | int | i | ) | [pure virtual] |
Returns a pointer to the nth ActionContext.
i | The zero based index of the ActionContext. |
virtual ActionContext* FindContext | ( | ActionContextId | contextId | ) | [pure virtual] |
Returns a pointer to the specified ActionContext.
contextId | The ID of the context to find |
virtual BOOL IsContextActive | ( | ActionContextId | contextId | ) | [pure virtual] |
Checks if an ActionContext is active or not.
contextId | Specifies the context to check. |
virtual MCHAR* GetShortcutFile | ( | ) | [pure virtual] |
virtual MCHAR* GetShortcutDir | ( | ) | [pure virtual] |
virtual int IdToIndex | ( | ActionTableId | id | ) | [pure virtual] |
virtual void SaveAllContextsToINI | ( | ) | [pure virtual] |
virtual int MakeActionSetCurrent | ( | MCHAR * | pDir, |
MCHAR * | pFile | ||
) | [pure virtual] |
virtual int LoadAccelConfig | ( | LPACCEL * | accel, |
int * | cts, | ||
ActionTableId | tableId = -1 , |
||
BOOL | forceDefault =
FALSE |
||
) | [pure virtual] |
virtual int SaveAccelConfig | ( | LPACCEL * | accel, |
int * | cts | ||
) | [pure virtual] |
virtual int GetCurrentActionSet | ( | MCHAR * | buf | ) | [pure virtual] |
virtual BOOL SaveKeyboardFile | ( | MCHAR * | pFileName | ) | [pure virtual] |
virtual BOOL LoadKeyboardFile | ( | MCHAR * | pFileName | ) | [pure virtual] |
virtual MCHAR* GetKeyboardFile | ( | ) | [pure virtual] |