X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5bb85a0a4f28df1b966481de9a320806bbb1471..279ababf7baa0655a58074b868da222db7cc5a4b:/include/wx/html/helpdata.h diff --git a/include/wx/html/helpdata.h b/include/wx/html/helpdata.h index 02214510c9..906d12b13b 100644 --- a/include/wx/html/helpdata.h +++ b/include/wx/html/helpdata.h @@ -24,6 +24,7 @@ #include "wx/string.h" #include "wx/filesys.h" #include "wx/dynarray.h" +#include "wx/font.h" //-------------------------------------------------------------------------------- // helper classes & structs @@ -69,8 +70,8 @@ typedef struct { short int m_Level; int m_ID; - char* m_Name; - char* m_Page; + wxChar* m_Name; + wxChar* m_Page; wxHtmlBookRecord *m_Book; } wxHtmlContentsItem; @@ -82,21 +83,22 @@ wxHtmlContentsItem; //------------------------------------------------------------------------------ class WXDLLEXPORT wxSearchEngine : public wxObject { - private: - char *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 +113,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; } @@ -122,14 +125,14 @@ class WXDLLEXPORT wxHtmlSearchStatus private: wxHtmlHelpData* m_Data; wxSearchEngine m_Engine; - wxString m_Keyword, m_Name, m_LastPage; + wxString m_Keyword, m_Name; + wxChar *m_LastPage; wxHtmlContentsItem* m_ContentsItem; - bool m_Active; // search is not finished + bool m_Active; // search is not finished int m_CurIndex; // where we are now int m_MaxIndex; // number of files we search // For progress bar: 100*curindex/maxindex = % complete -} -; +}; class WXDLLEXPORT wxHtmlHelpData : public wxObject { @@ -150,7 +153,9 @@ class WXDLLEXPORT wxHtmlHelpData : public wxObject // Adds new book. 'book' is location of .htb file (stands for "html book"). // See documentation for details on its format. // Returns success. - bool AddBookParam(const wxString& title, const wxString& contfile, + bool AddBookParam(const wxFSFile& bookfile, + wxFontEncoding encoding, + const wxString& title, const wxString& contfile, const wxString& indexfile = wxEmptyString, const wxString& deftopic = wxEmptyString, const wxString& path = wxEmptyString); @@ -187,8 +192,7 @@ class WXDLLEXPORT wxHtmlHelpData : public wxObject // Reads binary book bool SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f); // Writes binary book -} -; +}; #endif