3 #ifndef PARAGRAPHPARAMETERS_H
4 #define PARAGRAPHPARAMETERS_H
7 #include "ShareContainer.h"
10 #include "ParameterStruct.h"
21 class ParagraphParameters {
24 ParagraphParameters();
28 bool sameLayout(ParagraphParameters const &) const;
30 VSpace const & spaceTop() const;
32 void spaceTop(VSpace const &);
34 VSpace const & spaceBottom() const;
36 void spaceBottom(VSpace const &);
38 Spacing const & spacing() const;
40 void spacing(Spacing const &);
42 bool noindent() const;
50 bool lineBottom() const;
52 void lineBottom(bool);
54 bool pagebreakTop() const;
56 void pagebreakTop(bool);
58 bool pagebreakBottom() const;
60 void pagebreakBottom(bool);
62 LyXAlignment align() const;
64 void align(LyXAlignment);
66 typedef ParameterStruct::depth_type depth_type;
68 depth_type depth() const;
70 void depth(depth_type);
72 bool startOfAppendix() const;
74 void startOfAppendix(bool);
76 bool appendix() const;
80 string const & labelString() const;
82 void labelString(string const &);
84 string const & labelWidthString() const;
86 void labelWidthString(string const &);
88 LyXLength const & leftIndent() const;
90 void leftIndent(LyXLength const &);
92 /// read the parameters from a lex
93 void read(LyXLex & lex);
95 /// write out the parameters to a stream
96 void write(std::ostream & os) const;
100 void set_from_struct(ParameterStruct const &);
102 boost::shared_ptr<ParameterStruct> param;
104 static ShareContainer<ParameterStruct> container;
109 ParagraphParameters::depth_type ParagraphParameters::depth() const
115 /** Generate a string \param data from \param par's ParagraphParameters.
116 The function also generates some additional info needed by the
119 void params2string(Paragraph const & par, string & data);
121 /** Given \param data, an encoding of the ParagraphParameters generated
122 in the Paragraph dialog, this function sets the current paragraph
125 void setParagraphParams(BufferView & bv, string const & data);