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.
12 #ifndef MATH_MBOXINSET_H
13 #define MATH_MBOXINSET_H
15 #include "InsetMathDim.h"
19 // almost a substitute for the real text inset...
21 class InsetMathMBox : public InsetMathDim {
24 explicit InsetMathMBox(BufferView & bv);
25 /// this stores metrics information in cache_
26 void metrics(MetricsInfo & mi, Dimension & dim) const;
27 /// draw according to cached metrics
28 void draw(PainterInfo &, int x, int y) const;
30 void drawSelection(PainterInfo & pi, int x, int y) const;
32 bool inMathed() const { return false; }
34 bool isActive() const { return true; }
37 void write(WriteStream & os) const;
39 int latex(Buffer const &, lyx::odocstream & os,
40 OutputParams const & runparams) const;
42 LyXText * getText(int) const;
44 void cursorPos(BufferView const & bv, CursorSlice const & sl,
45 bool boundary, int & x, int & y) const;
47 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
50 mutable LyXText text_;
52 BufferView * const bv_;
54 virtual std::auto_ptr<InsetBase> doClone() const;