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

Provides an easy mechanism for plug-ins to produce the menu needed in the ActionItem::GetDynamicMenu() method. More...

#include <actiontable_REMOTE_92.h>

+ Inheritance diagram for DynamicMenu:

Public Types

enum  DynamicMenuFlags {
  kDisabled = 1 << 0 , kChecked = 1 << 1 , kSeparator = 1 << 2 , kDisabled = 1 << 0 ,
  kChecked = 1 << 1 , kSeparator = 1 << 2 , kDisabled = 1 << 0 , kChecked = 1 << 1 ,
  kSeparator = 1 << 2
}
 Constants used in AddItem. More...
 
enum  DynamicMenuFlags {
  kDisabled = 1 << 0 , kChecked = 1 << 1 , kSeparator = 1 << 2 , kDisabled = 1 << 0 ,
  kChecked = 1 << 1 , kSeparator = 1 << 2 , kDisabled = 1 << 0 , kChecked = 1 << 1 ,
  kSeparator = 1 << 2
}
 Constants used in AddItem. More...
 
enum  DynamicMenuFlags {
  kDisabled = 1 << 0 , kChecked = 1 << 1 , kSeparator = 1 << 2 , kDisabled = 1 << 0 ,
  kChecked = 1 << 1 , kSeparator = 1 << 2 , kDisabled = 1 << 0 , kChecked = 1 << 1 ,
  kSeparator = 1 << 2
}
 Constants used in AddItem. More...
 

Public Member Functions

CoreExport DynamicMenu (DynamicMenuCallback *pCallback)
 Constructor.
 
CoreExport IMenuGetMenu ()
 This is the value returned from ActionItem::GetDynamicMenu().
 
CoreExport void AddItem (DWORD flags, UINT itemId, const MCHAR *pItemTitle)
 Adds an item to the dynamic menu.
 
CoreExport void BeginSubMenu (const MCHAR *pTitle)
 This begins a new sub menu.
 
CoreExport void EndSubMenu ()
 Ends construction of a sub menu.
 
CoreExport DynamicMenu (DynamicMenuCallback *pCallback)
 Constructor.
 
CoreExport IMenuGetMenu ()
 This is the value returned from ActionItem::GetDynamicMenu().
 
CoreExport void AddItem (DWORD flags, UINT itemId, const MCHAR *pItemTitle)
 Adds an item to the dynamic menu.
 
CoreExport void BeginSubMenu (const MCHAR *pTitle)
 This begins a new sub menu.
 
CoreExport void EndSubMenu ()
 Ends construction of a sub menu.
 
CoreExport DynamicMenu (DynamicMenuCallback *pCallback)
 Constructor.
 
CoreExport IMenuGetMenu ()
 This is the value returned from ActionItem::GetDynamicMenu().
 
CoreExport void AddItem (DWORD flags, UINT itemId, const MCHAR *pItemTitle)
 Adds an item to the dynamic menu.
 
CoreExport void BeginSubMenu (const MCHAR *pTitle)
 This begins a new sub menu.
 
CoreExport void EndSubMenu ()
 Ends construction of a sub menu.
 

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.
 

Detailed Description

Provides an easy mechanism for plug-ins to produce the menu needed in the ActionItem::GetDynamicMenu() method.

The constructor of this class is used to create the menu and the ActionItem::GetMenu() method returns the appropriate IMenu pointer.

See also
Class DynamicMenuCallback, Class IMenu, Class ActionTable, Class ActionItem, Class ActionCallback, Class ActionContext, Class IActionManager, Class Interface.

The constructor of this class is used to create the menu and the ActionItem::GetMenu() method returns the appropriate IMenu pointer.

Version
4.0
See also
Class DynamicMenuCallback, Class IMenu, Class ActionTable, Class ActionItem, Class ActionCallback, Class ActionContext, Class IActionManager, Class Interface.

Member Enumeration Documentation

◆ DynamicMenuFlags [1/3]

Constants used in AddItem.

Enumerator
kDisabled 
kChecked 
kSeparator 
kDisabled 
kChecked 
kSeparator 
kDisabled 
kChecked 
kSeparator 
1129 {
1130 kDisabled = 1 << 0, //< Item is disabled (can't be selected)
1131 kChecked = 1 << 1, //< Item has a check mark beside it or is pressed
1132 kSeparator = 1 << 2, //< Item is a separator between the previous menu item and the next one.
1133 };
@ kSeparator
Definition: actiontable.h:1132
@ kChecked
Definition: actiontable.h:1131
@ kDisabled
Definition: actiontable.h:1130

◆ DynamicMenuFlags [2/3]

Constants used in AddItem.

