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 Text
* getText(int) const;
53 void cursorPos(BufferView
const & bv
, CursorSlice
const & sl
,
54 bool boundary
, int & x
, int & y
) const;
56 InsetCode
lyxCode() const { return MATH_MBOX_CODE
; }
59 virtual void doDispatch(Cursor
& cur
, FuncRequest
& cmd
);
62 mutable InsetText text_
;
65 virtual Inset
* clone() const;
72 #endif //MATH_MBOXINSET_H