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

  1. #ifndef _IFRAMEXT_
  2. #define _IFRAMEXT_
  3. /*******************************************************************************
  4. * FILE NAME: iframext.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IFrameExtension                                                          *
  9. *     IFrameExtensions                                                         *
  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. #include <ibase.hpp>
  20. #include <iframe.hpp>
  21. #include <ipoint.hpp>
  22. #include <irect.hpp>
  23. #include <iseq.h>
  24.  
  25. class IFrameExtensionData;
  26. class IPresSpaceHandle;
  27. class ISWP;
  28.  
  29. #pragma pack(4)
  30.  
  31. class IFrameExtension : public IBase {
  32. typedef IBase
  33.   Inherited;
  34. public:
  35. /*------------------------------- Constructors -------------------------------*/
  36.   IFrameExtension ( IWindow*                     window,
  37.                     IFrameWindow::Location       location,
  38.                     unsigned long                widthOrHeight,
  39.                     IFrameWindow::SeparatorType  separator );
  40.   IFrameExtension ( IWindow*                     window,
  41.                     IFrameWindow::Location       location,
  42.                     double                       percentage,
  43.                     IFrameWindow::SeparatorType  separator );
  44.   IFrameExtension ( IWindow*                     window,
  45.                     IFrameWindow::Location       location,
  46.                     IFrameWindow::SeparatorType  separator );
  47.  
  48. /*----------------------------- Extension Window -----------------------------*/
  49. IWindow
  50.  *control ( ) const;
  51.  
  52. /*------------------------------ Extension Type ------------------------------*/
  53. enum Type {
  54.   fixed,
  55.   relative
  56.   ,
  57.   minimumSize
  58.   };
  59.  
  60. Type
  61.   type ( ) const;
  62.  
  63. /*----------------------------- Extension Sizing -----------------------------*/
  64. virtual unsigned long
  65.   fixedSize      ( ) const;
  66.  
  67. virtual double
  68.   relativeSize   ( ) const;
  69.  
  70. virtual IFrameExtension
  71.  &setSize        ( unsigned long     widthOrHeight ),
  72.  &setSize        ( int               widthOrHeight ),
  73.  &setSize        ( double            widthOrHeight );
  74.  
  75. virtual ISize
  76.   sizeTo         ( const ISize&      baseSize ) const;
  77.  
  78. virtual IRectangle
  79.   totalRectFor   ( const IRectangle& baseRect ) const,
  80.   baseRectFor    ( const IRectangle& totalRect ) const;
  81.  
  82. virtual IFrameExtension
  83.  &useMinimumSize ( );
  84.  
  85. /*---------------------------- Extension Location ----------------------------*/
  86. IFrameWindow::Location
  87.   location     ( ) const;
  88.  
  89. virtual ISWP
  90.   attachTo     ( ISWP& baseSWP );
  91.  
  92. virtual unsigned long
  93.   attachedToId ( ) const;
  94.  
  95. /*-------------------------------- Separator ---------------------------------*/
  96.  
  97. virtual unsigned long
  98.   separatorWidth     ( ) const;
  99.  
  100. virtual void
  101.   drawSeparator      ( const IPresSpaceHandle& psh );
  102.  
  103. private:
  104. /*--------------------------------- Private ----------------------------------*/
  105. IFrameExtensionData
  106.  *pData;
  107.  
  108. union {
  109.   double
  110.     extRelativeSize;
  111.   unsigned long
  112.     extFixedSize;
  113.   };
  114.  
  115. Type
  116.   extType;
  117. IFrameWindow::Location
  118.   extLocation;
  119. IFrameWindow::SeparatorType
  120.   extSeparator;
  121. IPoint
  122.   extPosition;
  123. ISize
  124.   extSize;
  125. IWindow
  126.  *extControl;
  127.  
  128. /*------------------------------ Hidden Members ------------------------------*/
  129. IFrameExtension ( const IFrameExtension& frameExtension );
  130. IFrameExtension
  131.  &operator =    ( const IFrameExtension& frameExtension );
  132. }; // IFrameExtension
  133.  
  134.  
  135. class IFrameExtensions : public ISequence< IFrameExtension* > {
  136. public:
  137. /*------------------------------- Constructors -------------------------------*/
  138.   IFrameExtensions ( );
  139.  ~IFrameExtensions ( );
  140. }; // IFrameExtensions
  141.  
  142. #pragma pack()
  143.  
  144.   #include <iframext.inl>
  145.  
  146. #endif /* _IFRAMEXT_ */
  147.