X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09f3d4e679f5742c54fb062ede846b77606a9c5b..4bb081fd23dc73d1bc005f67649c9eb0d244dc14:/wxPython/src/sizers.i diff --git a/wxPython/src/sizers.i b/wxPython/src/sizers.i index 74f92b4d46..11b6ca412b 100644 --- a/wxPython/src/sizers.i +++ b/wxPython/src/sizers.i @@ -43,6 +43,8 @@ public: //wxSizerItem( wxWindow *window, int option, int flag, int border, wxObject* userData ); //wxSizerItem( wxSizer *sizer, int option, int flag, int border, wxObject* userData ); + void DeleteWindows(); + wxPoint GetPosition(); wxSize GetSize(); wxSize CalcMin(); @@ -93,6 +95,12 @@ public: // wxSizer(); **** abstract, can't instantiate // ~wxSizer(); + %addmethods { + void _setOORInfo(PyObject* _self) { + self->SetClientObject(new wxPyOORClientData(_self)); + } + } + %addmethods { void Destroy() { delete self; } @@ -223,13 +231,29 @@ 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; void Layout(); void Fit( wxWindow *window ); + void FitInside( wxWindow *window ); + void SetSizeHints( wxWindow *window ); + void SetVirtualSizeHints( wxWindow *window ); + + void Clear( bool delete_windows=FALSE ); + void DeleteWindows(); + // wxList& GetChildren(); %addmethods { @@ -266,8 +290,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxPySizer, wxSizer); class wxPySizer : public wxSizer { public: wxPySizer(); - void _setSelf(PyObject* self, PyObject* _class); - %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPySizer)" + void _setCallbackInfo(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPySizer)" + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" }; @@ -276,6 +301,7 @@ public: class wxBoxSizer : public wxSizer { public: wxBoxSizer(int orient = wxHORIZONTAL); + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" int GetOrientation(); void RecalcSizes(); wxSize CalcMin(); @@ -286,6 +312,7 @@ public: class wxStaticBoxSizer : public wxBoxSizer { public: wxStaticBoxSizer(wxStaticBox *box, int orient = wxHORIZONTAL); + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" wxStaticBox *GetStaticBox(); void RecalcSizes(); wxSize CalcMin(); @@ -296,10 +323,9 @@ public: class wxNotebookSizer: public wxSizer { public: wxNotebookSizer( wxNotebook *nb ); - + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" void RecalcSizes(); wxSize CalcMin(); - wxNotebook *GetNotebook(); }; @@ -309,6 +335,7 @@ class wxGridSizer: public wxSizer { public: wxGridSizer( int rows=1, int cols=0, int vgap=0, int hgap=0 ); + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" void RecalcSizes(); wxSize CalcMin(); @@ -329,6 +356,7 @@ class wxFlexGridSizer: public wxGridSizer { public: wxFlexGridSizer( int rows=1, int cols=0, int vgap=0, int hgap=0 ); + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" void RecalcSizes(); wxSize CalcMin();