3ds Max C++ API Reference
ActionItem Class Referenceabstract

Represents an operation contained in an ActionTabls. More...

#include <actiontable.h>

+ Inheritance diagram for ActionItem:

Public Types

enum  IconSize {
  k16x16 , k24x24 , k30x30 , k32x32 ,
  k36x36 , k48x48 , kIconSizeCount
}
 Icon size parameter. More...
 
enum  ActionItemFps {
  kGetId , kIsVisible , kIsEnabled , kIsChecked ,
  kGetDescription , kGetCategory , kGetButtonText , kGetMenuText ,
  kHasIcon , kGetIconFileName , kGetIconIndex
}
 Function IDs for function published (Fps) methods and properties. More...
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

CoreExport ActionItem ()
 Constructor. More...
 
virtual CoreExport ~ActionItem ()
 Destructor. More...
 
virtual int GetId ()=0
 Retrieves a unique identifier for the action. More...
 
virtual BOOL ExecuteAction ()=0
 Executes the operation associated with the action item. More...
 
virtual CoreExport void EmitMacro ()
 Called by 3ds Max to allow the ActionItem to customize macroRecorder output for this action. More...
 
CoreExport BOOL Execute ()
 Calls ExecuteAction() and handles macro recording etc. More...
 
virtual void GetButtonText (MSTR &buttonText)=0
 Retrieves the text that will be used when the ActionItem is on a text button. More...
 
virtual void GetMenuText (MSTR &menuText)=0
 Retrieves the text to use when the item is on a menu (either Quad menu or main menu bar). More...
 
virtual void GetDescriptionText (MSTR &descText)=0
 Retrieves the text that will be used for tool tips and menu help. More...
 
virtual void GetCategoryText (MSTR &catText)=0
 Retrieves the text for the category of the operation. More...
 
virtual BOOL IsChecked ()=0
 Returns whether a menu item is in a checked state, or if a button is in a pressed state. More...
 
virtual BOOL IsIndeterminate ()
 Returns whether an item is in an indeterminate state This is an optional state that can be implemented when the state of the action can be both checked and unchecked. More...
 
virtual BOOL IsItemVisible ()=0
 Determines if an item is visible on a context menu. More...
 
virtual BOOL IsEnabled ()=0
 Determines if the operation is available to the user. More...
 
CoreExport MaxIconGetIcon ()
 Returns an icon associated with an ActionItem. More...
 
virtual void DeleteThis ()=0
 Called by 3ds Max to delete the ActionItem. More...
 
virtual CoreExport ActionTableGetTable ()
 Returns a pointer to the table that owns the ActionItem. More...
 
virtual CoreExport void SetTable (ActionTable *pTable)
 Sets the table that owns the item. More...
 
CoreExport const MCHARGetShortcutString ()
 Returns the string that describes all the keyboard shortcuts associated with the item. More...
 
virtual CoreExport MacroEntryGetMacroScript ()
 Returns the representation of the macroScript for the item, if it's implemented by a macroScript, it returns NULL otherwise. More...
 
virtual CoreExport BOOL IsDynamicMenu ()
 Determines if a menu is created or if an action takes place. More...
 
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. More...
 
virtual CoreExport IMenuGetDynamicMenu (HWND hwnd, IPoint2 &m)
 If the ActionItem does produce a menu, this method is called to return a pointer to the menu. More...
 
virtual CoreExport BOOL IsDynamicAction ()
 ActionItems that are deleted after they execute should return TRUE. More...
 
CoreExport BOOL HasIcon ()
 Returns TRUE if the ActionItem specifies an icon. More...
 
CoreExport bool GetIconFileName (MSTR &fileName)
 If the ActionItem specifies an icon, accesses the icon filename. More...
 
CoreExport int GetIconIndex ()
 If the ActionItem specifies an icon, returns the icon index. More...
 
CoreExport MSTR GetTooltipKey ()
 Get the Action's tooltip key. More...
 
CoreExport void SetTooltipKey (const MCHAR *tooltipKey)
 Set the Action's tooltip key. More...
 
CoreExport MaxSDK::Util::Path GetIconPath (IconSize size)
 Get the Action's path to the icon of size specified by param. More...
 
CoreExport void SetIconPath (IconSize size, const MaxSDK::Util::Path &path)
 Sets the Action's path to the icon of size specified by the input param. More...
 
CoreExport MSTR GetMetadata ()
 Gets the Action's metadata. More...
 
CoreExport void SetMetadata (const MCHAR *metadata)
 Sets the Action's metadata. More...
 
