X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfind.h;h=6301ab5b7418340f59eec33e7072b22aa85a412f;hb=b7406da7f0326fbd895c700ad5ded4cc5112094f;hp=8a82caac878c06251190ea40caf07f6f871aa56f;hpb=70d0ba900118ac7e253c1e1969fd7a3d64ec8e03;p=lyx.git diff --git a/src/lyxfind.h b/src/lyxfind.h index 8a82caac87..6301ab5b74 100644 --- a/src/lyxfind.h +++ b/src/lyxfind.h @@ -15,21 +15,18 @@ #ifndef LYXFIND_H #define LYXFIND_H -#include "support/types.h" +#include "support/strfwd.h" -#include +namespace lyx { class BufferView; class FuncRequest; -class LyXText; - -namespace lyx { -namespace find { +class Text; /** Encode the parameters needed to find \c search as a string * that can be dispatched to the LyX core in a FuncRequest wrapper. */ -std::string const find2string(std::string const & search, +docstring const find2string(docstring const & search, bool casesensitive, bool matchword, bool forward); @@ -38,8 +35,8 @@ std::string const find2string(std::string const & search, * as a string that can be dispatched to the LyX core in a FuncRequest * wrapper. */ -std::string const replace2string(std::string const & search, - std::string const & replace, +docstring const replace2string(docstring const & search, + docstring const & replace, bool casesensitive, bool matchword, bool all, @@ -48,19 +45,19 @@ std::string const replace2string(std::string const & search, /** Parse the string encoding of the find request that is found in * \c ev.argument and act on it. * The string is encoded by \c find2string. + * \return true if the string was found. */ -void find(BufferView * bv, FuncRequest const & ev); +bool find(BufferView * bv, FuncRequest const & ev); /** Parse the string encoding of the replace request that is found in * \c ev.argument and act on it. * The string is encoded by \c replace2string. */ -void replace(BufferView * bv, FuncRequest const &); +void replace(BufferView * bv, FuncRequest const &, bool has_deleted = false); /// find the next change in the buffer bool findNextChange(BufferView * bv); -} // namespace find } // namespace lyx #endif // LYXFIND_H