home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / ISWP.INL < prev    next >
Text File  |  1993-10-22  |  2KB  |  84 lines

  1. #ifndef _ISWP_INL_
  2. #define _ISWP_INL_ 0
  3. /*******************************************************************************
  4. * FILE NAME: iswp.inl                                                          *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the definition of the inline functions for the          *
  8. *   class(es) declared in iswp.hpp.                                            *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or               *
  15. *   disclosure                                                                 *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _ISWP_
  20.   #undef  _ISWP_INL_
  21.   #define _ISWP_INL_ 1
  22.   #include <iswp.hpp>
  23. #endif
  24.  
  25. #ifndef _IPOINT_
  26.   #include <ipoint.hpp>
  27. #endif
  28.  
  29. #if _ISWP_INL_
  30.   #define inline
  31. #endif
  32.  
  33. inline IWindowHandle ISWP :: windowHandle ( ) const
  34.   {
  35.   return this->hwnd;
  36.   }
  37.  
  38. inline IPoint ISWP :: position ( ) const
  39.   {
  40.   return IPoint( this->x, this->y );
  41.   }
  42.  
  43. inline ISWP &ISWP :: setPosition ( const IPoint &aPoint )
  44.   {
  45.   this->x = aPoint.x();
  46.   this->y = aPoint.y();
  47.   return *this;
  48.   }
  49.  
  50. inline ISize ISWP :: size ( ) const
  51.   {
  52.   return ISize( this->cx, this->cy );
  53.   }
  54.  
  55. inline ISWP &ISWP :: setSize ( const ISize &aSize )
  56.   {
  57.   this->cx = aSize.width();
  58.   this->cy = aSize.height();
  59.   return *this;
  60.   }
  61.  
  62. inline ISWPArray :: ISWPArray ( ISWP *array, unsigned dimension )
  63.   : p( array ),
  64.     dim( dimension )
  65.   {
  66.   }
  67.  
  68. inline unsigned long &ISWP :: flags ( )
  69.   {
  70.   return this->fl;
  71.   }
  72.  
  73. inline unsigned ISWPArray :: size ( ) const
  74.   {
  75.   return this->dim;
  76.   }
  77.  
  78. inline ISWP &ISWPArray :: operator [] ( unsigned index )
  79.   {
  80.   return p[index];
  81.   }
  82.  
  83. #endif // _ISWP_INL_
  84.