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
21 #include "support/types.h"
22 #include "support/docstring.h"
38 class ParagraphParameters {
41 ParagraphParameters();
45 bool sameLayout(ParagraphParameters const &) const;
47 Spacing const & spacing() const;
49 void spacing(Spacing const &);
51 bool noindent() const;
55 LyXAlignment align() const;
57 void align(LyXAlignment);
59 depth_type depth() const;
61 void depth(depth_type);
63 bool startOfAppendix() const;
65 void startOfAppendix(bool);
67 bool appendix() const;
71 docstring const & labelString() const;
73 void labelString(docstring const &);
75 docstring const & labelWidthString() const;
77 void labelWidthString(docstring const &);
79 Length const & leftIndent() const;
81 void leftIndent(Length const &);
83 /// read the parameters from a string
84 void read (std::string str, bool merge = true);
86 /// read the parameters from a lex
87 void read(Lexer & lex, bool merge = true);
90 void apply(ParagraphParameters const & params, Layout const & layout);
93 bool canApply(ParagraphParameters const & params, Layout const & layout);
95 /// write out the parameters to a stream
96 void write(std::ostream & os) const;
98 //friend bool operator==(ParameterStruct const & ps1,
99 //ParameterStruct const & ps2);
107 bool start_of_appendix_;
115 docstring labelstring_;
117 docstring labelwidthstring_;
124 /** Generate a string \param data from \param par's ParagraphParameters.
125 The function also generates some additional info needed by the
128 void params2string(Paragraph const & par, std::string & data);