home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / idmtgtop.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.3 KB  |  109 lines

  1. #ifndef _IDMTGTOP_
  2. #define _IDMTGTOP_
  3. /*******************************************************************************
  4. * FILE NAME: idmtgtop.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IDMTargetOperation                                                       *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #include <idmoper.hpp>
  19.  
  20. class IDMItemSeq;
  21. class IDMImage;
  22. class IDMTargetOperationData;
  23.  
  24. #pragma pack(4)
  25.  
  26. class IDMTargetOperation : public IDMOperation {
  27. typedef IDMOperation
  28.   Inherited;
  29. typedef IDM::DropStyle
  30.   DropStyle;
  31. public:
  32.  
  33. /*------------------------------- Constructors -------------------------------*/
  34.   IDMTargetOperation  ( IDMTargetEnterEvent& event );
  35.  
  36. virtual
  37.   ~IDMTargetOperation ( );
  38.  
  39. /*------------------------ IDMTargetOperation::Handle ------------------------*/
  40. typedef IReference< IDMTargetOperation > Handle;
  41.  
  42. /*----------------------------- Operation Services ---------------------------*/
  43. static IDMTargetOperation::Handle
  44.   instanceFor        ( IDMTargetEnterEvent& event );
  45.  
  46. static IDMTargetOperation::Handle
  47.   targetOperation    ( );
  48.  
  49. static void
  50.   setTargetOperation ( IDMTargetOperation::Handle tgtOperation );
  51.  
  52. virtual Boolean
  53.   firstTimeEntered () const;
  54.  
  55. IDMTargetOperation
  56.  &setFirstTimeEntered ( Boolean  flag );
  57.  
  58. /*---------------------------- Container Support -----------------------------*/
  59. Boolean
  60.   wasDragAfter          ( ) const,
  61.   isStyle               ( DropStyle              dropStyle );
  62.  
  63. IDMTargetOperation
  64.  &setDropOffset         ( const ISize&           newPointerOffset ),
  65.  &setStyle              ( DropStyle              dropStyle );
  66.  
  67. ISize
  68.   dropOffset            ( ) const;
  69.  
  70. DropStyle
  71.   style                 ( ) const;
  72.  
  73. IPoint
  74.   dropPosition          ( const IDMItem::Handle& dragItem,
  75.                           IDMTargetDropEvent&    event ),
  76.   positionRelativeTo    ( const IDMItem::Handle& item,
  77.                           IDMTargetDropEvent&    event );
  78.  
  79. private:
  80. /*--------------------------------- Private ----------------------------------*/
  81.  
  82. friend class IDMTargetHandler;
  83.  
  84. static IDMTargetOperation::Handle
  85.   pDMTgtOpHandle;
  86.  
  87. Boolean
  88.   bWasDragAfter,
  89.   bNotDragLeave,
  90.   bDrop;
  91.  
  92. ISize
  93.   sizeDropOffset;
  94.  
  95. DropStyle
  96.   dropStyle;
  97.  
  98. IDMTargetOperationData
  99.  *fDMTargetOperationData;
  100.  
  101.   Boolean
  102.     bFirstTimeEntered;
  103.  
  104. }; // IDMTargetOperation
  105.  
  106. #pragma pack()
  107.  
  108. #endif //_IDMTGTOP_
  109.