#include <actiontable.h>
Public Member Functions |
|
CoreExport | ActionItemStandin (int cmdId) |
virtual CoreExport | ~ActionItemStandin () |
virtual CoreExport int | GetId () |
Retrieves a unique identifier for the
action. |
|
virtual CoreExport void | SetId (int id) |
virtual CoreExport MCHAR * | GetDescription () |
virtual CoreExport void | SetDescription (MCHAR *pDesc) |
virtual CoreExport MCHAR * | GetShortName () |
virtual CoreExport void | SetShortName (MCHAR *pShortName) |
virtual CoreExport MCHAR * | GetCategory () |
virtual CoreExport void | SetCategory (MCHAR *pCategory) |
virtual CoreExport MaxIcon * | GetIcon () |
Returns an icon associated with an ActionItem.
|
|
virtual CoreExport BOOL | ExecuteAction () |
Executes the operation associated with the
action item. |
|
virtual CoreExport void | GetButtonText (MSTR &buttonText) |
Retrieves the text that will be used when
the ActionItem
is on a text button. |
|
virtual CoreExport void | GetMenuText (MSTR &menuText) |
Retrieves the text to use when the item is
on a menu (either Quad menu or main menu bar). |
|
virtual CoreExport void | GetDescriptionText (MSTR &descText) |
Retrieves the text that will be used for
tool tips and menu help. |
|
virtual CoreExport void | GetCategoryText (MSTR &catText) |
Retrieves the text for the category of the
operation. |
|
virtual CoreExport BOOL | IsChecked () |
Returns whether a menu item is in a checked
state, or if a button is in a pressed state. |
|
virtual CoreExport BOOL | IsItemVisible () |
Determines if an item is visible on a
context menu. |
|
virtual CoreExport BOOL | IsEnabled () |
Determines if the operation is available to
the user. |
|
virtual CoreExport BOOL | IsDynamicMenu () |
Determines if a menu is created or if an
action takes place. |
|
virtual CoreExport void | SetIsDynamicMenu () |
This method may be called after an action
item is created to tell the system that it is a dynamic menu
action. |
|
virtual CoreExport IMenu * | GetDynamicMenu (HWND hwnd, IPoint2 &m) |
If the ActionItem
does produce a menu, this method is called to return a pointer to
the menu. |
|
CoreExport void | DeleteThis () |
Called by 3ds Max to delete the ActionItem.
|
|
virtual CoreExport BaseInterface * | GetInterface (Interface_ID id) |
virtual CoreExport void | SetPersistentActionId (MSTR idString) |
virtual CoreExport MSTR & | GetPersistentActionId () |
virtual CoreExport void | SetActionTableId (ActionTableId id) |
virtual CoreExport ActionTableId | GetActionTableId () |
virtual CoreExport MSTR & | GetPrefixString () |
Protected Attributes |
|
int | mCmdId |
MSTR | mName |
MSTR | mPersistentActionId |
MSTR | mPrefix |
ActionTableId | mId |
CoreExport ActionItemStandin | ( | int | cmdId | ) |
virtual CoreExport ~ActionItemStandin | ( | ) | [virtual] |
virtual CoreExport int GetId | ( | ) | [inline, virtual] |
Retrieves a unique identifier for the action.
This action must be unique in the table, but not does not have to be unique between tables.
Implements ActionItem.
{ return mCmdId; }
virtual CoreExport void SetId | ( | int | id | ) | [inline, virtual] |
{ mCmdId = id; }
virtual CoreExport MCHAR* GetDescription | ( | ) | [inline, virtual] |
virtual CoreExport void SetDescription | ( | MCHAR * | pDesc | ) | [inline, virtual] |
{ mName = pDesc; }
virtual CoreExport MCHAR* GetShortName | ( | ) | [inline, virtual] |
virtual CoreExport void SetShortName | ( | MCHAR * | pShortName | ) | [inline, virtual] |
{ mName = pShortName; }
virtual CoreExport MCHAR* GetCategory | ( | ) | [inline, virtual] |
virtual CoreExport void SetCategory | ( | MCHAR * | pCategory | ) | [inline, virtual] |
{ mName = pCategory; }
virtual CoreExport MaxIcon* GetIcon | ( | ) | [inline, virtual] |
Returns an icon associated with an ActionItem.
If an icon is available for the ActionItem, then you should override this function to return or else returns NULL. The icon is used on CUI buttons, and in the list of operations in the customization dialogs.
Implements ActionItem.
{ return NULL; };
virtual CoreExport BOOL ExecuteAction | ( | ) | [inline, virtual] |
Executes the operation associated with the action item.
This returns a BOOL that indicates if the action was actually executed. If the item is disabled, or if the table that owns it is not activated, then it won't execute, and returns FALSE.
Implements ActionItem.
{ return FALSE; };
virtual CoreExport void GetButtonText | ( | MSTR & | buttonText | ) | [inline, virtual] |
Retrieves the text that will be used when the ActionItem is on a text button.
The text is stored into the buttonText parameter.
[out] | buttonText | - The retrieved text. |
Implements ActionItem.
{ buttonText = mName; };
virtual CoreExport void GetMenuText | ( | MSTR & | menuText | ) | [inline, virtual] |
Retrieves the text to use when the item is on a menu (either Quad menu or main menu bar).
This can be different from the button text. This method is called just before the menu is displayed, so it can update the text at that time. For example, the "Undo" menu item in 3ds Max's main menu adds the name of the command that will be undone.
[out] | menuText | - The retrieved text. |
Implements ActionItem.
{ menuText = mName; };
virtual CoreExport void GetDescriptionText | ( | MSTR & | descText | ) | [inline, virtual] |
Retrieves the text that will be used for tool tips and menu help.
This is also the string that is displayed for the operation in all the lists in the customization dialogs.
[out] | descText | - The retrieved text. |
Implements ActionItem.
{ descText = mName; };
virtual CoreExport void GetCategoryText | ( | MSTR & | catText | ) | [inline, virtual] |
Retrieves the text for the category of the operation.
This is used in the customization dialog to fill the "category" drop-down list.
[out] | catText | - The retrieved text. |
Implements ActionItem.
{ catText = mName; };
virtual CoreExport BOOL IsChecked | ( | ) | [inline, virtual] |
Returns whether a menu item is in a checked state, or if a button is in a pressed state.
For menus, this means that this function will return TRUE if a check mark appears next to the item. If the item is on a button, this is used to determine of the button is in the "Pressed" state. Note that button states are automatically updated on selection change and command mode changes. If your plug-in performs an operation that requires the CUI buttons to be redrawn, you need to call the method CUIFrameMgr::SetMacroButtonStates(TRUE).
Implements ActionItem.
{ return FALSE; };
virtual CoreExport BOOL IsItemVisible | ( | ) | [inline, virtual] |
Determines if an item is visible on a context menu.
If it returns FALSE, then the item is not included in the menu. This can be used to create items that a context sensitive. For example, you may want an item to appear on a menu only when the selected object is of a particular type. To do this, you have this method check the class id of the current selection.
Implements ActionItem.
{ return TRUE; };
virtual CoreExport BOOL IsEnabled | ( | ) | [inline, virtual] |
Determines if the operation is available to the user.
If this method returns FALSE, and the ActionItem it is on a menu, or button, the item is grayed out. If it assigned to a keyboard shortcut, then it will not execute the operation if invoked. If your plugin performs an operation that requires the CUI buttons to be redrawn, you need to call the method CUIFrameMgr::SetMacroButtonStates(TRUE)
Implements ActionItem.
{ return FALSE; };
virtual CoreExport BOOL IsDynamicMenu | ( | ) | [inline, virtual] |
Determines if a menu is created or if an action takes place.
{ return FALSE; }
Reimplemented from ActionItem.
{ return FALSE; }
virtual CoreExport void SetIsDynamicMenu | ( | ) | [inline, virtual] |
This method may be called after an action item is created to tell the system that it is a dynamic menu action.
Dynamic menus may be added to the quad menus procedurally (via the IMenuManager API) or 'manually'.
Reimplemented from ActionItem.
{ };
If the ActionItem does produce a menu, this method is called to return a pointer to the menu.
See class DynamicMenu for an easy way to produce these menus.
HWND | hwnd - If the menu is requested by a right-click quad menu, then this hwnd is the handle of the window where the click occurred. If the item is used from a menu bar, this hwnd will be NULL. |
m | - If the menu is requested by a right-click quad menu, then this parameter is the point in the window where the user clicked. |
{ return NULL; }
Reimplemented from ActionItem.
{ return NULL; };
CoreExport void DeleteThis | ( | ) | [virtual] |
Called by 3ds Max to delete the ActionItem.
This normally happens when the table that owns it is deleted.
Implements ActionItem.
virtual CoreExport BaseInterface* GetInterface | ( | Interface_ID | id | ) | [virtual] |
Reimplemented from ActionItem.
virtual CoreExport void SetPersistentActionId | ( | MSTR | idString | ) | [virtual] |
Implements IActionItemStandin.
virtual CoreExport MSTR& GetPersistentActionId | ( | ) | [inline, virtual] |
virtual CoreExport void SetActionTableId | ( | ActionTableId | id | ) | [inline, virtual] |
virtual CoreExport ActionTableId GetActionTableId | ( | ) | [inline, virtual] |
virtual CoreExport MSTR& GetPrefixString | ( | ) | [inline, virtual] |
int mCmdId
[protected] |
MSTR
mPersistentActionId
[protected] |
ActionTableId mId
[protected] |