home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ievent.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.2 KB  |  106 lines

  1. #ifndef _IEVENT_
  2. #define _IEVENT_
  3. /*******************************************************************************
  4. * FILE NAME: ievent.hpp                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IEvent                                                                   *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - 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. #include <ivbase.hpp>
  19. #include <ievtdata.hpp>
  20. #include <ihandle.hpp>
  21.  
  22. class IEventPrivateData;
  23. class IWindow;
  24.  
  25. #pragma pack(4)
  26.  
  27. class IEvent : public IVBase {
  28. typedef IVBase
  29.   Inherited;
  30. public:
  31. /*------------------------------- Constructors -------------------------------*/
  32.   IEvent    ( const IWindowHandle&    handle,
  33.               unsigned long           eventId,
  34.               const IEventParameter1& parameter1,
  35.               const IEventParameter2& parameter2 );
  36.  
  37.   IEvent    ( IWindow*                window,
  38.               unsigned long           eventId,
  39.               const IEventParameter1& parameter1,
  40.               const IEventParameter2& parameter2 );
  41.  
  42.   IEvent    ( const IEvent&           event );
  43.  
  44. IEvent
  45.  &operator= ( const IEvent&           event );
  46.  
  47. virtual
  48.  ~IEvent    ( );
  49.  
  50. /*-------------------------------- Event Data --------------------------------*/
  51. unsigned long
  52.   eventId    ( ) const;
  53.  
  54. IEventParameter1
  55.   parameter1 ( ) const;
  56.  
  57. IEventParameter2
  58.   parameter2 ( ) const;
  59.  
  60. IEventResult
  61.   result     ( ) const;
  62.  
  63. IEvent
  64.  &setResult  ( const IEventResult& eventResult ),
  65.  &setResult  ( Boolean             eventResult );
  66.  
  67.  
  68. /*------------------------------- Event Window -------------------------------*/
  69. virtual IWindow
  70.  *window               ( ) const,
  71.  *dispatchingWindow    ( ) const,
  72.  *controlWindow        ( ) const;
  73.  
  74. IWindowHandle
  75.   handle               ( ) const,
  76.   controlHandle        ( ) const;
  77.  
  78. IEvent
  79.  &setHandle            ( const IWindowHandle& handle ),
  80.  &setDispatchingHandle ( const IWindowHandle& handle ),
  81.  &setControlHandle     ( const IWindowHandle& handle );
  82.  
  83. private:
  84. /*--------------------------------- Private ----------------------------------*/
  85. friend class IWindow;
  86. IWindowHandle
  87.   hCl,
  88.   p_dispatchingHandle,
  89.   p_controlHandle;
  90. unsigned long
  91.   ulClEvtId;
  92. IEventData
  93.   epCl1,
  94.   epCl2;
  95. IEventResult
  96.   erCl;
  97. IEventPrivateData
  98.  *pData;
  99. }; // IEvent
  100.  
  101. #pragma pack()
  102.  
  103.   #include <ievent.inl>
  104.  
  105. #endif /* _IEVENT_ */
  106.