ActionItemStandin Class Reference
 
 
 
ActionItemStandin Class Reference

#include <actiontable.h>

Inheritance diagram for ActionItemStandin:
ActionItem IActionItemStandin FPMixinInterface BaseInterface FPInterface InterfaceServer BaseInterface MaxHeapOperators InterfaceServer MaxHeapOperators

Class Description

Deprecated:
To be removed from the SDK.

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 const MCHAR *  GetDescription ()
virtual CoreExport void  SetDescription (const MCHAR *pDesc)
virtual CoreExport const MCHAR *  GetShortName ()
virtual CoreExport void  SetShortName (const MCHAR *pShortName)
virtual CoreExport const MCHAR *  GetCategory ()
virtual CoreExport void  SetCategory (const MCHAR *pCategory)
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

Constructor & Destructor Documentation

CoreExport ActionItemStandin ( int  cmdId )
virtual CoreExport ~ActionItemStandin ( ) [virtual]

Member Function Documentation

virtual CoreExport int GetId ( ) [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.

virtual CoreExport void SetId ( int  id ) [virtual]
virtual CoreExport const MCHAR* GetDescription ( ) [virtual]
virtual CoreExport void SetDescription ( const MCHAR *  pDesc ) [virtual]
virtual CoreExport const MCHAR* GetShortName ( ) [virtual]
virtual CoreExport void SetShortName ( const MCHAR *  pShortName ) [virtual]
virtual CoreExport const MCHAR* GetCategory ( ) [virtual]
virtual CoreExport void SetCategory ( const MCHAR *  pCategory ) [virtual]
virtual CoreExport BOOL ExecuteAction ( ) [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.

Returns:
TRUE if the action is executed; otherwise FALSE.

Implements ActionItem.

virtual CoreExport void GetButtonText ( MSTR buttonText ) [virtual]

Retrieves the text that will be used when the ActionItem is on a text button.

The text is stored into the buttonText parameter.

Parameters:
[out] buttonText - The retrieved text.

Implements ActionItem.

virtual CoreExport void GetMenuText ( MSTR menuText ) [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.

Parameters:
[out] menuText - The retrieved text.

Implements ActionItem.

virtual CoreExport void GetDescriptionText ( MSTR descText ) [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.

Parameters:
[out] descText - The retrieved text.

Implements ActionItem.

virtual CoreExport void GetCategoryText ( MSTR catText ) [virtual]

Retrieves the text for the category of the operation.

This is used in the customization dialog to fill the "category" drop-down list.

Parameters:
[out] catText - The retrieved text.

Implements ActionItem.

virtual CoreExport BOOL IsChecked ( ) [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).

Returns:
TRUE if menu item is checked, or if a button is 'pressed'. FALSE otherwise

Implements ActionItem.

virtual CoreExport BOOL IsItemVisible ( ) [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.

virtual CoreExport BOOL IsEnabled ( ) [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)

Returns:
TRUE for enabled; FALSE for disabled.

Implements ActionItem.

virtual CoreExport BOOL IsDynamicMenu ( ) [virtual]

Determines if a menu is created or if an action takes place.

Returns:
If this method returns TRUE, then the ActionItem creates a menu. If it returns FALSE then an action is performed.
Default Implementation
        { return FALSE; }

Reimplemented from ActionItem.

virtual CoreExport void SetIsDynamicMenu ( ) [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.

virtual CoreExport IMenu* GetDynamicMenu ( HWND  hwnd,
IPoint2 m 
) [virtual]

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.

Parameters:
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.
Returns:
A pointer to the menu.
Default Implementation:
        { return NULL; }

Reimplemented from ActionItem.

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]
Remarks:
Returns a pointer to the interface whose ID is specified.
Parameters:
Interface_ID id

The ID of the interface to return.
Default Implementation:
{ return NULL; }

Reimplemented from ActionItem.

virtual CoreExport void SetPersistentActionId ( MSTR  idString ) [virtual]
virtual CoreExport MSTR& GetPersistentActionId ( ) [virtual]
virtual CoreExport void SetActionTableId ( ActionTableId  id ) [virtual]
virtual CoreExport ActionTableId GetActionTableId ( ) [virtual]
virtual CoreExport MSTR& GetPrefixString ( ) [virtual]

Member Data Documentation