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

  1. #ifndef _IDMEFIT_
  2. #define _IDMEFIT_
  3. /*******************************************************************************
  4. * FILE NAME: idmefit.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration(s) of the class(es):                    *
  8. *     IDMEFItem - Direct manipulation entry field item class.                  *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or               *
  15. *   disclosure                                                                 *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _IDMITEM_
  20.   #include <idmitem.hpp>
  21. #endif
  22.  
  23. /*----------------------------------------------------------------------------*/
  24. /* Align classes on four byte boundary.                                       */
  25. /*----------------------------------------------------------------------------*/
  26. #pragma pack(4)
  27.  
  28. /* Forward Declarations */
  29. class IDMSourceOperation;
  30.  
  31.  
  32. class IDMEFItem : public IDMItem {
  33. typedef IDMItem
  34.   Inherited;
  35. /*******************************************************************************
  36. * Objects of this class are created by entry fields when a direct manipulation *
  37. * operation commences in an source entry field and during a direct             *
  38. * manipulation operation when a text object is dropped on a target entry      .*
  39. * field.                                                                       *
  40. *                                                                              *
  41. * Objects of this class possess the following attributes (in addition to       *
  42. * those inherited from its base class):                                        *
  43. *   o association with a source or target drag operation object.               *
  44. *   o association with IDM::rmLibrary rendering mechanism and IDM::rfProcess   *
  45. *     rendering format.  If the text size is <= 255 bytes, and the             *
  46. *     IDM::rmFile rendering mechanism is not used, we add the IDM::rfText      *
  47. *     rendering format.  Otherwise, we add the IDM::rfSharedMem                *
  48. *     rendering format.                                                        *
  49. *                                                                              *
  50. * This class provides virtual functions that implement support for direct      *
  51. * manipulation (i.e. drag drop) entry field text items.                        *
  52. *******************************************************************************/
  53. public:
  54.  
  55. /*------------------------- Constructors/Destructor ----------------------------
  56. | Objects of this class are constructed in the following manner:               |
  57. |   o By providing a pointer to the drag source operation.                     |
  58. |   o By providing a reference to a generic drag item handle.                  |
  59. ------------------------------------------------------------------------------*/
  60.   IDMEFItem   ( IDMSourceOperation    *sourceOperation );
  61.  
  62.   IDMEFItem   ( const IDMItem::Handle &dragItem );
  63.  
  64. virtual
  65.   ~IDMEFItem  ( );
  66.  
  67.  
  68. /*------------------------------ Source Items ----------------------------------
  69. | This function generates source items:                                        |
  70. |   generateSourceItems - Generates entry field text items based upon data in  |
  71. |                         the source entry field window.                       |
  72. ------------------------------------------------------------------------------*/
  73. static Boolean
  74.   generateSourceItems    ( IDMSourceOperation *sourceOperation );
  75.  
  76. /*-------------------------------- Accessors -----------------------------------
  77. | This function provides access to text per an entry field direct              |
  78. | manipulation operation:                                                      |
  79. |   object       - Returns a pointer to the item text.                         |
  80. ------------------------------------------------------------------------------*/
  81. virtual void
  82.  *object          ( ) const;
  83.  
  84. /*------------------------------ Drop Processing -------------------------------
  85. | This function writes data to the target window:                              |
  86. |   targetDrop - Writes text into entry field from drag item.                  |
  87. ------------------------------------------------------------------------------*/
  88. virtual Boolean
  89.   targetDrop    ( IDMTargetDropEvent & );
  90.  
  91. protected:
  92. private: /*------------------------ PRIVATE ----------------------------------*/
  93.  
  94. }; // IDMEFItem
  95.  
  96. /*----------------------------------------------------------------------------*/
  97. /* Resume compiler default packing.                                           */
  98. /*----------------------------------------------------------------------------*/
  99. #pragma pack()
  100.  
  101. #endif // _IDMEFIT_
  102.