X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/21f8d7ea6b728d473045198304592b61c610e49a..76784eecd960198bc54429a6e16d5bd7af458fce:/utils/wxPython/src/gtk/controls2.py diff --git a/utils/wxPython/src/gtk/controls2.py b/utils/wxPython/src/gtk/controls2.py index 6c518ce39d..9b1ba88428 100644 --- a/utils/wxPython/src/gtk/controls2.py +++ b/utils/wxPython/src/gtk/controls2.py @@ -184,8 +184,8 @@ class wxListCtrlPtr(wxControlPtr): def GetItemData(self,arg0): val = controls2c.wxListCtrl_GetItemData(self.this,arg0) return val - def GetItem(self): - val = controls2c.wxListCtrl_GetItem(self.this) + def GetItem(self,arg0): + val = controls2c.wxListCtrl_GetItem(self.this,arg0) val = wxListItemPtr(val) val.thisown = 1 return val @@ -223,8 +223,8 @@ class wxListCtrlPtr(wxControlPtr): def HitTest(self,arg0): val = controls2c.wxListCtrl_HitTest(self.this,arg0.this) return val - def InsertColumnWithInfo(self,arg0,arg1): - val = controls2c.wxListCtrl_InsertColumnWithInfo(self.this,arg0,arg1.this) + def InsertColumnWith(self,arg0,arg1): + val = controls2c.wxListCtrl_InsertColumnWith(self.this,arg0,arg1.this) return val def InsertColumn(self,arg0,arg1,*args): val = apply(controls2c.wxListCtrl_InsertColumn,(self.this,arg0,arg1,)+args) @@ -324,9 +324,12 @@ class wxTreeItemDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - controls2c.delete_wxTreeItemData(self.this) + def GetData(self): + val = controls2c.wxTreeItemData_GetData(self.this) + return val + def SetData(self,arg0): + val = controls2c.wxTreeItemData_SetData(self.this,arg0) + return val def GetId(self): val = controls2c.wxTreeItemData_GetId(self.this) val = wxTreeItemIdPtr(val) @@ -337,8 +340,8 @@ class wxTreeItemDataPtr : def __repr__(self): return "" class wxTreeItemData(wxTreeItemDataPtr): - def __init__(self) : - self.this = controls2c.new_wxTreeItemData() + def __init__(self,*args) : + self.this = apply(controls2c.new_wxTreeItemData,()+args) self.thisown = 1 @@ -414,10 +417,6 @@ class wxTreeCtrlPtr(wxControlPtr): def GetItemSelectedImage(self,arg0): val = controls2c.wxTreeCtrl_GetItemSelectedImage(self.this,arg0.this) return val - def GetItemData(self,arg0): - val = controls2c.wxTreeCtrl_GetItemData(self.this,arg0.this) - val = wxTreeItemDataPtr(val) - return val def SetItemText(self,arg0,arg1): val = controls2c.wxTreeCtrl_SetItemText(self.this,arg0.this,arg1) return val @@ -427,11 +426,21 @@ class wxTreeCtrlPtr(wxControlPtr): def SetItemSelectedImage(self,arg0,arg1): val = controls2c.wxTreeCtrl_SetItemSelectedImage(self.this,arg0.this,arg1) return val + def SetItemHasChildren(self,arg0,*args): + val = apply(controls2c.wxTreeCtrl_SetItemHasChildren,(self.this,arg0.this,)+args) + return val + def GetItemData(self,arg0): + val = controls2c.wxTreeCtrl_GetItemData(self.this,arg0.this) + val = wxTreeItemDataPtr(val) + return val def SetItemData(self,arg0,arg1): val = controls2c.wxTreeCtrl_SetItemData(self.this,arg0.this,arg1.this) return val - def SetItemHasChildren(self,arg0,*args): - val = apply(controls2c.wxTreeCtrl_SetItemHasChildren,(self.this,arg0.this,)+args) + def GetPyData(self,arg0): + val = controls2c.wxTreeCtrl_GetPyData(self.this,arg0.this) + return val + def SetPyData(self,arg0,arg1): + val = controls2c.wxTreeCtrl_SetPyData(self.this,arg0.this,arg1) return val def IsVisible(self,arg0): val = controls2c.wxTreeCtrl_IsVisible(self.this,arg0.this) @@ -584,6 +593,19 @@ class wxTreeCtrlPtr(wxControlPtr): return val def __repr__(self): return "" + + # Redefine a couple methods that SWIG gets a bit confused on... + def GetFirstChild(self,arg0,arg1): + val1, val2 = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1) + val1 = wxTreeItemIdPtr(val1) + val1.thisown = 1 + return (val1,val2) + def GetNextChild(self,arg0,arg1): + val1, val2 = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1) + val1 = wxTreeItemIdPtr(val1) + val1.thisown = 1 + return (val1,val2) + class wxTreeCtrl(wxTreeCtrlPtr): def __init__(self,arg0,*args) : argl = map(None,args)