3 * \file ParagraphParameters.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS.
14 #ifndef PARAGRAPHPARAMETERS_H
15 #define PARAGRAPHPARAMETERS_H
17 #include "LayoutEnums.h"
21 #include "support/types.h"
22 #include "support/docstring.h"
36 class ParagraphParameters {
39 ParagraphParameters();
43 bool sameLayout(ParagraphParameters const &) const;
45 Spacing const & spacing() const;
47 void spacing(Spacing const &);
49 bool noindent() const;
53 LyXAlignment align() const;
55 void align(LyXAlignment);
57 depth_type depth() const;
59 void depth(depth_type);
61 bool startOfAppendix() const;
63 void startOfAppendix(bool);
65 bool appendix() const;
69 docstring const & labelString() const;
71 void labelString(docstring const &);
73 docstring const & labelWidthString() const;
75 void labelWidthString(docstring const &);
77 Length const & leftIndent() const;
79 void leftIndent(Length const &);
81 /// read the parameters from a string
82 void read (std::string str, bool merge = true);
84 /// read the parameters from a lex
85 void read(Lexer & lex, bool merge = true);
88 void apply(ParagraphParameters const & params, Layout const & layout);
90 // It would be nice to have a working version of this method, so that
91 // getStatus() could return information about what was possible.
92 // bool canApply(ParagraphParameters const & params, Layout const & layout)
95 /// write out the parameters to a stream
96 void write(std::ostream & os) const;
104 bool start_of_appendix_;
112 docstring labelstring_;
114 docstring labelwidthstring_;
121 /** Generate a string \param data from \param par's ParagraphParameters.
122 The function also generates some additional info needed by the
125 void params2string(Paragraph const & par, std::string & data);