home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / uicldd.zip / IDMEVENT.HPP < prev    next >
Text File  |  1993-09-07  |  31KB  |  747 lines

  1. #ifndef _IDMEVENT_
  2. #define _IDMEVENT_
  3. /*******************************************************************************
  4. * FILE NAME: idmevent.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration(s) of the class(es):                    *
  8. *     IDMEvent                                                                 *
  9. *                                                                              *
  10. *     IDMSourceBeginEvent                                                      *
  11. *     IDMSourceRenderEvent                                                     *
  12. *     IDMSourcePrepareEvent                                                    *
  13. *     IDMSourceEndEvent                                                        *
  14. *     IDMSourceNotifyEvent                                                     *
  15. *     IDMSourceDiscardEvent                                                    *
  16. *     IDMSourcePrintEvent                                                      *
  17. *                                                                              *
  18. *     IDMTargetEnterEvent                                                      *
  19. *     IDMTargetDropEvent                                                       *
  20. *     IDMTargetEndEvent                                                        *
  21. *                                                                              *
  22. * COPYRIGHT:                                                                   *
  23. *   Licensed Materials - Property of IBM                                       *
  24. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  25. *   All Rights Reserved                                                        *
  26. *   US Government Users Restricted Rights - Use, duplication, or               *
  27. *   disclosure                                                                 *
  28. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  29. *                                                                              *
  30. * $Log:   M:/ibmclass/idrag/vcs/idmevent.hpv  $
  31. //
  32. //   Rev 1.28   07 Sep 1993 10:42:26   banzai
  33. //Add support for DM_DISCARDOBJECT
  34. //
  35. //   Rev 1.27   06 Sep 1993 13:39:04   banzai
  36. //Add support for DM_DISCARDOBJECT
  37. //
  38. //   Rev 1.26   03 Sep 1993 20:08:26   banzai
  39. //Container related changes
  40. //
  41. //   Rev 1.25   03 Sep 1993 11:19:08   HAGGAR
  42. //Added drag image support and made assorted fixes
  43. //
  44. //   Rev 1.24   01 Sep 1993 10:35:04   banzai
  45. //Massage per container integration
  46. //
  47. //   Rev 1.23   28 Aug 1993 15:52:42   banzai
  48. //Move part of rendering/drop logic into IDMItem
  49. //
  50. //   Rev 1.22   23 Aug 1993 15:34:06   banzai
  51. //Remove User Msg
  52. //
  53. //   Rev 1.21   19 Aug 1993 16:26:26   banzai
  54. //Tune DRAGINFO access
  55. //
  56. //   Rev 1.20   16 Aug 1993 20:20:22   banzai
  57. //Make IDMCOMM stuff into IDM struct
  58. //
  59. //   Rev 1.19   12 Aug 1993 13:52:36   banzai
  60. //Merge source and target item into one
  61. //
  62. //   Rev 1.18   06 Aug 1993 16:40:18   banzai
  63. //Remove pos stuff from constructor per breaking derivedclasses
  64. //
  65. //   Rev 1.17   03 Aug 1993 20:17:30   banzai
  66. //Add support for dropPosition()
  67. //
  68. //   Rev 1.16   03 Aug 1993 20:02:42   banzai
  69. //No change.
  70. //
  71. //   Rev 1.15   02 Aug 1993 15:27:46   HAGGAR
  72. //more rendering changes
  73. //
  74. //   Rev 1.14   26 Jul 1993 19:25:50   banzai
  75. //Design changes per prv/item/rndr
  76. //
  77. //   Rev 1.13   12 Jul 1993 11:31:24   banzai
  78. //Rendering changes
  79. //
  80. //   Rev 1.12   01 Jul 1993 12:23:04   HAGGAR
  81. //rendering changes
  82. //
  83. //   Rev 1.11   30 Jun 1993 10:03:14   banzai
  84. //Fix drag leave breakage
  85. //
  86. //   Rev 1.10   28 Jun 1993 11:46:48   banzai
  87. //Fix traps in handle logic
  88. //
  89. //   Rev 1.9   15 Jun 1993 18:12:54   banzai
  90. //Fix bug in IC_UM_BEGINDRAG
  91. //
  92. //   Rev 1.8   10 Jun 1993 09:25:06   banzai
  93. //Here's the Beef
  94. //
  95. //   Rev 1.7   09 Jun 1993 16:09:00   banzai
  96. //More changes
  97. //
  98. //   Rev 1.6   09 Jun 1993 09:44:36   banzai
  99. //Enable additional events
  100. //
  101. //   Rev 1.5   07 Jun 1993 16:29:04   unknown
  102. //Same oh sam oh
  103. //
  104. //   Rev 1.4   04 Jun 1993 16:39:34   unknown
  105. //Control Enablement
  106. //
  107. //   Rev 1.3   10 May 1993 15:39:36   HAGGAR
  108. //initial bugs
  109. //
  110. //   Rev 1.2   03 May 1993 16:05:46   unknown
  111. //Latest changes per IC_UM_DRAGOVER
  112. //
  113. //   Rev 1.1   30 Apr 1993 11:45:18   HAGGAR
  114. //
  115. //   Rev 1.0   22 Apr 1993 10:41:02   HAGGAR
  116. //Initial revision.
  117. *******************************************************************************/
  118. #ifndef _IEVENT_
  119.   #include <ievent.hpp>
  120. #endif
  121.  
  122. #ifndef _IDMITEM_
  123.   #include <idmitem.hpp>
  124. #endif
  125.  
  126. #ifndef _IDMSRCOP_
  127.   #include <idmsrcop.hpp>
  128. #endif
  129.  
  130. #ifndef _IDMTGTOP_
  131.   #include <idmtgtop.hpp>
  132. #endif
  133.  
  134. #ifndef _IDMCOMM_
  135.   #include <idmcomm.hpp>
  136. #endif
  137.  
  138. typedef IDM::Source            Source;
  139. typedef IDM::DropIndicator     DropIndicator;
  140. typedef IDM::DiscardIndicator  DiscardIndicator;
  141. typedef IDM::PrintIndicator    PrintIndicator;
  142.  
  143. /* Forward Declarations */
  144. struct _DRAGTRANSFER;
  145. struct _DRAGINFO;
  146. struct _DRAGITEM;
  147. struct _PRINTDEST;
  148. class IPoint;
  149. class IWindowHandle;
  150. class IString;
  151.  
  152. class IDMEvent : public IEvent {
  153. /*******************************************************************************
  154. * This is the common base class for all direct manipulation event classes.     *
  155. *******************************************************************************/
  156. public:
  157.  
  158. /*----------------------- Constructor/Destructor ------------------------------|
  159. | Instances of this class are constructed from a generic IEvent and an         |
  160. | IDragInformation handle.                                                     |
  161. |                                                                              |
  162. | The constructor is protected so that this class is effectively an abstract   |
  163. | base class.                                                                  |
  164. ------------------------------------------------------------------------------*/
  165.   IDMEvent     ( const IEvent &event );
  166.  
  167. virtual
  168.   ~IDMEvent    ( );
  169.  
  170. protected:
  171. private: /*------------------------ PRIVATE ----------------------------------*/
  172.  
  173. };
  174.  
  175.  
  176. class IDMSourceBeginEvent : public IDMEvent {
  177. typedef IDMEvent
  178.   Inherited;
  179. /*******************************************************************************
  180. * Objects of this class represent the event that occurs upon initiation        *
  181. * of a direct manipulation event at the source window.  Instances are          *
  182. * passed as argument to the IDMSourceHandler functions setup() and             *
  183. * begin() functions.                                                           *
  184. *******************************************************************************/
  185. public:
  186. /*------------------------- Constructors/Destructor ----------------------------
  187. | Objects of this class are constructed from generic IEvent objects.           |
  188. ------------------------------------------------------------------------------*/
  189.   IDMSourceBeginEvent     ( const IEvent &event );
  190.  
  191. virtual
  192.   ~IDMSourceBeginEvent    ( );
  193.  
  194. /*--------------------------------- Accessors ----------------------------------
  195. | These functions provide means of getting and setting the accessible          |
  196. | attributes of instances of this class:                                       |
  197. |   source        - Returns the source of the drag operation.                  |
  198. |   position      - Returns the pointing device position (only if source is    |
  199. |                   pointingDevice).                                           |
  200. ------------------------------------------------------------------------------*/
  201.  
  202. Source
  203.   source    ( ) const;
  204.  
  205. virtual IPoint
  206.   position  ( ) const;
  207.  
  208. protected:
  209. private: /*------------------------ PRIVATE ----------------------------------*/
  210.  
  211. Source
  212.   src;
  213.  
  214. }; // IDMSourceBeginEvent
  215.  
  216.  
  217. class IDMSourceRenderEvent : public IDMEvent {
  218. typedef IDMEvent
  219.   Inherited;
  220. /*******************************************************************************
  221. * Objects of this class represent direct manipulation "rendering" events.      *
  222. * Such events are created and dispatched to source handlers when a direct      *
  223. * manipulation target handler requests source rendering.                       *
  224. *                                                                              *
  225. * In addition to the standard IEvent attributes (event and window              *
  226. * identifiers), such objects also possess:                                     *
  227. *   o an associated IDragItem                                                  *
  228. *   o a target window handle                                                   *
  229. *   o a rendering mechanism/format selected by the target                      *
  230. *   o a target name                                                            *
  231. *   o an arbitrary target "information" (an unsigned long)                     *
  232. *******************************************************************************/
  233. public:
  234. /*------------------------- Constructors/Destructor ----------------------------
  235. | Objects of this class are constructed from generic IEvent objects.           |
  236. ------------------------------------------------------------------------------*/
  237.   IDMSourceRenderEvent     ( const IEvent &event );
  238.  
  239. virtual
  240.   ~IDMSourceRenderEvent    ( );
  241.  
  242.  
  243. /*-------------------------------- Accessors -----------------------------------
  244. | The following functions provide read/write access to the accessible          |
  245. | attributes of instances of this class:                                       |
  246. |   dragItem          - Returns handle to the IDMItem corresponding to         |
  247. |                       the item being rendered.                               |
  248. |   alternateWindow   - Returns the handle of the alternate source window.     |
  249. |   selectedMechanism - Returns the selected rendering mechanism.              |
  250. |   selectedFormat    - Returns the selected rendering format.                 |
  251. |   targetName        - Returns the target "render to" name.                   |
  252. |   targetInfo        - Returns the target-defined "information."              |
  253. |   setTargetInfo     - Can be used to pass information to the target          |
  254. |   targetWindow      - returns the target window.                             |
  255. |   setTargetInfo     - Can be used to pass information to the target          |
  256. |   canRetry          - Indicates whether renderer processing this event       |
  257. |                       will be allowed to retry if a failure occurs. This     |
  258. |                       flag will be passed to the target via                  |
  259. |                       informTargetOfCompletion().                            |
  260. |   setRetry          - Sets the retry flag.                                   |
  261. |   completion        - Returns the flag which indicates a successful          |
  262. |                       completion or not.  This flag will be passed to the    |
  263. |                       target via informTargetOfCompletion().                 |
  264. |   setCompletion     - Sets the completion flag.                              |
  265. ------------------------------------------------------------------------------*/
  266. IDMItemHandle
  267.   dragItem          ( ) const;
  268.  
  269. IWindowHandle
  270.   alternateWindow   ( ) const;
  271.  
  272. IString
  273.   selectedMechanism ( ) const,
  274.   selectedFormat    ( ) const,
  275.   targetName        ( ) const;
  276.  
  277. unsigned long
  278.   targetInfo        ( ) const;
  279.  
  280. IWindowHandle
  281.   targetWindow();
  282.  
  283. Boolean
  284.   canRetry          ( ) const;
  285.  
  286. IDMSourceRenderEvent
  287.  &setTargetInfo     ( unsigned long         info ),
  288.  &setRetry          ( Boolean               allowRetry = true ),
  289.  &setCompletion     ( IDM::RenderCompletion code );
  290.  
  291. IDM::RenderCompletion
  292.   completion        ( ) const;
  293.  
  294. protected:
  295. private: /*------------------------ PRIVATE ----------------------------------*/
  296.  
  297. _DRAGTRANSFER
  298.  *pmDragTransfer ();
  299.  
  300. IDMItemHandle
  301.   pDMSrcItemHandle;
  302.  
  303. IWindowHandle
  304.   hwndAltWindow;
  305.  
  306. IString
  307.   strSelMechanism,
  308.   strSelFormat,
  309.   strTgtName;
  310.  
  311. unsigned long
  312.   ulTgtInfo;
  313.  
  314. Boolean
  315.   bRetry;
  316.  
  317. IDM::RenderCompletion
  318.   rcCompletion;
  319.  
  320. _DRAGTRANSFER
  321.  *pPMDragTransfer;
  322.  
  323. IWindowHandle
  324.   tgtWindow;
  325. }; // IDMSourceRenderEvent
  326.  
  327. class IDMSourcePrepareEvent : public IDMSourceRenderEvent {
  328. typedef IDMSourceRenderEvent
  329.   Inherited;
  330. /*******************************************************************************
  331. * These events are sent to the source window when the source renderer for a    *
  332. * given object has indicated such notification is necessary prior to starting  *
  333. * the source rendering of a drag item.                                         *
  334. *                                                                              *
  335. * Objects of this class provide all the "query" functions inherited from       *
  336. * IDMSourceRenderEvent.  In addition, functions are provided to provide        *
  337. * return information to the target:                                            *
  338. *   o an alternate source window that the target should communicate with       *
  339. *     during rendering                                                         *
  340. *   o two result flags indicating whether rendering should be done by the      *
  341. *     target and/or whether the target should retry with a different           *
  342. *     rendering mechanism and format.                                          *
  343. *******************************************************************************/
  344. public:
  345. /*------------------------- Constructors/Destructor ----------------------------
  346. | Objects of this class are constructed from generic IEvent objects.           |
  347. ------------------------------------------------------------------------------*/
  348.   IDMSourcePrepareEvent     ( const IEvent &event );
  349.  
  350. virtual
  351.   ~IDMSourcePrepareEvent    ( );
  352.  
  353.  
  354. /*---------------------------------- Result ------------------------------------
  355. | These functions provide means of specifying render preparation results to    |
  356. | be passed back to the target:                                                |
  357. |   setAlternateWindow   - Sets alternate source window handle.                |
  358. |   targetCanRetry       - Returns current setting of the "retry" flag.        |
  359. |   setTargetCanRetry    - Sets "retry" flag.                                  |
  360. |   noSourceRendering    - Returns current "no source rendering" flag.         |
  361. |   setNoSourceRendering - Sets "no source rendering" flag.                    |
  362. ------------------------------------------------------------------------------*/
  363. virtual Boolean
  364.   targetCanRetry       ( ) const,
  365.   noSourceRendering    ( ) const;
  366.  
  367. virtual IDMSourcePrepareEvent
  368.  &setAlternateWindow   ( const IWindowHandle &window ),
  369.  &setTargetCanRetry    ( Boolean             flag ),
  370.  &setNoSourceRendering ( Boolean             flag );
  371.  
  372. protected:
  373. private: /*------------------------ PRIVATE ----------------------------------*/
  374.  
  375. IWindowHandle
  376.   hwndAltWindow;
  377.  
  378. Boolean
  379.   bTgtCanRetry,
  380.   bNoSrcRendering;
  381.  
  382. _DRAGTRANSFER
  383.  *pPMDragTransfer;
  384.  
  385. }; // IDMSourcePrepareEvent
  386.  
  387. class IDMSourceEndEvent : public IDMEvent {
  388. typedef IDMEvent
  389.   Inherited;
  390. /*******************************************************************************
  391. * These events are sent to the direct manipulation source window when a        *
  392. * target renderer has completed the rendering of a drag item.  One such        *
  393. * event is expected for each of the drag items involved in the direct          *
  394. * manipulation operation.                                                      *
  395. *******************************************************************************/
  396. public:
  397. /*------------------------- Constructors/Destructor ----------------------------
  398. | Objects of this class are constructed from generic IEvent objects.           |
  399. ------------------------------------------------------------------------------*/
  400.   IDMSourceEndEvent     ( const IEvent &event );
  401.  
  402. virtual
  403.   ~IDMSourceEndEvent    ( );
  404.  
  405. /*-------------------------------- Accessors -----------------------------------
  406. | These functions provide access to attributes of instances of this class:     |
  407. |   dragItem            - Returns handle of drag item the target has           |
  408. |                         completed rendering of.                              |
  409. |   wasTargetSuccessful - Returns whether target successfully completed its    |
  410. |                         rendering.                                           |
  411. ------------------------------------------------------------------------------*/
  412. IDMItemHandle
  413.   dragItem             ( ) const;
  414.  
  415. virtual Boolean
  416.   wasTargetSuccessful  ( ) const;
  417.  
  418. protected:
  419. private: /*------------------------ PRIVATE ----------------------------------*/
  420. Boolean
  421.   bWasTgtSuccessful;
  422.  
  423. IDMItemHandle
  424.   pDMSrcItemHandle;
  425.  
  426. }; // IDMSourceEndEvent
  427.  
  428.  
  429. class IDMSourceNotifyEvent : public IDMEvent {
  430. typedef IDMEvent
  431.   Inherited;
  432. /*******************************************************************************
  433. * Events of this class are sent to the source window when the dragged objects  *
  434. * pass over a new potential target window.  The event essentially passes to    *
  435. * the source the result information returned by                                *
  436. * IDMTargetHandler::targetEnter().                                             *
  437. *******************************************************************************/
  438. public:
  439. /*------------------------- Constructors/Destructor ----------------------------
  440. | Objects of this class are constructed from generic IEvent objects.           |
  441. ------------------------------------------------------------------------------*/
  442.   IDMSourceNotifyEvent     ( const IEvent &event );
  443.  
  444. virtual
  445.   ~IDMSourceNotifyEvent    ( );
  446.  
  447. /*-------------------------------- Accessors -----------------------------------
  448. | These functions provide access to attributes of instances of this class:     |
  449. |   dropIndicator    - Returns target indicator of whether drop is permitted.  |
  450. |   defaultOperation - Returns default operation to be used by target.         |
  451. ------------------------------------------------------------------------------*/
  452. virtual DropIndicator
  453.   dropIndicator     ( ) const;
  454.  
  455. virtual unsigned short
  456.   defaultOperation  ( ) const;
  457.  
  458. protected:
  459. private: /*------------------------ PRIVATE ----------------------------------*/
  460. DropIndicator
  461.   dropInd;
  462.  
  463. unsigned short
  464.   op;
  465.  
  466. }; // IDMSourceNotifyEvent
  467.  
  468.  
  469. class IDMSourceDiscardEvent : public IDMEvent {
  470. typedef IDMEvent
  471.   Inherited;
  472. /*******************************************************************************
  473. * Events of this class are sent to the source window when the dragged objects  *
  474. * are dropped on a shredder object.  The event essentially returns an          *
  475. * indicator to the target identifying who has responsibility for deletion of   *
  476. * the item(s) or an indicator that aborts the discard operation.               *
  477. *******************************************************************************/
  478. public:
  479. /*------------------------- Constructors/Destructor ----------------------------
  480. | Objects of this class are constructed from generic IEvent objects.           |
  481. ------------------------------------------------------------------------------*/
  482.   IDMSourceDiscardEvent     ( const IEvent &event );
  483.  
  484. virtual
  485.   ~IDMSourceDiscardEvent    ( );
  486.  
  487. /*-------------------------------- Accessors -----------------------------------
  488. | These functions provide access to attributes of instances of this class:     |
  489. |   dragInfo       - Returns handle to the drag information for this event.    |
  490. |   whoDiscards    - Returns discard indicator that identifies who should      |
  491. |                    delete the item(s).                                       |
  492. |   setWhoDiscards - Set the discard indicator. Identifies whether the source, |
  493. |                    or target should discard, or if the operation should be   |
  494. |                    aborted.  IDM::targetDiscards is the default.             |
  495. ------------------------------------------------------------------------------*/
  496. _DRAGINFO
  497.  *dragInfo        ( ) const;
  498.  
  499. virtual DiscardIndicator
  500.   whoDiscards     ( ) const;
  501.  
  502. IDMSourceDiscardEvent
  503.  &setWhoDiscards  ( DiscardIndicator indicator = IDM::targetDiscards );
  504.  
  505. protected:
  506. private: /*------------------------ PRIVATE ----------------------------------*/
  507.  
  508. DiscardIndicator
  509.   discardInd;
  510.  
  511. }; // IDMSourceDiscardEvent
  512.  
  513.  
  514. class IDMSourcePrintEvent : public IDMEvent {
  515. typedef IDMEvent
  516.   Inherited;
  517. /*******************************************************************************
  518. * Events of this class are sent to the source window when the dragged objects  *
  519. * are dropped on a printer object.  The event essentially returns an           *
  520. * indicator to the target identifying who has responsibility for printing      *
  521. * the item(s) or an indicator that aborts the print operation.                 *
  522. *******************************************************************************/
  523. public:
  524. /*------------------------- Constructors/Destructor ----------------------------
  525. | Objects of this class are constructed from generic IEvent objects.           |
  526. ------------------------------------------------------------------------------*/
  527.   IDMSourcePrintEvent     ( const IEvent &event );
  528.  
  529. virtual
  530.   ~IDMSourcePrintEvent    ( );
  531.  
  532. /*-------------------------------- Accessors -----------------------------------
  533. | These functions provide access to attributes of instances of this class:     |
  534. |   dragInfo         - Returns handle to the drag information for this event.  |
  535. |   printDestination - Returns handle to the print destination for this event. |
  536. |   whoPrints        - Returns print indicator that identifies who should      |
  537. |                      print the item(s).                                      |
  538. |   setWhoPrints     - Set the print indicator. Identifies whether the source, |
  539. |                      or target should print, or if the operation should be   |
  540. |                      aborted.  IDM::targetPrints is the default.             |
  541. ------------------------------------------------------------------------------*/
  542. _DRAGINFO
  543.  *dragInfo          ( ) const;
  544.  
  545. _PRINTDEST
  546.  *printDestination  ( ) const;
  547.  
  548. virtual PrintIndicator
  549.   whoPrints         ( ) const;
  550.  
  551. IDMSourcePrintEvent
  552.  &setWhoPrints      ( PrintIndicator indicator = IDM::targetPrints );
  553.  
  554. protected:
  555. private: /*------------------------ PRIVATE ----------------------------------*/
  556.  
  557. PrintIndicator
  558.   printInd;
  559.  
  560. }; // IDMSourcePrintEvent
  561.  
  562.  
  563. class IDMTargetEnterEvent : public IDMEvent {
  564. typedef IDMEvent
  565.   Inherited;
  566. /*******************************************************************************
  567. * Instances of this class encapsulate direct manipulation events that          *
  568. * occur at the target handler when a drag operation enters a potential         *
  569. * target window.  Target handlers access information about the dragged         *
  570. * items from the associated IDMTargetOperation object                          *
  571. *                                                                              *
  572. * The event result field is of particular importance for these event objects.  *
  573. * The result will indicate whether the dragged object(s) can be dropped on     *
  574. * this target, and if so, what the default operation would be.  This class     *
  575. * provides specialized functions to set the components of the event result.    *
  576. *******************************************************************************/
  577. public:
  578. /*------------------------- Constructors/Destructor ----------------------------
  579. | Objects of this class are constructed from generic IEvent objects.           |
  580. ------------------------------------------------------------------------------*/
  581.   IDMTargetEnterEvent     ( const IEvent &event );
  582.  
  583. virtual
  584.   ~IDMTargetEnterEvent    ( );
  585.  
  586. /*--------------------------------- Accessors ----------------------------------
  587. | These functions provide means of getting and setting the accessible          |
  588. | attributes of instances of this class:                                       |
  589. |   position      - Returns the pointing device position.                      |
  590. ------------------------------------------------------------------------------*/
  591. virtual IPoint
  592.   position    ( ) const;
  593.  
  594. /*---------------------------------- Result ------------------------------------
  595. | These functions provide means of querying and setting the components of      |
  596. | the event result:                                                            |
  597. |   dropIndicator       - Returns indicator of whether drop is allowed.        |
  598. |   setDropIndicator    - Sets indicator of whether drop is allowed.           |
  599. |   defaultOperation    - Returns the default operation for this target.       |
  600. |   setDefaultOperation - Sets the default operation for this target.          |
  601. ------------------------------------------------------------------------------*/
  602. virtual DropIndicator
  603.   dropIndicator        ( ) const;
  604.  
  605. virtual unsigned short
  606.   defaultOperation     ( ) const;
  607.  
  608. IDMTargetEnterEvent
  609.  &setDropIndicator     ( DropIndicator  indicator ),
  610.  &setDefaultOperation  ( unsigned short operation );
  611.  
  612.  
  613. protected:
  614. private: /*------------------------ PRIVATE ----------------------------------*/
  615.  
  616. DropIndicator
  617.   dropInd;
  618.  
  619. unsigned short
  620.   op;
  621.  
  622. }; // IDMTargetEnterEvent
  623.  
  624.  
  625. class IDMTargetDropEvent : public IDMEvent {
  626. typedef IDMEvent
  627.   Inherited;
  628. /*******************************************************************************
  629. * Instances of this class encapsulate direct manipulation events that          *
  630. * occur at the target handler when a drop occurs on a target window.           *
  631. * Target handlers access information about the dragged items from the          *
  632. * stored IDMTargetOperation object that was created as part of the             *
  633. * IDMTargetEnterEvent processing.                                              *
  634. *******************************************************************************/
  635. public:
  636. /*------------------------- Constructors/Destructor ----------------------------
  637. | Objects of this class are constructed from generic IEvent objects.           |
  638. ------------------------------------------------------------------------------*/
  639.   IDMTargetDropEvent     ( const IEvent &event );
  640.  
  641. virtual
  642.   ~IDMTargetDropEvent    ( );
  643.  
  644. /*--------------------------------- Accessors ----------------------------------
  645. | This function provides means of getting and setting the accessible           |
  646. | attributes of instances of this class:                                       |
  647. |   dropPosition  - Returns the position, expressed in desktop coordinates,    |
  648. |                   where the drop occurred.                                   |
  649. ------------------------------------------------------------------------------*/
  650. virtual IPoint
  651.   dropPosition    ( ) const;
  652.  
  653.  
  654. protected:
  655. /*--------------------------------- Accessors ----------------------------------
  656. | This function provides means of setting the accessible attributes of         |
  657. | of instances of this class:                                                  |
  658. |   setDropPosition  - Sets the position, expressed in desktop coordinates,    |
  659. |                      where the drop occurred.                                |
  660. ------------------------------------------------------------------------------*/
  661. virtual IDMTargetDropEvent
  662.  &setDropPosition    ( const IPoint &position );
  663.  
  664. private: /*------------------------ PRIVATE ----------------------------------*/
  665.  
  666. IPoint
  667.   pos;
  668.  
  669. }; // IDMTargetDropEvent
  670.  
  671.  
  672. class IDMTargetEndEvent : public IDMEvent {
  673. typedef IDMEvent
  674.   Inherited;
  675. /*******************************************************************************
  676.   These events occur when the source window has completed rendering of a
  677.   given drag item, and has indicated so to the target.  The event provides
  678.   source window information about the item rendering results.
  679. *******************************************************************************/
  680. public:
  681. /*------------------------- Constructors/Destructor ----------------------------
  682. | Objects of this class are constructed from generic IEvent objects.           |
  683. ------------------------------------------------------------------------------*/
  684.   IDMTargetEndEvent     ( const IEvent &event );
  685.  
  686. virtual
  687.   ~IDMTargetEndEvent    ( );
  688.  
  689.  
  690. /*--------------------------------- Accessors ----------------------------------
  691. | This function provides means of getting and setting the accessible           |
  692. | attributes of instances of this class:                                       |
  693. |   dragItem        - Returns handle of the drag item that source has          |
  694. |                     completed renderering.                                   |
  695. |   alternateWindow - Returns the handle of the alternate source window.       |
  696. ------------------------------------------------------------------------------*/
  697. IDMItemHandle
  698.   dragItem          ( ) const;
  699.  
  700. IWindowHandle
  701.   alternateWindow   ( ) const;
  702.  
  703. /*---------------------------------- Result ------------------------------------
  704.   These functions provide access to rendering result information returned
  705.   by the source window:
  706.     renderingFailed - Source is unable to perform the rendering operation.
  707.                       The target may be allowed to retry, but if it
  708.                       chooses not to, it must call informSourceOfCompletion()
  709.                       to end the operation.
  710.     targetCanRetry  - Source has completed the rendering operation and will
  711.                       allow the target to retry its part of the operation
  712.                       if it fails.
  713. ------------------------------------------------------------------------------*/
  714. virtual Boolean
  715.   renderingFailed    ( ) const,
  716.   targetCanRetry     ( ) const;
  717.  
  718. protected:
  719. private: /*------------------------ PRIVATE ----------------------------------*/
  720. friend class IDMTargetRenderer;
  721.  
  722. IDMItemHandle
  723.   targetItemFromPM (_DRAGITEM *pDragItem);
  724.  
  725. IDMItemHandle
  726.   pDMTgtItemHandle;
  727.  
  728. unsigned short
  729.   usCompletion;
  730.  
  731. IWindowHandle
  732.   hwndAltWindow;
  733.  
  734. _DRAGTRANSFER
  735.  *pPMDragTransfer;
  736.  
  737. _DRAGTRANSFER
  738.   *pmDragTransfer();
  739.  
  740. }; // IDMTargetEndEvent
  741.  
  742. #ifndef I_NO_INLINES
  743.   #include <idmevent.inl>
  744. #endif
  745.  
  746. #endif //_IDMEVENT_
  747.