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.style() == LM_ST_DISPLAY) ? f.changeStyle(LM_ST_TEXT)
54 InsetMathGrid::metrics(mi, dim);
58 void InsetMathDiagram::draw(PainterInfo & pi, int x, int y) const
60 setPosCache(pi, x, y);
61 FontInfo & f = pi.base.font;
62 Changer dummy = (f.style() == LM_ST_DISPLAY) ? f.changeStyle(LM_ST_TEXT)
64 InsetMathGrid::draw(pi, x, y);
68 void InsetMathDiagram::write(WriteStream & os) const
70 MathEnsurer ensurer(os);
72 bool open = os.startOuterRow();
74 InsetMathGrid::write(os);
81 void InsetMathDiagram::infoize(odocstream & os) const
84 InsetMathGrid::infoize(os);
88 void InsetMathDiagram::normalize(NormalStream & os) const
91 InsetMathGrid::normalize(os);
96 void InsetMathDiagram::maple(MapleStream & os) const
99 InsetMathGrid::maple(os);
104 void InsetMathDiagram::validate(LaTeXFeatures & features) const
106 features.require("feyn");
107 InsetMathGrid::validate(features);