Enumerator
kDisabled 
kChecked 
kSeparator 
kDisabled 
kChecked 
kSeparator 
kDisabled 
kChecked 
kSeparator 
1126 {
1127 kDisabled = 1 << 0, //< Item is disabled (can't be selected)
1128 kChecked = 1 << 1, //< Item has a check mark beside it or is pressed
1129 kSeparator = 1 << 2, //< Item is a seperator between the previous menu item and the next one.
1130 };

◆ DynamicMenuFlags [3/3]

Constants used in AddItem.

Enumerator
kDisabled 
kChecked 
kSeparator 
kDisabled 
kChecked 
kSeparator 
kDisabled 
kChecked 
kSeparator 
1129 {
1130 kDisabled = 1 << 0, //< Item is disabled (can't be selected)
1131 kChecked = 1 << 1, //< Item has a check mark beside it or is pressed
1132 kSeparator = 1 << 2, //< Item is a separator between the previous menu item and the next one.
1133 };

Constructor & Destructor Documentation

◆ DynamicMenu() [1/3]

Constructor.

Parameters
pCallbackPoints to the instance of the DynamicMenuCallback class that handles the menu selection.

◆ DynamicMenu() [2/3]

Constructor.

Parameters
pCallbackPoints to the instance of the DynamicMenuCallback class that handles the menu selection.

◆ DynamicMenu() [3/3]

Constructor.

Parameters
pCallbackPoints to the instance of the DynamicMenuCallback class that handles the menu selection.

Member Function Documentation

◆ GetMenu() [1/3]

CoreExport IMenu * GetMenu ( )

This is the value returned from ActionItem::GetDynamicMenu().

This method may be called after menu creation to get a pointer to the IMenu created.

Returns
A pointer to Imenu that can be returned from ActionItem::GetDynamicMenu(*)

◆ AddItem() [1/3]

CoreExport void AddItem ( DWORD  flags,
UINT  itemId,
const MCHAR pItemTitle 
)

Adds an item to the dynamic menu.

Parameters
flagsOne or more of the DynamicMenuFlags.
itemIdThe ID for the menu item.
pItemTitleThe name to appear for the menu item.

◆ BeginSubMenu() [1/3]

CoreExport void BeginSubMenu ( const MCHAR pTitle)

This begins a new sub menu.

Items added after this call will appear as sub choices of this one until EndSubMenu() is called.

Parameters
pTitleThe name to appear for the sub menu item.

◆ EndSubMenu() [1/3]

CoreExport void EndSubMenu ( )

Ends construction of a sub menu.

Items added after this call will appear as they did prior to calling BeginSubMenu().

◆ GetMenu() [2/3]

CoreExport IMenu * GetMenu ( )

This is the value returned from ActionItem::GetDynamicMenu().

This method may be called after menu creation to get a pointer to the IMenu created.

Returns
A pointer to Imenu that can be returned from ActionItem::GetDynamicMenu(*)

◆ AddItem() [2/3]

CoreExport void AddItem ( DWORD  flags,
UINT  itemId,
const MCHAR pItemTitle 
)

Adds an item to the dynamic menu.

Parameters
flagsOne or more of the DynamicMenuFlags.
itemIdThe ID for the menu item.
pItemTitleThe name to appear for the menu item.

◆ BeginSubMenu() [2/3]

CoreExport void BeginSubMenu ( const MCHAR pTitle)

This begins a new sub menu.

Items added after this call will appear as sub choices of this one until EndSubMenu() is called.

Parameters
pTitleThe name to appear for the sub menu item.

◆ EndSubMenu() [2/3]

CoreExport void EndSubMenu ( )

Ends construction of a sub menu.

Items added after this call will appear as they did prior to calling BeginSubMenu().

◆ GetMenu() [3/3]

CoreExport IMenu * GetMenu ( )

This is the value returned from ActionItem::GetDynamicMenu().

This method may be called after menu creation to get a pointer to the IMenu created.

Returns
A pointer to Imenu that can be returned from ActionItem::GetDynamicMenu(*)

◆ AddItem() [3/3]

CoreExport void AddItem ( DWORD  flags,
UINT  itemId,
const MCHAR pItemTitle 
)

Adds an item to the dynamic menu.

Parameters
flagsOne or more of the DynamicMenuFlags.
itemIdThe ID for the menu item.
pItemTitleThe name to appear for the menu item.

◆ BeginSubMenu() [3/3]

CoreExport void BeginSubMenu ( const MCHAR pTitle)

This begins a new sub menu.

Items added after this call will appear as sub choices of this one until EndSubMenu() is called.

Parameters
pTitleThe name to appear for the sub menu item.

◆ EndSubMenu() [3/3]

CoreExport void EndSubMenu ( )

Ends construction of a sub menu.

Items added after this call will appear as they did prior to calling BeginSubMenu().