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"
20 /// Support for \\mbox
21 class InsetMathBox : public InsetMathNest {
24 explicit InsetMathBox(Buffer * buf, docstring const & name);
26 mode_type currentMode() const { return TEXT_MODE; }
28 void metrics(MetricsInfo & mi, Dimension & dim) const;
30 void draw(PainterInfo & pi, int x, int y) const;
32 void write(WriteStream & os) const;
34 void normalize(NormalStream & ns) const;
36 void mathmlize(MathStream & ms) const;
38 void htmlize(HtmlStream & ms) const;
40 void infoize(odocstream & os) const;
42 void validate(LaTeXFeatures & features) const;
44 InsetCode lyxCode() const { return MATH_BOX_CODE; }
47 Inset * clone() const { return new InsetMathBox(*this); }
53 /// Non-AMS-style frame
54 class InsetMathFBox : public InsetMathNest {
57 InsetMathFBox(Buffer * buf);
59 mode_type currentMode() const { return TEXT_MODE; }
61 void metrics(MetricsInfo & mi, Dimension & dim) const;
63 void draw(PainterInfo & pi, int x, int y) const;
65 void write(WriteStream & os) const;
66 /// write normalized content
67 void normalize(NormalStream & ns) const;
69 void mathmlize(MathStream & ms) const;
71 void htmlize(HtmlStream & ms) const;
73 void infoize(odocstream & os) const;
75 void validate(LaTeXFeatures & features) const;
78 Inset * clone() const { return new InsetMathFBox(*this); }
82 /// Extra nesting: \\makebox or \\framebox.
83 class InsetMathMakebox : public InsetMathNest {
86 InsetMathMakebox(Buffer * buf, bool framebox);
88 void metrics(MetricsInfo & mi, Dimension & dim) const;
90 void draw(PainterInfo & pi, int x, int y) const;
92 void write(WriteStream & os) const;
93 /// write normalized content
94 void normalize(NormalStream & ns) const;
96 void mathmlize(MathStream & ms) const;
98 void htmlize(HtmlStream & ms) const;
100 mode_type currentMode() const { return TEXT_MODE; }
102 void infoize(odocstream & os) const;
104 void validate(LaTeXFeatures & features) const;
106 Inset * clone() const { return new InsetMathMakebox(*this); }
114 class InsetMathBoxed : public InsetMathNest {
117 InsetMathBoxed(Buffer * buf);
119 void validate(LaTeXFeatures & features) const;
121 void metrics(MetricsInfo & mi, Dimension & dim) const;
123 void draw(PainterInfo & pi, int x, int y) const;
125 void write(WriteStream & os) const;
127 void mathmlize(MathStream & ms) const;
129 void htmlize(HtmlStream & ms) const;
130 /// write normalized content
131 void normalize(NormalStream & ns) const;
133 void infoize(odocstream & os) const;
135 Inset * clone() const { return new InsetMathBoxed(*this); }