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