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 FontInfo & f = mi.base.font;
52 Changer dummy = f.changeStyle(LM_ST_TEXT, f.style() == LM_ST_DISPLAY);
53 InsetMathGrid::metrics(mi, dim);
57 void InsetMathDiagram::draw(PainterInfo & pi, int x, int y) const
59 setPosCache(pi, x, y);
60 FontInfo & f = pi.base.font;
61 Changer dummy = f.changeStyle(LM_ST_TEXT, f.style() == LM_ST_DISPLAY);
62 InsetMathGrid::draw(pi, x, y);
66 void InsetMathDiagram::write(WriteStream & os) const
68 MathEnsurer ensurer(os);
70 bool open = os.startOuterRow();
72 InsetMathGrid::write(os);
79 void InsetMathDiagram::infoize(odocstream & os) const
82 InsetMathGrid::infoize(os);
86 void InsetMathDiagram::normalize(NormalStream & os) const
89 InsetMathGrid::normalize(os);
94 void InsetMathDiagram::maple(MapleStream & os) const
97 InsetMathGrid::maple(os);
102 void InsetMathDiagram::validate(LaTeXFeatures & features) const
104 features.require("feyn");
105 InsetMathGrid::validate(features);