5 #include "math_dotsinset.h"
6 #include "math_mathmlstream.h"
10 MathDotsInset::MathDotsInset(string const & name)
15 MathInset * MathDotsInset::clone() const
17 return new MathDotsInset(*this);
21 void MathDotsInset::draw(Painter & pain, int x, int y) const
23 mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
24 char const c = name_[0];
25 if (c == 'v' || c == 'd')
29 mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
33 void MathDotsInset::metrics(MathMetricsInfo const & mi) const
35 mathed_char_dim(LM_TC_VAR, mi, 'M', ascent_, descent_, width_);
37 case 'l': dh_ = 0; break;
38 case 'c': dh_ = ascent_ / 2; break;
39 case 'v': width_ /= 2;
40 case 'd': dh_ = ascent_; break;
45 void MathDotsInset::write(MathWriteInfo & os) const
47 os << '\\' << name_.c_str() << ' ';
51 void MathDotsInset::writeNormal(NormalStream & os) const
53 os << "[" << name_.c_str() << "] ";