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

  1. #ifndef _IDMMLEIT_
  2. #define _IDMMLEIT_
  3. /*******************************************************************************
  4. * FILE NAME: idmmleit.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration(s) of the class(es):                    *
  8. *     IDMMLEItem - Direct manipulation multi line edit 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 IDMMLEItem : public IDMItem {
  33. typedef IDMItem
  34.   Inherited;
  35. /*******************************************************************************
  36. * Objects of this class are created by MLE's when a direct manipulation        *
  37. * operation commences in an source MLE and during a direct manipulation        *
  38. * operation when a text object is dropped on a target MLE.                     *
  39. *                                                                              *
  40. * Objects of this class possess the following attributes (in addition to       *
  41. * those inherited from its base class):                                        *
  42. *   o association with a source or target drag operation object.               *
  43. *   o association with IDM::rmLibrary rendering mechanism and IDM::rfProcess   *
  44. *     rendering format.  If the text size is <= 255 bytes, and the             *
  45. *     IDM::rmFile rendering mechanism is not used, we add the IDM::rfText      *
  46. *     rendering format.  Otherwise, we add the IDM::rfSharedMem                *
  47. *     rendering format.                                                        *
  48. *                                                                              *
  49. * This class provides virtual functions that implement support for direct      *
  50. * manipulation (i.e. drag drop) mle text items.                                *
  51. *******************************************************************************/
  52. public:
  53.  
  54. /*------------------------- Constructors/Destructor ----------------------------
  55. | Objects of this class are constructed in the following manner:               |
  56. |   o By providing a pointer to the drag source operation.                     |
  57. |   o By providing a reference to a generic drag item handle.                  |
  58. ------------------------------------------------------------------------------*/
  59.   IDMMLEItem  ( IDMSourceOperation    *sourceOperation );
  60.  
  61.   IDMMLEItem  ( const IDMItem::Handle &dragItem );
  62.  
  63. virtual
  64.   ~IDMMLEItem ( );
  65.  
  66.  
  67. /*------------------------------ Source Items ----------------------------------
  68. | This function generates source items:                                        |
  69. |   generateSourceItems - Generates MLE text items based upon data in the      |
  70. |                         source MLE window.                                   |
  71. ------------------------------------------------------------------------------*/
  72. static Boolean
  73.   generateSourceItems    ( IDMSourceOperation *sourceOperation );
  74.  
  75. /*-------------------------------- Accessors -----------------------------------
  76. | This function provides access to generic text per a text oriented direct     |
  77. | manipulation operation:                                                      |
  78. |   object       - Returns a pointer to the item text.                         |
  79. ------------------------------------------------------------------------------*/
  80. virtual void
  81.  *object          ( ) const;
  82.  
  83. /*------------------------------ Drop Processing -------------------------------
  84. | This function writes data to the target window:                              |
  85. |   targetDrop - Writes text into the MLE from drag item.                      |
  86. ------------------------------------------------------------------------------*/
  87. virtual Boolean
  88.   targetDrop    ( IDMTargetDropEvent & );
  89.  
  90. protected:
  91. private: /*------------------------ PRIVATE ----------------------------------*/
  92.  
  93. }; // IDMMLEItem
  94.  
  95. /*----------------------------------------------------------------------------*/
  96. /* Resume compiler default packing.                                           */
  97. /*----------------------------------------------------------------------------*/
  98. #pragma pack()
  99.  
  100. #endif // _IDMMLEIT_
  101.