IMenuManager Class Reference

#include <imenuman.h>

Class 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
+ 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. More...
 
virtual IMenuFindMenu (const MCHAR *pTitle)=0
 This method will find a pointer to a menu based on its name. More...
 
virtual IQuadMenuFindQuadMenu (const MCHAR *pTitle)=0
 This method will find a pointer to a quad menu based on its name. More...
 
virtual bool RegisterMenuBarContext (MenuContextId contextId, const MCHAR *pName)=0
 This method allows you to register a new menu bar context. More...
 
virtual bool RegisterQuadMenuContext (MenuContextId contextId, const MCHAR *pName)=0
 This method allows you to register a new quad menu context. More...
 
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. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
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 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)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

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...
 
- 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
 
MSPluginClass * pc
 
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)
 

Member Enumeration Documentation

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 
384  {
385 #ifndef NO_CUI
386  loadMenuFile,
387  saveMenuFile,
388  getMenuFile,
389 #endif // NO_CUI
393  findMenu,
394  findQuadMenu,
397  createMenu,
407  numMenus,
408  getMenu,
409  numQuadMenus,
410  getQuadMenu,
414  };
Definition: imenuman.h:397
Definition: imenuman.h:402
Definition: imenuman.h:410
Definition: imenuman.h:399
Definition: imenuman.h:408
Definition: imenuman.h:387
Definition: imenuman.h:396
Definition: imenuman.h:394
Definition: imenuman.h:390
Definition: imenuman.h:401
Definition: imenuman.h:392
Definition: imenuman.h:388
Definition: imenuman.h:403
Definition: imenuman.h:413
Definition: imenuman.h:411
Definition: imenuman.h:398
Definition: imenuman.h:409
Definition: imenuman.h:386
Definition: imenuman.h:391
Definition: imenuman.h:406
Definition: imenuman.h:400
Definition: imenuman.h:404
Definition: imenuman.h:393
Definition: imenuman.h:405
Definition: imenuman.h:407
Definition: imenuman.h:412
Definition: imenuman.h:395
anonymous enum
Enumerator
rightClickContext 
417 { rightClickContext, };
Definition: imenuman.h:417

Member Function Documentation

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.
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.
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.
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.
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.
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.
virtual int NumContexts ( )
pure virtual
Remarks
This method returns the number of contexts registered.
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.
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.
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.
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.
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.
virtual const MCHAR* GetMenuFile ( )
pure virtual
Remarks
This method returns the file name of the currently loaded and active menu file.
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.
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.
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.
virtual IMenu* GetMainMenuBar ( )
pure virtual
Remarks
This method returns a pointer to the main menu bar.
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.
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.
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.
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.