3 * \file InsetMathMBox.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
16 #ifndef MATH_MBOXINSET_H
17 #define MATH_MBOXINSET_H
19 #include "InsetMath.h"
21 #include "insets/InsetText.h"
29 // almost a substitute for the real text inset...
31 class InsetMathMBox : public InsetMath {
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;
42 bool inMathed() const { return false; }
44 bool isActive() const { return true; }
47 void write(WriteStream & os) const;
49 int latex(odocstream & os, OutputParams const & runparams) const;
51 void mathmlize(MathStream &) const;
53 Text * getText(int) const;
55 void cursorPos(BufferView const & bv, CursorSlice const & sl,
56 bool boundary, int & x, int & y) const;
58 InsetCode lyxCode() const { return MATH_MBOX_CODE; }
61 virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
64 mutable InsetText text_;
67 virtual Inset * clone() const;
74 #endif //MATH_MBOXINSET_H