]> git.lyx.org Git - lyx.git/blobdiff - src/lyxparagraph.h
patch from dekel
[lyx.git] / src / lyxparagraph.h
index d329740e423e0e2d143d6b4768ebdc365183df7a..7852ca9dd5f6a111617ec412af1f86b1d93a311f 100644 (file)
@@ -132,6 +132,8 @@ public:
        void ChangeLanguage(Language const * from, Language const * to);
        ///
        bool isMultiLingual();
+       ///
+       string String(bool label);
        
        ///
        void writeFile(std::ostream &, BufferParams const &, char, char) const;
@@ -152,10 +154,11 @@ public:
 
        ///
        LyXParagraph * TeXOnePar(std::ostream &, TexRow & texrow,
+                                bool moving_arg,
                                 std::ostream & foot, TexRow & foot_texrow,
                                 int & foot_count);
        ///
-       bool SimpleTeXOnePar(std::ostream &, TexRow & texrow);
+       bool SimpleTeXOnePar(std::ostream &, TexRow & texrow, bool moving_arg);
 
        ///
        LyXParagraph * TeXEnvironment(std::ostream &, TexRow & texrow,
@@ -414,8 +417,6 @@ public:
        ///
        Inset const * GetInset(size_type pos) const;
        ///
-       Inset * ReturnNextInsetPointer(size_type & pos);
-       ///
        void OpenFootnote(size_type pos);
        ///
        void CloseFootnote(size_type pos);
@@ -522,6 +523,8 @@ private:
                InsetTable(size_type p, Inset * i) { pos = p; inset = i;}
        };
        ///
+       friend struct matchIT;
+       ///
        struct matchIT {
                /// used by lower_bound
                inline
@@ -588,6 +591,7 @@ private:
                             LyXLayout const & style);
        ///
        void SimpleTeXSpecialChars(std::ostream &, TexRow & texrow,
+                                  bool moving_arg,
                                   LyXFont & font, LyXFont & running_font,
                                   LyXFont & basefont, bool & open_font,
                                   LyXLayout const & style,
@@ -597,6 +601,37 @@ private:
        unsigned int id_;
        ///
        static unsigned int paragraph_id;
+public:
+       class inset_iterator {
+       public:
+               inset_iterator() {}
+               inset_iterator(InsetList::iterator const & iter) : it(iter) {};
+               inset_iterator & operator++() {
+                       ++it;
+                       return *this;
+               }
+               Inset * operator*() { return (*it).inset; }
+               size_type getPos() {return (*it).pos; }
+               bool operator==(inset_iterator const & iter) const {
+                       return it == iter.it;
+               }
+               bool operator!=(inset_iterator const & iter) const {
+                       return it != iter.it;
+               }
+       private:
+               InsetList::iterator it;
+       };
+       ///
+       inset_iterator inset_iterator_begin() {
+               return inset_iterator(insetlist.begin());
+       }
+       ///
+       inset_iterator inset_iterator_end() {
+               return inset_iterator(insetlist.end());
+       }
+       ///
+       inset_iterator InsetIterator(size_type pos);
+
 };
 
 #endif