3ds Max C++ API Reference
Loading...
Searching...
No Matches
ActionCallback Class Reference

3ds Max uses the ExecuteAction() method of an instance of this class when an ActionItem is executed. More...

#include <actiontable_REMOTE_92.h>

+ Inheritance diagram for ActionCallback:

Public Member Functions

CoreExport ActionCallback ()
 Constructor.
 
virtual CoreExport ~ActionCallback ()
 Virtual destructor.
 
virtual CoreExport BOOL ExecuteAction (int id)
 Called by 3ds Max to execute the operation associated with an action item.
 
virtual CoreExport IMenuGetDynamicMenu (int id, HWND hwnd, IPoint2 &m)
 Called by 3ds Max if an action item declares itself as a dynamic menu.
 
CoreExport ActionTableGetTable ()
 Returns a pointer to the ActionTable the callback uses.
 
CoreExport void SetTable (ActionTable *pTable)
 Sets the ActionTable the callback uses.
 
CoreExport ActionCallback ()
 Constructor.
 
virtual CoreExport ~ActionCallback ()
 Virtual destructor.
 
virtual CoreExport BOOL ExecuteAction (int id)
 Called by 3ds Max to execute the operation associated with an action item.
 
 __declspec (deprecated) virtual IMenu *GetDynamicMenu(int
 
virtual CoreExport void PopulateDynamicMenu (MaxSDK::CUI::ICuiDynamicMenu *dynMenu, int actionId, HWND hWnd, const IPoint2 &cursorPos)
 If the ActionItem does produce a dynamic menu (i.e.
 
virtual CoreExport void DynamicMenuItemSelected (int actionId, int itemId)
 If the ActionItem does produce a dynamic menu (i.e.
 
CoreExport ActionTableGetTable ()
 Returns a pointer to the ActionTable the callback uses.
 
CoreExport void SetTable (ActionTable *pTable)
 Sets the ActionTable the callback uses.
 
CoreExport ActionCallback ()
 Constructor.
 
virtual CoreExport ~ActionCallback ()
 Virtual destructor.
 
virtual CoreExport BOOL ExecuteAction (int id)
 Called by 3ds Max to execute the operation associated with an action item.
 
virtual CoreExport IMenuGetDynamicMenu (int id, HWND hwnd, IPoint2 &m)
 Called by 3ds Max if an action item declares itself as a dynamic menu.
 
CoreExport ActionTableGetTable ()
 Returns a pointer to the ActionTable the callback uses.
 
CoreExport void SetTable (ActionTable *pTable)
 Sets the ActionTable the callback uses.
 
CoreExport ActionCallback ()
 Constructor.
 
virtual CoreExport ~ActionCallback ()
 Virtual destructor.
 
virtual CoreExport BOOL ExecuteAction (int id)
 Called by 3ds Max to execute the operation associated with an action item.
 
 __declspec (deprecated) virtual IMenu *GetDynamicMenu(int
 
virtual CoreExport void PopulateDynamicMenu (MaxSDK::CUI::ICuiDynamicMenu *dynMenu, int actionId, HWND hWnd, const IPoint2 &cursorPos)
 If the ActionItem does produce a dynamic menu (i.e.
 
virtual CoreExport void DynamicMenuItemSelected (int actionId, int itemId)
 If the ActionItem does produce a dynamic menu (i.e.
 
CoreExport ActionTableGetTable ()
 Returns a pointer to the ActionTable the callback uses.
 
CoreExport void SetTable (ActionTable *pTable)
 Sets the ActionTable the callback uses.
 
CoreExport ActionCallback ()
 Constructor.
 
virtual CoreExport ~ActionCallback ()
 Virtual destructor.
 
virtual CoreExport BOOL ExecuteAction (int id)
 Called by 3ds Max to execute the operation associated with an action item.
 
virtual CoreExport IMenuGetDynamicMenu (int id, HWND hwnd, IPoint2 &m)
 Called by 3ds Max if an action item declares itself as a dynamic menu.
 
CoreExport ActionTableGetTable ()
 Returns a pointer to the ActionTable the callback uses.
 
CoreExport void SetTable (ActionTable *pTable)
 Sets the ActionTable the callback uses.
 
- Public Member Functions inherited from BaseInterfaceServer
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
virtual UtilExport int NumInterfaces () const
 
virtual UtilExport BaseInterfaceGetInterfaceAt (int i) const
 
virtual UtilExport ~BaseInterfaceServer ()
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Public Attributes

 HWND
 
IPoint2final { return nullptr
 

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Detailed Description

3ds Max uses the ExecuteAction() method of an instance of this class when an ActionItem is executed.

Developers need to override this class and pass an instance of it to the system when they activate an ActionTable using the method IActionManager::ActivateActionTable().

See also
Class BaseInterfaceServer, Class ActionTable, Class ActionItem, Class ActionContext, Class IActionManager, Class DynamicMenu, Class DynamicMenuCallback, Class Interface.

Developers need to override this class and pass an instance of it to the system when they activate an ActionTable using the method IActionManager::ActivateActionTable().

<<<<<<< HEAD

Version
4.0

\sa Class BaseInterfaceServer, Class ActionTable, Class ActionItem, Class ActionContext, Class IActionManager, Class Interface.

See also
Class BaseInterfaceServer, Class ActionTable, Class ActionItem, Class ActionContext, Class IActionManager, Class DynamicMenu, Class DynamicMenuCallback, Class Interface.

‍a406e112cf287e51abdbba7f88b8e4b91e0a64e7

Developers need to override this class and pass an instance of it to the system when they activate an ActionTable using the method IActionManager::ActivateActionTable().

Version
4.0
See also
Class BaseInterfaceServer, Class ActionTable, Class ActionItem, Class ActionContext, Class IActionManager, Class DynamicMenu, Class DynamicMenuCallback, Class Interface.

Developers need to override this class and pass an instance of it to the system when they activate an ActionTable using the method IActionManager::ActivateActionTable().

Version
4.0
See also
Class BaseInterfaceServer, Class ActionTable, Class ActionItem, Class ActionContext, Class IActionManager, Class Interface.

Constructor & Destructor Documentation

◆ ActionCallback() [1/5]

Constructor.

◆ ~ActionCallback() [1/5]

virtual CoreExport ~ActionCallback ( )
virtual

Virtual destructor.

◆ ActionCallback() [2/5]

Constructor.

◆ ~ActionCallback() [2/5]

virtual CoreExport ~ActionCallback ( )
virtual

Virtual destructor.

◆ ActionCallback() [3/5]

Constructor.

◆ ~ActionCallback() [3/5]

virtual CoreExport ~ActionCallback ( )
virtual

Virtual destructor.

◆ ActionCallback() [4/5]

Constructor.

◆ ~ActionCallback() [4/5]

virtual CoreExport ~ActionCallback ( )
virtual

Virtual destructor.

◆ ActionCallback() [5/5]

Constructor.

◆ ~ActionCallback() [5/5]

virtual CoreExport ~ActionCallback ( )
virtual

Virtual destructor.

Member Function Documentation

◆ ExecuteAction() [1/5]

virtual CoreExport BOOL ExecuteAction ( int  id)
virtual

Called by 3ds Max to execute the operation associated with an action item.

Parameters
idThe ID of the item to execute.
Returns
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. If it does execute then TRUE is returned.
Default Implementation:
{ return FALSE; }

Reimplemented in TrackViewActionCallback.

◆ GetDynamicMenu() [1/3]

virtual CoreExport IMenu * GetDynamicMenu ( int  id,
HWND  hwnd,
IPoint2 m 
)
virtual

Called by 3ds Max if an action item declares itself as a dynamic menu.

Parameters
idThe item ID which is passed to the DynamicMenuCallback::MenuItemSelected()
hwndIf the menu is requested by a right-click quad menu, then hwnd is the window where the click occurred. If the item is used from a menu bar, then hwnd will be NULL.
mIf the menu is requested by a right-click quad menu, then this will be the point in the window where the user clicked.
Default Implementation:
{ return NULL; }
#define NULL
Definition: autoptr.h:18

◆ GetTable() [1/5]

CoreExport ActionTable * GetTable ( )

Returns a pointer to the ActionTable the callback uses.

◆ SetTable() [1/5]

CoreExport void SetTable ( ActionTable pTable)

Sets the ActionTable the callback uses.

Parameters
pTablePoints to the ActionTable the callback uses.

◆ ExecuteAction() [2/5]

virtual CoreExport BOOL ExecuteAction ( int  id)
virtual

Called by 3ds Max to execute the operation associated with an action item.

Parameters
idThe ID of the item to execute.
Returns
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. If it does execute then TRUE is returned.
Default Implementation:
{ return FALSE; }

Reimplemented in TrackViewActionCallback.

◆ __declspec() [1/2]

__declspec ( deprecated  )
Deprecated:
This has been deprecated as of 3ds Max 2025, please use PopulateDynamicMenu instead

◆ PopulateDynamicMenu() [1/2]

virtual CoreExport void PopulateDynamicMenu ( MaxSDK::CUI::ICuiDynamicMenu *  dynMenu,
int  actionId,
HWND  hWnd,
const IPoint2 cursorPos 
)
virtual

If the ActionItem does produce a dynamic menu (i.e.

IsDyamicAction() returns true), this method is called by the system to populate the new menu currently being created to add items, separators, and submenus. Each item is given an arbitrary id (see ICuiDynamicMenu interface). Default implementation is a no-op.

Parameters
dynMenu- Pointer to dynamic menu interface. Pointer is owned by the system.
actionId- Id of ActionItem that produces the dynamic menu
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 nullptr.
cursorPos- If the menu is requested by a right-click quad menu, then this parameter is the point in the window where the user clicked.
See also
class ICuiDynamicMenu

◆ DynamicMenuItemSelected() [1/2]

virtual CoreExport void DynamicMenuItemSelected ( int  actionId,
int  itemId 
)
virtual

If the ActionItem does produce a dynamic menu (i.e.

IsDyamicAction() returns true), this method is called by the system when user clicks on a menu item that was added in PopulateDynamicMenu. Default implementation is a no-op.

Parameters
actionId- Id of ActionItem that produced the dynamic menu
itemId- id of menu item that was clicked by user. Use this id to execute appropriate action. This id is passed to ICuiDynamicMenu functions when populating the menu (for example: AddItem(itemCmdId, ...)).
See also
class ICuiDynamicMenu

◆ GetTable() [2/5]

CoreExport ActionTable * GetTable ( )

Returns a pointer to the ActionTable the callback uses.

◆ SetTable() [2/5]

CoreExport void SetTable ( ActionTable pTable)

Sets the ActionTable the callback uses.

Parameters
pTablePoints to the ActionTable the callback uses.

◆ ExecuteAction() [3/5]

virtual CoreExport BOOL ExecuteAction ( int  id)
virtual

Called by 3ds Max to execute the operation associated with an action item.

Parameters
idThe ID of the item to execute.
Returns
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. If it does execute then TRUE is returned.
Default Implementation:
{ return FALSE; }

Reimplemented in TrackViewActionCallback.

◆ GetDynamicMenu() [2/3]

virtual CoreExport IMenu * GetDynamicMenu ( int  id,
HWND  hwnd,
IPoint2 m 
)
virtual

Called by 3ds Max if an action item declares itself as a dynamic menu.

Parameters
idThe item ID which is passed to the DynamicMenuCallback::MenuItemSelected()
hwndIf the menu is requested by a right-click quad menu, then hwnd is the window where the click occurred. If the item is used from a menu bar, then hwnd will be NULL.
mIf the menu is requested by a right-click quad menu, then this will be the point in the window where the user clicked.
Default Implementation:
{ return NULL; }

◆ GetTable() [3/5]

CoreExport ActionTable * GetTable ( )

Returns a pointer to the ActionTable the callback uses.

◆ SetTable() [3/5]

CoreExport void SetTable ( ActionTable pTable)

Sets the ActionTable the callback uses.

Parameters
pTablePoints to the ActionTable the callback uses.

◆ ExecuteAction() [4/5]

virtual CoreExport BOOL ExecuteAction ( int  id)
virtual

Called by 3ds Max to execute the operation associated with an action item.

Parameters
idThe ID of the item to execute.
Returns
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. If it does execute then TRUE is returned.
Default Implementation:
{ return FALSE; }

Reimplemented in TrackViewActionCallback.

◆ __declspec() [2/2]

__declspec ( deprecated  )
Deprecated:
This has been deprecated as of 3ds Max 2025, please use PopulateDynamicMenu instead

◆ PopulateDynamicMenu() [2/2]

virtual CoreExport void PopulateDynamicMenu ( MaxSDK::CUI::ICuiDynamicMenu *  dynMenu,
int  actionId,
HWND  hWnd,
const IPoint2 cursorPos 
)
virtual

If the ActionItem does produce a dynamic menu (i.e.

IsDyamicAction() returns true), this method is called by the system to populate the new menu currently being created to add items, separators, and submenus. Each item is given an arbitrary id (see ICuiDynamicMenu interface). Default implementation is a no-op.

Parameters
dynMenu- Pointer to dynamic menu interface. Pointer is owned by the system.
actionId- Id of ActionItem that produces the dynamic menu
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 nullptr.
cursorPos- If the menu is requested by a right-click quad menu, then this parameter is the point in the window where the user clicked.
See also
class ICuiDynamicMenu

◆ DynamicMenuItemSelected() [2/2]

virtual CoreExport void DynamicMenuItemSelected ( int  actionId,
int  itemId 
)
virtual

If the ActionItem does produce a dynamic menu (i.e.

IsDyamicAction() returns true), this method is called by the system when user clicks on a menu item that was added in PopulateDynamicMenu. Default implementation is a no-op.

Parameters
actionId- Id of ActionItem that produced the dynamic menu
itemId- id of menu item that was clicked by user. Use this id to execute appropriate action. This id is passed to ICuiDynamicMenu functions when populating the menu (for example: AddItem(itemCmdId, ...)).
See also
class ICuiDynamicMenu

◆ GetTable() [4/5]

CoreExport ActionTable * GetTable ( )

Returns a pointer to the ActionTable the callback uses.

◆ SetTable() [4/5]

CoreExport void SetTable ( ActionTable pTable)

Sets the ActionTable the callback uses.

Parameters
pTablePoints to the ActionTable the callback uses.

◆ ExecuteAction() [5/5]

virtual CoreExport BOOL ExecuteAction ( int  id)
virtual

Called by 3ds Max to execute the operation associated with an action item.

Parameters
idThe ID of the item to execute.
Returns
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. If it does execute then TRUE is returned.
Default Implementation:
{ return FALSE; }

Reimplemented in TrackViewActionCallback.

◆ GetDynamicMenu() [3/3]

virtual CoreExport IMenu * GetDynamicMenu ( int  id,
HWND  hwnd,
IPoint2 m 
)
virtual

Called by 3ds Max if an action item declares itself as a dynamic menu.

Parameters
idThe item ID which is passed to the DynamicMenuCallback::MenuItemSelected()
hwndIf the menu is requested by a right-click quad menu, then hwnd is the window where the click occurred. If the item is used from a menu bar, then hwnd will be NULL.
mIf the menu is requested by a right-click quad menu, then this will be the point in the window where the user clicked.
Default Implementation:
{ return NULL; }

◆ GetTable() [5/5]

CoreExport ActionTable * GetTable ( )

Returns a pointer to the ActionTable the callback uses.

◆ SetTable() [5/5]

CoreExport void SetTable ( ActionTable pTable)

Sets the ActionTable the callback uses.

Parameters
pTablePoints to the ActionTable the callback uses.

Member Data Documentation

◆ HWND

HWND

◆ final

IPoint2 & final { return nullptr