]> git.saurik.com Git - wxWidgets.git/commitdiff
reSWIGged
authorRobin Dunn <robin@alldunn.com>
Sun, 23 Nov 2003 01:34:16 +0000 (01:34 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 23 Nov 2003 01:34:16 +0000 (01:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/mac/controls.py
wxPython/src/mac/controls_wrap.cpp
wxPython/src/mac/core.py
wxPython/src/mac/gdi.py
wxPython/src/mac/html_wrap.cpp
wxPython/src/mac/misc.py
wxPython/src/mac/misc_wrap.cpp
wxPython/src/mac/windows.py
wxPython/src/mac/windows_wrap.cpp

index bf64bbb2ab68df555d7dfdf30c622bf0f1136a95..99f97cd3fd6510a4f385e46946cfdd3683713059 100644 (file)
@@ -334,6 +334,10 @@ class ComboBox(core.Control,core.ItemContainer):
         """Replace(long from, long to, wxString value)"""
         return _controls.ComboBox_Replace(*args, **kwargs)
 
+    def SetSelection(*args, **kwargs):
+        """SetSelection(int n)"""
+        return _controls.ComboBox_SetSelection(*args, **kwargs)
+
     def SetMark(*args, **kwargs):
         """SetMark(long from, long to)"""
         return _controls.ComboBox_SetMark(*args, **kwargs)
index 4d803cd547417a2dbe21b833ae0353b469e07bbd..98d2cd301355c2556d30cbe3cdb1fe55a4510149 100644 (file)
@@ -2850,6 +2850,31 @@ static PyObject *_wrap_ComboBox_Replace(PyObject *self, PyObject *args, PyObject
 }
 
 
+static PyObject *_wrap_ComboBox_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxComboBox *arg1 = (wxComboBox *) 0 ;
+    int arg2 ;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "n", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi:ComboBox_SetSelection",kwnames,&obj0,&arg2)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxComboBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        (arg1)->SetSelection(arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_ComboBox_SetMark(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -25573,6 +25598,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ComboBox_GetInsertionPoint", (PyCFunction) _wrap_ComboBox_GetInsertionPoint, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_GetLastPosition", (PyCFunction) _wrap_ComboBox_GetLastPosition, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS },
index 4c89e589a6716f6013ccf2ed23ebe0f4382a3fd6..93006e547cf45198333087d9884cbc0e17616509 100644 (file)
@@ -5827,13 +5827,13 @@ def DLG_PNT(win, point_or_x, y=None):
     if y is None:
         return win.ConvertDialogPointToPixels(point_or_x)
     else:
-        return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
+        return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
 
 def DLG_SZE(win, size_width, height=None):
     if height is None:
         return win.ConvertDialogSizeToPixels(size_width)
     else:
-        return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
+        return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
 
 
 def FindWindowById(*args, **kwargs):
index b78dcf4cf38285f593ff6e6a1051bde5adce0b14..09db2db1dc6de0a86bc3b085e57e52b0a4a88e86 100644 (file)
@@ -2584,13 +2584,13 @@ Get the DC size in milimeters."""
            raise ValueError('textlist and coords must have same length')
         if foregrounds is None:
            foregrounds = []
-        elif isinstance(foregrounds, wxColour):
+        elif isinstance(foregrounds, wx.Colour):
            foregrounds = [foregrounds]
         elif len(foregrounds) != len(coords):
            raise ValueError('foregrounds and coords must have same length')
         if backgrounds is None:
            backgrounds = []
-        elif isinstance(backgrounds, wxColour):
+        elif isinstance(backgrounds, wx.Colour):
            backgrounds = [backgrounds]
         elif len(backgrounds) != len(coords):
            raise ValueError('backgrounds and coords must have same length')
index f64094848d98e013872e017cc8a58184c54f22f5..81d5998d7e8824d5cb5bb2f764de54c3b0c19497 100644 (file)
@@ -372,15 +372,17 @@ public:
 
         // First, make a new instance of the tag handler
         wxPyBeginBlockThreads();
-        PyObject* arg = Py_BuildValue("()");
-        PyObject* obj = PyInstance_New(m_tagHandlerClass, arg, NULL);
+        PyObject* arg = PyTuple_New(0);
+        PyObject* obj = PyObject_CallObject(m_tagHandlerClass, arg);
         Py_DECREF(arg);
-        wxPyEndBlockThreads();
-
+        
         // now figure out where it's C++ object is...
         wxPyHtmlWinTagHandler* thPtr;
-        if (! wxPyConvertSwigPtr(obj, (void **)&thPtr, wxT("wxPyHtmlWinTagHandler")))
+        if (! wxPyConvertSwigPtr(obj, (void **)&thPtr, wxT("wxPyHtmlWinTagHandler"))) {
+            wxPyEndBlockThreads();
             return;
+        }
+        wxPyEndBlockThreads();
 
         // add it,
         parser->AddTagHandler(thPtr);
index 1f07159792f875120bb60ac5e2d098cea80af00f..37cbc8d0a91d1e143523d04a40b420c53ca696a2 100644 (file)
@@ -2302,12 +2302,6 @@ class ArtProvider(object):
         del newobj.thisown
         self._setCallbackInfo(self, ArtProvider)
 
-    def __del__(self, destroy=_misc.delete_ArtProvider):
-        """__del__()"""
-        try:
-            if self.thisown: destroy(self)
-        except: pass
-
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(PyObject self, PyObject _class)"""
         return _misc.ArtProvider__setCallbackInfo(*args, **kwargs)
@@ -4380,7 +4374,8 @@ class DropTarget(object):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        if args: args[1].thisown = 0; self._setCallbackInfo(self, DropTarget)
+        if args: args[0].thisown = 0;
+        self._setCallbackInfo(self, DropTarget)
 
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(PyObject self, PyObject _class)"""
index a299cd3a326d3c19e0b51e7786917f09b1f83620..f1ec918c831a3e430718aacd9729307fe9947446 100644 (file)
@@ -12830,30 +12830,6 @@ static PyObject *_wrap_new_ArtProvider(PyObject *self, PyObject *args, PyObject
 }
 
 
-static PyObject *_wrap_delete_ArtProvider(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject *resultobj;
-    wxPyArtProvider *arg1 = (wxPyArtProvider *) 0 ;
-    PyObject * obj0 = 0 ;
-    char *kwnames[] = {
-        (char *) "self", NULL 
-    };
-    
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_ArtProvider",kwnames,&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyArtProvider,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        delete arg1;
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    Py_INCREF(Py_None); resultobj = Py_None;
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
 static PyObject *_wrap_ArtProvider__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxPyArtProvider *arg1 = (wxPyArtProvider *) 0 ;
@@ -24738,7 +24714,6 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"delete_MimeTypesManager", (PyCFunction) _wrap_delete_MimeTypesManager, METH_VARARGS | METH_KEYWORDS },
         { (char *)"MimeTypesManager_swigregister", MimeTypesManager_swigregister, METH_VARARGS },
         { (char *)"new_ArtProvider", (PyCFunction) _wrap_new_ArtProvider, METH_VARARGS | METH_KEYWORDS },
-        { (char *)"delete_ArtProvider", (PyCFunction) _wrap_delete_ArtProvider, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ArtProvider__setCallbackInfo", (PyCFunction) _wrap_ArtProvider__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ArtProvider_PushProvider", (PyCFunction) _wrap_ArtProvider_PushProvider, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ArtProvider_PopProvider", (PyCFunction) _wrap_ArtProvider_PopProvider, METH_VARARGS | METH_KEYWORDS },
index c658e38b63cf0f1492e8874d254c1e4be0210f71..51f3180f6fa504d558febf0feb8be79cb3232518 100644 (file)
@@ -3348,7 +3348,7 @@ class PreviewCanvas(ScrolledWindow):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._self._setOORInfo(self)
+        self._setOORInfo(self)
 
 
 class PreviewCanvasPtr(PreviewCanvas):
@@ -3370,7 +3370,7 @@ class PreviewFrame(Frame):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._self._setOORInfo(self)
+        self._setOORInfo(self)
 
     def Initialize(*args, **kwargs):
         """Initialize()"""
@@ -3424,7 +3424,7 @@ class PreviewControlBar(Panel):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._self._setOORInfo(self)
+        self._setOORInfo(self)
 
     def GetZoomControl(*args, **kwargs):
         """GetZoomControl() -> int"""
index 4a20e7ac316a09fc1f44717038020bc18f8019b6..ea4e9b8e8a1ec38655c3f43984ec0c4fc852baba 100644 (file)
@@ -400,9 +400,8 @@ public:
 
 #include <wx/tipwin.h>
 
-wxTipWindow *new_wxTipWindow(wxWindow *parent,wxString const *text,int maxLength,wxRect *rectBound){
-            wxString tmp = *text;
-            return new wxTipWindow(parent, tmp, maxLength, NULL, rectBound);
+wxTipWindow *new_wxTipWindow(wxWindow *parent,wxString const &text,int maxLength,wxRect *rectBound){
+            return new wxTipWindow(parent, text, maxLength, NULL, rectBound);
         }
 
 #include <wx/tipwin.h>
@@ -7767,10 +7766,11 @@ static PyObject * PopupTransientWindow_swigregister(PyObject *self, PyObject *ar
 static PyObject *_wrap_new_TipWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxWindow *arg1 = (wxWindow *) 0 ;
-    wxString *arg2 = (wxString *) 0 ;
+    wxString *arg2 = 0 ;
     int arg3 = (int) 100 ;
     wxRect *arg4 = (wxRect *) NULL ;
     wxTipWindow *result;
+    bool temp2 = False ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     PyObject * obj3 = 0 ;
@@ -7780,20 +7780,32 @@ static PyObject *_wrap_new_TipWindow(PyObject *self, PyObject *args, PyObject *k
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|iO:new_TipWindow",kwnames,&obj0,&obj1,&arg3,&obj3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    {
+        arg2 = wxString_in_helper(obj1);
+        if (arg2 == NULL) SWIG_fail;
+        temp2 = True;
+    }
     if (obj3) {
         if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (wxTipWindow *)new_wxTipWindow(arg1,(wxString const *)arg2,arg3,arg4);
+        result = (wxTipWindow *)new_wxTipWindow(arg1,(wxString const &)*arg2,arg3,arg4);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
     resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxTipWindow, 1);
+    {
+        if (temp2)
+        delete arg2;
+    }
     return resultobj;
     fail:
+    {
+        if (temp2)
+        delete arg2;
+    }
     return NULL;
 }