2002-02-05 13:27:34 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "math_xymatrixinset.h"
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
#include "math_streamstr.h"
|
|
|
|
|
|
|
|
|
|
|
|
MathXYMatrixInset::MathXYMatrixInset()
|
|
|
|
: MathGridInset(1, 1)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathXYMatrixInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathXYMatrixInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-02-11 08:19:02 +00:00
|
|
|
int MathXYMatrixInset::colsep() const
|
|
|
|
{
|
|
|
|
return 40;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int MathXYMatrixInset::rowsep() const
|
|
|
|
{
|
|
|
|
return 40;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathXYMatrixInset::metrics(MathMetricsInfo & st) const
|
2002-02-05 13:27:34 +00:00
|
|
|
{
|
|
|
|
MathMetricsInfo mi = st;
|
2002-05-30 07:09:54 +00:00
|
|
|
if (mi.base.style == LM_ST_DISPLAY)
|
|
|
|
mi.base.style = LM_ST_TEXT;
|
2002-02-05 13:27:34 +00:00
|
|
|
MathGridInset::metrics(mi);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathXYMatrixInset::write(WriteStream & os) const
|
|
|
|
{
|
|
|
|
os << "\\xymatrix{";
|
|
|
|
MathGridInset::write(os);
|
|
|
|
os << "}\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathXYMatrixInset::normalize(NormalStream & os) const
|
|
|
|
{
|
|
|
|
os << "[xymatrix ";
|
|
|
|
MathGridInset::normalize(os);
|
|
|
|
os << "]";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathXYMatrixInset::maplize(MapleStream & os) const
|
|
|
|
{
|
|
|
|
os << "xymatrix(";
|
|
|
|
MathGridInset::maplize(os);
|
|
|
|
os << ")";
|
|
|
|
}
|