X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fdimension.h;h=4e803682d3d97f6663840544cdbaceeae73f52f8;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=67d63b9e210e8f1fd11a73bf5878b518399a98ee;hpb=38fce2feaced45d99f3e78ee8e877f2c37aa6bd1;p=lyx.git diff --git a/src/dimension.h b/src/dimension.h index 67d63b9e21..4e803682d3 100644 --- a/src/dimension.h +++ b/src/dimension.h @@ -1,24 +1,24 @@ // -*- C++ -*- - /** - * \file dimension.h - * - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. + * \file dimension.h + * 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. + * Full author contact details are available in file CREDITS. */ #ifndef DIMENSION_H #define DIMENSION_H +namespace lyx { + class LyXFont; /// Simple wrapper around three ints -struct Dimension { +class Dimension { public: /// constructor Dimension() : wid(0), asc(0), des(0) {} @@ -48,7 +48,7 @@ public: public: /// these are intentionally public as things like /// - /// dim.asc += 20; + /// dim.asc += 20; /// /// are used all over the place and "hiding" those behind /// @@ -63,4 +63,13 @@ public: int des; }; +inline +bool operator==(Dimension const & a, Dimension const & b) +{ + return a.wid == b.wid && a.asc == b.asc && a.des ==b.des ; +} + + +} // namespace lyx + #endif