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

Used for managing all menus To get an interface for calling the methods of this class use Interface::GetMenuManager(). More...

#include <imenuman.h>

+ Inheritance diagram for IMenuManager:

Public Types

enum  {
  loadMenuFile , saveMenuFile , getMenuFile , unRegisterMenu ,
  unRegisterQuadMenu , registerMenuContext , findMenu , findQuadMenu ,
  updateMenuBar , createQuadMenu , createMenu , createSubMenuItem ,
  createSeparatorItem , createActionItem , setViewportRightClickMenu , getViewportRightClickMenu ,
  getMainMenuBar , setMainMenuBar , getShowAllQuads , setShowAllQuads ,
  numMenus , getMenu , numQuadMenus , getQuadMenu ,
  getQuadMenuName , setQuadMenuName , createMenuItemFromAction
}
 Function Publishing IDs More...
 
enum  { rightClickContext }
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

virtual bool RegisterMenu (IMenu *pMenu, DWORD flags=0)=0
 
virtual bool UnRegisterMenu (IMenu *pMenu)=0
 This method allows you to remove a menu from the mananger.
 
virtual IMenuFindMenu (const MCHAR *pTitle)=0
 This method will find a pointer to a menu based on its name.
 
virtual IQuadMenuFindQuadMenu (const MCHAR *pTitle)=0
 This method will find a pointer to a quad menu based on its name.
 
virtual bool RegisterMenuBarContext (MenuContextId contextId, const MCHAR *pName)=0
 This method allows you to register a new menu bar context.
 
virtual bool RegisterQuadMenuContext (MenuContextId contextId, const MCHAR *pName)=0
 This method allows you to register a new quad menu context.
 
virtual int NumContexts ()=0
 
virtual IMenuContextGetContextByIndex (int index)=0
 
virtual IMenuContextGetContext (MenuContextId contextId)=0
 
virtual void UpdateMenuBar ()=0
 
virtual BOOL LoadMenuFile (const MCHAR *pMenuFile)=0
 
virtual BOOL SaveMenuFile (const MCHAR *pMenuFile)=0
 
virtual const MCHARGetMenuFile ()=0
 
virtual BOOL SetMainMenuBar (IMenu *pMenu)=0
 
virtual BOOL SetViewportRightClickMenu (IQuadMenuContext::RightClickContext context, IQuadMenu *pQuadMenu)=0
 
virtual IQuadMenuGetViewportRightClickMenu (IQuadMenuContext::RightClickContext context)=0
 
virtual IMenuGetMainMenuBar ()=0
 
virtual bool GetShowAllQuads (IQuadMenu *pQuadMenu)=0
 
virtual void SetShowAllQuads (IQuadMenu *pQuadMenu, bool showAll)=0
 
virtual const MCHARGetQuadMenuName (IQuadMenu *pQuadMenu)=0
 
virtual void SetQuadMenuName (IQuadMenu *pQuadMenu, const MCHAR *pName)=0
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor.
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor.
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor.
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDesc ()=0
 
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.
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
virtual UtilExport Interface_ID GetID ()
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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.
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClasspc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Detailed Description

Used for managing all menus To get an interface for calling the methods of this class use Interface::GetMenuManager().

See also
Class IMenuManagerExtension, Class IMenu, Class IMenuBarContext, Class IQuadMenuContext, Class Interface

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Function Publishing IDs

