2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_fracbase.C
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
#include "math_fracbase.h"
|
2003-09-07 21:25:37 +00:00
|
|
|
|
#include "math_data.h"
|
2004-01-20 14:25:24 +00:00
|
|
|
|
#include "cursor.h"
|
2001-08-08 17:26:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MathFracbaseInset::MathFracbaseInset()
|
|
|
|
|
: MathNestInset(2)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2004-01-16 12:36:23 +00:00
|
|
|
|
bool MathFracbaseInset::idxRight(LCursor &) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2004-01-16 12:36:23 +00:00
|
|
|
|
bool MathFracbaseInset::idxLeft(LCursor &) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2004-01-16 12:36:23 +00:00
|
|
|
|
bool MathFracbaseInset::idxUpDown(LCursor & cur, bool up, int targetx) const
|
2001-08-08 17:26:30 +00:00
|
|
|
|
{
|
2002-03-22 15:50:50 +00:00
|
|
|
|
MathInset::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;
|
|
|
|
|
cur.pos() = cell(target).x2pos(targetx);
|
2001-08-08 17:26:30 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|