]> git.lyx.org Git - lyx.git/blob - src/ParagraphParameters.h
more guii moving around.
[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         ///
91         LyXLength const & leftIndent() const;
92         ///
93         void leftIndent(LyXLength const &);
94         ///
95 #ifndef NO_PEXTRA_REALLY
96         ///
97         int pextraType() const;
98         ///
99         void pextraType(int);
100         ///
101         string const & pextraWidth() const;
102         ///
103         void pextraWidth(string const &);
104         ///
105         string const & pextraWidthp() const;
106         ///
107         void pextraWidthp(string const &);
108         ///
109         int pextraAlignment() const;
110         ///
111         void pextraAlignment(int);
112         ///
113         bool pextraHfill() const;
114         ///
115         void pextraHfill(bool);
116         ///
117         bool pextraStartMinipage() const;
118         ///
119         void pextraStartMinipage(bool);
120 #endif
121 private:
122         ///
123         void set_from_struct(ParameterStruct const &);
124         ///
125         boost::shared_ptr<ParameterStruct> param;
126         ///
127         static ShareContainer<ParameterStruct> container;
128 };
129
130
131 inline
132 ParagraphParameters::depth_type ParagraphParameters::depth() const
133 {
134         return param->depth;
135 }
136 #endif