2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
2007-04-25 03:01:35 +00:00
|
|
|
|
* \file InsetMathLefteqn.cpp
|
2003-08-19 13:00:56 +00:00
|
|
|
|
* 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>
|
|
|
|
|
|
2006-09-17 09:14:18 +00:00
|
|
|
|
#include "InsetMathLefteqn.h"
|
2007-04-26 16:05:57 +00:00
|
|
|
|
#include "MathData.h"
|
2003-09-05 17:23:11 +00:00
|
|
|
|
#include "support/std_ostream.h"
|
2001-10-18 13:21:21 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
InsetMathLefteqn::InsetMathLefteqn()
|
|
|
|
|
: InsetMathNest(1)
|
2001-10-18 13:21:21 +00:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2007-08-30 18:03:17 +00:00
|
|
|
|
Inset * InsetMathLefteqn::clone() const
|
2001-10-18 13:21:21 +00:00
|
|
|
|
{
|
2007-08-30 18:03:17 +00:00
|
|
|
|
return new InsetMathLefteqn(*this);
|
2001-10-18 13:21:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-21 20:39:47 +00:00
|
|
|
|
void InsetMathLefteqn::metrics(MetricsInfo & mi, Dimension & dim) const
|
2001-11-08 12:06:56 +00:00
|
|
|
|
{
|
2004-01-30 11:41:12 +00:00
|
|
|
|
cell(0).metrics(mi, dim);
|
|
|
|
|
dim.asc += 2;
|
|
|
|
|
dim.des += 2;
|
|
|
|
|
dim.wid = 4;
|
|
|
|
|
metricsMarkers(dim);
|
2007-09-23 22:39:49 +00:00
|
|
|
|
// Cache the inset dimension.
|
|
|
|
|
setDimCache(mi, dim);
|
2001-11-08 12:06:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathLefteqn::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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-22 10:15:23 +00:00
|
|
|
|
docstring InsetMathLefteqn::name() const
|
2001-10-18 13:21:21 +00:00
|
|
|
|
{
|
2006-10-22 10:15:23 +00:00
|
|
|
|
return from_ascii("lefteqn");
|
2001-10-18 13:21:21 +00:00
|
|
|
|
}
|
2002-09-10 15:53:33 +00:00
|
|
|
|
|
|
|
|
|
|
2006-10-22 10:15:23 +00:00
|
|
|
|
void InsetMathLefteqn::infoize(odocstream & os) const
|
2002-09-10 15:53:33 +00:00
|
|
|
|
{
|
|
|
|
|
os << "Lefteqn ";
|
|
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|