home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / ibmcli / icnrbevt.hp_ / ICNRBEVT.HPP
Encoding:
C/C++ Source or Header  |  1992-10-26  |  9.5 KB  |  199 lines

  1. #ifndef _ICNRBEVT_
  2.    #define _ICNRBEVT_
  3. /*******************************************************************************
  4. * FILE NAME: icnrbevt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     ICnrEvent                                                                *
  9. *     ICnrEnterEvent                                                           *
  10. *     ICnrHelpEvent                                                            *
  11. *     ICnrQueryDeltaEvent                                                      *
  12. *     ICnrPaintBackground                                                      *
  13. *                                                                              *
  14. * COPYRIGHT:                                                                   *
  15. *   (C) Copyright IBM Corporation 1992                                         *
  16. *   All Rights Reserved                                                        *
  17. *   Licensed Materials * Property of IBM                                       *
  18. *                                                                              *
  19. * HISTORY:                                                                     *
  20. * $Log:   R:/ibmclass/icnr/vcs/icnrbevt.hpv  $
  21. //
  22. //   Rev 1.5   25 Oct 1992 21:58:20   BOBLOVE
  23. //Updated Documentation
  24. //
  25. //   Rev 1.3   25 Oct 1992 11:16:14   BOBLOVE
  26. //External Beta Release
  27. *                                                                              *
  28. *******************************************************************************/
  29.  
  30.  
  31.  
  32. #ifndef  _IEVENT_
  33.    #include <ievent.hpp>
  34. #endif
  35.  
  36. #ifndef _ICNROBJ_
  37.    #include <icnrobj.hpp>
  38. #endif
  39.  
  40. //    Forward Declarations  
  41. class ICnrEnterEvent;
  42. class ICnrEvent;
  43. class ICnrHelpEvent;
  44. class ICnrQueryDeltaEvent;
  45. class IContainerObject;
  46. class IContainerControl;
  47. class IContainerColumn;
  48.  
  49.  
  50.  
  51. class ICnrEvent : public IEvent     
  52. {
  53. /*******************************************************************************
  54. * This class forms the base of the container event classes.                    *
  55. *******************************************************************************/
  56. public:
  57. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  58. | There is only one way to construct instances of this class:                  |
  59. |   1. From the base IEvent class.                                             |
  60. ------------------------------------------------------------------------------*/
  61.   ICnrEvent( IEvent& evt);
  62.  
  63.    protected:
  64. /*----------------------------- IMPLEMENTATION ---------------------------------
  65. | These functions are used to implement the class:                             |
  66. | containerId   - Returns the control identifier for the container.            |
  67. ------------------------------------------------------------------------------*/
  68. unsigned long 
  69.   containerId() const;
  70.  
  71. };
  72.  
  73.  
  74. class ICnrEnterEvent : public ICnrEvent     
  75. {
  76. /*******************************************************************************
  77. *                                                                              *
  78. * This class is dispatched when an "enter" occurs in the container. This       *
  79. * can be as the result of the enter key or a double click of the select key.   *
  80. *                                                                             *
  81. *******************************************************************************/
  82. public:
  83.   ICnrEnterEvent( IEvent& evt);
  84.  
  85. /*-------------------------------- ACCESSORS -----------------------------------
  86. | These functions provide means of getting and setting the accessible          |
  87. | attributes of instances of this class:                                       |
  88. |                                                                              |
  89. | object         - Returns the object over which the enter occurred or         |
  90. |                  0 if on the container white space.                          |
  91. | enterPressed   - Returns true if the event was the result of the keyboard    |
  92. |                  "Enter" key otherwise it occurred because the select button |
  93. |                  was double clicked.                                         |
  94. | validObject    - Returns true if the event occurs over an object.            |
  95. ------------------------------------------------------------------------------*/
  96. IContainerObject
  97.  *object();
  98. Boolean 
  99.   enterPressed() const,
  100.   validObject() const;
  101. };
  102.  
  103. class ICnrEmphasisEvent : public ICnrEvent
  104. {
  105. /*******************************************************************************
  106. * This class is dispatched when emphasis changes in the container on an object *
  107. * in the container.                                                            *
  108. *******************************************************************************/
  109. public:
  110. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  111. | There is only one way to construct instances of this class:                  |
  112. |   1. From the base IEvent class.                                             |
  113. ------------------------------------------------------------------------------*/
  114.   ICnrEmphasisEvent( IEvent& evt);
  115.  
  116. /*-------------------------------- ACCESSORS -----------------------------------
  117. | These functions provide means of getting and setting the accessible          |
  118. | attributes of instances of this class:                                       |
  119. |                                                                              |
  120. | object         - Returns the object that has changed it's emphasis.          |
  121. | changed        - Returns true if the passed emphasis value had changed.      |
  122. ------------------------------------------------------------------------------*/
  123. Boolean 
  124.   changed( IContainerObject::emphasis) const;
  125. IContainerObject
  126.  *object();
  127. };
  128.  
  129. class ICnrQueryDeltaEvent : public ICnrEvent 
  130. {
  131. /*******************************************************************************
  132. * This class is dispatched when the delta vaule is reached in the container.   *
  133. *******************************************************************************/
  134. public:
  135. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  136. | There is only one way to construct instances of this class:                  |
  137. |   1. From the base IEvent class.                                             |
  138. ------------------------------------------------------------------------------*/
  139.   ICnrQueryDeltaEvent(IEvent& evt);
  140.  
  141. /*-------------------------------- ACCESSORS -----------------------------------
  142. | These functions provide means of getting and setting the accessible          |
  143. | attributes of instances of this class:                                       |
  144. |                                                                              |
  145. | atTopDelta     - Returns true if the object that represents the delta        |
  146. |                  value scrolls into view at the top of the client area.      |
  147. | atBottomDelta  - Returns true if the object that represents the delta        |
  148. |                  value scrolls into view at the bottom of the client area.   |
  149. | atFirstObject  - Returns true if the container has scrolled to the first     |
  150. |                  object in the container.                                    |
  151. | atLastObject   - Returns true if the container has scrolled to the last      |
  152. |                  object in the container.                                    |
  153. ------------------------------------------------------------------------------*/
  154. Boolean 
  155.   atTopDelta() const,
  156.   atBottomDelta() const,
  157.   atFirstObject() const,
  158.   atLastObject() const;
  159. };
  160.  
  161. class ICnrHelpEvent : public ICnrEvent   
  162. {
  163. /*******************************************************************************
  164. * This class is dispatched when help is requested in the container.            *
  165. *******************************************************************************/
  166. public:
  167.  
  168. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  169. | There is only one way to construct instances of this class:                  |
  170. |   1. From the base IEvent class.                                             |
  171. ------------------------------------------------------------------------------*/
  172.   ICnrHelpEvent(IEvent& chpevt);
  173.  
  174. /*-------------------------------- ACCESSORS -----------------------------------
  175. | These functions provide means of getting and setting the accessible          |
  176. | attributes of instances of this class:                                       |
  177. |                                                                              |
  178. | object         - Returns the object that has changed it's emphasis.          |
  179. ------------------------------------------------------------------------------*/
  180. IContainerObject
  181.  *object() ;
  182. };
  183.  
  184.  
  185. /* INLINES */
  186. inline ICnrEvent :: ICnrEvent( IEvent& evt)
  187.                : IEvent(evt) {}
  188. inline ICnrEnterEvent ::  ICnrEnterEvent( IEvent& evt)
  189.                : ICnrEvent(evt)  {}
  190. inline ICnrEmphasisEvent :: ICnrEmphasisEvent( IEvent& evt)
  191.                : ICnrEvent(evt)  {}
  192. inline ICnrQueryDeltaEvent :: ICnrQueryDeltaEvent(IEvent& evt)
  193.                : ICnrEvent(evt) {}
  194. inline ICnrHelpEvent :: ICnrHelpEvent(IEvent& chpevt)
  195.                : ICnrEvent(chpevt) {}
  196.  
  197.  
  198. #endif
  199.