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