Enumerator
loadMenuFile 
saveMenuFile 
getMenuFile 
unRegisterMenu 
unRegisterQuadMenu 
registerMenuContext 
findMenu 
findQuadMenu 
updateMenuBar 
createQuadMenu 
createMenu 
createSubMenuItem 
createSeparatorItem 
createActionItem 
setViewportRightClickMenu 
getViewportRightClickMenu 
getMainMenuBar 
setMainMenuBar 
getShowAllQuads 
setShowAllQuads 
numMenus 
getMenu 
numQuadMenus 
getQuadMenu 
getQuadMenuName 
setQuadMenuName 
createMenuItemFromAction 
397 {
398#ifndef NO_CUI
402#endif // NO_CUI
406 findMenu,
420 numMenus,
421 getMenu,
427 };
@ createSeparatorItem
Definition: imenuman.h:412
@ setViewportRightClickMenu
Definition: imenuman.h:414
@ createSubMenuItem
Definition: imenuman.h:411
@ loadMenuFile
Definition: imenuman.h:399
@ createMenu
Definition: imenuman.h:410
@ findMenu
Definition: imenuman.h:406
@ numMenus
Definition: imenuman.h:420
@ getViewportRightClickMenu
Definition: imenuman.h:415
@ setQuadMenuName
Definition: imenuman.h:425
@ getQuadMenu
Definition: imenuman.h:423
@ unRegisterQuadMenu
Definition: imenuman.h:404
@ getQuadMenuName
Definition: imenuman.h:424
@ numQuadMenus
Definition: imenuman.h:422
@ getShowAllQuads
Definition: imenuman.h:418
@ findQuadMenu
Definition: imenuman.h:407
@ unRegisterMenu
Definition: imenuman.h:403
@ updateMenuBar
Definition: imenuman.h:408
@ createQuadMenu
Definition: imenuman.h:409
@ createActionItem
Definition: imenuman.h:413
@ setMainMenuBar
Definition: imenuman.h:417
@ saveMenuFile
Definition: imenuman.h:400
@ createMenuItemFromAction
Definition: imenuman.h:426
@ getMainMenuBar
Definition: imenuman.h:416
@ registerMenuContext
Definition: imenuman.h:405
@ getMenuFile
Definition: imenuman.h:401
@ setShowAllQuads
Definition: imenuman.h:419
@ getMenu
Definition: imenuman.h:421

◆ anonymous enum

anonymous enum
Enumerator
rightClickContext 
@ rightClickContext
Definition: imenuman.h:430

Member Function Documentation

◆ RegisterMenu()

virtual bool RegisterMenu ( IMenu pMenu,
DWORD  flags = 0 
)
pure virtual
Remarks
This method allows you to add a menu to the manager.
Parameters
pMenu- Points to the menu to register or add
flags= 0 - Not used.
Returns
Returns false if the menu is already registered; true if not.

◆ UnRegisterMenu()

virtual bool UnRegisterMenu ( IMenu pMenu)
pure virtual

This method allows you to remove a menu from the mananger.

Parameters
pMenu- Points to the menu to unregister.
Returns
false if the menu was not registered, true if successfully unregistered.

◆ FindMenu()

virtual IMenu * FindMenu ( const MCHAR pTitle)
pure virtual

This method will find a pointer to a menu based on its name.

Parameters
pTitle- The name of the menu to find.
Returns
A pointer to the menu or NULL if the menu wasn't found.

◆ FindQuadMenu()

virtual IQuadMenu * FindQuadMenu ( const MCHAR pTitle)
pure virtual

This method will find a pointer to a quad menu based on its name.

Parameters
pTitle- The name of the menu to return.
Returns
A pointer to the quad menu or NULL if the menu was not found.

◆ RegisterMenuBarContext()

virtual bool RegisterMenuBarContext ( MenuContextId  contextId,
const MCHAR pName 
)
pure virtual

This method allows you to register a new menu bar context.

Parameters
contextId- The menu context ID.
pName- The name of the menu bar.
Returns
TRUE if the new menu is registered, FALSE if the menu was already registered.

◆ RegisterQuadMenuContext()

virtual bool RegisterQuadMenuContext ( MenuContextId  contextId,
const MCHAR pName 
)
pure virtual

This method allows you to register a new quad menu context.

Parameters
contextId- The menu context ID.
pName- The name of the quad menu.
Returns
TRUE if the new quad menu is registered, FALSE if the quad menu was already registered.

◆ NumContexts()

virtual int NumContexts ( )
pure virtual
Remarks
This method returns the number of contexts registered.

◆ GetContextByIndex()

