]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.h
Added new FINISED states FINISHED_RIGHT, FINISHED_UP, FINISHED_DOWN.
[lyx.git] / src / buffer.h
index ddc23bea7a3e0f07b9d8a28bd7297faf8c276b2f..a68acbc26399c9a7a2a019ccae6e6ca67f4640d5 100644 (file)
@@ -31,6 +31,11 @@ class TeXErrors;
 class LaTeXFeatures;
 class Language;
 
+// 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 +80,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 +129,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 +171,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 +186,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 +290,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 +327,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 +337,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 +387,7 @@ public:
                inset_iterator() : par(0) /*, it(0)*/ {}
                //
                inset_iterator(Paragraph * paragraph) : par(paragraph) {
-                       SetParagraph();
+                       setParagraph();
                }
                ///
                inset_iterator(Paragraph * paragraph,
@@ -382,7 +398,7 @@ public:
                                ++it;
                                if (it == par->inset_iterator_end()) {
                                        par = par->next();
-                                       SetParagraph();
+                                       setParagraph();
                                }
                        }
                        return *this;
@@ -394,7 +410,7 @@ public:
                                ++it;
                                if (it == par->inset_iterator_end()) {
                                        par = par->next();
-                                       SetParagraph();
+                                       setParagraph();
                                }
                        }
                        return tmp;
@@ -412,7 +428,7 @@ public:
                                inset_iterator const & iter2);
        private:
                ///
-               void SetParagraph();
+               void setParagraph();
                ///
                Paragraph * par;
                ///
@@ -427,6 +443,16 @@ 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();
+       }
+       ///
+       Inset * getInsetFromID(int id_arg) const;
 };
 
 
@@ -445,7 +471,7 @@ void Buffer::delUser(BufferView *)
        
 
 inline
-Language const * Buffer::GetLanguage() const
+Language const * Buffer::getLanguage() const
 {
        return params.language;
 }