2003-08-19 13:00:56 +00:00
|
|
|
/**
|
2007-04-25 03:01:35 +00:00
|
|
|
* \file InsetMathLim.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.
|
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author André Pönitz
|
2003-08-19 13:00:56 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2003-08-02 11:30:30 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2006-09-17 09:14:18 +00:00
|
|
|
#include "InsetMathLim.h"
|
2007-04-26 16:05:57 +00:00
|
|
|
#include "MathData.h"
|
2006-10-22 10:15:23 +00:00
|
|
|
#include "MathStream.h"
|
2008-02-18 07:14:42 +00:00
|
|
|
|
2007-11-29 07:04:28 +00:00
|
|
|
#include "support/debug.h"
|
2002-07-12 11:21:21 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
InsetMathLim::InsetMathLim
|
2007-04-26 16:05:57 +00:00
|
|
|
(MathData const & f, MathData const & x, MathData const & x0)
|
2006-09-16 18:11:38 +00:00
|
|
|
: InsetMathNest(3)
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
cell(0) = f;
|
|
|
|
cell(1) = x;
|
|
|
|
cell(2) = x0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-08-30 18:03:17 +00:00
|
|
|
Inset * InsetMathLim::clone() const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
2007-08-30 18:03:17 +00:00
|
|
|
return new InsetMathLim(*this);
|
2002-07-12 11:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
void InsetMathLim::normalize(NormalStream & os) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-21 20:39:47 +00:00
|
|
|
void InsetMathLim::metrics(MetricsInfo &, Dimension &) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
2007-11-28 22:12:03 +00:00
|
|
|
LYXERR0("should not happen");
|
2002-07-12 11:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
void InsetMathLim::draw(PainterInfo &, int, int) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
2007-11-28 22:12:03 +00:00
|
|
|
LYXERR0("should not happen");
|
2002-07-12 11:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
void InsetMathLim::maple(MapleStream & os) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
void InsetMathLim::maxima(MaximaStream & os) const
|
2006-09-02 01:57:36 +00:00
|
|
|
{
|
|
|
|
os << "limit(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
void InsetMathLim::mathematica(MathematicaStream & os) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
2006-09-02 01:57:36 +00:00
|
|
|
os << "Limit[" << cell(0) << ',' << cell(1) << "-> " << cell(2) << ']';
|
2002-07-12 11:21:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-10-22 10:15:23 +00:00
|
|
|
void InsetMathLim::mathmlize(MathStream & os) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
|
|
|
os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
void InsetMathLim::write(WriteStream &) const
|
2002-07-12 11:21:21 +00:00
|
|
|
{
|
2007-11-28 22:12:03 +00:00
|
|
|
LYXERR0("should not happen");
|
2002-07-12 11:21:21 +00:00
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|