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

  1. #ifndef _ICTLEVT_
  2.   #define _ICTLEVT_
  3. /*******************************************************************************
  4. * FILE NAME: ictlevt.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IControlEvent - encapsulation of WM_CONTROL event                        *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   (C) Copyright IBM Corporation 1992                                         *
  12. *   All Rights Reserved                                                        *
  13. *   Licensed Materials = Property of IBM                                       *
  14. *                                                                              *
  15. *$Log:   R:/IBMCLASS/IBASEAPP/VCS/ICTLEVT.HPV  $                                                                         *
  16. // 
  17. //    Rev 1.23   25 Oct 1992 16:56:56   nunn
  18. // changed library name to ICLUI
  19. // 
  20. //    Rev 1.22   25 Oct 1992 14:54:08   tsuji
  21. // Format/documentation changes to match standard file header.
  22. *******************************************************************************/
  23. #ifndef _IEVENT_
  24.   #include <ievent.hpp>
  25. #endif
  26.  
  27. // Forward declarations for other classes:
  28. class IControlEvent;  /* ctlevt */
  29.  
  30. class IControlEvent : public IEvent {
  31. /*******************************************************************************
  32. * This class encapsulates a WM_CONTROL message.  It provides two member        *
  33. * functions in addition to what is provided by IEvent -- controlWindow() which *
  34. * returns a pointer to the control that the WM_CONTROL message was generated   *
  35. * on behalf of, and controlId() which returns the window id of that control.   *
  36. * The window() and handle() functions will return information for the owner    *
  37. * of the control.
  38. *                                                                              *
  39. * An IControlEvent object will be created by control event handlers, and       *
  40. * passed to the virtual event processing function of the handler.  This        *
  41. * callback function is intended to be overloaded by the user in order to       *
  42. * process the WM_CONTROL event.                                                *
  43. *******************************************************************************/
  44. typedef IEvent Inherited;
  45. public:
  46. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  47. | There is one way to construct instances of this class:                       |
  48. |   1. construct from an IEvent object                                         |
  49. ------------------------------------------------------------------------------*/
  50.   IControlEvent ( IEvent& evt );
  51.  
  52. /*-------------------------------- ACCESSORS -----------------------------------
  53. | These functions provide means of getting and setting the accessible          |
  54. | attributes of instances of this class:                                       |
  55. |   controlWindow - returns a pointer to the affected control                  |
  56. |   controlId     - returns the window id of affected control                  |
  57. ------------------------------------------------------------------------------*/
  58. IWindow* const
  59.   controlWindow () const;
  60. unsigned long
  61.   controlId () const;
  62. };
  63.  
  64.  
  65. inline
  66. IControlEvent::IControlEvent ( IEvent& evt )
  67. /******************************************************************/
  68. /* Constructor.                                                   */
  69. /******************************************************************/
  70.   : IEvent(evt)
  71. {;}
  72.  
  73. #endif /* ICTLEVT */
  74.