1 #include "math_symbolinset.h"
2 #include "mathed/math_parser.h"
3 #include "support/LOstream.h"
8 MathSymbolInset::MathSymbolInset(const latexkeys * l)
13 MathInset * MathSymbolInset::clone() const
15 return new MathSymbolInset(*this);
19 void MathSymbolInset::write(ostream & os, bool /* fragile */) const
21 os << '\\' << sym_->name << ' ';
25 void MathSymbolInset::writeNormal(ostream & os) const
27 os << "[bigop " << sym_->name << "] ";
31 void MathSymbolInset::metrics(MathStyles st) const
35 if (sym_->id > 0 && sym_->id < 256) {
38 code_ = (sym_->token == LM_TK_BIGSYM) ? LM_TC_BSYM : LM_TC_SYMB;
44 mathed_string_dim(code_, size(), ssym_, ascent_, descent_, width_);
48 void MathSymbolInset::draw(Painter & pain, int x, int y) const
53 drawStr(pain, code_, size_, x, y, ssym_);