home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
ICMDEVT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
4KB
|
89 lines
#ifndef _ICMDEVT_
#define _ICMDEVT_
/*******************************************************************************
* FILE NAME: icmdevt.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* ICommandEvent - the command event 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. *
* *
*******************************************************************************/
// Forward declarations for other classes:
#ifndef _IEVENT_
#include <ievent.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
class ICommandEvent : public IEvent {
typedef IEvent
Inherited;
/*******************************************************************************
* The ICommandEvent class represents an application-specific or system
* command. Instances of this class are constructed and processed by the
* ICommandHandler class, typically as a result of the user selecting a push *
* button or menu item. *
*******************************************************************************/
public:
/*------------------------------- Constructor ----------------------------------
| The only way to construct instances of this class is from an instance of |
| IEvent. The event class instance is used to create the ICommandEvent |
| instance. |
------------------------------------------------------------------------------*/
ICommandEvent ( IEvent& event );
~ICommandEvent ( );
/*-------------------------------- Accessors -----------------------------------
| These functions provide means of getting and setting the accessible |
| attributes of instances of this class: |
| Source - Identifies the origin of the command event. |
| source - Returns the enumerator that corresponds to the way in which |
| the command event was initiated. |
| commandId - Returns the push button ID, menu item ID, or other command |
| ID of the button, menu, or other object that initiated the |
| command event. |
| isFromFrame - Returns whether the event has already been dispatched to the |
| frame window, and consequently whether it should again be |
| dispatched to the frame. |
------------------------------------------------------------------------------*/
enum Source
{
pushButton,
menu,
accelerator,
unknown
};
Source
source ( ) const;
unsigned long
commandId ( ) const;
Boolean
isFromFrame ( ) const;
}; // ICommandEvent
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
/*----------------------------- Inline Functions -----------------------------*/
#ifndef I_NO_INLINES
#include <icmdevt.inl>
#endif
#endif /* _ICMDEVT_ */