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