]> git.lyx.org Git - lyx.git/blob - src/mathed/math_gridinfo.h
The std::string mammoth path.
[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
16 struct ColInfo
17 {
18         ColInfo() : align('c'), rightline(0), leftline(false) {}
19         char   align;      // column alignment
20         string width;      // column width
21         string special;    // special column alignment
22         int    rightline;  // a line on the right?
23         bool   leftline;
24 };
25
26
27 struct RowInfo
28 {
29         RowInfo() : topline(false), bottomline(false) {}
30         bool topline;     // horizontal line above
31         int  bottomline;  // horizontal line below
32 };
33
34
35 struct CellInfo
36 {
37         CellInfo()
38                 : multi(0), leftline(false), rightline(false),
39            topline(false), bottomline(false)
40         {}
41
42         string content;    // cell content
43         int multi;         // multicolumn flag
44         char align;        // cell alignment
45         bool leftline;     // do we have a line on the left?
46         bool rightline;    // do we have a line on the right?
47         bool topline;        // do we have a line above?
48         bool bottomline;   // do we have a line below?
49 };
50
51
52 inline char const * verbose_align(char c)
53 {
54         return c == 'c' ? "center" : c == 'r' ? "right" : c == 'l' ? "left" : "none";
55 }
56
57
58 #endif