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;
41 Inset * clone() const { return new InsetMathBox(*this); }
47 /// Non-AMS-style frame
48 class InsetMathFBox : public InsetMathNest {
53 mode_type currentMode() const { return TEXT_MODE; }
55 void metrics(MetricsInfo & mi, Dimension & dim) const;
57 void draw(PainterInfo & pi, int x, int y) const;
59 void write(WriteStream & os) const;
60 /// write normalized content
61 void normalize(NormalStream & ns) const;
63 void infoize(odocstream & os) const;
66 Inset * clone() const { return new InsetMathFBox(*this); }
70 /// Extra nesting: \\makebox or \\framebox.
71 class InsetMathMakebox : public InsetMathNest {
74 InsetMathMakebox(bool framebox);
76 void metrics(MetricsInfo & mi, Dimension & dim) const;
78 void draw(PainterInfo & pi, int x, int y) const;
80 void write(WriteStream & os) const;
81 /// write normalized content
82 void normalize(NormalStream & ns) const;
84 mode_type currentMode() const { return TEXT_MODE; }
86 void infoize(odocstream & os) const;
88 Inset * clone() const { return new InsetMathMakebox(*this); }
96 class InsetMathBoxed : public InsetMathNest {
101 void validate(LaTeXFeatures & features) const;
103 void metrics(MetricsInfo & mi, Dimension & dim) const;
105 void draw(PainterInfo & pi, int x, int y) const;
107 void write(WriteStream & os) const;
108 /// write normalized content
109 void normalize(NormalStream & ns) const;
111 void infoize(odocstream & os) const;
113 Inset * clone() const { return new InsetMathBoxed(*this); }