X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frect.hh;h=de4f5e0397174700c5b83fb0a7fcd56fc866decb;hb=64ac7d053748494b3a8d0be9f1d55f6f5b9f1a90;hp=23ca0d12913632bee9ca989d7d5164b642c85a57;hpb=4f01802c8cd0e0efc26896cf80e69dd9b6c06ec1;p=chaz%2Fopenbox diff --git a/otk/rect.hh b/otk/rect.hh index 23ca0d12..de4f5e03 100644 --- a/otk/rect.hh +++ b/otk/rect.hh @@ -1,4 +1,4 @@ -// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifndef __rect_hh #define __rect_hh @@ -35,6 +35,12 @@ public: inline Rect(const Point &location, const Point &size) : _x1(location.x()), _y1(location.y()), _x2(size.x() + location.x() - 1), _y2(size.y() + location.y() - 1) { } + //! Constructs a Rect from another Rect + /*! + @param rect The rectangle from which to construct this new one + */ + inline Rect(const Rect &rect) + : _x1(rect._x1), _y1(rect._y1), _x2(rect._x2), _y2(rect._y2) { } //! Constructs a Rect from an XRectangle inline explicit Rect(const XRectangle& xrect) : _x1(xrect.x), _y1(xrect.y), _x2(xrect.width + xrect.x - 1),