IMenuEvent

The IMenuEvent class provides information about a menu event for the event-handling functions of IMenuHandler.


IMenuEvent - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~IMenuEvent
public:
virtual ~IMenuEvent()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IMenuEvent
public:
IMenuEvent(IEvent& event)

Constructs an IMenuEvent object from the specified event. IMenuHandler::dispatchHandlerEvent constructs objects of this class from an object of the class IEvent and passes the resulting object to its virtual functions.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Information

These members query the menu event information of instances of this class.


[view class]
menuItem
public:
IMenuItem menuItem() const

Returns an object of IMenuItem for the menu item. This function only returns an actual IMenuItem when the IMenuEvent resulted from the user selecting a menu item. If this function is called during any of the other menu actions, an IMenuItem representing an empty itemId 0 is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
menuItemId
public:
unsigned long menuItemId() const

Returns the ID of the menu item. The returned menu item ID can be operated upon by IMenuHandler::menuEnded, IMenuHandler::menuSelected, and IMenuHandler::menuShowing.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
mousePosition
public:
IPoint mousePosition() const

Returns the mouse position at the time the menu event occurred. You can use the value returned as the parameter on IPopUpMenu::show.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

In Motif, the Open Class Library maps the mouse position to the coordinates of the IWindow over which the mouse click occurred.

OS/2 Considerations

In Presentation Manager, the Open Class Library maps the mouse position to the menu's owner window's coordinates.


IMenuEvent - Inherited Member Functions and Data

Inherited Public Functions

IEvent

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data