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