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

  1. #ifndef _IMOUSEVT_
  2. #define _IMOUSEVT_
  3. /*******************************************************************************
  4. * FILE NAME: imousevt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IMouseEvent                                                              *
  9. *     IMouseClickEvent                                                         *
  10. *     IMousePointerEvent                                                       *
  11. *                                                                              *
  12. * COPYRIGHT:                                                                   *
  13. *   IBM Open Class Library                                                     *
  14. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  15. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  16. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  17. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  18. *                                                                              *
  19. *******************************************************************************/
  20. #include <ievent.hpp>
  21.  
  22. class IPoint;
  23. class IWindowHandle;
  24. class IPointerHandle;
  25.  
  26. #pragma pack(4)
  27.  
  28. class IMouseEvent : public IEvent {
  29. typedef IEvent
  30.   Inherited;
  31. public:
  32. /*------------------------------- Constructors -------------------------------*/
  33.   IMouseEvent ( const IEvent& event );
  34. virtual
  35.  ~IMouseEvent ( );
  36.  
  37. /*--------------------------------- Position ---------------------------------*/
  38. IPoint
  39.   mousePosition ( ) const;
  40.  
  41. /*---------------------------- Window Information ----------------------------*/
  42. IWindowHandle
  43.   windowUnderPointer ( ) const;
  44.  
  45. /*------------------------------ Keyboard State ------------------------------*/
  46. Boolean
  47.   isAltKeyDown     ( ) const,
  48.   isCtrlKeyDown    ( ) const,
  49.   isShiftKeyDown   ( ) const;
  50. }; // IMouseEvent
  51.  
  52. class IMouseClickEvent : public IMouseEvent {
  53. typedef IMouseEvent
  54.   Inherited;
  55. public:
  56. /*------------------------------- Constructors -------------------------------*/
  57.   IMouseClickEvent ( const IEvent& event );
  58. virtual
  59.  ~IMouseClickEvent ( );
  60.  
  61. /*------------------------------- Mouse Button -------------------------------*/
  62. enum MouseButton {
  63.   button1,
  64.   button2,
  65.   button3,
  66.   buttonChord
  67.   };
  68.  
  69. MouseButton
  70.   mouseButton ( ) const;
  71.  
  72. /*------------------------------- Mouse Action -------------------------------*/
  73. enum MouseAction {
  74.   click,
  75.   doubleClick,
  76.   down,
  77.   up
  78.   };
  79.  
  80. MouseAction
  81.   mouseAction ( ) const;
  82.  
  83. }; // IMouseClickEvent
  84.  
  85.  
  86. class IMousePointerEvent : public IEvent {
  87. typedef IEvent
  88.   Inherited;
  89. public:
  90. /*------------------------------- Constructors -------------------------------*/
  91.   IMousePointerEvent ( const IEvent& event );
  92. virtual
  93.  ~IMousePointerEvent ( );
  94.  
  95. /*------------------------------ Mouse Pointer -------------------------------*/
  96. IPointerHandle
  97.   defaultMousePointer ( ) const;
  98.  
  99. IMousePointerEvent
  100.   &setMousePointer    ( const IPointerHandle& mousePointer );
  101.  
  102. /*---------------------------- Window Information ----------------------------*/
  103. unsigned long
  104.   windowId ( ) const;
  105. }; // IMousePointerEvent
  106.  
  107. #pragma pack()
  108.  
  109. #endif /* _IMOUSEVT_ */
  110.