]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathMBox.h
move everything into namespace lyx
[lyx.git] / src / mathed / InsetMathMBox.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathMBox.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_MBOXINSET_H
13 #define MATH_MBOXINSET_H
14
15 #include "InsetMathDim.h"
16 #include "lyxtext.h"
17
18
19 namespace lyx {
20
21
22 // almost a substitute for the real text inset...
23
24 class InsetMathMBox : public InsetMathDim {
25 public:
26         ///
27         explicit InsetMathMBox(BufferView & bv);
28         /// this stores metrics information in cache_
29         void metrics(MetricsInfo & mi, Dimension & dim) const;
30         /// draw according to cached metrics
31         void draw(PainterInfo &, int x, int y) const;
32         ///
33         void drawSelection(PainterInfo & pi, int x, int y) const;
34         ///
35         bool inMathed() const { return false; }
36         ///
37         bool isActive() const { return true; }
38
39         ///
40         void write(WriteStream & os) const;
41         ///
42         int latex(Buffer const &, odocstream & os,
43                         OutputParams const & runparams) const;
44         ///
45         LyXText * getText(int) const;
46         ///
47         void cursorPos(BufferView const & bv, CursorSlice const & sl,
48                 bool boundary, int & x, int & y) const;
49 protected:
50         virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
51
52         ///
53         mutable LyXText text_;
54         ///
55         BufferView * const bv_;
56 private:
57         virtual std::auto_ptr<InsetBase> doClone() const;
58 };
59
60
61
62 } // namespace lyx
63 #endif