3 #include "math_bigopinset.h"
6 #include "mathed/support.h"
7 #include "support/LOstream.h"
11 MathBigopInset::MathBigopInset(string const & name, int id)
12 : MathInset(name, LM_OT_BIGOP), lims_(-1), sym_(id)
16 MathInset * MathBigopInset::Clone() const
18 return new MathBigopInset(*this);
23 void MathBigopInset::Write(ostream & os, bool fragile) const
25 bool const limp = GetLimits();
29 bool f = sym_ != LM_int && sym_ != LM_oint && size() == LM_ST_DISPLAY;
41 void MathBigopInset::WriteNormal(ostream & os) const
43 bool const limp = GetLimits();
44 bool f = sym_ != LM_int && sym_ != LM_oint;
46 os << "[bigop " << name();
57 void MathBigopInset::Metrics(MathStyles st)
63 if (sym_ < 256 || sym_ == LM_oint) {
64 char const c = (sym_ == LM_oint) ? LM_int : sym_;
71 mathed_string_dim(t, size(), s, ascent_, descent_, width_);
77 void MathBigopInset::draw(Painter & pain, int x, int y)
84 if (sym_ < 256 || sym_ == LM_oint) {
85 s += (sym_ == LM_oint) ? LM_int : sym_;
91 if (sym_ == LM_oint) {
92 pain.arc(x, y - 5 * width_ / 4, width_, width_, 0, 360 * 64,
96 pain.text(x, y, s, mathed_get_font(t, size()));
100 bool MathBigopInset::GetLimits() const
104 return sym_ != LM_int && sym_ != LM_oint && size() == LM_ST_DISPLAY;
111 void MathBigopInset::SetLimits(bool ls)