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_BOXINSET_H
13 #define MATH_BOXINSET_H
15 #include "InsetMathNest.h"
22 /// Support for \\mbox
23 class InsetMathBox
: public InsetMathNest
{
26 explicit InsetMathBox(docstring
const & name
);
28 mode_type
currentMode() const { return TEXT_MODE
; }
30 void metrics(MetricsInfo
& mi
, Dimension
& dim
) const;
32 void draw(PainterInfo
& pi
, int x
, int y
) const;
34 void write(WriteStream
& os
) const;
36 void normalize(NormalStream
& ns
) const;
38 void infoize(odocstream
& os
) const;
40 void validate(LaTeXFeatures
& features
) const;
42 InsetCode
lyxCode() const { return MATH_BOX_CODE
; }
45 Inset
* clone() const { return new InsetMathBox(*this); }
51 /// Non-AMS-style frame
52 class InsetMathFBox
: public InsetMathNest
{
57 mode_type
currentMode() const { return TEXT_MODE
; }
59 void metrics(MetricsInfo
& mi
, Dimension
& dim
) const;
61 void draw(PainterInfo
& pi
, int x
, int y
) const;
63 void write(WriteStream
& os
) const;
64 /// write normalized content
65 void normalize(NormalStream
& ns
) const;
67 void infoize(odocstream
& os
) const;
70 Inset
* clone() const { return new InsetMathFBox(*this); }
74 /// Extra nesting: \\makebox or \\framebox.
75 class InsetMathMakebox
: public InsetMathNest
{
78 InsetMathMakebox(bool framebox
);
80 void metrics(MetricsInfo
& mi
, Dimension
& dim
) const;
82 void draw(PainterInfo
& pi
, int x
, int y
) const;
84 void write(WriteStream
& os
) const;
85 /// write normalized content
86 void normalize(NormalStream
& ns
) const;
88 mode_type
currentMode() const { return TEXT_MODE
; }
90 void infoize(odocstream
& os
) const;
92 Inset
* clone() const { return new InsetMathMakebox(*this); }
100 class InsetMathBoxed
: public InsetMathNest
{
105 void validate(LaTeXFeatures
& features
) const;
107 void metrics(MetricsInfo
& mi
, Dimension
& dim
) const;
109 void draw(PainterInfo
& pi
, int x
, int y
) const;
111 void write(WriteStream
& os
) const;
112 /// write normalized content
113 void normalize(NormalStream
& ns
) const;
115 void infoize(odocstream
& os
) const;
117 Inset
* clone() const { return new InsetMathBoxed(*this); }