]> git.saurik.com Git - wxWidgets.git/commitdiff
reSWIGged
authorRobin Dunn <robin@alldunn.com>
Tue, 14 Sep 2004 06:29:24 +0000 (06:29 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 14 Sep 2004 06:29:24 +0000 (06:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

17 files changed:
wxPython/contrib/gizmos/mac/gizmos_wrap.cpp
wxPython/contrib/ogl/mac/ogl_wrap.cpp
wxPython/contrib/stc/mac/stc_wrap.cpp
wxPython/src/mac/_controls_wrap.cpp
wxPython/src/mac/_core.py
wxPython/src/mac/_core_wrap.cpp
wxPython/src/mac/_gdi_wrap.cpp
wxPython/src/mac/_misc.py
wxPython/src/mac/_misc_wrap.cpp
wxPython/src/mac/_windows_wrap.cpp
wxPython/src/mac/calendar.py
wxPython/src/mac/grid_wrap.cpp
wxPython/src/mac/html_wrap.cpp
wxPython/src/mac/wizard_wrap.cpp
wxPython/src/msw/_core.py
wxPython/src/msw/_misc.py
wxPython/src/msw/calendar.py

index a19ffa4097ad825366357269e3afcb0f9b99fc81..ca5922e8eb9f6c06f07a5bb868eb165308fbecbe 100644 (file)
@@ -790,11 +790,12 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -804,7 +805,7 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId const &item,bool textOnly){
index 6d404c09cf9da491d77d58bf225ea56b05b0703d..a10a04ffd163e8f80c11ddedcd68fc2ec49d6e2b 100644 (file)
@@ -475,11 +475,12 @@ SWIG_Check_int(PyObject* obj)
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -489,7 +490,7 @@ SWIG_Check_int(PyObject* obj)
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 
index 7f829b3a8dda861eb09f82e8dd74f04be6936270..4285e31c7ef23b77a18cc935ec9085646cd9c23b 100644 (file)
@@ -482,11 +482,12 @@ SWIG_Check_bool(PyObject* obj)
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -496,7 +497,7 @@ SWIG_Check_bool(PyObject* obj)
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 
index 0ebfa4caca1f772c665a55c76c47d7f5b5c92be4..1d296b5e05a75cba48cad3a80562d541f27fc59c 100644 (file)
@@ -599,11 +599,12 @@ void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -613,7 +614,7 @@ void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 
index 7e40ca8240f13b53a7ef45030a142376402e2cd1..5ff26d96e1cc4a9e4d7752c2b305e75c1bdfd9a7 100644 (file)
@@ -7260,6 +7260,22 @@ class Window(EvtHandler):
         """
         return _core_.Window_GetHandle(*args, **kwargs)
 
+    def AssociateHandle(*args, **kwargs):
+        """
+        AssociateHandle(self, long handle)
+
+        Associate the window with a new native handle
+        """
+        return _core_.Window_AssociateHandle(*args, **kwargs)
+
+    def DissociateHandle(*args, **kwargs):
+        """
+        DissociateHandle(self)
+
+        Dissociate the current native handle from the window
+        """
+        return _core_.Window_DissociateHandle(*args, **kwargs)
+
     def HasScrollbar(*args, **kwargs):
         """
         HasScrollbar(self, int orient) -> bool
@@ -9308,12 +9324,13 @@ class Sizer(Object):
 
     def Show(*args, **kwargs):
         """
-        Show(self, item, bool show=True)
+        Show(self, item, bool show=True, bool recursive=False) -> bool
 
         Shows or hides an item managed by the sizer.  To make a sizer item
         disappear or reappear, use Show followed by `Layout`.  The *item*
         parameter can be either a window, a sizer, or the zero-based index of
-        the item.
+        the item.  Use the recursive parameter to show or hide an item in a
+        subsizer.  Returns True if the item was found.
         """
         return _core_.Sizer_Show(*args, **kwargs)
 
@@ -9328,11 +9345,11 @@ class Sizer(Object):
         """
         return _core_.Sizer_IsShown(*args, **kwargs)
 
-    def Hide(self, item):
+    def Hide(self, item, recursive=False):
         """
-        A convenience method for Show(item, False).
+        A convenience method for Show(item, False, recursive).
         """
-        self.Show(item, False)
+        return self.Show(item, False, recursive)
 
     def ShowItems(*args, **kwargs):
         """
index 81d329267c9d22a1a06f3ce96b3374d04ea89820..b94d147f1db71bb9dd72a39f7ac20f16e2dd4f52 100644 (file)
@@ -865,11 +865,12 @@ PyObject *wxRect_Get(wxRect *self){
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -879,7 +880,7 @@ PyObject *wxRect_Get(wxRect *self){
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 void wxPoint2D_Set(wxPoint2D *self,double x,double y){
@@ -1555,6 +1556,9 @@ bool wxWindow_UnregisterHotKey(wxWindow *self,int hotkeyId){
 long wxWindow_GetHandle(wxWindow *self){
             return wxPyGetWinHandle(self);
         }
+void wxWindow_AssociateHandle(wxWindow *self,long handle){
+            self->AssociateHandle((WXWidget)handle);
+        }
 
 wxWindow* wxFindWindowById( long id, const wxWindow *parent = NULL ) {
     return wxWindow::FindWindowById(id, parent);
@@ -1908,16 +1912,16 @@ PyObject *wxSizer_GetChildren(wxSizer *self){
             wxSizerItemList& list = self->GetChildren();
             return wxPy_ConvertList(&list);
         }
-void wxSizer_Show(wxSizer *self,PyObject *item,bool show){
+bool wxSizer_Show(wxSizer *self,PyObject *item,bool show,bool recursive){
             bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
             wxPyEndBlockThreads(blocked);
             if ( info.window )
-                self->Show(info.window, show);
+                return self->Show(info.window, show, recursive);
             else if ( info.sizer )
-                self->Show(info.sizer, show);
+                return self->Show(info.sizer, show, recursive);
             else if ( info.gotPos )
-                self->Show(info.pos, show);
+                return self->Show(info.pos, show);
         }
 bool wxSizer_IsShown(wxSizer *self,PyObject *item){
             bool blocked = wxPyBeginBlockThreads();
@@ -27453,6 +27457,60 @@ static PyObject *_wrap_Window_GetHandle(PyObject *, PyObject *args, PyObject *kw
 }
 
 
+static PyObject *_wrap_Window_AssociateHandle(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxWindow *arg1 = (wxWindow *) 0 ;
+    long arg2 ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "handle", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_AssociateHandle",kwnames,&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    arg2 = (long)SWIG_As_long(obj1); 
+    if (PyErr_Occurred()) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        wxWindow_AssociateHandle(arg1,arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_Window_DissociateHandle(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxWindow *arg1 = (wxWindow *) 0 ;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_DissociateHandle",kwnames,&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        (arg1)->DissociateHandle();
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_Window_HasScrollbar(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxWindow *arg1 = (wxWindow *) 0 ;
@@ -35922,14 +35980,17 @@ static PyObject *_wrap_Sizer_Show(PyObject *, PyObject *args, PyObject *kwargs)
     wxSizer *arg1 = (wxSizer *) 0 ;
     PyObject *arg2 = (PyObject *) 0 ;
     bool arg3 = (bool) True ;
+    bool arg4 = (bool) False ;
+    bool result;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     PyObject * obj2 = 0 ;
+    PyObject * obj3 = 0 ;
     char *kwnames[] = {
-        (char *) "self",(char *) "item",(char *) "show", NULL 
+        (char *) "self",(char *) "item",(char *) "show",(char *) "recursive", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Sizer_Show",kwnames,&obj0,&obj1,&obj2)) goto fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Sizer_Show",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer,
     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     arg2 = obj1;
@@ -35937,14 +35998,20 @@ static PyObject *_wrap_Sizer_Show(PyObject *, PyObject *args, PyObject *kwargs)
         arg3 = (bool)SWIG_As_bool(obj2); 
         if (PyErr_Occurred()) SWIG_fail;
     }
+    if (obj3) {
+        arg4 = (bool)SWIG_As_bool(obj3); 
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        wxSizer_Show(arg1,arg2,arg3);
+        result = (bool)wxSizer_Show(arg1,arg2,arg3,arg4);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    Py_INCREF(Py_None); resultobj = Py_None;
+    {
+        resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
+    }
     return resultobj;
     fail:
     return NULL;
@@ -41132,6 +41199,8 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"Window_PopupMenuXY", (PyCFunction) _wrap_Window_PopupMenuXY, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"Window_PopupMenu", (PyCFunction) _wrap_Window_PopupMenu, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"Window_GetHandle", (PyCFunction) _wrap_Window_GetHandle, METH_VARARGS | METH_KEYWORDS, NULL },
+        { (char *)"Window_AssociateHandle", (PyCFunction) _wrap_Window_AssociateHandle, METH_VARARGS | METH_KEYWORDS, NULL },
+        { (char *)"Window_DissociateHandle", (PyCFunction) _wrap_Window_DissociateHandle, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"Window_HasScrollbar", (PyCFunction) _wrap_Window_HasScrollbar, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"Window_SetScrollbar", (PyCFunction) _wrap_Window_SetScrollbar, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"Window_SetScrollPos", (PyCFunction) _wrap_Window_SetScrollPos, METH_VARARGS | METH_KEYWORDS, NULL },
index 61c27dce07c37b3350da99147178becdf457d42d..debda2cb3d06f6a0b8139c57b7225a5294d14ec2 100644 (file)
@@ -621,11 +621,12 @@ SWIG_Check_int(PyObject* obj)
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -635,7 +636,7 @@ SWIG_Check_int(PyObject* obj)
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 PyObject *wxPen_GetDashes(wxPen *self){
index 3ac8345b9b8bacc5634b8d3884603a5f3030d06f..38bbef794f9f209f417ae2a1c70928fc3eee94e5 100644 (file)
@@ -205,6 +205,8 @@ class SystemOptionsPtr(SystemOptions):
         if not hasattr(self,"thisown"): self.thisown = 0
         self.__class__ = SystemOptions
 _misc_.SystemOptions_swigregister(SystemOptionsPtr)
+cvar = _misc_.cvar
+WINDOW_DEFAULT_VARIANT = cvar.WINDOW_DEFAULT_VARIANT
 
 def SystemOptions_SetOption(*args, **kwargs):
     """SystemOptions_SetOption(String name, String value)"""
@@ -544,7 +546,6 @@ class MutexGuiLockerPtr(MutexGuiLocker):
         if not hasattr(self,"thisown"): self.thisown = 0
         self.__class__ = MutexGuiLocker
 _misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr)
-cvar = _misc_.cvar
 FileSelectorPromptStr = cvar.FileSelectorPromptStr
 FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr
 DirSelectorPromptStr = cvar.DirSelectorPromptStr
@@ -3440,6 +3441,14 @@ class DateTime(object):
         """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime"""
         return _misc_.DateTime_GetWeek(*args, **kwargs)
 
+    SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead")
+    GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead")
+
+    def SetToWeekOfYear(*args, **kwargs):
+        """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
+        return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
+
+    SetToWeekOfYear = staticmethod(SetToWeekOfYear)
     def SetToLastMonthDay(*args, **kwargs):
         """SetToLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
         return _misc_.DateTime_SetToLastMonthDay(*args, **kwargs)
@@ -3827,6 +3836,10 @@ def DateTimeFromDMY(*args, **kwargs):
     val.thisown = 1
     return val
 
+def DateTime_SetToWeekOfYear(*args, **kwargs):
+    """DateTime_SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
+    return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
+
 class TimeSpan(object):
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
index 8149f3e255f703d1f137196921f6ad04b86f146d..b6ae55efdaaf2d04c3d36cce3d8fa081747551d0 100644 (file)
@@ -470,6 +470,7 @@ SWIG_Check_int(PyObject* obj)
   return SWIG_AsVal_int(obj, (int*)0);
 }
 
+ static const wxString wxPyWINDOW_DEFAULT_VARIANT(wxWINDOW_DEFAULT_VARIANT); 
 
 #include <wx/stockitem.h>
 
@@ -556,11 +557,12 @@ SWIG_Check_bool(PyObject* obj)
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -570,7 +572,7 @@ SWIG_Check_bool(PyObject* obj)
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 
@@ -1934,6 +1936,26 @@ static PyObject * SystemSettings_swigregister(PyObject *, PyObject *args) {
     Py_INCREF(obj);
     return Py_BuildValue((char *)"");
 }
+static int _wrap_WINDOW_DEFAULT_VARIANT_set(PyObject *) {
+    PyErr_SetString(PyExc_TypeError,"Variable WINDOW_DEFAULT_VARIANT is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_WINDOW_DEFAULT_VARIANT_get() {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyWINDOW_DEFAULT_VARIANT)->c_str(), (&wxPyWINDOW_DEFAULT_VARIANT)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyWINDOW_DEFAULT_VARIANT)->c_str(), (&wxPyWINDOW_DEFAULT_VARIANT)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
 static PyObject *_wrap_new_SystemOptions(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxSystemOptions *result;
@@ -18802,6 +18824,46 @@ static PyObject *_wrap_DateTime_GetWeek(PyObject *, PyObject *args, PyObject *kw
 }
 
 
+static PyObject *_wrap_DateTime_SetToWeekOfYear(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    int arg1 ;
+    int arg2 ;
+    int arg3 = (int) wxDateTime::Mon ;
+    wxDateTime result;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    PyObject * obj2 = 0 ;
+    char *kwnames[] = {
+        (char *) "year",(char *) "numWeek",(char *) "weekday", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:DateTime_SetToWeekOfYear",kwnames,&obj0,&obj1,&obj2)) goto fail;
+    arg1 = (int)SWIG_As_int(obj0); 
+    if (PyErr_Occurred()) SWIG_fail;
+    arg2 = (int)SWIG_As_int(obj1); 
+    if (PyErr_Occurred()) SWIG_fail;
+    if (obj2) {
+        arg3 = (int)SWIG_As_int(obj2); 
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = wxDateTime::SetToWeekOfYear(arg1,arg2,(wxDateTime::WeekDay )arg3);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        wxDateTime * resultptr;
+        resultptr = new wxDateTime((wxDateTime &) result);
+        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxDateTime, 1);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_DateTime_SetToLastMonthDay(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxDateTime *arg1 = (wxDateTime *) 0 ;
@@ -29029,6 +29091,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"DateTime_GetLastWeekDay", (PyCFunction) _wrap_DateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"DateTime_SetToTheWeek", (PyCFunction) _wrap_DateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"DateTime_GetWeek", (PyCFunction) _wrap_DateTime_GetWeek, METH_VARARGS | METH_KEYWORDS, NULL },
+        { (char *)"DateTime_SetToWeekOfYear", (PyCFunction) _wrap_DateTime_SetToWeekOfYear, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"DateTime_SetToLastMonthDay", (PyCFunction) _wrap_DateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"DateTime_GetLastMonthDay", (PyCFunction) _wrap_DateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL },
         { (char *)"DateTime_SetToYearDay", (PyCFunction) _wrap_DateTime_SetToYearDay, METH_VARARGS | METH_KEYWORDS, NULL },
@@ -30136,6 +30199,7 @@ SWIGEXPORT(void) SWIG_init(void) {
     PyDict_SetItemString(d,"SYS_SCREEN_SMALL", SWIG_From_int((int)wxSYS_SCREEN_SMALL));
     PyDict_SetItemString(d,"SYS_SCREEN_DESKTOP", SWIG_From_int((int)wxSYS_SCREEN_DESKTOP));
     PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
+    SWIG_addvarlink(SWIG_globals,(char*)"WINDOW_DEFAULT_VARIANT",_wrap_WINDOW_DEFAULT_VARIANT_get, _wrap_WINDOW_DEFAULT_VARIANT_set);
     SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorPromptStr",_wrap_FileSelectorPromptStr_get, _wrap_FileSelectorPromptStr_set);
     SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorDefaultWildcardStr",_wrap_FileSelectorDefaultWildcardStr_get, _wrap_FileSelectorDefaultWildcardStr_set);
     SWIG_addvarlink(SWIG_globals,(char*)"DirSelectorPromptStr",_wrap_DirSelectorPromptStr_get, _wrap_DirSelectorPromptStr_set);
index baf2ef53f253008225625466f0523487b7178d14..17aac5dc2d82cab61d87dceabbc98751faa1c706 100644 (file)
@@ -551,11 +551,12 @@ SWIG_Check_bool(PyObject* obj)
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -565,7 +566,7 @@ SWIG_Check_bool(PyObject* obj)
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 
index 64a43d13f848f060b7feca9b2c180144fedbb564..71b85d2a0579a6d1a98c598f500cc8fca26252e0 100644 (file)
@@ -149,11 +149,11 @@ class CalendarEvent(_core.CommandEvent):
 
     def PySetDate(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetDate(_py2wx(date))
+        self.SetDate(_pydate2wxdate(date))
 
     def PyGetDate(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetDate())
+        return _wxdate2pydate(self.GetDate())
 
 
 class CalendarEventPtr(CalendarEvent):
@@ -476,19 +476,19 @@ class CalendarCtrl(_core.Control):
     GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
     def PySetDate(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetDate(_py2wx(date))
+        self.SetDate(_pydate2wxdate(date))
 
     def PyGetDate(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetDate())
+        return _wxdate2pydate(self.GetDate())
 
     def PySetLowerDateLimit(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetLowerDateLimit(_py2wx(date))
+        self.SetLowerDateLimit(_pydate2wxdate(date))
 
     def PySetUpperDateLimit(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetUpperDateLimit(_py2wx(date))
+        self.SetUpperDateLimit(_pydate2wxdate(date))
 
     def PySetDateRange(self, lowerdate, upperdate):
         """takes datetime.datetime or datetime.date objects"""
@@ -497,11 +497,11 @@ class CalendarCtrl(_core.Control):
 
     def PyGetLowerDateLimit(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetLowerDateLimit())
+        return _wxdate2pydate(self.GetLowerDateLimit())
 
     def PyGetUpperDateLimit(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetUpperDateLimit())
+        return _wxdate2pydate(self.GetUpperDateLimit())
 
 
 class CalendarCtrlPtr(CalendarCtrl):
@@ -540,17 +540,20 @@ def CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs):
     """
     return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
 
-def _py2wx(date):
+def _pydate2wxdate(date):
     import datetime
     assert isinstance(date, (datetime.datetime, datetime.date))
     tt = date.timetuple()
     dmy = (tt[2], tt[1]-1, tt[0])
     return wx.DateTimeFromDMY(*dmy)
 
-def _wx2py(date):
+def _wxdate2pydate(date):
     import datetime
     assert isinstance(date, wx.DateTime)
-    ymd = map(int, date.FormatISODate().split('-'))
-    return datetime.date(*ymd)
+    if date.IsValid():
+        ymd = map(int, date.FormatISODate().split('-'))
+        return datetime.date(*ymd)
+    else:
+        return None
 
 
index 9053d750fea6ab7f8612e3f1291f62e440d6e515..3c38f5bba34534d6eec3ac1d5d31720ab626078d 100644 (file)
@@ -1203,11 +1203,12 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -1217,7 +1218,7 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 void wxGridCellAttrProvider__setOORInfo(wxGridCellAttrProvider *self,PyObject *_self){
index 6fd1fcac21eb2ff35360b8e2b2424f81c828457e..362977d3dabc3a3854ec89175935c47a9bde2f33 100644 (file)
@@ -561,11 +561,12 @@ private:
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -575,7 +576,7 @@ private:
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 
index ff100654b3fd00d65da636b943b4d1f9a72e1fcc..5d41528d3bebd5c8638351a24304f89295c6ff5f 100644 (file)
@@ -553,11 +553,12 @@ bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -567,7 +568,7 @@ bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 
index ccf6b4608dcc12e6b37b15f778dfabd9a3bf0abb..8aab902256641934442684cbebe9001cbfd126f1 100644 (file)
@@ -7260,6 +7260,22 @@ class Window(EvtHandler):
         """
         return _core_.Window_GetHandle(*args, **kwargs)
 
+    def AssociateHandle(*args, **kwargs):
+        """
+        AssociateHandle(self, long handle)
+
+        Associate the window with a new native handle
+        """
+        return _core_.Window_AssociateHandle(*args, **kwargs)
+
+    def DissociateHandle(*args, **kwargs):
+        """
+        DissociateHandle(self)
+
+        Dissociate the current native handle from the window
+        """
+        return _core_.Window_DissociateHandle(*args, **kwargs)
+
     def OnPaint(*args, **kwargs):
         """OnPaint(self, PaintEvent event)"""
         return _core_.Window_OnPaint(*args, **kwargs)
@@ -9377,12 +9393,13 @@ class Sizer(Object):
 
     def Show(*args, **kwargs):
         """
-        Show(self, item, bool show=True)
+        Show(self, item, bool show=True, bool recursive=False) -> bool
 
         Shows or hides an item managed by the sizer.  To make a sizer item
         disappear or reappear, use Show followed by `Layout`.  The *item*
         parameter can be either a window, a sizer, or the zero-based index of
-        the item.
+        the item.  Use the recursive parameter to show or hide an item in a
+        subsizer.  Returns True if the item was found.
         """
         return _core_.Sizer_Show(*args, **kwargs)
 
@@ -9397,11 +9414,11 @@ class Sizer(Object):
         """
         return _core_.Sizer_IsShown(*args, **kwargs)
 
-    def Hide(self, item):
+    def Hide(self, item, recursive=False):
         """
-        A convenience method for Show(item, False).
+        A convenience method for Show(item, False, recursive).
         """
-        self.Show(item, False)
+        return self.Show(item, False, recursive)
 
     def ShowItems(*args, **kwargs):
         """
index 3ac8345b9b8bacc5634b8d3884603a5f3030d06f..38bbef794f9f209f417ae2a1c70928fc3eee94e5 100644 (file)
@@ -205,6 +205,8 @@ class SystemOptionsPtr(SystemOptions):
         if not hasattr(self,"thisown"): self.thisown = 0
         self.__class__ = SystemOptions
 _misc_.SystemOptions_swigregister(SystemOptionsPtr)
+cvar = _misc_.cvar
+WINDOW_DEFAULT_VARIANT = cvar.WINDOW_DEFAULT_VARIANT
 
 def SystemOptions_SetOption(*args, **kwargs):
     """SystemOptions_SetOption(String name, String value)"""
@@ -544,7 +546,6 @@ class MutexGuiLockerPtr(MutexGuiLocker):
         if not hasattr(self,"thisown"): self.thisown = 0
         self.__class__ = MutexGuiLocker
 _misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr)
-cvar = _misc_.cvar
 FileSelectorPromptStr = cvar.FileSelectorPromptStr
 FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr
 DirSelectorPromptStr = cvar.DirSelectorPromptStr
@@ -3440,6 +3441,14 @@ class DateTime(object):
         """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime"""
         return _misc_.DateTime_GetWeek(*args, **kwargs)
 
+    SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead")
+    GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead")
+
+    def SetToWeekOfYear(*args, **kwargs):
+        """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
+        return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
+
+    SetToWeekOfYear = staticmethod(SetToWeekOfYear)
     def SetToLastMonthDay(*args, **kwargs):
         """SetToLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
         return _misc_.DateTime_SetToLastMonthDay(*args, **kwargs)
@@ -3827,6 +3836,10 @@ def DateTimeFromDMY(*args, **kwargs):
     val.thisown = 1
     return val
 
+def DateTime_SetToWeekOfYear(*args, **kwargs):
+    """DateTime_SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
+    return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
+
 class TimeSpan(object):
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
index 64a43d13f848f060b7feca9b2c180144fedbb564..71b85d2a0579a6d1a98c598f500cc8fca26252e0 100644 (file)
@@ -149,11 +149,11 @@ class CalendarEvent(_core.CommandEvent):
 
     def PySetDate(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetDate(_py2wx(date))
+        self.SetDate(_pydate2wxdate(date))
 
     def PyGetDate(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetDate())
+        return _wxdate2pydate(self.GetDate())
 
 
 class CalendarEventPtr(CalendarEvent):
@@ -476,19 +476,19 @@ class CalendarCtrl(_core.Control):
     GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
     def PySetDate(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetDate(_py2wx(date))
+        self.SetDate(_pydate2wxdate(date))
 
     def PyGetDate(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetDate())
+        return _wxdate2pydate(self.GetDate())
 
     def PySetLowerDateLimit(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetLowerDateLimit(_py2wx(date))
+        self.SetLowerDateLimit(_pydate2wxdate(date))
 
     def PySetUpperDateLimit(self, date):
         """takes datetime.datetime or datetime.date object"""
-        self.SetUpperDateLimit(_py2wx(date))
+        self.SetUpperDateLimit(_pydate2wxdate(date))
 
     def PySetDateRange(self, lowerdate, upperdate):
         """takes datetime.datetime or datetime.date objects"""
@@ -497,11 +497,11 @@ class CalendarCtrl(_core.Control):
 
     def PyGetLowerDateLimit(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetLowerDateLimit())
+        return _wxdate2pydate(self.GetLowerDateLimit())
 
     def PyGetUpperDateLimit(self):
         """returns datetime.date object"""
-        return _wx2py(self.GetUpperDateLimit())
+        return _wxdate2pydate(self.GetUpperDateLimit())
 
 
 class CalendarCtrlPtr(CalendarCtrl):
@@ -540,17 +540,20 @@ def CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs):
     """
     return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
 
-def _py2wx(date):
+def _pydate2wxdate(date):
     import datetime
     assert isinstance(date, (datetime.datetime, datetime.date))
     tt = date.timetuple()
     dmy = (tt[2], tt[1]-1, tt[0])
     return wx.DateTimeFromDMY(*dmy)
 
-def _wx2py(date):
+def _wxdate2pydate(date):
     import datetime
     assert isinstance(date, wx.DateTime)
-    ymd = map(int, date.FormatISODate().split('-'))
-    return datetime.date(*ymd)
+    if date.IsValid():
+        ymd = map(int, date.FormatISODate().split('-'))
+        return datetime.date(*ymd)
+    else:
+        return None