X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/019fd9d3793f9a56f80fa72589a6b7eb53885ff8..b7aef858828222a05e57671fa01d3cac78aee3ac:/wxPython/src/_sizers.i?ds=sidebyside diff --git a/wxPython/src/_sizers.i b/wxPython/src/_sizers.i index 6940696e43..3bd200a57f 100644 --- a/wxPython/src/_sizers.i +++ b/wxPython/src/_sizers.i @@ -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); @@ -314,11 +329,11 @@ public: %pythoncode { def GetSizeTuple(self): - return self.GetSize().asTuple() + return self.GetSize().Get() def GetPositionTuple(self): - return self.GetPosition().asTuple() + return self.GetPosition().Get() def GetMinSizeTuple(self): - return self.GetMinSize().asTuple() + return self.GetMinSize().Get() } virtual void RecalcSizes();