]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
the spellcheck cleanup
[lyx.git] / src / paragraph.h
index fd03c1c62010f8538cda6fe075d4c4268e8df0d8..d0338cd4c45656e29003c0cbbb8e7efeaa400735 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "support/types.h"
 
+#include <string>
 
 class Buffer;
 class BufferParams;
@@ -68,6 +69,9 @@ public:
        /// the destructor removes the new paragraph from the list
        ~Paragraph();
 
+       ///
+       int id() const;
+
        ///
        Language const * getParLanguage(BufferParams const &) const;
        ///
@@ -78,11 +82,23 @@ public:
        ///
        bool isMultiLingual(BufferParams 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 asString(Buffer const &, lyx::pos_type beg, lyx::pos_type end,
-                             bool label) const;
+       std::string const Paragraph::asString(Buffer const & buffer,
+                                             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 &,
@@ -90,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;
 
@@ -107,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;
 
@@ -134,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
@@ -248,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));
@@ -292,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;
 
@@ -304,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:
        ///