Class IMenuGlobalContext

3DS Max Plug-In SDK

Class IMenuGlobalContext

See Also: Class ImenuItem, Class IMenuSettings, Class IMenuTimer, Class ItemID, Class IPoint2

class IMenuGlobalContext

Description:

This class is available in release 4.0 and later only.

This abstract class represents an global context interface for all menus that might be displayed during a user’s menuing action and is used internally. Methods that are marked as internal should not be used.

Methods:

public:

Prototype:

virtual void SetIMenuSettings(IMenuSettings* pIMenuSettings) = 0;

Remarks:

This method is used internally.

This method allows you to set the menu settings associated with this global context.

Parameters:

IMenuSettings* pIMenuSettings

A pointer to a menu settings object.

Prototype:

virtual IMenuSettings* GetIMenuSettings() const = 0;

Remarks:

This method is used internally.

This method returns a pointer to the menu settings associated with this global context.

Prototype:

virtual void UpdateCursorPosition() = 0;

Remarks:

This method is used internally.

This method updates the cursor position from Win32.

Prototype:

virtual const IPoint2& GetCursorPosition() const = 0;

Remarks:

This method is used internally.

This method returns the cached cursor position.

Return Value:

The x and y coordinates of the cursor.

Prototype:

virtual const IPoint2& GetInitialCursorPosition() const = 0;

Remarks:

This method is used internally.

This method returns the cached initial cursor position (i.e. the coordinate where the user clicked).

Return Value:

The x and y coordinates of the cached initial cursor position.

Prototype:

virtual void SetInitialCursorPosition(IPoint2& initPos) = 0;

Remarks:

This method is used internally.

This method allows you to set the cached initial cursor position (i.e. the coordinate where the user clicked).

Parameters:

IPoint2& initPos

The x and y coordinate of the cursor position.

Prototype:

virtual void SetIMenuTimer(IMenuTimer* pIMenuTimer) = 0;

Remarks:

This method is used internally.

This method allows you to set a global timer for the menu’s global context.

Parameters:

IMenuTimer* pIMenuTimer

A pointer to the menu timer object,

Prototype:

virtual IMenuTimer* GetIMenuTimer() const = 0;

Remarks:

This method is used internally.

This method returns a pointer to the global timer for the menu’s global context.

Prototype:

virtual void SetHDisplayWnd(HWND hDisplayWnd) = 0;

Remarks:

This method is used internally.

This method allows you to set the handle to the display window.

Parameters:

HWND hDisplayWnd

The handle to the display window.

Prototype:

virtual HWND GetHDisplayWnd() const = 0;

Remarks:

This method is used internally.

This method returns the handle to the display window.

Prototype:

virtual void SetHMessageWnd(HWND hDisplayWnd) = 0;

Remarks:

This method is used internally.

This method allows you to set the handle to the message window

Parameters:

HWND hDisplayWnd

The handle to the message window.

Prototype:

virtual HWND GetHMessageWnd() const = 0;

Remarks:

This method is used internally.

This method returns the handle to the message window.

Prototype:

virtual void SetHDisplayDC(HDC hDisplayDC) = 0;

Remarks:

This method is used internally.

This method allows you to set a handle to the display device context.

Parameters:

HDC hDisplayDC

The handle to the display device context.

Prototype:

virtual HDC GetHDisplayDC() const = 0;

Remarks:

This method is used internally.

This method returns the handle to the display device context.

Prototype:

virtual void SetTitleHFont(HFONT hTitleFont) = 0;

Remarks:

This method is used internally.

This method allows you to set the handle to the title font.

Parameters:

HFONT hTitleFont

The handle to the title font.

Prototype:

virtual HFONT GetTitleHFont() const = 0;

Remarks:

This method is used internally.

This method returns the handle to the title font.

Prototype:

virtual void SetItemHFont(HFONT hItemFont) = 0;

Remarks:

This method is used internally.

This method allows you to set the handle to the item font.

Parameters:

HFONT hItemFont

The handle to the item font.

Prototype:

virtual HFONT GetItemHFont() const = 0;

Remarks:

This method is used internally.

This method returns the handle to the item font.

Prototype:

virtual void SetAcceleratorHFont(HFONT hItemFont) = 0;

Remarks:

This method is used internally.

This method allows you to set the handle to the accelerator font.

Parameters:

HFONT hItemFont

The handle to the accelerator font.

Prototype:

virtual HFONT GetAcceleratorHFont() const = 0;

Remarks:

This method is used internally.

This method returns the handle to the accelerator font.

Prototype:

virtual void SetUniformItemSize(const IPoint2& itemSize) = 0;

Remarks:

This method is used internally.

This method allows you to set the menu’s maximum uniform item size.

Parameters:

IPoint2& itemSize

The size rectangle.

Prototype:

virtual const IPoint2& GetUniformItemSize() const = 0;

Remarks:

This method is used internally.

This method returns the menu’s maximum uniform item size as a rectangle.

Prototype:

virtual int GetTitleBarHeight() = 0;

Remarks:

This method is used internally.

This method returns the height of the title bar, not counting the border.

Prototype:

virtual ItemID& GetCurrentItemID() = 0;

Remarks:

This method is used internally.

This method returns the ItemID of the menu/item triplet that’s currently being traversed.

Prototype:

virtual ItemID& GetSelectionItemID() = 0;

Remarks:

This method is used internally.

This method returns the ItemID of the menu/item triplet that’s currently selected.

Prototype:

virtual bool HasSelection() = 0;

Remarks:

This method is used internally.

This method will determine selection is available and will return TRUE if selection is available or FALSE if it is not.

Prototype:

virtual bool IsCurrentMenuSelected() = 0;;

Remarks:

This method is used internally.

This method will determine the selection status of the current menu and will return TRUE if the current menu is selected or FALSE if it is not.

Prototype:

virtual bool IsCurrentItemSelected() = 0;

Remarks:

This method is used internally.

This method will determine the selection status of the current menu and item and will return TRUE if the current menu and item are selected or FALSE if they are not.

Prototype:

virtual void SelectCurrentItem() = 0;

Remarks:

This method is used internally.

This method selects the current item.