]> git.lyx.org Git - lyx.git/blob - src/mathed/MathGridInfo.h
cosmetics
[lyx.git] / src / mathed / MathGridInfo.h
1 // -*- C++ -*-
2 /**
3  * \file MathGridInfo.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 namespace lyx {
19
20
21 class ColInfo
22 {
23 public:
24         ColInfo() : align('c'), rightline(0), leftline(false) {}
25         char   align;      // column alignment
26         docstring width;      // column width
27         docstring special;    // special column alignment
28         int    rightline;  // a line on the right?
29         bool   leftline;
30 };
31
32
33 class RowInfo
34 {
35 public:
36         RowInfo() : topline(false), bottomline(false) {}
37         bool topline;     // horizontal line above
38         int  bottomline;  // horizontal line below
39 };
40
41
42 class CellInfo
43 {
44 public:
45         CellInfo()
46                 : multi(0), leftline(false), rightline(false),
47            topline(false), bottomline(false)
48         {}
49
50         docstring content;    // cell content
51         int multi;         // multicolumn flag
52         char align;        // cell alignment
53         bool leftline;     // do we have a line on the left?
54         bool rightline;    // do we have a line on the right?
55         bool topline;        // do we have a line above?
56         bool bottomline;   // do we have a line below?
57 };
58
59
60 inline char const * verbose_align(char c)
61 {
62         return c == 'c' ? "center" : c == 'r' ? "right" : c == 'l' ? "left" : "none";
63 }
64
65
66
67 } // namespace lyx
68
69 #endif