2002-02-14 14:52:23 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "math_substackinset.h"
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
#include "math_streamstr.h"
|
2003-05-14 16:29:25 +00:00
|
|
|
#include "support/LOstream.h"
|
2002-02-14 14:52:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
MathSubstackInset::MathSubstackInset()
|
|
|
|
: MathGridInset(1, 1)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
2003-06-16 11:49:38 +00:00
|
|
|
InsetBase * MathSubstackInset::clone() const
|
2002-02-14 14:52:23 +00:00
|
|
|
{
|
|
|
|
return new MathSubstackInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-06-02 10:03:27 +00:00
|
|
|
void MathSubstackInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
2002-02-14 14:52:23 +00:00
|
|
|
{
|
2002-05-30 07:09:54 +00:00
|
|
|
if (mi.base.style == LM_ST_DISPLAY) {
|
2003-03-21 14:20:48 +00:00
|
|
|
StyleChanger dummy(mi.base, LM_ST_TEXT);
|
2002-05-30 07:09:54 +00:00
|
|
|
MathGridInset::metrics(mi);
|
|
|
|
} else {
|
|
|
|
MathGridInset::metrics(mi);
|
|
|
|
}
|
2003-05-28 13:22:36 +00:00
|
|
|
metricsMarkers();
|
2003-06-02 10:03:27 +00:00
|
|
|
dim = dim_;
|
2003-05-14 16:29:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathSubstackInset::draw(PainterInfo & pi, int x, int y) const
|
|
|
|
{
|
|
|
|
MathGridInset::draw(pi, x + 1, y);
|
2003-05-28 13:22:36 +00:00
|
|
|
drawMarkers(pi, x, y);
|
2003-05-14 16:29:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathSubstackInset::infoize(std::ostream & os) const
|
|
|
|
{
|
|
|
|
os << "Substack ";
|
2002-02-14 14:52:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathSubstackInset::write(WriteStream & os) const
|
|
|
|
{
|
|
|
|
os << "\\substack{";
|
|
|
|
MathGridInset::write(os);
|
|
|
|
os << "}\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathSubstackInset::normalize(NormalStream & os) const
|
|
|
|
{
|
|
|
|
os << "[substack ";
|
|
|
|
MathGridInset::normalize(os);
|
2002-11-27 10:30:28 +00:00
|
|
|
os << ']';
|
2002-02-14 14:52:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-02-14 14:30:09 +00:00
|
|
|
void MathSubstackInset::maple(MapleStream & os) const
|
2002-02-14 14:52:23 +00:00
|
|
|
{
|
|
|
|
os << "substack(";
|
2003-02-14 14:30:09 +00:00
|
|
|
MathGridInset::maple(os);
|
2002-11-27 10:30:28 +00:00
|
|
|
os << ')';
|
2002-02-14 14:52:23 +00:00
|
|
|
}
|