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

  1. #ifndef _IGLINE_
  2. #define _IGLINE_
  3. /*******************************************************************************
  4. * FILE NAME: igline.hpp                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IGLine                                                                   *
  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 <ipoint.hpp>
  21.  
  22.  
  23. class IGraphicContext;
  24. class IGraphicBundle;
  25.  
  26. #pragma pack(4)
  27.  
  28. class IGLine : public IGraphic {
  29. typedef IGraphic
  30.   Inherited;
  31. public:
  32. /*------------------------------- Constructors -------------------------------*/
  33.   IGLine    ( const IPoint& startingPoint,
  34.               const IPoint& endingPoint    );
  35.  
  36.   IGLine    ( const IGLine& line           );
  37.  
  38. IGLine&
  39.   operator= ( const IGLine& line           );
  40.  
  41. virtual
  42.   ~IGLine ( );
  43.  
  44. /*-------------------------------- Drawing -----------------------------------*/
  45. virtual IGLine
  46.   &drawOn          ( IGraphicContext& graphicContext );
  47.  
  48. /*------------------------------ Data Access ---------------------------------*/
  49. virtual IGLine
  50.   &setStartingPoint ( const IPoint& point ),
  51.   &setEndingPoint   ( const IPoint& point );
  52.  
  53. virtual IPoint
  54.   startingPoint     ( ) const,
  55.   endingPoint       ( ) const,
  56.   centerPoint       ( ) const;
  57.  
  58. double
  59.   slope             ( ) const;
  60.  
  61. /*-------------------------------- Comparison --------------------------------*/
  62. IBase::Boolean
  63.   operator== ( const IGLine& line ) const,
  64.   operator!= ( const IGLine& line ) const;
  65.  
  66. private:
  67. /*-------------------------------- Private -----------------------------------*/
  68. IPoint
  69.   fStart,
  70.   fEnd;
  71. }; // IGLine
  72.  
  73. #pragma pack()
  74.  
  75. #endif // _IGLINE_
  76.