virtual CoreExport FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual CoreExport FPInterfaceDescGetDesc ()
 
virtual CoreExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual CoreExport Interface_ID GetID ()
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Protected Member Functions

 RO_PROP_FN (kGetId, GetId, TYPE_DWORD)
 
 RO_PROP_FN (kIsVisible, IsItemVisible, TYPE_BOOL)
 
 RO_PROP_FN (kIsEnabled, IsEnabled, TYPE_BOOL)
 
 RO_PROP_FN (kIsChecked, IsChecked, TYPE_BOOL)
 
 VFN_1 (kGetDescription, GetDescriptionText, TYPE_TSTR_BR)
 
 VFN_1 (kGetCategory, GetCategoryText, TYPE_TSTR_BR)
 
 VFN_1 (kGetButtonText, GetButtonText, TYPE_TSTR_BR)
 
 VFN_1 (kGetMenuText, GetMenuText, TYPE_TSTR_BR)
 
 FN_0 (kHasIcon, TYPE_BOOL, HasIcon)
 
 FN_1 (kGetIconFileName, TYPE_bool, GetIconFileName, TYPE_TSTR_BR)
 
 FN_0 (kGetIconIndex, TYPE_INDEX, GetIconIndex)
 
virtual CoreExport MaxIconGetIconImp ()
 Returns an icon associated with an ActionItem. More...
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Protected Attributes

ActionTablempTable
 Points to the table that owns the action. More...
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 

Detailed Description

Represents an operation contained in an ActionTabls.

ActionItem is an abstract class with operations to support various UI operations. The system provides a default implementation of this class that works when the table is built with the ActionTable::BuildActionTable() method. However, developers may want to specialize this class for more special-purpose applications. For example, MAXScript does this to export macroScripts to an ActionTable. Methods that are marked as internal should not be used.

Version
4.0
See also
Class ActionTable, Class ActionCallback, Structure ActionDescription, Class ActionContext, Class IActionManager, Class DynamicMenu, Class DynamicMenuCallback, Class MAXIcon, Class Interface, class FPMixinInterface

Member Enumeration Documentation

◆ IconSize

enum IconSize

Icon size parameter.

Enumerator
k16x16 

icon of size 16x16

k24x24 

icon of size 24x24

k30x30 

icon of size 30x30

k32x32 

icon of size 32x32

k36x36 

icon of size 36x36

k48x48 

icon of size 48x48

kIconSizeCount 
314  {
315  k16x16,
316  k24x24,
317  k30x30,
318  k32x32,
319  k36x36,
320  k48x48,
322  };
@ k30x30
icon of size 30x30
Definition: actiontable.h:317
@ k32x32
icon of size 32x32
Definition: actiontable.h:318
@ k36x36
icon of size 36x36
Definition: actiontable.h:319
@ kIconSizeCount
Definition: actiontable.h:321
@ k24x24
icon of size 24x24
Definition: actiontable.h:316
@ k48x48
icon of size 48x48
Definition: actiontable.h:320
@ k16x16
icon of size 16x16
Definition: actiontable.h:315

◆ ActionItemFps

Function IDs for function published (Fps) methods and properties.

Enumerator
kGetId 
kIsVisible 
kIsEnabled 
kIsChecked 
kGetDescription 
kGetCategory 
kGetButtonText 
kGetMenuText 
kHasIcon 
kGetIconFileName 
kGetIconIndex 
361  {
362  kGetId,
363  kIsVisible,
364  kIsEnabled,
365  kIsChecked,
367  kGetCategory,
369  kGetMenuText,
370  kHasIcon,
373  };
@ kGetMenuText
Definition: actiontable.h:369
@ kGetDescription
Definition: actiontable.h:366
@ kGetCategory
Definition: actiontable.h:367
@ kGetIconFileName
Definition: actiontable.h:371
@ kIsVisible
Definition: actiontable.h:363
@ kHasIcon
Definition: actiontable.h:370
@ kGetIconIndex
Definition: actiontable.h:372
@ kGetButtonText
Definition: actiontable.h:368
@ kGetId
Definition: actiontable.h:362
@ kIsChecked
Definition: actiontable.h:365
@ kIsEnabled
Definition: actiontable.h:364

Constructor & Destructor Documentation

◆ ActionItem()

Constructor.

◆ ~ActionItem()

virtual CoreExport ~ActionItem ( )
virtual

Destructor.

Member Function Documentation

◆ GetId()

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

◆ ExecuteAction()

virtual BOOL ExecuteAction ( )
pure 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.

◆ EmitMacro()

virtual CoreExport void EmitMacro ( )
virtual

