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(Buffer * buf, 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 mathmlize(MathStream & ms) const;
40 void htmlize(HtmlStream & ms) const;
42 void infoize(odocstream & os) const;
44 void validate(LaTeXFeatures & features) const;
46 InsetCode lyxCode() const { return MATH_BOX_CODE; }
49 Inset * clone() const { return new InsetMathBox(*this); }
55 /// Non-AMS-style frame
56 class InsetMathFBox : public InsetMathNest {
59 InsetMathFBox(Buffer * buf);
61 mode_type currentMode() const { return TEXT_MODE; }
63 void metrics(MetricsInfo & mi, Dimension & dim) const;
65 void draw(PainterInfo & pi, int x, int y) const;
67 void write(WriteStream & os) const;
68 /// write normalized content
69 void normalize(NormalStream & ns) const;
71 void mathmlize(MathStream & ms) const;
73 void htmlize(HtmlStream & ms) const;
75 void infoize(odocstream & os) const;
77 void validate(LaTeXFeatures & features) const;
80 Inset * clone() const { return new InsetMathFBox(*this); }
84 /// Extra nesting: \\makebox or \\framebox.
85 class InsetMathMakebox : public InsetMathNest {
88 InsetMathMakebox(Buffer * buf, bool framebox);
90 void metrics(MetricsInfo & mi, Dimension & dim) const;
92 void draw(PainterInfo & pi, int x, int y) const;
94 void write(WriteStream & os) const;
95 /// write normalized content
96 void normalize(NormalStream & ns) const;
98 void mathmlize(MathStream & ms) const;
100 void htmlize(HtmlStream & ms) const;
102 mode_type currentMode() const { return TEXT_MODE; }
104 void infoize(odocstream & os) const;
106 void validate(LaTeXFeatures & features) const;
108 Inset * clone() const { return new InsetMathMakebox(*this); }
116 class InsetMathBoxed : public InsetMathNest {
119 InsetMathBoxed(Buffer * buf);
121 void validate(LaTeXFeatures & features) const;
123 void metrics(MetricsInfo & mi, Dimension & dim) const;
125 void draw(PainterInfo & pi, int x, int y) const;
127 void write(WriteStream & os) const;
129 void mathmlize(MathStream & ms) const;
131 void htmlize(HtmlStream & ms) const;
132 /// write normalized content
133 void normalize(NormalStream & ns) const;
135 void infoize(odocstream & os) const;
137 Inset * clone() const { return new InsetMathBoxed(*this); }