home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IDMCNRIT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
6KB
|
119 lines
#ifndef _IDMCNRIT_
#define _IDMCNRIT_
/*******************************************************************************
* FILE NAME: idmcnrit.hpp *
* *
* DESCRIPTION: *
* This file contains the definition of the classes: *
* IDMCnrItem - Container direct manipulation "item" 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 _IDMITEM_
#include <idmitem.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
/* Forward Declarations */
struct _DRAGITEM;
class IContainerControl;
class IContainerObject;
class IDMCnrItem : public IDMItem {
typedef IDMItem
Inherited;
/*******************************************************************************
* Objects of this class are created by containers when a direct manipulation *
* operation commences in a source container and during a direct manipulation *
* operation when a container object is dragged over a potential target *
* container. *
* *
* Objects of this class possess the following attributes (in addition to *
* those inherited from its base class): *
* o Generic buffer (contents) to hold IContainerObject(s) *
* o association with a source or target drag operation object (see *
* IDMSourceOperation or IDMTargetOperation) *
* o association(s) with derived source or target renderer object(s) capable *
* of renderering container objects (see IDMSourceRenderer or *
* IDMTargetRenderer) which are created by the source or handler (see *
* IDMSourceHandler or IDMTargetHandler) *
* *
* This class provides virtual functions that implement support for direct *
* manipulation (i.e. drag drop) container object items. Derived classes *
* can be created to support more specific container object items. *
*******************************************************************************/
public:
/*------------------------- Constructors/Destructor ----------------------------
| Objects of this class are constructed in the following manner: |
| o By providing pointers to the container control, container object, |
| a pointer to the drag source operation, and the image offset. |
| o By providing a reference to a generic drag item handle. |
------------------------------------------------------------------------------*/
IDMCnrItem ( IContainerControl *container,
IContainerObject *object,
IDMSourceOperation *sourceOperation,
const ISize &imageOffset);
IDMCnrItem ( const IDMItem::Handle &dragItem );
virtual
~IDMCnrItem ( );
/*------------------------------ Source Items ----------------------------------
| This function generates source items: |
| generateSourceItems - Generates container object items based upon |
| selected object(s) in the source container. |
------------------------------------------------------------------------------*/
static Boolean
generateSourceItems ( IDMSourceOperation *sourceOperation );
/*--------------------------------- Accessors ---------------------------------+
| These functions provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| containerId - Returns the source container's ID. |
| sourceContainer - Returns the source container. |
+-----------------------------------------------------------------------------*/
virtual unsigned long
containerId ( ) const;
virtual IContainerControl
*sourceContainer ( ) const;
/*------------------------------ Drop Processing -------------------------------
| This function writes data to the target window: |
| targetDrop - Sets container object into target container. |
------------------------------------------------------------------------------*/
virtual Boolean
targetDrop ( IDMTargetDropEvent &event );
protected:
private: /*------------------------ PRIVATE ----------------------------------*/
IContainerControl
*pContainerCtl;
}; // IDMCnrItem
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif // _IDMCNRIT_