]> git.lyx.org Git - lyx.git/blobdiff - src/InsetList.h
This comment is wrong and causes bug in revision control.
[lyx.git] / src / InsetList.h
index aa99aeb4af047cab255f1475c08cea422499376d..2664a87d17b81cf2fe34a60d8d86e28d97f06780 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef INSET_LIST_H
 #define INSET_LIST_H
 
+#include "insets/InsetCode.h"
+
 #include "support/types.h"
 
 #include <vector>
@@ -25,6 +27,11 @@ class Buffer;
 ///
 class InsetList {
 public:
+       ///
+       InsetList() {}
+       ///
+       InsetList(InsetList const &);
+
        ///
        class InsetTable {
        public:
@@ -71,10 +78,20 @@ public:
        ///
        void decreasePosAfterPos(pos_type pos);
 
-       /// replicate ourselves.
-       /// Warning: this should be used with care, only
-       /// Paragraph::Pimpl should use it actually.
-       void clone();
+       /// search for next occurence of an \c Inset type.
+       /// \return the position of the found inset.
+       /// \retval -1 if no \c Inset is found.
+       pos_type find(
+               InsetCode code, ///< Code of inset to find.
+               pos_type startpos = 0 ///< start position for the search.
+               ) const;
+
+       /// count occurences of of an \c Inset type.
+       /// \return the number of found inset(s).
+       int count(
+               InsetCode code, ///< Code of inset type to count.
+               pos_type startpos = 0 ///< start position for the counting.
+               ) const;
 
 private:
        ///