home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / ISCRLEVT.HPP < prev    next >
C/C++ Source or Header  |  1993-10-22  |  4KB  |  81 lines

  1. #ifndef _ISCRLEVT_
  2.   #define _ISCRLEVT_
  3. /*******************************************************************************
  4. * FILE NAME: iscrlevt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IScrollEvent - Represents a scroll event for an IScrollBar object.       *
  9. *                                                                              *
  10. *                                                                              *
  11. * COPYRIGHT:                                                                   *
  12. *   Licensed Materials - Property of IBM                                       *
  13. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  14. *   All Rights Reserved                                                        *
  15. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _IEVENT_
  20.   #include <ievent.hpp>
  21. #endif
  22.  
  23. /*----------------------------------------------------------------------------*/
  24. /* Align classes on four byte boundary.                                       */
  25. /*----------------------------------------------------------------------------*/
  26. #pragma pack(4)
  27.  
  28. // Forward declarations for other classes:
  29. class IScrollBar;
  30.  
  31.  
  32. class IScrollEvent : public IEvent {
  33. typedef IEvent
  34.   Inherited;
  35. /*******************************************************************************
  36. * The IScrollEvent class represents a scroll event for an IScrollBar object.   *
  37. * This event is a notification for interactions with an IScrollBar object.     *
  38. * An IScrollEvent object is created by an IScrollHandler object and passed to  *
  39. * one of its virtual functions for processing.                                 *
  40. *******************************************************************************/
  41. public:
  42. /*------------------------------- Constructor ----------------------------------
  43. | The only way to construct instances of this class is from an IEvent          |
  44. | instance.  This is the constructor used by the IScrollHandler class.         |
  45. ------------------------------------------------------------------------------*/
  46.   IScrollEvent ( IEvent& event );
  47. virtual
  48.  ~IScrollEvent ( );
  49.  
  50. /*-------------------------------- Accessors -----------------------------------
  51. | The following functions return information related to the scroll event:      |
  52. |   scrollBarWindow      - Returns a pointer to the IScrollBar object to       |
  53. |                          which the scroll event applies.                     |
  54. |   scrollAmount         - Returns the number of units that the scroll event   |
  55. |                          wants the scroll box to scroll.  A negative value   |
  56. |                          means a backwards scroll event occurred.            |
  57. |   newScrollBoxPosition - Returns the new position of the scroll box.  This   |
  58. |                          is valid only for a scroll event passed to the      |
  59. |                          IScrollHandler::scrollBoxTrack or                   |
  60. |                          IScrollHandler::scrollBoxTrackEnd functions.        |
  61. ------------------------------------------------------------------------------*/
  62. IScrollBar*
  63.   scrollBarWindow      ( ) const;
  64. long
  65.   scrollAmount         ( ) const;
  66. unsigned long
  67.   newScrollBoxPosition ( ) const;
  68.  
  69. private:
  70. /*--------------------------------- Private ----------------------------------*/
  71. unsigned long
  72.   ulClPrevScrollBoxPos;
  73. };
  74.  
  75. /*----------------------------------------------------------------------------*/
  76. /* Resume compiler default packing.                                           */
  77. /*----------------------------------------------------------------------------*/
  78. #pragma pack()
  79.  
  80. #endif /* _ISCRLEVT_ */
  81.