#include "button_inset.h"
#include "math_support.h"
+#include "math_metricsinfo.h"
#include "frontends/Painter.h"
#include <algorithm>
xcell(1).draw(pi, x + xcell(0).width() + 2, y);
mathed_draw_framebox(pi, x, y, this);
} else {
- pi.pain.buttonText(x + 2, y, screenLabel(),
- pi.base.font);
+ pi.pain.buttonText(x + 2, y, screenLabel(), pi.base.font);
}
}
#include "math_parser.h"
#include "math_charinset.h"
#include "math_arrayinset.h"
+#include "math_metricsinfo.h"
#include "math_deliminset.h"
#include "math_hullinset.h"
#include "math_support.h"
#include "LaTeXFeatures.h"
#include "debug.h"
#include "math_support.h"
+#include "math_metricsinfo.h"
#include "support/lstrings.h"
#include "frontends/LyXView.h"
#include "frontends/font_metrics.h"
if (bv)
view_ = bv->owner()->view();
MathMetricsInfo mi;
- mi.view = view_;
//mi.base.style = display() ? LM_ST_DISPLAY : LM_ST_TEXT;
mi.base.style = LM_ST_TEXT;
mi.base.font = font_;
#include "math_macro.h"
#include "math_macrotable.h"
#include "math_macrotemplate.h"
+#include "math_metricsinfo.h"
#include "math_support.h"
#include "math_mathmlstream.h"
#include "BufferView.h"
#include "math_amsarrayinset.h"
#include "math_mathmlstream.h"
+#include "math_metricsinfo.h"
#include "math_support.h"
#include "math_streamstr.h"
#include "math_support.h"
#include "math_arrayinset.h"
#include "math_parser.h"
#include "math_mathmlstream.h"
+#include "math_metricsinfo.h"
#include "math_streamstr.h"
#include "Lsstream.h"
#pragma interface
#endif
-#include <vector>
-#include <iosfwd>
-
#include "math_nestinset.h"
+#include "math_metricsinfo.h"
#include "math_macroarg.h"
#include "LString.h"
// settled.
+#include "math_metricsinfo.h"
+
#include <iosfwd>
class MathArray;
-
MathMetricsInfo::MathMetricsInfo()
: fullredraw(false)
{}
-
MathPainterInfo::MathPainterInfo(Painter & p)
: pain(p)
{}
#include "lyxfont.h"
#include "LString.h"
-#include <boost/weak_ptr.hpp>
-
-class BufferView;
class Painter;
-class MathNestInset;
/// Standard Math Sizes (Math mode styles)
///
MathMetricsBase base;
///
- boost::weak_ptr<BufferView> view;
- ///
bool fullredraw;
};
struct MathPainterInfo {
///
- MathPainterInfo(Painter & p);
+ MathPainterInfo(Painter & pain);
///
void draw(int x, int y, char c);
asc += na + 2;
else
asc = max(asc, na);
- asc = max(asc, mathed_char_ascent(font_, 'I'));
+ asc = max(asc, 5);
return asc;
}
int MathScriptInset::nwid() const
{
- return nuc().size() ? nuc().width() : mathed_char_width(font_, '.');
+ return nuc().size() ? nuc().width() : 2;
}
int MathScriptInset::nasc() const
{
- return nuc().size() ? nuc().ascent() : mathed_char_ascent(font_, 'I');
+ return nuc().size() ? nuc().ascent() : 5;
}
int MathScriptInset::ndes() const
{
- return nuc().size() ? nuc().descent() : mathed_char_descent(font_, 'I');
+ return nuc().size() ? nuc().descent() : 0;
}
if (nuc().size())
nuc().draw(pi, x + dxx(), y);
else if (editing())
- drawStr(pi, font_, x + dxx(), y, ".");
+ drawStr(pi, pi.base.font, x + dxx(), y, ".");
MathScriptChanger dummy(pi.base);
if (hasUp())
up().draw(pi, x + dx1(), y - dy1());
bool script_[2];
/// 1 - "limits", -1 - "nolimits", 0 - "default"
int limits_;
- /// cached font
- mutable LyXFont font_;
};
#endif
#define MATHSIZEINSET_H
#include "math_nestinset.h"
+#include "math_metricsinfo.h"
#ifdef __GNUG__
#pragma interface
#include "math_cursor.h"
#include "math_inset.h"
#include "math_parser.h"
+#include "math_metricsinfo.h"
#include "frontends/Painter.h"
#include "frontends/font_metrics.h"
#include "frontends/lyx_gui.h"
#include "math_textinset.h"
+#include "math_metricsinfo.h"
#include "debug.h"
#endif
#include "math_xdata.h"
+#include "math_metricsinfo.h"
#include "math_support.h"
#include "math_inset.h"
#include "frontends/Painter.h"
#include <iosfwd>
#include "math_data.h"
-#include "math_metricsinfo.h"
+//#include "math_metricsinfo.h"
#include "dimension.h"
#ifdef __GNUG__
#pragma interface
#endif
+class MathMetricsInfo;
class MathPainterInfo;
+class TextMetricsInfo;
class TextPainter;
#define MATH_ARROWINSET_H
#include "math_nestinset.h"
+#include "math_metricsinfo.h"
#ifdef __GNUG__
#pragma interface
///
MathInset * clone() const;
///
- void metrics(MathMetricsInfo & st) const;
+ void metrics(MathMetricsInfo & mi) const;
///
- void draw(MathPainterInfo & pain, int x, int y) const;
+ void draw(MathPainterInfo & pi, int x, int y) const;
///
MathXYArrowInset * asXYArrowInset() { return this; }