home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xsize.h < prev    next >
C/C++ Source or Header  |  1998-04-05  |  1KB  |  38 lines

  1. #ifndef __OOL_XSIZE_H__
  2. #define __OOL_XSIZE_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XSize                                 */
  8. /*                       derived from: XObject                               */
  9. /*                        last update: 3/97                                  */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14.  
  15. #include "xobject.h"
  16. #include "string.h"
  17.  
  18. class _export_ XSize: public XObject
  19. {
  20.    private:
  21.       LONG width, height;
  22.    public:
  23.       XSize( const LONG x=0, const LONG y=0) {width = x; height = y; }
  24.       LONG GetWidth() const { return width; }
  25.       LONG GetHeight() const { return height; }
  26.       void SetWidth( const LONG x) { width = x; }
  27.       void SetHeight( const LONG y ) { height = y; }
  28.       void Set(const LONG x, const LONG y) { height = y; width = x; }
  29.       XSize operator =(const XSize& s)
  30.          {
  31.             width=s.width;
  32.             width=s.height;
  33.             return *this;
  34.          }
  35. };
  36.  
  37. #endif
  38.