]> git.lyx.org Git - lyx.git/blobdiff - src/InsetList.h
* GuiView.cpp:
[lyx.git] / src / InsetList.h
index da168c488a026f9e48161694b16588f1c805e292..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>
@@ -76,6 +78,21 @@ public:
        ///
        void decreasePosAfterPos(pos_type pos);
 
+       /// 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:
        ///
        List list_;