From: Robin Dunn Date: Tue, 29 Jan 2002 00:11:38 +0000 (+0000) Subject: Updates for recent changes to wx, and some other little tweaks and fixes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c6c593e88d75fe89320eafddeb547b3c058c34d8 Updates for recent changes to wx, and some other little tweaks and fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/BUILD.win32.txt b/wxPython/BUILD.win32.txt index 3e3cbaa556..45d09596be 100644 --- a/wxPython/BUILD.win32.txt +++ b/wxPython/BUILD.win32.txt @@ -81,6 +81,7 @@ D. Change to the wx2\include\wx\msw directory and copy setup0.h to wxUSE_DEBUG_NEW_ALWAYS 0 wxUSE_CMDLINE_PARSER 0 wxUSE_DIALUP_MANAGER 0 + wxUSE_DYNAMIC_LOADER 0 wxUSE_TREELAYOUT 0 wxUSE_POSTSCRIPT 1 diff --git a/wxPython/contrib/xrc/xrc.cpp b/wxPython/contrib/xrc/xrc.cpp index f028815b9e..def59eeefb 100644 --- a/wxPython/contrib/xrc/xrc.cpp +++ b/wxPython/contrib/xrc/xrc.cpp @@ -1046,18 +1046,18 @@ static PyObject *_wrap_wxXmlResource_AttachUnknownControl(PyObject *self, PyObje return _resultobj; } -static PyObject *_wrap_wxXmlResource_GetXMLID(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxXmlResource_GetXRCID(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; char * _arg0; char *_kwnames[] = { "str_id", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXMLID",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXRCID",_kwnames,&_arg0)) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxXmlResource::GetXMLID(_arg0); + _result = (int )wxXmlResource::GetXRCID(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1189,7 +1189,7 @@ static PyMethodDef xrccMethods[] = { { "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS }, { "wxXmlResource_CompareVersion", (PyCFunction) _wrap_wxXmlResource_CompareVersion, METH_VARARGS | METH_KEYWORDS }, { "wxXmlResource_GetVersion", (PyCFunction) _wrap_wxXmlResource_GetVersion, METH_VARARGS | METH_KEYWORDS }, - { "wxXmlResource_GetXMLID", (PyCFunction) _wrap_wxXmlResource_GetXMLID, METH_VARARGS | METH_KEYWORDS }, + { "wxXmlResource_GetXRCID", (PyCFunction) _wrap_wxXmlResource_GetXRCID, METH_VARARGS | METH_KEYWORDS }, { "wxXmlResource_AttachUnknownControl", (PyCFunction) _wrap_wxXmlResource_AttachUnknownControl, METH_VARARGS | METH_KEYWORDS }, { "wxXmlResource_LoadIcon", (PyCFunction) _wrap_wxXmlResource_LoadIcon, METH_VARARGS | METH_KEYWORDS }, { "wxXmlResource_LoadBitmap", (PyCFunction) _wrap_wxXmlResource_LoadBitmap, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/contrib/xrc/xrc.i b/wxPython/contrib/xrc/xrc.i index 9334bad198..d5d4e222e7 100644 --- a/wxPython/contrib/xrc/xrc.i +++ b/wxPython/contrib/xrc/xrc.i @@ -122,7 +122,7 @@ public: // Returns numeric ID that is equivalent to string id used in XML // resource. To be used in event tables // Macro XMLID is provided for convenience - static int GetXMLID(const char *str_id); + static int GetXRCID(const char *str_id); // Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a) long GetVersion() const; @@ -142,12 +142,14 @@ public: //---------------------------------------------------------------------- %pragma(python) code = " -def XMLID(str_id): - return wxXmlResource_GetXMLID(str_id) +def XRCID(str_id): + return wxXmlResource_GetXRCID(str_id) -def XMLCTRL(window, str_id, *args): - return window.FindWindowById(XMLID(str_id)) +def XRCCTRL(window, str_id, *ignoreargs): + return window.FindWindowById(XRCID(str_id)) +XMLID = XRCID +XMLCTRL = XRCCTRL " //---------------------------------------------------------------------- diff --git a/wxPython/contrib/xrc/xrc.py b/wxPython/contrib/xrc/xrc.py index aa703e2e0c..2be890ffcd 100644 --- a/wxPython/contrib/xrc/xrc.py +++ b/wxPython/contrib/xrc/xrc.py @@ -41,12 +41,14 @@ from sizers import * from filesys import * -def XMLID(str_id): - return wxXmlResource_GetXMLID(str_id) +def XRCID(str_id): + return wxXmlResource_GetXRCID(str_id) -def XMLCTRL(window, str_id, *args): - return window.FindWindowById(XMLID(str_id)) +def XRCCTRL(window, str_id, *ignoreargs): + return window.FindWindowById(XRCID(str_id)) +XMLID = XRCID +XMLCTRL = XRCCTRL class wxXmlResourcePtr(wxObjectPtr): def __init__(self,this): @@ -129,7 +131,7 @@ def wxXmlResource(*_args,**_kwargs): #-------------- FUNCTION WRAPPERS ------------------ -wxXmlResource_GetXMLID = xrcc.wxXmlResource_GetXMLID +wxXmlResource_GetXRCID = xrcc.wxXmlResource_GetXRCID def wxXmlResource_Get(*_args, **_kwargs): val = apply(xrcc.wxXmlResource_Get,_args,_kwargs) diff --git a/wxPython/demo/FontEnumerator.py b/wxPython/demo/FontEnumerator.py index bbad99dffb..5ada2dac5c 100644 --- a/wxPython/demo/FontEnumerator.py +++ b/wxPython/demo/FontEnumerator.py @@ -28,12 +28,23 @@ class TestPanel(wxPanel): list.sort() - wxStaticText(self, -1, "Face names:", wxPoint(15, 50), wxSize(65, 18)) - self.lb1 = wxListBox(self, 60, wxPoint(80, 50), wxSize(200, 250), + wxStaticText(self, -1, "Face names:", (15, 50), (65, 18)) + self.lb1 = wxListBox(self, -1, (80, 50), (200, 250), list, wxLB_SINGLE) + EVT_LISTBOX(self, self.lb1.GetId(), self.OnSelect) + + self.txt = wxStaticText(self, -1, "Sample text...", (285, 50)) + self.lb1.SetSelection(0) + def OnSelect(self, evt): + face = self.lb1.GetStringSelection() + font = wxFont(28, wxDEFAULT, wxNORMAL, wxNORMAL, false, face) + self.txt.SetFont(font) + self.txt.SetSize(self.txt.GetBestSize()) + + #---------------------------------------------------------------------- diff --git a/wxPython/demo/wxGenericDirCtrl.py b/wxPython/demo/wxGenericDirCtrl.py index 3d275bebe6..6799b1f93f 100644 --- a/wxPython/demo/wxGenericDirCtrl.py +++ b/wxPython/demo/wxGenericDirCtrl.py @@ -8,13 +8,13 @@ class TestPanel(wxPanel): self.log = log txt1 = wxStaticText(self, -1, "style=0") - dir1 = wxGenericDirCtrl(self, -1, size=(200,250), style=0) + dir1 = wxGenericDirCtrl(self, -1, size=(200,225), style=0) txt2 = wxStaticText(self, -1, "wxDIRCTRL_DIR_ONLY") - dir2 = wxGenericDirCtrl(self, -1, size=(200,250), style=wxDIRCTRL_DIR_ONLY) + dir2 = wxGenericDirCtrl(self, -1, size=(200,225), style=wxDIRCTRL_DIR_ONLY) txt3 = wxStaticText(self, -1, "wxDIRCTRL_SHOW_FILTERS") - dir3 = wxGenericDirCtrl(self, -1, size=(200,250), style=wxDIRCTRL_SHOW_FILTERS, + dir3 = wxGenericDirCtrl(self, -1, size=(200,225), style=wxDIRCTRL_SHOW_FILTERS, filter="All files (*.*)|*.*|Python files (*.py)|*.py") sz = wxFlexGridSizer(cols=3, hgap=5, vgap=5) diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 0ce563d9c5..dcd142526e 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -465,9 +465,6 @@ enum { wxLI_HORIZONTAL, wxLI_VERTICAL, - wxHW_SCROLLBAR_NEVER, - wxHW_SCROLLBAR_AUTO, - wxJOYSTICK1, wxJOYSTICK2, wxJOY_BUTTON1, diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 497741dcc6..59e6dc9c33 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -73,6 +73,27 @@ enum { }; +enum { + wxHW_SCROLLBAR_NEVER, + wxHW_SCROLLBAR_AUTO, +}; + + +// enums for wxHtmlWindow::OnOpeningURL +enum wxHtmlOpeningStatus +{ + wxHTML_OPEN, + wxHTML_BLOCK, + wxHTML_REDIRECT +}; + +enum wxHtmlURLType +{ + wxHTML_URL_PAGE, + wxHTML_URL_IMAGE, + wxHTML_URL_OTHER +}; + //--------------------------------------------------------------------------- class wxHtmlLinkInfo : public wxObject { @@ -127,9 +148,7 @@ public: void PushTagHandler(wxHtmlTagHandler* handler, wxString tags); void PopTagHandler(); - // Returns TRUE if the parser is allowed to open given URL (may be forbidden - // for security reasons) - virtual bool CanOpenURL(const wxString& url) const { return TRUE; } + // virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const; // void AddText(const char* txt) = 0; // void AddTag(const wxHtmlTag& tag); @@ -427,10 +446,14 @@ public: void OnLinkClicked(const wxHtmlLinkInfo& link); void base_OnLinkClicked(const wxHtmlLinkInfo& link); + wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const; + DEC_PYCALLBACK__STRING(OnSetTitle); DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover); DEC_PYCALLBACK__CELLINTINTME(OnCellClicked); - DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL); +// DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL); PYPRIVATE; }; @@ -438,7 +461,7 @@ IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow ); IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover); IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked); -IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL); +// IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { @@ -457,6 +480,40 @@ void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { wxHtmlWindow::OnLinkClicked(link); } + +wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const { + bool found; + wxHtmlOpeningStatus rval; + wxPyBeginBlockThreads(); + if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) { + PyObject* ro; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(is)", type, url.c_str())); + if (PyString_Check(ro) +#if PYTHON_API_VERSION >= 1009 + || PyUnicode_Check(ro) +#endif + ) { + PyObject* str = PyObject_Str(ro); + *redirect = PyString_AsString(str); + Py_DECREF(str); + rval = wxHTML_REDIRECT; + } + else { + PyObject* num = PyNumber_Int(ro); + rval = (wxHtmlOpeningStatus)PyInt_AsLong(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + wxPyEndBlockThreads(); + if (! found) + rval = wxHtmlWindow::OnOpeningURL(type, url, redirect); + return rval; +} + + %} diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index af6c141f00..c484030fbd 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -377,7 +377,7 @@ wxString wxGetFullHostName(); wxString wxGetUserId(); wxString wxGetUserName(); wxString wxGetHomeDir(); - +wxString wxGetUserHome(const char* user = ""); //---------------------------------------------------------------------- diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index dfdefeda5d..91c74c6d80 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -186,6 +186,7 @@ enum wxSystemColour { wxSYS_COLOUR_SCROLLBAR, wxSYS_COLOUR_BACKGROUND, + wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND, wxSYS_COLOUR_ACTIVECAPTION, wxSYS_COLOUR_INACTIVECAPTION, wxSYS_COLOUR_MENU, @@ -200,23 +201,28 @@ enum wxSystemColour wxSYS_COLOUR_HIGHLIGHT, wxSYS_COLOUR_HIGHLIGHTTEXT, wxSYS_COLOUR_BTNFACE, + wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE, wxSYS_COLOUR_BTNSHADOW, + wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW, wxSYS_COLOUR_GRAYTEXT, wxSYS_COLOUR_BTNTEXT, wxSYS_COLOUR_INACTIVECAPTIONTEXT, wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, wxSYS_COLOUR_3DDKSHADOW, wxSYS_COLOUR_3DLIGHT, wxSYS_COLOUR_INFOTEXT, wxSYS_COLOUR_INFOBK, wxSYS_COLOUR_LISTBOX, + wxSYS_COLOUR_HOTLIGHT, + wxSYS_COLOUR_GRADIENTACTIVECAPTION, + wxSYS_COLOUR_GRADIENTINACTIVECAPTION, + wxSYS_COLOUR_MENUHILIGHT, + wxSYS_COLOUR_MENUBAR, - wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND, - wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE, - wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW, - wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, - wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, - wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT + wxSYS_COLOUR_MAX }; // possible values for wxSystemSettings::GetMetric() parameter diff --git a/wxPython/src/msw/html.cpp b/wxPython/src/msw/html.cpp index ecba04ab38..04231f9354 100644 --- a/wxPython/src/msw/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -206,10 +206,14 @@ public: void OnLinkClicked(const wxHtmlLinkInfo& link); void base_OnLinkClicked(const wxHtmlLinkInfo& link); + wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const; + DEC_PYCALLBACK__STRING(OnSetTitle); DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover); DEC_PYCALLBACK__CELLINTINTME(OnCellClicked); - DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL); +// DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL); PYPRIVATE; }; @@ -217,7 +221,7 @@ IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow ); IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover); IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked); -IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL); +// IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { @@ -237,6 +241,40 @@ void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { } +wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const { + bool found; + wxHtmlOpeningStatus rval; + wxPyBeginBlockThreads(); + if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) { + PyObject* ro; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(is)", type, url.c_str())); + if (PyString_Check(ro) +#if PYTHON_API_VERSION >= 1009 + || PyUnicode_Check(ro) +#endif + ) { + PyObject* str = PyObject_Str(ro); + *redirect = PyString_AsString(str); + Py_DECREF(str); + rval = wxHTML_REDIRECT; + } + else { + PyObject* num = PyNumber_Int(ro); + rval = (wxHtmlOpeningStatus)PyInt_AsLong(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + wxPyEndBlockThreads(); + if (! found) + rval = wxHtmlWindow::OnOpeningURL(type, url, redirect); + return rval; +} + + + void wxHtmlWindow_AddFilter(wxHtmlFilter *filter) { wxHtmlWindow::AddFilter(filter); } @@ -1268,58 +1306,6 @@ static PyObject *_wrap_wxHtmlParser_PopTagHandler(PyObject *self, PyObject *args return _resultobj; } -#define wxHtmlParser_CanOpenURL(_swigobj,_swigarg0) (_swigobj->CanOpenURL(_swigarg0)) -static PyObject *_wrap_wxHtmlParser_CanOpenURL(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxHtmlParser * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","url", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_CanOpenURL",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_CanOpenURL. Expected _wxHtmlParser_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlParser_CanOpenURL(_arg0,*_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - static void *SwigwxHtmlWinParserTowxHtmlParser(void *ptr) { wxHtmlWinParser *src; wxHtmlParser *dest; @@ -4178,7 +4164,7 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject int _arg1 = (int ) -1; wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; - int _arg4 = (int ) wxHW_SCROLLBAR_AUTO; + int _arg4 = (int ) (wxHW_SCROLLBAR_AUTO); char * _arg5 = (char *) "htmlWindow"; PyObject * _argo0 = 0; wxPoint temp; @@ -4261,7 +4247,7 @@ static PyObject *_wrap_wxHtmlWindow_Create(PyObject *self, PyObject *args, PyObj int _arg2 = (int ) -1; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; - int _arg5 = (int ) wxHW_SCROLLBAR_AUTO; + int _arg5 = (int ) (wxHW_SCROLLBAR_AUTO); char * _arg6 = (char *) "htmlWindow"; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -6633,7 +6619,6 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWinParser_GetDC", (PyCFunction) _wrap_wxHtmlWinParser_GetDC, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWinParser_SetDC", (PyCFunction) _wrap_wxHtmlWinParser_SetDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWinParser", (PyCFunction) _wrap_new_wxHtmlWinParser, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlParser_CanOpenURL", (PyCFunction) _wrap_wxHtmlParser_CanOpenURL, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_PopTagHandler", (PyCFunction) _wrap_wxHtmlParser_PopTagHandler, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_PushTagHandler", (PyCFunction) _wrap_wxHtmlParser_PushTagHandler, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_GetSource", (PyCFunction) _wrap_wxHtmlParser_GetSource, METH_VARARGS | METH_KEYWORDS }, @@ -6828,6 +6813,14 @@ SWIGEXPORT(void) inithtmlc() { PyDict_SetItemString(d,"wxHTML_COND_ISANCHOR", PyInt_FromLong((long) wxHTML_COND_ISANCHOR)); PyDict_SetItemString(d,"wxHTML_COND_ISIMAGEMAP", PyInt_FromLong((long) wxHTML_COND_ISIMAGEMAP)); PyDict_SetItemString(d,"wxHTML_COND_USER", PyInt_FromLong((long) wxHTML_COND_USER)); + PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER)); + PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO)); + PyDict_SetItemString(d,"wxHTML_OPEN", PyInt_FromLong((long) wxHTML_OPEN)); + PyDict_SetItemString(d,"wxHTML_BLOCK", PyInt_FromLong((long) wxHTML_BLOCK)); + PyDict_SetItemString(d,"wxHTML_REDIRECT", PyInt_FromLong((long) wxHTML_REDIRECT)); + PyDict_SetItemString(d,"wxHTML_URL_PAGE", PyInt_FromLong((long) wxHTML_URL_PAGE)); + PyDict_SetItemString(d,"wxHTML_URL_IMAGE", PyInt_FromLong((long) wxHTML_URL_IMAGE)); + PyDict_SetItemString(d,"wxHTML_URL_OTHER", PyInt_FromLong((long) wxHTML_URL_OTHER)); PyDict_SetItemString(d,"wxPAGE_ODD", PyInt_FromLong((long) wxPAGE_ODD)); PyDict_SetItemString(d,"wxPAGE_EVEN", PyInt_FromLong((long) wxPAGE_EVEN)); PyDict_SetItemString(d,"wxPAGE_ALL", PyInt_FromLong((long) wxPAGE_ALL)); diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index 76baf4423d..1f0283d745 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -145,9 +145,6 @@ class wxHtmlParserPtr(wxObjectPtr): def PopTagHandler(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_PopTagHandler,(self,) + _args, _kwargs) return val - def CanOpenURL(self, *_args, **_kwargs): - val = apply(htmlc.wxHtmlParser_CanOpenURL,(self,) + _args, _kwargs) - return val def __repr__(self): return "" % (self.this,) class wxHtmlParser(wxHtmlParserPtr): @@ -756,6 +753,14 @@ wxHTML_INDENT_ALL = htmlc.wxHTML_INDENT_ALL wxHTML_COND_ISANCHOR = htmlc.wxHTML_COND_ISANCHOR wxHTML_COND_ISIMAGEMAP = htmlc.wxHTML_COND_ISIMAGEMAP wxHTML_COND_USER = htmlc.wxHTML_COND_USER +wxHW_SCROLLBAR_NEVER = htmlc.wxHW_SCROLLBAR_NEVER +wxHW_SCROLLBAR_AUTO = htmlc.wxHW_SCROLLBAR_AUTO +wxHTML_OPEN = htmlc.wxHTML_OPEN +wxHTML_BLOCK = htmlc.wxHTML_BLOCK +wxHTML_REDIRECT = htmlc.wxHTML_REDIRECT +wxHTML_URL_PAGE = htmlc.wxHTML_URL_PAGE +wxHTML_URL_IMAGE = htmlc.wxHTML_URL_IMAGE +wxHTML_URL_OTHER = htmlc.wxHTML_URL_OTHER wxPAGE_ODD = htmlc.wxPAGE_ODD wxPAGE_EVEN = htmlc.wxPAGE_EVEN wxPAGE_ALL = htmlc.wxPAGE_ALL diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 98f05e922b..a7f7c62e53 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -837,6 +837,30 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char * _arg0 = (char *) ""; + char *_kwnames[] = { "user", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:wxGetUserHome",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetUserHome(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxAcceleratorEntry * _result; @@ -4166,6 +4190,7 @@ static PyMethodDef misccMethods[] = { { "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS }, { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS }, { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index 13e92a9c84..da15ae6345 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -603,6 +603,8 @@ wxGetUserName = miscc.wxGetUserName wxGetHomeDir = miscc.wxGetHomeDir +wxGetUserHome = miscc.wxGetUserHome + def wxGetAccelFromString(*_args, **_kwargs): val = apply(miscc.wxGetAccelFromString,_args,_kwargs) if val: val = wxAcceleratorEntryPtr(val) diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index b42cd9923f..c24af80c09 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -10625,6 +10625,7 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); + PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); @@ -10639,22 +10640,27 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); PyDict_SetItemString(d,"wxSYS_COLOUR_LISTBOX", PyInt_FromLong((long) wxSYS_COLOUR_LISTBOX)); - PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HOTLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HOTLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRADIENTACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_GRADIENTACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRADIENTINACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_GRADIENTINACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_MENUHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUBAR", PyInt_FromLong((long) wxSYS_COLOUR_MENUBAR)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MAX", PyInt_FromLong((long) wxSYS_COLOUR_MAX)); PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index 135de3b950..07c2c083d5 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -1216,6 +1216,7 @@ wxSYS_SYSTEM_FIXED_FONT = misc2c.wxSYS_SYSTEM_FIXED_FONT wxSYS_DEFAULT_GUI_FONT = misc2c.wxSYS_DEFAULT_GUI_FONT wxSYS_COLOUR_SCROLLBAR = misc2c.wxSYS_COLOUR_SCROLLBAR wxSYS_COLOUR_BACKGROUND = misc2c.wxSYS_COLOUR_BACKGROUND +wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_ACTIVECAPTION = misc2c.wxSYS_COLOUR_ACTIVECAPTION wxSYS_COLOUR_INACTIVECAPTION = misc2c.wxSYS_COLOUR_INACTIVECAPTION wxSYS_COLOUR_MENU = misc2c.wxSYS_COLOUR_MENU @@ -1230,22 +1231,27 @@ wxSYS_COLOUR_APPWORKSPACE = misc2c.wxSYS_COLOUR_APPWORKSPACE wxSYS_COLOUR_HIGHLIGHT = misc2c.wxSYS_COLOUR_HIGHLIGHT wxSYS_COLOUR_HIGHLIGHTTEXT = misc2c.wxSYS_COLOUR_HIGHLIGHTTEXT wxSYS_COLOUR_BTNFACE = misc2c.wxSYS_COLOUR_BTNFACE +wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNSHADOW = misc2c.wxSYS_COLOUR_BTNSHADOW +wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_GRAYTEXT = misc2c.wxSYS_COLOUR_GRAYTEXT wxSYS_COLOUR_BTNTEXT = misc2c.wxSYS_COLOUR_BTNTEXT wxSYS_COLOUR_INACTIVECAPTIONTEXT = misc2c.wxSYS_COLOUR_INACTIVECAPTIONTEXT wxSYS_COLOUR_BTNHIGHLIGHT = misc2c.wxSYS_COLOUR_BTNHIGHLIGHT +wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT +wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT +wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_3DDKSHADOW = misc2c.wxSYS_COLOUR_3DDKSHADOW wxSYS_COLOUR_3DLIGHT = misc2c.wxSYS_COLOUR_3DLIGHT wxSYS_COLOUR_INFOTEXT = misc2c.wxSYS_COLOUR_INFOTEXT wxSYS_COLOUR_INFOBK = misc2c.wxSYS_COLOUR_INFOBK wxSYS_COLOUR_LISTBOX = misc2c.wxSYS_COLOUR_LISTBOX -wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP -wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE -wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW -wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT -wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT -wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT +wxSYS_COLOUR_HOTLIGHT = misc2c.wxSYS_COLOUR_HOTLIGHT +wxSYS_COLOUR_GRADIENTACTIVECAPTION = misc2c.wxSYS_COLOUR_GRADIENTACTIVECAPTION +wxSYS_COLOUR_GRADIENTINACTIVECAPTION = misc2c.wxSYS_COLOUR_GRADIENTINACTIVECAPTION +wxSYS_COLOUR_MENUHILIGHT = misc2c.wxSYS_COLOUR_MENUHILIGHT +wxSYS_COLOUR_MENUBAR = misc2c.wxSYS_COLOUR_MENUBAR +wxSYS_COLOUR_MAX = misc2c.wxSYS_COLOUR_MAX wxSYS_MOUSE_BUTTONS = misc2c.wxSYS_MOUSE_BUTTONS wxSYS_BORDER_X = misc2c.wxSYS_BORDER_X wxSYS_BORDER_Y = misc2c.wxSYS_BORDER_Y diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index 763783f9b5..30956bf8c5 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -3317,6 +3317,43 @@ static PyObject *_wrap_wxWindow_PushEventHandler(PyObject *self, PyObject *args, return _resultobj; } +#define wxWindow_RemoveEventHandler(_swigobj,_swigarg0) (_swigobj->RemoveEventHandler(_swigarg0)) +static PyObject *_wrap_wxWindow_RemoveEventHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + wxEvtHandler * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","handler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_RemoveEventHandler",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_RemoveEventHandler. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_RemoveEventHandler. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxWindow_RemoveEventHandler(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxWindow_PopupMenuXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10675,6 +10712,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PopupMenu", (PyCFunction) _wrap_wxWindow_PopupMenu, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PopupMenuXY", (PyCFunction) _wrap_wxWindow_PopupMenuXY, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_RemoveEventHandler", (PyCFunction) _wrap_wxWindow_RemoveEventHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PushEventHandler", (PyCFunction) _wrap_wxWindow_PushEventHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PopEventHandler", (PyCFunction) _wrap_wxWindow_PopEventHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Move", (PyCFunction) _wrap_wxWindow_Move, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index a0f2fadefa..88dcf467f1 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -331,6 +331,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def PushEventHandler(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_PushEventHandler,(self,) + _args, _kwargs) return val + def RemoveEventHandler(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_RemoveEventHandler,(self,) + _args, _kwargs) + return val def PopupMenuXY(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_PopupMenuXY,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index 0fd7c3cca2..938fb60dcf 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -2198,8 +2198,6 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxNB_MULTILINE", PyInt_FromLong((long) wxNB_MULTILINE)); PyDict_SetItemString(d,"wxLI_HORIZONTAL", PyInt_FromLong((long) wxLI_HORIZONTAL)); PyDict_SetItemString(d,"wxLI_VERTICAL", PyInt_FromLong((long) wxLI_VERTICAL)); - PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER)); - PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO)); PyDict_SetItemString(d,"wxJOYSTICK1", PyInt_FromLong((long) wxJOYSTICK1)); PyDict_SetItemString(d,"wxJOYSTICK2", PyInt_FromLong((long) wxJOYSTICK2)); PyDict_SetItemString(d,"wxJOY_BUTTON1", PyInt_FromLong((long) wxJOY_BUTTON1)); diff --git a/wxPython/src/msw/wx.py b/wxPython/src/msw/wx.py index cf1892407e..591d9e54fd 100644 --- a/wxPython/src/msw/wx.py +++ b/wxPython/src/msw/wx.py @@ -431,8 +431,6 @@ wxNB_BOTTOM = wxc.wxNB_BOTTOM wxNB_MULTILINE = wxc.wxNB_MULTILINE wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL wxLI_VERTICAL = wxc.wxLI_VERTICAL -wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER -wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO wxJOYSTICK1 = wxc.wxJOYSTICK1 wxJOYSTICK2 = wxc.wxJOYSTICK2 wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1 diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 133605331c..4867c07566 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -283,6 +283,13 @@ public: wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE); void PushEventHandler(wxEvtHandler* handler); + // find the given handler in the event handler chain and remove (but + // not delete) it from the event handler chain, return TRUE if it was + // found and FALSE otherwise (this also results in an assert failure so + // this function should only be called when the handler is supposed to + // be there) + bool RemoveEventHandler(wxEvtHandler *handler); + %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y); bool PopupMenu(wxMenu *menu, const wxPoint& pos);