home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IDMCOMM.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
16KB
|
275 lines
#ifndef _IDMCOMM_
#define _IDMCOMM_
/*******************************************************************************
* FILE NAME: idmcomm.hpp *
* *
* DESCRIPTION: *
* This file contains the declaration of the IDM struct which contains the *
* following: *
* Enumerations - *
* Source - Drag begin sources. *
* DropIndicator - Indicator return during processing of the target *
* enter event. *
* RenderCompletion - Success or failure of source rendering. *
* DragImageStyle - Possible drag image styles. *
* DropStyle - Possible container drop styles. *
* DiscardIndicator - Indicates who should accept responsibility for *
* discarding the items. *
* PrintIndicator - Indicates who should accept responsibility for *
* printing the items. *
* *
* Type Constants - *
* any - Any type *
* binary - Generic binary item type *
* binaryData - Binary data item type *
* bitmap - Bitmap item type *
* container - Container item type *
* containerObject - Container object item type *
* file - File item type *
* icon - Icon item type *
* plainText - Plain text drag item type *
* text - Generic text drag item type *
* unknown - Unknown drag item type *
* *
* Rendering Mechanisms (RM) Constants - *
* rmFile - File support *
* rmObject - Object support *
* rmDiscard - Discard support *
* rmPrint - Print support *
* rmLibrary - UI Class Libraries support *
* rmAny - Any support *
* *
* Rendering Formats (RF) Constants - *
* rfUnknown - Unknown support *
* rfText - Text support *
* rfProcess - Process support *
* rfSharedMem - Shared Memory support *
* rfAny - Any support *
* *
* Debug Flag - *
* *
* *
* 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 _IBASE_
#include <ibase.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
struct IDM {
/*-------------------------------- Enumerations --------------------------------
| These enumerations define various direct manipulation values: |
| Source - Enumeration of the possible drag begin sources: |
| pointingDevice - Drag initiated via mouse. |
| keyboard - Drag initiated via keyboard. |
| |
| DropIndicator - Enumeration of possible drop indicator values: |
| ok - Drop permitted. |
| notOk - Not permitted at this location. |
| operationNotOk - Operation(s) not permitted. |
| neverOk - Not permitted on this window. |
| |
| RenderCompletion - Enumeration of render completion values: |
| retry - Source has completed the rendering |
| operation and will allow the |
| target to retry its part of the |
| operation if it fails. |
| renderOk - Source has completed the rendering |
| operation. |
| fail - Source failed to complete the |
| rendering operation. |
| |
| DragImageStyle - Enumeration of the possible styles to be used when |
| displaying the drag images: |
| stack3AndFade - Show 3 images in full and then show |
| an image which looks as if the rest |
| fade out. This is optimal when the |
| user is dragging more than 3 items. |
| Performance is increased by not |
| having to draw an image for every |
| item. The images used are provided |
| by the application and stored in |
| the individual IDMItem objects |
| allStacked - Show an image for each drag item. |
| For many drag items, performance |
| while dragging could be slow. (See |
| stack3AndFade) The images used are |
| provided by the application and |
| stored in the individual IDMItem |
| objects. |
| systemImages - Use generic system images and |
| ignore the images in the IDMItem |
| objects if they are there. NOTE: |
| It is not necessary to create |
| images if this style is used since |
| they will be ignored. |
| |
| DropStyle - Enumeration of the possible styles to be used when |
| dropping on a container: |
| notContainer - Target is not a container |
| dropAtPosition - Drops items at the position they |
| were in the list. |
| alignVertical - Alignment is along the vertical |
| axis. |
| alignFlow - Alignment flows along the window. |
| flowBeside - Alignment flows beside the window. |
| |
| DiscardIndicator - Enumeration of possible discard indicator values: |
| sourceDiscards - Source window accepts |
| responsibility for the operation. |
| targetDiscards - Target window accepts |
| responsibility for the operation. |
| abortDiscard - Aborts the entire operation. |
| |
| PrintIndicator - Enumeration of possible print indicator values: |
| sourcePrints - Source window accepts |
| responsibility for the operation. |
| targetPrints - Target window accepts |
| responsibility for the operation. |
| abortPrint - Aborts the entire operation. |
------------------------------------------------------------------------------*/
enum Source
{
pointingDevice,
keyboard
};
enum DropIndicator
{
notOk = 0x0000,
ok = 0x0001,
operationNotOk = 0x0002,
neverOk = 0x0003
};
enum RenderCompletion
{
retry = 0x0008,
renderOk = 0x0010,
fail = 0x0020
};
enum DragImageStyle
{
stack3AndFade,
allStacked,
systemImages
};
enum DropStyle
{
notContainer = 0x0000,
dropAtPosition = 0x0001,
alignVertical = 0x0002,
alignFlow = 0x0004,
flowBeside = 0x0008
};
enum DiscardIndicator
{
sourceDiscards = 0x0001,
targetDiscards = 0x0002,
abortDiscard = 0x0003
};
enum PrintIndicator
{
sourcePrints = 0x0001,
targetPrints = 0x0002,
abortPrint = 0x0003
};
/*------------------------------- Type Constants ------------------------------+
| These static constants define various direct manipulation drag item types: |
| any - Any type |
| binary - Generic binary item type |
| binaryData - Binary data item type |
| bitmap - Bitmap item type |
| container - Container item type |
| containerObject - Container object item type |
| file - File item type |
| icon - Icon item type |
| plainText - Plain text drag item type |
| text - Generic text drag item type |
| unknown - Unknown drag item type |
------------------------------------------------------------------------------*/
typedef const char * const Type;
static Type
any,
binary,
binaryData,
bitmap,
container,
containerObject,
file,
icon,
plainText,
text,
unknown;
/*----------------------- Rendering Mechanisms Constants ----------------------+
| These static constants define direct manipulation rendering mechanisms that |
| we provide support for in the class library: |
| rmFile - File rendering mechanism |
| rmObject - Object rendering mechanism |
| rmDiscard - Discard rendering mechanism |
| rmPrint - Print rendering mechanism |
| rmLibrary - UI Class Libraries rendering mechanism |
| rmAny - Any rendering mechanism |
------------------------------------------------------------------------------*/
typedef const char * const RM;
static RM
rmFile,
rmObject,
rmDiscard,
rmPrint,
rmLibrary,
rmAny;
/*------------------------- Rendering Formats Constants -----------------------+
| These static constants define direct manipulation rendering formats that we |
| provide support for in the class library: |
| rfUnknown - Unknown rendering format |
| rfText - Text rendering mechanism (Used if text length <= 255 and |
| text does not contain embedded NULLs) |
| rfProcess - Process rendering format ( "="+PID suffix added for inter- |
| process renderering) |
| rfSharedMem - Shared Memory rendering format |
| rfAny - Any rendering format |
------------------------------------------------------------------------------*/
typedef const char * const RF;
static RF
rfUnknown,
rfText,
rfProcess,
rfSharedMem,
rfAny;
/*-------------------------------- Debug Support ------------------------------+
| This flag is for debug support: |
| debugSupport - Set this flag to true to enable full debug support. The |
| default setting for this flag is false. |
------------------------------------------------------------------------------*/
static Boolean
debugSupport;
};
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif