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); }
71 class InsetMathFrameBox : public InsetMathNest {
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 Inset * clone() const { return new InsetMathFrameBox(*this); }
90 /// Extra nesting: \\makebox.
91 // consolidate with InsetMathFrameBox?
92 class InsetMathMakebox : public InsetMathNest {
97 void metrics(MetricsInfo & mi, Dimension & dim) const;
99 void draw(PainterInfo & pi, int x, int y) const;
101 void write(WriteStream & os) const;
102 /// write normalized content
103 void normalize(NormalStream & ns) const;
105 mode_type currentMode() const { return TEXT_MODE; }
107 void infoize(odocstream & os) const;
109 Inset * clone() const { return new InsetMathMakebox(*this); }
110 /// width of '[' in current font
117 class InsetMathBoxed : public InsetMathNest {
122 void validate(LaTeXFeatures & features) const;
124 void metrics(MetricsInfo & mi, Dimension & dim) const;
126 void draw(PainterInfo & pi, int x, int y) const;
128 void write(WriteStream & os) const;
129 /// write normalized content
130 void normalize(NormalStream & ns) const;
132 void infoize(odocstream & os) const;
134 Inset * clone() const { return new InsetMathBoxed(*this); }