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

  1. #ifndef _IGPIE_
  2. #define _IGPIE_
  3. /*******************************************************************************
  4. * FILE NAME: igpie.hpp                                                         *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IGPie                                                                    *
  9. *     IGChord                                                                  *
  10. *                                                                              *
  11. * COPYRIGHT:                                                                   *
  12. *   IBM Open Class Library                                                     *
  13. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  14. *   Licensed Material - Program-Property of IBM - 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.  
  20. #include <igraphic.hpp>
  21. #include <ipoint.hpp>
  22.  
  23.  
  24. class IGraphicContext;
  25.  
  26. #pragma pack(4)
  27.  
  28. class IGPie : public IGraphic {
  29. typedef IGraphic
  30.   Inherited;
  31. public:
  32. /*------------------------------- Constructors -------------------------------*/
  33.   IGPie     ( const IRectangle& rectangle,
  34.               double            startAngle,
  35.               double            sweepAngle  );
  36.  
  37.   IGPie     ( const IGPie&      pie         );
  38.  
  39. IGPie&
  40.   operator= ( const IGPie& pie              );
  41.  
  42. virtual
  43.   ~IGPie    ( );
  44.  
  45. /*-------------------------------- Drawing -----------------------------------*/
  46. virtual IGPie
  47.   &drawOn          ( IGraphicContext& graphicContext );
  48.  
  49. /*-------------------------- Enclosing Rectangle -----------------------------*/
  50. virtual IGPie
  51.   &setEnclosingRect   ( const IRectangle &rectangle );
  52.  
  53. virtual IRectangle
  54.   enclosingRect       ( ) const;
  55.  
  56. /*------------------------- Start and Sweep Angles ---------------------------*/
  57. virtual IGPie
  58.   &setStartAngle   ( double startAngle ),
  59.   &setSweepAngle   ( double sweepAngle );
  60.  
  61. virtual double
  62.   startAngle       ( ) const,
  63.   sweepAngle       ( ) const;
  64.  
  65. /*-------------------------------- Comparison --------------------------------*/
  66. IBase::Boolean
  67.   operator== ( const IGPie& pie ) const,
  68.   operator!= ( const IGPie& pie ) const;
  69.  
  70. private:
  71. /*-------------------------------- Private -----------------------------------*/
  72. IRectangle
  73.   fRect;
  74. long
  75.   fStart,
  76.   fSweep;
  77. }; // IGPie
  78.  
  79. class IGChord : public IGPie {
  80. typedef IGPie
  81.   Inherited;
  82. public:
  83. /*------------------------------- Constructors -------------------------------*/
  84.   IGChord  ( const IRectangle& rectangle,
  85.              double            startAngle,
  86.              double            sweepAngle   );
  87.  
  88.   IGChord  ( const IGChord&    chord        );
  89.  
  90. virtual
  91.   ~IGChord ( );
  92.  
  93. /*-------------------------------- Drawing -----------------------------------*/
  94. virtual IGChord
  95.   &drawOn( IGraphicContext& graphicContext );
  96.  
  97. }; // IGChord
  98.  
  99. #pragma pack()
  100.  
  101. #endif // _IGPIE_
  102.