2001-10-18 13:21:21 +00:00
|
|
|
#include "math_lefteqninset.h"
|
2002-01-03 12:02:54 +00:00
|
|
|
#include "math_support.h"
|
2002-09-10 15:53:33 +00:00
|
|
|
#include "support/LOstream.h"
|
2001-10-18 13:21:21 +00:00
|
|
|
|
2003-07-25 17:11:25 +00:00
|
|
|
using std::auto_ptr;
|
|
|
|
|
2001-10-18 13:21:21 +00:00
|
|
|
|
|
|
|
MathLefteqnInset::MathLefteqnInset()
|
|
|
|
: MathNestInset(1)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
2003-07-25 17:11:25 +00:00
|
|
|
auto_ptr<InsetBase> MathLefteqnInset::clone() const
|
2001-10-18 13:21:21 +00:00
|
|
|
{
|
2003-07-25 17:11:25 +00:00
|
|
|
return auto_ptr<InsetBase>(new MathLefteqnInset(*this));
|
2001-10-18 13:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-06-02 10:03:27 +00:00
|
|
|
void MathLefteqnInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
2001-11-08 12:06:56 +00:00
|
|
|
{
|
2002-08-02 14:29:42 +00:00
|
|
|
cell(0).metrics(mi);
|
2003-05-27 13:55:03 +00:00
|
|
|
dim_.asc = cell(0).ascent() + 2;
|
|
|
|
dim_.des = cell(0).descent() + 2;
|
|
|
|
dim_.wid = 4;
|
2003-05-28 13:22:36 +00:00
|
|
|
metricsMarkers();
|
2003-06-02 10:03:27 +00:00
|
|
|
dim = dim_;
|
2001-11-08 12:06:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
void MathLefteqnInset::draw(PainterInfo & pi, int x, int y) const
|
2001-10-18 13:21:21 +00:00
|
|
|
{
|
2002-09-10 15:53:33 +00:00
|
|
|
cell(0).draw(pi, x + 2, y);
|
2003-05-28 13:22:36 +00:00
|
|
|
drawMarkers(pi, x, y);
|
2001-10-18 13:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-08-05 07:09:11 +00:00
|
|
|
string MathLefteqnInset::name() const
|
2001-10-18 13:21:21 +00:00
|
|
|
{
|
2002-08-05 07:09:11 +00:00
|
|
|
return "lefteqn";
|
2001-10-18 13:21:21 +00:00
|
|
|
}
|
2002-09-10 15:53:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
void MathLefteqnInset::infoize(std::ostream & os) const
|
|
|
|
{
|
|
|
|
os << "Lefteqn ";
|
|
|
|
}
|