home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
uicldd.zip
/
IDMPROVC.HPP
< prev
next >
Wrap
Text File
|
1993-09-02
|
7KB
|
156 lines
#ifndef _IDMPROVC_
#define _IDMPROVC_
/*******************************************************************************
* FILE NAME: idmprovc.hpp *
* *
* DESCRIPTION: *
* This file contains the declaration(s) of the class(es): *
* IDMCnrItemProvider - Base class used to provide container drag items. *
* IDMCnrItemProviderFor - Template class used to provide container drag *
* item to a source handler at commencement of a *
* direct manipulation operation and target handler *
* after a target drop 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/idmprovc.hpv $
//
// Rev 1.0 02 Sep 1993 20:31:12 banzai
//Initial Drop
//
*******************************************************************************/
#ifndef _IDMPROV_
#include <idmprov.hpp>
#endif
#ifndef _ICNRCTL_
#include <icnrctl.hpp>
#endif
#ifndef _ICNROBJ_
#include <icnrobj.hpp>
#endif
/* Forward declarations */
struct _DRAGITEM;
class IDMSrcOperationHandle;
class IDMCnrItemHandle;
class IDMCnrItemProvider : public IDMItemProvider {
typedef IDMItemProvider
Inherited;
/*******************************************************************************
BUGBUG - rewrite the commentary per latest round of changes
*******************************************************************************/
public:
/*------------------------- Constructors/Destructor ----------------------------
| Objects of this class are constructed in the following manner: |
------------------------------------------------------------------------------*/
IDMCnrItemProvider ( );
virtual
~IDMCnrItemProvider ( );
/*--------------------------- Drag Item Provision ------------------------------
provideCnrSourceItems - Called to give provider opportunity to attach
derived IDMCnrItems to the argument
IDMSourceOperation object. This function is
called when a drag operation commences over a
container object. Returns true if items were
provided, false otherwise.
provideCnrTargetItemFor - Called to give provider opportunity to replace
generic IDMCnrItems with a derived class. This
function is called when a drop occurs on a target
container.
------------------------------------------------------------------------------*/
virtual Boolean
provideCnrSourceItems ( const IDMSrcOperationHandle &sourceOperation,
IContainerControl *container,
IContainerObject *containerObject,
const ISize &sizeOffset );
//virtual IDMCnrItemHandle
// provideCnrTargetItemFor ( const IDMCnrItemHandle &dragItem );
virtual IDMItemHandle
provideTargetItemFor ( const IDMItemHandle &dragItem );
protected:
private: /*------------------------ PRIVATE ----------------------------------*/
}; // class IDMCnrItemProvider
template < class T >
class IDMCnrItemProviderFor : public IDMCnrItemProvider {
typedef IDMCnrItemProvider
Inherited;
/*******************************************************************************
BUGBUG - rewrite the commentary per latest round of changes
*******************************************************************************/
public:
/*------------------------- Constructors/Destructor ----------------------------
| Objects of this class are constructed in the following manner: |
------------------------------------------------------------------------------*/
IDMCnrItemProviderFor ( ) {}
virtual
~IDMCnrItemProviderFor ( ) {}
/*--------------------------- Drag Item Provision ------------------------------
provideCnrSourceItems - Defines template that provider uses to attach
derived IDMCnrItems to the argument
IDMSourceOperation object. This function is
called when a drag operation commences over a
container object. Returns true if items were
provided, false otherwise.
provideCnrTargetItemFor - Defines template that provider uses to replace
generic IDMCnrItems with a derived class. This
function is called when a drop occurs on a
target container.
------------------------------------------------------------------------------*/
virtual Boolean
provideCnrSourceItems ( const IDMSrcOperationHandle &sourceOperation,
IContainerControl *container,
IContainerObject *containerObject,
const ISize &sizeOffset )
{
return( T::generateCnrSourceItems( sourceOperation,
container,
containerObject,
sizeOffset ) );
}
//virtual IDMCnrItemHandle
// provideCnrTargetItemFor ( const IDMCnrItemHandle &dragItem )
//{
//
// return( (IDMCnrItemHandle)new T( *dragItem ) );
//}
virtual IDMItemHandle
provideTargetItemFor ( const IDMItemHandle &dragItem )
{
return( (IDMItemHandle)new T( *dragItem ) );
}
protected:
private: /*------------------------ PRIVATE ----------------------------------*/
}; // class IDMCnrItemProviderFor
#endif //_IDMPROVC_