mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
0ea6f2c7f1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20290 a592a061-630c-0410-9148-cb99ea01b6c8
50 lines
866 B
C++
50 lines
866 B
C++
/**
|
|
* \file InsetMathFracBase.cpp
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author André Pönitz
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "InsetMathFracBase.h"
|
|
#include "MathData.h"
|
|
#include "Cursor.h"
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
InsetMathFracBase::InsetMathFracBase(idx_type ncells)
|
|
: InsetMathNest(ncells)
|
|
{}
|
|
|
|
|
|
bool InsetMathFracBase::idxRight(Cursor &) const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
bool InsetMathFracBase::idxLeft(Cursor &) const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
bool InsetMathFracBase::idxUpDown(Cursor & cur, bool up) const
|
|
{
|
|
InsetMath::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
|
|
if (cur.idx() == target)
|
|
return false;
|
|
cur.idx() = target;
|
|
cur.pos() = cell(target).x2pos(cur.x_target());
|
|
return true;
|
|
}
|
|
|
|
|
|
} // namespace lyx
|