Public Types | Public Member Functions

IMenuManager Class Reference

This reference page is linked to from the following overview topics: Deferred Loading of Plug-ins.


Search for all occurrences

Detailed Description

See also:
Class IMenu, Class IMenuBarContext, Class IQuadMenuContext, Class Interface.

Description:
This class is available in release 4.0 and later only.

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

#include <imenuman.h>

Inheritance diagram for IMenuManager:
Inheritance graph
[legend]

List of all members.

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
}
enum   { rightClickContext }

Public Member Functions

virtual bool  RegisterMenu (IMenu *pMenu, DWORD flags=0)=0
virtual bool  UnRegisterMenu (IMenu *pMenu)=0
virtual IMenu FindMenu (const MCHAR *pTitle)=0
virtual IQuadMenu FindQuadMenu (const MCHAR *pTitle)=0
virtual bool  RegisterMenuBarContext (MenuContextId contextId, const MCHAR *pName)=0
virtual bool  RegisterQuadMenuContext (MenuContextId contextId, const MCHAR *pName)=0
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
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.

DWORD flags = 0

Not used.
Returns:
Returns false if the menu is already registered; true if not.
virtual bool UnRegisterMenu ( IMenu pMenu ) [pure virtual]
Remarks:
This method allows you to remove a menu form 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]
Remarks:
This method will return a pointer to a menu based on its name.
Parameters:
MCHAR* pTitle

The name of the menu to return.
Returns:
A pointer to the menu or NULL if the menu wasn't found.
virtual IQuadMenu* FindQuadMenu ( const MCHAR *  pTitle ) [pure virtual]
Remarks:
This method will return 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 wasn't found.
virtual bool RegisterMenuBarContext ( MenuContextId  contextId,
const MCHAR *  pName 
) [pure virtual]
Remarks:
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]
Remarks:
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.

IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager
IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager IMenuManager