]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathUnknown.cpp
Change the interface to a paragraph's layout. We still store a LayoutPtr, but now...
[lyx.git] / src / mathed / InsetMathUnknown.cpp
index 50032bf9b5526319c164bf966fdce808f6bf00e3..22ea1fc88832413e47f5b7548eb8e0b9112eb48e 100644 (file)
 #include "MathStream.h"
 #include "MathStream.h"
 
+#include "frontends/Painter.h"
+
 
 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)
 {}
 
 
@@ -48,15 +51,11 @@ void InsetMathUnknown::normalize(NormalStream & os) const
 }
 
 
-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;
 }
 
 
@@ -66,7 +65,6 @@ void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const
                drawStrBlack(pi, x, y, name_);
        else
                drawStrRed(pi, x, y, name_);
-       setPosCache(pi, x, y);
 }