]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphParameters.h
ws changes only
[lyx.git] / src / ParagraphParameters.h
index fe64dbe3cba7b87d88947b5733d14db4a788304d..7c1726267a6d40fb7a749a5c880a76f5c51da128 100644 (file)
@@ -1,15 +1,34 @@
 // -*- C++ -*-
+/**
+ * \file ParagraphParameters.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ * \author Angus Leeming
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
 #ifndef PARAGRAPHPARAMETERS_H
 #define PARAGRAPHPARAMETERS_H
 
-#include "ShareContainer.h"
-#include "LString.h"
 #include "layout.h"
+#include "ShareContainer.h"
 
-class VSpace;
+#include "support/types.h"
+
+#include <iosfwd>
+#include <string>
+
+class BufferView;
+class LyXLength;
+class LyXLex;
+class Paragraph;
+class ParameterStruct;
 class Spacing;
-struct ParameterStruct;
+class VSpace;
 
 ///
 class ParagraphParameters {
@@ -21,8 +40,6 @@ public:
        ///
        bool sameLayout(ParagraphParameters const &) const;
        ///
-       void makeSame(ParagraphParameters const & pp);
-       ///
        VSpace const & spaceTop() const;
        ///
        void spaceTop(VSpace const &);
@@ -59,9 +76,11 @@ public:
        ///
        void align(LyXAlignment);
        ///
-       char depth() const;
+       typedef lyx::depth_type depth_type;
        ///
-       void depth(char);
+       depth_type depth() const;
+       ///
+       void depth(depth_type);
        ///
        bool startOfAppendix() const;
        ///
@@ -71,37 +90,24 @@ public:
        ///
        void appendix(bool);
        ///
-       string const & labelString() const;
-       ///
-       void labelString(string const &);
-       ///
-       string const & labelWidthString() const;
-       ///
-       void labelWidthString(string const &);
-       ///
-       int pextraType() const;
-       ///
-       void pextraType(int);
+       std::string const & labelString() const;
        ///
-       string const & pextraWidth() const;
+       void labelString(std::string const &);
        ///
-       void pextraWidth(string const &);
+       std::string const & labelWidthString() const;
        ///
-       string const & pextraWidthp() const;
+       void labelWidthString(std::string const &);
        ///
-       void pextraWidthp(string const &);
+       LyXLength const & leftIndent() const;
        ///
-       int pextraAlignment() const;
-       ///
-       void pextraAlignment(int);
-       ///
-       bool pextraHfill() const;
-       ///
-       void pextraHfill(bool);
-       ///
-       bool pextraStartMinipage() const;
-       ///
-       void pextraStartMinipage(bool);
+       void leftIndent(LyXLength const &);
+
+       /// read the parameters from a lex
+       void read(LyXLex & lex);
+
+       /// write out the parameters to a stream
+       void write(std::ostream & os) const;
+
 private:
        ///
        void set_from_struct(ParameterStruct const &);
@@ -110,4 +116,18 @@ private:
        ///
        static ShareContainer<ParameterStruct> container;
 };
+
+
+/** Generate a string \param data from \param par's ParagraphParameters.
+    The function also generates some additional info needed by the
+    Paragraph dialog.
+ */
+void params2string(Paragraph const & par, std::string & data);
+
+/** Given \param data, an encoding of the ParagraphParameters generated
+    in the Paragraph dialog, this function sets the current paragraph
+    appropriately.
+ */
+void setParagraphParams(BufferView & bv, std::string const & data);
+
 #endif