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

  1. #ifndef _IMCEVT_
  2. #define _IMCEVT_
  3. /*******************************************************************************
  4. * FILE NAME: imcevt.hpp                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IMouseClickEvent - the mouse click event information                     *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   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. *$Log:   R:/IBMCLASS/IBASEAPP/VCS/IMCEVT.HPV  $                                                                         *
  18. // 
  19. //    Rev 1.22   25 Oct 1992 18:00:28   nunn
  20. // Brad Broyles changes for external beta
  21.  
  22.       Rev 1.1   01 Jan 1989 12:00:00   LM & KKL
  23.    Initiate code
  24.       Rev 1.2   01 May 1991 12:00:00   KKL
  25.    Combine all events into 1 file - modified for better performance
  26.       Rev 1.3   01 Oct 1991 12:00:00   KKL
  27.    Update per R2.0 spec.
  28.       Rev 1.4   09 Aug 1992 12:00:00   KKL
  29.    Mod. for handlers
  30.       Rev 1.5   21 Oct 1992 17:00:00   WBB
  31.    Amended to match skeleton.hpp
  32. *******************************************************************************/
  33.  
  34. // Forward declarations for other classes:
  35. class IMouseClickEvent;
  36. class IWindowHandle;
  37. class IPoint;
  38. #if !defined( _IEVENT_ ) && !defined( I_NO_RELATED_HPP )
  39.   #include <ievent.hpp>
  40. #endif
  41.  
  42. class IMouseClickEvent : public IEvent {
  43. /*******************************************************************************
  44. * The IMouseClickEvent class provides mouse click event information.  A mouse  *
  45. * click event event is caused by the user's pressing the mouse button down,    *
  46. * up, click, and double-click.                                                 *
  47. *******************************************************************************/
  48. typedef IEvent Inherited;
  49. public:
  50. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  51. | There is one way to construct instances of this class:                       |
  52. |   1. from an instance of the IEvent class                                    |
  53. ------------------------------------------------------------------------------*/
  54.   IMouseClickEvent(IEvent& evt);
  55.  
  56. /*-------------------------------- FUNCTIONS -----------------------------------
  57. | mousePosition - return the mouse pointer position                            |
  58. | handleOnTop - return the handle of the window the mouse is over              |
  59. | mouseNumber - return which mouse button was operated on                      |
  60. | mouseAction - return the action taken on the mouse                           |
  61. ------------------------------------------------------------------------------*/
  62. IPoint
  63.   mousePosition() const;
  64. IWindowHandle
  65.   handleOnTop() const;
  66.  
  67.   enum MouseNumber {button1, button2, button3, button12};
  68. MouseNumber
  69.   mouseNumber() const;
  70.  
  71.   enum MouseAction {click, doubleClick, down, up};
  72. MouseAction
  73.   mouseAction() const;
  74. }; // IMouseClickEvent
  75.  
  76. /*--------------------------------- INLINES ----------------------------------*/
  77. #ifndef I_NO_INLINES
  78.   #include <imcevt.inl>
  79. #endif
  80.  
  81. #endif /* _IMCEVT_ */
  82.