]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fracbase.C
new hierarchy for frac-like things
[lyx.git] / src / mathed / math_fracbase.C
1 #ifdef __GNUG__
2 #pragma implementation
3 #endif
4
5 #include "math_fracbase.h"
6
7
8 MathFracbaseInset::MathFracbaseInset()
9         : MathNestInset(2)
10 {}
11
12
13 bool MathFracbaseInset::idxRight(int &, int &) const
14 {
15         return false;
16 }
17
18
19 bool MathFracbaseInset::idxLeft(int &, int &) const
20 {
21         return false;
22 }
23
24
25 bool MathFracbaseInset::idxUp(int & idx, int &) const
26 {
27         if (idx == 0)
28                 return false;
29         idx = 0;
30         return true;
31 }
32
33
34 bool MathFracbaseInset::idxDown(int & idx, int &) const
35 {
36         if (idx == 1)
37                 return false;
38         idx = 1;
39         return true;
40 }
41
42
43 bool MathFracbaseInset::idxFirstUp(int & idx, int & pos) const
44 {
45         idx = 0;
46         pos = 0;
47         return true;
48 }
49
50
51 bool MathFracbaseInset::idxFirstDown(int & idx, int & pos) const
52 {
53         idx = 1;
54         pos = 0;
55         return true;
56 }
57
58
59 bool MathFracbaseInset::idxLastUp(int & idx, int & pos) const
60 {
61         idx = 0;
62         pos = cell(idx).size();
63         return true;
64 }
65
66
67 bool MathFracbaseInset::idxLastDown(int & idx, int & pos) const
68 {
69         idx = 1;
70         pos = cell(idx).size();
71         return true;
72 }