2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
2007-04-25 03:01:35 +00:00
|
|
|
|
* \file InsetMathFracBase.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>
|
2001-08-08 17:26:30 +00:00
|
|
|
|
|
2006-09-17 09:14:18 +00:00
|
|
|
|
#include "InsetMathFracBase.h"
|
2007-04-26 16:05:57 +00:00
|
|
|
|
#include "MathData.h"
|
2007-04-26 14:56:30 +00:00
|
|
|
|
#include "Cursor.h"
|
2001-08-08 17:26:30 +00:00
|
|
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
|
2007-09-15 16:39:51 +00:00
|
|
|
|
InsetMathFracBase::InsetMathFracBase(idx_type ncells)
|
|
|
|
|
: InsetMathNest(ncells)
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool InsetMathFracBase::idxRight(Cursor &) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool InsetMathFracBase::idxLeft(Cursor &) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool InsetMathFracBase::idxUpDown(Cursor & cur, bool up) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
2006-09-16 18:11:38 +00:00
|
|
|
|
InsetMath::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
|
2004-01-15 17:34:44 +00:00
|
|
|
|
if (cur.idx() == target)
|
2001-08-08 17:26:30 +00:00
|
|
|
|
return false;
|
2004-01-15 17:34:44 +00:00
|
|
|
|
cur.idx() = target;
|
2004-01-26 10:13:15 +00:00
|
|
|
|
cur.pos() = cell(target).x2pos(cur.x_target());
|
2001-08-08 17:26:30 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|