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"
21 #include "ParameterStruct.h"
32 class ParagraphParameters {
35 ParagraphParameters();
39 bool sameLayout(ParagraphParameters const &) const;
41 VSpace const & spaceTop() const;
43 void spaceTop(VSpace const &);
45 VSpace const & spaceBottom() const;
47 void spaceBottom(VSpace const &);
49 Spacing const & spacing() const;
51 void spacing(Spacing const &);
53 bool noindent() const;
61 bool lineBottom() const;
63 void lineBottom(bool);
65 bool pagebreakTop() const;
67 void pagebreakTop(bool);
69 bool pagebreakBottom() const;
71 void pagebreakBottom(bool);
73 LyXAlignment align() const;
75 void align(LyXAlignment);
77 typedef ParameterStruct::depth_type depth_type;
79 depth_type depth() const;
81 void depth(depth_type);
83 bool startOfAppendix() const;
85 void startOfAppendix(bool);
87 bool appendix() const;
91 string const & labelString() const;
93 void labelString(string const &);
95 string const & labelWidthString() const;
97 void labelWidthString(string const &);
99 LyXLength const & leftIndent() const;
101 void leftIndent(LyXLength const &);
103 /// read the parameters from a lex
104 void read(LyXLex & lex);
106 /// write out the parameters to a stream
107 void write(std::ostream & os) const;
111 void set_from_struct(ParameterStruct const &);
113 boost::shared_ptr<ParameterStruct> param;
115 static ShareContainer<ParameterStruct> container;
120 ParagraphParameters::depth_type ParagraphParameters::depth() const
126 /** Generate a string \param data from \param par's ParagraphParameters.
127 The function also generates some additional info needed by the
130 void params2string(Paragraph const & par, string & data);
132 /** Given \param data, an encoding of the ParagraphParameters generated
133 in the Paragraph dialog, this function sets the current paragraph
136 void setParagraphParams(BufferView & bv, string const & data);