]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_funcliminset.C
preview as preview can...
[lyx.git] / src / mathed / math_funcliminset.C
index ac3469cb17c300a6a52ae55e6c555fc7d1ed655c..c2826c6b5685f1a19eb44bc236410879842a13f3 100644 (file)
@@ -1,6 +1,9 @@
+#include <config.h>
+
 #include "math_funcliminset.h"
 #include "math_mathmlstream.h"
-#include "support.h"
+#include "math_streamstr.h"
+#include "math_support.h"
 
 
 MathFuncLimInset::MathFuncLimInset(string const & name)
@@ -16,30 +19,30 @@ MathInset * MathFuncLimInset::clone() const
 
 bool MathFuncLimInset::isScriptable() const
 {
-       return mi_.style == LM_ST_DISPLAY;
+       return scriptable_;
 }
 
 
-void MathFuncLimInset::write(MathWriteInfo & os) const
+void MathFuncLimInset::write(WriteStream & os) const
 {
-       os << '\\' << name_.c_str() << ' ';
+       os << '\\' << name_ << ' ';
 }
 
 
-void MathFuncLimInset::writeNormal(NormalStream & os) const
+void MathFuncLimInset::normalize(NormalStream & os) const
 {
-       os << "[funclim " << name_.c_str() << ']';
+       os << "[funclim " << name_ << ']';
 }
 
 
-void MathFuncLimInset::metrics(MathMetricsInfo const & mi) const
+void MathFuncLimInset::metrics(MathMetricsInfo & mi) const
 {
-       mi_ = mi;
-       mathed_string_dim(LM_TC_TEXTRM, mi_, name_, ascent_, descent_, width_);
+       scriptable_ =  (mi.base.style == LM_ST_DISPLAY);
+       mathed_string_dim(mi.base.font, name_, ascent_, descent_, width_);
 }
 
 
-void MathFuncLimInset::draw(Painter & pain, int x, int y) const
-{  
-       drawStr(pain, LM_TC_TEXTRM, mi_, x, y, name_);
+void MathFuncLimInset::draw(MathPainterInfo & pi, int x, int y) const
+{
+       drawStrBlack(pi, x, y, name_);
 }