]> git.lyx.org Git - lyx.git/blob - src/mathed/math_parboxinset.h
enable insertion of spaces in all \textxxx modes.
[lyx.git] / src / mathed / math_parboxinset.h
1 #ifndef MATH_PARBOXINSET_H
2 #define MATH_PARBOXINSET_H
3
4 #include "math_nestinset.h"
5
6 class MathParboxInset : public MathNestInset {
7 public:
8         ///
9         MathParboxInset();
10         ///
11         MathParboxInset * asParboxInset() { return this; }
12         ///
13         MathInset * clone() const;
14         ///
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;
18         ///
19         void metrics(MathMetricsInfo & mi) const;
20         ///
21         void draw(MathPainterInfo &, int x, int y) const;
22         ///
23         void infoize(std::ostream & os) const;
24         ///
25         void write(WriteStream & os) const;
26         ///
27         void setWidth(string const & width);
28         ///
29         void setPosition(string const & pos);
30 private:
31         /// row corresponding to given position 
32         int pos2row(pos_type pos) const;
33         /// width on screen
34         int lyx_width_;
35         /// width for TeX
36         string tex_width_;
37         /// htb
38         char position_;
39         /// cached metrics
40         mutable std::vector<MathXArray::Row> rows_;
41 };
42
43 #endif