5 #include "math_funcinset.h"
8 #include "mathed/support.h"
9 #include "support/LOstream.h"
14 extern LyXFont WhichFont(short type, int size);
17 MathFuncInset::MathFuncInset(string const & nm, MathInsetTypes ot)
18 : MathInset(0, nm, ot)
20 lims_ = (GetType() == LM_OT_FUNCLIM);
24 MathInset * MathFuncInset::clone() const
26 return new MathFuncInset(*this);
30 void MathFuncInset::Write(std::ostream & os, bool /* fragile */) const
32 os << "\\" << name_ << ' ';
36 void MathFuncInset::WriteNormal(std::ostream & os) const
38 os << "[" << name_ << "] ";
42 void MathFuncInset::Metrics(MathStyles st, int, int)
46 mathed_char_dim(LM_TC_TEXTRM, size_, 'I', ascent_, descent_, width_);
48 mathed_string_dim(LM_TC_TEXTRM, size_, name_, ascent_, descent_, width_);
52 void MathFuncInset::draw(Painter & pain, int x, int y)
57 drawChar(pain, LM_TC_TEXTRM, size_, x, y, ' ');
59 drawStr(pain, LM_TC_TEXTRM, size_, x, y, name_);