6 * This file is part of LyX, the document processor.
7 * Licence details can be found in the file COPYING.
11 * Full author contact details are available in file CREDITS.
20 /// Simple wrapper around three ints
24 Dimension() : w(0), a(0), d(0) {}
26 Dimension(int ww, int aa, int dd) : w(ww), a(aa), d(dd) {}
29 void operator+=(Dimension const & dim);
31 void clear() { w = a = d = 0; }
32 /// set to empty box suitble for given font
33 void clear(LyXFont const & font);
35 int height() const { return a + d; }
37 int ascent() const { return a; }
39 int descent() const { return d; }
41 int width() const { return w; }
44 /// these are intentionally public as things like
48 /// are used all over the place and "hiding" those behind
50 /// dim.ascent(dim.ascent() + 20);
52 /// makes the code neither faster nor clearer