IMenuManager Class Reference
 
 
 
IMenuManager Class Reference

This reference page is linked to from the following overview topics: New Classes and Methods, Deferred Loading of Plug-ins.


#include <imenuman.h>

Inheritance diagram for IMenuManager:
FPStaticInterface FPInterfaceDesc FPInterface BaseInterface InterfaceServer MaxHeapOperators IMenuManagerExtension

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

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 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 IMenu FindMenu (const MCHAR *pTitle)=0
  This method will find a pointer to a menu based on its name.
virtual IQuadMenu FindQuadMenu (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 IMenuContext GetContextByIndex (int index)=0
virtual IMenuContext GetContext (MenuContextId contextId)=0
virtual void  UpdateMenuBar ()=0
virtual BOOL  LoadMenuFile (const MCHAR *pMenuFile)=0
virtual BOOL  SaveMenuFile (const MCHAR *pMenuFile)=0
virtual const MCHAR *  GetMenuFile ()=0
virtual BOOL  SetMainMenuBar (IMenu *pMenu)=0
virtual BOOL  SetViewportRightClickMenu (IQuadMenuContext::RightClickContext context, IQuadMenu *pQuadMenu)=0
virtual IQuadMenu GetViewportRightClickMenu (IQuadMenuContext::RightClickContext context)=0
virtual IMenu GetMainMenuBar ()=0
virtual bool  GetShowAllQuads (IQuadMenu *pQuadMenu)=0
virtual void  SetShowAllQuads (IQuadMenu *pQuadMenu, bool showAll)=0
virtual const MCHAR *  GetQuadMenuName (IQuadMenu *pQuadMenu)=0
virtual void  SetQuadMenuName (IQuadMenu *pQuadMenu, const MCHAR *pName)=0

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 
anonymous enum

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:
IMenu* pMenu - Points to the menu to register or add
DWORD 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:
IMenu* 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:
MCHAR* 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:
MCHAR* 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:
MenuContextId contextId - The menu context ID.
MCHAR* 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:
MenuContextId contextId - The menu context ID.
MCHAR* 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:
int index

The 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:
MenuContextId contextId

The 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:
MCHAR* pMenuFile

The 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:
MCHAR* pMenuFile

The 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:
IMenu* pMenu

A 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:
IQuadMenuContext::RightClickContext context

See Right-Click Contexts.

IQuadMenu* pQuadMenu

A 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:
IQuadMenuContext::RightClickContext context

See 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:
IQuadMenu* pQuadMenu

A 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:
IQuadMenu* pQuadMenu

A pointer to the QuadMenu you wish to set the flag for.

bool showAll

TRUE 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:
IQuadMenu* pQuadMenu

A 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:
IQuadMenu* pQuadMenu

A pointer to the QuadMenu for which you wish to set the name.

MCHAR* pName

The string containing the name for the QuadMenu.