static int * createNexttab(const char *needle, bool caseSens, bool backwards)
CharIterator * hlIterator
The position from where the characters are highlighted.
int * nexttab
The table used for KMP search.
void resetSearch()
This method is called when the user closes the "find text" dialog.
bool search0(bool backwards, bool firstTrial)
@ SUCCESS
The next occurrence of the pattern has been found.
@ NOT_FOUND
The patten does not at all occur in the text.
@ RESTART
There is no further occurrence of the pattern, instead, the first occurrence has been selected.
Result search(const char *key, bool caseSens, bool backwards)
CharIterator * iterator
The position from where the next search will start.
bool unhighlight()
Unhighlight, and return whether a region was highlighted.
static bool charsEqual(char c1, char c2, bool caseSens)
static const char * rev(const char *_str)
char * key
The key used for the last search.
bool caseSens
Whether the last search was case sensitive.
void setWidget(Widget *widget)
Widget * widget
The top of the widget tree, in which the search is done.