lyx_mirror/src/mathed/InsetMathFracBase.cpp
Bo Peng 00e305c9d9 Rename .C ==> .cpp for files in src, part one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18018 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 04:41:58 +00:00

50 lines
851 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 "MathArray.h"
#include "LCursor.h"
namespace lyx {
InsetMathFracBase::InsetMathFracBase()
: InsetMathNest(2)
{}
bool InsetMathFracBase::idxRight(LCursor &) const
{
return false;
}
bool InsetMathFracBase::idxLeft(LCursor &) const
{
return false;
}
bool InsetMathFracBase::idxUpDown(LCursor & 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