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

  1. #ifndef _IDRAWCV_
  2. #define _IDRAWCV_
  3. /*******************************************************************************
  4. * FILE NAME: idrawcv.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IDrawingCanvas                                                           *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - 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. *******************************************************************************/
  18. #include <icanvas.hpp>
  19. #include <irect.hpp>
  20.  
  21.  
  22. class IGList;
  23. class IGraphicContext;
  24. class IPoint;
  25. class IDrawingCanvasData;
  26.  
  27. #pragma pack(4)
  28.  
  29. class IDrawingCanvas : public ICanvas {
  30. typedef ICanvas
  31.   Inherited;
  32.  
  33. public:
  34. class Style;
  35. /*------------------------------- Constructors -------------------------------*/
  36.   IDrawingCanvas( unsigned long      windowIdentifier,
  37.                   IWindow*           parent,
  38.                   IWindow*           owner,
  39.                   const IRectangle&  initial = IRectangle(),
  40.                   const Style&       style = defaultStyle() );
  41.  
  42. virtual
  43.  ~IDrawingCanvas( );
  44.  
  45. /*---------------------------------- Styles ----------------------------------*/
  46. INESTEDBITFLAGCLASSDEF2(Style, IDrawingCanvas, ICanvas, IWindow);
  47.                                   // style class definition
  48. static const Style
  49.   IC_IMPORTU classDefaultStyle,
  50.   IC_IMPORTU useDefaultPaintHandler;
  51.  
  52. static Style
  53.   defaultStyle      ( );
  54.  
  55. static void
  56.   setDefaultStyle   ( const Style&    style );
  57.  
  58. virtual unsigned long
  59.   convertToGUIStyle ( const IBitFlag& style,
  60.                       Boolean         extendedOnly = false ) const;
  61.  
  62. /*------------------------------ Graphic List --------------------------------*/
  63. virtual IDrawingCanvas
  64.  &setGraphicList    ( IGList* list );
  65.  
  66. virtual IGList*
  67.   graphicList       ( ) const;
  68.  
  69. /*----------------------------- Graphic Context ------------------------------*/
  70. virtual IDrawingCanvas
  71.  &setGraphicContext ( IGraphicContext* graphicContext );
  72.  
  73. virtual IGraphicContext
  74.  *graphicContext    ( ) const;
  75.  
  76. protected:
  77. /*----------------------------- Canvas Support -------------------------------*/
  78. virtual ISize
  79.   calcMinimumSize   ( ) const;
  80.  
  81. private:
  82. /*------------------------------ Hidden Members ------------------------------*/
  83.   IDrawingCanvas  ( const IDrawingCanvas& drawingCanvas );
  84. IDrawingCanvas
  85.  &operator=       ( const IDrawingCanvas& drawingCanvas );
  86.  
  87. /*--------------------------------- Private ----------------------------------*/
  88. static Style
  89.   fgCurrentDefaultStyle;
  90.  
  91. IGList
  92.  *fList;
  93. IGraphicContext
  94.  *fGc;
  95.  
  96. IDrawingCanvasData
  97.  *fDrawingCanvasData;
  98. }; // IDrawingCanvas
  99.  
  100. INESTEDBITFLAGCLASSFUNCS(Style, IDrawingCanvas);
  101.  
  102. #pragma pack()
  103.  
  104. #endif // _IDRAWCV_
  105.