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)
23 MathInset * MathFuncInset::clone() const
25 return new MathFuncInset(*this);
29 void MathFuncInset::write(std::ostream & os, bool /* fragile */) const
31 os << "\\" << name_ << ' ';
35 void MathFuncInset::writeNormal(std::ostream & os) const
37 os << "[" << name_ << "] ";
41 void MathFuncInset::metrics(MathStyles st) const
45 mathed_char_dim(LM_TC_TEXTRM, size_, 'I', ascent_, descent_, width_);
47 mathed_string_dim(LM_TC_TEXTRM, size_, name_, ascent_, descent_, width_);
51 void MathFuncInset::draw(Painter & pain, int x, int y) const
56 drawChar(pain, LM_TC_TEXTRM, size_, x, y, ' ');
58 drawStr(pain, LM_TC_TEXTRM, size_, x, y, name_);