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

  1. #ifndef _IFRAMEVT_
  2. #define _IFRAMEVT_
  3. /*******************************************************************************
  4. * FILE NAME: iframevt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration(s) of the class(es):                    *
  8. *     IFrameEvent               - Common base class for frame events.          *
  9. *     IFrameFormatEvent         - Frame format event.                          *
  10. *     iFrameControlPointerEvent - Frame control pointer event.                 *
  11. *                                                                              *
  12. * COPYRIGHT:                                                                   *
  13. *   Licensed Materials - Property of IBM                                       *
  14. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  15. *   All Rights Reserved                                                        *
  16. *   US Government Users Restricted Rights - Use, duplication, or               *
  17. *   disclosure                                                                 *
  18. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  19. *                                                                              *
  20. *******************************************************************************/
  21. #ifndef _IEVENT_
  22.   #include <ievent.hpp>
  23. #endif
  24.  
  25. /*----------------------------------------------------------------------------*/
  26. /* Align classes on four byte boundary.                                       */
  27. /*----------------------------------------------------------------------------*/
  28. #pragma pack(4)
  29.  
  30. class ISWP;
  31. class IFrameWindow;
  32. class IRectangle;
  33.  
  34. class IFrameEvent : public IEvent {
  35. typedef IEvent
  36.   Inherited;
  37. /*******************************************************************************
  38. * The IFrameEvent class is used to represent information about frame events    *
  39. * in general.  Instances of classes derived from this class are created by     *
  40. * the frame window handler and dispatched to the handler's virtual function    *
  41. * specific to a frame event.                                                   *
  42. *                                                                              *
  43. * The main purpose of this class is to provide a common means of obtaining     *
  44. * the frame window associated with the event.                                  *
  45. *******************************************************************************/
  46. public:
  47. /*------------------------------- Constructor ----------------------------------
  48. | Objects of this class are constructed from generic IEvent objects.  The      |
  49. | event's window handle must be that of a frame window.                        |
  50. ------------------------------------------------------------------------------*/
  51.   IFrameEvent ( const IEvent &baseEvent );
  52.   ~IFrameEvent ( );
  53.  
  54. /*-------------------------------- Accessors -----------------------------------
  55. | This function provides a means of getting and setting the accessible         |
  56. | attributes of instances of this class:                                       |
  57. |   frame - Returns a pointer to the frame window receiving this event.        |
  58. ------------------------------------------------------------------------------*/
  59. IFrameWindow
  60.  *frame ( ) const;
  61.  
  62. private: /*------------------------ PRIVATE ----------------------------------*/
  63. IFrameWindow
  64.  *pFrame;
  65. }; // class IFrameEvent
  66.  
  67. class IFrameFormatEvent : public IFrameEvent {
  68. typedef IFrameEvent
  69.   Inherited;
  70. /*******************************************************************************
  71. * The IFrameFormatEvent class is used to represent information about a frame   *
  72. * format event.  Instances of this class are created by the frame window       *
  73. * handler and dispatched to the handler's formatControls function when a       *
  74. * frame format event occurs.                                                   *
  75. *******************************************************************************/
  76. public:
  77. /*------------------------------- Constructor ----------------------------------
  78. | You can construct instances of this class from a generic IEvent with         |
  79. | particular attributes:                                                       |
  80. |    - The event ID must be WM_FORMATFRAME.                                    |
  81. |    - The event's first argument must be a pointer to an array of SWP         |
  82. |      structures with dimension equal to the frame control count returned     |
  83. |      on the preceding WM_QUERYFRAMECTLCOUNT event.                           |
  84. |    - The event's second argument must be a pointer to a RECTL structure in   |
  85. |      which the frame control's size and position will be returned.           |
  86. |                                                                              |
  87. | The event result field will eventually contain the count of the number of    |
  88. | frame controls processed.                                                    |
  89. ------------------------------------------------------------------------------*/
  90.   IFrameFormatEvent ( const IEvent &baseEvent );
  91.   ~IFrameFormatEvent ( );
  92.  
  93. /*-------------------------------- Accessors -----------------------------------
  94. | These functions provides means of getting and setting the accessible         |
  95. | attributes of instances of this class:                                       |
  96. |   swpArray      - Returns a pointer to the ISWP (array) associated with      |
  97. |                   this event.                                                |
  98. |   clientRect    - Returns the client rectangle associated with this event.   |
  99. |   setClientRect - Sets the client rectangle value to a given argument.       |
  100. ------------------------------------------------------------------------------*/
  101. ISWP
  102.  *swpArray ( ) const;
  103.  
  104. IRectangle
  105.   clientRect ( ) const;
  106.  
  107. IFrameFormatEvent
  108.  &setClientRect ( const IRectangle &aRect );
  109.  
  110. }; // class IFramFormatEvent
  111.  
  112. /*----------------------------------------------------------------------------*/
  113. /* Resume compiler default packing.                                           */
  114. /*----------------------------------------------------------------------------*/
  115. #pragma pack()
  116.  
  117. #ifndef I_NO_INLINES
  118.   #include <iframevt.inl>
  119. #endif
  120.  
  121. #endif // _IFRAMEVT_
  122.