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

  1. #ifndef _IGREGION_
  2. #define _IGREGION_
  3. /*******************************************************************************
  4. * FILE NAME: igregion.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IGRegion                                                                 *
  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.  
  19. #include <igraphic.hpp>
  20. #include <ihandle.hpp>
  21.  
  22.  
  23. class IGraphicContext;
  24. class IGRectangle;
  25. class IGPolygon;
  26. class IGEllipse;
  27. class IGPie;
  28. class IGChord;
  29.  
  30. #pragma pack(4)
  31.  
  32. class IGRegion : public IGraphic {
  33. typedef IGraphic
  34.   Inherited;
  35. public:
  36. /*------------------------------- Constructors -------------------------------*/
  37.   IGRegion   ( );
  38.  
  39.   IGRegion   ( const IRegionHandle&   regionHandle   );
  40.  
  41.   IGRegion   ( const IGRegion&        region         );
  42.  
  43.   IGRegion   ( const IGraphicContext& graphicContext,
  44.                const IRectangle&      rectangle      );
  45.  
  46.   IGRegion   ( const IWindowHandle&   windowHandle   );
  47.  
  48. IGRegion
  49.   &operator= ( const IGRegion&        region         );
  50.  
  51. virtual
  52.   ~IGRegion  ( );
  53.  
  54. /*-------------------------------- Drawing -----------------------------------*/
  55. virtual IGRegion
  56.   &drawOn      ( IGraphicContext& graphicContext );
  57.  
  58. /*----------------------------- Positioning ----------------------------------*/
  59. virtual IGRegion
  60.   &moveBy      ( const IPoint& point );
  61.  
  62. /*-------------------------- Modifying a Region ------------------------------*/
  63. virtual IGRegion
  64.   &clear       ( );
  65.  
  66. /*------------------------ Operators With Closed Shapes ----------------------*/
  67. IGRegion
  68.   &operator+= ( const IGRectangle& rect    ),
  69.   &operator-= ( const IGRectangle& rect    ),
  70.   &operator&= ( const IGRectangle& rect    ),
  71.   &operator^= ( const IGRectangle& rect    ),
  72.   &operator+= ( const IGPie&       pie     ),
  73.   &operator-= ( const IGPie&       pie     ),
  74.   &operator&= ( const IGPie&       pie     ),
  75.   &operator^= ( const IGPie&       pie     ),
  76.   &operator+= ( const IGChord&     chord   ),
  77.   &operator-= ( const IGChord&     chord   ),
  78.   &operator&= ( const IGChord&     chord   ),
  79.   &operator^= ( const IGChord&     chord   ),
  80.   &operator+= ( const IGPolygon&   polygon ),
  81.   &operator-= ( const IGPolygon&   polygon ),
  82.   &operator&= ( const IGPolygon&   polygon ),
  83.   &operator^= ( const IGPolygon&   polygon ),
  84.   &operator+= ( const IGEllipse&   ellipse ),
  85.   &operator-= ( const IGEllipse&   ellipse ),
  86.   &operator&= ( const IGEllipse&   ellipse ),
  87.   &operator^= ( const IGEllipse&   ellipse );
  88.  
  89. /*----------------------- Operators With Other IGRegions ---------------------*/
  90. IGRegion
  91.   &operator+= ( const IGRegion& region ),
  92.   &operator-= ( const IGRegion& region ),
  93.   &operator&= ( const IGRegion& region ),
  94.   &operator^= ( const IGRegion& region );
  95.  
  96. /*------------------------------- Conversion ---------------------------------*/
  97. operator const IRegionHandle( ) const;
  98.  
  99. private:
  100. /*--------------------------------- Private ----------------------------------*/
  101. IRegionHandle
  102.   fRegion;
  103. static IRegionHandle
  104.   doRect    ( IGraphicContext& graphicContext, const IGRectangle& rect  ),
  105.   doPie     ( IGraphicContext& graphicContext, const IGPie& pie         ),
  106.   doChord   ( IGraphicContext& graphicContext, const IGChord& chord     ),
  107.   doPolygon ( IGraphicContext& graphicContext, const IGPolygon& polygon ),
  108.   doEllipse ( IGraphicContext& graphicContext, const IGEllipse& ellipse );
  109. virtual IGRegion
  110.   &rotateBy           ( double angle, const IPoint &pt ),
  111.   &scaleBy            ( double xScale, double yScale, const IPoint& pt ),
  112.   &translateBy        ( const IPoint& pt ),
  113.   &setTransformMatrix ( const ITransformMatrix& transformMatrix );
  114. }; // IGRegion
  115.  
  116. #pragma pack()
  117.  
  118. #endif // _IGREGION_
  119.