2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
2006-09-17 09:14:18 +00:00
|
|
|
|
* \file InsetMathFracBase.C
|
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"
|
|
|
|
|
#include "MathData.h"
|
2004-01-20 14:25:24 +00:00
|
|
|
|
#include "cursor.h"
|
2001-08-08 17:26:30 +00:00
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
InsetMathFracBase::InsetMathFracBase()
|
|
|
|
|
: InsetMathNest(2)
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
bool InsetMathFracBase::idxRight(LCursor &) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
bool InsetMathFracBase::idxLeft(LCursor &) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
bool InsetMathFracBase::idxUpDown(LCursor & 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;
|
|
|
|
|
}
|