mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 14:32:04 +00:00
81 lines
1.3 KiB
C++
81 lines
1.3 KiB
C++
|
/**
|
|||
|
* \file math_xymatrixinset.C
|
|||
|
* This file is part of LyX, the document processor.
|
|||
|
* Licence details can be found in the file COPYING.
|
|||
|
*
|
|||
|
* \author Andr<EFBFBD> P<EFBFBD>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 << ')';
|
|||
|
}
|