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/debug.h"
22 #include "support/types.h"
23 #include "support/docstring.h"
37 class ParagraphParameters {
40 ParagraphParameters();
42 friend LyXErr & operator<<(LyXErr & os, ParagraphParameters const & cur);
46 bool sameLayout(ParagraphParameters const &) const;
48 Spacing const & spacing() const;
50 void spacing(Spacing const &);
52 bool noindent() const;
56 LyXAlignment align() const;
58 void align(LyXAlignment);
60 depth_type depth() const;
62 void depth(depth_type);
64 bool startOfAppendix() const;
66 void startOfAppendix(bool);
68 bool appendix() const;
72 docstring const & labelString() const;
74 void labelString(docstring const &);
76 docstring const & labelWidthString() const;
78 void labelWidthString(docstring const &);
80 Length const & leftIndent() const;
82 void leftIndent(Length const &);
84 /// read the parameters from a string
85 void read (std::string str, bool merge = true);
87 /// read the parameters from a lex
88 void read(Lexer & lex, bool merge = true);
91 void apply(ParagraphParameters const & params, Layout const & layout);
93 // It would be nice to have a working version of this method, so that
94 // getStatus() could return information about what was possible.
95 // bool canApply(ParagraphParameters const & params, Layout const & layout)
98 /// write out the parameters to a stream
99 void write(std::ostream & os) const;
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);