2 #ifndef MATH_UPDOWNINSET_H
3 #define MATH_UPDOWNINSET_H
5 #include "math_inset.h"
11 /** Abstract base class for super- and subscripts and mathop inset
15 class MathUpDownInset : public MathInset {
20 MathUpDownInset(bool up, bool down);
22 MathInset * clone() const;
24 void Write(std::ostream &, bool fragile) const;
26 void Metrics(MathStyles st, int asc = 0, int des = 0);
28 void draw(Painter &, int x, int baseline);
30 bool idxUp(int & idx, int & pos) const;
32 bool idxDown(int & idx, int & pos) const;
34 bool idxLeft(int & idx, int & pos) const;
36 bool idxRight(int & idx, int & pos) const;
38 bool idxFirst(int & idx, int & pos) const;
40 bool idxFirstUp(int & idx, int & pos) const;
42 bool idxFirstDown(int & idx, int & pos) const;
44 bool idxLast(int & idx, int & pos) const;
46 bool idxLastUp(int & idx, int & pos) const;
48 bool idxLastDown(int & idx, int & pos) const;
58 bool isActive() const { return false; }
59 /// Identifies ScriptInsets
60 bool isUpDownInset() const { return true; }
62 void idxDelete(int & idx, bool & popit, bool & deleteit);