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

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

index b5dc976af4b20e30336d5ff2824b7314aaddef99..348a2e95cebb243dd9738cdebb9d578d5d51d75a 100644 (file)
@@ -342,6 +342,10 @@ class ComboBox(Choice):
         """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 6c27b4796e139434dcb1cbe71987f8827f490963..e860d08c2e1bf9185ce9d0854cefb718afd99419 100644 (file)
@@ -2906,6 +2906,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 ;
@@ -26033,6 +26058,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 75a0ee4ba31bdcfea4cd65eb59365d2e75b98dc0..f39daa1387b66f12aa3579b9bc221cd9bc9aa951 100644 (file)
@@ -5835,13 +5835,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 06c72fd690922a5f33a72e2d601a9bd0e125eb9e..1185de34386e809f076520d3599f5ea915cf0c49 100644 (file)
@@ -2664,13 +2664,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 1900feaae97f8f031c2b50f7cda1e368eed3c9e2..34e7e75e3cbcc49af7007c443a8d2c4305176dbe 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)
@@ -4384,7 +4378,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 5ad79373a4cad411e0cc2d7df0b678f079263176..325288c3d3edce90ce68b90ead1a538863e0d7a8 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 ;
@@ -24778,7 +24754,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 057258939010a046472b45eb2b1f832ad0c88770..c1c0e811688f57a864d05f2fee7c9dbac860ee1c 100644 (file)
@@ -3408,7 +3408,7 @@ class PreviewCanvas(ScrolledWindow):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._self._setOORInfo(self)
+        self._setOORInfo(self)
 
 
 class PreviewCanvasPtr(PreviewCanvas):
@@ -3430,7 +3430,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()"""
@@ -3484,7 +3484,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 ec92af2bd2e04f4df0553a2ec3cc1a1dc6dab6f7..94f402c1e320898ad7dc84e2539422fa8a7b6e19 100644 (file)
@@ -405,9 +405,8 @@ IMP_PYCALLBACK_BOOL_(wxPyPopupTransientWindow, wxPopupTransientWindow, CanDismis
 
 #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>
@@ -7922,10 +7921,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 ;
@@ -7935,20 +7935,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;
 }