]> git.lyx.org Git - lyx.git/blob - src/mathed/math_gridinfo.h
some (yet unfinished) up/down work
[lyx.git] / src / mathed / math_gridinfo.h
1 // -*- C++ -*-
2 /**
3  * \file math_gridinfo.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_GRIDINFO_H
13 #define MATH_GRIDINFO_H
14
15 #include <string>
16
17
18 class ColInfo
19 {
20 public:
21         ColInfo() : align('c'), rightline(0), leftline(false) {}
22         char   align;      // column alignment
23         std::string width;      // column width
24         std::string special;    // special column alignment
25         int    rightline;  // a line on the right?
26         bool   leftline;
27 };
28
29
30 class RowInfo
31 {
32 public:
33         RowInfo() : topline(false), bottomline(false) {}
34         bool topline;     // horizontal line above
35         int  bottomline;  // horizontal line below
36 };
37
38
39 class CellInfo
40 {
41 public:
42         CellInfo()
43                 : multi(0), leftline(false), rightline(false),
44            topline(false), bottomline(false)
45         {}
46
47         std::string content;    // cell content
48         int multi;         // multicolumn flag
49         char align;        // cell alignment
50         bool leftline;     // do we have a line on the left?
51         bool rightline;    // do we have a line on the right?
52         bool topline;        // do we have a line above?
53         bool bottomline;   // do we have a line below?
54 };
55
56
57 inline char const * verbose_align(char c)
58 {
59         return c == 'c' ? "center" : c == 'r' ? "right" : c == 'l' ? "left" : "none";
60 }
61
62
63 #endif