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

  1. #ifndef _IPAGEEVT_
  2.   #define _IPAGEEVT_
  3. /*******************************************************************************
  4. * FILE NAME: ipageevt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IPageEvent       - Notebook page notification event                      *
  9. *     IPageRemoveEvent - Notebook page deletion notification event             *
  10. *     IPageHelpEvent   - Notebook page help notification event                 *
  11. *     IPageSelectEvent - Notebook page selection notification event            *
  12. *                                                                              *
  13. * COPYRIGHT:                                                                   *
  14. *   (C) Copyright IBM Corporation 1992                                         *
  15. *   All Rights Reserved                                                        *
  16. *   Licensed Materials = Property of IBM                                       *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _ICTLEVT_
  20.   #include <ictlevt.hpp>
  21. #endif
  22. #ifndef _INOTEBK_
  23.   #include <inotebk.hpp>
  24. #endif
  25.  
  26. /*----------------------------------------------------------------------------*/
  27. /* Align classes on four byte boundary.                                       */
  28. /*----------------------------------------------------------------------------*/
  29. #pragma pack(4)
  30.  
  31. // Forward declarations for other classes:
  32. class IBitmapHandle;
  33. class IHelpWindow;
  34. class IPageHandle;
  35. class IWindow;
  36.  
  37.  
  38. class IPageEvent : public IControlEvent {
  39. typedef IControlEvent
  40.   Inherited;
  41. /*******************************************************************************
  42. * The IPageEvent class represents a notification for a page-related notebook   *
  43. * event.  An IPageEvent object is created by a notebook page handler when a    *
  44. * notebook page is resized.  The IPageEvent class is also the base class for   *
  45. * other page-related events.                                                   *
  46. *                                                                              *
  47. * Page events are first dispatched to the notebook, and then to the            *
  48. * owner window of the notebook.                                                *
  49. *******************************************************************************/
  50. public:
  51. /*------------------------------- Constructors ---------------------------------
  52. | You can construct an instance of this class in the following ways:           |
  53. |    - From an IEvent object                                                   |
  54. |    - From an IControlEvent object                                            |
  55. ------------------------------------------------------------------------------*/
  56.   IPageEvent ( IEvent&        event        );
  57.   IPageEvent ( IControlEvent& controlEvent );
  58.  
  59. virtual
  60.   IPageEvent :: ~IPageEvent ( );
  61.  
  62. /*--------------------------- Control Information ------------------------------
  63. | The following functions return information about the notebook and its page:  |
  64. |   pageHandle - Returns the notebook page handle that is the subject of the   |
  65. |                notification event.                                           |
  66. |   notebook   - Returns the notebook object to which the page belongs.        |
  67. ------------------------------------------------------------------------------*/
  68. virtual IPageHandle
  69.   pageHandle ( ) const;
  70. virtual INotebook
  71.  *notebook   ( ) const;
  72. }; // IPageEvent
  73.  
  74.  
  75. class IPageRemoveEvent : public IPageEvent {
  76. typedef IPageEvent
  77.   Inherited;
  78. /*******************************************************************************
  79. * The IPageRemoveEvent class represents a notification for when a page is      *
  80. * deleted from a notebook.  An IPageRemoveEvent object is created and used by  *
  81. * a notebook page handler.                                                     *
  82. *                                                                              *
  83. * These events provide functions to return the application page window and     *
  84. * bit map.  It is the application's responsibility to delete the window and    *
  85. * bit map, if any.                                                             *
  86. *                                                                              *
  87. * These events are first dispatched to the notebook, then to the owner window  *
  88. * of the notebook.                                                             *
  89. *******************************************************************************/
  90. public:
  91. /*------------------------------- Constructors ---------------------------------
  92. | You can construct an instance of this class in the following ways:           |
  93. |    - From an IEvent object                                                   |
  94. |    - From an IControlEvent object                                            |
  95. |    - From an IPageEvent object                                               |
  96. ------------------------------------------------------------------------------*/
  97.   IPageRemoveEvent ( IEvent&        event        );
  98.   IPageRemoveEvent ( IControlEvent& controlEvent );
  99.   IPageRemoveEvent ( IPageEvent&    pageEvent    );
  100.  
  101. virtual
  102.   IPageRemoveEvent :: ~IPageRemoveEvent ( );
  103.  
  104. /*----------------------------- Page Information -------------------------------
  105. | These functions return information about the deleted page:                   |
  106. |   pageWindow - Returns the window or control associated with the page.       |
  107. |   tabBitmap  - Returns the handle of the bit map used by the tab associated  |
  108. |                with the page.                                                |
  109. |   notebook   - Returns the notebook object to which the page belongs.        |
  110. ------------------------------------------------------------------------------*/
  111. IWindow
  112.  *pageWindow ( ) const;
  113. IBitmapHandle
  114.   tabBitmap  ( ) const;
  115. virtual INotebook
  116.  *notebook   ( ) const;
  117.  
  118. private:
  119. /*--------------------------------- Private ----------------------------------*/
  120. virtual IPageHandle
  121.   pageHandle ( ) const;
  122. }; // IPageRemoveEvent
  123.  
  124.  
  125. class IPageHelpEvent : public IPageEvent {
  126. typedef IPageEvent
  127.   Inherited;
  128. /*******************************************************************************
  129. * The IPageHelpEvent class represents a notification that help has been        *
  130. * requested for a notebook page.  An IPageHelpEvent object is created and      *
  131. * used by a notebook page handler.                                             *
  132. *                                                                              *
  133. * These events are first dispatched to the notebook, then to the owner window  *
  134. * of the notebook.                                                             *
  135. *******************************************************************************/
  136. public:
  137. /*------------------------------- Constructors ---------------------------------
  138. | You can construct an instance of this class in the following ways:           |
  139. |    - From an IEvent object                                                   |
  140. |    - From an IControlEvent object                                            |
  141. |    - From an IPageEvent object                                               |
  142. ------------------------------------------------------------------------------*/
  143.   IPageHelpEvent ( IEvent&        event        );
  144.   IPageHelpEvent ( IControlEvent& controlEvent );
  145.   IPageHelpEvent ( IPageEvent&    pageEvent    );
  146.  
  147. virtual
  148.   IPageHelpEvent :: ~IPageHelpEvent ( );
  149.  
  150. /*----------------------------- Help Information -------------------------------
  151. | This class returns the following help information:                           |
  152. |   helpWindow - Returns the help window that can be used to display help for  |
  153. |                the notebook page.                                            |
  154. ------------------------------------------------------------------------------*/
  155. IHelpWindow
  156.  *helpWindow ( ) const;
  157.  
  158. /*-------------------------------- Overrides -----------------------------------
  159. | This class overrides the following inherited functions:                      |
  160. |   pageHandle - Returns the handle of the notebook page for which help has    |
  161. |                been requested.                                               |
  162. |   notebook   - Returns the notebook object to which the page belongs.        |
  163. ------------------------------------------------------------------------------*/
  164. virtual IPageHandle
  165.   pageHandle ( ) const;
  166. virtual INotebook
  167.  *notebook   ( ) const;
  168. }; // IPageHelpEvent
  169.  
  170.  
  171. class IPageSelectEvent : public IPageEvent {
  172. typedef IPageEvent
  173.   Inherited;
  174. /*******************************************************************************
  175. * The IPageSelectEvent class represents a notification that a page has been    *
  176. * selected in a notebook.  An IPageSelectEvent object is created and used by   *
  177. * a notebook page handler.                                                     *
  178. *                                                                              *
  179. * These events are first dispatched to the notebook, then to the owner window  *
  180. * of the notebook.                                                             *
  181. *******************************************************************************/
  182. public:
  183. /*------------------------------- Constructors ---------------------------------
  184. | You can construct an instance of this class in the following ways:           |
  185. |    - From an IEvent object                                                   |
  186. |    - From an IControlEvent object                                            |
  187. |    - From an IPageEvent object.                                              |
  188. ------------------------------------------------------------------------------*/
  189.   IPageSelectEvent ( IEvent&        event        );
  190.   IPageSelectEvent ( IControlEvent& controlEvent );
  191.   IPageSelectEvent ( IPageEvent&    pageEvent    );
  192.  
  193. virtual
  194.   IPageSelectEvent :: ~IPageSelectEvent ( );
  195.  
  196. /*-------------------------------- Overrides -----------------------------------
  197. | This class overrides the following inherited functions:                      |
  198. |   pageHandle - Returns the handle of the selected notebook page.             |
  199. |   notebook   - Returns the notebook object to which the page belongs.        |
  200. ------------------------------------------------------------------------------*/
  201. virtual IPageHandle
  202.   pageHandle                 ( ) const;
  203. virtual INotebook
  204.  *notebook                   ( ) const;
  205.  
  206. /*------------------- Previously Selected Page Information ---------------------
  207. | The following function returns information about the previously selected     |
  208. | notebook page:                                                               |
  209. |   previousSelectedPageHandle - Returns the handle of the previously          |
  210. |                                selected notebook page.                       |
  211. ------------------------------------------------------------------------------*/
  212. IPageHandle
  213.   previousSelectedPageHandle ( ) const;
  214. }; // IPageSelectEvent
  215.  
  216. /*----------------------------------------------------------------------------*/
  217. /* Resume compiler default packing.                                           */
  218. /*----------------------------------------------------------------------------*/
  219. #pragma pack()
  220.  
  221. /*----------------------------- Inline Functions -----------------------------*/
  222. #ifndef I_NO_INLINES
  223.   #include <ipageevt.inl>
  224. #endif
  225.  
  226. #endif /* _IPAGEEVT_ */
  227.