home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IEVENT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
5KB
|
120 lines
#ifndef _IEVENT_
#define _IEVENT_
/*******************************************************************************
* FILE NAME: ievent.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* IEvent - The base event information class *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _IVBASE_
#include <ivbase.hpp>
#endif
#ifndef _IEVTDATA_
#include <ievtdata.hpp>
#endif
#ifndef _IHANDLE_
#include <ihandle.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward declarations for other classes:
class IWindow;
class IEvent : public IVBase {
typedef IVBase
Inherited;
/*******************************************************************************
* The IEvent class is the base event information class. *
*******************************************************************************/
public:
/*------------------------------- Constructors ---------------------------------
| You can construct instances of this class in the following ways: |
| - From an IHandle instance, an event ID, an instance of IEventParameter1, |
| and an instance of IEventParameter2. |
| - From an IWindow instance, an event ID, an instance of IEventParameter1, |
| and an instance of IEventParameter2. |
------------------------------------------------------------------------------*/
IEvent ( const IHandle &handle,
unsigned long eventId,
const IEventParameter1 ¶meter1,
const IEventParameter2 ¶meter2 );
IEvent ( IWindow* window,
unsigned long eventId,
const IEventParameter1 ¶meter1,
const IEventParameter2 ¶meter2 );
IEvent ( const IEvent& event );
~IEvent ( );
/*-------------------------------- Accessors -----------------------------------
| The following functions provide means of getting and setting the accessible |
| attributes of instances of this class: |
| window - Returns a pointer to the IWindow object to which the event |
| has been dispatched. |
| handle - Returns the IWindowHandle object for the IWindow object to |
| which the event has been dispatched. |
| eventId - Returns the ID for the event. |
| parameter1 - Returns the first event parameter. |
| parameter2 - Returns the second event parameter. |
| result - Returns the event result. |
| setResult - Sets the event result. |
------------------------------------------------------------------------------*/
IWindow
*window ( ) const;
IWindowHandle
handle ( ) const;
unsigned long
eventId ( ) const;
IEventParameter1
parameter1 ( ) const;
IEventParameter2
parameter2 ( ) const;
IEventResult
result ( ) const;
IEvent
&setResult ( const IEventResult& eventResult );
private:
/*--------------------------------- Private ----------------------------------*/
IHandle
hCl;
unsigned long
ulClEvtId;
IEventData
epCl1,
epCl2;
IEventResult
erCl;
}; // IEvent
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
/*----------------------------- Inline Functions -----------------------------*/
#ifndef I_NO_INLINES
#include <ievent.inl>
#endif
#endif /* _IEVENT_ */