-#include <config.h>
+/**
+ * \file math_envinset.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.
+ */
-#ifdef __GNUG__
-#pragma implementation
-#endif
+#include <config.h>
#include "math_envinset.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
-#include "support/LOstream.h"
+#include "support/std_ostream.h"
+
+using std::auto_ptr;
MathEnvInset::MathEnvInset(string const & name)
{}
-MathInset * MathEnvInset::clone() const
+auto_ptr<InsetBase> MathEnvInset::clone() const
{
- return new MathEnvInset(*this);
+ return auto_ptr<InsetBase>(new MathEnvInset(*this));
}
-void MathEnvInset::metrics(MathMetricsInfo & mi) const
+void MathEnvInset::metrics(MetricsInfo & mi, Dimension & dim) const
{
- dim_ = cell(0).metrics(mi);
- metricsMarkers2();
+ cell(0).metrics(mi, dim_);
+ metricsMarkers();
+ dim = dim_;
}
-void MathEnvInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathEnvInset::draw(PainterInfo & pi, int x, int y) const
{
cell(0).draw(pi, x + 1, y);
- drawMarkers2(pi, x, y);
+ drawMarkers(pi, x, y);
}