]> git.lyx.org Git - lyx.git/blob - src/mathed/math_gridinfo.h
introduce namespace lyx::support
[lyx.git] / src / mathed / math_gridinfo.h
1 #ifndef MATH_GRIDINFO_H
2 #define MATH_GRIDINFO_H
3
4 struct ColInfo
5 {
6         ColInfo() : align('c'), rightline(0), leftline(false) {}
7         char   align;      // column alignment
8         string width;      // column width
9         int    rightline;  // a line on the right?
10         bool   leftline;
11 };
12
13
14 struct RowInfo
15 {
16         RowInfo() : topline(false), bottomline(false) {} 
17         bool topline;     // horizontal line above
18         int  bottomline;  // horizontal line below
19 };
20
21
22 struct CellInfo
23 {
24         CellInfo()
25                 : multi(0), leftline(false), rightline(false),
26            topline(false), bottomline(false)
27         {}
28
29         string content;    // cell content
30         int multi;         // multicolumn flag
31         char align;        // cell alignment
32         bool leftline;     // do we have a line on the left?
33         bool rightline;    // do we have a line on the right?
34         bool topline;        // do we have a line above?
35         bool bottomline;   // do we have a line below?
36 };
37
38
39 inline char const * verbose_align(char c)
40 {
41         return c == 'c' ? "center" : c == 'r' ? "right" : c == 'l' ? "left" : "none";
42 }
43
44
45 #endif