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;
34 class ParagraphParameters {
37 ParagraphParameters();
41 bool sameLayout(ParagraphParameters const &) const;
43 VSpace const & spaceTop() const;
45 void spaceTop(VSpace const &);
47 VSpace const & spaceBottom() const;
49 void spaceBottom(VSpace const &);
51 Spacing const & spacing() const;
53 void spacing(Spacing const &);
55 bool noindent() const;
63 bool lineBottom() const;
65 void lineBottom(bool);
67 bool pagebreakTop() const;
69 void pagebreakTop(bool);
71 bool pagebreakBottom() const;
73 void pagebreakBottom(bool);
75 LyXAlignment align() const;
77 void align(LyXAlignment);
79 typedef lyx::depth_type depth_type;
81 depth_type depth() const;
83 void depth(depth_type);
85 bool startOfAppendix() const;
87 void startOfAppendix(bool);
89 bool appendix() const;
93 std::string const & labelString() const;
95 void labelString(std::string const &);
97 std::string const & labelWidthString() const;
99 void labelWidthString(std::string const &);
101 LyXLength const & leftIndent() const;
103 void leftIndent(LyXLength const &);
105 /// read the parameters from a lex
106 void read(LyXLex & lex);
108 /// write out the parameters to a stream
109 void write(std::ostream & os) const;
113 void set_from_struct(ParameterStruct const &);
115 boost::shared_ptr<ParameterStruct> param;
117 static ShareContainer<ParameterStruct> container;
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);
127 /** Given \param data, an encoding of the ParagraphParameters generated
128 in the Paragraph dialog, this function sets the current paragraph
131 void setParagraphParams(BufferView & bv, std::string const & data);