- def Add(self, *args, **kw):
- if type(args[0]) == type(1):
- apply(self.AddSpacer, args, kw)
- elif string.find(args[0].this, 'Sizer') != -1:
- apply(self.AddSizer, args, kw)
- else:
- apply(self.AddWindow, args, kw)
-
- 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, kw)
-
- def Prepend(self, *args, **kw):
- if type(args[0]) == type(1):
- apply(self.PrependSpacer, args, kw)
- elif string.find(args[0].this, 'Sizer') != -1:
- apply(self.PrependSizer, args, kw)
- else:
- apply(self.PrependWindow, args, kw)
-
- def Remove(self, *args, **kw):
- if type(args[0]) == type(1):
- apply(self.RemovePos, args, kw)
- elif string.find(args[0].this, 'Sizer') != -1:
- apply(self.RemoveSizer, args, kw)
- else:
- apply(self.RemoveWindow, args, kw)
+ def Add(self, item, *args, **kw):
+ if type(item) == type(1):
+ item = (item, args[0]) # backwards compatibility, args are width, height
+ args = args[1:]
+ self._Add(item, *args, **kw)