3 #include "math_bigopinset.h"
6 #include "mathed/support.h"
8 bool MathBigopInset::GetLimits() const
12 return sym != LM_int && sym != LM_oint && GetStyle() == LM_ST_DISPLAY;
20 void MathBigopInset::SetLimits(bool ls)
26 MathBigopInset::MathBigopInset(string const & nam, int id, short st)
27 : MathedInset(nam, LM_OT_BIGOP, st), sym(id)
33 MathedInset * MathBigopInset::Clone()
35 return new MathBigopInset(name, sym, GetStyle());
40 MathBigopInset::draw(Painter & pain, int x, int y)
45 if (sym < 256 || sym == LM_oint) {
46 s += (sym == LM_oint) ? LM_int : sym;
53 pain.arc(x, y - 5 * width / 4, width, width, 0, 360*64,
57 pain.text(x, y, s, mathed_get_font(t, size));
62 MathBigopInset::Metrics()
68 if (sym < 256 || sym == LM_oint) {
69 char c = (sym == LM_oint) ? LM_int: sym;
76 mathed_string_height(t, size, s, ascent, descent);
77 width = mathed_string_width(t, size, s);
78 if (sym == LM_oint) width += 2;
82 void MathBigopInset::Write(ostream & os, bool /* fragile */)
84 bool limp = GetLimits();
88 if (limp && !(sym != LM_int && sym != LM_oint
89 && (GetStyle() == LM_ST_DISPLAY)))
92 if (!limp && (sym != LM_int && sym != LM_oint
93 && (GetStyle() == LM_ST_DISPLAY)))