2 #ifndef MATH_SCRIPTINSET_H
3 #define MATH_SCRIPTINSET_H
5 #include "math_nestinset.h"
11 /** Inset for super- and subscripts
16 class MathScriptInset : public MathNestInset {
21 MathScriptInset(bool up, bool down, MathInset * = 0);
23 MathScriptInset(MathScriptInset const &);
27 MathInset * clone() const;
29 void write(std::ostream &, bool fragile) const;
31 void writeNormal(std::ostream &) const;
33 void metrics(MathStyles st) const;
35 void draw(Painter &, int x, int y) const;
38 bool idxUp(int & idx, int & pos) const;
40 bool idxDown(int & idx, int & pos) const;
42 bool idxLeft(int & idx, int & pos) const;
44 bool idxRight(int & idx, int & pos) const;
46 bool idxFirst(int & idx, int & pos) const;
48 bool idxFirstUp(int & idx, int & pos) const;
50 bool idxFirstDown(int & idx, int & pos) const;
52 bool idxLast(int & idx, int & pos) const;
54 bool idxLastUp(int & idx, int & pos) const;
56 bool idxLastDown(int & idx, int & pos) const;
58 void idxDelete(int & idx, bool & popit, bool & deleteit);
73 bool isActive() const { return false; }
74 /// Identifies ScriptInsets
75 bool isScriptInset() const { return true; }
77 int xoffset() const { return dxx_; }
80 bool hasLimits() const;
85 /// 1: \limits, -1: \nolimits, 0: use default
87 /// x offset cache for drawing the superscript
89 /// x offset cache for drawing the subscript
91 /// x offset cache for drawing the inner symbol
93 /// y offset cache for drawing the superscript
95 /// y offset cache for drawing the subscript