]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.h
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / buffer.h
index ddc23bea7a3e0f07b9d8a28bd7297faf8c276b2f..5460dec970680bd5f2af54cb2ae24d1f36a0bacd 100644 (file)
@@ -30,6 +30,12 @@ class LyXRC;
 class TeXErrors;
 class LaTeXFeatures;
 class Language;
+class ParIterator;
+
+// When lyx 1.3.x starts we should enable this
+// btw. we should also test this with 1.2 so that we
+// do not get any surprises. (Lgb)
+//#define NO_COMPABILITY 1
 
 ///
 struct DEPCLEAN {
@@ -75,10 +81,10 @@ public:
        /** High-level interface to buffer functionality.
            This function parses a command string and executes it
        */
-       bool Dispatch(string const & command);
+       bool dispatch(string const & command);
 
        /// Maybe we know the function already by number...
-       bool Dispatch(int ac, string const & argument);
+       bool dispatch(int ac, string const & argument);
 
        /// 
        void resizeInsets(BufferView *);
@@ -124,6 +130,17 @@ public:
                                        string const & token, int & pos,
                                        Paragraph::depth_type & depth, 
                                        LyXFont &);
+       ///
+       void insertStringAsLines(Paragraph *&, Paragraph::size_type &,
+                                LyXFont const &, string const &) const;
+#ifndef NO_COMPABILITY
+       ///
+       void insertErtContents(Paragraph * par, int & pos,
+                              LyXFont const & font,
+                              bool set_inactive = true);
+#endif
+       ///
+       Paragraph * getParFromID(int id) const;
 private:
        /// Parse a single inset.
        void readInset(LyXLex &, Paragraph *& par, int & pos, LyXFont &);
@@ -155,7 +172,7 @@ public:
                             Paragraph * endpar, TexRow & texrow) const;
 
         ///
-       void SimpleDocBookOnePar(std::ostream &, string & extra,
+       void simpleDocBookOnePar(std::ostream &, string & extra,
                                 Paragraph * par, int & desc_on,
                                 Paragraph::depth_type depth) const ;
 
@@ -170,7 +187,7 @@ public:
                             bool nice, bool only_body = false);
 
        /// returns the main language for the buffer (document)
-       Language const * GetLanguage() const;
+       Language const * getLanguage() const;
        ///
        bool isLyxClean() const;
        ///
@@ -274,7 +291,7 @@ public:
        BufferView * getUser() const;
 
        ///
-       void ChangeLanguage(Language const * from, Language const * to);
+       void changeLanguage(Language const * from, Language const * to);
        ///
        bool isMultiLingual();
 
@@ -311,7 +328,7 @@ public:
        TexRow texrow;
 private:
         ///
-       void DocBookHandleCaption(std::ostream & os, string & inner_tag,
+       void docbookHandleCaption(std::ostream & os, string & inner_tag,
                                  Paragraph::depth_type depth, int desc_on,
                                  Paragraph * & par);
        /// Open SGML/XML tag.
@@ -321,10 +338,10 @@ private:
         void sgmlCloseTag(std::ostream & os, Paragraph::depth_type depth,
                          string const & latexname) const;
        ///
-       void LinuxDocError(Paragraph * par, int pos,
+       void linuxDocError(Paragraph * par, int pos,
                           string const & message);
         ///
-       void SimpleLinuxDocOnePar(std::ostream & os, Paragraph * par, 
+       void simpleLinuxDocOnePar(std::ostream & os, Paragraph * par, 
                                  Paragraph::depth_type depth);
 
        /// is save needed
@@ -371,7 +388,7 @@ public:
                inset_iterator() : par(0) /*, it(0)*/ {}
                //
                inset_iterator(Paragraph * paragraph) : par(paragraph) {
-                       SetParagraph();
+                       setParagraph();
                }
                ///
                inset_iterator(Paragraph * paragraph,
@@ -382,7 +399,7 @@ public:
                                ++it;
                                if (it == par->inset_iterator_end()) {
                                        par = par->next();
-                                       SetParagraph();
+                                       setParagraph();
                                }
                        }
                        return *this;
@@ -394,7 +411,7 @@ public:
                                ++it;
                                if (it == par->inset_iterator_end()) {
                                        par = par->next();
-                                       SetParagraph();
+                                       setParagraph();
                                }
                        }
                        return tmp;
@@ -412,7 +429,7 @@ public:
                                inset_iterator const & iter2);
        private:
                ///
-               void SetParagraph();
+               void setParagraph();
                ///
                Paragraph * par;
                ///
@@ -427,6 +444,22 @@ public:
        inset_iterator inset_iterator_end() {
                return inset_iterator();
        }
+       ///
+       inset_iterator inset_const_iterator_begin() const {
+               return inset_iterator(paragraph);
+       }
+       ///
+       inset_iterator inset_const_iterator_end() const {
+               return inset_iterator();
+       }
+
+       ///
+       ParIterator par_iterator_begin();
+       ///
+       ParIterator par_iterator_end();
+
+       ///
+       Inset * getInsetFromID(int id_arg) const;
 };
 
 
@@ -445,7 +478,7 @@ void Buffer::delUser(BufferView *)
        
 
 inline
-Language const * Buffer::GetLanguage() const
+Language const * Buffer::getLanguage() const
 {
        return params.language;
 }
@@ -574,4 +607,5 @@ bool operator!=(Buffer::inset_iterator const & iter1,
                Buffer::inset_iterator const & iter2) {
        return !(iter1 == iter2);
 }
+
 #endif