From 298ae144957fbf51f26d500b6bc908a9e31cac80 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 27 May 2002 18:24:27 +0000 Subject: [PATCH] SWIGged updates for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/cmndlgs.cpp | 2 +- wxPython/src/gtk/events.cpp | 209 ++++++++++++++++++++++++++++++++++ wxPython/src/gtk/events.py | 30 +++++ wxPython/src/gtk/gdi.cpp | 40 +++++++ wxPython/src/gtk/gdi.py | 3 + wxPython/src/gtk/misc2.cpp | 104 +++-------------- wxPython/src/gtk/misc2.py | 18 +-- wxPython/src/gtk/windows.cpp | 202 +++++++++++++++++++++++++++++++- wxPython/src/gtk/windows.py | 19 ++++ wxPython/src/gtk/windows2.cpp | 9 ++ wxPython/src/gtk/windows2.py | 2 +- wxPython/src/gtk/wx.cpp | 8 +- wxPython/src/gtk/wx.py | 13 ++- 13 files changed, 547 insertions(+), 112 deletions(-) diff --git a/wxPython/src/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp index b4859c2455..847d2aad57 100644 --- a/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/cmndlgs.cpp @@ -2789,7 +2789,7 @@ static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); + _result = (wxFontDialog *)new_wxFontDialog(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index f5568d7daf..282252098f 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -3212,6 +3212,207 @@ static PyObject *_wrap_wxMouseCaptureChangedEvent_GetCapturedWindow(PyObject *se return _resultobj; } +static void *SwigwxSetCursorEventTowxEvent(void *ptr) { + wxSetCursorEvent *src; + wxEvent *dest; + src = (wxSetCursorEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +static void *SwigwxSetCursorEventTowxObject(void *ptr) { + wxSetCursorEvent *src; + wxObject *dest; + src = (wxSetCursorEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxSetCursorEvent(_swigarg0,_swigarg1) (new wxSetCursorEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxSetCursorEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSetCursorEvent * _result; + wxCoord _arg0 = (wxCoord ) 0; + wxCoord _arg1 = (wxCoord ) 0; + char *_kwnames[] = { "x","y", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxSetCursorEvent",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSetCursorEvent *)new_wxSetCursorEvent(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSetCursorEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSetCursorEvent_GetX(_swigobj) (_swigobj->GetX()) +static PyObject *_wrap_wxSetCursorEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCoord _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetX. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCoord )wxSetCursorEvent_GetX(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSetCursorEvent_GetY(_swigobj) (_swigobj->GetY()) +static PyObject *_wrap_wxSetCursorEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCoord _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetY. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCoord )wxSetCursorEvent_GetY(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSetCursorEvent_SetCursor(_swigobj,_swigarg0) (_swigobj->SetCursor(_swigarg0)) +static PyObject *_wrap_wxSetCursorEvent_SetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSetCursorEvent * _arg0; + wxCursor * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cursor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSetCursorEvent_SetCursor",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_SetCursor. Expected _wxSetCursorEvent_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSetCursorEvent_SetCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSetCursorEvent_SetCursor(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSetCursorEvent_GetCursor(_swigobj) (_swigobj->GetCursor()) +static PyObject *_wrap_wxSetCursorEvent_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetCursor. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + const wxCursor & _result_ref = wxSetCursorEvent_GetCursor(_arg0); + _result = (wxCursor *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSetCursorEvent_HasCursor(_swigobj) (_swigobj->HasCursor()) +static PyObject *_wrap_wxSetCursorEvent_HasCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSetCursorEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_HasCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_HasCursor. Expected _wxSetCursorEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSetCursorEvent_HasCursor(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxKeyEventTowxEvent(void *ptr) { wxKeyEvent *src; wxEvent *dest; @@ -7497,6 +7698,12 @@ static PyMethodDef eventscMethods[] = { { "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ControlDown", (PyCFunction) _wrap_wxKeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, { "new_wxKeyEvent", (PyCFunction) _wrap_new_wxKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_HasCursor", (PyCFunction) _wrap_wxSetCursorEvent_HasCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_GetCursor", (PyCFunction) _wrap_wxSetCursorEvent_GetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_SetCursor", (PyCFunction) _wrap_wxSetCursorEvent_SetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_GetY", (PyCFunction) _wrap_wxSetCursorEvent_GetY, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursorEvent_GetX", (PyCFunction) _wrap_wxSetCursorEvent_GetX, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSetCursorEvent", (PyCFunction) _wrap_new_wxSetCursorEvent, METH_VARARGS | METH_KEYWORDS }, { "wxMouseCaptureChangedEvent_GetCapturedWindow", (PyCFunction) _wrap_wxMouseCaptureChangedEvent_GetCapturedWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxMouseCaptureChangedEvent", (PyCFunction) _wrap_new_wxMouseCaptureChangedEvent, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_m_linesPerAction_get", (PyCFunction) _wrap_wxMouseEvent_m_linesPerAction_get, METH_VARARGS | METH_KEYWORDS }, @@ -7636,6 +7843,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvent","_wxMoveEvent",SwigwxMoveEventTowxEvent}, { "_wxEvent","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxEvent}, { "_wxEvent","_wxKeyEvent",SwigwxKeyEventTowxEvent}, + { "_wxEvent","_wxSetCursorEvent",SwigwxSetCursorEventTowxEvent}, { "_wxEvent","_wxMouseCaptureChangedEvent",SwigwxMouseCaptureChangedEventTowxEvent}, { "_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent}, { "_wxEvent","_wxSpinEvent",SwigwxSpinEventTowxEvent}, @@ -7728,6 +7936,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxMoveEvent",SwigwxMoveEventTowxObject}, { "_wxObject","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxObject}, { "_wxObject","_wxKeyEvent",SwigwxKeyEventTowxObject}, + { "_wxObject","_wxSetCursorEvent",SwigwxSetCursorEventTowxObject}, { "_wxObject","_wxMouseCaptureChangedEvent",SwigwxMouseCaptureChangedEventTowxObject}, { "_wxObject","_wxMouseEvent",SwigwxMouseEventTowxObject}, { "_wxObject","_wxSpinEvent",SwigwxSpinEventTowxObject}, diff --git a/wxPython/src/gtk/events.py b/wxPython/src/gtk/events.py index 067c8ed1f5..14c4797811 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/events.py @@ -406,6 +406,36 @@ class wxMouseCaptureChangedEvent(wxMouseCaptureChangedEventPtr): +class wxSetCursorEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetX(self, *_args, **_kwargs): + val = apply(eventsc.wxSetCursorEvent_GetX,(self,) + _args, _kwargs) + return val + def GetY(self, *_args, **_kwargs): + val = apply(eventsc.wxSetCursorEvent_GetY,(self,) + _args, _kwargs) + return val + def SetCursor(self, *_args, **_kwargs): + val = apply(eventsc.wxSetCursorEvent_SetCursor,(self,) + _args, _kwargs) + return val + def GetCursor(self, *_args, **_kwargs): + val = apply(eventsc.wxSetCursorEvent_GetCursor,(self,) + _args, _kwargs) + if val: val = wxCursorPtr(val) + return val + def HasCursor(self, *_args, **_kwargs): + val = apply(eventsc.wxSetCursorEvent_HasCursor,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxSetCursorEvent(wxSetCursorEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(eventsc.new_wxSetCursorEvent,_args,_kwargs) + self.thisown = 1 + + + + class wxKeyEventPtr(wxEventPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index 5e284547ac..fb08fa8702 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -3613,6 +3613,45 @@ static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject return _resultobj; } +static PyObject * wxPen_GetDashes(wxPen *self) { + wxDash* dashes; + int count = self->GetDashes(&dashes); + wxPyBeginBlockThreads(); + PyObject* retval = PyList_New(0); + for (int x=0; x" % (self.this,) class wxPen(wxPenPtr): diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index a1ea157e4e..006c866aad 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -1295,82 +1295,6 @@ static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } -static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "label","parent", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) - return NULL; -{ - _arg0 = wxString_in_helper(_obj0); - if (_arg0 == NULL) - 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 wxFindWindowByLabel. Expected _wxWindow_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "name","parent", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) - return NULL; -{ - _arg0 = wxString_in_helper(_obj0); - if (_arg0 == NULL) - 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 wxFindWindowByName. Expected _wxWindow_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; @@ -2471,17 +2395,17 @@ static PyObject *_wrap_wxSystemSettings_HasFeature(PyObject *self, PyObject *arg return _resultobj; } -static PyObject *_wrap_wxSystemSettings_GetScreen(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxSystemSettings_GetScreenType(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxSystemScreen _result; + wxSystemScreenType _result; char *_kwnames[] = { NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSystemSettings_GetScreen",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSystemSettings_GetScreenType",_kwnames)) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSystemScreen )wxSystemSettings::GetScreenType(); + _result = (wxSystemScreenType )wxSystemSettings::GetScreenType(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2489,17 +2413,17 @@ static PyObject *_wrap_wxSystemSettings_GetScreen(PyObject *self, PyObject *args return _resultobj; } -static PyObject *_wrap_wxSystemSettings_SetScreen(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxSystemSettings_SetScreenType(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxSystemScreen _arg0; + wxSystemScreenType _arg0; char *_kwnames[] = { "screen", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_SetScreen",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_SetScreenType",_kwnames,&_arg0)) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSystemSettings::SetScreen(_arg0); + wxSystemSettings::SetScreenType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10106,8 +10030,8 @@ static PyMethodDef misc2cMethods[] = { { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_SetScreen", (PyCFunction) _wrap_wxSystemSettings_SetScreen, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetScreen", (PyCFunction) _wrap_wxSystemSettings_GetScreen, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_SetScreenType", (PyCFunction) _wrap_wxSystemSettings_SetScreenType, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_GetScreenType", (PyCFunction) _wrap_wxSystemSettings_GetScreenType, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_HasFeature", (PyCFunction) _wrap_wxSystemSettings_HasFeature, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_GetMetric", (PyCFunction) _wrap_wxSystemSettings_GetMetric, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_GetFont", (PyCFunction) _wrap_wxSystemSettings_GetFont, METH_VARARGS | METH_KEYWORDS }, @@ -10150,8 +10074,6 @@ static PyMethodDef misc2cMethods[] = { { "wxGenericFindWindowAtPoint", (PyCFunction) _wrap_wxGenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS }, { "wxGetActiveWindow", (PyCFunction) _wrap_wxGetActiveWindow, METH_VARARGS | METH_KEYWORDS }, { "wxBeginBusyCursor", (PyCFunction) _wrap_wxBeginBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, - { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, { "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS }, { "wxGetClientDisplayRect", (PyCFunction) _wrap_wxGetClientDisplayRect, METH_VARARGS | METH_KEYWORDS }, { "wxClientDisplayRect", (PyCFunction) _wrap_wxClientDisplayRect, METH_VARARGS | METH_KEYWORDS }, @@ -10395,10 +10317,10 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxSYS_CAN_DRAW_FRAME_DECORATIONS", PyInt_FromLong((long) wxSYS_CAN_DRAW_FRAME_DECORATIONS)); PyDict_SetItemString(d,"wxSYS_CAN_ICONIZE_FRAME", PyInt_FromLong((long) wxSYS_CAN_ICONIZE_FRAME)); PyDict_SetItemString(d,"wxSYS_SCREEN_NONE", PyInt_FromLong((long) wxSYS_SCREEN_NONE)); - PyDict_SetItemString(d,"wxSYS_SCREEN_DESKTOP", PyInt_FromLong((long) wxSYS_SCREEN_DESKTOP)); - PyDict_SetItemString(d,"wxSYS_SCREEN_SMALL", PyInt_FromLong((long) wxSYS_SCREEN_SMALL)); - PyDict_SetItemString(d,"wxSYS_SCREEN_PDA", PyInt_FromLong((long) wxSYS_SCREEN_PDA)); PyDict_SetItemString(d,"wxSYS_SCREEN_TINY", PyInt_FromLong((long) wxSYS_SCREEN_TINY)); + PyDict_SetItemString(d,"wxSYS_SCREEN_PDA", PyInt_FromLong((long) wxSYS_SCREEN_PDA)); + PyDict_SetItemString(d,"wxSYS_SCREEN_SMALL", PyInt_FromLong((long) wxSYS_SCREEN_SMALL)); + PyDict_SetItemString(d,"wxSYS_SCREEN_DESKTOP", PyInt_FromLong((long) wxSYS_SCREEN_DESKTOP)); PyDict_SetItemString(d,"wxLOG_FatalError", PyInt_FromLong((long) wxLOG_FatalError)); PyDict_SetItemString(d,"wxLOG_Error", PyInt_FromLong((long) wxLOG_Error)); PyDict_SetItemString(d,"wxLOG_Warning", PyInt_FromLong((long) wxLOG_Warning)); diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index 6f063d12c8..3cb4e32448 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -1006,14 +1006,6 @@ def wxGetClientDisplayRect(*_args, **_kwargs): wxSetCursor = misc2c.wxSetCursor -def wxFindWindowByLabel(*_args, **_kwargs): - val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs) - return val - -def wxFindWindowByName(*_args, **_kwargs): - val = apply(misc2c.wxFindWindowByName,_args,_kwargs) - return val - wxBeginBusyCursor = misc2c.wxBeginBusyCursor def wxGetActiveWindow(*_args, **_kwargs): @@ -1126,9 +1118,9 @@ wxSystemSettings_GetMetric = misc2c.wxSystemSettings_GetMetric wxSystemSettings_HasFeature = misc2c.wxSystemSettings_HasFeature -wxSystemSettings_GetScreen = misc2c.wxSystemSettings_GetScreen +wxSystemSettings_GetScreenType = misc2c.wxSystemSettings_GetScreenType -wxSystemSettings_SetScreen = misc2c.wxSystemSettings_SetScreen +wxSystemSettings_SetScreenType = misc2c.wxSystemSettings_SetScreenType wxToolTip_Enable = misc2c.wxToolTip_Enable @@ -1270,10 +1262,10 @@ wxSYS_SWAP_BUTTONS = misc2c.wxSYS_SWAP_BUTTONS wxSYS_CAN_DRAW_FRAME_DECORATIONS = misc2c.wxSYS_CAN_DRAW_FRAME_DECORATIONS wxSYS_CAN_ICONIZE_FRAME = misc2c.wxSYS_CAN_ICONIZE_FRAME wxSYS_SCREEN_NONE = misc2c.wxSYS_SCREEN_NONE -wxSYS_SCREEN_DESKTOP = misc2c.wxSYS_SCREEN_DESKTOP -wxSYS_SCREEN_SMALL = misc2c.wxSYS_SCREEN_SMALL -wxSYS_SCREEN_PDA = misc2c.wxSYS_SCREEN_PDA wxSYS_SCREEN_TINY = misc2c.wxSYS_SCREEN_TINY +wxSYS_SCREEN_PDA = misc2c.wxSYS_SCREEN_PDA +wxSYS_SCREEN_SMALL = misc2c.wxSYS_SCREEN_SMALL +wxSYS_SCREEN_DESKTOP = misc2c.wxSYS_SCREEN_DESKTOP wxLOG_FatalError = misc2c.wxLOG_FatalError wxLOG_Error = misc2c.wxLOG_Error wxLOG_Warning = misc2c.wxLOG_Warning diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index 816b9f667b..c970dccd9f 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -136,9 +136,127 @@ IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); + +wxWindow* wxFindWindowById( long id, const wxWindow *parent = NULL ) { + return wxWindow::FindWindowById(id, parent); +} + +wxWindow* wxFindWindowByName( const wxString& name, + const wxWindow *parent = NULL ) { + return wxWindow::FindWindowByName(name, parent); +} + +wxWindow* wxFindWindowByLabel( const wxString& label, + const wxWindow *parent = NULL ) { + return wxWindow::FindWindowByLabel(label, parent); +} #ifdef __cplusplus extern "C" { #endif +static PyObject *_wrap_wxFindWindowById(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + long _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "id","parent", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l|O:wxFindWindowById",_kwnames,&_arg0,&_argo1)) + 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 wxFindWindowById. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxWindow *)wxFindWindowById(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxString * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "name","parent", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + 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 wxFindWindowByName. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxString * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "label","parent", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + 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 wxFindWindowByLabel. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static void *SwigwxEvtHandlerTowxObject(void *ptr) { wxEvtHandler *src; wxObject *dest; @@ -3577,6 +3695,43 @@ static PyObject *_wrap_wxWindow_RefreshRect(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxWindow_AddChild(_swigobj,_swigarg0) (_swigobj->AddChild(_swigarg0)) +static PyObject *_wrap_wxWindow_AddChild(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","child", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_AddChild",_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_AddChild. Expected _wxWindow_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 wxWindow_AddChild. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_AddChild(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_RemoveChild(_swigobj,_swigarg0) (_swigobj->RemoveChild(_swigarg0)) static PyObject *_wrap_wxWindow_RemoveChild(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4668,6 +4823,7 @@ static PyObject *_wrap_wxWindow_SetClientSize(PyObject *self, PyObject *args, Py #define wxWindow_SetCursor(_swigobj,_swigarg0) (_swigobj->SetCursor(_swigarg0)) static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxWindow * _arg0; wxCursor * _arg1; PyObject * _argo0 = 0; @@ -4693,12 +4849,47 @@ static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetCursor(_arg0,*_arg1); + _result = (bool )wxWindow_SetCursor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxWindow_GetCursor(_swigobj) (_swigobj->GetCursor()) +static PyObject *_wrap_wxWindow_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetCursor",_kwnames,&_argo0)) + 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_GetCursor. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxCursor & _result_ref = wxWindow_GetCursor(_arg0); + _result = (wxCursor *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } @@ -11253,6 +11444,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetTitle", (PyCFunction) _wrap_wxWindow_SetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetExtraStyle", (PyCFunction) _wrap_wxWindow_SetExtraStyle, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetEventHandler", (PyCFunction) _wrap_wxWindow_SetEventHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetCursor", (PyCFunction) _wrap_wxWindow_GetCursor, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetCursor", (PyCFunction) _wrap_wxWindow_SetCursor, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSize", (PyCFunction) _wrap_wxWindow_SetClientSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSizeWH", (PyCFunction) _wrap_wxWindow_SetClientSizeWH, METH_VARARGS | METH_KEYWORDS }, @@ -11285,6 +11477,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_ScreenToClientXY", (PyCFunction) _wrap_wxWindow_ScreenToClientXY, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Reparent", (PyCFunction) _wrap_wxWindow_Reparent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_RemoveChild", (PyCFunction) _wrap_wxWindow_RemoveChild, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_AddChild", (PyCFunction) _wrap_wxWindow_AddChild, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_RefreshRect", (PyCFunction) _wrap_wxWindow_RefreshRect, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Refresh", (PyCFunction) _wrap_wxWindow_Refresh, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS }, @@ -11385,6 +11578,9 @@ static PyMethodDef windowscMethods[] = { { "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, + { "wxFindWindowById", (PyCFunction) _wrap_wxFindWindowById, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 1803ef9da0..1e1bc569d3 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -362,6 +362,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def RefreshRect(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_RefreshRect,(self,) + _args, _kwargs) return val + def AddChild(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_AddChild,(self,) + _args, _kwargs) + return val def RemoveChild(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_RemoveChild,(self,) + _args, _kwargs) return val @@ -460,6 +463,10 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetCursor(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetCursor,(self,) + _args, _kwargs) return val + def GetCursor(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetCursor,(self,) + _args, _kwargs) + if val: val = wxCursorPtr(val) + return val def SetEventHandler(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetEventHandler,(self,) + _args, _kwargs) return val @@ -1105,6 +1112,18 @@ class wxMenuItem(wxMenuItemPtr): #-------------- FUNCTION WRAPPERS ------------------ +def wxFindWindowById(*_args, **_kwargs): + val = apply(windowsc.wxFindWindowById,_args,_kwargs) + return val + +def wxFindWindowByName(*_args, **_kwargs): + val = apply(windowsc.wxFindWindowByName,_args,_kwargs) + return val + +def wxFindWindowByLabel(*_args, **_kwargs): + val = apply(windowsc.wxFindWindowByLabel,_args,_kwargs) + return val + wxValidator_IsSilent = windowsc.wxValidator_IsSilent wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index b72c9cdacf..8585bd45ad 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -1177,6 +1177,14 @@ static PyObject *_wrap_wxNotebook_ResizeChildren(PyObject *self, PyObject *args, return _resultobj; } +static void *SwigwxSplitterEventTowxNotifyEvent(void *ptr) { + wxSplitterEvent *src; + wxNotifyEvent *dest; + src = (wxSplitterEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + static void *SwigwxSplitterEventTowxCommandEvent(void *ptr) { wxSplitterEvent *src; wxCommandEvent *dest; @@ -2318,6 +2326,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, + { "_wxNotifyEvent","_wxSplitterEvent",SwigwxSplitterEventTowxNotifyEvent}, { "_wxNotifyEvent","_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, diff --git a/wxPython/src/gtk/windows2.py b/wxPython/src/gtk/windows2.py index 66c94cadc6..539b0ab995 100644 --- a/wxPython/src/gtk/windows2.py +++ b/wxPython/src/gtk/windows2.py @@ -129,7 +129,7 @@ def wxPreNotebook(*_args,**_kwargs): return val -class wxSplitterEventPtr(wxCommandEventPtr): +class wxSplitterEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 2760842bad..99f8fc4490 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -1942,8 +1942,13 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxSB_VERTICAL", PyInt_FromLong((long) wxSB_VERTICAL)); PyDict_SetItemString(d,"wxST_SIZEGRIP", PyInt_FromLong((long) wxST_SIZEGRIP)); PyDict_SetItemString(d,"wxST_NO_AUTORESIZE", PyInt_FromLong((long) wxST_NO_AUTORESIZE)); - PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW)); PyDict_SetItemString(d,"wxBU_NOAUTODRAW", PyInt_FromLong((long) wxBU_NOAUTODRAW)); + PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW)); + PyDict_SetItemString(d,"wxBU_LEFT", PyInt_FromLong((long) wxBU_LEFT)); + PyDict_SetItemString(d,"wxBU_TOP", PyInt_FromLong((long) wxBU_TOP)); + PyDict_SetItemString(d,"wxBU_RIGHT", PyInt_FromLong((long) wxBU_RIGHT)); + PyDict_SetItemString(d,"wxBU_BOTTOM", PyInt_FromLong((long) wxBU_BOTTOM)); + PyDict_SetItemString(d,"wxBU_EXACTFIT", PyInt_FromLong((long) wxBU_EXACTFIT)); PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL)); PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL)); PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS)); @@ -2487,6 +2492,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_NC_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_NC_LEFT_DCLICK)); PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK)); PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_SET_CURSOR", PyInt_FromLong((long) wxEVT_SET_CURSOR)); PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR)); PyDict_SetItemString(d,"wxEVT_KEY_DOWN", PyInt_FromLong((long) wxEVT_KEY_DOWN)); PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 1e76021ea0..f1bb17fd52 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -282,8 +282,13 @@ wxSB_HORIZONTAL = wxc.wxSB_HORIZONTAL wxSB_VERTICAL = wxc.wxSB_VERTICAL wxST_SIZEGRIP = wxc.wxST_SIZEGRIP wxST_NO_AUTORESIZE = wxc.wxST_NO_AUTORESIZE -wxBU_AUTODRAW = wxc.wxBU_AUTODRAW wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW +wxBU_AUTODRAW = wxc.wxBU_AUTODRAW +wxBU_LEFT = wxc.wxBU_LEFT +wxBU_TOP = wxc.wxBU_TOP +wxBU_RIGHT = wxc.wxBU_RIGHT +wxBU_BOTTOM = wxc.wxBU_BOTTOM +wxBU_EXACTFIT = wxc.wxBU_EXACTFIT wxSP_VERTICAL = wxc.wxSP_VERTICAL wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS @@ -827,6 +832,7 @@ wxEVT_NC_LEAVE_WINDOW = wxc.wxEVT_NC_LEAVE_WINDOW wxEVT_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK +wxEVT_SET_CURSOR = wxc.wxEVT_SET_CURSOR wxEVT_CHAR = wxc.wxEVT_CHAR wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN wxEVT_KEY_UP = wxc.wxEVT_KEY_UP @@ -1034,6 +1040,9 @@ def EVT_WINDOW_CREATE(win, func): def EVT_WINDOW_DESTROY(win, func): win.Connect(-1, -1, wxEVT_DESTROY, func) +def EVT_SET_CURSOR(win, func): + win.Connect(-1, -1, wxEVT_SET_CURSOR, func) + def EVT_IDLE(win, func): @@ -1623,7 +1632,7 @@ class wxPyOnDemandOutputWindow: self.frame.Close() -_defRedirect = (wxPlatform == '__WXMSW__') +_defRedirect = (wxPlatform == '__WXMSW__' or wxPlatform == '__WXMAC__') #---------------------------------------------------------------------- # The main application class. Derive from this and implement an OnInit -- 2.45.2