]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / paragraph.h
index d141f31a97bffea438f528ea76e1b33bf05340f8..0b4ba210e805f5d0a091f54ce084d2200ec31a17 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <vector>
 
-#include "insets/inset.h"
+#include "insets/inset.h" // Just for Inset::Code
 #include "layout.h"
 
 class ParagraphParameters;
@@ -94,7 +94,7 @@ public:
        explicit
        Paragraph(Paragraph * par);
        ///
-       Paragraph(Paragraph const &);
+       Paragraph(Paragraph const &, bool same_ids);
        /// the destructor removes the new paragraph from the list
        ~Paragraph();
 
@@ -111,7 +111,8 @@ public:
 
        string const asString(Buffer const *, bool label);
        ///
-       string const asString(Buffer const *, size_type beg, size_type end);
+       string const asString(Buffer const *, size_type beg, size_type end,
+                             bool label);
        
        ///
        void writeFile(Buffer const *, std::ostream &, BufferParams const &,
@@ -139,7 +140,7 @@ public:
                                      std::ostream &, TexRow & texrow);
        ///
        bool hasSameLayout(Paragraph const * par) const;
-       
+
        ///
        void makeSameLayout(Paragraph const * par);
 
@@ -150,7 +151,7 @@ public:
            proof environment */
        int getEndLabel(BufferParams const &) const;
        ///
-       Inset * InInset();
+       Inset * inInset() const;
        ///
        void setInsetOwner(Inset * i);
        ///
@@ -252,6 +253,8 @@ public:
            LyXFont::TOGGLE.
        */
        LyXFont const getFont(BufferParams const &, size_type pos) const;
+       LyXFont const getLayoutFont(BufferParams const &) const;
+       LyXFont const getLabelFont(BufferParams const &) const;
        ///
        value_type getChar(size_type pos) const;
        ///
@@ -260,21 +263,22 @@ public:
        void setChar(size_type pos, value_type c);
        ///
        void setFont(size_type pos, LyXFont const & font);
-       ///
-        string const getWord(size_type &) const;
        /// Returns the height of the highest font in range
        LyXFont::FONT_SIZE highestFontInRange(size_type startpos,
-                                             size_type endpos) const;
+                                             size_type endpos,
+                                                                                 LyXFont::FONT_SIZE const def_size) const;
        ///
        void insertChar(size_type pos, value_type c);
        ///
        void insertChar(size_type pos, value_type c, LyXFont const &);
        ///
+       bool checkInsertChar(LyXFont &);
+       ///
        void insertInset(size_type pos, Inset * inset);
        ///
        void insertInset(size_type pos, Inset * inset, LyXFont const &);
        ///
-       bool insertInsetAllowed(Inset * inset);
+       bool insetAllowed(Inset::Code code);
        ///
        Inset * getInset(size_type pos);
        ///
@@ -321,6 +325,9 @@ public:
        /// returns -1 if inset not found
        int getPositionOfInset(Inset * inset) const;
 
+       /// some good comment here John?
+       Paragraph * getParFromID(int id) const;
+
        ///
        int stripLeadingSpaces(LyXTextClassList::size_type tclass); 
 
@@ -368,9 +375,9 @@ public:
                        return *this;
                }
                ///
-               Inset * operator*() { return (*it).inset; }
+               Inset * operator*() { return it->inset; }
                ///
-               size_type getPos() const {return (*it).pos; }
+               size_type getPos() const {return it->pos; }
                ///
                bool operator==(inset_iterator const & iter) const {
                        return it == iter.it;
@@ -383,6 +390,9 @@ public:
                ///
                InsetList::iterator it;
        };
+       ///
+       friend class inset_iterator;
+       
        ///
        inset_iterator inset_iterator_begin();
        ///
@@ -391,6 +401,8 @@ public:
        inset_iterator InsetIterator(size_type pos);
 
 private:
+       /// if anything uses this we don't want it to.
+       Paragraph(Paragraph const &);
        ///
        Paragraph * next_;
        ///