]> git.lyx.org Git - lyx.git/blob - src/mathed/math_boxinset.h
small step forward on the lenghty path to \mbox support
[lyx.git] / src / mathed / math_boxinset.h
1 // -*- C++ -*-
2 #ifndef MATH_BOXINSET_H
3 #define MATH_BOXINSET_H
4
5 #include "math_diminset.h"
6 #include "LString.h"
7
8 #ifdef __GNUG__
9 #pragma interface
10 #endif
11
12 class InsetText;
13 class BufferView;
14 class Buffer;
15 class LyXFont;
16
17 /// Support for \\mbox
18
19 class MathBoxInset : public MathDimInset {
20 public:
21         ///
22         explicit MathBoxInset(string const &);
23         ///
24         MathBoxInset(MathBoxInset const &);
25         ///
26         ~MathBoxInset();
27         ///
28         MathInset * clone() const;
29         ///
30         void draw(Painter &, int x, int y) const;
31         ///
32         void write(MathWriteInfo & os) const;
33         ///
34         void writeNormal(std::ostream &) const;
35         ///
36         void metrics(MathMetricsInfo const &) const;
37         /// identifies BoxInsets
38         MathBoxInset * asBoxInset() { return this; }
39         ///
40         bool isHyperActive() const { return 1; }
41
42 private:
43         /// unimplemented
44         void operator=(MathBoxInset const &);
45
46         ///
47         mutable MathMetricsInfo mi_;
48         ///
49         string name_;
50         ///
51         InsetText * text_;
52         ///
53         mutable Buffer * buffer_;       
54 };
55 #endif