]> git.lyx.org Git - lyx.git/blob - src/ParagraphParameters.h
rename MathArray into MathData
[lyx.git] / src / ParagraphParameters.h
1 // -*- C++ -*-
2 /**
3  * \file ParagraphParameters.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author Angus Leeming
9  * \author John Levon
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef PARAGRAPHPARAMETERS_H
15 #define PARAGRAPHPARAMETERS_H
16
17 #include "layout.h"
18 #include "LyXLength.h"
19 #include "Spacing.h"
20
21 #include "support/types.h"
22 #include "support/docstring.h"
23
24 #include <iosfwd>
25 #include <string>
26
27
28 namespace lyx {
29
30 class BufferView;
31 class LyXLength;
32 class Lexer;
33 class Paragraph;
34 class Spacing;
35
36
37 ///
38 class ParagraphParameters {
39 public:
40         ///
41         ParagraphParameters();
42         ///
43         void clear();
44         ///
45         bool sameLayout(ParagraphParameters const &) const;
46         ///
47         Spacing const & spacing() const;
48         ///
49         void spacing(Spacing const &);
50         ///
51         bool noindent() const;
52         ///
53         void noindent(bool);
54         ///
55         LyXAlignment align() const;
56         ///
57         void align(LyXAlignment);
58         ///
59         depth_type depth() const;
60         ///
61         void depth(depth_type);
62         ///
63         bool startOfAppendix() const;
64         ///
65         void startOfAppendix(bool);
66         ///
67         bool appendix() const;
68         ///
69         void appendix(bool);
70         ///
71         docstring const & labelString() const;
72         ///
73         void labelString(docstring const &);
74         ///
75         docstring const & labelWidthString() const;
76         ///
77         void labelWidthString(docstring const &);
78         ///
79         LyXLength const & leftIndent() const;
80         ///
81         void leftIndent(LyXLength const &);
82
83         /// read the parameters from a lex
84         void read(Lexer & lex);
85
86         /// write out the parameters to a stream
87         void write(std::ostream & os) const;
88
89         //friend bool operator==(ParameterStruct const & ps1,
90         //ParameterStruct const & ps2);
91
92 private:
93         ///
94         Spacing spacing_;
95         ///
96         bool noindent_;
97         ///
98         bool start_of_appendix_;
99         ///
100         bool appendix_;
101         ///
102         LyXAlignment align_;
103         ///
104         depth_type depth_;
105         ///
106         docstring labelstring_;
107         ///
108         docstring labelwidthstring_;
109         ///
110         LyXLength leftindent_;
111 };
112
113
114
115 /** Generate a string \param data from \param par's ParagraphParameters.
116     The function also generates some additional info needed by the
117     Paragraph dialog.
118  */
119 void params2string(Paragraph const & par, std::string & data);
120
121
122 } // namespace lyx
123
124 #endif