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

  1. #ifndef _IVBVPMSZ_
  2.   #define _IVBVPMSZ_
  3.  
  4. /*******************************************************************************
  5. * FILE NAME: ivbvpmsz.hpp                                                      *
  6. *                                                                              *
  7. * DESCRIPTION:                                                                 *
  8. *   Declaration of the class(es):                                              *
  9. *    IVBMinSizeViewPortHandler      - Makes viewport work with a multicell     *
  10. *                                     canvas                                   *
  11. *                                                                              *
  12. * COPYRIGHT:                                                                   *
  13. *   IBM(R) VisualAge(TM) for C++                                               *
  14. *   (C) Copyright International Business Machines Corporation 1991, 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. *   This program will not run in DOS mode.                                     *
  20. *                                                                              *
  21. *******************************************************************************/
  22.  
  23. #ifndef _ISIZEHDR_
  24.   #include <isizehdr.hpp>
  25. #endif
  26.  
  27. /*-------------------------- Pragma Library Support --------------------------*/
  28. #ifndef __NO_DEFAULT_LIBS__
  29.   #ifdef __OS2__
  30.     #ifdef __IMPORTLIB__
  31.        #pragma library("CPPOOV3I.LIB")
  32.     #else
  33.        #pragma library("CPPOOV3.LIB")
  34.     #endif
  35.   #endif
  36.   #ifdef __WINDOWS__
  37.     #ifdef __IMPORTLIB__
  38.        #pragma library("CPPWOV3I.LIB")
  39.     #else
  40.        #pragma library("CPPWOV3.LIB")
  41.     #endif
  42.   #endif
  43. #endif
  44.  
  45. class IViewPort;
  46.  
  47. /*----------------------------------------------------------------------------*/
  48. /* Align classes on four byte boundary.                                       */
  49. /*----------------------------------------------------------------------------*/
  50. #pragma pack(4)
  51.  
  52. //**************************************************************************
  53. // Class:   IVBMinSizeViewPortHandler                                      *
  54. //                                                                         *
  55. // Purpose: Attach this handler to a viewport when the child of the        *
  56. //          viewport is a multicell canvas.  This handler will grow the    *                       *
  57. //          multicell canvas when the size of the viewport is larger than  *
  58. //          the minimum size of the multicell canvas and add scroll bars   *
  59. //          when the minimum size of the multicell is larger than the      *
  60. //          size of the viewport.                                          *
  61. //                                                                         *
  62. //**************************************************************************
  63. class IVBMinSizeViewPortHandler : public IResizeHandler {
  64. public:
  65. virtual IHandler
  66.  &handleEventsFor       ( IViewPort* viewport ),
  67.  &stopHandlingEventsFor ( IViewPort* viewport );
  68.  
  69. protected:
  70. virtual Boolean
  71.   windowResize ( IResizeEvent& event );
  72.  
  73. private:
  74. #ifdef __OS2__
  75. virtual IHandler
  76.  &handleEventsFor       ( IWindow* window ),
  77.  &stopHandlingEventsFor ( IWindow* window );
  78. #endif
  79. };
  80.  
  81. /*----------------------------------------------------------------------------*/
  82. /* Resume compiler default packing.                                           */
  83. /*----------------------------------------------------------------------------*/
  84. #pragma pack()
  85.  
  86. #endif
  87.