]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_sizers.i
Removed calls to wx.InitAllImageHandlers.
[wxWidgets.git] / wxPython / src / _sizers.i
index bf9aeaeaebec0e440ae660866b646dca4f490ed6..3bd200a57f2afb18ba7cb56feb0990988538e7a2 100644 (file)
@@ -251,6 +251,21 @@ public:
         }
 
         
         }
 
         
+        bool Detach(PyObject* item) {
+            bool blocked = wxPyBeginBlockThreads();
+            wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
+            wxPyEndBlockThreads(blocked);
+            if ( info.window )
+                return self->Detach(info.window);
+            else if ( info.sizer )
+                return self->Detach(info.sizer);
+            else if ( info.gotPos )
+                return self->Detach(info.pos);
+            else 
+                return False;
+        }
+
+        
         void _SetItemMinSize(PyObject* item, const wxSize& size) {
             bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
         void _SetItemMinSize(PyObject* item, const wxSize& size) {
             bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
@@ -314,11 +329,11 @@ public:
 
     %pythoncode {
     def GetSizeTuple(self):
 
     %pythoncode {
     def GetSizeTuple(self):
-        return self.GetSize().asTuple()
+        return self.GetSize().Get()
     def GetPositionTuple(self):
     def GetPositionTuple(self):
-        return self.GetPosition().asTuple()
+        return self.GetPosition().Get()
     def GetMinSizeTuple(self):
     def GetMinSizeTuple(self):
-        return self.GetMinSize().asTuple()
+        return self.GetMinSize().Get()
     }
 
     virtual void RecalcSizes();
     }
 
     virtual void RecalcSizes();
@@ -350,7 +365,9 @@ public:
 
     %extend {
         void Show(PyObject* item, bool show = True) {
 
     %extend {
         void Show(PyObject* item, bool show = True) {
+            bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
+            wxPyEndBlockThreads(blocked);
             if ( info.window )
                 self->Show(info.window, show);
             else if ( info.sizer )
             if ( info.window )
                 self->Show(info.window, show);
             else if ( info.sizer )
@@ -359,7 +376,9 @@ public:
 
         
         void Hide(PyObject* item) {
 
         
         void Hide(PyObject* item) {
+            bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
+            wxPyEndBlockThreads(blocked);
             if ( info.window )
                 self->Hide(info.window);
             else if ( info.sizer )
             if ( info.window )
                 self->Hide(info.window);
             else if ( info.sizer )
@@ -368,7 +387,9 @@ public:
 
         
         bool IsShown(PyObject* item) {
 
         
         bool IsShown(PyObject* item) {
+            bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
+            wxPyEndBlockThreads(blocked);
             if ( info.window ) 
                 return self->IsShown(info.window);
             else if ( info.sizer ) 
             if ( info.window ) 
                 return self->IsShown(info.window);
             else if ( info.sizer )