aboutsummaryrefslogtreecommitdiff
path: root/dw/findtext.hh
diff options
context:
space:
mode:
authorJoão Ricardo Lourenço <jorl17.8@gmail.com>2009-02-08 16:58:29 -0300
committerJoão Ricardo Lourenço <jorl17.8@gmail.com>2009-02-08 16:58:29 -0300
commit31d9389f4d4eed8d3eb4e6f77148fb6ec0c0a37f (patch)
tree72289bd30fb46650217daecb87c396e851e8dc7a /dw/findtext.hh
parent4e417d3988cff4143da06f438fcd39cb228ed1f9 (diff)
Implemented "search previous" in string searches
Diffstat (limited to 'dw/findtext.hh')
-rw-r--r--dw/findtext.hh10
1 files changed, 6 insertions, 4 deletions
diff --git a/dw/findtext.hh b/dw/findtext.hh
index e9fb57c2..83d22bd3 100644
--- a/dw/findtext.hh
+++ b/dw/findtext.hh
@@ -58,10 +58,12 @@ private:
* NULL, when no text is highlighted.
*/
CharIterator *hlIterator;
-
- static int *createNexttab (const char *key, bool caseSens);
+
+ static const char* rev(const char* _str); /* Function to reverse a C-string */
+
+ static int *createNexttab (const char *needle, bool caseSens, bool backwards);
bool unhighlight ();
- bool search0 ();
+ bool search0 (bool backwards, bool firstTrial);
inline static bool charsEqual (char c1, char c2, bool caseSens)
{ return caseSens ? c1 == c2 : tolower (c1) == tolower (c2) ||
@@ -72,7 +74,7 @@ public:
~FindtextState ();
void setWidget (Widget *widget);
- Result search (const char *key, bool caseSens);
+ Result search (const char *key, bool caseSens, bool backwards);
void resetSearch ();
};