Public Member Functions

ActionCallback Class Reference

This reference page is linked to from the following overview topics: Classes Involved in the Action System, Building Action Tables, When to Derive from ActionTable and ActionItem.


Search for all occurrences

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().

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

#include <actiontable.h>

Inheritance diagram for ActionCallback:
Inheritance graph
[legend]

List of all members.

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 IMenu GetDynamicMenu (int id, HWND hwnd, IPoint2 &m)
  Called by 3ds Max if an action item declares itself as a dynamic menu.
CoreExport ActionTable GetTable ()
  Returns a pointer to the ActionTable the callback uses.
CoreExport void  SetTable (ActionTable *pTable)
  Sets the ActionTable the callback uses.

Constructor & Destructor Documentation

CoreExport ActionCallback ( )

Constructor.

virtual CoreExport ~ActionCallback ( ) [virtual]

Virtual destructor.


Member Function Documentation

virtual CoreExport BOOL ExecuteAction ( int  id ) [virtual]

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

Parameters:
id The 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.

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:
id The item ID which is passed to the DynamicMenuCallback::MenuItemSelected()
hwnd If 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.
m If 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; }
CoreExport ActionTable* GetTable ( )

Returns a pointer to the ActionTable the callback uses.

CoreExport void SetTable ( ActionTable pTable )

Sets the ActionTable the callback uses.

Parameters:
pTable Points to the ActionTable the callback uses.

ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback
ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback ActionCallback