Public Member Functions

RightClickMenuManager Class Reference

Search for all occurrences

Detailed Description

See also:
Class RightClickMenu, Class Interface.

Description:
Methods of this class allow a developer to extend the menu presented when a user right clicks on an item in the viewports. All methods of this class are implemented by the system.

#include <rtclick.h>

Inheritance diagram for RightClickMenuManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CoreExport void  Register (RightClickMenu *menu)
CoreExport void  Unregister (RightClickMenu *menu)
CoreExport void  Init (HMENU menu, int startId, int limit, HWND hWnd, IPoint2 m)
CoreExport void  CleanUp ()
CoreExport int  AddMenu (RightClickMenu *menu, UINT flags, UINT id, const MCHAR *data)
CoreExport int  BeginSubMenu (const MCHAR *name)
CoreExport int  EndSubMenu ()
CoreExport void  Process (UINT id)

Member Function Documentation

CoreExport void Register ( RightClickMenu menu )
Remarks:
This method is used to register an instance of a class derived from RightClickMenu. This allows its methods to be called when the user right clicks on an object in a viewport.
Parameters:
RightClickMenu *menu

The menu to set as register.
CoreExport void Unregister ( RightClickMenu menu )
Remarks:
This method is used to un-register a registered right click menu.
Parameters:
RightClickMenu *menu

The menu to set as un-register.
CoreExport void Init ( HMENU  menu,
int  startId,
int  limit,
HWND  hWnd,
IPoint2  m 
)
Remarks:
This method is used internally.
CoreExport void CleanUp ( )
Remarks:
This method is available in release 3.0 and later only.

This removes all sub menus from the right click menu.
CoreExport int AddMenu ( RightClickMenu menu,
UINT  flags,
UINT  id,
const MCHAR *  data 
)
Remarks:
This method is called to add items to the right click menu passed. A string or separator may be added. Strings may be checked or unchecked. They may also be disabled and grayed.
Parameters:
RightClickMenu *menu

The menu to add the item to.

UINT flags

Describes the item being added. One or more of the following values:

MF_CHECKED

MF_UNCHECKED

MF_STRING

MF_DISABLED

MF_GRAYED

MF_SEPARATOR

UINT id

The id of the selection. This is the id passed to the RightClickMenu::Selected() method when the user makes a selection from the menu.

MCHAR* data

The string to display in the menu (or NULL if adding a separator).
Returns:
Nonzero if the item was added; otherwise 0.
CoreExport int BeginSubMenu ( const MCHAR *  name )
Remarks:
This method is available in release 3.0 and later only.

This begins a new sub menu. Items added after this call will appear as sub choices of this one until EndSubMenu() is called.
Parameters:
MCHAR* name

The name to appear for the sub menu item.
Returns:
Always returns TRUE.
CoreExport int EndSubMenu ( )
Remarks:
This method is available in release 3.0 and later only.

This ends a sub menu. Items added after this call will appear as they did prior to calling BeginSubMenu().
Returns:
Always returns TRUE.
CoreExport void Process ( UINT  id )
Remarks:
This method is used internally.

RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager
RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager RightClickMenuManager