home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
ICNREVT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
13KB
|
254 lines
#ifndef _ICNREVT_
#define _ICNREVT_
/*******************************************************************************
* FILE NAME: icnrevt.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* ICnrEvent *
* ICnrEnterEvent *
* ICnrEmphasisEvent
* ICnrHelpEvent *
* ICnrQueryDeltaEvent *
* ICnrScrollEvent *
* ICnrPaintBackground *
* *
* COPYRIGHT: *
* (C) Copyright IBM Corporation 1992 *
* All Rights Reserved *
* Licensed Materials * Property of IBM *
* *
* HISTORY: *
*******************************************************************************/
#ifndef _ICTLEVT_
#include <ictlevt.hpp>
#endif
#ifndef _ICNROBJ_
#include <icnrobj.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward Declarations
class ICnrEnterEvent;
class ICnrEvent;
class ICnrHelpEvent;
class ICnrQueryDeltaEvent;
class IContainerObject;
class IContainerControl;
class IContainerColumn;
class ICnrEvent : public IControlEvent
{
typedef IControlEvent Inherited;
/*******************************************************************************
* The ICnrEvent class forms the base of the container event classes. *
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| The only way to construct an instance of this class is from the |
| IControlEvent class. |
------------------------------------------------------------------------------*/
ICnrEvent ( IControlEvent& evt);
~ICnrEvent ( );
protected:
/*----------------------------- Implementation ---------------------------------
| This function is used to implement the class: |
| containerId - Returns the control identifier for the container. |
------------------------------------------------------------------------------*/
unsigned long
containerId ( ) const;
};
class ICnrEnterEvent : public ICnrEvent
{
typedef ICnrEvent Inherited;
/*******************************************************************************
* The ICnrEnterEvent class is dispatched when an Enter operation occurs in the *
* container. This can be as a result of: *
* - The Enter key, or *
* - A double click of the mouse select button. *
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| The only way to construct an instance of this class is by |
| ICnrHandler::dispatchHandlerEvent from an IControlEvent in response to an |
| Enter notification from the container. |
------------------------------------------------------------------------------*/
ICnrEnterEvent ( IControlEvent& evt);
~ICnrEnterEvent ();
/*-------------------------------- Accessors -----------------------------------
| These functions provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| object - Returns the object over which the Enter occurred. If the |
| Enter occurred on the container white space, 0 is returned. |
| enterPressed - Returns true if the event was the result of the keyboard |
| Enter key. Otherwise the event occurred because the select |
| button was double clicked. |
| validObject - Returns true if the event occurred over an object. |
------------------------------------------------------------------------------*/
IContainerObject
*object ( );
Boolean
enterPressed ( ) const,
validObject ( ) const;
};
class ICnrEmphasisEvent : public ICnrEvent
{
typedef ICnrEvent Inherited;
/*******************************************************************************
* The ICnrEmphasisEvent class is dispatched whenever a container record's *
* attributes change. Emphasis is a visable indication of the condition of an *
* object that can affect the ability of a user to interact with that object. *
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| Instances of this class are typically constructed by the |
| ICnrHandler::dispatchHandlerEvent function from an IControlEvent in |
| response to a change in emphasis notification from a container. |
------------------------------------------------------------------------------*/
ICnrEmphasisEvent ( IControlEvent& evt);
~ICnrEmphasisEvent ( );
/*-------------------------------- Accessors -----------------------------------
| These functions provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| object - Returns the object that has changed its emphasis. |
| changed - Returns true if the passed emphasis value has changed. |
------------------------------------------------------------------------------*/
Boolean
changed ( IContainerObject::Emphasis) const;
IContainerObject
*object ( );
};
class ICnrQueryDeltaEvent : public ICnrEvent
{
typedef ICnrEvent Inherited;
/*******************************************************************************
* An instance of the ICnrQueryDeltaEvent class is dispatched when the delta *
* value is reached in the container. *
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| The only way to construct an instance of this class is by |
| ICnrHandler::dispatchHandlerEvent from an IControlEvent in response to a |
| notification from the container that the pre-set delta value has been |
| reached. |
------------------------------------------------------------------------------*/
ICnrQueryDeltaEvent ( IControlEvent& evt);
~ICnrQueryDeltaEvent ( );
/*-------------------------------- Accessors -----------------------------------
| These functions provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| atTopDelta - Returns true if the object that represents the delta |
| value scrolls into view at the top of the client area. |
| atBottomDelta - Returns true if the object that represents the delta |
| value scrolls into view at the bottom of the client area. |
| atFirstObject - Returns true if the container has scrolled to the first |
| object in the container. |
| atLastObject - Returns true if the container has scrolled to the last |
| object in the container. |
------------------------------------------------------------------------------*/
Boolean
atTopDelta ( ) const,
atBottomDelta ( ) const,
atFirstObject ( ) const,
atLastObject ( ) const;
};
class ICnrScrollEvent : public ICnrEvent
{
typedef ICnrEvent Inherited;
/*******************************************************************************
* The ICnrScrollEvent class is dispatched when scrolling is requested in the *
* container. *
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| The only way to construct an instance of this class is by |
| ICnrHandler::dispatchHandlerEvent from an IControlEvent in response to a |
| notification from the container that one of the container's windows has |
| been scrolled. |
------------------------------------------------------------------------------*/
ICnrScrollEvent ( IControlEvent& chpevt);
~ICnrScrollEvent ( );
/*-------------------------------- Accessors -----------------------------------
| These functions provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| amount - Returns the amount the window has scrolled, in pixels. |
| isLeftDetails - Returns true if the scrolling occurred in the left (or |
| only) side of the details view. |
| isRightDetails - Returns true if the scrolling occurred in the right side |
| of a split details view. |
| isHorizontal - Returns true if scrolling in the horizontal direction. |
| isVertical - Returns true if scrolling in the vertical direction. |
------------------------------------------------------------------------------*/
long
amount ( ) const;
Boolean
isLeftDetails ( ) const,
isRightDetails ( ) const,
isHorizontal ( ) const,
isVertical ( ) const;
};
class ICnrHelpEvent : public ICnrEvent
{
typedef ICnrEvent Inherited;
/*******************************************************************************
* The ICnrHelpEvent class is dispatched when help is requested in the *
* container. *
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| Instances of this class are typically constructed by the function |
| ICnrHandler::dispatchHandlerEvent from an IControlEvent in response to a |
| notification by the container that the user has requested help. |
------------------------------------------------------------------------------*/
ICnrHelpEvent ( IControlEvent& chpevt);
~ICnrHelpEvent ( );
/*-------------------------------- Accessors -----------------------------------
| This function provides a means of getting and setting the accessible |
| attributes of instances of this class: |
| object - Returns the object over which help is requested. |
| column - Returns the column that was being edited if help was |
| requested within a multiple-line entry field; otherwise, |
| 0 is returned. |
------------------------------------------------------------------------------*/
IContainerObject
*object ( ) ;
IContainerColumn
*column ( ) ;
};
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif /* _ICNREVT_ */