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
18 #include "ShareContainer.h"
20 #include "support/types.h"
29 class ParameterStruct;
33 class ParagraphParameters {
36 ParagraphParameters();
40 bool sameLayout(ParagraphParameters const &) const;
42 Spacing const & spacing() const;
44 void spacing(Spacing const &);
46 bool noindent() const;
50 LyXAlignment align() const;
52 void align(LyXAlignment);
54 typedef lyx::depth_type depth_type;
56 depth_type depth() const;
58 void depth(depth_type);
60 bool startOfAppendix() const;
62 void startOfAppendix(bool);
64 bool appendix() const;
68 std::string const & labelString() const;
70 void labelString(std::string const &);
72 std::string const & labelWidthString() const;
74 void labelWidthString(std::string const &);
76 LyXLength const & leftIndent() const;
78 void leftIndent(LyXLength const &);
80 /// read the parameters from a lex
81 void read(LyXLex & lex);
83 /// write out the parameters to a stream
84 void write(std::ostream & os) const;
88 void set_from_struct(ParameterStruct const &);
90 boost::shared_ptr<ParameterStruct> param;
92 static ShareContainer<ParameterStruct> container;
96 /** Generate a string \param data from \param par's ParagraphParameters.
97 The function also generates some additional info needed by the
100 void params2string(Paragraph const & par, std::string & data);
102 /** Given \param data, an encoding of the ParagraphParameters generated
103 in the Paragraph dialog, this function sets the current paragraph
106 void setParagraphParams(BufferView & bv, std::string const & data);