]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fracbase.C
mathed uglyfication
[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
16
17 MathFracbaseInset::MathFracbaseInset()
18         : MathNestInset(2)
19 {}
20
21
22 bool MathFracbaseInset::idxRight(BufferView &) const
23 {
24         return false;
25 }
26
27
28 bool MathFracbaseInset::idxLeft(BufferView &) const
29 {
30         return false;
31 }
32
33
34 bool MathFracbaseInset::idxUpDown(BufferView & bv, bool up, int targetx) const
35 {
36         CursorSlice & cur = cursorTip(bv);
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(targetx);
42         return true;
43 }