-#include <config.h>
+/**
+ * \file math_biginset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+#include <config.h>
#include "math_biginset.h"
#include "math_support.h"
-#include "math_parser.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
+using std::string;
+using std::auto_ptr;
+
+
MathBigInset::MathBigInset(string const & name, string const & delim)
: name_(name), delim_(delim)
{}
-MathInset * MathBigInset::clone() const
+auto_ptr<InsetBase> MathBigInset::clone() const
{
- return new MathBigInset(*this);
+ return auto_ptr<InsetBase>(new MathBigInset(*this));
}
case 3: return 0.7;
default: return 0.0;
}
- return 0.0;
}
-void MathBigInset::metrics(MathMetricsInfo & mi) const
+void MathBigInset::metrics(MetricsInfo & mi, Dimension & dim) const
{
double const h = mathed_char_ascent(mi.base.font, 'I');
double const f = increase();
- dim_.w = 6;
- dim_.a = int(h + f * h);
- dim_.d = int(f * h);
+ dim_.wid = 6;
+ dim_.asc = int(h + f * h);
+ dim_.des = int(f * h);
+ dim = dim_;
}
-void MathBigInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathBigInset::draw(PainterInfo & pi, int x, int y) const
{
- mathed_draw_deco(pi, x + 1, y - ascent(), 4, height(), delim_);
+ mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 4, dim_.height(), delim_);
}