]> git.lyx.org Git - lyx.git/blob - src/ParameterStruct.h
redraw fix 1.
[lyx.git] / src / ParameterStruct.h
1 // -*- C++ -*-
2
3 #ifndef PARAMETERSTRUCT_H
4 #define PARAMETERSTRUCT_H
5
6 #include "vspace.h"
7 #include "Spacing.h"
8 #include "layout.h"
9 #include "lyxlength.h"
10
11 #ifdef __GNUG__
12 #pragma interface
13 #endif
14
15 ///
16 struct ParameterStruct {
17         ///
18         ParameterStruct();
19         ///
20         typedef unsigned int depth_type;
21         ///
22         VSpace added_space_top;
23         ///
24         VSpace added_space_bottom;
25         ///
26         Spacing spacing;
27         ///
28         bool noindent;
29         ///
30         bool line_top;
31         ///
32         bool line_bottom;
33         ///
34         bool pagebreak_top;
35         ///
36         bool pagebreak_bottom;
37         ///
38         LyXAlignment align;
39         ///
40         depth_type depth;
41         ///
42         bool start_of_appendix;
43         ///
44         bool appendix;
45         ///
46         string labelstring;
47         ///
48         string labelwidthstring;
49         ///
50         LyXLength leftindent;
51         ///
52 #ifndef NO_PEXTRA_REALLY
53         ///
54         int pextra_type;
55         ///
56         string pextra_width;
57         ///
58         string pextra_widthp;
59         ///
60         int pextra_alignment;
61         ///
62         bool pextra_hfill;
63         ///
64         bool pextra_start_minipage;
65 #endif
66 };
67
68
69 inline
70 ParameterStruct::ParameterStruct()
71         : noindent(false), line_top(false), line_bottom(false),
72           pagebreak_top(false), pagebreak_bottom(false),
73           align(LYX_ALIGN_BLOCK), depth(0), start_of_appendix(false),
74           appendix(false)
75 #ifndef NO_PEXTRA_REALLY
76         , pextra_type(0), pextra_alignment(0), pextra_hfill(false),
77         pextra_start_minipage(false)
78 #endif
79 {}
80
81
82 inline
83 bool operator==(ParameterStruct const & ps1,
84                 ParameterStruct const & ps2)
85 {
86         return ps1.added_space_top == ps2.added_space_top
87                 && ps1.added_space_bottom == ps2.added_space_bottom
88                 && ps1.spacing == ps2.spacing
89                 && ps1.noindent == ps2.noindent
90                 && ps1.line_top == ps2.line_top
91                 && ps1.line_bottom == ps2.line_bottom
92                 && ps1.pagebreak_top == ps2.pagebreak_top
93                 && ps1.pagebreak_bottom == ps2.pagebreak_bottom
94                 && ps1.align == ps2.align
95                 && ps1.depth == ps2.depth
96                 && ps1.start_of_appendix == ps2.start_of_appendix
97                 && ps1.appendix == ps2.appendix
98                 && ps1.labelstring == ps2.labelstring
99                 && ps1.labelwidthstring == ps2.labelwidthstring
100                 && ps1.leftindent == ps2.leftindent
101 #ifndef NO_PEXTRA_REALLY
102                 && ps1.pextra_type == ps2.pextra_type
103                 && ps1.pextra_width == ps2.pextra_width
104                 && ps1.pextra_widthp == ps2.pextra_widthp
105                 && ps1.pextra_alignment == ps2.pextra_alignment
106                 && ps1.pextra_hfill == ps2.pextra_hfill
107                 && ps1.pextra_start_minipage == ps2.pextra_start_minipage
108 #endif
109         ;
110
111 }
112
113 #endif