diff --git a/utils/wxPython/modules/html/README b/utils/wxPython/modules/html/README
index 0e3d872102..af1c578849 100644
--- a/utils/wxPython/modules/html/README
+++ b/utils/wxPython/modules/html/README
@@ -9,3 +9,12 @@ html
There's also a python tag handler, see htmlwidget.py for
a demonstration.
+Aug. 31 1999
+ Added wxHtmlHelpController and wxHtmlHelpSystem wrappers
+ wxHtmlHelpSystem is a subclass of the controller, and is still very
+ rough around the edges. The idea is that it gives the python
+ programmer more freedom in the look'n'feel of the html help window.
+ Will be opening up negotiations on the wxwin list to see if
+ the wxHtmlController code can be reorganised in a base and GUI
+ part.
+
diff --git a/utils/wxPython/modules/html/build.cfg b/utils/wxPython/modules/html/build.cfg
index 2fab7d3bbb..0b3bb0cafe 100644
--- a/utils/wxPython/modules/html/build.cfg
+++ b/utils/wxPython/modules/html/build.cfg
@@ -3,4 +3,6 @@
MODULE = 'htmlc'
SWIGFILES = ['html.i', ]
PYFILES = ['htmlhelper.py']
-
+SOURCES = ['helpsys.cpp']
+# include path for htmlhelp's xpm bitmaps
+OTHERCFLAGS = "-I%s/src/html" % (WXDIR,)
diff --git a/utils/wxPython/modules/html/gtk/html.cpp b/utils/wxPython/modules/html/gtk/html.cpp
index bd1a515ce1..7815776f08 100644
--- a/utils/wxPython/modules/html/gtk/html.cpp
+++ b/utils/wxPython/modules/html/gtk/html.cpp
@@ -3,7 +3,7 @@
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
- * Version 1.1 (Build 798)
+ * Version 1.1 (Build 794)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
@@ -58,6 +58,8 @@ extern PyObject *SWIG_newvarlink(void);
#include
#include
#include
+#include
+#include "helpsys.h"
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
@@ -389,7 +391,7 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxHtmlWindow * _result;
wxWindow * _arg0;
- wxWindowID _arg1 = (wxWindowID ) -1;
+ int _arg1 = (int ) -1;
wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxPyDefaultSize;
int _arg4 = (int ) wxHW_SCROLLBAR_AUTO;
@@ -814,7 +816,1397 @@ static PyObject *_wrap_wxHtmlWindow_HistoryClear(PyObject *self, PyObject *args)
return _resultobj;
}
+static void *SwigwxHtmlHelpControllerTowxEvtHandler(void *ptr) {
+ wxHtmlHelpController *src;
+ wxEvtHandler *dest;
+ src = (wxHtmlHelpController *) ptr;
+ dest = (wxEvtHandler *) src;
+ return (void *) dest;
+}
+
+#define new_wxHtmlHelpController() (new wxHtmlHelpController())
+static PyObject *_wrap_new_wxHtmlHelpController(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _result;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,":new_wxHtmlHelpController"))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxHtmlHelpController *)new_wxHtmlHelpController();
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpController_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define delete_wxHtmlHelpController(_swigobj) (delete _swigobj)
+static PyObject *_wrap_delete_wxHtmlHelpController(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:delete_wxHtmlHelpController",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxHtmlHelpController. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ delete_wxHtmlHelpController(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_SetTitleFormat(_swigobj,_swigarg0) (_swigobj->SetTitleFormat(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpController_SetTitleFormat(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpController_SetTitleFormat",&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_SetTitleFormat. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_SetTitleFormat(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_SetTempDir(_swigobj,_swigarg0) (_swigobj->SetTempDir(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpController_SetTempDir(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpController_SetTempDir",&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_SetTempDir. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_SetTempDir(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_AddBook(_swigobj,_swigarg0,_swigarg1) (_swigobj->AddBook(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxHtmlHelpController_AddBook(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ bool _result;
+ wxHtmlHelpController * _arg0;
+ wxString * _arg1;
+ bool _arg2 = (bool ) FALSE;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ int tempbool2 = (int) FALSE;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO|i:wxHtmlHelpController_AddBook",&_argo0,&_obj1,&tempbool2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_AddBook. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+ _arg2 = (bool ) tempbool2;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxHtmlHelpController_AddBook(_arg0,*_arg1,_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_Display(_swigobj,_swigarg0) (_swigobj->Display(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpController_Display(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpController_Display",&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_Display. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_Display(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_DisplayID(_swigobj,_swigarg0) (_swigobj->Display(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpController_DisplayID(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ int _arg1;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"Oi:wxHtmlHelpController_DisplayID",&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_DisplayID. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_DisplayID(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_DisplayContents(_swigobj) (_swigobj->DisplayContents())
+static PyObject *_wrap_wxHtmlHelpController_DisplayContents(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpController_DisplayContents",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_DisplayContents. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_DisplayContents(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_DisplayIndex(_swigobj) (_swigobj->DisplayIndex())
+static PyObject *_wrap_wxHtmlHelpController_DisplayIndex(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpController_DisplayIndex",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_DisplayIndex. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_DisplayIndex(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_KeywordSearch(_swigobj,_swigarg0) (_swigobj->KeywordSearch(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpController_KeywordSearch(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ bool _result;
+ wxHtmlHelpController * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpController_KeywordSearch",&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_KeywordSearch. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxHtmlHelpController_KeywordSearch(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_UseConfig(_swigobj,_swigarg0,_swigarg1) (_swigobj->UseConfig(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxHtmlHelpController_UseConfig(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ wxConfigBase * _arg1;
+ wxString * _arg2 = (wxString *) &wxEmptyString;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ PyObject * _obj2 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO|O:wxHtmlHelpController_UseConfig",&_argo0,&_argo1,&_obj2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_UseConfig. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpController_UseConfig. Expected _wxConfigBase_p.");
+ return NULL;
+ }
+ }
+ if (_obj2)
+{
+ if (!PyString_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_UseConfig(_arg0,_arg1,*_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj2)
+ delete _arg2;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_ReadCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReadCustomization(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxHtmlHelpController_ReadCustomization(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ wxConfigBase * _arg1;
+ wxString * _arg2 = (wxString *) &wxEmptyString;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ PyObject * _obj2 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO|O:wxHtmlHelpController_ReadCustomization",&_argo0,&_argo1,&_obj2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_ReadCustomization. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpController_ReadCustomization. Expected _wxConfigBase_p.");
+ return NULL;
+ }
+ }
+ if (_obj2)
+{
+ if (!PyString_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_ReadCustomization(_arg0,_arg1,*_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj2)
+ delete _arg2;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpController_WriteCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->WriteCustomization(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxHtmlHelpController_WriteCustomization(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpController * _arg0;
+ wxConfigBase * _arg1;
+ wxString * _arg2 = (wxString *) &wxEmptyString;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ PyObject * _obj2 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO|O:wxHtmlHelpController_WriteCustomization",&_argo0,&_argo1,&_obj2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_WriteCustomization. Expected _wxHtmlHelpController_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpController_WriteCustomization. Expected _wxConfigBase_p.");
+ return NULL;
+ }
+ }
+ if (_obj2)
+{
+ if (!PyString_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpController_WriteCustomization(_arg0,_arg1,*_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj2)
+ delete _arg2;
+}
+ return _resultobj;
+}
+
+static void *SwigwxHtmlHelpSystemTowxHtmlHelpController(void *ptr) {
+ wxHtmlHelpSystem *src;
+ wxHtmlHelpController *dest;
+ src = (wxHtmlHelpSystem *) ptr;
+ dest = (wxHtmlHelpController *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxHtmlHelpSystemTowxEvtHandler(void *ptr) {
+ wxHtmlHelpSystem *src;
+ wxEvtHandler *dest;
+ src = (wxHtmlHelpSystem *) ptr;
+ dest = (wxEvtHandler *) src;
+ return (void *) dest;
+}
+
+#define new_wxHtmlHelpSystem() (new wxHtmlHelpSystem())
+static PyObject *_wrap_new_wxHtmlHelpSystem(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _result;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,":new_wxHtmlHelpSystem"))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxHtmlHelpSystem *)new_wxHtmlHelpSystem();
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpSystem_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define delete_wxHtmlHelpSystem(_swigobj) (delete _swigobj)
+static PyObject *_wrap_delete_wxHtmlHelpSystem(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:delete_wxHtmlHelpSystem",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxHtmlHelpSystem. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ delete_wxHtmlHelpSystem(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_AddBookParam(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->AddBookParam(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
+static PyObject *_wrap_wxHtmlHelpSystem_AddBookParam(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ bool _result;
+ wxHtmlHelpSystem * _arg0;
+ wxString * _arg1;
+ wxString * _arg2;
+ wxString * _arg3 = (wxString *) &wxEmptyString;
+ wxString * _arg4 = (wxString *) &wxEmptyString;
+ wxString * _arg5 = (wxString *) &wxEmptyString;
+ bool _arg6 = (bool ) FALSE;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ PyObject * _obj2 = 0;
+ PyObject * _obj3 = 0;
+ PyObject * _obj4 = 0;
+ PyObject * _obj5 = 0;
+ int tempbool6 = (int) FALSE;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OOO|OOOi:wxHtmlHelpSystem_AddBookParam",&_argo0,&_obj1,&_obj2,&_obj3,&_obj4,&_obj5,&tempbool6))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_AddBookParam. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+{
+ if (!PyString_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+}
+ if (_obj3)
+{
+ if (!PyString_Check(_obj3)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3));
+}
+ if (_obj4)
+{
+ if (!PyString_Check(_obj4)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4));
+}
+ if (_obj5)
+{
+ if (!PyString_Check(_obj5)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg5 = new wxString(PyString_AsString(_obj5), PyString_Size(_obj5));
+}
+ _arg6 = (bool ) tempbool6;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxHtmlHelpSystem_AddBookParam(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,*_arg5,_arg6);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj1)
+ delete _arg1;
+}
+{
+ if (_obj2)
+ delete _arg2;
+}
+{
+ if (_obj3)
+ delete _arg3;
+}
+{
+ if (_obj4)
+ delete _arg4;
+}
+{
+ if (_obj5)
+ delete _arg5;
+}
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_CreateToolBar(_swigobj,_swigarg0) (_swigobj->CreateToolBar(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_CreateToolBar(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxToolBar * _result;
+ wxHtmlHelpSystem * _arg0;
+ wxFrame * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_CreateToolBar",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_CreateToolBar. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFrame_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_CreateToolBar. Expected _wxFrame_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxToolBar *)wxHtmlHelpSystem_CreateToolBar(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBar_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_CreateContentsTree(_swigobj,_swigarg0) (_swigobj->CreateContentsTree(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_CreateContentsTree(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxTreeCtrl * _result;
+ wxHtmlHelpSystem * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_CreateContentsTree",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_CreateContentsTree. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_CreateContentsTree. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxTreeCtrl *)wxHtmlHelpSystem_CreateContentsTree(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_CreateIndexList(_swigobj,_swigarg0) (_swigobj->CreateIndexList(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_CreateIndexList(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxListBox * _result;
+ wxHtmlHelpSystem * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_CreateIndexList",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_CreateIndexList. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_CreateIndexList. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxListBox *)wxHtmlHelpSystem_CreateIndexList(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_CreateHelpWindow(_swigobj) (_swigobj->CreateHelpWindow())
+static PyObject *_wrap_wxHtmlHelpSystem_CreateHelpWindow(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_CreateHelpWindow",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_CreateHelpWindow. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_CreateHelpWindow(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_SetControls(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetControls(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
+static PyObject *_wrap_wxHtmlHelpSystem_SetControls(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ wxFrame * _arg1;
+ wxHtmlWindow * _arg2;
+ wxTreeCtrl * _arg3 = (wxTreeCtrl *) NULL;
+ wxListBox * _arg4 = (wxListBox *) NULL;
+ wxListBox * _arg5 = (wxListBox *) NULL;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ PyObject * _argo2 = 0;
+ PyObject * _argo3 = 0;
+ PyObject * _argo4 = 0;
+ PyObject * _argo5 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OOO|OOO:wxHtmlHelpSystem_SetControls",&_argo0,&_argo1,&_argo2,&_argo3,&_argo4,&_argo5))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_SetControls. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFrame_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_SetControls. Expected _wxFrame_p.");
+ return NULL;
+ }
+ }
+ if (_argo2) {
+ if (_argo2 == Py_None) { _arg2 = NULL; }
+ else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxHtmlWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxHtmlHelpSystem_SetControls. Expected _wxHtmlWindow_p.");
+ return NULL;
+ }
+ }
+ if (_argo3) {
+ if (_argo3 == Py_None) { _arg3 = NULL; }
+ else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxTreeCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxHtmlHelpSystem_SetControls. Expected _wxTreeCtrl_p.");
+ return NULL;
+ }
+ }
+ if (_argo4) {
+ if (_argo4 == Py_None) { _arg4 = NULL; }
+ else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxListBox_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxHtmlHelpSystem_SetControls. Expected _wxListBox_p.");
+ return NULL;
+ }
+ }
+ if (_argo5) {
+ if (_argo5 == Py_None) { _arg5 = NULL; }
+ else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxListBox_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxHtmlHelpSystem_SetControls. Expected _wxListBox_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_SetControls(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_GetFrame(_swigobj) (_swigobj->GetFrame())
+static PyObject *_wrap_wxHtmlHelpSystem_GetFrame(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxFrame * _result;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_GetFrame",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_GetFrame. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxFrame *)wxHtmlHelpSystem_GetFrame(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_GetHtmlWindow(_swigobj) (_swigobj->GetHtmlWindow())
+static PyObject *_wrap_wxHtmlHelpSystem_GetHtmlWindow(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlWindow * _result;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_GetHtmlWindow",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_GetHtmlWindow. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxHtmlWindow *)wxHtmlHelpSystem_GetHtmlWindow(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlWindow_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_GetContentsTree(_swigobj) (_swigobj->GetContentsTree())
+static PyObject *_wrap_wxHtmlHelpSystem_GetContentsTree(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxTreeCtrl * _result;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_GetContentsTree",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_GetContentsTree. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxTreeCtrl *)wxHtmlHelpSystem_GetContentsTree(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_GetIndexList(_swigobj) (_swigobj->GetIndexList())
+static PyObject *_wrap_wxHtmlHelpSystem_GetIndexList(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxListBox * _result;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_GetIndexList",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_GetIndexList. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxListBox *)wxHtmlHelpSystem_GetIndexList(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_GetSearchList(_swigobj) (_swigobj->GetSearchList())
+static PyObject *_wrap_wxHtmlHelpSystem_GetSearchList(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxListBox * _result;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_GetSearchList",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_GetSearchList. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxListBox *)wxHtmlHelpSystem_GetSearchList(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_GetContentsImageList(_swigobj) (_swigobj->GetContentsImageList())
+static PyObject *_wrap_wxHtmlHelpSystem_GetContentsImageList(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxImageList * _result;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_GetContentsImageList",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_GetContentsImageList. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxImageList *)wxHtmlHelpSystem_GetContentsImageList(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_OnToolbar(_swigobj,_swigarg0) (_swigobj->OnToolbar(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_OnToolbar(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ wxCommandEvent * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_OnToolbar",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_OnToolbar. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_OnToolbar. Expected _wxCommandEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_OnToolbar(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_OnContentsSel(_swigobj,_swigarg0) (_swigobj->OnContentsSel(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_OnContentsSel(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ wxTreeEvent * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_OnContentsSel",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_OnContentsSel. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_OnContentsSel. Expected _wxTreeEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_OnContentsSel(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_OnIndexSel(_swigobj,_swigarg0) (_swigobj->OnIndexSel(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_OnIndexSel(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ wxCommandEvent * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_OnIndexSel",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_OnIndexSel. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_OnIndexSel. Expected _wxCommandEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_OnIndexSel(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_OnSearchSel(_swigobj,_swigarg0) (_swigobj->OnSearchSel(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_OnSearchSel(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ wxCommandEvent * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_OnSearchSel",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_OnSearchSel. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_OnSearchSel. Expected _wxCommandEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_OnSearchSel(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_OnSearch(_swigobj,_swigarg0) (_swigobj->OnSearch(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_OnSearch(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ wxCommandEvent * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_OnSearch",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_OnSearch. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_OnSearch. Expected _wxCommandEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_OnSearch(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_OnCloseWindow(_swigobj,_swigarg0) (_swigobj->OnCloseWindow(_swigarg0))
+static PyObject *_wrap_wxHtmlHelpSystem_OnCloseWindow(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ wxCloseEvent * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"OO:wxHtmlHelpSystem_OnCloseWindow",&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_OnCloseWindow. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCloseEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpSystem_OnCloseWindow. Expected _wxCloseEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_OnCloseWindow(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_RefreshLists(_swigobj) (_swigobj->RefreshLists())
+static PyObject *_wrap_wxHtmlHelpSystem_RefreshLists(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_RefreshLists",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_RefreshLists. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_RefreshLists(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_CreateContents(_swigobj) (_swigobj->CreateContents())
+static PyObject *_wrap_wxHtmlHelpSystem_CreateContents(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_CreateContents",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_CreateContents. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_CreateContents(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxHtmlHelpSystem_CreateIndex(_swigobj) (_swigobj->CreateIndex())
+static PyObject *_wrap_wxHtmlHelpSystem_CreateIndex(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxHtmlHelpSystem * _arg0;
+ PyObject * _argo0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"O:wxHtmlHelpSystem_CreateIndex",&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpSystem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpSystem_CreateIndex. Expected _wxHtmlHelpSystem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxHtmlHelpSystem_CreateIndex(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static PyMethodDef htmlcMethods[] = {
+ { "wxHtmlHelpSystem_CreateIndex", _wrap_wxHtmlHelpSystem_CreateIndex, METH_VARARGS },
+ { "wxHtmlHelpSystem_CreateContents", _wrap_wxHtmlHelpSystem_CreateContents, METH_VARARGS },
+ { "wxHtmlHelpSystem_RefreshLists", _wrap_wxHtmlHelpSystem_RefreshLists, METH_VARARGS },
+ { "wxHtmlHelpSystem_OnCloseWindow", _wrap_wxHtmlHelpSystem_OnCloseWindow, METH_VARARGS },
+ { "wxHtmlHelpSystem_OnSearch", _wrap_wxHtmlHelpSystem_OnSearch, METH_VARARGS },
+ { "wxHtmlHelpSystem_OnSearchSel", _wrap_wxHtmlHelpSystem_OnSearchSel, METH_VARARGS },
+ { "wxHtmlHelpSystem_OnIndexSel", _wrap_wxHtmlHelpSystem_OnIndexSel, METH_VARARGS },
+ { "wxHtmlHelpSystem_OnContentsSel", _wrap_wxHtmlHelpSystem_OnContentsSel, METH_VARARGS },
+ { "wxHtmlHelpSystem_OnToolbar", _wrap_wxHtmlHelpSystem_OnToolbar, METH_VARARGS },
+ { "wxHtmlHelpSystem_GetContentsImageList", _wrap_wxHtmlHelpSystem_GetContentsImageList, METH_VARARGS },
+ { "wxHtmlHelpSystem_GetSearchList", _wrap_wxHtmlHelpSystem_GetSearchList, METH_VARARGS },
+ { "wxHtmlHelpSystem_GetIndexList", _wrap_wxHtmlHelpSystem_GetIndexList, METH_VARARGS },
+ { "wxHtmlHelpSystem_GetContentsTree", _wrap_wxHtmlHelpSystem_GetContentsTree, METH_VARARGS },
+ { "wxHtmlHelpSystem_GetHtmlWindow", _wrap_wxHtmlHelpSystem_GetHtmlWindow, METH_VARARGS },
+ { "wxHtmlHelpSystem_GetFrame", _wrap_wxHtmlHelpSystem_GetFrame, METH_VARARGS },
+ { "wxHtmlHelpSystem_SetControls", _wrap_wxHtmlHelpSystem_SetControls, METH_VARARGS },
+ { "wxHtmlHelpSystem_CreateHelpWindow", _wrap_wxHtmlHelpSystem_CreateHelpWindow, METH_VARARGS },
+ { "wxHtmlHelpSystem_CreateIndexList", _wrap_wxHtmlHelpSystem_CreateIndexList, METH_VARARGS },
+ { "wxHtmlHelpSystem_CreateContentsTree", _wrap_wxHtmlHelpSystem_CreateContentsTree, METH_VARARGS },
+ { "wxHtmlHelpSystem_CreateToolBar", _wrap_wxHtmlHelpSystem_CreateToolBar, METH_VARARGS },
+ { "wxHtmlHelpSystem_AddBookParam", _wrap_wxHtmlHelpSystem_AddBookParam, METH_VARARGS },
+ { "delete_wxHtmlHelpSystem", _wrap_delete_wxHtmlHelpSystem, METH_VARARGS },
+ { "new_wxHtmlHelpSystem", _wrap_new_wxHtmlHelpSystem, METH_VARARGS },
+ { "wxHtmlHelpController_WriteCustomization", _wrap_wxHtmlHelpController_WriteCustomization, METH_VARARGS },
+ { "wxHtmlHelpController_ReadCustomization", _wrap_wxHtmlHelpController_ReadCustomization, METH_VARARGS },
+ { "wxHtmlHelpController_UseConfig", _wrap_wxHtmlHelpController_UseConfig, METH_VARARGS },
+ { "wxHtmlHelpController_KeywordSearch", _wrap_wxHtmlHelpController_KeywordSearch, METH_VARARGS },
+ { "wxHtmlHelpController_DisplayIndex", _wrap_wxHtmlHelpController_DisplayIndex, METH_VARARGS },
+ { "wxHtmlHelpController_DisplayContents", _wrap_wxHtmlHelpController_DisplayContents, METH_VARARGS },
+ { "wxHtmlHelpController_DisplayID", _wrap_wxHtmlHelpController_DisplayID, METH_VARARGS },
+ { "wxHtmlHelpController_Display", _wrap_wxHtmlHelpController_Display, METH_VARARGS },
+ { "wxHtmlHelpController_AddBook", _wrap_wxHtmlHelpController_AddBook, METH_VARARGS },
+ { "wxHtmlHelpController_SetTempDir", _wrap_wxHtmlHelpController_SetTempDir, METH_VARARGS },
+ { "wxHtmlHelpController_SetTitleFormat", _wrap_wxHtmlHelpController_SetTitleFormat, METH_VARARGS },
+ { "delete_wxHtmlHelpController", _wrap_delete_wxHtmlHelpController, METH_VARARGS },
+ { "new_wxHtmlHelpController", _wrap_new_wxHtmlHelpController, METH_VARARGS },
{ "wxHtmlWindow_HistoryClear", _wrap_wxHtmlWindow_HistoryClear, METH_VARARGS },
{ "wxHtmlWindow_HistoryForward", _wrap_wxHtmlWindow_HistoryForward, METH_VARARGS },
{ "wxHtmlWindow_HistoryBack", _wrap_wxHtmlWindow_HistoryBack, METH_VARARGS },
@@ -863,6 +2255,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxRegionIterator","_wxRegionIterator",0},
{ "_class_wxMenuBar","_wxMenuBar",0},
{ "_class_wxPyTreeItemData","_wxPyTreeItemData",0},
+ { "_class_wxEvtHandler","_class_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxEvtHandler},
+ { "_class_wxEvtHandler","_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxEvtHandler},
+ { "_class_wxEvtHandler","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler},
+ { "_class_wxEvtHandler","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler},
{ "_class_wxEvtHandler","_class_wxHtmlWindow",SwigwxHtmlWindowTowxEvtHandler},
{ "_class_wxEvtHandler","_wxHtmlWindow",SwigwxHtmlWindowTowxEvtHandler},
{ "_class_wxEvtHandler","_wxEvtHandler",0},
@@ -880,10 +2276,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxColourData","_wxColourData",0},
{ "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0},
{ "_wxPrinter","_class_wxPrinter",0},
+ { "_class_wxHtmlHelpController","_class_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxHtmlHelpController},
+ { "_class_wxHtmlHelpController","_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxHtmlHelpController},
+ { "_class_wxHtmlHelpController","_wxHtmlHelpController",0},
{ "_wxPen","_class_wxPen",0},
{ "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0},
{ "_byte","_unsigned_char",0},
{ "_wxStaticBox","_class_wxStaticBox",0},
+ { "_class_wxHtmlHelpSystem","_wxHtmlHelpSystem",0},
{ "_wxChoice","_class_wxChoice",0},
{ "_wxSlider","_class_wxSlider",0},
{ "_wxNotebookEvent","_class_wxNotebookEvent",0},
@@ -1032,6 +2432,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxListBox","_class_wxListBox",0},
{ "_wxScreenDC","_class_wxScreenDC",0},
{ "_class_wxMDIChildFrame","_wxMDIChildFrame",0},
+ { "_wxHtmlHelpController","_class_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxHtmlHelpController},
+ { "_wxHtmlHelpController","_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxHtmlHelpController},
+ { "_wxHtmlHelpController","_class_wxHtmlHelpController",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
@@ -1149,6 +2552,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxPalette","_class_wxPalette",0},
{ "_class_wxIdleEvent","_wxIdleEvent",0},
{ "_wxEraseEvent","_class_wxEraseEvent",0},
+ { "_wxHtmlHelpSystem","_class_wxHtmlHelpSystem",0},
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
{ "_class_wxMiniFrame","_wxMiniFrame",0},
{ "_wxFontDialog","_class_wxFontDialog",0},
@@ -1172,6 +2576,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxMenuBar","_class_wxMenuBar",0},
{ "_wxTreeEvent","_class_wxTreeEvent",0},
{ "_wxDirDialog","_class_wxDirDialog",0},
+ { "_wxEvtHandler","_class_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxEvtHandler},
+ { "_wxEvtHandler","_wxHtmlHelpSystem",SwigwxHtmlHelpSystemTowxEvtHandler},
+ { "_wxEvtHandler","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler},
+ { "_wxEvtHandler","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler},
{ "_wxEvtHandler","_class_wxHtmlWindow",SwigwxHtmlWindowTowxEvtHandler},
{ "_wxEvtHandler","_wxHtmlWindow",SwigwxHtmlWindowTowxEvtHandler},
{ "_wxEvtHandler","_class_wxEvtHandler",0},
@@ -1209,6 +2617,17 @@ SWIGEXPORT(void) inithtmlc() {
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("htmlc", htmlcMethods);
d = PyModule_GetDict(m);
+ PyDict_SetItemString(d,"wxID_HTML_PANEL", PyInt_FromLong((long) wxID_HTML_PANEL));
+ PyDict_SetItemString(d,"wxID_HTML_BACK", PyInt_FromLong((long) wxID_HTML_BACK));
+ PyDict_SetItemString(d,"wxID_HTML_FORWARD", PyInt_FromLong((long) wxID_HTML_FORWARD));
+ PyDict_SetItemString(d,"wxID_HTML_TREECTRL", PyInt_FromLong((long) wxID_HTML_TREECTRL));
+ PyDict_SetItemString(d,"wxID_HTML_INDEXPAGE", PyInt_FromLong((long) wxID_HTML_INDEXPAGE));
+ PyDict_SetItemString(d,"wxID_HTML_INDEXLIST", PyInt_FromLong((long) wxID_HTML_INDEXLIST));
+ PyDict_SetItemString(d,"wxID_HTML_NOTEBOOK", PyInt_FromLong((long) wxID_HTML_NOTEBOOK));
+ PyDict_SetItemString(d,"wxID_HTML_SEARCHPAGE", PyInt_FromLong((long) wxID_HTML_SEARCHPAGE));
+ PyDict_SetItemString(d,"wxID_HTML_SEARCHTEXT", PyInt_FromLong((long) wxID_HTML_SEARCHTEXT));
+ PyDict_SetItemString(d,"wxID_HTML_SEARCHLIST", PyInt_FromLong((long) wxID_HTML_SEARCHLIST));
+ PyDict_SetItemString(d,"wxID_HTML_SEARCHBUTTON", PyInt_FromLong((long) wxID_HTML_SEARCHBUTTON));
/* This is a bit cheesy. SWIG happens to call the dictionary d...
@@ -1226,6 +2645,9 @@ SWIGEXPORT(void) inithtmlc() {
#if wxUSE_FS_ZIP
wxFileSystem::AddHandler(new wxZipFSHandler);
#endif
+ PyDict_SetItemString(d,"wxHtmlHelpController_IMG_Book", PyInt_FromLong((long) wxHtmlHelpController::IMG_Book));
+ PyDict_SetItemString(d,"wxHtmlHelpController_IMG_Folder", PyInt_FromLong((long) wxHtmlHelpController::IMG_Folder));
+ PyDict_SetItemString(d,"wxHtmlHelpController_IMG_Page", PyInt_FromLong((long) wxHtmlHelpController::IMG_Page));
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
diff --git a/utils/wxPython/modules/html/gtk/html.py b/utils/wxPython/modules/html/gtk/html.py
index 3f674ce514..29f8eb3b1c 100644
--- a/utils/wxPython/modules/html/gtk/html.py
+++ b/utils/wxPython/modules/html/gtk/html.py
@@ -111,6 +111,148 @@ class wxHtmlWindow(wxHtmlWindowPtr):
+class wxHtmlHelpControllerPtr(wxEvtHandlerPtr):
+ IMG_Book = htmlc.wxHtmlHelpController_IMG_Book
+ IMG_Folder = htmlc.wxHtmlHelpController_IMG_Folder
+ IMG_Page = htmlc.wxHtmlHelpController_IMG_Page
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __del__(self,htmlc=htmlc):
+ if self.thisown == 1 :
+ htmlc.delete_wxHtmlHelpController(self)
+ def SetTitleFormat(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_SetTitleFormat,(self,) + _args, _kwargs)
+ return val
+ def SetTempDir(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_SetTempDir,(self,) + _args, _kwargs)
+ return val
+ def AddBook(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_AddBook,(self,) + _args, _kwargs)
+ return val
+ def Display(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_Display,(self,) + _args, _kwargs)
+ return val
+ def DisplayID(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_DisplayID,(self,) + _args, _kwargs)
+ return val
+ def DisplayContents(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_DisplayContents,(self,) + _args, _kwargs)
+ return val
+ def DisplayIndex(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_DisplayIndex,(self,) + _args, _kwargs)
+ return val
+ def KeywordSearch(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_KeywordSearch,(self,) + _args, _kwargs)
+ return val
+ def UseConfig(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_UseConfig,(self,) + _args, _kwargs)
+ return val
+ def ReadCustomization(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_ReadCustomization,(self,) + _args, _kwargs)
+ return val
+ def WriteCustomization(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpController_WriteCustomization,(self,) + _args, _kwargs)
+ return val
+ def __repr__(self):
+ return "" % (self.this,)
+class wxHtmlHelpController(wxHtmlHelpControllerPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(htmlc.new_wxHtmlHelpController,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
+class wxHtmlHelpSystemPtr(wxHtmlHelpControllerPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __del__(self,htmlc=htmlc):
+ if self.thisown == 1 :
+ htmlc.delete_wxHtmlHelpSystem(self)
+ def AddBookParam(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_AddBookParam,(self,) + _args, _kwargs)
+ return val
+ def CreateToolBar(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_CreateToolBar,(self,) + _args, _kwargs)
+ if val: val = wxToolBarPtr(val)
+ return val
+ def CreateContentsTree(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_CreateContentsTree,(self,) + _args, _kwargs)
+ if val: val = wxTreeCtrlPtr(val)
+ return val
+ def CreateIndexList(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_CreateIndexList,(self,) + _args, _kwargs)
+ if val: val = wxListBoxPtr(val)
+ return val
+ def CreateHelpWindow(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_CreateHelpWindow,(self,) + _args, _kwargs)
+ return val
+ def SetControls(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_SetControls,(self,) + _args, _kwargs)
+ return val
+ def GetFrame(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_GetFrame,(self,) + _args, _kwargs)
+ if val: val = wxFramePtr(val)
+ return val
+ def GetHtmlWindow(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_GetHtmlWindow,(self,) + _args, _kwargs)
+ if val: val = wxHtmlWindowPtr(val)
+ return val
+ def GetContentsTree(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_GetContentsTree,(self,) + _args, _kwargs)
+ if val: val = wxTreeCtrlPtr(val)
+ return val
+ def GetIndexList(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_GetIndexList,(self,) + _args, _kwargs)
+ if val: val = wxListBoxPtr(val)
+ return val
+ def GetSearchList(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_GetSearchList,(self,) + _args, _kwargs)
+ if val: val = wxListBoxPtr(val)
+ return val
+ def GetContentsImageList(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_GetContentsImageList,(self,) + _args, _kwargs)
+ if val: val = wxImageListPtr(val)
+ return val
+ def OnToolbar(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_OnToolbar,(self,) + _args, _kwargs)
+ return val
+ def OnContentsSel(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_OnContentsSel,(self,) + _args, _kwargs)
+ return val
+ def OnIndexSel(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_OnIndexSel,(self,) + _args, _kwargs)
+ return val
+ def OnSearchSel(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_OnSearchSel,(self,) + _args, _kwargs)
+ return val
+ def OnSearch(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_OnSearch,(self,) + _args, _kwargs)
+ return val
+ def OnCloseWindow(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_OnCloseWindow,(self,) + _args, _kwargs)
+ return val
+ def RefreshLists(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_RefreshLists,(self,) + _args, _kwargs)
+ return val
+ def CreateContents(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_CreateContents,(self,) + _args, _kwargs)
+ return val
+ def CreateIndex(self, *_args, **_kwargs):
+ val = apply(htmlc.wxHtmlHelpSystem_CreateIndex,(self,) + _args, _kwargs)
+ return val
+ def __repr__(self):
+ return "" % (self.this,)
+class wxHtmlHelpSystem(wxHtmlHelpSystemPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(htmlc.new_wxHtmlHelpSystem,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
#-------------- FUNCTION WRAPPERS ------------------
@@ -119,3 +261,14 @@ class wxHtmlWindow(wxHtmlWindowPtr):
#-------------- VARIABLE WRAPPERS ------------------
+wxID_HTML_PANEL = htmlc.wxID_HTML_PANEL
+wxID_HTML_BACK = htmlc.wxID_HTML_BACK
+wxID_HTML_FORWARD = htmlc.wxID_HTML_FORWARD
+wxID_HTML_TREECTRL = htmlc.wxID_HTML_TREECTRL
+wxID_HTML_INDEXPAGE = htmlc.wxID_HTML_INDEXPAGE
+wxID_HTML_INDEXLIST = htmlc.wxID_HTML_INDEXLIST
+wxID_HTML_NOTEBOOK = htmlc.wxID_HTML_NOTEBOOK
+wxID_HTML_SEARCHPAGE = htmlc.wxID_HTML_SEARCHPAGE
+wxID_HTML_SEARCHTEXT = htmlc.wxID_HTML_SEARCHTEXT
+wxID_HTML_SEARCHLIST = htmlc.wxID_HTML_SEARCHLIST
+wxID_HTML_SEARCHBUTTON = htmlc.wxID_HTML_SEARCHBUTTON
diff --git a/utils/wxPython/modules/html/helpsys.cpp b/utils/wxPython/modules/html/helpsys.cpp
new file mode 100644
index 0000000000..0a7d979658
--- /dev/null
+++ b/utils/wxPython/modules/html/helpsys.cpp
@@ -0,0 +1,322 @@
+/* htmlsys.h : wxHtmlHelpSystem is an extension of the wxHtmlHelpController.
+ * mainly does two things:
+ * - extend the interface somewhat so the programmer can dictate most of the
+ * look and feel of the htmlhelp frame.
+ * - make some protected functions public (adding _ to the function name) so
+ * that SWIG can wrap them.
+ *
+ * Harm van der Heijden 32aug1999
+ */
+#include "helpsys.h"
+#include
+#include
+#include
+
+// Bitmaps:
+#ifndef __WXMSW__
+#include "bitmaps/panel.xpm"
+#include "bitmaps/back.xpm"
+#include "bitmaps/forward.xpm"
+#include "bitmaps/book.xpm"
+#include "bitmaps/folder.xpm"
+#include "bitmaps/page.xpm"
+#endif
+
+IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpSystem, wxHtmlHelpController)
+
+// The two static funtions below are also defined in htmlhelp.cpp
+// maybe they should be protected class functions.
+static wxString SafeFileName(const wxString& s)
+{
+ wxString res = s;
+ res.Replace(":", "_", TRUE);
+ res.Replace(" ", "_", TRUE);
+ res.Replace("/", "_", TRUE);
+ res.Replace("\\", "_", TRUE);
+ res.Replace("#", "_", TRUE);
+ res.Replace(".", "_", TRUE);
+ return res;
+}
+
+static int IndexCompareFunc(const void *a, const void *b)
+{
+ return strcmp(((HtmlContentsItem*)a) -> m_Name, ((HtmlContentsItem*)b) -> m_Name);
+}
+
+bool wxHtmlHelpSystem::AddBookParam(const wxString& title, const wxString& contfile,
+ const wxString& indexfile, const wxString& deftopic,
+ const wxString& path, bool show_wait_msg)
+{
+ wxFileSystem fsys;
+ wxFSFile *fi;
+ HtmlBookRecord *bookr;
+ wxString safetitle;
+
+ if (! path.IsEmpty())
+ // workaround for bug in ChangePathTo(name, TRUE)
+ fsys.ChangePathTo(path+"/gaga");
+
+ bookr = new HtmlBookRecord(path+'/', title, deftopic);
+
+ if (m_ContentsCnt % HTML_REALLOC_STEP == 0)
+ m_Contents = (HtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + HTML_REALLOC_STEP) * sizeof(HtmlContentsItem));
+ m_Contents[m_ContentsCnt].m_Level = 0;
+ m_Contents[m_ContentsCnt].m_ID = 0;
+ m_Contents[m_ContentsCnt].m_Page = new char[deftopic.Length() + 1];
+ strcpy(m_Contents[m_ContentsCnt].m_Page, deftopic.c_str());
+ m_Contents[m_ContentsCnt].m_Name = new char [title.Length() + 1];
+ strcpy(m_Contents[m_ContentsCnt].m_Name, title.c_str());
+ m_Contents[m_ContentsCnt].m_Book = bookr;
+ m_ContentsCnt++;
+
+ // Try to find cached binary versions:
+ safetitle = SafeFileName(title);
+ fi = fsys.OpenFile(safetitle + ".cached");
+ if (fi == NULL) fi = fsys.OpenFile(m_TempPath + safetitle + ".cached");
+ if ((fi == NULL) || (m_TempPath == wxEmptyString)) {
+ LoadMSProject(bookr, fsys, indexfile, contfile, show_wait_msg);
+ if (m_TempPath != wxEmptyString) {
+ wxFileOutputStream *outs = new wxFileOutputStream(m_TempPath + safetitle + ".cached");
+ SaveCachedBook(bookr, outs);
+ delete outs;
+ }
+ }
+ else {
+ LoadCachedBook(bookr, fi -> GetStream());
+ delete fi;
+ }
+
+ m_BookRecords.Add(bookr);
+ if (m_IndexCnt > 0)
+ qsort(m_Index, m_IndexCnt, sizeof(HtmlContentsItem), IndexCompareFunc);
+
+ return TRUE;
+}
+
+wxToolBar* wxHtmlHelpSystem::CreateToolBar(wxFrame* frame)
+{
+ wxToolBar *toolBar;
+ toolBar = frame -> CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT | wxTB_DOCKABLE);
+ toolBar -> SetMargins(2, 2);
+ wxBitmap* toolBarBitmaps[3];
+
+#ifdef __WXMSW__
+ toolBarBitmaps[0] = new wxBitmap("panel");
+ toolBarBitmaps[1] = new wxBitmap("back");
+ toolBarBitmaps[2] = new wxBitmap("forward");
+ int width = 24;
+#else
+ toolBarBitmaps[0] = new wxBitmap(panel_xpm);
+ toolBarBitmaps[1] = new wxBitmap(back_xpm);
+ toolBarBitmaps[2] = new wxBitmap(forward_xpm);
+ int width = 16;
+#endif
+
+ int currentX = 5;
+
+ toolBar -> AddTool(wxID_HTML_PANEL, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Show/hide navigation panel"));
+ currentX += width + 5;
+ toolBar -> AddSeparator();
+ toolBar -> AddTool(wxID_HTML_BACK, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go back to the previous HTML page"));
+ currentX += width + 5;
+ toolBar -> AddTool(wxID_HTML_FORWARD, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go forward to the next HTML page"));
+ currentX += width + 5;
+
+ toolBar -> Realize();
+
+ // Can delete the bitmaps since they're reference counted
+ for (int i = 0; i < 3; i++) delete toolBarBitmaps[i];
+ return toolBar;
+}
+
+wxTreeCtrl* wxHtmlHelpSystem::CreateContentsTree(wxWindow* parent)
+{
+ wxTreeCtrl* tree;
+ tree = new wxTreeCtrl(parent, wxID_HTML_TREECTRL, wxDefaultPosition,
+ wxDefaultSize, wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
+ tree -> SetImageList(m_ContentsImageList);
+ return tree;
+}
+
+wxListBox* wxHtmlHelpSystem::CreateIndexList(wxWindow* parent)
+{
+ return new wxListBox(parent, wxID_HTML_INDEXLIST, wxDefaultPosition, wxDefaultSize, 0);
+}
+
+void wxHtmlHelpSystem::SetControls(wxFrame* frame, wxHtmlWindow* htmlwin,
+ wxTreeCtrl* contents, wxListBox* index,
+ wxListBox* searchlist)
+{
+ m_Frame = frame;
+ m_HtmlWin = htmlwin;
+ m_ContentsBox = contents;
+ m_IndexBox = index;
+ m_SearchList = searchlist;
+ m_SearchText = NULL; // provide your own input box
+ /* if you're setting your own controls, you and your event handlers are
+ * responsible for any splitter and notebook adjustments, not the
+ * htmlhelp framework */
+ m_Splitter = NULL;
+ m_NavigPan = NULL;
+ RefreshLists();
+}
+
+void wxHtmlHelpSystem::CreateHelpWindow()
+{
+ wxBusyCursor cur;
+ wxString oldpath;
+ wxStatusBar *sbar;
+
+ if (m_Frame) {
+ m_Frame -> Raise();
+ m_Frame -> Show(TRUE);
+ return;
+ }
+
+#if wxUSE_BUSYINFO
+ wxBusyInfo busyinfo(_("Preparing help window..."));
+#endif
+
+ if (m_Config) ReadCustomization(m_Config, m_ConfigRoot);
+
+ m_Frame = new wxFrame(NULL, -1, "", wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h));
+ m_Frame -> PushEventHandler(this);
+ sbar = m_Frame -> CreateStatusBar();
+
+ CreateToolBar(m_Frame);
+
+ {
+ m_Splitter = new wxSplitterWindow(m_Frame);
+
+ m_HtmlWin = new wxHtmlWindow(m_Splitter);
+ m_HtmlWin -> SetRelatedFrame(m_Frame, m_TitleFormat);
+ m_HtmlWin -> SetRelatedStatusBar(0);
+ if (m_Config) m_HtmlWin -> ReadCustomization(m_Config, m_ConfigRoot);
+
+ m_NavigPan = new wxNotebook(m_Splitter, wxID_HTML_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
+ if (m_ContentsCnt) {
+ m_ContentsBox = CreateContentsTree(m_NavigPan);
+ m_NavigPan -> AddPage(m_ContentsBox, _("Contents"));
+ }
+
+ if (m_IndexCnt) {
+ wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_INDEXPAGE);
+ wxLayoutConstraints *b1 = new wxLayoutConstraints;
+ b1 -> top.SameAs (dummy, wxTop, 0);
+ b1 -> left.SameAs (dummy, wxLeft, 0);
+ b1 -> width.PercentOf (dummy, wxWidth, 100);
+ b1 -> bottom.SameAs (dummy, wxBottom, 0);
+ m_IndexBox = CreateIndexList(dummy);
+ m_IndexBox -> SetConstraints(b1);
+
+ dummy -> SetAutoLayout(TRUE);
+ m_NavigPan -> AddPage(dummy, _("Index"));
+ }
+
+ {
+ wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_SEARCHPAGE);
+
+ wxLayoutConstraints *b1 = new wxLayoutConstraints;
+ m_SearchText = new wxTextCtrl(dummy, wxID_HTML_SEARCHTEXT);
+ b1 -> top.SameAs (dummy, wxTop, 0);
+ b1 -> left.SameAs (dummy, wxLeft, 0);
+ b1 -> right.SameAs (dummy, wxRight, 0);
+ b1 -> height.AsIs();
+ m_SearchText -> SetConstraints(b1);
+
+ wxLayoutConstraints *b2 = new wxLayoutConstraints;
+ m_SearchButton = new wxButton(dummy, wxID_HTML_SEARCHBUTTON, _("Search!"));
+ b2 -> top.Below (m_SearchText, 10);
+ b2 -> right.SameAs (dummy, wxRight, 10);
+ b2 -> width.AsIs();
+ b2 -> height.AsIs();
+ m_SearchButton -> SetConstraints(b2);
+
+ wxLayoutConstraints *b3 = new wxLayoutConstraints;
+ m_SearchList = new wxListBox(dummy, wxID_HTML_SEARCHLIST, wxDefaultPosition, wxDefaultSize, 0);
+ b3 -> top.Below (m_SearchButton, 10);
+ b3 -> left.SameAs (dummy, wxLeft, 0);
+ b3 -> right.SameAs (dummy, wxRight, 0);
+ b3 -> bottom.SameAs (dummy, wxBottom, 0);
+ m_SearchList -> SetConstraints(b3);
+
+ dummy -> SetAutoLayout(TRUE);
+ dummy -> Layout();
+ m_NavigPan -> AddPage(dummy, _("Search"));
+ }
+
+ RefreshLists();
+ m_NavigPan -> Show(TRUE);
+ m_HtmlWin -> Show(TRUE);
+ m_Splitter -> SetMinimumPaneSize(20);
+ m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
+ if (!m_Cfg.navig_on) m_Splitter -> Unsplit(m_NavigPan);
+ wxYield();
+ }
+
+ m_Frame -> Show(TRUE);
+ wxYield();
+}
+
+void wxHtmlHelpSystem::RefreshLists()
+{
+ if (m_Frame) {
+ CreateContents();
+ CreateIndex();
+ if (m_SearchList)
+ m_SearchList -> Clear();
+ }
+}
+
+void wxHtmlHelpSystem::OnToolbar(wxCommandEvent& event)
+{
+ switch (event.GetId()) {
+ case wxID_HTML_BACK :
+ if (m_HtmlWin) m_HtmlWin -> HistoryBack();
+ break;
+ case wxID_HTML_FORWARD :
+ if (m_HtmlWin) m_HtmlWin -> HistoryForward();
+ break;
+ case wxID_HTML_PANEL :
+ if (! (m_Splitter && m_NavigPan))
+ return;
+ if (m_Splitter -> IsSplit()) {
+ m_Cfg.sashpos = m_Splitter -> GetSashPosition();
+ m_Splitter -> Unsplit(m_NavigPan);
+ }
+ else {
+ m_NavigPan -> Show(TRUE);
+ m_HtmlWin -> Show(TRUE);
+ m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
+ }
+ break;
+ }
+}
+
+void wxHtmlHelpSystem::OnCloseWindow(wxCloseEvent& event)
+{
+ int a, b;
+
+ if (m_Splitter && m_NavigPan) {
+ m_Cfg.navig_on = m_Splitter -> IsSplit();
+ if (m_Cfg.navig_on)
+ m_Cfg.sashpos = m_Splitter -> GetSashPosition();
+ m_Frame -> GetPosition(&a, &b);
+ m_Cfg.x = a, m_Cfg.y = b;
+ m_Frame -> GetSize(&a, &b);
+ m_Cfg.w = a, m_Cfg.h = b;
+ }
+ if (m_Config) {
+ WriteCustomization(m_Config, m_ConfigRoot);
+ m_HtmlWin -> WriteCustomization(m_Config, m_ConfigRoot);
+ }
+ m_Frame = NULL;
+
+ //event.Skip();
+}
+
+BEGIN_EVENT_TABLE(wxHtmlHelpSystem, wxHtmlHelpController)
+ EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_FORWARD, wxHtmlHelpSystem::OnToolbar)
+ EVT_CLOSE(wxHtmlHelpSystem::OnCloseWindow)
+END_EVENT_TABLE()
+
diff --git a/utils/wxPython/modules/html/helpsys.h b/utils/wxPython/modules/html/helpsys.h
new file mode 100644
index 0000000000..e35ffadf9d
--- /dev/null
+++ b/utils/wxPython/modules/html/helpsys.h
@@ -0,0 +1,75 @@
+/* htmlsys.h : wxHtmlHelpSystem is an extension of the wxHtmlHelpController.
+ * mainly does two things:
+ * - extend the interface somewhat so the programmer can dictate most of the
+ * look and feel of the htmlhelp frame.
+ * - make some protected functions public (adding _ to the function name) so
+ * that SWIG can wrap them.
+ *
+ * Harm van der Heijden 32aug1999
+ */
+#ifndef __HELPSYS_H__
+#define __HELPSYS_H__
+
+#include
+
+#if ! wxUSE_HTML
+#error "wxHtml needed"
+#endif
+
+#include
+#include "wx/listbox.h"
+#include
+
+class wxHtmlHelpSystem : public wxHtmlHelpController
+{
+ DECLARE_DYNAMIC_CLASS(wxHtmlHelpSystem)
+
+ public:
+ wxHtmlHelpSystem() {};
+ ~wxHtmlHelpSystem() {};
+
+ bool AddBookParam(const wxString& title, const wxString& contfile,
+ const wxString& indexfile=wxEmptyString, const wxString& deftopic=wxEmptyString,
+ const wxString& path=wxEmptyString, bool show_wait_msg=FALSE);
+ // Alternative to AddBook(wxString& hhpfile)
+ wxToolBar* CreateToolBar(wxFrame* frame);
+ // creates a dockable toolbar for the frame, containing hide/show, back and forward buttons
+ wxTreeCtrl* CreateContentsTree(wxWindow* parent);
+ // creates a treecontrol with imagelist for books, folders etc and id wxID_HTML_TREECTRL
+ wxListBox* CreateIndexList(wxWindow* parent);
+ // creates a listbox with the right id
+ virtual void CreateHelpWindow();
+ // Slightly different version than in wxHtmlHelpController; uses helpers above
+ // Do nothing if the window already exists
+ void SetControls(wxFrame* frame, wxHtmlWindow* htmlwin,
+ wxTreeCtrl* contents=NULL, wxListBox* index=NULL,
+ wxListBox* searchlist=NULL);
+ // alternative for CreateHelpWindow(), sets frame, htmlwindow, contents tree, index
+ // listbox and searchlist listbox. If null, their functionality won't be used
+
+ // Some extra accessor functions
+ wxFrame* GetFrame() { return m_Frame; }
+ wxHtmlWindow* GetHtmlWindow() { return m_HtmlWin; }
+ wxTreeCtrl* GetContentsTree() { return m_ContentsBox; }
+ wxListBox* GetIndexList() { return m_IndexBox; }
+ wxListBox* GetSearchList() { return m_SearchList; }
+ wxImageList* GetContentsImageList() { return m_ContentsImageList; }
+ // public interface for wxHtmlHelpControllers handlers, so wxPython can call them
+ void OnToolbar(wxCommandEvent& event);
+ void OnContentsSel(wxTreeEvent& event) {wxHtmlHelpController::OnContentsSel(event);}
+ void OnIndexSel(wxCommandEvent& event) {wxHtmlHelpController::OnIndexSel(event);}
+ void OnSearchSel(wxCommandEvent& event) {wxHtmlHelpController::OnSearchSel(event);}
+ void OnSearch(wxCommandEvent& event) {wxHtmlHelpController::OnSearch(event);}
+ void OnCloseWindow(wxCloseEvent& event);
+
+ // some more protected functions that should be accessible from wxPython
+ void RefreshLists();
+ void CreateContents() { if (!m_ContentsBox) return; wxHtmlHelpController::CreateContents(); }
+ // Adds items to m_Contents tree control
+ void CreateIndex() { if (! m_IndexBox) return; wxHtmlHelpController::CreateIndex(); }
+ // Adds items to m_IndexList
+
+ DECLARE_EVENT_TABLE()
+};
+
+#endif
diff --git a/utils/wxPython/modules/html/html.i b/utils/wxPython/modules/html/html.i
index 05eea37be2..299af78295 100644
--- a/utils/wxPython/modules/html/html.i
+++ b/utils/wxPython/modules/html/html.i
@@ -19,6 +19,8 @@
#include
#include
#include
+#include
+#include "helpsys.h"
%}
//---------------------------------------------------------------------------
@@ -35,8 +37,8 @@
//%extern frames.i
//%extern misc.i
//%extern gdi.i
-//%extern controls.i
-
+%extern controls.i
+%extern controls2.i
%{
#ifdef __WXMSW__
@@ -155,7 +157,7 @@ class HtmlHistoryItem
class wxHtmlWindow : public wxScrolledWindow
{
public:
- wxHtmlWindow(wxWindow *parent, wxWindowID id = -1,
+ wxHtmlWindow(wxWindow *parent, int id = -1,
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
int flags=wxHW_SCROLLBAR_AUTO,
@@ -234,6 +236,164 @@ class wxHtmlWindow : public wxScrolledWindow
};
+enum {
+ wxID_HTML_PANEL,
+ wxID_HTML_BACK,
+ wxID_HTML_FORWARD,
+ wxID_HTML_TREECTRL,
+ wxID_HTML_INDEXPAGE,
+ wxID_HTML_INDEXLIST,
+ wxID_HTML_NOTEBOOK,
+ wxID_HTML_SEARCHPAGE,
+ wxID_HTML_SEARCHTEXT,
+ wxID_HTML_SEARCHLIST,
+ wxID_HTML_SEARCHBUTTON
+};
+
+class wxHtmlHelpController : public wxEvtHandler
+{
+public:
+ wxHtmlHelpController();
+ ~wxHtmlHelpController();
+
+ // Images:
+ enum {
+ IMG_Book = 0,
+ IMG_Folder,
+ IMG_Page
+ };
+
+ void SetTitleFormat(const wxString& format) {m_TitleFormat = format;}
+ // Sets format of title of the frame. Must contain exactly one "%s"
+ // (for title of displayed HTML page)
+
+ void SetTempDir(const wxString& path);
+ // Sets directory where temporary files are stored.
+ // These temp files are index & contents file in binary (much faster to read)
+ // form. These files are NOT deleted on program's exit.
+
+ bool AddBook(const wxString& book, bool show_wait_msg = FALSE);
+ // Adds new book. 'book' is location of .htb file (stands for "html book").
+ // See documentation for details on its format.
+ // Returns success.
+ // If show_wait_msg == true then message window with "loading book..." is displayed
+
+ void Display(const wxString& x);
+ // Displays page x. If not found it will offect the user a choice of searching
+ // books.
+ // Looking for the page runs in these steps:
+ // 1. try to locate file named x (if x is for example "doc/howto.htm")
+ // 2. try to open starting page of book x
+ // 3. try to find x in contents (if x is for example "How To ...")
+ // 4. try to find x in index (if x is for example "How To ...")
+ // 5. offer searching and if the user agree, run KeywordSearch
+ %name(DisplayID) void Display(const int id);
+ // Alternative version that works with numeric ID.
+ // (uses extension to MS format, , see docs)
+
+ void DisplayContents();
+ // Displays help window and focuses contents.
+
+ void DisplayIndex();
+ // Displays help window and focuses index.
+
+ bool KeywordSearch(const wxString& keyword);
+ // Searches for keyword. Returns TRUE and display page if found, return
+ // FALSE otherwise
+ // Syntax of keyword is Altavista-like:
+ // * words are separated by spaces
+ // (but "\"hello world\"" is only one world "hello world")
+ // * word may be pretended by + or -
+ // (+ : page must contain the word ; - : page can't contain the word)
+ // * if there is no + or - before the word, + is default
+
+ void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
+ // Assigns config object to the controller. This config is then
+ // used in subsequent calls to Read/WriteCustomization of both help
+ // controller and it's wxHtmlWindow
+
+ void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
+ // saves custom settings into cfg config. it will use the path 'path'
+ // if given, otherwise it will save info into currently selected path.
+ // saved values : things set by SetFonts, SetBorders.
+ void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
+ // ...
+};
+
+class wxHtmlHelpSystem : public wxHtmlHelpController
+{
+ public:
+ wxHtmlHelpSystem() {};
+ ~wxHtmlHelpSystem() {};
+
+ bool AddBookParam(const wxString& title, const wxString& contfile,
+ const wxString& indexfile=wxEmptyString, const wxString& deftopic=wxEmptyString,
+ const wxString& path=wxEmptyString, bool show_wait_msg=FALSE);
+ // Alternative to AddBook(wxString& hhpfile)
+ wxToolBar* CreateToolBar(wxFrame* frame);
+ // creates a dockable toolbar for the frame, containing hide/show, back and forward buttons
+ wxTreeCtrl* CreateContentsTree(wxWindow* parent);
+ // creates a treecontrol with imagelist for books, folders etc and id wxID_HTML_TREECTRL
+ wxListBox* CreateIndexList(wxWindow* parent);
+ // creates a listbox with the right id
+ virtual void CreateHelpWindow();
+ // Slightly different version than in wxHtmlHelpController; uses helpers above
+ // Do nothing if the window already exists
+ void SetControls(wxFrame* frame, wxHtmlWindow* htmlwin,
+ wxTreeCtrl* contents=NULL, wxListBox* index=NULL,
+ wxListBox* searchlist=NULL);
+ // alternative for CreateHelpWindow(), sets frame, htmlwindow, contents tree, index
+ // listbox and searchlist listbox. If null, their functionality won't be used
+
+ // Some extra accessor functions
+ wxFrame* GetFrame() { return m_Frame; }
+ wxHtmlWindow* GetHtmlWindow() { return m_HtmlWin; }
+ wxTreeCtrl* GetContentsTree() { return m_ContentsBox; }
+ wxListBox* GetIndexList() { return m_IndexBox; }
+ wxListBox* GetSearchList() { return m_SearchList; }
+ wxImageList* GetContentsImageList() { return m_ContentsImageList; }
+ // public interface for wxHtmlHelpControllers handlers, so wxPython can call them
+ void OnToolbar(wxCommandEvent& event);
+ void OnContentsSel(wxTreeEvent& event) {wxHtmlHelpController::OnContentsSel(event);}
+ void OnIndexSel(wxCommandEvent& event) {wxHtmlHelpController::OnIndexSel(event);}
+ void OnSearchSel(wxCommandEvent& event) {wxHtmlHelpController::OnSearchSel(event);}
+ void OnSearch(wxCommandEvent& event) {wxHtmlHelpController::OnSearch(event);}
+ void OnCloseWindow(wxCloseEvent& event);
+
+ // some more protected functions that should be accessible from wxPython
+ void RefreshLists();
+ void CreateContents() { if (!m_IndexBox) return; wxHtmlHelpController::CreateContents(); }
+ // Adds items to m_Contents tree control
+ void CreateIndex() { if (! m_ContentsBox) return; wxHtmlHelpController::CreateIndex(); }
+ // Adds items to m_IndexList
+};
+
+// just for fun, an Altavista-like search engine (the gems that Vaclav has hidden in wxHtml...)
+// but not for wxMSW because it's not DLL exported
+//#ifndef __WXMSW__
+#ifdef THIS_IS_NOT_DEFINED_OKAY
+class wxSearchEngine
+{
+ public:
+ wxSearchEngine() : wxObject() {m_Keyword = NULL;}
+ ~wxSearchEngine() {if (m_Keyword) free(m_Keyword);}
+
+ void LookFor(const wxString& keyword);
+ // Sets the keyword we will be searching for
+
+ bool Scan(wxInputStream *stream);
+ // Scans the stream for the keyword.
+ // Returns TRUE if the stream contains keyword, fALSE otherwise
+ %addmethods {
+ bool ScanFile(const wxString& filename) {
+ if (filename.IsEmpty())
+ return false;
+ wxFileInputStream istr(filename);
+ return self->Scan(&istr);
+ }
+ }
+};
+#endif
//---------------------------------------------------------------------------
diff --git a/utils/wxPython/modules/html/test/helpsys.py b/utils/wxPython/modules/html/test/helpsys.py
new file mode 100644
index 0000000000..6acdaae7c0
--- /dev/null
+++ b/utils/wxPython/modules/html/test/helpsys.py
@@ -0,0 +1,73 @@
+from wxPython.wx import *
+from wxPython.html import *
+import sys,os
+
+if not os.environ.has_key('WXWIN'):
+ print "Can't find html samples. Set WXWIN environment variable."
+ sys.exit(1)
+
+help = wxHtmlHelpSystem()
+# Create the book in a different way, supply title, contents file, index, default topic and basedir
+help.AddBookParam('Sample help docs', 'contents.hhc', '', 'main.htm',
+ os.environ['WXWIN'] + "/samples/html/help/helpfiles")
+
+class HelpFrame(wxFrame):
+ def __init__(self):
+ wxFrame.__init__(self, NULL, -1, "", wxDefaultPosition, wxSize(500,500))
+ bar = self.CreateStatusBar(2)
+ bar.SetStatusWidths([400,100])
+ help.CreateToolBar(self)
+ self.text = wxTextCtrl(bar, 1001, "Hello world", wxPoint(400,0), wxSize(80,30))
+ button = wxButton(bar, 1002, "Go", wxPoint(480,0), wxSize(20,30))
+
+ html = wxHtmlWindow(self,-1)
+ html.SetRelatedFrame(self, "%s")
+ html.SetRelatedStatusBar(0)
+
+ self.searchframe = wxMiniFrame(self, -1, "Search result", wxDefaultPosition, wxSize(300,400))
+ self.searchbox = wxListBox(self.searchframe, wxID_HTML_SEARCHLIST)
+
+ self.mframe = wxMiniFrame(self, -1, "Contents", wxDefaultPosition, wxSize(300,500))
+ tree = help.CreateContentsTree(self.mframe)
+ help.SetControls(self, html, tree, NULL, self.searchbox)
+ EVT_TREE_SEL_CHANGED(self, wxID_HTML_TREECTRL, help.OnContentsSel)
+ EVT_LISTBOX(self, wxID_HTML_SEARCHLIST, help.OnSearchSel)
+ EVT_TOOL(self, wxID_HTML_PANEL, self.ToggleContents)
+ EVT_TOOL(self, wxID_HTML_BACK, help.OnToolbar)
+ EVT_TOOL(self, wxID_HTML_FORWARD, help.OnToolbar)
+ EVT_TEXT_ENTER(self, 1001, self.OnTextSearch)
+ EVT_BUTTON(self, 1002, self.OnTextSearch)
+ EVT_CLOSE(self.mframe, self.OnCloseContents)
+ EVT_CLOSE(self.searchframe, self.OnCloseSearch)
+ self.mframe.Show(TRUE)
+ print help.GetSearchList()
+
+ def ToggleContents(self, event):
+ self.mframe.Show(not self.mframe.IsShown())
+
+ def OnCloseContents(self, event):
+ if event.CanVeto():
+ self.mframe.Show(FALSE)
+ else:
+ self.mframe.Destroy()
+
+ def OnCloseSearch(self, event):
+ if event.CanVeto():
+ self.searchframe.Show(FALSE)
+ else:
+ self.searchframe.Destroy()
+
+ def OnTextSearch(self, event):
+ self.searchbox.Clear()
+ self.searchframe.Show(TRUE)
+ print "searching for %s" % (self.text.GetValue(),)
+ help.KeywordSearch(self.text.GetValue())
+
+class MyApp(wxApp):
+ def OnInit(self):
+ frame = HelpFrame()
+ frame.Show(TRUE)
+ return TRUE
+
+theApp = MyApp(0)
+theApp.MainLoop()
diff --git a/utils/wxPython/modules/html/test/htmlhelp.py b/utils/wxPython/modules/html/test/htmlhelp.py
new file mode 100644
index 0000000000..26c61ad4f3
--- /dev/null
+++ b/utils/wxPython/modules/html/test/htmlhelp.py
@@ -0,0 +1,19 @@
+from wxPython.wx import *
+from wxPython.html import *
+import os,sys
+
+if not os.environ.has_key('WXWIN'):
+ print "Can't find html samples. Set WXWIN environment variable."
+ sys.exit(1)
+
+# Minimal htmlhelpcontroller sample. Everything is done by the framework
+help = wxHtmlHelpController() # Not created in OnInit, otherwise it's deleted before we see it.
+help.AddBook(os.environ['WXWIN'] + "/samples/html/help/helpfiles/testing.hhp")
+
+class MyApp(wxApp):
+ def OnInit(self):
+ help.DisplayContents()
+ return TRUE
+
+theApp = MyApp(0)
+theApp.MainLoop()