]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
the spellcheck cleanup
[lyx.git] / src / paragraph.h
index 62b1b4048fcc4d3bf87aa13379b54620fee7cb3d..d0338cd4c45656e29003c0cbbb8e7efeaa400735 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "support/types.h"
 
-#include "support/std_string.h"
+#include <string>
 
 class Buffer;
 class BufferParams;
@@ -69,6 +69,9 @@ public:
        /// the destructor removes the new paragraph from the list
        ~Paragraph();
 
+       ///
+       int id() const;
+
        ///
        Language const * getParLanguage(BufferParams const &) const;
        ///
@@ -80,10 +83,22 @@ public:
        bool isMultiLingual(BufferParams const &);
 
        ///
-       string const asString(Buffer const &, bool label) const;
+       std::string const asString(Buffer const &,
+                                  LatexRunParams const & runparams,
+                                  bool label) const;
+       ///
+       std::string const asString(Buffer const &, bool label) const;
+       ///
+       std::string const Paragraph::asString(Buffer const & buffer,
+                                             lyx::pos_type beg,
+                                             lyx::pos_type end,
+                                             bool label) const;
        ///
-       string const asString(Buffer const &, lyx::pos_type beg, lyx::pos_type end,
-                             bool label) const;
+       std::string const asString(Buffer const &,
+                                  LatexRunParams const & runparams,
+                                  lyx::pos_type beg,
+                                  lyx::pos_type end,
+                                  bool label) const;
 
        ///
        void write(Buffer const &, std::ostream &, BufferParams const &,
@@ -91,11 +106,6 @@ public:
        ///
        void validate(LaTeXFeatures &) const;
 
-       /// return the unique ID of this paragraph
-       int id() const;
-       /// Set the Id of this paragraph.
-       void id(int);
-
        ///
        int startTeXParParams(BufferParams const &, std::ostream &, bool) const;
 
@@ -108,6 +118,21 @@ public:
                             LyXFont const & outerfont, std::ostream &,
                             TexRow & texrow, LatexRunParams const &);
 
+       ///
+       void simpleLinuxDocOnePar(Buffer const & buf,
+                                 std::ostream & os,
+                                 LyXFont const & outerfont,
+                                 LatexRunParams const & runparams,
+                                 lyx::depth_type depth) const;
+
+       ///
+       void simpleDocBookOnePar(Buffer const & buf,
+                                std::ostream &,
+                                LyXFont const & outerfont,
+                                int & desc_on,
+                                LatexRunParams const & runparams,
+                                lyx::depth_type depth) const;
+
        ///
        bool hasSameLayout(Paragraph const & par) const;
 
@@ -135,11 +160,8 @@ public:
        ///
        void layout(LyXLayout_ptr const & new_layout);
 
-       ///
-       char enumdepth;
-
-       ///
-       char itemdepth;
+       /// This is the item depth, only used by enumerate and itemize
+       signed char itemdepth;
 
        ///
        InsetBibitem * bibitem() const;  // ale970302
@@ -185,12 +207,12 @@ public:
        int beginningOfBody() const;
 
        ///
-       string const & getLabelstring() const;
+       std::string const & getLabelstring() const;
 
        /// the next two functions are for the manual labels
-       string const getLabelWidthString() const;
+       std::string const getLabelWidthString() const;
        ///
-       void setLabelWidthString(string const & s);
+       void setLabelWidthString(std::string const & s);
        ///
        char getAlign() const;
        /// The nesting depth of a paragraph
@@ -249,6 +271,9 @@ public:
                                        lyx::pos_type endpos,
                                        LyXFont_size def_size) const;
        ///
+       void insert(lyx::pos_type pos, std::string const & str,
+                   LyXFont const & font);
+       ///
        void insertChar(lyx::pos_type pos, value_type c);
        ///
        void insertChar(lyx::pos_type pos, value_type c, LyXFont const &, Change change = Change(Change::INSERTED));
@@ -293,11 +318,16 @@ public:
 
        /// return true if we allow this par to stay empty
        bool allowEmpty() const;
-
+       ////
+       unsigned char transformChar(unsigned char c, lyx::pos_type pos) const;
        ///
        ParagraphParameters & params();
        ///
        ParagraphParameters const & params() const;
+
+       ///
+       RowList::iterator getRow(lyx::pos_type pos);
+
        ///
        InsetList insetlist;
 
@@ -305,6 +335,10 @@ public:
        mutable RowList rows;
        /// last draw y position (baseline of top row)
        int y;
+       /// total height of paragraph
+       unsigned int height;
+       /// total width of paragraph, may differ from workwidth
+       unsigned int width;
 
 private:
        ///