home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / WSIZE.INL < prev    next >
Text File  |  1996-06-06  |  2KB  |  61 lines

  1. // 
  2. // wsize.inl
  3. // 
  4.        
  5. #ifdef WCMINLINE
  6.  
  7. WCMINLINE WSize::WSize( const SIZE & o ) 
  8. /***************************************/
  9. { w = o.cx; h = o.cy; }
  10.  
  11. WCMINLINE SIZE WSize::GetSIZE() const 
  12. /************************************/
  13. { SIZE s; s.cx = w; s.cy = h; return s; }
  14.  
  15. WCMINLINE void WSize::SetSIZE( const SIZE & s ) 
  16. /**********************************************/
  17. { w = s.cx; h = s.cy; }
  18.  
  19. WCMINLINE void WSize::Create( const SIZE & o ) 
  20. /*********************************************/
  21. { w = o.cx; h = o.cy; }
  22.  
  23. WCMINLINE void WSize::Offset( WInt nw, WInt nh ) 
  24. /**********************************************/
  25. { w += nw; h += nh; }
  26.  
  27. WCMINLINE void WSize::Offset( const WSize & sz ) 
  28. /***********************************************/
  29. { w += sz.w; h += sz.h; }
  30.  
  31. WCMINLINE int WSize::operator==( const WSize & o ) const
  32. /******************************************************/
  33. { return ( w == o.w && h == o.h ); }
  34.  
  35. WCMINLINE int WSize::operator!=( const WSize & o ) const
  36. /******************************************************/
  37. { return ( w != o.w || h != o.h ); }
  38.  
  39. WCMINLINE WSize & WSize::operator=( const SIZE & o )
  40. /**************************************************/
  41. { w = o.cx; h = o.cy; return *this; }
  42.  
  43. WCMINLINE WSize WSize::operator+( const WSize & o )
  44. /*************************************************/
  45. { WSize sz( *this ); sz.w += o.w; sz.h += o.h; return sz; }
  46.  
  47. WCMINLINE WSize WSize::operator-( const WSize & o )
  48. /*************************************************/
  49. { WSize sz( *this ); sz.w -= o.w; sz.h -= o.h; return sz; }
  50.  
  51. WCMINLINE WSize & WSize::operator+=( const WSize & o )
  52. /****************************************************/
  53. { w += o.w; h += o.h; return *this; }
  54.  
  55. WCMINLINE WSize & WSize::operator-=( const WSize & o )
  56. /****************************************************/
  57. { w -= o.w; h -= o.h; return *this; }
  58.     
  59. #endif
  60.         
  61.