From 82550f2324e237cd528e34039ab5636cceabb10d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 17 Apr 2002 18:03:45 +0000 Subject: [PATCH] Added some methods to be consistent with wxWindow git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/msw/sizers.py | 8 ++++++++ wxPython/src/sizers.i | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/wxPython/src/msw/sizers.py b/wxPython/src/msw/sizers.py index 2d780afceb..5ec6b397d9 100644 --- a/wxPython/src/msw/sizers.py +++ b/wxPython/src/msw/sizers.py @@ -245,6 +245,14 @@ class wxSizerPtr(wxObjectPtr): else: apply(self.SetItemMinSizeWindow, args) + + def GetSizeTuple(self): + return self.GetSize().asTuple() + def GetPositionTuple(self): + return self.GetPosition().asTuple() + def GetMinSizeTuple(self): + return self.GetMinSize().asTuple() + class wxSizer(wxSizerPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/sizers.i b/wxPython/src/sizers.i index 1e65076ff9..75c9b24d90 100644 --- a/wxPython/src/sizers.i +++ b/wxPython/src/sizers.i @@ -231,6 +231,15 @@ public: wxPoint GetPosition(); wxSize GetMinSize(); + %pragma(python) addtoclass = " + def GetSizeTuple(self): + return self.GetSize().asTuple() + def GetPositionTuple(self): + return self.GetPosition().asTuple() + def GetMinSizeTuple(self): + return self.GetMinSize().asTuple() + " + // void RecalcSizes() = 0; // wxSize CalcMin() = 0;