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() : wid(0), asc(0), des(0) {}
26 Dimension(int w, int a, int d) : wid(w), asc(a), des(d) {}
29 void operator+=(Dimension const & dim);
31 void clear() { wid = asc = des = 0; }
32 /// set to empty box suitble for given font
33 void clear(LyXFont const & font);
35 int height() const { return asc + des; }
37 int ascent() const { return asc; }
39 int descent() const { return des; }
41 int width() const { return wid; }
43 /// add space for a frame
44 //void addFrame(int frame) const;
45 /// add space for bottom part of a frame
46 //void addFrameBottom(int frame) const;
49 /// these are intentionally public as things like
53 /// are used all over the place and "hiding" those behind
55 /// dim.ascent(dim.ascent() + 20);
57 /// makes the code neither faster nor clearer