added case sensitive and whole words only search

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2000-01-16 15:53:25 +00:00
parent b4b58c41d2
commit c497114770
4 changed files with 70 additions and 23 deletions

View File

@@ -82,21 +82,22 @@ wxHtmlContentsItem;
//------------------------------------------------------------------------------
class WXDLLEXPORT wxSearchEngine : public wxObject
{
private:
wxChar *m_Keyword;
public:
wxSearchEngine() : wxObject() {m_Keyword = NULL; }
~wxSearchEngine() {if (m_Keyword) free(m_Keyword); }
virtual void LookFor(const wxString& keyword);
virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only);
// Sets the keyword we will be searching for
virtual bool Scan(wxInputStream *stream);
// Scans the stream for the keyword.
// Returns TRUE if the stream contains keyword, fALSE otherwise
}
;
private:
wxChar *m_Keyword;
bool m_CaseSensitive;
bool m_WholeWords;
};
class wxHtmlHelpData;
@@ -111,6 +112,7 @@ class WXDLLEXPORT wxHtmlSearchStatus
// title of the book to search. By default, all books are searched.
wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword,
bool case_sensitive, bool whole_words_only,
const wxString& book = wxEmptyString);
bool Search(); // do the next iteration
bool IsActive() { return m_Active; }