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