home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ctlcpp.zip / IMMOVHDR.HPP < prev    next >
C/C++ Source or Header  |  1994-06-06  |  2KB  |  61 lines

  1. #ifndef _IMMOVHDR_
  2.    #define _IMMOVHDR_
  3. /***************************************************************/
  4. /* Filename: immovhdr.hpp                                      */
  5. /*                                                             */
  6. /* Purpose: Declaration of IMouseMoveHandler class.            */
  7. /*          This class handles several different types         */
  8. /*          of mouse movement events, including WM_MOUSEMOVE,  */
  9. /*          WM_CONTROLPOINTER, WM_BEGIN/ENDDRAG, and           */
  10. /*          WM_BEGIN/ENDSELECT. Associated classes are         */
  11. /*          IMouseMoveEvent, IControlPointerEvent, and         */
  12. /*          IMouseDragSelectEvent.                             */
  13. /*                                                             */
  14. /* Program name: cppctl.exe     Title: C++ PM Control Test App */
  15. /* OS/2 Developer Magazine, Issue: Sept. '94, page             */
  16. /* Article title: Writing OS/2 PM Controls in C++              */
  17. /* Authors: Eric Snell and Lori Ruffing                        */
  18. /*                                                             */
  19. /* Description: This example shows how to implement an OS/2 PM */
  20. /*              control window in C++.                         */
  21. /*                                                             */
  22. /* Program Requirements: This example requires the IBM C Set++ */
  23. /*                       compiler and libraries.               */
  24. /***************************************************************/
  25.  
  26. #ifndef _IHANDLER_
  27.    #include <ihandler.hpp>
  28. #endif
  29.  
  30. class IMouseMoveEvent;
  31. class IControlPointerEvent;
  32. class IMouseDragSelectEvent;
  33.  
  34. // Align classes on 4 byte boundary
  35. #pragma pack(4)
  36.  
  37. class IMouseMoveHandler : public IHandler
  38.    {
  39.    typedef IHandler Inherited;
  40.  
  41.    public:
  42.       IMouseMoveHandler();
  43.       virtual ~IMouseMoveHandler();
  44.  
  45.    protected:
  46.       virtual Boolean dispatchHandlerEvent(IEvent& evt);
  47.       virtual Boolean mouseMove(IMouseMoveEvent &evt);
  48.       virtual Boolean controlPointer(IControlPointerEvent &evt);
  49.  
  50.       virtual Boolean beginDrag(const IMouseDragSelectEvent& evt);
  51.       virtual Boolean endDrag(const IMouseDragSelectEvent& evt);
  52.       virtual Boolean beginSelect(const IMouseDragSelectEvent& evt);
  53.       virtual Boolean endSelect(const IMouseDragSelectEvent& evt);
  54.  
  55.    };
  56.  
  57. // Resume compiler default packing
  58. #pragma pack()
  59.  
  60. #endif //#ifndef _IMMOVHDR_
  61.