#include "lyxlex.h"
#include "metricsinfo.h"
+using namespace lyx::support;
+
using std::ostream;
using std::endl;
+using std::auto_ptr;
/* LatexAccent. Proper handling of accented characters */
// overhaul. Different ways of drawing (what metrics to use)
// should also be considered.
- BufferView * bv = pi.base.bv;
LyXFont font = pi.base.font;
if (lyxrc.font_norm_type == LyXRC::ISO_10646_1)
font.setLanguage(english_language);
- Dimension dim;
- MetricsInfo mi;
- mi.base.bv = pi.base.bv;
- mi.base.font = pi.base.font;
- metrics(mi, dim);
- dim_ = dim;
-
if (candisp) {
float x2 = x + (rbearing(font) - lbearing(font)) / 2.0;
float hg;
// closer to the top of the dot-less 'i' or 'j'.
char tmpic = ic; // store the ic when we
ic = 'x'; // calculates the ascent of
- int asc = ascent(bv, font); // the dot-less version (here: 'x')
+#warning metrics?
+ int asc = ascent(); // the dot-less version (here: 'x')
ic = tmpic; // set the orig ic back
y = baseline - asc; // update to new y coord.
}
case CIRCLE: // circle
{
- LyXFont tmpf(font);
+ LyXFont tmpf = font;
tmpf.decSize().decSize();
pi.pain.text(int(x2 - (font_metrics::rbearing(0xB0, tmpf) - font_metrics::lbearing(0xB0, tmpf)) / 2.0),
int(baseline - font_metrics::ascent(ic, font) - font_metrics::descent(0xB0, tmpf) - (font_metrics::ascent(0xB0, tmpf) + font_metrics::descent(0xB0, tmpf)) / 3.0),
}
-Inset * InsetLatexAccent::clone(Buffer const &) const
+auto_ptr<InsetBase> InsetLatexAccent::clone() const
{
- return new InsetLatexAccent(contents);
+ return auto_ptr<InsetBase>(new InsetLatexAccent(contents));
}
-// Inset * InsetLatexAccent::clone(Buffer const &, bool) const
-// {
-// return new InsetLatexAccent(contents);
-// }
-
-
-Inset::Code InsetLatexAccent::lyxCode() const
+InsetOld::Code InsetLatexAccent::lyxCode() const
{
- return Inset::ACCENT_CODE;
+ return InsetOld::ACCENT_CODE;
}