X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff42dd66503f732fcb1d4fac60240a62ec2f7628..94bc8b14d4f74c5bb831b0eca20a45c751fbb5fe:/wxPython/src/htmlhelp.i diff --git a/wxPython/src/htmlhelp.i b/wxPython/src/htmlhelp.i index 871da59588..b74d65fb9f 100644 --- a/wxPython/src/htmlhelp.i +++ b/wxPython/src/htmlhelp.i @@ -14,7 +14,7 @@ %module htmlhelp %{ -#include "export.h" +#include "wxPython.h" #include #include #include @@ -23,6 +23,11 @@ #include %} +//--------------------------------------------------------------------------- +%{ + // Put some wx default wxChar* values into wxStrings. + static const wxString wxPyEmptyString(wxT("")); +%} //--------------------------------------------------------------------------- %include typemaps.i @@ -42,7 +47,7 @@ //--------------------------------------------------------------------------- -class wxHtmlBookRecord : public wxObject { +class wxHtmlBookRecord { public: wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath, const wxString& title, const wxString& start); @@ -67,11 +72,13 @@ public: struct wxHtmlContentsItem { - short int m_Level; - int m_ID; - char* m_Name; - char* m_Page; - wxHtmlBookRecord *m_Book; + %addmethods { + 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; } + } }; //--------------------------------------------------------------------------- @@ -80,7 +87,7 @@ class wxHtmlSearchStatus { public: //wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword, - // const wxString& book = wxEmptyString); + // const wxString& book = wxPyEmptyString); bool Search(); bool IsActive(); int GetCurIndex(); @@ -99,9 +106,9 @@ public: void SetTempDir(const wxString& path); bool AddBook(const wxString& book); // bool AddBookParam(const wxString& title, const wxString& contfile, -// const wxString& indexfile=wxEmptyString, -// const wxString& deftopic=wxEmptyString, -// const wxString& path=wxEmptyString); +// const wxString& indexfile=wxPyEmptyString, +// const wxString& deftopic=wxPyEmptyString, +// const wxString& path=wxPyEmptyString); wxString FindPageByName(const wxString& page); wxString FindPageById(int id); @@ -120,7 +127,7 @@ public: class wxHtmlHelpFrame : public wxFrame { public: wxHtmlHelpFrame(wxWindow* parent, int wxWindowID, - const wxString& title = wxEmptyString, + const wxString& title = wxPyEmptyString, int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" @@ -132,9 +139,9 @@ public: void DisplayContents(); void DisplayIndex(); bool KeywordSearch(const wxString& keyword); - void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString); - void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString); - void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString); + void UseConfig(wxConfigBase *config, const wxString& rootpath = wxPyEmptyString); + void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString); + void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString); }; @@ -169,9 +176,9 @@ public: void DisplayContents(); void DisplayIndex(); bool KeywordSearch(const wxString& keyword); - void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString); - void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString); - void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString); + void UseConfig(wxConfigBase *config, const wxString& rootpath = wxPyEmptyString); + void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString); + void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString); wxHtmlHelpFrame* GetFrame(); };