Public Types | Public Member Functions

IQuadMenuContext Class Reference

Search for all occurrences

Detailed Description

See also:
Class IMenuContext, Class Interface, Right-Click Contexts.
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.

#include <imenuman.h>

Inheritance diagram for IQuadMenuContext:
Inheritance graph
[legend]

List of all members.

Public Types

enum   RightClickContext {
  kNonePressed, kShiftPressed, kAltPressed, kControlPressed,
  kShiftAndAltPressed, kShiftAndControlPressed, kControlAndAltPressed, kShiftAndAltAndControlPressed
}

Public Member Functions

virtual bool  AddQuadMenu (IQuadMenu *pMenu, const MCHAR *pName)=0
virtual void  SetMenu (int index, IQuadMenu *pMenu, const MCHAR *pName)=0
virtual void  RemoveMenu (int index)=0
virtual int  MenuCount ()=0
virtual IQuadMenu GetMenu (int index)=0
virtual int  GetCurrentMenuIndex ()=0
virtual void  SetCurrentMenuIndex (int index)=0
virtual bool  GetShowAllQuads (int index)=0
virtual void  SetShowAllQuads (int index, bool showAll)=0
virtual RightClickContext  GetRightClickContext ()=0
virtual IQuadMenu GetRightClickMenu (RightClickContext context)=0
virtual void  SetRightClickMenu (RightClickContext context, IQuadMenu *pMenu)=0
virtual int  FindMenu (IQuadMenu *pMenu)=0
virtual IQuadMenu FindMenuByTitle (const MCHAR *pTitle)=0

Member Function Documentation

virtual bool AddQuadMenu ( IQuadMenu pMenu,
const MCHAR *  pName 
) [pure virtual]
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.

MCHAR* pName

The name of the quad menu.
Returns:
TRUE if the quad menu is successfully added, otherwise FALSE.
virtual void SetMenu ( int  index,
IQuadMenu pMenu,
const MCHAR *  pName 
) [pure virtual]
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.

MCHAR* pName

The name of the quad menu.
virtual void RemoveMenu ( int  index ) [pure virtual]
Remarks:
This method allows you to remove a quad menu from the context.
Parameters:
int index

The index of the quad menu to remove.
virtual int MenuCount ( ) [pure virtual]
Remarks:
This method returns the number of quad menu's in this context.
virtual IQuadMenu* GetMenu ( int  index ) [pure virtual]
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.
virtual int GetCurrentMenuIndex ( ) [pure virtual]
Remarks:
This method returns the index of the currently set default right-click menu.
virtual void SetCurrentMenuIndex ( int  index ) [pure virtual]
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.
virtual bool GetShowAllQuads ( int  index ) [pure virtual]
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.
virtual void SetShowAllQuads ( int  index,
bool  showAll 
) [pure virtual]
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.
virtual RightClickContext GetRightClickContext ( ) [pure virtual]
Remarks:
This method queries the state of the modifier keys and returns the appropriate context.
Returns:
See Right-Click Contexts.
virtual IQuadMenu* GetRightClickMenu ( RightClickContext  context ) [pure virtual]
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 Right-Click Contexts.
virtual void SetRightClickMenu ( RightClickContext  context,
IQuadMenu pMenu 
) [pure virtual]
Remarks:
This method allows you to set the quad menu associated with a specific right-click context.
Parameters:
RightClickContext context

See Right-Click Contexts.

IQuadMenu *pMenu

A pointer to the quad menu you wish to set.
virtual int FindMenu ( IQuadMenu pMenu ) [pure virtual]
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.
virtual IQuadMenu* FindMenuByTitle ( const MCHAR *  pTitle ) [pure virtual]
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:
MCHAR* pTitle

The title string of the menu.

IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext
IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext IQuadMenuContext