#include "MathStream.h"
#include "MathStream.h"
+#include "frontends/Painter.h"
-namespace lyx {
-
-using std::string;
-using std::auto_ptr;
-using std::vector;
+namespace lyx {
-InsetMathUnknown::InsetMathUnknown(docstring const & nm, bool final, bool black)
- : name_(nm), final_(final), black_(black)
+InsetMathUnknown::InsetMathUnknown(docstring const & nm,
+ docstring const & selection, bool final, bool black)
+ : name_(nm), final_(final), black_(black), selection_(selection)
{}
-auto_ptr<Inset> InsetMathUnknown::doClone() const
-{
- return auto_ptr<Inset>(new InsetMathUnknown(*this));
-}
-
-
docstring InsetMathUnknown::name() const
{
return name_;
}
-bool InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
{
mathed_string_dim(mi.base.font, name_, dim);
docstring::const_reverse_iterator rit = name_.rbegin();
kerning_ = mathed_char_kerning(mi.base.font, *rit);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
}
drawStrBlack(pi, x, y, name_);
else
drawStrRed(pi, x, y, name_);
- setPosCache(pi, x, y);
}