A bit more re-organization.
[lyx.git] / src / mathed / InsetMathMBox.h
blobe393f908ff585310cb2a4c9aa3cfe839093af3cb
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.
7 * \author André Pönitz
9 * Full author contact details are available in file CREDITS.
12 #define MATH_MBOX
14 #ifdef MATH_MBOX
16 #ifndef MATH_MBOXINSET_H
17 #define MATH_MBOXINSET_H
19 #include "InsetMath.h"
21 #include "insets/InsetText.h"
24 namespace lyx {
26 class Buffer;
27 class BufferView;
29 // almost a substitute for the real text inset...
31 class InsetMathMBox : public InsetMath {
32 public:
33 ///
34 explicit InsetMathMBox(Buffer * buffer);
35 explicit InsetMathMBox(Buffer * buffer, Layout const & layout);
37 /// this stores metrics information in cache_
38 void metrics(MetricsInfo & mi, Dimension & dim) const;
39 /// draw according to cached metrics
40 void draw(PainterInfo &, int x, int y) const;
41 ///
42 bool inMathed() const { return false; }
43 ///
44 bool isActive() const { return true; }
46 ///
47 void write(WriteStream & os) const;
48 ///
49 int latex(odocstream & os, OutputParams const & runparams) const;
50 ///
51 Text * getText(int) const;
52 ///
53 void cursorPos(BufferView const & bv, CursorSlice const & sl,
54 bool boundary, int & x, int & y) const;
55 ///
56 InsetCode lyxCode() const { return MATH_MBOX_CODE; }
58 protected:
59 virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
61 ///
62 mutable InsetText text_;
64 private:
65 virtual Inset * clone() const;
70 } // namespace lyx
72 #endif //MATH_MBOXINSET_H
74 #endif //MATH_MBOX