]> git.lyx.org Git - lyx.git/blob - src/mathed/math_boxinset.h
Reduce Michael's buglist.
[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 UpdatableInset;
14 class BufferView;
15 class Buffer;
16 class LyXFont;
17
18 /// Support for \\mbox
19
20 class MathBoxInset : public MathDimInset {
21 public:
22         ///
23         explicit MathBoxInset(string const &);
24         ///
25         MathBoxInset(MathBoxInset const &);
26         ///
27         ~MathBoxInset();
28         ///
29         MathInset * clone() const;
30         ///
31         void draw(Painter &, int x, int y) const;
32         ///
33         void write(WriteStream & os) const;
34         ///
35         void normalize(NormalStream &) const;
36         ///
37         void metrics(MathMetricsInfo const &) const;
38         /// identifies BoxInsets
39         MathBoxInset * asBoxInset() { return this; }
40         ///
41         bool isHyperActive() const { return 1; }
42         ///
43         void edit(BufferView * bv, int x, int y, unsigned int button);
44         /// identifies hyperactive insets
45         UpdatableInset * asHyperActiveInset() const;
46
47 private:
48         /// unimplemented
49         void operator=(MathBoxInset const &);
50
51         ///
52         mutable MathMetricsInfo mi_;
53         ///
54         string name_;
55         ///
56         InsetText * text_;
57         ///
58         mutable Buffer * buffer_;       
59 };
60 #endif