+struct wxHtmlContentsItem
+{
+ %extend {
+ int GetLevel() { return self->m_Level; }
+ int GetID() { return self->m_ID; }
+ wxString GetName() { return self->m_Name; }
+ wxString GetPage() { return self->m_Page; }
+ wxHtmlBookRecord* GetBook() { return self->m_Book; }
+ }
+};
+
+//---------------------------------------------------------------------------
+
+class wxHtmlSearchStatus
+{
+public:
+ //wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword,
+ // const wxString& book = wxPyEmptyString);
+ bool Search();
+ bool IsActive();
+ int GetCurIndex();
+ int GetMaxIndex();
+ const wxString& GetName();
+ wxHtmlContentsItem* GetContentsItem();
+};
+
+//---------------------------------------------------------------------------
+
+class wxHtmlHelpData {
+public:
+ wxHtmlHelpData();
+ ~wxHtmlHelpData();
+
+ void SetTempDir(const wxString& path);
+ bool AddBook(const wxString& book);
+// bool AddBookParam(const wxString& title, const wxString& contfile,
+// const wxString& indexfile=wxPyEmptyString,
+// const wxString& deftopic=wxPyEmptyString,
+// const wxString& path=wxPyEmptyString);
+
+ wxString FindPageByName(const wxString& page);
+ wxString FindPageById(int id);
+
+ // TODO: this one needs fixed...
+ const wxHtmlBookRecArray& GetBookRecArray();
+
+ wxHtmlContentsItem* GetContents();
+ int GetContentsCnt();
+ wxHtmlContentsItem* GetIndex();
+ int GetIndexCnt();
+};
+
+//---------------------------------------------------------------------------
+
+class wxHtmlHelpFrame : public wxFrame {
+public:
+ %addtofunc wxHtmlHelpFrame "self._setOORInfo(self)"
+
+ wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
+ const wxString& title = wxPyEmptyString,
+ int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL);
+
+ wxHtmlHelpData* GetData();
+ void SetTitleFormat(const wxString& format);
+ void Display(const wxString& x);
+ %name(DisplayID) void Display(int id);
+ void DisplayContents();
+ void DisplayIndex();
+ bool KeywordSearch(const wxString& keyword);
+ void UseConfig(wxConfigBase *config, const wxString& rootpath = wxPyEmptyString);
+ void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
+ void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
+};
+
+
+//---------------------------------------------------------------------------
+
+
+enum {
+ wxHF_TOOLBAR,
+ wxHF_FLATTOOLBAR,
+ wxHF_CONTENTS,
+ wxHF_INDEX,
+ wxHF_SEARCH,
+ wxHF_BOOKMARKS,
+ wxHF_OPENFILES,
+ wxHF_PRINT,
+ wxHF_DEFAULTSTYLE,
+};
+
+
+class wxHtmlHelpController : public wxEvtHandler {
+public:
+ %addtofunc wxHtmlHelpController "self._setOORInfo(self)"
+
+ wxHtmlHelpController(int style = wxHF_DEFAULTSTYLE);
+ ~wxHtmlHelpController();
+
+ void SetTitleFormat(const wxString& format);
+ void SetTempDir(const wxString& path);
+ bool AddBook(const wxString& book, int show_wait_msg = False);
+ void Display(const wxString& x);
+ %name(DisplayID) void Display(int id);
+ void DisplayContents();
+ void DisplayIndex();
+ bool KeywordSearch(const wxString& keyword);
+ void UseConfig(wxConfigBase *config, const wxString& rootpath = wxPyEmptyString);
+ void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
+ void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
+ wxHtmlHelpFrame* GetFrame();
+};
+
+
+
+
+//---------------------------------------------------------------------------
+%init %{
+ wxPyPtrTypeMap_Add("wxHtmlTagHandler", "wxPyHtmlTagHandler");