+2006-02-17 Georg Baum <Georg.Baum@post.rwth-aachen.de>
+
+ * math_xymatrixinset.[Ch]: Readd
+ * Makefile.am: Readd math_xymatrixinset.[Ch]
+ * math_factory.C (createMathInset): Readd xymatrix
+ * math_parser.C (parse1): Readd xymatrix
+
2006-02-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* math_macro.C (editXY): Prevent crash (fix by Andrew Beck)
math_undersetinset.h \
math_xarrowinset.C \
math_xarrowinset.h \
+ math_xymatrixinset.C \
+ math_xymatrixinset.h \
command_inset.h \
command_inset.C \
ref_inset.h \
#include "math_undersetinset.h"
#include "math_unknowninset.h"
#include "math_xarrowinset.h"
+#include "math_xymatrixinset.h"
//#include "insets/insetref.h"
#include "ref_inset.h"
return MathAtom(new MathMakeboxInset);
if (s == "kern")
return MathAtom(new MathKernInset);
+ if (s == "xymatrix")
+ return MathAtom(new MathXYMatrixInset);
if (s == "xrightarrow" || s == "xleftarrow")
return MathAtom(new MathXArrowInset(s));
if (s == "split" || s == "gathered" || s == "aligned" || s == "alignedat")
parse2(cell->back(), FLAG_ITEM, mode, false);
}
+ else if (t.cs() == "xymatrix") {
+ cell->push_back(createMathInset(t.cs()));
+ parse2(cell->back(), FLAG_ITEM, mode, false);
+ }
+
else if (t.cs() == "framebox" || t.cs() == "makebox") {
cell->push_back(createMathInset(t.cs()));
parse(cell->back().nucleus()->cell(0), FLAG_OPTION, MathInset::TEXT_MODE);
--- /dev/null
+/**
+ * \file math_xymatrixinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
+#include "math_xymatrixinset.h"
+#include "math_mathmlstream.h"
+#include "math_streamstr.h"
+
+#include "LaTeXFeatures.h"
+#include "support/std_ostream.h"
+
+
+MathXYMatrixInset::MathXYMatrixInset()
+ : MathGridInset(1, 1)
+{}
+
+
+std::auto_ptr<InsetBase> MathXYMatrixInset::doClone() const
+{
+ return std::auto_ptr<InsetBase>(new MathXYMatrixInset(*this));
+}
+
+
+int MathXYMatrixInset::colsep() const
+{
+ return 40;
+}
+
+
+int MathXYMatrixInset::rowsep() const
+{
+ return 40;
+}
+
+
+void MathXYMatrixInset::metrics(MetricsInfo & mi, Dimension & dim) const
+{
+ if (mi.base.style == LM_ST_DISPLAY)
+ mi.base.style = LM_ST_TEXT;
+ MathGridInset::metrics(mi, dim);
+}
+
+
+void MathXYMatrixInset::write(WriteStream & os) const
+{
+ os << "\\xymatrix{";
+ MathGridInset::write(os);
+ os << "}\n";
+}
+
+
+void MathXYMatrixInset::infoize(std::ostream & os) const
+{
+ os << "xymatrix ";
+ MathGridInset::infoize(os);
+}
+
+
+void MathXYMatrixInset::normalize(NormalStream & os) const
+{
+ os << "[xymatrix ";
+ MathGridInset::normalize(os);
+ os << ']';
+}
+
+
+void MathXYMatrixInset::maple(MapleStream & os) const
+{
+ os << "xymatrix(";
+ MathGridInset::maple(os);
+ os << ')';
+}
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file math_xymatrixinset.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef MATH_XYMATRIX_H
+#define MATH_XYMATRIX_H
+
+#include "lyxlength.h"
+#include "math_gridinset.h"
+
+
+class MathXYMatrixInset : public MathGridInset {
+public:
+ ///
+ MathXYMatrixInset();
+ ///
+ void metrics(MetricsInfo &, Dimension &) const;
+ ///
+ MathXYMatrixInset const * asXYMatrixInset() const { return this; }
+ ///
+ virtual int colsep() const;
+ ///
+ virtual int rowsep() const;
+
+ ///
+ void normalize();
+ ///
+ void write(WriteStream & os) const;
+ ///
+ void infoize(std::ostream & os) const;
+ ///
+ void normalize(NormalStream &) const;
+ ///
+ void maple(MapleStream &) const;
+private:
+ ///
+ virtual std::auto_ptr<InsetBase> doClone() const;
+};
+
+#endif