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;
43 Inset * clone() const { return new InsetMathBox(*this); }
49 /// Non-AMS-style frame
50 class InsetMathFBox : public InsetMathNest {
55 mode_type currentMode() const { return TEXT_MODE; }
57 void metrics(MetricsInfo & mi, Dimension & dim) const;
59 void draw(PainterInfo & pi, int x, int y) const;
61 void write(WriteStream & os) const;
62 /// write normalized content
63 void normalize(NormalStream & ns) const;
65 void infoize(odocstream & os) const;
68 Inset * clone() const { return new InsetMathFBox(*this); }
72 /// Extra nesting: \\makebox or \\framebox.
73 class InsetMathMakebox : public InsetMathNest {
76 InsetMathMakebox(bool framebox);
78 void metrics(MetricsInfo & mi, Dimension & dim) const;
80 void draw(PainterInfo & pi, int x, int y) const;
82 void write(WriteStream & os) const;
83 /// write normalized content
84 void normalize(NormalStream & ns) const;
86 mode_type currentMode() const { return TEXT_MODE; }
88 void infoize(odocstream & os) const;
90 Inset * clone() const { return new InsetMathMakebox(*this); }
98 class InsetMathBoxed : public InsetMathNest {
103 void validate(LaTeXFeatures & features) const;
105 void metrics(MetricsInfo & mi, Dimension & dim) const;
107 void draw(PainterInfo & pi, int x, int y) const;
109 void write(WriteStream & os) const;
110 /// write normalized content
111 void normalize(NormalStream & ns) const;
113 void infoize(odocstream & os) const;
115 Inset * clone() const { return new InsetMathBoxed(*this); }