2 * \file InsetMathDiagram.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Ronen Abravanel
9 * Full author contact details are available in file CREDITS.
14 #include "InsetMathDiagram.h"
16 #include "MathStream.h"
18 #include "LaTeXFeatures.h"
19 #include "MetricsInfo.h"
26 InsetMathDiagram::InsetMathDiagram(Buffer * buf) : InsetMathGrid(buf, 1, 1)
31 Inset * InsetMathDiagram::clone() const
33 return new InsetMathDiagram(*this);
37 int InsetMathDiagram::colsep() const
43 int InsetMathDiagram::rowsep() const
49 void InsetMathDiagram::metrics(MetricsInfo & mi, Dimension & dim) const
51 Changer dummy2 = mi.base.changeEnsureMath();
52 FontInfo & f = mi.base.font;
53 Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
55 InsetMathGrid::metrics(mi, dim);
59 void InsetMathDiagram::draw(PainterInfo & pi, int x, int y) const
61 Changer dummy2 = pi.base.changeEnsureMath();
62 FontInfo & f = pi.base.font;
63 Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
65 InsetMathGrid::draw(pi, x, y);
69 void InsetMathDiagram::write(TeXMathStream & os) const
71 MathEnsurer ensurer(os);
73 bool open = os.startOuterRow();
75 InsetMathGrid::write(os);
82 void InsetMathDiagram::infoize(odocstream & os) const
85 InsetMathGrid::infoize(os);
89 void InsetMathDiagram::normalize(NormalStream & os) const
92 InsetMathGrid::normalize(os);
97 void InsetMathDiagram::maple(MapleStream & os) const
100 InsetMathGrid::maple(os);
105 void InsetMathDiagram::validate(LaTeXFeatures & features) const
107 features.require("feyn");
108 InsetMathGrid::validate(features);