Class IQuadMenuContext

3DS Max Plug-In SDK

Class IQuadMenuContext

See Also: Class IMenuContext, Class Interface, List of Right-Click Contexts.

class IQuadMenuContext: public IMenuContext

Description:

This class is available in release 4.0 and later only.

This abstract class represents the interface for a quad menu bar context and provides the functionality to manage the quad menu context by adding and removing menu sections.

Note that methods marked for internal use only should not be used.

 

Methods:

public:

Prototype:

virtual bool AddQuadMenu(IQuadMenu* pMenu, TCHAR* pName) = 0;

Remarks:

This method allows you to add a new quad menu to the context.

Parameters:

IQuadMenu* pMenu

A pointer to the quad menu you wish to add.

TCHAR* pName

The name of the quad menu.

Return Value:

TRUE if the quad menu is successfully added, otherwise FALSE.

Prototype:

virtual void SetMenu(int index, IQuadMenu* pMenu, TCHAR* pName) = 0;

Remarks:

This method allows you to set a quad menu for a slot in the context.

Parameters:

int index

The index of the slot in the context.

IQuadMenu* pMenu

A pointer to the quad menu you wish to set.

TCHAR* pName

The name of the quad menu.

Prototype:

virtual void RemoveMenu(int index) = 0;

Remarks:

This method allows you to remove a quad menu from the context.

Parameters:

int index

The index of the quad menu to remove.

Prototype:

virtual int MenuCount() = 0;

Remarks:

This method returns the number of quad menu’s in this context.

Prototype:

virtual IQuadMenu* GetMenu(int index) = 0;

Remarks:

This method returns a pointer to a quad menu based on its index in the context.

Parameters:

int index

The index of the quad menu you wish to retrieve.

Prototype:

virtual int GetCurrentMenuIndex() = 0;

Remarks:

This method returns the index of the currently set default right-click menu.

Prototype:

virtual void SetCurrentMenuIndex(int index) = 0;

Remarks:

This method allows you to set the current default right-click menu.

Parameters:

int index

The index of the menu you wish to set as the default menu.

Prototype:

virtual bool GetShowAllQuads(int index) = 0;

Remarks:

This method returns the state of the "Show All Menus" flag in each quad registered in the menu manager. TRUE if the flag is set or FALSE if the flag is not set.

Parameters:

int index

The index of the quad menu.

Prototype:

virtual void SetShowAllQuads(int index, bool showAll) = 0;

Remarks:

This method allows you to set the "Show All Menus" flag in each quad registered in the menu manager.

Parameters:

int index

The index of the quad menu.

bool showAll

Set this parameter to TRUE if you wish to enable the "Show All Menus" flag. Otherwise FALSE.

Prototype:

virtual RightClickContext GetRightClickContext() = 0;

Remarks:

This method queries the state of the modifier keys and returns the appropriate context.

Return Value:

See the List of Right-Click Contexts..

Prototype:

virtual IQuadMenu* GetRightClickMenu(RightClickContext context) = 0;

Remarks:

This method returns a pointer to the quad menu which has been assigned to the specified right-click context, or NULL if no menu is assigned.

Parameters:

RightClickContext context

See the List of Right-Click Contexts..

Prototype:

virtual void SetRightClickMenu(RightClickContext context, IQuadMenu *pMenu) = 0;

Remarks:

This method allows you to set the quad menu associated with a specific right-click context.

Parameters:

RightClickContext context

See the List of Right-Click Contexts..

IQuadMenu *pMenu

A pointer to the quad menu you wish to set.

Prototype:

virtual int FindMenu(IQuadMenu* pMenu) = 0;

Remarks:

This method returns the index for a specified quad menu, or -1 if the menu is not in the context.

Parameters:

IQuadMenu* pMenu

A pointer to the quad menu you wish to obtain the index of.

Prototype:

virtual IQuadMenu* FindMenuByTitle(TCHAR* pTitle) = 0;

Remarks:

This method returns a pointer to a quad menu by specifying the title of the menu you wish to find. NULL will be returned if the menu was not found.

Parameters:

TCHAR* pTitle

The title string of the menu.