]> git.lyx.org Git - lyx.git/blob - src/ParagraphParameters.h
work around for bug reported by Mario Morandini
[lyx.git] / src / ParagraphParameters.h
1 // -*- C++ -*-
2
3 #ifndef PARAGRAPHPARAMETERS_H
4 #define PARAGRAPHPARAMETERS_H
5
6 #ifdef __GNUG__
7 #pragma interface
8 #endif
9
10 #include "ShareContainer.h"
11 #include "LString.h"
12 #include "layout.h"
13
14 // Not yet... lyx 1.3.x or so
15 //#define NO_PEXTRA_REALLY 1
16
17 #include "ParameterStruct.h"
18
19 class VSpace;
20 class Spacing;
21
22
23 ///
24 class ParagraphParameters {
25 public:
26         ///
27         ParagraphParameters();
28         ///
29         void clear();
30         ///
31         bool sameLayout(ParagraphParameters const &) const;
32         ///
33         VSpace const & spaceTop() const;
34         ///
35         void spaceTop(VSpace const &);
36         ///
37         VSpace const & spaceBottom() const;
38         ///
39         void spaceBottom(VSpace const &);
40         ///
41         Spacing const & spacing() const;
42         ///
43         void spacing(Spacing const &);
44         ///
45         bool noindent() const;
46         ///
47         void noindent(bool);
48         ///
49         bool lineTop() const;
50         ///
51         void lineTop(bool);
52         ///
53         bool lineBottom() const;
54         ///
55         void lineBottom(bool);
56         ///
57         bool pagebreakTop() const;
58         ///
59         void pagebreakTop(bool);
60         ///
61         bool pagebreakBottom() const;
62         ///
63         void pagebreakBottom(bool);
64         ///
65         LyXAlignment align() const;
66         ///
67         void align(LyXAlignment);
68         ///
69         typedef ParameterStruct::depth_type depth_type;
70         ///
71         depth_type depth() const;
72         ///
73         void depth(depth_type);
74         ///
75         bool startOfAppendix() const;
76         ///
77         void startOfAppendix(bool);
78         ///
79         bool appendix() const;
80         ///
81         void appendix(bool);
82         ///
83         string const & labelString() const;
84         ///
85         void labelString(string const &);
86         ///
87         string const & labelWidthString() const;
88         ///
89         void labelWidthString(string const &);
90 #ifndef NO_PEXTRA_REALLY
91         ///
92         int pextraType() const;
93         ///
94         void pextraType(int);
95         ///
96         string const & pextraWidth() const;
97         ///
98         void pextraWidth(string const &);
99         ///
100         string const & pextraWidthp() const;
101         ///
102         void pextraWidthp(string const &);
103         ///
104         int pextraAlignment() const;
105         ///
106         void pextraAlignment(int);
107         ///
108         bool pextraHfill() const;
109         ///
110         void pextraHfill(bool);
111         ///
112         bool pextraStartMinipage() const;
113         ///
114         void pextraStartMinipage(bool);
115 #endif
116 private:
117         ///
118         void set_from_struct(ParameterStruct const &);
119         ///
120         boost::shared_ptr<ParameterStruct> param;
121         ///
122         static ShareContainer<ParameterStruct> container;
123 };
124
125
126 inline
127 ParagraphParameters::depth_type ParagraphParameters::depth() const
128 {
129         return param->depth;
130 }
131 #endif