X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FDimension.h;h=0607be6eba20e222f1eda6a18d43f4b34d5a13dc;hb=ce2e1554908785d7accba292985017fb961b1450;hp=eefd76419aa31d5569fe3b73941b72cf69f76feb;hpb=f630be890494c849981e4fb52ea4740506e92bed;p=lyx.git diff --git a/src/Dimension.h b/src/Dimension.h index eefd76419a..0607be6eba 100644 --- a/src/Dimension.h +++ b/src/Dimension.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -32,6 +32,8 @@ public: void operator+=(Dimension const & dim); /// set to empty box void clear() { wid = asc = des = 0; } + /// check if box is empty + bool empty() const { return wid == 0 && asc == 0 && wid == 0; } /// get height int height() const { return asc + des; } /// get ascent @@ -77,6 +79,16 @@ bool operator!=(Dimension const & a, Dimension const & b) return a.wid != b.wid || a.asc != b.asc || a.des != b.des ; } +class Point { +public: + Point() + : x_(0), y_(0) + {} + + Point(int x, int y); + + int x_, y_; +}; } // namespace lyx