home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IMENUEVT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
4KB
|
77 lines
#ifndef _IMENUEVT_
#define _IMENUEVT_
/******************************************************************************
* FILE NAME: imenuevt.hpp *
* *
* DESCRIPTION: *
* Declaration of the class: *
* IMenuEvent - Menu event informantion class. *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (c) Copyright IBM Corporation 1992, 1993 *
* US Government Users Restricted Rights - Use duplication *
* or disclosure restricted by GSA ADP Schedule Contract *
* with IBM Corp. *
* *
*******************************************************************************/
#ifndef _IEVENT_
#include <ievent.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward declarations for other classes
class IPoint;
class IMenuItem;
class IMenuEvent : public IEvent {
typedef IEvent
Inherited;
/*******************************************************************************
* The IMenuEvent class is used to provide information about a menu event for *
* the IMenuHandler event handling functions. *
*******************************************************************************/
public:
/*-------------------------- Constructor ---------------------------------------
| The only way to construct instances of this class is with an instance of |
| the IEvent class. |
------------------------------------------------------------------------------*/
IMenuEvent (IEvent& event);
~IMenuEvent ( );
/*-------------------------- Accessor ------------------------------------------
| The following functions provides a mean to query the menu event information |
| of instances of this class. |
| |
| menuItemId - Returns the ID of the menu item. |
| menuItem - Returns an instance of IMenuItem for the menu item. |
| This function can only return an actual IMenuItem when |
| called using the IMenuEvent that is passed as an argument |
| on IMenuHandler::menuSelected. If called for the other |
| virtual functions, such as makePopUpMenu or menuEnded, an |
| empty IMenuItem for itemId 0 is returned. |
| mousePosition - Returns the mouse position at the time the menu event |
| occurred. The position is mapped to the menu's owner |
| window coordinates. |
------------------------------------------------------------------------------*/
unsigned long
menuItemId ( ) const;
IMenuItem
menuItem ( ) const;
IPoint
mousePosition ( ) const;
};
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif /* IMENUEVT */