]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphParameters.h
ws changes only
[lyx.git] / src / ParagraphParameters.h
index 71a4af09d2379cb75a0b02fd82c5721b678f1420..7c1726267a6d40fb7a749a5c880a76f5c51da128 100644 (file)
@@ -1,24 +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
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ShareContainer.h"
-#include "LString.h"
 #include "layout.h"
+#include "ShareContainer.h"
 
-// Not yet... lyx 1.3.x or so
-//#define NO_PEXTRA_REALLY 1
+#include "support/types.h"
 
-#include "ParameterStruct.h"
+#include <iosfwd>
+#include <string>
 
-class VSpace;
+class BufferView;
+class LyXLength;
+class LyXLex;
+class Paragraph;
+class ParameterStruct;
 class Spacing;
-
+class VSpace;
 
 ///
 class ParagraphParameters {
@@ -66,7 +76,7 @@ public:
        ///
        void align(LyXAlignment);
        ///
-       typedef ParameterStruct::depth_type depth_type;
+       typedef lyx::depth_type depth_type;
        ///
        depth_type depth() const;
        ///
@@ -80,39 +90,24 @@ public:
        ///
        void appendix(bool);
        ///
-       string const & labelString() const;
-       ///
-       void labelString(string const &);
-       ///
-       string const & labelWidthString() const;
-       ///
-       void labelWidthString(string const &);
-#ifndef NO_PEXTRA_REALLY
-       ///
-       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);
-#endif
+       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 &);
@@ -123,9 +118,16 @@ private:
 };
 
 
-inline
-ParagraphParameters::depth_type ParagraphParameters::depth() const
-{
-       return param->depth;
-}
+/** 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