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

  1. #ifndef _ICOORDSY_
  2. #define _ICOORDSY_
  3. /*******************************************************************************
  4. * FILE NAME: icoordsy.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class:                                                  *
  8. *     ICoordinateSystem                                                        *
  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 <ibase.hpp>
  19.  
  20. class IRectangle;
  21. class IPoint;
  22. class ISize;
  23. class ICoordinateSystemData;
  24.  
  25. #pragma pack(4)
  26.  
  27.  
  28. class ICoordinateSystem : public IBase {
  29. typedef IBase
  30.   Inherited;
  31. public:
  32.  
  33. /*------------------------------- Orientation --------------------------------*/
  34. enum Orientation {
  35.   originUpperLeft,
  36.   originLowerLeft
  37. };
  38.  
  39. static Orientation
  40.   nativeOrientation         ( ),
  41.   applicationOrientation    ( ),
  42.   setApplicationOrientation ( Orientation coordsystem = originLowerLeft );
  43.  
  44. /*-------------------------------- Conversion --------------------------------*/
  45. static IRectangle
  46.   convertToApplication ( const IRectangle& nativeRectangle,
  47.                          const ISize&      referenceSize ),
  48.   convertToNative      ( const IRectangle& applicationRectangle,
  49.                          const ISize&      referenceSize );
  50. static IPoint
  51.   convertToApplication ( const IPoint&     nativePoint,
  52.                          const ISize&      referenceSize ),
  53.   convertToNative      ( const IPoint&     applicationPoint,
  54.                          const ISize&      referenceSize );
  55. static Boolean
  56.   isConversionNeeded   ( );
  57.  
  58. private:
  59. /*------------------------------ Hidden Members ------------------------------*/
  60.   ICoordinateSystem ( );
  61.  
  62. /*--------------------------------- Private ----------------------------------*/
  63. static Orientation
  64.   fsapplication;
  65. static IRectangle
  66.   convertRectangle ( const IRectangle& rectangle,
  67.                      const ISize&      referenceSize );
  68. ICoordinateSystemData
  69.  *fCoordinateSystemData;
  70. }; // ICoordinateSystem
  71.  
  72.  
  73. #pragma pack()
  74.  
  75.   #include <icoordsy.inl>
  76.  
  77. #endif /* _ICOORDSY_ */
  78.