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;
59 LyXAlignment align() const;
61 void align(LyXAlignment);
63 typedef lyx::depth_type depth_type;
65 depth_type depth() const;
67 void depth(depth_type);
69 bool startOfAppendix() const;
71 void startOfAppendix(bool);
73 bool appendix() const;
77 std::string const & labelString() const;
79 void labelString(std::string const &);
81 std::string const & labelWidthString() const;
83 void labelWidthString(std::string const &);
85 LyXLength const & leftIndent() const;
87 void leftIndent(LyXLength const &);
89 /// read the parameters from a lex
90 void read(LyXLex & lex);
92 /// write out the parameters to a stream
93 void write(std::ostream & os) const;
97 void set_from_struct(ParameterStruct const &);
99 boost::shared_ptr<ParameterStruct> param;
101 static ShareContainer<ParameterStruct> container;
105 /** Generate a string \param data from \param par's ParagraphParameters.
106 The function also generates some additional info needed by the
109 void params2string(Paragraph const & par, std::string & data);
111 /** Given \param data, an encoding of the ParagraphParameters generated
112 in the Paragraph dialog, this function sets the current paragraph
115 void setParagraphParams(BufferView & bv, std::string const & data);