]> git.lyx.org Git - lyx.git/blob - src/lyxfind.h
fix compilation; remove cruft in configure script (I may have removed too much, but...
[lyx.git] / src / lyxfind.h
1 // -*- C++ -*-
2 #ifndef LYXFIND_H
3 #define LYXFIND_H
4
5 #ifdef __GNUG__
6 #pragma interface
7 #endif
8
9 #include "LString.h"
10 #include "paragraph.h"
11
12 class BufferView;
13
14 namespace lyxfind {
15
16 enum SearchResult {
17         //
18         SR_NOT_FOUND = 0,
19         //
20         SR_FOUND,
21         //
22         SR_FOUND_NOUPDATE
23 };
24
25
26 int LyXReplace(BufferView * bv,
27                string const &, string const &,
28                bool, bool = true, bool = false,
29                bool = false, bool = false);
30
31 /**
32  * This function is called as a general interface to find some
33  * text from the actual cursor position in whatever direction
34  * we want to go. This does also update the screen.
35  */
36 bool LyXFind(BufferView *,
37              string const & searchstr, bool forward,
38              bool casesens = true, bool matchwrd = false);
39
40 /**
41  * This function does search from the cursor position inside the
42  * passed LyXText parameter and regards this LyXText as the root
43  * LyXText. It will NOT update any screen stuff. It will however
44  * set the cursor to the new position inside LyXText, before
45  * returning to the calling function.
46  */
47
48 SearchResult LyXFind(BufferView *, LyXText * text,
49                      string const & searchstr, bool forward,
50                      bool casesens = true, bool matchwrd = false);
51
52 } // end namespace LyXFind
53 #endif