1 #ifndef MATH_PARBOXINSET_H
2 #define MATH_PARBOXINSET_H
4 #include "math_nestinset.h"
6 class MathParboxInset : public MathNestInset {
11 MathParboxInset * asParboxInset() { return this; }
13 MathInset * clone() const;
15 mode_type currentMode() const { return TEXT_MODE; }
16 /// get cursor position
17 void getPos(idx_type idx, pos_type pos, int & x, int & y) const;
19 void metrics(MathMetricsInfo & mi) const;
21 void draw(MathPainterInfo &, int x, int y) const;
22 /// draw selection background
23 void drawSelection(MathPainterInfo & pi,
24 idx_type idx1, pos_type pos1, idx_type idx2, pos_type pos2) const;
26 void infoize(std::ostream & os) const;
28 void write(WriteStream & os) const;
30 void setWidth(string const & width);
32 void setPosition(string const & pos);
33 /// moves cursor up or down
34 bool idxUpDown(idx_type &, pos_type & pos, bool up, int targetx) const;
36 /// number of rows on screen
37 int screenrows() const;
38 /// row corresponding to given position
39 int pos2row(pos_type pos) const;
47 mutable std::vector<MathXArray::Row> rows_;