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"
28 class ParameterStruct;
33 class ParagraphParameters {
36 ParagraphParameters();
40 bool sameLayout(ParagraphParameters const &) const;
42 VSpace const & spaceTop() const;
44 void spaceTop(VSpace const &);
46 VSpace const & spaceBottom() const;
48 void spaceBottom(VSpace const &);
50 Spacing const & spacing() const;
52 void spacing(Spacing const &);
54 bool noindent() const;
62 bool lineBottom() const;
64 void lineBottom(bool);
66 bool pagebreakTop() const;
68 void pagebreakTop(bool);
70 bool pagebreakBottom() const;
72 void pagebreakBottom(bool);
74 LyXAlignment align() const;
76 void align(LyXAlignment);
78 typedef lyx::depth_type depth_type;
80 depth_type depth() const;
82 void depth(depth_type);
84 bool startOfAppendix() const;
86 void startOfAppendix(bool);
88 bool appendix() const;
92 std::string const & labelString() const;
94 void labelString(std::string const &);
96 std::string const & labelWidthString() const;
98 void labelWidthString(std::string const &);
100 LyXLength const & leftIndent() const;
102 void leftIndent(LyXLength const &);
104 /// read the parameters from a lex
105 void read(LyXLex & lex);
107 /// write out the parameters to a stream
108 void write(std::ostream & os) const;
112 void set_from_struct(ParameterStruct const &);
114 boost::shared_ptr<ParameterStruct> param;
116 static ShareContainer<ParameterStruct> container;
120 /** Generate a string \param data from \param par's ParagraphParameters.
121 The function also generates some additional info needed by the
124 void params2string(Paragraph const & par, std::string & data);
126 /** Given \param data, an encoding of the ParagraphParameters generated
127 in the Paragraph dialog, this function sets the current paragraph
130 void setParagraphParams(BufferView & bv, std::string const & data);