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

  1. /*******************************************************************************
  2. * FILE NAME: iview.hpp                                                         *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *   Declaration of the classes:                                                *
  6. *     IView                                                                    *
  7. *                                                                              *
  8. * COPYRIGHT:                                                                   *
  9. *   IBM Open Class Library                                                     *
  10. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  11. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  12. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  13. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  14. *                                                                              *
  15. *   Portions or this component are based on work originating from Taligent.    *
  16. *   (C) Copyright Taligent, Inc. 1996 - All rights reserved.                   *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _IVIEW_
  20. #define _IVIEW_
  21.  
  22. #include <icanvas.hpp>
  23.  
  24. // Forward References
  25. class IGUIBundle;
  26. class IComponent;
  27. class IModel;
  28. class IPresSpaceHandle;
  29. class IViewImplementation;
  30.  
  31. // Classes defined in this module
  32. class IView;
  33.  
  34. #pragma pack(4)
  35.  
  36.  
  37. /*******************************************************************************
  38. *                                                                              *
  39. *   The IView class is a simple content view for use with document             *
  40. *   components.   It serves a the base class for document views.               *
  41. *                                                                              *
  42. *******************************************************************************/
  43.  
  44. class IView : public ICanvas {
  45. public:
  46.  
  47. /*---------------------- Initialization and Finalization ---------------------*/
  48.  
  49.     virtual void            initialize ();
  50.     virtual void            finalize ();
  51.     virtual                 ~IView();
  52.  
  53.  
  54. /*------------------- Notification and Painting Event Handlers ---------------*/
  55.  
  56.     virtual void            handleNotification( const INotificationEvent& );
  57.     virtual void            draw( IPresSpaceHandle&,
  58.                                   const IRectangle&,
  59.                                   Boolean metaFile = false );
  60.     virtual void            drawContents( IPresSpaceHandle&,
  61.                                           const IRectangle&,
  62.                                           Boolean );
  63.  
  64.  
  65. /*------------------------------ Informational -------------------------------*/
  66.  
  67.     virtual Boolean         isDropTarget() const;
  68.     virtual Boolean         isDragSource() const;
  69.     IGUIBundle&             bundle() const;
  70.     IComponent&             component() const;
  71.     IModel*                 model() const;
  72.  
  73.  
  74. /*---------------------------- Moving & Sizing -------------------------------*/
  75.  
  76.     IView&                  setViewClient( IControl* clientControl );
  77.     IControl*               viewClient();
  78.     virtual IView&          sizeTo(const ISize& newSize);
  79.     virtual IView&          moveSizeTo( const IRectangle& newRect );
  80.  
  81. protected:
  82.                             IView( IGUIBundle& );
  83.                             IView( const IView& );
  84.  
  85. private:
  86.     IView&                  operator=( const IView& );
  87.  
  88.     IComponent*             fpComponent;
  89.     IGUIBundle*             fpBundle;
  90.     IViewImplementation*    fpImplementation;
  91.  
  92.     IControl*               fpViewClient;
  93.  
  94. };
  95.  
  96.   #include <iview.inl>
  97.  
  98.  
  99. #pragma pack()
  100.  
  101.  
  102. #endif // _IVIEW_
  103.