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 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 infoize(odocstream & os) const;
74 Inset * clone() const { return new InsetMathFBox(*this); }
78 /// Extra nesting: \\makebox or \\framebox.
79 class InsetMathMakebox : public InsetMathNest {
82 InsetMathMakebox(Buffer * buf, bool framebox);
84 void metrics(MetricsInfo & mi, Dimension & dim) const;
86 void draw(PainterInfo & pi, int x, int y) const;
88 void write(WriteStream & os) const;
89 /// write normalized content
90 void normalize(NormalStream & ns) const;
92 //void mathmlize(MathStream & ms) const;
94 mode_type currentMode() const { return TEXT_MODE; }
96 void infoize(odocstream & os) const;
98 Inset * clone() const { return new InsetMathMakebox(*this); }
106 class InsetMathBoxed : public InsetMathNest {
109 InsetMathBoxed(Buffer * buf);
111 void validate(LaTeXFeatures & features) const;
113 void metrics(MetricsInfo & mi, Dimension & dim) const;
115 void draw(PainterInfo & pi, int x, int y) const;
117 void write(WriteStream & os) const;
119 //void mathmlize(MathStream & ms) const;
120 /// write normalized content
121 void normalize(NormalStream & ns) const;
123 void infoize(odocstream & os) const;
125 Inset * clone() const { return new InsetMathBoxed(*this); }