X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fdimension.h;h=67d63b9e210e8f1fd11a73bf5878b518399a98ee;hb=09e01879979643949f1f2c7216023f1f35d5ada2;hp=7fe34b34d6a9f08f2fd7b719c3a206f1bd63ebc4;hpb=723ee136ba0f980346de93289b278c3a544f3e71;p=lyx.git diff --git a/src/dimension.h b/src/dimension.h index 7fe34b34d6..67d63b9e21 100644 --- a/src/dimension.h +++ b/src/dimension.h @@ -21,29 +21,34 @@ class LyXFont; struct Dimension { public: /// constructor - Dimension() : w(0), a(0), d(0) {} + Dimension() : wid(0), asc(0), des(0) {} /// initialize data - Dimension(int ww, int aa, int dd) : w(ww), a(aa), d(dd) {} + Dimension(int w, int a, int d) : wid(w), asc(a), des(d) {} /// glue horizontally void operator+=(Dimension const & dim); /// set to empty box - void clear() { w = a = d = 0; } + void clear() { wid = asc = des = 0; } /// set to empty box suitble for given font void clear(LyXFont const & font); /// get height - int height() const { return a + d; } + int height() const { return asc + des; } /// get ascent - int ascent() const { return a; } + int ascent() const { return asc; } /// get descent - int descent() const { return d; } + int descent() const { return des; } /// get width - int width() const { return w; } + int width() const { return wid; } + + /// add space for a frame + //void addFrame(int frame) const; + /// add space for bottom part of a frame + //void addFrameBottom(int frame) const; public: /// these are intentionally public as things like /// - /// dim.a += 20; + /// dim.asc += 20; /// /// are used all over the place and "hiding" those behind /// @@ -51,11 +56,11 @@ public: /// /// makes the code neither faster nor clearer /// width - int w; + int wid; /// ascent - int a; + int asc; /// descent - int d; + int des; }; #endif