]> git.lyx.org Git - lyx.git/blob - src/lyxfind.h
Fixed some lines that were too long. It compiled afterwards.
[lyx.git] / src / lyxfind.h
1 // -*- C++ -*-
2 /**
3  * \file lyxfind.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author John Levon
9  * \author Jürgen Vigna
10  * \author Alfredo Braunstein
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef LYXFIND_H
16 #define LYXFIND_H
17
18 #include "support/docstring.h"
19
20 namespace lyx {
21
22 class BufferView;
23 class FuncRequest;
24 class Text;
25
26 /** Encode the parameters needed to find \c search as a string
27  *  that can be dispatched to the LyX core in a FuncRequest wrapper.
28  */
29 docstring const find2string(docstring const & search,
30                               bool casesensitive,
31                               bool matchword,
32                               bool forward);
33
34 /** Encode the parameters needed to replace \c search with \c replace
35  *  as a string that can be dispatched to the LyX core in a FuncRequest
36  *  wrapper.
37  */
38 docstring const replace2string(docstring const & search,
39                                  docstring const & replace,
40                                  bool casesensitive,
41                                  bool matchword,
42                                  bool all,
43                                  bool forward);
44
45 /** Parse the string encoding of the find request that is found in
46  *  \c ev.argument and act on it.
47  * The string is encoded by \c find2string.
48  */
49 void find(BufferView * bv, FuncRequest const & ev);
50
51 /** Parse the string encoding of the replace request that is found in
52  *  \c ev.argument and act on it.
53  * The string is encoded by \c replace2string.
54  */
55 void replace(BufferView * bv, FuncRequest const &, bool has_deleted = false);
56
57 /// find the next change in the buffer
58 bool findNextChange(BufferView * bv);
59
60 } // namespace lyx
61
62 #endif // LYXFIND_H