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 "InsetMathDim.h"
28 // almost a substitute for the real text inset...
30 class InsetMathMBox : public InsetMathDim {
33 explicit InsetMathMBox();
34 explicit InsetMathMBox(LyXLayout_ptr const & layout);
36 /// this stores metrics information in cache_
37 bool metrics(MetricsInfo & mi, Dimension & dim) const;
38 /// draw according to cached metrics
39 void draw(PainterInfo &, int x, int y) const;
41 void drawSelection(PainterInfo & pi, int x, int y) const;
43 bool inMathed() const { return false; }
45 bool isActive() const { return true; }
48 void write(Buffer const & buf, WriteStream & os) const;
50 int latex(Buffer const &, odocstream & os,
51 OutputParams const & runparams) const;
53 LyXText * getText(int) const;
55 void cursorPos(BufferView const & bv, CursorSlice const & sl,
56 bool boundary, int & x, int & y) const;
58 virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
61 mutable LyXText text_;
64 virtual std::auto_ptr<InsetBase> doClone() const;
71 #endif //MATH_MBOXINSET_H