-#include <config.h>
+/**
+ * \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.
+ */
-#ifdef __GNUG__
-#pragma implementation
-#endif
+#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)
{}
-MathInset * MathXYMatrixInset::clone() const
+std::auto_ptr<InsetBase> MathXYMatrixInset::doClone() const
+{
+ return std::auto_ptr<InsetBase>(new MathXYMatrixInset(*this));
+}
+
+
+int MathXYMatrixInset::colsep() const
{
- return new MathXYMatrixInset(*this);
+ return 40;
}
-void MathXYMatrixInset::metrics(MathMetricsInfo const & st) const
+int MathXYMatrixInset::rowsep() const
{
- MathMetricsInfo mi = st;
- if (mi.style == LM_ST_DISPLAY)
- mi.style = LM_ST_TEXT;
- MathGridInset::metrics(mi);
+ 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::infoize(std::ostream & os) const
+{
+ os << "xymatrix ";
+ MathGridInset::infoize(os);
+}
+
+
void MathXYMatrixInset::normalize(NormalStream & os) const
{
os << "[xymatrix ";
MathGridInset::normalize(os);
- os << "]";
+ os << ']';
}
-void MathXYMatrixInset::maplize(MapleStream & os) const
+void MathXYMatrixInset::maple(MapleStream & os) const
{
os << "xymatrix(";
- MathGridInset::maplize(os);
- os << ")";
+ MathGridInset::maple(os);
+ os << ')';
}