Public Types | Public Member Functions

IMenuElement Class Reference

Search for all occurrences

Detailed Description

See also:
Class IMenuItem, Class IPoint2, Class Box2

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

This abstract class represents an interface for any menu element. Methods that are marked as internal should not be used.

#include <imenus.h>

Inheritance diagram for IMenuElement:
Inheritance graph
[legend]

List of all members.

Public Types

enum   OriginLocation { UPPER_LEFT, LOWER_LEFT, LOWER_RIGHT, UPPER_RIGHT }

Public Member Functions

virtual  ~IMenuElement ()
virtual void  SetOrigin (const IPoint2 &origin, OriginLocation location)=0
virtual const IPoint2 GetOrigin () const =0
virtual void  SetVisible (bool visible)=0
virtual bool  GetVisible ()=0
virtual void  SetTitle (const MCHAR *customTitle)=0
virtual const MSTR GetTitle ()=0
virtual void  SetEnabled (bool enabled)=0
virtual bool  GetEnabled ()=0
virtual const IPoint2 GetSize ()=0
virtual const Box2 GetRect ()=0
virtual bool  IsInRect (const IPoint2 &point)=0

Member Enumeration Documentation


Constructor & Destructor Documentation

virtual ~IMenuElement ( ) [inline, virtual]
Remarks:
Destructor.
{;}

Member Function Documentation

virtual void SetOrigin ( const IPoint2 origin,
OriginLocation  location 
) [pure virtual]
Remarks:
This method is used internally.

This method allows you to set the element's origin and origin location.
Parameters:
IPoint2& origin

The x, y coordinates of the origin.

OriginLocation location

The origin location, either one of; UPPER_LEFT, LOWER_LEFT, LOWER_RIGHT, or UPPER_RIGHT.
virtual const IPoint2& GetOrigin ( ) const [pure virtual]
Remarks:
This method is used internally.

This method returns the x, y coordinates of the element's origin.
virtual void SetVisible ( bool  visible ) [pure virtual]
Remarks:
This method allows you to set the visibility of the element.
Parameters:
bool visible

TRUE for visible, FALSE for invisible.
virtual bool GetVisible ( ) [pure virtual]
Remarks:
This method returns the visibility of the element. TRUE if the element is visible, otherwise FALSE.
virtual void SetTitle ( const MCHAR *  customTitle ) [pure virtual]
Remarks:
This method allows you to set the item's title.
Parameters:
MCHAR *customTitle

The title string.
virtual const MSTR& GetTitle ( ) [pure virtual]
Remarks:
This method returns the item's title string.
virtual void SetEnabled ( bool  enabled ) [pure virtual]
Remarks:
This method allows you to enable and disable the element.
Parameters:
bool enabled

TRUE to enable, FALSE to disable.
virtual bool GetEnabled ( ) [pure virtual]
Remarks:
This method returns the state of the element. TRUE if it's enabled, FALSE if it's disabled.
virtual const IPoint2& GetSize ( ) [pure virtual]
Remarks:
This method is used internally.

This method returns the element's size in the menu's coordinate space.
virtual const Box2& GetRect ( ) [pure virtual]
Remarks:
This method is used internally.

This method returns the element's rectangle size in the menu's coordinate space.
virtual bool IsInRect ( const IPoint2 point ) [pure virtual]
Remarks:
This method is used internally.

This method determines if a specific point is inside the element's rectangle.
Parameters:
IPoint2& point

The point to test.
Returns:
TRUE if the point is inside the rectangle, otherwise FALSE.

IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement
IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement IMenuElement