X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..0122b7e3fcfd78f879470053c91a60e3c66537a3:/wxPython/src/gtk/sizers.py diff --git a/wxPython/src/gtk/sizers.py b/wxPython/src/gtk/sizers.py index 3305dda245..16cd952a4b 100644 --- a/wxPython/src/gtk/sizers.py +++ b/wxPython/src/gtk/sizers.py @@ -14,10 +14,14 @@ from controls import * from events import * import wx import string -class wxSizerItemPtr : +class wxSizerItemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetPosition(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val def GetSize(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 @@ -52,14 +56,12 @@ class wxSizerItemPtr : return val def GetWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def SetWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetWindow,(self,) + _args, _kwargs) return val def GetSizer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetSizer,(self,) + _args, _kwargs) - if val: val = wxSizerPtr(val) return val def SetSizer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetSizer,(self,) + _args, _kwargs) @@ -97,7 +99,7 @@ class wxSizerItem(wxSizerItemPtr): -class wxSizerPtr : +class wxSizerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -182,37 +184,37 @@ class wxSizerPtr : def __repr__(self): return "" % (self.this,) - def Add(self, *args): + def Add(self, *args, **kw): if type(args[0]) == type(1): - apply(self.AddSpacer, args) + apply(self.AddSpacer, args, kw) elif string.find(args[0].this, 'Sizer') != -1: - apply(self.AddSizer, args) + apply(self.AddSizer, args, kw) else: - apply(self.AddWindow, args) + apply(self.AddWindow, args, kw) - def Insert(self, *args): - if type(args[0]) == type(1): - apply(self.InsertSpacer, args) - elif string.find(args[0].this, 'Sizer') != -1: - apply(self.InsertSizer, args) + def Insert(self, *args, **kw): + if type(args[1]) == type(1): + apply(self.InsertSpacer, args, kw) + elif string.find(args[1].this, 'Sizer') != -1: + apply(self.InsertSizer, args, kw) else: - apply(self.InsertWindow, args) + apply(self.InsertWindow, args, kw) - def Prepend(self, *args): + def Prepend(self, *args, **kw): if type(args[0]) == type(1): - apply(self.PrependSpacer, args) + apply(self.PrependSpacer, args, kw) elif string.find(args[0].this, 'Sizer') != -1: - apply(self.PrependSizer, args) + apply(self.PrependSizer, args, kw) else: - apply(self.PrependWindow, args) + apply(self.PrependWindow, args, kw) - def Remove(self, *args): + def Remove(self, *args, **kw): if type(args[0]) == type(1): - apply(self.RemovePos, args) + apply(self.RemovePos, args, kw) elif string.find(args[0].this, 'Sizer') != -1: - apply(self.RemoveSizer, args) + apply(self.RemoveSizer, args, kw) else: - apply(self.RemoveWindow, args) + apply(self.RemoveWindow, args, kw) def AddMany(self, widgets): for childinfo in widgets: @@ -284,7 +286,6 @@ class wxStaticBoxSizerPtr(wxBoxSizerPtr): self.thisown = 0 def GetStaticBox(self, *_args, **_kwargs): val = apply(sizersc.wxStaticBoxSizer_GetStaticBox,(self,) + _args, _kwargs) - if val: val = wxStaticBoxPtr(val) return val def RecalcSizes(self, *_args, **_kwargs): val = apply(sizersc.wxStaticBoxSizer_RecalcSizes,(self,) + _args, _kwargs) @@ -316,7 +317,6 @@ class wxNotebookSizerPtr(wxSizerPtr): return val def GetNotebook(self, *_args, **_kwargs): val = apply(sizersc.wxNotebookSizer_GetNotebook,(self,) + _args, _kwargs) - if val: val = wxNotebookPtr(val) return val def __repr__(self): return "" % (self.this,)