3 #include "math_bigopinset.h"
6 #include "mathed/support.h"
7 #include "support/LOstream.h"
11 MathBigopInset::MathBigopInset(string const & nam, int id, short st)
12 : MathedInset(nam, LM_OT_BIGOP, st), lims_(-1), sym_(id)
16 MathedInset * MathBigopInset::Clone()
18 return new MathBigopInset(name, sym_, GetStyle());
23 MathBigopInset::draw(Painter & pain, int x, int y)
28 if (sym_ < 256 || sym_ == LM_oint) {
29 s += (sym_ == LM_oint) ? LM_int : sym_;
35 if (sym_ == LM_oint) {
36 pain.arc(x, y - 5 * width / 4, width, width, 0, 360 * 64,
40 pain.text(x, y, s, mathed_get_font(t, size()));
44 void MathBigopInset::Write(ostream & os, bool /* fragile */)
46 bool const limp = GetLimits();
50 if (limp && !(sym_ != LM_int && sym_ != LM_oint
51 && (GetStyle() == LM_ST_DISPLAY)))
54 if (!limp && (sym_ != LM_int && sym_ != LM_oint
55 && (GetStyle() == LM_ST_DISPLAY)))
63 MathBigopInset::Metrics()
69 if (sym_ < 256 || sym_ == LM_oint) {
70 char const c = (sym_ == LM_oint) ? LM_int: sym_;
77 mathed_string_height(t, size(), s, ascent, descent);
78 width = mathed_string_width(t, size(), s);
79 if (sym_ == LM_oint) width += 2;
83 bool MathBigopInset::GetLimits() const
87 return sym_ != LM_int &&
89 GetStyle() == LM_ST_DISPLAY;
97 void MathBigopInset::SetLimits(bool ls)