1 #ifndef __DW_FINDTEXT_STATE_H__
2 #define __DW_FINDTEXT_STATE_H__
4 #ifndef __INCLUDED_FROM_DW_CORE_HH__
5 # error Do not include this file directly, use "core.hh" instead.
62 static const char*
rev(
const char* _str);
64 static int *
createNexttab (
const char *needle,
bool caseSens,
bool backwards);
66 bool search0 (
bool backwards,
bool firstTrial);
68 inline static bool charsEqual (
char c1,
char c2,
bool caseSens)
69 {
return caseSens ? c1 == c2 : tolower (c1) == tolower (c2) ||
70 (isspace (c1) && isspace (c2)); }
77 Result search (
const char *key,
bool caseSens,
bool backwards);
84 #endif // __DW_FINDTEXT_STATE_H__
~FindtextState()
Definition: findtext.cc:40
bool unhighlight()
Unhighlight, and return whether a region was highlighted.
Definition: findtext.cc:207
bool search0(bool backwards, bool firstTrial)
Definition: findtext.cc:224
bool caseSens
Whether the last search was case sensitive.
Definition: findtext.hh:40
CharIterator * hlIterator
The position from where the characters are highlighted.
Definition: findtext.hh:60
static int * createNexttab(const char *needle, bool caseSens, bool backwards)
Definition: findtext.cc:176
CharIterator * iterator
The position from where the next search will start.
Definition: findtext.hh:53
Result search(const char *key, bool caseSens, bool backwards)
Definition: findtext.cc:74
static const char * rev(const char *_str)
Definition: findtext.cc:162
static bool charsEqual(char c1, char c2, bool caseSens)
Definition: findtext.hh:68
The next occurrence of the pattern has been found.
Definition: findtext.hh:18
Widget * widget
The top of the widget tree, in which the search is done.
Definition: findtext.hh:50
int * nexttab
The table used for KMP search.
Definition: findtext.hh:43
FindtextState()
Definition: findtext.cc:29
void resetSearch()
This method is called when the user closes the "find text" dialog.
Definition: findtext.cc:150
Definition: findtext.hh:13
void setWidget(Widget *widget)
Definition: findtext.cc:54
char * key
The key used for the last search.
Definition: findtext.hh:37
The patten does not at all occur in the text.
Definition: findtext.hh:27
Result
Definition: findtext.hh:16
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
There is no further occurrence of the pattern, instead, the first occurrence has been selected...
Definition: findtext.hh:24
Definition: iterator.hh:230