2001-10-18 13:21:21 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "math_lefteqninset.h"
|
2001-11-08 12:06:56 +00:00
|
|
|
#include "math_mathmlstream.h"
|
2002-01-03 12:02:54 +00:00
|
|
|
#include "math_support.h"
|
2001-10-18 13:21:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
MathLefteqnInset::MathLefteqnInset()
|
|
|
|
: MathNestInset(1)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathLefteqnInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathLefteqnInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathLefteqnInset::metrics(MathMetricsInfo & mi) const
|
2001-11-08 12:06:56 +00:00
|
|
|
{
|
2002-08-02 14:29:42 +00:00
|
|
|
cell(0).metrics(mi);
|
|
|
|
dim_.a = cell(0).ascent() + 2;
|
|
|
|
dim_.d = cell(0).descent() + 2;
|
2002-07-11 11:27:24 +00:00
|
|
|
dim_.w = 4;
|
2001-11-08 12:06:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathLefteqnInset::draw(MathPainterInfo & pain, int x, int y) const
|
2001-10-18 13:21:21 +00:00
|
|
|
{
|
2002-08-02 14:29:42 +00:00
|
|
|
cell(0).draw(pain, x + 2, y);
|
2002-01-03 12:02:54 +00:00
|
|
|
//mathed_draw_framebox(pain, x, y, this);
|
2001-10-18 13:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-09 08:35:57 +00:00
|
|
|
void MathLefteqnInset::write(WriteStream & os) const
|
2001-10-18 13:21:21 +00:00
|
|
|
{
|
2001-11-09 08:35:57 +00:00
|
|
|
os << "\\lefteqn{" << cell(0) << '}';
|
2001-10-18 13:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-09 08:35:57 +00:00
|
|
|
void MathLefteqnInset::normalize(NormalStream & os) const
|
2001-10-18 13:21:21 +00:00
|
|
|
{
|
2001-11-09 08:35:57 +00:00
|
|
|
os << "[lefteqn " << cell(0) << ']';
|
2001-10-18 13:21:21 +00:00
|
|
|
}
|