X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_funcliminset.C;h=c2826c6b5685f1a19eb44bc236410879842a13f3;hb=4bc59f21015e9151841eea3733b97d25cd616fdc;hp=5af941b386eabf61ea9a57ede571f7708a39878e;hpb=cde897f38b14b6477dbfd9f9587a41f42fe9dba5;p=lyx.git diff --git a/src/mathed/math_funcliminset.C b/src/mathed/math_funcliminset.C index 5af941b386..c2826c6b56 100644 --- a/src/mathed/math_funcliminset.C +++ b/src/mathed/math_funcliminset.C @@ -1,13 +1,13 @@ -#include "math_funcliminset.h" -#include "mathed/math_parser.h" -#include "mathed/support.h" -#include "support/LOstream.h" +#include +#include "math_funcliminset.h" +#include "math_mathmlstream.h" +#include "math_streamstr.h" +#include "math_support.h" -using std::ostream; -MathFuncLimInset::MathFuncLimInset(const latexkeys * l) - : sym_(l) +MathFuncLimInset::MathFuncLimInset(string const & name) + : name_(name) {} @@ -19,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 << '\\' << sym_->name << ' '; + os << '\\' << name_ << ' '; } -void MathFuncLimInset::writeNormal(ostream & os) const +void MathFuncLimInset::normalize(NormalStream & os) const { - os << "[" << sym_->name << "] "; + 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_, sym_->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, sym_->name); +void MathFuncLimInset::draw(MathPainterInfo & pi, int x, int y) const +{ + drawStrBlack(pi, x, y, name_); }