Called by 3ds Max to allow the ActionItem to customize macroRecorder output for this action.

◆ Execute()

CoreExport BOOL Execute ( )

Calls ExecuteAction() and handles macro recording etc.

Called by 3ds Max.

◆ GetButtonText()

virtual void GetButtonText ( MSTR buttonText)
pure 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.

◆ GetMenuText()

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

◆ GetDescriptionText()

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

◆ GetCategoryText()

virtual void GetCategoryText ( MSTR catText)
pure 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.

◆ IsChecked()

virtual BOOL IsChecked ( )
pure 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

◆ IsIndeterminate()

virtual BOOL IsIndeterminate ( )
inlinevirtual

Returns whether an item is in an indeterminate state This is an optional state that can be implemented when the state of the action can be both checked and unchecked.

When implemented return TRUE if the condition of your action is both checked and unchecked. For instance an action that sets/displays the state of a multiple nodes frozen property when you have nodes that are both frozen and unfrozen this would return TRUE and instead of a check the action will display a dash. If this returns TRUE the isChecked state is ignored. NOTE actions with pushbutton icons will not display this state

Returns
TRUE if menu item is in an indeterminate state
190 {return FALSE;};

◆ IsItemVisible()

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

◆ IsEnabled()

virtual BOOL IsEnabled ( )
pure 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.

◆ GetIcon()

CoreExport MaxIcon* GetIcon ( )

Returns an icon associated with an ActionItem.

First checks the result of GetIconImp(), then looks at ActionTable::GetIcon(int). If both functions return NULL, then this action has no Icon associated with it.

Returns
Icon associated with this action.

◆ DeleteThis()

virtual void DeleteThis ( )
pure virtual

Called by 3ds Max to delete the ActionItem.

This normally happens when the table that owns it is deleted.

◆ GetTable()

virtual CoreExport ActionTable* GetTable ( )
virtual

Returns a pointer to the table that owns the ActionItem.

An item can only be owned by a single table.

Default Implementation
{ return mpTable; }
ActionTable * mpTable
Points to the table that owns the action.
Definition: actiontable.h:405

◆ SetTable()

virtual CoreExport void SetTable ( ActionTable pTable)
virtual

Sets the table that owns the item.

Used internally. May be used if you implement a custom sub-class of ActionItem.

Parameters
pTable- Points to the table to set.
Default Implementation:
{ mpTable = pTable; }

◆ GetShortcutString()

CoreExport const MCHAR* GetShortcutString ( )

Returns the string that describes all the keyboard shortcuts associated with the item.

This will look something like "Alt+A" or "C, Shift+Alt+Q".

Returns
NULL if no keyboard shortcut is associated with the item.

◆ GetMacroScript()

virtual CoreExport MacroEntry* GetMacroScript ( )
virtual

Returns the representation of the macroScript for the item, if it's implemented by a macroScript, it returns NULL otherwise.

Returns
A pointer to a MacroEntry
Default Implementation
{ return NULL; }
#define NULL
Definition: autoptr.h:18

◆ IsDynamicMenu()

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; }

◆ SetIsDynamicMenu()

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.

Note
Dynamic menus may be added to the quad menus procedurally (via the IMenuManager API) or 'manually'.

◆ GetDynamicMenu()

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; }

◆ IsDynamicAction()

virtual CoreExport BOOL IsDynamicAction ( )
virtual

ActionItems that are deleted after they execute should return TRUE.

◆ HasIcon()

CoreExport BOOL HasIcon ( )

Returns TRUE if the ActionItem specifies an icon.

◆ GetIconFileName()

CoreExport bool GetIconFileName ( MSTR fileName)

If the ActionItem specifies an icon, accesses the icon filename.

Parameters
fileName- If the ActionItem specifies an icon, then the icon filename is returned through this parameter.
Returns
true if the ActionItem specifies an icon, otherwise false.

◆ GetIconIndex()

CoreExport int GetIconIndex ( )

If the ActionItem specifies an icon, returns the icon index.

Returns
If the ActionItem specifies an icon then the icon index, otherwise -1.

◆ GetTooltipKey()

CoreExport MSTR GetTooltipKey ( )

Get the Action's tooltip key.

The tooltip key may be associated with a product tooltip. By default, the tooltip key is built as "actionTableID-actionID" for native actions and as "Category-MacroName" for macros.

Returns
a string with the tooltip key

◆ SetTooltipKey()

CoreExport void SetTooltipKey ( const MCHAR tooltipKey)

Set the Action's tooltip key.

The function does not verify if the key is unique or not.

