#include <config.h>
#include "InsetMathSpace.h"
-#include "MathArray.h"
+#include "MathData.h"
#include "MathStream.h"
#include "LaTeXFeatures.h"
-#include "LColor.h"
#include "frontends/Painter.h"
-using std::string;
-using std::auto_ptr;
-
+using namespace std;
namespace lyx {
}
-auto_ptr<InsetBase> InsetMathSpace::doClone() const
+Inset * InsetMathSpace::clone() const
{
- return auto_ptr<InsetBase>(new InsetMathSpace(*this));
+ return new InsetMathSpace(*this);
}
-bool InsetMathSpace::metrics(MetricsInfo &, Dimension & dim) const
+void InsetMathSpace::metrics(MetricsInfo &, Dimension & dim) const
{
- dim.wid = width();
- dim.asc = ascent();
- dim.des = descent();
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
+ dim = dim_;
}
int xp[4];
int yp[4];
- int w = width();
+ int w = dim_.wid;
xp[0] = ++x; yp[0] = y - 3;
xp[1] = x; yp[1] = y;
xp[2] = x + w - 2; yp[2] = y;
xp[3] = x + w - 2; yp[3] = y - 3;
- pi.pain.lines(xp, yp, 4, (space_ < 3) ? LColor::latex : LColor::math);
+ pi.pain.lines(xp, yp, 4, (space_ < 3) ? Color_latex : Color_math);
}