3 * \file math_mboxinset.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 "math_diminset.h"
19 // almost a substitute for the real text inset...
21 class MathMBoxInset : public MathDimInset {
24 MathMBoxInset(BufferView & bv);
26 std::auto_ptr<InsetBase> clone() const;
27 /// this stores metrics information in cache_
28 void metrics(MetricsInfo & mi, Dimension & dim) const;
29 /// draw according to cached metrics
30 void draw(PainterInfo &, int x, int y) const;
32 void priv_dispatch(LCursor & cur, FuncRequest & cmd);
35 bool inMathed() const { return false; }
37 bool isActive() const { return true; }
40 void write(WriteStream & os) const;
42 int latex(Buffer const &, std::ostream & os,
43 OutputParams const & runparams) const;
45 LyXText * getText(int) const;
47 void getCursorPos(CursorSlice const & cur, int & x, int & y) const;
50 mutable LyXText text_;
52 BufferView * const bv_;