tooltipKey - a string with the tooltip key

◆ GetIconPath()

CoreExport MaxSDK::Util::Path GetIconPath ( IconSize  size)

Get the Action's path to the icon of size specified by param.


This path can be relative to the Theme- specific Resources folder under the \UI folder, or it can be an absolute path.

Parameters
sizean enum specifying the icon path to get
Returns
The path to the icon of the size specified by the input parameter.

◆ SetIconPath()

CoreExport void SetIconPath ( IconSize  size,
const MaxSDK::Util::Path path 
)

Sets the Action's path to the icon of size specified by the input param.


This path can be relative to the Theme- specific Resources folder under the \UI folder, or it can be an absolute path.

Parameters
sizean enum specifying the icon path to set
pathThe path to the icon of the size specified by the input parameter.

◆ GetMetadata()

CoreExport MSTR GetMetadata ( )

Gets the Action's metadata.

Metadata format is a single string with a comma
separating each individual metadatum. Metadata is used in global search command to list similar command names in other software, etc

◆ SetMetadata()

CoreExport void SetMetadata ( const MCHAR metadata)

Sets the Action's metadata.


Parameters
metadataThe metadata

◆ GetDescByID()

virtual CoreExport FPInterfaceDesc* GetDescByID ( Interface_ID  id)
virtual
Remarks
This method is used to directly implement FPInterface::GetDesc() in your public virtual base mixin class, like this;

FPInterfaceDesc* GetDesc() { return GetDescByID(THIS_INTERFACE_ID); }

Then implement a GetDescByID() in the implementing class to avoid link export issues.
Parameters:
Interface_ID id

The unique interface ID by which to get the FPInterfaceDesc.
Default Implementation:
{ return &nullInterface; }

Reimplemented from FPMixinInterface.

◆ GetDesc()

virtual CoreExport FPInterfaceDesc* GetDesc ( )
virtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

◆ GetInterface()

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

◆ GetID()

virtual CoreExport Interface_ID GetID ( )
virtual
Remarks
This method overrides GetID() in those interfaces that do not publish metadata but instead have a unique Interface_ID for quick internal identification in implementation code that might be shared by a bunch of mixin interfaces.
Returns
The Interface_ID.
Default Implementation:
{ return GetDesc()->ID; }

Reimplemented from FPMixinInterface.

◆ RO_PROP_FN() [1/4]

RO_PROP_FN ( kGetId  ,
GetId  ,
TYPE_DWORD   
)
protected

◆ RO_PROP_FN() [2/4]

RO_PROP_FN ( kIsVisible  ,
IsItemVisible  ,
TYPE_BOOL   
)
protected

◆ RO_PROP_FN() [3/4]

RO_PROP_FN ( kIsEnabled  ,
IsEnabled  ,
TYPE_BOOL   
)
protected

◆ RO_PROP_FN() [4/4]

RO_PROP_FN ( kIsChecked  ,
IsChecked  ,
TYPE_BOOL   
)
protected

◆ VFN_1() [1/4]

VFN_1 ( kGetDescription  ,
GetDescriptionText  ,
TYPE_TSTR_BR   
)
protected

◆ VFN_1() [2/4]

VFN_1 ( kGetCategory  ,
GetCategoryText  ,
TYPE_TSTR_BR   
)
protected

◆ VFN_1() [3/4]

VFN_1 ( kGetButtonText  ,
GetButtonText  ,
TYPE_TSTR_BR   
)
protected

◆ VFN_1() [4/4]

VFN_1 ( kGetMenuText  ,
GetMenuText  ,
TYPE_TSTR_BR   
)
protected

◆ FN_0() [1/2]

FN_0 ( kHasIcon  ,
TYPE_BOOL  ,
HasIcon   
)
protected

◆ FN_1()

FN_1 ( kGetIconFileName  ,
TYPE_bool  ,
GetIconFileName  ,
TYPE_TSTR_BR   
)
protected

◆ FN_0() [2/2]

FN_0 ( kGetIconIndex  ,
TYPE_INDEX  ,
GetIconIndex   
)
protected

◆ GetIconImp()

virtual CoreExport MaxIcon* GetIconImp ( )
protectedvirtual

Returns an icon associated with an ActionItem.

To supply a custom icon for an action item, override this method and supply a custom implementation. Default implementation: returns NULL

Returns
Icon for this action, or NULL if not specified by implementing class.

Member Data Documentation

◆ mpTable

ActionTable* mpTable
protected

Points to the table that owns the action.

Note
This does not 'own' the memory for the ActionTable pointer