+2002-09-23 Angus Leeming <leeming@lyx.org>
+
+ * QMath.h: forward declare QMathDialog.
+ Remove trailing semi-colons after definition of apply and
+ update_contents methods.
+
+ * qfont_metrics.C: endl is in namespace std.
+ Some whitespece stuff.
+
2002-09-22 John Levon <levon@movementarian.org>
* qlkey.h: make Key_Unknown a modifier, to handle
}
}
-
+
namespace font_metrics {
-
+
int maxAscent(LyXFont const & f)
{
return metrics(f).ascent();
int lbearing(char c, LyXFont const & f)
{
- lyxerr << "lb of " << c << " is " << metrics(f).leftBearing(c) << endl;
+ lyxerr << "lb of " << c << " is " << metrics(f).leftBearing(c)
+ << std::endl;
return metrics(f).leftBearing(c);
}
int rbearing(char c, LyXFont const & f)
{
QFontMetrics const & m(metrics(f));
-
- // Qt rbearing is from the right edge of the char's width().
+
+ // Qt rbearing is from the right edge of the char's width().
return (m.width(c) - m.rightBearing(c));
}
}
// handle small caps ourselves ...
-
+
LyXFont smallfont(f);
smallfont.decSize().decSize().setShape(LyXFont::UP_SHAPE);
void rectText(string const & str, LyXFont const & f,
int & w,
- int & ascent,
+ int & ascent,
int & descent)
{
QFontMetrics const & m(metrics(f));
-
+
static int const d = 2;
-
+
w = width(str, f) + d * 2 + 2;
ascent = m.ascent() + d;
descent = m.descent() + d;
void buttonText(string const & str, LyXFont const & f,
- int & w,
- int & ascent,
+ int & w,
+ int & ascent,
int & descent)
{
QFontMetrics const & m(metrics(f));
-
+
static int const d = 3;
-
+
w = width(str, f) + d * 2 + 2;
ascent = m.ascent() + d;
descent = m.descent() + d;