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

  1. #ifndef _IDIEVT_
  2. #define _IDIEVT_
  3. /*******************************************************************************
  4. * FILE NAME: idievt.hpp                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IDrawItemEvent -  The base owner draw-item event information 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 disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #if !defined( _ICTLEVT_ )
  19.   #include <ictlevt.hpp>
  20. #endif
  21. #if !defined( _IHANDLE_ )
  22.   #include <ihandle.hpp>
  23. #endif
  24.  
  25. /*----------------------------------------------------------------------------*/
  26. /* Align classes on four byte boundary.                                       */
  27. /*----------------------------------------------------------------------------*/
  28. #pragma pack(4)
  29.  
  30. // Forward declarations for other classes:
  31. class IRectangle;
  32.  
  33. class IDrawItemEvent : public IControlEvent {
  34. typedef IControlEvent Inherited;
  35. /*******************************************************************************
  36. * The IDrawItemEvent class provides the owner-item event information for       *
  37. * owner-draw list box.                                                         *
  38. *******************************************************************************/
  39. public:
  40. /*------------------------ Constructor -----------------------------------------
  41. | The only way to construct instances of this class is from an instance of     |
  42. | the IEvent class.                                                            |
  43. ------------------------------------------------------------------------------*/
  44.   IDrawItemEvent (IEvent& evt);
  45.  ~IDrawItemEvent ( );
  46.  
  47. /*-------------------------------- Accessors -----------------------------------
  48. | These functions provide a means of getting and setting the accessible        |
  49. | attributes of instances of this class:                                       |
  50. |                                                                              |
  51. |   itemPresSpaceHandle - Returns the item presentation space.                 |
  52. |   itemId              - Returns the item identity.                           |
  53. |   itemRect            - Returns the rectangle of the item's size.            |
  54. ------------------------------------------------------------------------------*/
  55. virtual IPresSpaceHandle
  56.   itemPresSpaceHandle() const;
  57.  
  58. virtual unsigned long
  59.   itemId() const;
  60.  
  61. virtual IRectangle
  62.   itemRect() const;
  63.  
  64. protected:
  65. /*----------------------------- Implementation ---------------------------------
  66. | This function provides a means of getting the owner-draw data for the        |
  67. | instances of this class.                                                     |
  68. |   ownerItemData - Returns the owner-draw item's Presentation Manager         |
  69. |                   structure.                                                 |
  70. ------------------------------------------------------------------------------*/
  71. void*
  72.   ownerItemData() const;
  73.  
  74. private:
  75. /*--------------------------------- PRIVATE ----------------------------------*/
  76. void*
  77.   pvOwnerItem;
  78. };
  79.  
  80. /*----------------------------------------------------------------------------*/
  81. /* Resume compiler default packing.                                           */
  82. /*----------------------------------------------------------------------------*/
  83. #pragma pack()
  84.  
  85. /*--------------------------------- INLINES ----------------------------------*/
  86. #ifndef I_NO_INLINES
  87.   #include <idievt.inl>
  88. #endif
  89.  
  90. #endif /* _IDIEVT_ */
  91.