home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IDMCOMM.HPP < prev    next >
C/C++ Source or Header  |  1993-10-22  |  16KB  |  275 lines

  1. #ifndef _IDMCOMM_
  2. #define _IDMCOMM_
  3. /*******************************************************************************
  4. * FILE NAME: idmcomm.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration of the IDM struct which contains the    *
  8. *   following:                                                                 *
  9. *     Enumerations -                                                           *
  10. *       Source           - Drag begin sources.                                 *
  11. *       DropIndicator    - Indicator return during processing of the target    *
  12. *                          enter event.                                        *
  13. *       RenderCompletion - Success or failure of source rendering.             *
  14. *       DragImageStyle   - Possible drag image styles.                         *
  15. *       DropStyle        - Possible container drop styles.                               *
  16. *       DiscardIndicator - Indicates who should accept responsibility for      *
  17. *                          discarding the items.                               *
  18. *       PrintIndicator   - Indicates who should accept responsibility for      *
  19. *                          printing the items.                                 *
  20. *                                                                              *
  21. *     Type Constants -                                                         *
  22. *       any             - Any type                                             *
  23. *       binary          - Generic binary item type                             *
  24. *       binaryData      - Binary data item type                                *
  25. *       bitmap          - Bitmap item type                                     *
  26. *       container       - Container item type                                  *
  27. *       containerObject - Container object item type                           *
  28. *       file            - File item type                                       *
  29. *       icon            - Icon item type                                       *
  30. *       plainText       - Plain text drag item type                            *
  31. *       text            - Generic text drag item type                          *
  32. *       unknown         - Unknown drag item type                               *
  33. *                                                                              *
  34. *     Rendering Mechanisms (RM) Constants -                                    *
  35. *       rmFile    - File support                                               *
  36. *       rmObject  - Object support                                             *
  37. *       rmDiscard - Discard support                                            *
  38. *       rmPrint   - Print support                                              *
  39. *       rmLibrary - UI Class Libraries support                                 *
  40. *       rmAny     - Any support                                                *
  41. *                                                                              *
  42. *     Rendering Formats (RF) Constants -                                       *
  43. *       rfUnknown   - Unknown support                                          *
  44. *       rfText      - Text support                                             *
  45. *       rfProcess   - Process support                                          *
  46. *       rfSharedMem - Shared Memory support                                    *
  47. *       rfAny       - Any support                                              *
  48. *                                                                              *
  49. *     Debug Flag -                                                             *
  50. *                                                                              *
  51. *                                                                              *
  52. * COPYRIGHT:                                                                   *
  53. *   Licensed Materials - Property of IBM                                       *
  54. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  55. *   All Rights Reserved                                                        *
  56. *   US Government Users Restricted Rights - Use, duplication, or               *
  57. *   disclosure                                                                 *
  58. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  59. *                                                                              *
  60. *******************************************************************************/
  61. #ifndef _IBASE_
  62.   #include <ibase.hpp>
  63. #endif
  64.  
  65. /*----------------------------------------------------------------------------*/
  66. /* Align classes on four byte boundary.                                       */
  67. /*----------------------------------------------------------------------------*/
  68. #pragma pack(4)
  69.  
  70. struct IDM {
  71. /*-------------------------------- Enumerations --------------------------------
  72. | These enumerations define various direct manipulation values:                |
  73. |   Source            - Enumeration of the possible drag begin sources:        |
  74. |                         pointingDevice - Drag initiated via mouse.           |
  75. |                         keyboard       - Drag initiated via keyboard.        |
  76. |                                                                              |
  77. |   DropIndicator     - Enumeration of possible drop indicator values:         |
  78. |                         ok             - Drop permitted.                     |
  79. |                         notOk          - Not permitted at this location.     |
  80. |                         operationNotOk - Operation(s) not permitted.         |
  81. |                         neverOk        - Not permitted on this window.       |
  82. |                                                                              |
  83. |   RenderCompletion  - Enumeration of render completion values:               |
  84. |                         retry          - Source has completed the rendering  |
  85. |                                          operation and will allow the        |
  86. |                                          target to retry its part of the     |
  87. |                                          operation if it fails.              |
  88. |                         renderOk       - Source has completed the rendering  |
  89. |                                          operation.                          |
  90. |                         fail           - Source failed to complete the       |
  91. |                                          rendering operation.                |
  92. |                                                                              |
  93. |   DragImageStyle    - Enumeration of the possible styles to be used when     |
  94. |                       displaying the drag images:                            |
  95. |                         stack3AndFade  - Show 3 images in full and then show |
  96. |                                          an image which looks as if the rest |
  97. |                                          fade out.  This is optimal when the |
  98. |                                          user is dragging more than 3 items. |
  99. |                                          Performance is increased by not     |
  100. |                                          having to draw an image for every   |
  101. |                                          item.  The images used are provided |
  102. |                                          by the application and stored in    |
  103. |                                          the individual IDMItem objects      |
  104. |                         allStacked     - Show an image for each drag item.   |
  105. |                                          For many drag items, performance    |
  106. |                                          while dragging could be slow.  (See |
  107. |                                          stack3AndFade) The images used are  |
  108. |                                          provided by the application and     |
  109. |                                          stored in the individual IDMItem    |
  110. |                                          objects.                            |
  111. |                         systemImages   - Use generic system images and       |
  112. |                                          ignore the images in the IDMItem    |
  113. |                                          objects if they are there.  NOTE:   |
  114. |                                          It is not necessary to create       |
  115. |                                          images if this style is used since  |
  116. |                                          they will be ignored.               |
  117. |                                                                              |
  118. |   DropStyle         - Enumeration of the possible styles to be used when     |
  119. |                       dropping on a container:                               |
  120. |                         notContainer    - Target is not a container          |
  121. |                         dropAtPosition  - Drops items at the position they   |
  122. |                                           were in the list.                  |
  123. |                         alignVertical   - Alignment is along the vertical    |
  124. |                                           axis.                              |
  125. |                         alignFlow       - Alignment flows along the window.  |
  126. |                         flowBeside      - Alignment flows beside the window. |
  127. |                                                                              |
  128. |   DiscardIndicator  - Enumeration of possible discard indicator values:      |
  129. |                         sourceDiscards - Source window accepts               |
  130. |                                          responsibility for the operation.   |
  131. |                         targetDiscards - Target window accepts               |
  132. |                                          responsibility for the operation.   |
  133. |                         abortDiscard   - Aborts the entire operation.        |
  134. |                                                                              |
  135. |   PrintIndicator    - Enumeration of possible print indicator values:        |
  136. |                         sourcePrints   - Source window accepts               |
  137. |                                          responsibility for the operation.   |
  138. |                         targetPrints   - Target window accepts               |
  139. |                                          responsibility for the operation.   |
  140. |                         abortPrint     - Aborts the entire operation.        |
  141. ------------------------------------------------------------------------------*/
  142.   enum Source
  143.   {
  144.     pointingDevice,
  145.     keyboard
  146.   };
  147.  
  148.   enum DropIndicator
  149.   {
  150.     notOk          = 0x0000,
  151.     ok             = 0x0001,
  152.     operationNotOk = 0x0002,
  153.     neverOk        = 0x0003
  154.   };
  155.  
  156.   enum RenderCompletion
  157.   {
  158.     retry          = 0x0008,
  159.     renderOk       = 0x0010,
  160.     fail           = 0x0020
  161.   };
  162.  
  163.   enum DragImageStyle
  164.   {
  165.     stack3AndFade,
  166.     allStacked,
  167.     systemImages
  168.   };
  169.  
  170.   enum DropStyle
  171.   {
  172.     notContainer   = 0x0000,
  173.     dropAtPosition = 0x0001,
  174.     alignVertical  = 0x0002,
  175.     alignFlow      = 0x0004,
  176.     flowBeside     = 0x0008
  177.   };
  178.  
  179.   enum DiscardIndicator
  180.   {
  181.     sourceDiscards = 0x0001,
  182.     targetDiscards = 0x0002,
  183.     abortDiscard   = 0x0003
  184.   };
  185.  
  186.   enum PrintIndicator
  187.   {
  188.     sourcePrints   = 0x0001,
  189.     targetPrints   = 0x0002,
  190.     abortPrint     = 0x0003
  191.   };
  192.  
  193. /*------------------------------- Type Constants ------------------------------+
  194. | These static constants define various direct manipulation drag item types:   |
  195. |   any             - Any type                                                 |
  196. |   binary          - Generic binary item type                                 |
  197. |   binaryData      - Binary data item type                                    |
  198. |   bitmap          - Bitmap item type                                         |
  199. |   container       - Container item type                                      |
  200. |   containerObject - Container object item type                               |
  201. |   file            - File item type                                           |
  202. |   icon            - Icon item type                                           |
  203. |   plainText       - Plain text drag item type                                |
  204. |   text            - Generic text drag item type                              |
  205. |   unknown         - Unknown drag item type                                   |
  206. ------------------------------------------------------------------------------*/
  207. typedef const char * const Type;
  208.   static Type
  209.     any,
  210.     binary,
  211.     binaryData,
  212.     bitmap,
  213.     container,
  214.     containerObject,
  215.     file,
  216.     icon,
  217.     plainText,
  218.     text,
  219.     unknown;
  220.  
  221. /*----------------------- Rendering Mechanisms Constants ----------------------+
  222. | These static constants define direct manipulation rendering mechanisms that  |
  223. | we provide support for in the class library:                                 |
  224. |   rmFile    - File rendering mechanism                                       |
  225. |   rmObject  - Object rendering mechanism                                     |
  226. |   rmDiscard - Discard rendering mechanism                                    |
  227. |   rmPrint   - Print rendering mechanism                                      |
  228. |   rmLibrary - UI Class Libraries rendering mechanism                         |
  229. |   rmAny     - Any rendering mechanism                                        |
  230. ------------------------------------------------------------------------------*/
  231. typedef const char * const RM;
  232.   static RM
  233.     rmFile,
  234.     rmObject,
  235.     rmDiscard,
  236.     rmPrint,
  237.     rmLibrary,
  238.     rmAny;
  239.  
  240. /*------------------------- Rendering Formats Constants -----------------------+
  241. | These static constants define direct manipulation rendering formats that we  |
  242. | provide support for in the class library:                                    |
  243. |   rfUnknown   - Unknown rendering format                                     |
  244. |   rfText      - Text rendering mechanism (Used if text length <= 255 and     |
  245. |                 text does not contain embedded NULLs)                        |
  246. |   rfProcess   - Process rendering format ( "="+PID suffix added for inter-   |
  247. |                 process renderering)                                         |
  248. |   rfSharedMem - Shared Memory rendering format                               |
  249. |   rfAny       - Any rendering format                                         |
  250. ------------------------------------------------------------------------------*/
  251. typedef const char * const RF;
  252.   static RF
  253.     rfUnknown,
  254.     rfText,
  255.     rfProcess,
  256.     rfSharedMem,
  257.     rfAny;
  258.  
  259. /*-------------------------------- Debug Support ------------------------------+
  260. | This flag is for debug support:                                              |
  261. |   debugSupport - Set this flag to true to enable full debug support.  The    |
  262. |                  default setting for this flag is false.                     |
  263. ------------------------------------------------------------------------------*/
  264. static Boolean
  265.   debugSupport;
  266.  
  267. };
  268.  
  269. /*----------------------------------------------------------------------------*/
  270. /* Resume compiler default packing.                                           */
  271. /*----------------------------------------------------------------------------*/
  272. #pragma pack()
  273.  
  274. #endif
  275.