1 #include "math_symbolinset.h"
2 #include "math_parser.h"
4 #include "support/LOstream.h"
9 MathSymbolInset::MathSymbolInset(const latexkeys * l)
14 MathInset * MathSymbolInset::clone() const
16 return new MathSymbolInset(*this);
20 void MathSymbolInset::write(ostream & os, bool /* fragile */) const
22 os << '\\' << sym_->name << ' ';
26 void MathSymbolInset::writeNormal(ostream & os) const
28 os << "[bigop " << sym_->name << "] ";
32 void MathSymbolInset::metrics(MathStyles st) const
36 if (sym_->id > 0 && sym_->id < 256) {
39 code_ = (sym_->token == LM_TK_BIGSYM) ? LM_TC_BSYM : LM_TC_SYMB;
45 mathed_string_dim(code_, size(), ssym_, ascent_, descent_, width_);
49 void MathSymbolInset::draw(Painter & pain, int x, int y) const
54 drawStr(pain, code_, size_, x, y, ssym_);
58 bool MathSymbolInset::isRelOp() const
60 return sym_->id == LM_leq || sym_->id == LM_geq;