5 #include "math_dotsinset.h"
6 #include "mathed/support.h"
7 #include "support/LOstream.h"
12 MathDotsInset::MathDotsInset(string const & name)
17 MathInset * MathDotsInset::clone() const
19 return new MathDotsInset(*this);
23 void MathDotsInset::draw(Painter & pain, int x, int y) const
25 mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
26 char const c = name_[0];
27 if (c == 'v' || c == 'd')
31 mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
35 void MathDotsInset::metrics(MathMetricsInfo const & st) const
38 mathed_char_dim(LM_TC_VAR, size_, 'M', ascent_, descent_, width_);
40 case 'l': dh_ = 0; break;
41 case 'c': dh_ = ascent_ / 2; break;
42 case 'v': width_ /= 2;
43 case 'd': dh_ = ascent_; break;
48 void MathDotsInset::write(MathWriteInfo & os) const
50 os << '\\' << name_ << ' ';
54 void MathDotsInset::writeNormal(ostream & os) const
56 os << "[" << name_ << "] ";