]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fracbase.C
some (yet unfinished) up/down work
[lyx.git] / src / mathed / math_fracbase.C
1 /**
2  * \file math_fracbase.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "math_fracbase.h"
14 #include "math_data.h"
15 #include "cursor.h"
16
17
18 MathFracbaseInset::MathFracbaseInset()
19         : MathNestInset(2)
20 {}
21
22
23 bool MathFracbaseInset::idxRight(LCursor &) const
24 {
25         return false;
26 }
27
28
29 bool MathFracbaseInset::idxLeft(LCursor &) const
30 {
31         return false;
32 }
33
34
35 bool MathFracbaseInset::idxUpDown(LCursor & cur, bool up) const
36 {
37         MathInset::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
38         if (cur.idx() == target)
39                 return false;
40         cur.idx() = target;
41         cur.pos() = cell(target).x2pos(cur.x_target());
42         return true;
43 }