From 00360d4699d23a01c1c62d5d1c128bd9739a239d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 11 Dec 2001 17:04:08 +0000 Subject: [PATCH] SWIGged code update for wxMac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/mac/calendar.cpp | 120 +++++++------------------ wxPython/src/mac/calendar.py | 20 ++--- wxPython/src/mac/controls.cpp | 96 +++++--------------- wxPython/src/mac/controls.py | 16 ++-- wxPython/src/mac/controls2.cpp | 126 +++++++++++++++------------ wxPython/src/mac/controls2.py | 16 ++-- wxPython/src/mac/events.cpp | 92 +++++++++++++++++++ wxPython/src/mac/events.py | 17 ++++ wxPython/src/mac/frames.cpp | 123 ++------------------------ wxPython/src/mac/frames.py | 17 +--- wxPython/src/mac/gdi.cpp | 155 +++++++++++++++++++++++---------- wxPython/src/mac/gdi.py | 37 +++++--- wxPython/src/mac/grid.cpp | 36 ++------ wxPython/src/mac/grid.py | 6 +- wxPython/src/mac/html.cpp | 109 +++++++++++++++++++---- wxPython/src/mac/html.py | 13 ++- wxPython/src/mac/sizers.cpp | 2 +- wxPython/src/mac/stattool.cpp | 36 ++------ wxPython/src/mac/stattool.py | 6 +- wxPython/src/mac/windows.cpp | 20 ++--- wxPython/src/mac/windows.py | 3 +- wxPython/src/mac/windows3.cpp | 1 + wxPython/src/mac/wx.cpp | 17 ++-- wxPython/src/mac/wx.py | 19 ++-- 24 files changed, 563 insertions(+), 540 deletions(-) diff --git a/wxPython/src/mac/calendar.cpp b/wxPython/src/mac/calendar.cpp index 6c0f8da5db..e2c6e577df 100644 --- a/wxPython/src/mac/calendar.cpp +++ b/wxPython/src/mac/calendar.cpp @@ -585,18 +585,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetTextColour(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarDateAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarDateAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -621,18 +615,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBackgroundColour(PyObject *self, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarDateAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarDateAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -657,18 +645,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBorderColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarDateAttr_GetBorderColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarDateAttr_GetBorderColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -693,18 +675,12 @@ static PyObject *_wrap_wxCalendarDateAttr_GetFont(PyObject *self, PyObject *args } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxCalendarDateAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxCalendarDateAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1473,18 +1449,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourFg(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourFg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHeaderColourFg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1509,18 +1479,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourBg(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourBg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHeaderColourBg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1589,18 +1553,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourFg(PyObject *self, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourFg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHighlightColourFg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1625,18 +1583,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourBg(PyObject *self, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourBg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHighlightColourBg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1705,18 +1657,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourFg(PyObject *self, PyObjec } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourFg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHolidayColourFg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1741,18 +1687,12 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourBg(PyObject *self, PyObjec } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourBg(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxCalendarCtrl_GetHolidayColourBg(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/mac/calendar.py b/wxPython/src/mac/calendar.py index ab9fa83fb3..8821a2a7a9 100644 --- a/wxPython/src/mac/calendar.py +++ b/wxPython/src/mac/calendar.py @@ -77,19 +77,19 @@ class wxCalendarDateAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBorderColour(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetBorderColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetBorder(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarDateAttr_GetBorder,(self,) + _args, _kwargs) @@ -175,33 +175,33 @@ class wxCalendarCtrlPtr(wxControlPtr): return val def GetHeaderColourFg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHeaderColourFg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetHeaderColourBg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHeaderColourBg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetHighlightColours(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_SetHighlightColours,(self,) + _args, _kwargs) return val def GetHighlightColourFg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHighlightColourFg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetHighlightColourBg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHighlightColourBg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetHolidayColours(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_SetHolidayColours,(self,) + _args, _kwargs) return val def GetHolidayColourFg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHolidayColourFg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetHolidayColourBg(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetHolidayColourBg,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetAttr(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_GetAttr,(self,) + _args, _kwargs) diff --git a/wxPython/src/mac/controls.cpp b/wxPython/src/mac/controls.cpp index 78a7a85251..a7b1ddd9ef 100644 --- a/wxPython/src/mac/controls.cpp +++ b/wxPython/src/mac/controls.cpp @@ -1482,18 +1482,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *a } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapLabel(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1518,18 +1512,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapDisabled(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapDisabled(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1554,18 +1542,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapFocus(PyObject *self, PyObject *a } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapFocus(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1590,18 +1572,12 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapSelected(PyObject *self, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapSelected(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5781,18 +5757,12 @@ static PyObject *_wrap_wxTextAttr_GetTextColour(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTextAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5817,18 +5787,12 @@ static PyObject *_wrap_wxTextAttr_GetBackgroundColour(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTextAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5853,18 +5817,12 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxTextAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxTextAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -8539,18 +8497,12 @@ static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxStaticBitmap_GetBitmap(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/mac/controls.py b/wxPython/src/mac/controls.py index 206aaf6f14..352bad5b83 100644 --- a/wxPython/src/mac/controls.py +++ b/wxPython/src/mac/controls.py @@ -133,19 +133,19 @@ class wxBitmapButtonPtr(wxButtonPtr): return val def GetBitmapLabel(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapLabel,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmapDisabled(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapDisabled,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmapFocus(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapFocus,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmapSelected(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapSelected,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def SetBitmapDisabled(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_SetBitmapDisabled,(self,) + _args, _kwargs) @@ -572,15 +572,15 @@ class wxTextAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def IsDefault(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_IsDefault,(self,) + _args, _kwargs) @@ -845,7 +845,7 @@ class wxStaticBitmapPtr(wxControlPtr): return val def GetBitmap(self, *_args, **_kwargs): val = apply(controlsc.wxStaticBitmap_GetBitmap,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def SetBitmap(self, *_args, **_kwargs): val = apply(controlsc.wxStaticBitmap_SetBitmap,(self,) + _args, _kwargs) diff --git a/wxPython/src/mac/controls2.cpp b/wxPython/src/mac/controls2.cpp index 4935bc8b05..6f31b1ade8 100644 --- a/wxPython/src/mac/controls2.cpp +++ b/wxPython/src/mac/controls2.cpp @@ -491,18 +491,12 @@ static PyObject *_wrap_wxListItemAttr_GetTextColour(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxListItemAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxListItemAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -527,18 +521,12 @@ static PyObject *_wrap_wxListItemAttr_GetBackgroundColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxListItemAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxListItemAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -563,18 +551,12 @@ static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxListItemAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxListItemAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5820,18 +5802,12 @@ static PyObject *_wrap_wxTreeItemAttr_GetTextColour(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTreeItemAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTreeItemAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5856,18 +5832,12 @@ static PyObject *_wrap_wxTreeItemAttr_GetBackgroundColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTreeItemAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxTreeItemAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5892,18 +5862,12 @@ static PyObject *_wrap_wxTreeItemAttr_GetFont(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxTreeItemAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxTreeItemAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -9295,7 +9259,61 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py return _resultobj; } +static PyObject * wxPyTreeCtrl_GetBoundingRect(wxPyTreeCtrl *self,const wxTreeItemId & item,int textOnly) { + wxRect rect; + if (self->GetBoundingRect(item, rect, textOnly)) { + wxPyTState* state = wxPyBeginBlockThreads(); + wxRect* r = new wxRect(rect); + PyObject* val = wxPyConstructObject((void*)r, "wxRect"); + wxPyEndBlockThreads(state); + return val; + } + else { + Py_INCREF(Py_None); + return Py_None; + } + } +static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + int _arg2 = (int ) FALSE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item","textOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_GetBoundingRect",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetBoundingRect. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxPyTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} + static PyMethodDef controls2cMethods[] = { + { "wxTreeCtrl_GetBoundingRect", (PyCFunction) _wrap_wxTreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemFont", (PyCFunction) _wrap_wxTreeCtrl_SetItemFont, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemTextColour, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/controls2.py b/wxPython/src/mac/controls2.py index 43ba4f8914..8a02e2b25c 100644 --- a/wxPython/src/mac/controls2.py +++ b/wxPython/src/mac/controls2.py @@ -160,15 +160,15 @@ class wxListItemAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(controls2c.wxListItemAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(controls2c.wxListItemAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(controls2c.wxListItemAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def __repr__(self): return "" % (self.this,) @@ -736,15 +736,15 @@ class wxTreeItemAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def __repr__(self): return "" % (self.this,) @@ -771,6 +771,7 @@ class wxTreeItemIdPtr : return val def __repr__(self): return "" % (self.this,) + Ok = IsOk class wxTreeItemId(wxTreeItemIdPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxTreeItemId,_args,_kwargs) @@ -1061,6 +1062,9 @@ class wxTreeCtrlPtr(wxControlPtr): def SetItemFont(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs) return val + def GetBoundingRect(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_GetBoundingRect,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) diff --git a/wxPython/src/mac/events.cpp b/wxPython/src/mac/events.cpp index 95c9d7bdfc..986b0df992 100644 --- a/wxPython/src/mac/events.cpp +++ b/wxPython/src/mac/events.cpp @@ -4459,6 +4459,93 @@ static PyObject *_wrap_new_wxFocusEvent(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxChildFocusEventTowxCommandEvent(void *ptr) { + wxChildFocusEvent *src; + wxCommandEvent *dest; + src = (wxChildFocusEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxChildFocusEventTowxEvent(void *ptr) { + wxChildFocusEvent *src; + wxEvent *dest; + src = (wxChildFocusEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +static void *SwigwxChildFocusEventTowxObject(void *ptr) { + wxChildFocusEvent *src; + wxObject *dest; + src = (wxChildFocusEvent *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxChildFocusEvent(_swigarg0) (new wxChildFocusEvent(_swigarg0)) +static PyObject *_wrap_new_wxChildFocusEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxChildFocusEvent * _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxChildFocusEvent",_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 new_wxChildFocusEvent. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxChildFocusEvent *)new_wxChildFocusEvent(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxChildFocusEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxChildFocusEvent_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxChildFocusEvent_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxChildFocusEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxChildFocusEvent_GetWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxChildFocusEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChildFocusEvent_GetWindow. Expected _wxChildFocusEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxChildFocusEvent_GetWindow(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + static void *SwigwxActivateEventTowxEvent(void *ptr) { wxActivateEvent *src; wxEvent *dest; @@ -7059,6 +7146,8 @@ static PyMethodDef eventscMethods[] = { { "new_wxInitDialogEvent", (PyCFunction) _wrap_new_wxInitDialogEvent, METH_VARARGS | METH_KEYWORDS }, { "wxActivateEvent_GetActive", (PyCFunction) _wrap_wxActivateEvent_GetActive, METH_VARARGS | METH_KEYWORDS }, { "new_wxActivateEvent", (PyCFunction) _wrap_new_wxActivateEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxChildFocusEvent_GetWindow", (PyCFunction) _wrap_wxChildFocusEvent_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxChildFocusEvent", (PyCFunction) _wrap_new_wxChildFocusEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxFocusEvent", (PyCFunction) _wrap_new_wxFocusEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEraseEvent_GetDC", (PyCFunction) _wrap_wxEraseEvent_GetDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxEraseEvent", (PyCFunction) _wrap_new_wxEraseEvent, METH_VARARGS | METH_KEYWORDS }, @@ -7229,6 +7318,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvent","_wxMenuEvent",SwigwxMenuEventTowxEvent}, { "_wxEvent","_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent}, { "_wxEvent","_wxActivateEvent",SwigwxActivateEventTowxEvent}, + { "_wxEvent","_wxChildFocusEvent",SwigwxChildFocusEventTowxEvent}, { "_wxEvent","_wxFocusEvent",SwigwxFocusEventTowxEvent}, { "_wxEvent","_wxEraseEvent",SwigwxEraseEventTowxEvent}, { "_wxEvent","_wxPaintEvent",SwigwxPaintEventTowxEvent}, @@ -7275,6 +7365,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, { "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, { "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, + { "_wxCommandEvent","_wxChildFocusEvent",SwigwxChildFocusEventTowxCommandEvent}, { "_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, { "_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, { "_char","_wxChar",0}, @@ -7317,6 +7408,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxMenuEvent",SwigwxMenuEventTowxObject}, { "_wxObject","_wxInitDialogEvent",SwigwxInitDialogEventTowxObject}, { "_wxObject","_wxActivateEvent",SwigwxActivateEventTowxObject}, + { "_wxObject","_wxChildFocusEvent",SwigwxChildFocusEventTowxObject}, { "_wxObject","_wxFocusEvent",SwigwxFocusEventTowxObject}, { "_wxObject","_wxEraseEvent",SwigwxEraseEventTowxObject}, { "_wxObject","_wxPaintEvent",SwigwxPaintEventTowxObject}, diff --git a/wxPython/src/mac/events.py b/wxPython/src/mac/events.py index a50e4f988c..03051a0702 100644 --- a/wxPython/src/mac/events.py +++ b/wxPython/src/mac/events.py @@ -574,6 +574,23 @@ class wxFocusEvent(wxFocusEventPtr): +class wxChildFocusEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetWindow(self, *_args, **_kwargs): + val = apply(eventsc.wxChildFocusEvent_GetWindow,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxChildFocusEvent(wxChildFocusEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(eventsc.new_wxChildFocusEvent,_args,_kwargs) + self.thisown = 1 + + + + class wxActivateEventPtr(wxEventPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/mac/frames.cpp b/wxPython/src/mac/frames.cpp index b065f9aa45..061c1d14b8 100644 --- a/wxPython/src/mac/frames.cpp +++ b/wxPython/src/mac/frames.cpp @@ -57,7 +57,6 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include -#include static PyObject* t_output_helper(PyObject* target, PyObject* o) { @@ -473,18 +472,12 @@ static PyObject *_wrap_wxTopLevelWindow_GetIcon(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - const wxIcon & _result_ref = wxTopLevelWindow_GetIcon(_arg0); - _result = (wxIcon *) &_result_ref; + _result = new wxIcon (wxTopLevelWindow_GetIcon(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1804,7 +1797,7 @@ static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxSizer(_result); } { if (_obj1) delete _arg1; @@ -1837,7 +1830,7 @@ static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxSizer(_result); } return _resultobj; } @@ -2069,108 +2062,7 @@ static PyObject *_wrap_wxMiniFrame_Create(PyObject *self, PyObject *args, PyObje return _resultobj; } -static void *SwigwxTipWindowTowxFrame(void *ptr) { - wxTipWindow *src; - wxFrame *dest; - src = (wxTipWindow *) ptr; - dest = (wxFrame *) src; - return (void *) dest; -} - -static void *SwigwxTipWindowTowxTopLevelWindow(void *ptr) { - wxTipWindow *src; - wxTopLevelWindow *dest; - src = (wxTipWindow *) ptr; - dest = (wxTopLevelWindow *) src; - return (void *) dest; -} - -static void *SwigwxTipWindowTowxWindow(void *ptr) { - wxTipWindow *src; - wxWindow *dest; - src = (wxTipWindow *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTipWindowTowxEvtHandler(void *ptr) { - wxTipWindow *src; - wxEvtHandler *dest; - src = (wxTipWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -static void *SwigwxTipWindowTowxObject(void *ptr) { - wxTipWindow *src; - wxObject *dest; - src = (wxTipWindow *) ptr; - dest = (wxObject *) src; - return (void *) dest; -} - -#define new_wxTipWindow(_swigarg0,_swigarg1,_swigarg2) (new wxTipWindow(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxTipWindow * _result; - wxWindow * _arg0; - wxString * _arg1; - wxCoord _arg2 = (wxCoord ) 100; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "parent","text","maxLength", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:new_wxTipWindow",_kwnames,&_argo0,&_obj1,&_arg2)) - 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 new_wxTipWindow. Expected _wxWindow_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 -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTipWindow *)new_wxTipWindow(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTipWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - static PyMethodDef framescMethods[] = { - { "new_wxTipWindow", (PyCFunction) _wrap_new_wxTipWindow, METH_VARARGS | METH_KEYWORDS }, { "wxMiniFrame_Create", (PyCFunction) _wrap_wxMiniFrame_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreMiniFrame", (PyCFunction) _wrap_new_wxPreMiniFrame, METH_VARARGS | METH_KEYWORDS }, { "new_wxMiniFrame", (PyCFunction) _wrap_new_wxMiniFrame, METH_VARARGS | METH_KEYWORDS }, @@ -2245,7 +2137,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_wxTopLevelWindow","_wxTipWindow",SwigwxTipWindowTowxTopLevelWindow}, { "_wxTopLevelWindow","_wxMiniFrame",SwigwxMiniFrameTowxTopLevelWindow}, { "_wxTopLevelWindow","_wxDialog",SwigwxDialogTowxTopLevelWindow}, { "_wxTopLevelWindow","_wxFrame",SwigwxFrameTowxTopLevelWindow}, @@ -2276,7 +2167,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_wxObject","_wxTipWindow",SwigwxTipWindowTowxObject}, { "_wxObject","_wxMiniFrame",SwigwxMiniFrameTowxObject}, { "_wxObject","_wxDialog",SwigwxDialogTowxObject}, { "_wxObject","_wxFrame",SwigwxFrameTowxObject}, @@ -2294,7 +2184,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_wxFrame","_wxTipWindow",SwigwxTipWindowTowxFrame}, { "_wxFrame","_wxMiniFrame",SwigwxMiniFrameTowxFrame}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, @@ -2330,12 +2219,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_size_t",0}, { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEvtHandler","_wxTipWindow",SwigwxTipWindowTowxEvtHandler}, { "_wxEvtHandler","_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler}, { "_wxEvtHandler","_wxDialog",SwigwxDialogTowxEvtHandler}, { "_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler}, { "_wxEvtHandler","_wxTopLevelWindow",SwigwxTopLevelWindowTowxEvtHandler}, - { "_wxWindow","_wxTipWindow",SwigwxTipWindowTowxWindow}, { "_wxWindow","_wxMiniFrame",SwigwxMiniFrameTowxWindow}, { "_wxWindow","_wxDialog",SwigwxDialogTowxWindow}, { "_wxWindow","_wxFrame",SwigwxFrameTowxWindow}, diff --git a/wxPython/src/mac/frames.py b/wxPython/src/mac/frames.py index f3d8317ae1..8a267e59ef 100644 --- a/wxPython/src/mac/frames.py +++ b/wxPython/src/mac/frames.py @@ -39,7 +39,7 @@ class wxTopLevelWindowPtr(wxWindowPtr): return val def GetIcon(self, *_args, **_kwargs): val = apply(framesc.wxTopLevelWindow_GetIcon,(self,) + _args, _kwargs) - if val: val = wxIconPtr(val) + if val: val = wxIconPtr(val) ; val.thisown = 1 return val def SetIcon(self, *_args, **_kwargs): val = apply(framesc.wxTopLevelWindow_SetIcon,(self,) + _args, _kwargs) @@ -212,21 +212,6 @@ def wxPreMiniFrame(*_args,**_kwargs): return val -class wxTipWindowPtr(wxFramePtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" % (self.this,) -class wxTipWindow(wxTipWindowPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(framesc.new_wxTipWindow,_args,_kwargs) - self.thisown = 1 - self._setOORInfo(self) - - - - #-------------- FUNCTION WRAPPERS ------------------ diff --git a/wxPython/src/mac/gdi.cpp b/wxPython/src/mac/gdi.cpp index fd515b2f4f..a55bf88804 100644 --- a/wxPython/src/mac/gdi.cpp +++ b/wxPython/src/mac/gdi.cpp @@ -4053,6 +4053,34 @@ static PyObject *_wrap_wxFontList_RemoveFont(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxFontList_GetCount(_swigobj) (_swigobj->GetCount()) +static PyObject *_wrap_wxFontList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFontList * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontList_GetCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_GetCount. Expected _wxFontList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFontList_GetCount(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxColourTowxObject(void *ptr) { wxColour *src; wxObject *dest; @@ -5170,6 +5198,34 @@ static PyObject *_wrap_wxPenList_RemovePen(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxPenList_GetCount(_swigobj) (_swigobj->GetCount()) +static PyObject *_wrap_wxPenList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPenList * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPenList_GetCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPenList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPenList_GetCount. Expected _wxPenList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPenList_GetCount(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxBrushTowxGDIObject(void *ptr) { wxBrush *src; wxGDIObject *dest; @@ -5598,6 +5654,34 @@ static PyObject *_wrap_wxBrushList_RemoveBrush(PyObject *self, PyObject *args, P return _resultobj; } +#define wxBrushList_GetCount(_swigobj) (_swigobj->GetCount()) +static PyObject *_wrap_wxBrushList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxBrushList * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBrushList_GetCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrushList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrushList_GetCount. Expected _wxBrushList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBrushList_GetCount(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxDCTowxObject(void *ptr) { wxDC *src; wxObject *dest; @@ -6599,18 +6683,12 @@ static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - wxBrush & _result_ref = wxDC_GetBackground(_arg0); - _result = (wxBrush *) &_result_ref; + _result = new wxBrush (wxDC_GetBackground(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6635,18 +6713,12 @@ static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args, PyObject *k } { wxPy_BEGIN_ALLOW_THREADS; - wxBrush & _result_ref = wxDC_GetBrush(_arg0); - _result = (wxBrush *) &_result_ref; + _result = new wxBrush (wxDC_GetBrush(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6795,18 +6867,12 @@ static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args, PyObject *kw } { wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxDC_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxDC_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6963,18 +7029,12 @@ static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args, PyObject *kwa } { wxPy_BEGIN_ALLOW_THREADS; - wxPen & _result_ref = wxDC_GetPen(_arg0); - _result = (wxPen *) &_result_ref; + _result = new wxPen (wxDC_GetPen(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -11164,6 +11224,7 @@ static PyMethodDef gdicMethods[] = { { "wxDC_Blit", (PyCFunction) _wrap_wxDC_Blit, METH_VARARGS | METH_KEYWORDS }, { "wxDC_BeginDrawing", (PyCFunction) _wrap_wxDC_BeginDrawing, METH_VARARGS | METH_KEYWORDS }, { "delete_wxDC", (PyCFunction) _wrap_delete_wxDC, METH_VARARGS | METH_KEYWORDS }, + { "wxBrushList_GetCount", (PyCFunction) _wrap_wxBrushList_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxBrushList_RemoveBrush", (PyCFunction) _wrap_wxBrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS }, { "wxBrushList_FindOrCreateBrush", (PyCFunction) _wrap_wxBrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS }, { "wxBrushList_AddBrush", (PyCFunction) _wrap_wxBrushList_AddBrush, METH_VARARGS | METH_KEYWORDS }, @@ -11176,6 +11237,7 @@ static PyMethodDef gdicMethods[] = { { "wxBrush_GetColour", (PyCFunction) _wrap_wxBrush_GetColour, METH_VARARGS | METH_KEYWORDS }, { "delete_wxBrush", (PyCFunction) _wrap_delete_wxBrush, METH_VARARGS | METH_KEYWORDS }, { "new_wxBrush", (PyCFunction) _wrap_new_wxBrush, METH_VARARGS | METH_KEYWORDS }, + { "wxPenList_GetCount", (PyCFunction) _wrap_wxPenList_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_RemovePen", (PyCFunction) _wrap_wxPenList_RemovePen, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_FindOrCreatePen", (PyCFunction) _wrap_wxPenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_AddPen", (PyCFunction) _wrap_wxPenList_AddPen, METH_VARARGS | METH_KEYWORDS }, @@ -11207,6 +11269,7 @@ static PyMethodDef gdicMethods[] = { { "wxColour_Red", (PyCFunction) _wrap_wxColour_Red, METH_VARARGS | METH_KEYWORDS }, { "delete_wxColour", (PyCFunction) _wrap_delete_wxColour, METH_VARARGS | METH_KEYWORDS }, { "new_wxColour", (PyCFunction) _wrap_new_wxColour, METH_VARARGS | METH_KEYWORDS }, + { "wxFontList_GetCount", (PyCFunction) _wrap_wxFontList_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxFontList_RemoveFont", (PyCFunction) _wrap_wxFontList_RemoveFont, METH_VARARGS | METH_KEYWORDS }, { "wxFontList_FindOrCreateFont", (PyCFunction) _wrap_wxFontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS }, { "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS }, @@ -11509,6 +11572,16 @@ SWIGEXPORT(void) initgdic() { PyDict_SetItemString(d,"wxFONTENCODING_UTF8", PyInt_FromLong((long) wxFONTENCODING_UTF8)); PyDict_SetItemString(d,"wxFONTENCODING_UNICODE", PyInt_FromLong((long) wxFONTENCODING_UNICODE)); PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_FOCUSED", PyInt_FromLong((long) wxIMAGELIST_DRAW_FOCUSED)); + PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); + PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); + PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); + PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set); SWIG_addvarlink(SWIG_globals,"wxSMALL_FONT",_wrap_wxSMALL_FONT_get, _wrap_wxSMALL_FONT_set); @@ -11556,16 +11629,6 @@ SWIGEXPORT(void) initgdic() { SWIG_addvarlink(SWIG_globals,"wxThePenList",_wrap_wxThePenList_get, _wrap_wxThePenList_set); SWIG_addvarlink(SWIG_globals,"wxTheBrushList",_wrap_wxTheBrushList_get, _wrap_wxTheBrushList_set); SWIG_addvarlink(SWIG_globals,"wxTheColourDatabase",_wrap_wxTheColourDatabase_get, _wrap_wxTheColourDatabase_set); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_FOCUSED", PyInt_FromLong((long) wxIMAGELIST_DRAW_FOCUSED)); - PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); - PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); - PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); - PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); - PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); - PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/mac/gdi.py b/wxPython/src/mac/gdi.py index 08458df335..292e3e7a57 100644 --- a/wxPython/src/mac/gdi.py +++ b/wxPython/src/mac/gdi.py @@ -343,6 +343,9 @@ class wxFontListPtr(wxObjectPtr): def RemoveFont(self, *_args, **_kwargs): val = apply(gdic.wxFontList_RemoveFont,(self,) + _args, _kwargs) return val + def GetCount(self, *_args, **_kwargs): + val = apply(gdic.wxFontList_GetCount,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFontList(wxFontListPtr): @@ -501,6 +504,9 @@ class wxPenListPtr(wxObjectPtr): def RemovePen(self, *_args, **_kwargs): val = apply(gdic.wxPenList_RemovePen,(self,) + _args, _kwargs) return val + def GetCount(self, *_args, **_kwargs): + val = apply(gdic.wxPenList_GetCount,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxPenList(wxPenListPtr): @@ -564,6 +570,9 @@ class wxBrushListPtr(wxObjectPtr): def RemoveBrush(self, *_args, **_kwargs): val = apply(gdic.wxBrushList_RemoveBrush,(self,) + _args, _kwargs) return val + def GetCount(self, *_args, **_kwargs): + val = apply(gdic.wxBrushList_GetCount,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxBrushList(wxBrushListPtr): @@ -663,11 +672,11 @@ class wxDCPtr(wxObjectPtr): return val def GetBackground(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetBackground,(self,) + _args, _kwargs) - if val: val = wxBrushPtr(val) + if val: val = wxBrushPtr(val) ; val.thisown = 1 return val def GetBrush(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetBrush,(self,) + _args, _kwargs) - if val: val = wxBrushPtr(val) + if val: val = wxBrushPtr(val) ; val.thisown = 1 return val def GetCharHeight(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetCharHeight,(self,) + _args, _kwargs) @@ -680,7 +689,7 @@ class wxDCPtr(wxObjectPtr): return val def GetFont(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetLogicalFunction(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetLogicalFunction,(self,) + _args, _kwargs) @@ -696,7 +705,7 @@ class wxDCPtr(wxObjectPtr): return val def GetPen(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetPen,(self,) + _args, _kwargs) - if val: val = wxPenPtr(val) + if val: val = wxPenPtr(val) ; val.thisown = 1 return val def GetPixel(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetPixel,(self,) + _args, _kwargs) @@ -1285,6 +1294,16 @@ wxFONTENCODING_UTF7 = gdic.wxFONTENCODING_UTF7 wxFONTENCODING_UTF8 = gdic.wxFONTENCODING_UTF8 wxFONTENCODING_UNICODE = gdic.wxFONTENCODING_UNICODE wxFONTENCODING_MAX = gdic.wxFONTENCODING_MAX +wxIMAGELIST_DRAW_NORMAL = gdic.wxIMAGELIST_DRAW_NORMAL +wxIMAGELIST_DRAW_TRANSPARENT = gdic.wxIMAGELIST_DRAW_TRANSPARENT +wxIMAGELIST_DRAW_SELECTED = gdic.wxIMAGELIST_DRAW_SELECTED +wxIMAGELIST_DRAW_FOCUSED = gdic.wxIMAGELIST_DRAW_FOCUSED +wxIMAGE_LIST_NORMAL = gdic.wxIMAGE_LIST_NORMAL +wxIMAGE_LIST_SMALL = gdic.wxIMAGE_LIST_SMALL +wxIMAGE_LIST_STATE = gdic.wxIMAGE_LIST_STATE +wxOutRegion = gdic.wxOutRegion +wxPartRegion = gdic.wxPartRegion +wxInRegion = gdic.wxInRegion cvar = gdic.cvar wxNORMAL_FONT = wxFontPtr(gdic.cvar.wxNORMAL_FONT) wxSMALL_FONT = wxFontPtr(gdic.cvar.wxSMALL_FONT) @@ -1332,13 +1351,3 @@ wxTheFontList = wxFontListPtr(gdic.cvar.wxTheFontList) wxThePenList = wxPenListPtr(gdic.cvar.wxThePenList) wxTheBrushList = wxBrushListPtr(gdic.cvar.wxTheBrushList) wxTheColourDatabase = wxColourDatabasePtr(gdic.cvar.wxTheColourDatabase) -wxIMAGELIST_DRAW_NORMAL = gdic.wxIMAGELIST_DRAW_NORMAL -wxIMAGELIST_DRAW_TRANSPARENT = gdic.wxIMAGELIST_DRAW_TRANSPARENT -wxIMAGELIST_DRAW_SELECTED = gdic.wxIMAGELIST_DRAW_SELECTED -wxIMAGELIST_DRAW_FOCUSED = gdic.wxIMAGELIST_DRAW_FOCUSED -wxIMAGE_LIST_NORMAL = gdic.wxIMAGE_LIST_NORMAL -wxIMAGE_LIST_SMALL = gdic.wxIMAGE_LIST_SMALL -wxIMAGE_LIST_STATE = gdic.wxIMAGE_LIST_STATE -wxOutRegion = gdic.wxOutRegion -wxPartRegion = gdic.wxPartRegion -wxInRegion = gdic.wxInRegion diff --git a/wxPython/src/mac/grid.cpp b/wxPython/src/mac/grid.cpp index bea660b5c3..5ff300bb62 100644 --- a/wxPython/src/mac/grid.cpp +++ b/wxPython/src/mac/grid.cpp @@ -3766,18 +3766,12 @@ static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxGridCellAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxGridCellAttr_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -3802,18 +3796,12 @@ static PyObject *_wrap_wxGridCellAttr_GetBackgroundColour(PyObject *self, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxGridCellAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxGridCellAttr_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -3838,18 +3826,12 @@ static PyObject *_wrap_wxGridCellAttr_GetFont(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxGridCellAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxGridCellAttr_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/mac/grid.py b/wxPython/src/mac/grid.py index d8bb23db26..a2a653b730 100644 --- a/wxPython/src/mac/grid.py +++ b/wxPython/src/mac/grid.py @@ -511,15 +511,15 @@ class wxGridCellAttrPtr : return val def GetTextColour(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetFont(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetAlignment(self, *_args, **_kwargs): val = apply(gridc.wxGridCellAttr_GetAlignment,(self,) + _args, _kwargs) diff --git a/wxPython/src/mac/html.cpp b/wxPython/src/mac/html.cpp index b1a744af45..40065a7184 100644 --- a/wxPython/src/mac/html.cpp +++ b/wxPython/src/mac/html.cpp @@ -201,6 +201,7 @@ public: long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "htmlWindow") : wxHtmlWindow(parent, id, pos, size, style, name) {}; + wxPyHtmlWindow() : wxHtmlWindow() {}; void OnLinkClicked(const wxHtmlLinkInfo& link); void base_OnLinkClicked(const wxHtmlLinkInfo& link); @@ -2014,17 +2015,11 @@ static PyObject *_wrap_wxHtmlWinParser_GetLinkColor(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxHtmlWinParser_GetLinkColor(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxHtmlWinParser_GetLinkColor(_arg0)); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -2084,17 +2079,11 @@ static PyObject *_wrap_wxHtmlWinParser_GetActualColor(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxHtmlWinParser_GetActualColor(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxHtmlWinParser_GetActualColor(_arg0)); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -4076,6 +4065,88 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreHtmlWindow() (new wxPyHtmlWindow()) +static PyObject *_wrap_new_wxPreHtmlWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreHtmlWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyHtmlWindow *)new_wxPreHtmlWindow(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyHtmlWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxHtmlWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + wxWindow * _arg1; + int _arg2 = (int ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + int _arg5 = (int ) wxHW_SCROLLBAR_AUTO; + char * _arg6 = (char *) "htmlWindow"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","flags","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOis:wxHtmlWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_Create. Expected _wxPyHtmlWindow_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 wxHtmlWindow_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxHtmlWindow__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) static PyObject *_wrap_wxHtmlWindow__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6266,6 +6337,8 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_LoadPage", (PyCFunction) _wrap_wxHtmlWindow_LoadPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_SetPage", (PyCFunction) _wrap_wxHtmlWindow_SetPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow__setCallbackInfo", (PyCFunction) _wrap_wxHtmlWindow__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_Create", (PyCFunction) _wrap_wxHtmlWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreHtmlWindow", (PyCFunction) _wrap_new_wxPreHtmlWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWindow", (PyCFunction) _wrap_new_wxHtmlWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWidgetCell", (PyCFunction) _wrap_new_wxHtmlWidgetCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlFontCell", (PyCFunction) _wrap_new_wxHtmlFontCell, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/html.py b/wxPython/src/mac/html.py index b2db058c73..c4103cd6e1 100644 --- a/wxPython/src/mac/html.py +++ b/wxPython/src/mac/html.py @@ -230,14 +230,14 @@ class wxHtmlWinParserPtr(wxHtmlParserPtr): return val def GetLinkColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_GetLinkColor,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetLinkColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_SetLinkColor,(self,) + _args, _kwargs) return val def GetActualColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_GetActualColor,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetActualColor(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWinParser_SetActualColor,(self,) + _args, _kwargs) @@ -511,6 +511,9 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_Create,(self,) + _args, _kwargs) + return val def _setCallbackInfo(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow__setCallbackInfo,(self,) + _args, _kwargs) return val @@ -602,6 +605,12 @@ class wxHtmlWindow(wxHtmlWindowPtr): +def wxPreHtmlWindow(*_args,**_kwargs): + val = wxHtmlWindowPtr(apply(htmlc.new_wxPreHtmlWindow,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(val) + return val + class wxHtmlDCRendererPtr(wxObjectPtr): def __init__(self,this): diff --git a/wxPython/src/mac/sizers.cpp b/wxPython/src/mac/sizers.cpp index e54605cc20..c6c00ad8a6 100644 --- a/wxPython/src/mac/sizers.cpp +++ b/wxPython/src/mac/sizers.cpp @@ -576,7 +576,7 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxSizer(_result); } return _resultobj; } diff --git a/wxPython/src/mac/stattool.cpp b/wxPython/src/mac/stattool.cpp index 96159956c9..ae0e886205 100644 --- a/wxPython/src/mac/stattool.cpp +++ b/wxPython/src/mac/stattool.cpp @@ -879,18 +879,12 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap1(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxToolBarToolBase_GetBitmap1(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxToolBarToolBase_GetBitmap1(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -915,18 +909,12 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap2(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxToolBarToolBase_GetBitmap2(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxToolBarToolBase_GetBitmap2(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -951,18 +939,12 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap(PyObject *self, PyObject *arg } { wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxToolBarToolBase_GetBitmap(_arg0); - _result = (wxBitmap *) &_result_ref; + _result = new wxBitmap (wxToolBarToolBase_GetBitmap(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/mac/stattool.py b/wxPython/src/mac/stattool.py index 72b3d89da0..59f27eec6b 100644 --- a/wxPython/src/mac/stattool.py +++ b/wxPython/src/mac/stattool.py @@ -104,15 +104,15 @@ class wxToolBarToolBasePtr(wxObjectPtr): return val def GetBitmap1(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetBitmap1,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmap2(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetBitmap2,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetBitmap(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetBitmap,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val def GetShortHelp(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetShortHelp,(self,) + _args, _kwargs) diff --git a/wxPython/src/mac/windows.cpp b/wxPython/src/mac/windows.cpp index 7262e9b394..a42dc72f57 100644 --- a/wxPython/src/mac/windows.cpp +++ b/wxPython/src/mac/windows.cpp @@ -1831,18 +1831,12 @@ static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxWindow_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxWindow_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -4538,13 +4532,13 @@ static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; bool _result; wxWindow * _arg0; - bool _arg1; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - int tempbool1; + int tempbool1 = (int) TRUE; char *_kwnames[] = { "self","show", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5008,7 +5002,7 @@ static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObjec wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxSizer(_result); } return _resultobj; } diff --git a/wxPython/src/mac/windows.py b/wxPython/src/mac/windows.py index 1c93b006ee..e87290ed0d 100644 --- a/wxPython/src/mac/windows.py +++ b/wxPython/src/mac/windows.py @@ -201,7 +201,7 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def GetFont(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) + if val: val = wxFontPtr(val) ; val.thisown = 1 return val def GetForegroundColour(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetForegroundColour,(self,) + _args, _kwargs) @@ -598,6 +598,7 @@ class wxPanel(wxPanelPtr): def wxPrePanel(*_args,**_kwargs): val = wxPanelPtr(apply(windowsc.new_wxPrePanel,_args,_kwargs)) val.thisown = 1 + val._setOORInfo(val) return val diff --git a/wxPython/src/mac/windows3.cpp b/wxPython/src/mac/windows3.cpp index e1f6c69388..f6d7bae3c1 100644 --- a/wxPython/src/mac/windows3.cpp +++ b/wxPython/src/mac/windows3.cpp @@ -60,6 +60,7 @@ extern PyObject *SWIG_newvarlink(void); #include #ifndef __WXMAC__ #include +#include #endif diff --git a/wxPython/src/mac/wx.cpp b/wxPython/src/mac/wx.cpp index 8454f5e14a..290fa44e0d 100644 --- a/wxPython/src/mac/wx.cpp +++ b/wxPython/src/mac/wx.cpp @@ -672,7 +672,9 @@ static wxPyCoreAPI API = { wxPyClassExists, wxPyMake_wxObject, + wxPyMake_wxSizer, wxPyPtrTypeMap_Add, + wxArrayString2PyList_helper }; @@ -1921,16 +1923,19 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxLB_HSCROLL", PyInt_FromLong((long) wxLB_HSCROLL)); PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER)); PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD)); - PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); - PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB)); - PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); - PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE)); - PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL)); + PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB)); + PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); PyDict_SetItemString(d,"wxTE_NO_VSCROLL", PyInt_FromLong((long) wxTE_NO_VSCROLL)); + PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL)); + PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); + PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); PyDict_SetItemString(d,"wxTE_AUTO_URL", PyInt_FromLong((long) wxTE_AUTO_URL)); PyDict_SetItemString(d,"wxTE_NOHIDESEL", PyInt_FromLong((long) wxTE_NOHIDESEL)); + PyDict_SetItemString(d,"wxTE_DONTWRAP", PyInt_FromLong((long) wxTE_DONTWRAP)); + PyDict_SetItemString(d,"wxTE_LINEWRAP", PyInt_FromLong((long) wxTE_LINEWRAP)); + PyDict_SetItemString(d,"wxTE_WORDWRAP", PyInt_FromLong((long) wxTE_WORDWRAP)); PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE)); PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN)); PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT)); @@ -2113,6 +2118,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY)); PyDict_SetItemString(d,"wxWS_EX_VALIDATE_RECURSIVELY", PyInt_FromLong((long) wxWS_EX_VALIDATE_RECURSIVELY)); PyDict_SetItemString(d,"wxWS_EX_BLOCK_EVENTS", PyInt_FromLong((long) wxWS_EX_BLOCK_EVENTS)); + PyDict_SetItemString(d,"wxWS_EX_TRANSIENT", PyInt_FromLong((long) wxWS_EX_TRANSIENT)); PyDict_SetItemString(d,"wxMM_TEXT", PyInt_FromLong((long) wxMM_TEXT)); PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC)); PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC)); @@ -2444,6 +2450,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_ENTER)); PyDict_SetItemString(d,"wxEVT_SET_FOCUS", PyInt_FromLong((long) wxEVT_SET_FOCUS)); PyDict_SetItemString(d,"wxEVT_KILL_FOCUS", PyInt_FromLong((long) wxEVT_KILL_FOCUS)); + PyDict_SetItemString(d,"wxEVT_CHILD_FOCUS", PyInt_FromLong((long) wxEVT_CHILD_FOCUS)); PyDict_SetItemString(d,"wxEVT_MOUSEWHEEL", PyInt_FromLong((long) wxEVT_MOUSEWHEEL)); PyDict_SetItemString(d,"wxEVT_LEFT_DOWN", PyInt_FromLong((long) wxEVT_LEFT_DOWN)); PyDict_SetItemString(d,"wxEVT_LEFT_UP", PyInt_FromLong((long) wxEVT_LEFT_UP)); diff --git a/wxPython/src/mac/wx.py b/wxPython/src/mac/wx.py index f09bb3103f..65cb308f90 100644 --- a/wxPython/src/mac/wx.py +++ b/wxPython/src/mac/wx.py @@ -239,16 +239,19 @@ wxLB_OWNERDRAW = wxc.wxLB_OWNERDRAW wxLB_HSCROLL = wxc.wxLB_HSCROLL wxPROCESS_ENTER = wxc.wxPROCESS_ENTER wxPASSWORD = wxc.wxPASSWORD -wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER -wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB -wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_READONLY = wxc.wxTE_READONLY -wxTE_RICH = wxc.wxTE_RICH wxTE_MULTILINE = wxc.wxTE_MULTILINE -wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL +wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB +wxTE_RICH = wxc.wxTE_RICH wxTE_NO_VSCROLL = wxc.wxTE_NO_VSCROLL +wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL +wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER +wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_AUTO_URL = wxc.wxTE_AUTO_URL wxTE_NOHIDESEL = wxc.wxTE_NOHIDESEL +wxTE_DONTWRAP = wxc.wxTE_DONTWRAP +wxTE_LINEWRAP = wxc.wxTE_LINEWRAP +wxTE_WORDWRAP = wxc.wxTE_WORDWRAP wxCB_SIMPLE = wxc.wxCB_SIMPLE wxCB_DROPDOWN = wxc.wxCB_DROPDOWN wxCB_SORT = wxc.wxCB_SORT @@ -431,6 +434,7 @@ wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4 wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS +wxWS_EX_TRANSIENT = wxc.wxWS_EX_TRANSIENT wxMM_TEXT = wxc.wxMM_TEXT wxMM_LOMETRIC = wxc.wxMM_LOMETRIC wxMM_HIMETRIC = wxc.wxMM_HIMETRIC @@ -762,6 +766,7 @@ wxEVT_COMMAND_TOOL_RCLICKED = wxc.wxEVT_COMMAND_TOOL_RCLICKED wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS +wxEVT_CHILD_FOCUS = wxc.wxEVT_CHILD_FOCUS wxEVT_MOUSEWHEEL = wxc.wxEVT_MOUSEWHEEL wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP @@ -869,7 +874,6 @@ wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize) # Author: Robin Dunn # # Created: 6/30/97 -# RCS-ID: $Id$ # Copyright: (c) 1998 by Total Control Software # Licence: wxWindows license #---------------------------------------------------------------------------- @@ -938,6 +942,9 @@ def EVT_SET_FOCUS(win, func): def EVT_KILL_FOCUS(win, func): win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) +def EVT_CHILD_FOCUS(win, func): + win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func) + def EVT_ACTIVATE(win, func): win.Connect(-1, -1, wxEVT_ACTIVATE, func) -- 2.45.2