]> git.lyx.org Git - lyx.git/blob - src/ParagraphParameters.h
Fix conversion of notes.
[lyx.git] / src / ParagraphParameters.h
1 // -*- C++ -*-
2
3 #ifndef PARAGRAPHPARAMETERS_H
4 #define PARAGRAPHPARAMETERS_H
5
6 #include "LString.h"
7 #include "ShareContainer.h"
8 #include "layout.h"
9
10 #include "ParameterStruct.h"
11
12 #include <iosfwd>
13
14 class VSpace;
15 class Spacing;
16 class LyXLex;
17
18
19 ///
20 class ParagraphParameters {
21 public:
22         ///
23         ParagraphParameters();
24         ///
25         void clear();
26         ///
27         bool sameLayout(ParagraphParameters const &) const;
28         ///
29         VSpace const & spaceTop() const;
30         ///
31         void spaceTop(VSpace const &);
32         ///
33         VSpace const & spaceBottom() const;
34         ///
35         void spaceBottom(VSpace const &);
36         ///
37         Spacing const & spacing() const;
38         ///
39         void spacing(Spacing const &);
40         ///
41         bool noindent() const;
42         ///
43         void noindent(bool);
44         ///
45         bool lineTop() const;
46         ///
47         void lineTop(bool);
48         ///
49         bool lineBottom() const;
50         ///
51         void lineBottom(bool);
52         ///
53         bool pagebreakTop() const;
54         ///
55         void pagebreakTop(bool);
56         ///
57         bool pagebreakBottom() const;
58         ///
59         void pagebreakBottom(bool);
60         ///
61         LyXAlignment align() const;
62         ///
63         void align(LyXAlignment);
64         ///
65         typedef ParameterStruct::depth_type depth_type;
66         ///
67         depth_type depth() const;
68         ///
69         void depth(depth_type);
70         ///
71         bool startOfAppendix() const;
72         ///
73         void startOfAppendix(bool);
74         ///
75         bool appendix() const;
76         ///
77         void appendix(bool);
78         ///
79         string const & labelString() const;
80         ///
81         void labelString(string const &);
82         ///
83         string const & labelWidthString() const;
84         ///
85         void labelWidthString(string const &);
86         ///
87         LyXLength const & leftIndent() const;
88         ///
89         void leftIndent(LyXLength const &);
90
91         /// read the parameters from a lex
92         void read(LyXLex & lex);
93
94         /// write out the parameters to a stream
95         void write(std::ostream & os) const;
96
97 private:
98         ///
99         void set_from_struct(ParameterStruct const &);
100         ///
101         boost::shared_ptr<ParameterStruct> param;
102         ///
103         static ShareContainer<ParameterStruct> container;
104 };
105
106
107 inline
108 ParagraphParameters::depth_type ParagraphParameters::depth() const
109 {
110         return param->depth;
111 }
112 #endif