]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.h
Add a Buffer::fully_loaded member function, returning true only when
[lyx.git] / src / lyxfind.h
index f86b8dec851bc2c29a3823f4aa6d202e38adc0db..488804763862df2f9aa79b13c48ffae121079ae2 100644 (file)
@@ -1,17 +1,28 @@
 // -*- C++ -*-
+/**
+ * \file lyxfind.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ * \author John Levon
+ * \author Jürgen Vigna
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #ifndef LYXFIND_H
 #define LYXFIND_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
+#include "support/types.h"
 
-#include "LString.h"
+#include <string>
 
 class BufferView;
 class LyXText;
 
-namespace lyxfind {
+namespace lyx {
+namespace find {
 
 enum SearchResult {
        //
@@ -23,8 +34,8 @@ enum SearchResult {
 };
 
 
-int LyXReplace(BufferView * bv,
-              string const &, string const &,
+int replace(BufferView * bv,
+              std::string const &, std::string const &,
               bool, bool = true, bool = false,
               bool = false, bool = false);
 
@@ -33,8 +44,8 @@ int LyXReplace(BufferView * bv,
  * text from the actual cursor position in whatever direction
  * we want to go. This does also update the screen.
  */
-bool LyXFind(BufferView *,
-            string const & searchstr, bool forward,
+bool find(BufferView *,
+            std::string const & searchstr, bool forward,
             bool casesens = true, bool matchwrd = false);
 
 /**
@@ -45,9 +56,18 @@ bool LyXFind(BufferView *,
  * returning to the calling function.
  */
 
-SearchResult LyXFind(BufferView *, LyXText * text,
-                    string const & searchstr, bool forward,
+SearchResult find(BufferView *, LyXText * text,
+                    std::string const & searchstr, bool forward,
                     bool casesens = true, bool matchwrd = false);
 
-} // end namespace LyXFind
-#endif
+/// find the next change in the buffer
+bool findNextChange(BufferView * bv);
+
+SearchResult findNextChange(BufferView * bv, LyXText * text, lyx::pos_type & length);
+
+SearchResult nextChange(BufferView * bv, LyXText * text, lyx::pos_type & length);
+
+} // namespace find
+} // namespace lyx
+
+#endif // LYXFIND_H