home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
uicldd.zip
/
IDMCNREV.HPP
< prev
next >
Wrap
Text File
|
1993-09-03
|
12KB
|
281 lines
#ifndef _IDMCNREV_
#define _IDMCNREV_
/*******************************************************************************
* FILE NAME: idmcnrev.hpp *
* *
* DESCRIPTION: *
* This file contains the definition of the following container direct *
* manipulation event classes: *
* *
* Declaration of the classes: *
* IDMCnrInitEvent - Container drag-init event. *
* IDMCnrOverAfterEvent - Container drag-over and drag-after events. *
* IDMCnrDropEvent - Container drop-on event. *
* *
* *
* 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. *
* *
* $Log: M:/ibmclass/idrag/vcs/idmcnrev.hpv $ *
//
// Rev 1.1 03 Sep 1993 20:08:20 banzai
//Container related changes
//
// Rev 1.0 02 Sep 1993 20:29:58 banzai
//Initial Drop
//
// Rev 1.0 03 Aug 1993 20:21:50 banzai
//First pass at CNR DM events
//
*******************************************************************************/
#ifndef _ICTLEVT_
#include <ictlevt.hpp>
#endif
#ifndef _ICNRCTL_
#include <icnrctl.hpp>
#endif
#ifndef _ICNROBJ_
#include <icnrobj.hpp>
#endif
#ifndef _IDMEVENT_
#include <idmevent.hpp>
#endif
/* Forward Declarations */
struct _CNRDRAGINIT;
struct _CNRDRAGINFO;
struct _DRAGINFO;
class IDMCnrItemHandle;
class IDMCnrInitEvent : public IDMSourceBeginEvent {
typedef IDMSourceBeginEvent
Inherited;
/*******************************************************************************
* Objects of this class represent the event that occurs upon initiation *
* of a direct manipulation event within a source container. *
* *
* EXAMPLE: *
* *
* Provide example here! *
* *
*******************************************************************************/
public:
/*-----------------------------------------------------------------------------+
| Objects of this class are constructed from generic IControlEvent objects. |
------------------------------------------------------------------------------*/
IDMCnrInitEvent ( const IControlEvent &controlEvent );
virtual
~IDMCnrInitEvent ( );
/*--------------------------------- Accessors ---------------------------------+
| These methods provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| containerId - Returns the source container's ID. |
| object - Returns a pointer to the object over which the drag |
| started. Returns 0 if drag started over container |
| "white space". |
| container - Returns a pointer to the source container for which the |
| event occurred. |
| pointerOffset - Returns the position of the pointing device relative to |
| the source container object's origin. |
+-----------------------------------------------------------------------------*/
unsigned short
containerId ( ) const;
IContainerObject
*object ( ) const;
IContainerControl
*container ( ) const;
ISize
pointerOffset ( ) const;
/*---------------------------------- Overrides --------------------------------+
| This class overrides the following inherited methods: |
| position - Returns the pointing device position (only if source is |
| pointingDevice). |
+-----------------------------------------------------------------------------*/
virtual IPoint
position ( ) const;
protected:
private: /*------------------------ PRIVATE ----------------------------------*/
IPoint
pos;
ISize
offset;
unsigned short
usCnrId;
IContainerControl
*pCnrCtl;
_CNRDRAGINIT
*pCnrDragInit;
}; // IDMCnrInitEvent
class IDMCnrOverAfterEvent : public IDMTargetEnterEvent {
typedef IDMTargetEnterEvent
Inherited;
/*******************************************************************************
* Objects of this class implement the target container's drag-over and *
* drag-after events. *
* *
* EXAMPLE: *
* *
* Provide example here! *
* *
*******************************************************************************/
public:
/*-----------------------------------------------------------------------------+
| Objects of this class are constructed from generic IControlEvent objects. |
------------------------------------------------------------------------------*/
IDMCnrOverAfterEvent ( const IControlEvent &controlEvent );
virtual
~IDMCnrOverAfterEvent ( );
/*--------------------------------- Accessors ---------------------------------+
| These methods provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| isDragAfter - Queries whether the event is a drag-after or drag-over |
| event. |
| isAboveFirst - Queries whether drag-after has occurred above the first |
| object in the list. |
| containerId - Returns the target container's ID. |
| object - Returns a pointer to the object over which the drag-after |
| or drag-over event occurred. Returns 0 if drag was |
| over container "white space". |
| container - Returns a pointer to the container where the drag-after |
| or drag-over event occurred. |
+-----------------------------------------------------------------------------*/
Boolean
isDragAfter ( ) const,
isAboveFirst ( ) const;
unsigned short
containerId ( ) const;
IContainerObject
*object ( ) const;
IContainerControl
*container ( ) const;
/*---------------------------------- Overrides --------------------------------+
| This class overrides the following inherited methods: |
| position - Returns the pointing device position (only if source is |
| pointingDevice). |
+-----------------------------------------------------------------------------*/
virtual IPoint
position ( ) const;
protected:
private: /*------------------------ PRIVATE ----------------------------------*/
Boolean
bDragAfter;
unsigned short
usCnrId;
IContainerControl
*pCnrCtl;
_CNRDRAGINFO
*pCnrDragInfo;
}; // IDMCnrOverAfterEvent
class IDMCnrDropEvent : public IDMTargetDropEvent {
typedef IDMTargetDropEvent
Inherited;
/*******************************************************************************
* Objects of this class implement the target container's drag-on event. *
* *
* EXAMPLE: *
* *
* Provide example here! *
* *
*******************************************************************************/
public:
/*-----------------------------------------------------------------------------+
| Objects of this class are constructed from generic IControlEvent objects. |
------------------------------------------------------------------------------*/
IDMCnrDropEvent ( const IControlEvent &controlEvent );
virtual
~IDMCnrDropEvent ( );
/*--------------------------------- Accessors ---------------------------------+
| These methods provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| containerId - Returns the target container's ID. |
| object - Returns a pointer to the object over which the drop-on |
| event occurred. Returns 0 if drop was on container |
| "white space". |
| container - Returns a pointer to the container where the drop-on |
| event occurred. |
| position - Returns a drag item's position relative to the target |
| container. If the item pointer is 0, the drop point |
| relative to the container is returned. |
+-----------------------------------------------------------------------------*/
unsigned short
containerId ( ) const;
IContainerObject
*object ( ) const;
IContainerControl
*container ( ) const;
virtual IPoint
position ( const IDMCnrItemHandle &item ) const;
protected:
private: /*------------------------ PRIVATE ----------------------------------*/
unsigned short
usCnrId;
IContainerControl
*pCnrCtl;
_CNRDRAGINFO
*pCnrDragInfo;
}; // IDMCnrDropEvent
/*--------------------------------- INLINES ----------------------------------*/
#ifndef I_NO_INLINES
#include <idmcnrev.inl>
#endif
#endif // _IDMCNREV_