virtual IMenuContext * GetContextByIndex ( int  index)
pure virtual
Remarks
This method returns a pointer to a menu context by the specified index.
Parameters
indexThe index of the menu context to retrieve.

◆ GetContext()

virtual IMenuContext * GetContext ( MenuContextId  contextId)
pure virtual
Remarks
This method returns a pointer to a menu context by the specified menu context ID. This method returns NULL if the context does not exist.
Parameters
contextIdThe menu context ID.

◆ UpdateMenuBar()

virtual void UpdateMenuBar ( )
pure virtual
Remarks
This method can be called to update 3ds Max' main menu bar after adding sub-menu's or menu items.

◆ LoadMenuFile()

virtual BOOL LoadMenuFile ( const MCHAR pMenuFile)
pure virtual
Remarks
This method allows you to load a menu file from disk and automatically update the UI accordingly.
Parameters
pMenuFileThe path and filename of the menu file to load.
Returns
TRUE if the menu file was loaded, otherwise FALSE.

◆ SaveMenuFile()

virtual BOOL SaveMenuFile ( const MCHAR pMenuFile)
pure virtual
Remarks
This method allows you to save a menu file to disk.
Parameters
pMenuFileThe path and filename of the menu file to save.
Returns
TRUE if the menu file was saved, otherwise FALSE.

◆ GetMenuFile()

virtual const MCHAR * GetMenuFile ( )
pure virtual
Remarks
This method returns the file name of the currently loaded and active menu file.

◆ SetMainMenuBar()

virtual BOOL SetMainMenuBar ( IMenu pMenu)
pure virtual
Remarks
This method allows you to set the main menu bar.
Parameters
pMenuA pointer to the menu you wish to set as the main menu bar.
Returns
TRUE if it was set successfully.

◆ SetViewportRightClickMenu()

virtual BOOL SetViewportRightClickMenu ( IQuadMenuContext::RightClickContext  context,
IQuadMenu pQuadMenu 
)
pure virtual
Remarks
This method allows you to set the viewport right-click menu to the specified quad menu.
Parameters
contextSee Right-Click Contexts.
pQuadMenuA pointer to the quad menu you wish to set.
Returns
TRUE if it was set successfully.

◆ GetViewportRightClickMenu()

virtual IQuadMenu * GetViewportRightClickMenu ( IQuadMenuContext::RightClickContext  context)
pure virtual
Remarks
This method returns a pointer to the current viewport right-click quad menu.
Parameters
contextSee Right-Click Contexts.

◆ GetMainMenuBar()

virtual IMenu * GetMainMenuBar ( )
pure virtual
Remarks
This method returns a pointer to the main menu bar.

◆ GetShowAllQuads()

virtual bool GetShowAllQuads ( IQuadMenu pQuadMenu)
pure virtual
Remarks
This method checks if the "Show All Quads" flag is set for a specific QuadMenu and will return TRUE if the flag is set or FALSE if the flag is not set.
Parameters
pQuadMenuA pointer to the QuadMenu you wish to check the flag for.

◆ SetShowAllQuads()

virtual void SetShowAllQuads ( IQuadMenu pQuadMenu,
bool  showAll 
)
pure virtual
Remarks
This method sets the "Show All Quads" flag for a specific QuadMenu.
Parameters
pQuadMenuA pointer to the QuadMenu you wish to set the flag for.

showAllTRUE to set the flag to on, FALSE to set the flag off.

◆ GetQuadMenuName()

virtual const MCHAR * GetQuadMenuName ( IQuadMenu pQuadMenu)
pure virtual
Remarks
This method returns the name given to a specific QuadMenu as a string.
Parameters
pQuadMenuA pointer to the QuadMenu for which you wish to retrieve the name.

◆ SetQuadMenuName()

virtual void SetQuadMenuName ( IQuadMenu pQuadMenu,
const MCHAR pName 
)
pure virtual
Remarks
This method allows you to set the name of a specific QuadMenu.
Parameters
pQuadMenuA pointer to the QuadMenu for which you wish to set the name.

pNameThe string containing the name for the QuadMenu.