1 #ifndef MATH_TEXTINSET_H
2 #define MATH_TEXTINSET_H
4 #include "math_gridinset.h"
6 // not yet a substitute for the real text inset...
8 class MathTextInset : public MathNestInset {
13 MathInset * clone() const;
14 /// get cursor position
15 void getPos(idx_type idx, pos_type pos, int & x, int & y) const;
16 /// this stores metrics information in cache_
17 void metrics(MathMetricsInfo & mi) const;
18 /// draw according to cached metrics
19 void draw(MathPainterInfo &, int x, int y) const;
20 /// draw selection background
21 void drawSelection(MathPainterInfo & pi,
22 idx_type idx1, pos_type pos1, idx_type idx2, pos_type pos2) const;
23 /// moves cursor up or down
24 bool idxUpDown(idx_type &, pos_type & pos, bool up, int targetx) const;
26 /// row corresponding to given position
27 idx_type pos2row(pos_type pos) const;
29 mutable MathGridInset cache_;