X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfind.h;h=711bf8ee25aeae8ffc84ed7b336f096c1b61f8fd;hb=b8550d11e836e857967a31250e6ca248b2d43f82;hp=7da80af65c131b5a3899df18ab4f086f5d3e10ac;hpb=82883a05f4280cc4509dcf44266a7b3fd95a0ed0;p=lyx.git diff --git a/src/lyxfind.h b/src/lyxfind.h index 7da80af65c..711bf8ee25 100644 --- a/src/lyxfind.h +++ b/src/lyxfind.h @@ -43,8 +43,8 @@ docstring const find2string(docstring const & search, * as a string that can be dispatched to the LyX core in a FuncRequest * wrapper. */ -docstring const replace2string(docstring const & search, - docstring const & replace, +docstring const replace2string(docstring const & replace, + docstring const & search, bool casesensitive, bool matchword, bool all, @@ -66,11 +66,24 @@ void replace(BufferView * bv, FuncRequest const &, bool has_deleted = false); /// find the next change in the buffer bool findNextChange(BufferView * bv); +/// find the previous change in the buffer +bool findPreviousChange(BufferView * bv); + +/// find the change in the buffer +/// \param next true to find the next change, otherwise the previous +bool findChange(BufferView * bv, bool next); + // Hopefully, nobody will ever replace with something like this #define LYX_FR_NULL_STRING "__LYX__F&R__NULL__STRING__" class FindAndReplaceOptions { public: + typedef enum { + S_BUFFER, + S_DOCUMENT, + S_OPEN_BUFFERS, + S_ALL_MANUALS + } SearchScope; FindAndReplaceOptions( docstring const & search, bool casesensitive, @@ -79,7 +92,9 @@ public: bool expandmacros, bool ignoreformat, bool regexp, - docstring const & replace + docstring const & replace, + bool keep_case, + SearchScope scope = S_BUFFER ); FindAndReplaceOptions() { } docstring search; @@ -90,6 +105,8 @@ public: bool ignoreformat; bool regexp; docstring replace; + bool keep_case; + SearchScope scope; }; /// Write a FindAdvOptions instance to a stringstream @@ -98,9 +115,6 @@ std::ostringstream & operator<<(std::ostringstream & os, lyx::FindAndReplaceOpti /// Read a FindAdvOptions instance from a stringstream std::istringstream & operator>>(std::istringstream & is, lyx::FindAndReplaceOptions & opt); -/// Dispatch a LFUN_WORD_FINDADV command request -void findAdv(BufferView * bv, FuncRequest const & ev); - /// Perform a FindAdv operation. bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt);