]> git.lyx.org Git - lyx.git/blob - src/mathed/math_boxinset.h
First shot at inset-unification mathed & rest of the world
[lyx.git] / src / mathed / math_boxinset.h
1 // -*- C++ -*-
2 #ifndef MATH_BOXINSET_H
3 #define MATH_BOXINSET_H
4
5 #include "math_gridinset.h"
6 #include "LString.h"
7
8 #ifdef __GNUG__
9 #pragma interface
10 #endif
11
12 class LyXFont;
13
14 /// Support for \\mbox
15
16 class MathBoxInset : public MathGridInset {
17 public:
18         ///
19         explicit MathBoxInset(string const & name);
20         ///
21         MathInset * clone() const;
22         ///
23         void metrics(MathMetricsInfo & mi) const;
24         ///
25         void draw(MathPainterInfo & pi, int x, int y) const;
26         /// identifies BoxInsets
27         MathBoxInset * asBoxInset() { return this; }
28         /// identifies BoxInsets
29         MathBoxInset const * asBoxInset() const { return this; }
30         ///
31         void rebreak();
32         ///
33         void write(WriteStream & os) const;
34         ///
35         void normalize(NormalStream & ns) const;
36
37 private:
38         ///
39         mutable MathMetricsInfo mi_;
40         ///
41         string name_;
42 };
43
44
45 #endif