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

  1. #ifndef _ISWP_
  2. #define _ISWP_
  3. /*******************************************************************************
  4. * FILE NAME: iswp.hpp                                                          *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     ISWP                                                                     *
  9. *     ISWPArray                                                                *
  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 <ihandle.hpp>
  21.  
  22. class IPoint;
  23. class ISize;
  24.  
  25. #pragma pack(4)
  26.  
  27. class ISWP : public IBase {
  28. typedef IBase
  29.   Inherited;
  30. public:
  31. /*------------------------------- Constructors -------------------------------*/
  32.   ISWP      ( );
  33.   ISWP      ( const ISWP& original );
  34.  
  35.  ~ISWP      ( );
  36.  
  37. ISWP
  38.  &operator= ( const ISWP& original );
  39.  
  40. /*--------------------------- Window Manipulation ----------------------------*/
  41. IWindowHandle
  42.   windowHandle ( ) const;
  43.  
  44. IPoint
  45.   position     ( ) const;
  46. ISize
  47.   size         ( ) const;
  48.  
  49. ISWP
  50.  &setPosition  ( const IPoint& point ),
  51.  &setSize      ( const ISize&  size );
  52.  
  53. ISWP
  54.  &setMove      ( Boolean enable = true ),
  55.  &setSizeFlag  ( Boolean enable = true ),
  56.  &setShow      ( Boolean enable = true ),
  57.  &setHide      ( Boolean enable = true ),
  58.  &setZOrder    ( Boolean enable = true ),
  59.  &setNoAdjust  ( Boolean enable = true );
  60.  
  61. unsigned long
  62.  &flags        ( );
  63.  
  64. /*--------------------------------- Testing ----------------------------------*/
  65. Boolean
  66.   isMove   ( ) const,
  67.   isSize   ( ) const,
  68.   isShow   ( ) const,
  69.   isHide   ( ) const,
  70.   isZOrder ( ) const;
  71.  
  72. /*----------------------------------- Data -----------------------------------*/
  73.  
  74. IWindowHandle
  75.   hwnd,
  76.   behind;
  77. long
  78.   x,
  79.   y,
  80.   cx,
  81.   cy;
  82. unsigned long
  83.   fl;
  84. };  // ISWP
  85.  
  86. class ISWPArray : public IBase {
  87. typedef IBase
  88.   Inherited;
  89. public:
  90. /*------------------------------- Constructors -------------------------------*/
  91.   ISWPArray ( ISWP*    array,
  92.               unsigned dimension );
  93.  
  94. /*------------------------------ Array Contents ------------------------------*/
  95. unsigned
  96.   size        ( ) const;
  97.  
  98. ISWP
  99.  &operator [] ( unsigned index );
  100.  
  101. unsigned
  102.   indexOf     ( unsigned long windowId ) const;
  103.  
  104. private:
  105. /*--------------------------------- Private ----------------------------------*/
  106. ISWP
  107.  *p;
  108. unsigned
  109.   dim;
  110. }; // ISWPArray
  111.  
  112. #pragma pack()
  113.  
  114.   #include <iswp.inl>
  115.  
  116. #endif // _ISWP_
  117.