mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
38fce2feac
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7059 a592a061-630c-0410-9148-cb99ea01b6c8
52 lines
869 B
C
52 lines
869 B
C
#include <config.h>
|
|
|
|
|
|
#include "math_envinset.h"
|
|
#include "math_mathmlstream.h"
|
|
#include "math_streamstr.h"
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
MathEnvInset::MathEnvInset(string const & name)
|
|
: MathNestInset(1), name_(name)
|
|
{}
|
|
|
|
|
|
MathInset * MathEnvInset::clone() const
|
|
{
|
|
return new MathEnvInset(*this);
|
|
}
|
|
|
|
|
|
Dimension MathEnvInset::metrics(MetricsInfo & mi) const
|
|
{
|
|
cell(0).metrics(mi, dim_);
|
|
metricsMarkers();
|
|
return dim_;
|
|
}
|
|
|
|
|
|
void MathEnvInset::draw(PainterInfo & pi, int x, int y) const
|
|
{
|
|
cell(0).draw(pi, x + 1, y);
|
|
drawMarkers(pi, x, y);
|
|
}
|
|
|
|
|
|
void MathEnvInset::write(WriteStream & os) const
|
|
{
|
|
os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
|
|
}
|
|
|
|
|
|
void MathEnvInset::normalize(NormalStream & os) const
|
|
{
|
|
os << "[env " << name_ << ' ' << cell(0) << ']';
|
|
}
|
|
|
|
|
|
void MathEnvInset::infoize(std::ostream & os) const
|
|
{
|
|
os << "Env: " << name_;
|
|
}
|