4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
18 /// Simple wrapper around three ints
22 Dimension() : wid(0), asc(0), des(0) {}
24 Dimension(int w, int a, int d) : wid(w), asc(a), des(d) {}
27 void operator+=(Dimension const & dim);
29 void clear() { wid = asc = des = 0; }
30 /// set to empty box suitble for given font
31 void clear(LyXFont const & font);
33 int height() const { return asc + des; }
35 int ascent() const { return asc; }
37 int descent() const { return des; }
39 int width() const { return wid; }
41 /// add space for a frame
42 //void addFrame(int frame) const;
43 /// add space for bottom part of a frame
44 //void addFrameBottom(int frame) const;
47 /// these are intentionally public as things like
51 /// are used all over the place and "hiding" those behind
53 /// dim.ascent(dim.ascent() + 20);
55 /// makes the code neither faster nor clearer