]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/controls2.py
Added typemap for wxArrayString
[wxWidgets.git] / wxPython / src / gtk / controls2.py
index db98bc29b5617e3bfd0785b575dafbed555d65a1..7b8c5eae19c2d4e60ee3dcefbc2f26676caf622a 100644 (file)
@@ -13,6 +13,126 @@ from events import *
 
 from controls import *
 import wx
+
+def EVT_LIST_BEGIN_DRAG(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_DRAG, func)
+
+def EVT_LIST_BEGIN_RDRAG(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_RDRAG, func)
+
+def EVT_LIST_BEGIN_LABEL_EDIT(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, func)
+
+def EVT_LIST_END_LABEL_EDIT(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_END_LABEL_EDIT, func)
+
+def EVT_LIST_DELETE_ITEM(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ITEM, func)
+
+def EVT_LIST_DELETE_ALL_ITEMS(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, func)
+
+def EVT_LIST_GET_INFO(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_GET_INFO, func)
+
+def EVT_LIST_SET_INFO(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_SET_INFO, func)
+
+def EVT_LIST_ITEM_SELECTED(win, id, func):
+    win.Connect(id, -1,  wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
+
+def EVT_LIST_ITEM_DESELECTED(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
+
+def EVT_LIST_KEY_DOWN(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_KEY_DOWN, func)
+
+def EVT_LIST_INSERT_ITEM(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_INSERT_ITEM, func)
+
+def EVT_LIST_COL_CLICK(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
+
+def EVT_LIST_COL_RIGHT_CLICK(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, func)
+
+def EVT_LIST_COL_BEGIN_DRAG(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, func)
+
+def EVT_LIST_COL_DRAGGING(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_DRAGGING, func)
+
+def EVT_LIST_COL_END_DRAG(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_END_DRAG, func)
+
+def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, func)
+
+def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func)
+
+def EVT_LIST_ITEM_ACTIVATED(win, id, func):
+    win.Connect(id, -1,  wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func)
+
+def EVT_LIST_CACHE_HINT(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_LIST_CACHE_HINT, func)
+
+
+# wxTreeCtrl events
+def EVT_TREE_BEGIN_DRAG(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func)
+
+def EVT_TREE_BEGIN_RDRAG(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
+
+def EVT_TREE_END_DRAG(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func)
+
+def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
+
+def EVT_TREE_END_LABEL_EDIT(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func)
+
+def EVT_TREE_GET_INFO(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func)
+
+def EVT_TREE_SET_INFO(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func)
+
+def EVT_TREE_ITEM_EXPANDED(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func)
+
+def EVT_TREE_ITEM_EXPANDING(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func)
+
+def EVT_TREE_ITEM_COLLAPSED(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func)
+
+def EVT_TREE_ITEM_COLLAPSING(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func)
+
+def EVT_TREE_SEL_CHANGED(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func)
+
+def EVT_TREE_SEL_CHANGING(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func)
+
+def EVT_TREE_KEY_DOWN(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func)
+
+def EVT_TREE_DELETE_ITEM(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
+
+def EVT_TREE_ITEM_ACTIVATED(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, func)
+
+def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, func)
+
+def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func):
+    win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func)
+
 class wxListItemAttrPtr :
     def __init__(self,this):
         self.this = this
@@ -263,6 +383,12 @@ class wxListEventPtr(wxNotifyEventPtr):
     def GetItem(self, *_args, **_kwargs):
         val = apply(controls2c.wxListEvent_GetItem,(self,) + _args, _kwargs)
         return val
+    def GetCacheFrom(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListEvent_GetCacheFrom,(self,) + _args, _kwargs)
+        return val
+    def GetCacheTo(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListEvent_GetCacheTo,(self,) + _args, _kwargs)
+        return val
     def __setattr__(self,name,value):
         if name == "m_code" :
             controls2c.wxListEvent_m_code_set(self,value)
@@ -305,8 +431,9 @@ class wxListEventPtr(wxNotifyEventPtr):
     def __repr__(self):
         return "<C wxListEvent instance at %s>" % (self.this,)
 class wxListEvent(wxListEventPtr):
-    def __init__(self,this):
-        self.this = this
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(controls2c.new_wxListEvent,_args,_kwargs)
+        self.thisown = 1
 
 
 
@@ -315,60 +442,62 @@ class wxListCtrlPtr(wxControlPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def Arrange(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_Arrange,(self,) + _args, _kwargs)
+    def Create(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_Create,(self,) + _args, _kwargs)
         return val
-    def AssignImageList(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_AssignImageList,(self,) + _args, _kwargs)
-        _args[0].thisown = 0
+    def _setCallbackInfo(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl__setCallbackInfo,(self,) + _args, _kwargs)
         return val
-    def DeleteItem(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_DeleteItem,(self,) + _args, _kwargs)
+    def SetForegroundColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetForegroundColour,(self,) + _args, _kwargs)
         return val
-    def DeleteAllItems(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_DeleteAllItems,(self,) + _args, _kwargs)
+    def SetBackgroundColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetBackgroundColour,(self,) + _args, _kwargs)
         return val
-    def DeleteColumn(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_DeleteColumn,(self,) + _args, _kwargs)
+    def GetColumn(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs)
         return val
-    def DeleteAllColumns(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_DeleteAllColumns,(self,) + _args, _kwargs)
+    def SetColumn(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetColumn,(self,) + _args, _kwargs)
         return val
-    def ClearAll(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_ClearAll,(self,) + _args, _kwargs)
+    def GetColumnWidth(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetColumnWidth,(self,) + _args, _kwargs)
         return val
-    def EditLabel(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_EditLabel,(self,) + _args, _kwargs)
+    def SetColumnWidth(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetColumnWidth,(self,) + _args, _kwargs)
         return val
-    def EnsureVisible(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs)
+    def GetCountPerPage(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetCountPerPage,(self,) + _args, _kwargs)
         return val
-    def FindItem(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_FindItem,(self,) + _args, _kwargs)
+    def GetItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
         return val
-    def FindItemData(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_FindItemData,(self,) + _args, _kwargs)
+    def SetItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetItem,(self,) + _args, _kwargs)
         return val
-    def FindItemAtPos(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_FindItemAtPos,(self,) + _args, _kwargs)
+    def SetStringItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetStringItem,(self,) + _args, _kwargs)
         return val
-    def GetColumn(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs)
+    def GetItemState(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetItemState,(self,) + _args, _kwargs)
         return val
-    def GetColumnWidth(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetColumnWidth,(self,) + _args, _kwargs)
+    def SetItemState(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetItemState,(self,) + _args, _kwargs)
         return val
-    def GetCountPerPage(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetCountPerPage,(self,) + _args, _kwargs)
+    def SetItemImage(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetItemImage,(self,) + _args, _kwargs)
         return val
-    def GetImageList(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetImageList,(self,) + _args, _kwargs)
+    def GetItemText(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetItemText,(self,) + _args, _kwargs)
+        return val
+    def SetItemText(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetItemText,(self,) + _args, _kwargs)
         return val
     def GetItemData(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_GetItemData,(self,) + _args, _kwargs)
         return val
-    def GetItem(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
+    def SetItemData(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetItemData,(self,) + _args, _kwargs)
         return val
     def GetItemPosition(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_GetItemPosition,(self,) + _args, _kwargs)
@@ -378,35 +507,91 @@ class wxListCtrlPtr(wxControlPtr):
         val = apply(controls2c.wxListCtrl_GetItemRect,(self,) + _args, _kwargs)
         if val: val = wxRectPtr(val) ; val.thisown = 1
         return val
-    def GetItemState(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetItemState,(self,) + _args, _kwargs)
+    def SetItemPosition(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetItemPosition,(self,) + _args, _kwargs)
         return val
     def GetItemCount(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_GetItemCount,(self,) + _args, _kwargs)
         return val
+    def GetColumnCount(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetColumnCount,(self,) + _args, _kwargs)
+        return val
     def GetItemSpacing(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_GetItemSpacing,(self,) + _args, _kwargs)
         return val
-    def GetItemText(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetItemText,(self,) + _args, _kwargs)
-        return val
-    def GetNextItem(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_GetNextItem,(self,) + _args, _kwargs)
-        return val
     def GetSelectedItemCount(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs)
         return val
+    def GetTextColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetTextColour,(self,) + _args, _kwargs)
+        if val: val = wxColourPtr(val) ; val.thisown = 1
+        return val
+    def SetTextColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetTextColour,(self,) + _args, _kwargs)
+        return val
     def GetTopItem(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_GetTopItem,(self,) + _args, _kwargs)
         return val
-    def HitTest(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs)
+    def SetSingleStyle(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetSingleStyle,(self,) + _args, _kwargs)
         return val
-    def InsertColumnInfo(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs)
+    def SetWindowStyleFlag(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetWindowStyleFlag,(self,) + _args, _kwargs)
         return val
-    def InsertColumn(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs)
+    def GetNextItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetNextItem,(self,) + _args, _kwargs)
+        return val
+    def GetImageList(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetImageList,(self,) + _args, _kwargs)
+        return val
+    def SetImageList(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetImageList,(self,) + _args, _kwargs)
+        return val
+    def AssignImageList(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_AssignImageList,(self,) + _args, _kwargs)
+        _args[0].thisown = 0
+        return val
+    def IsVirtual(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_IsVirtual,(self,) + _args, _kwargs)
+        return val
+    def RefreshItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_RefreshItem,(self,) + _args, _kwargs)
+        return val
+    def RefreshItems(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_RefreshItems,(self,) + _args, _kwargs)
+        return val
+    def Arrange(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_Arrange,(self,) + _args, _kwargs)
+        return val
+    def DeleteItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_DeleteItem,(self,) + _args, _kwargs)
+        return val
+    def DeleteAllItems(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_DeleteAllItems,(self,) + _args, _kwargs)
+        return val
+    def DeleteColumn(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_DeleteColumn,(self,) + _args, _kwargs)
+        return val
+    def DeleteAllColumns(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_DeleteAllColumns,(self,) + _args, _kwargs)
+        return val
+    def ClearAll(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_ClearAll,(self,) + _args, _kwargs)
+        return val
+    def EnsureVisible(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs)
+        return val
+    def FindItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_FindItem,(self,) + _args, _kwargs)
+        return val
+    def FindItemData(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_FindItemData,(self,) + _args, _kwargs)
+        return val
+    def FindItemAtPos(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_FindItemAtPos,(self,) + _args, _kwargs)
+        return val
+    def HitTest(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs)
         return val
     def InsertItem(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_InsertItem,(self,) + _args, _kwargs)
@@ -420,58 +605,164 @@ class wxListCtrlPtr(wxControlPtr):
     def InsertImageStringItem(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_InsertImageStringItem,(self,) + _args, _kwargs)
         return val
+    def InsertColumnInfo(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs)
+        return val
+    def InsertColumn(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs)
+        return val
+    def SetItemCount(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SetItemCount,(self,) + _args, _kwargs)
+        return val
     def ScrollList(self, *_args, **_kwargs):
         val = apply(controls2c.wxListCtrl_ScrollList,(self,) + _args, _kwargs)
         return val
-    def SetBackgroundColour(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetBackgroundColour,(self,) + _args, _kwargs)
+    def SortItems(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_SortItems,(self,) + _args, _kwargs)
         return val
-    def SetColumn(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetColumn,(self,) + _args, _kwargs)
+    def __repr__(self):
+        return "<C wxListCtrl instance at %s>" % (self.this,)
+    
+    def GetItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
+        val.thisown = 1
         return val
-    def SetColumnWidth(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetColumnWidth,(self,) + _args, _kwargs)
+    
+    
+    # Some helpers...
+
+    def Select(self, idx, on=1):
+        '''[de]select an item'''
+        if on: state = wxLIST_STATE_SELECTED
+        else: state = 0
+        self.SetItemState(idx, state, wxLIST_STATE_SELECTED)
+
+    def Focus(self, idx):
+        '''Focus and show the given item'''
+        self.SetItemState(idx, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED)
+        self.EnsureVisible(idx)
+
+    def GetFocusedItem(self):
+        '''get the currently focused item or -1 if none'''
+        return self.GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED)
+
+    def IsSelected(self, idx):
+        '''return TRUE if the item is selected'''
+        return self.GetItemState(idx, wxLIST_STATE_SELECTED) != 0
+
+    def SetColumnImage(self, col, image):
+        item = wxListItem()
+        item.SetMask(wxLIST_MASK_IMAGE)
+        item.SetImage(image)
+        self.SetColumn(col, item)
+
+    def ClearColumnImage(self, col):
+        self.SetColumnImage(col, -1)
+    
+class wxListCtrl(wxListCtrlPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
+        self.thisown = 1
+        self._setCallbackInfo(self, wxListCtrl)
+        self._setOORInfo(self)
+
+
+
+def wxPreListCtrl(*_args,**_kwargs):
+    val = wxListCtrlPtr(apply(controls2c.new_wxPreListCtrl,_args,_kwargs))
+    val.thisown = 1
+    val._setOORInfo(val)
+    return val
+
+
+class wxListViewPtr(wxListCtrlPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def Create(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_Create,(self,) + _args, _kwargs)
         return val
-    def SetImageList(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetImageList,(self,) + _args, _kwargs)
+    def Select(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_Select,(self,) + _args, _kwargs)
         return val
-    def SetItem(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetItem,(self,) + _args, _kwargs)
+    def Focus(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_Focus,(self,) + _args, _kwargs)
         return val
-    def SetStringItem(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetStringItem,(self,) + _args, _kwargs)
+    def GetFocusedItem(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_GetFocusedItem,(self,) + _args, _kwargs)
         return val
-    def SetItemData(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetItemData,(self,) + _args, _kwargs)
+    def GetNextSelected(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_GetNextSelected,(self,) + _args, _kwargs)
         return val
-    def SetItemImage(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetItemImage,(self,) + _args, _kwargs)
+    def GetFirstSelected(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_GetFirstSelected,(self,) + _args, _kwargs)
         return val
-    def SetItemPosition(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetItemPosition,(self,) + _args, _kwargs)
+    def IsSelected(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_IsSelected,(self,) + _args, _kwargs)
         return val
-    def SetItemState(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetItemState,(self,) + _args, _kwargs)
+    def SetColumnImage(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_SetColumnImage,(self,) + _args, _kwargs)
         return val
-    def SetItemText(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetItemText,(self,) + _args, _kwargs)
+    def ClearColumnImage(self, *_args, **_kwargs):
+        val = apply(controls2c.wxListView_ClearColumnImage,(self,) + _args, _kwargs)
         return val
-    def SetSingleStyle(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetSingleStyle,(self,) + _args, _kwargs)
+    def __repr__(self):
+        return "<C wxListView instance at %s>" % (self.this,)
+class wxListView(wxListViewPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(controls2c.new_wxListView,_args,_kwargs)
+        self.thisown = 1
+        self._setOORInfo(self)
+
+
+
+def wxPreListView(*_args,**_kwargs):
+    val = wxListViewPtr(apply(controls2c.new_wxPreListView,_args,_kwargs))
+    val.thisown = 1
+    val._setOORInfo(val)
+    return val
+
+
+class wxTreeItemAttrPtr :
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def SetTextColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_SetTextColour,(self,) + _args, _kwargs)
         return val
-    def SetWindowStyleFlag(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SetWindowStyleFlag,(self,) + _args, _kwargs)
+    def SetBackgroundColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_SetBackgroundColour,(self,) + _args, _kwargs)
         return val
-    def SortItems(self, *_args, **_kwargs):
-        val = apply(controls2c.wxListCtrl_SortItems,(self,) + _args, _kwargs)
+    def SetFont(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_SetFont,(self,) + _args, _kwargs)
+        return val
+    def HasTextColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_HasTextColour,(self,) + _args, _kwargs)
+        return val
+    def HasBackgroundColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_HasBackgroundColour,(self,) + _args, _kwargs)
+        return val
+    def HasFont(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_HasFont,(self,) + _args, _kwargs)
+        return val
+    def GetTextColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_GetTextColour,(self,) + _args, _kwargs)
+        if val: val = wxColourPtr(val) 
+        return val
+    def GetBackgroundColour(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_GetBackgroundColour,(self,) + _args, _kwargs)
+        if val: val = wxColourPtr(val) 
+        return val
+    def GetFont(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeItemAttr_GetFont,(self,) + _args, _kwargs)
+        if val: val = wxFontPtr(val) 
         return val
     def __repr__(self):
-        return "<C wxListCtrl instance at %s>" % (self.this,)
-class wxListCtrl(wxListCtrlPtr):
+        return "<C wxTreeItemAttr instance at %s>" % (self.this,)
+class wxTreeItemAttr(wxTreeItemAttrPtr):
     def __init__(self,*_args,**_kwargs):
-        self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
+        self.this = apply(controls2c.new_wxTreeItemAttr,_args,_kwargs)
         self.thisown = 1
-        #wx._StdWindowCallbacks(self)
 
 
 
@@ -542,6 +833,10 @@ class wxTreeEventPtr(wxNotifyEventPtr):
         val = apply(controls2c.wxTreeEvent_GetPoint,(self,) + _args, _kwargs)
         if val: val = wxPointPtr(val) ; val.thisown = 1
         return val
+    def GetKeyEvent(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeEvent_GetKeyEvent,(self,) + _args, _kwargs)
+        if val: val = wxKeyEventPtr(val) 
+        return val
     def GetCode(self, *_args, **_kwargs):
         val = apply(controls2c.wxTreeEvent_GetCode,(self,) + _args, _kwargs)
         return val
@@ -551,8 +846,9 @@ class wxTreeEventPtr(wxNotifyEventPtr):
     def __repr__(self):
         return "<C wxTreeEvent instance at %s>" % (self.this,)
 class wxTreeEvent(wxTreeEventPtr):
-    def __init__(self,this):
-        self.this = this
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(controls2c.new_wxTreeEvent,_args,_kwargs)
+        self.thisown = 1
 
 
 
@@ -561,12 +857,11 @@ class wxTreeCtrlPtr(wxControlPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def _setSelf(self, *_args, **_kwargs):
-        val = apply(controls2c.wxTreeCtrl__setSelf,(self,) + _args, _kwargs)
+    def Create(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeCtrl_Create,(self,) + _args, _kwargs)
         return val
-    def AssignImageList(self, *_args, **_kwargs):
-        val = apply(controls2c.wxTreeCtrl_AssignImageList,(self,) + _args, _kwargs)
-        _args[0].thisown = 0
+    def _setCallbackInfo(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeCtrl__setCallbackInfo,(self,) + _args, _kwargs)
         return val
     def GetCount(self, *_args, **_kwargs):
         val = apply(controls2c.wxTreeCtrl_GetCount,(self,) + _args, _kwargs)
@@ -589,6 +884,14 @@ class wxTreeCtrlPtr(wxControlPtr):
     def SetStateImageList(self, *_args, **_kwargs):
         val = apply(controls2c.wxTreeCtrl_SetStateImageList,(self,) + _args, _kwargs)
         return val
+    def AssignImageList(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeCtrl_AssignImageList,(self,) + _args, _kwargs)
+        _args[0].thisown = 0
+        return val
+    def AssignStateImageList(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeCtrl_AssignStateImageList,(self,) + _args, _kwargs)
+        _args[0].thisown = 0
+        return val
     def GetSpacing(self, *_args, **_kwargs):
         val = apply(controls2c.wxTreeCtrl_GetSpacing,(self,) + _args, _kwargs)
         return val
@@ -793,10 +1096,16 @@ class wxTreeCtrl(wxTreeCtrlPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(controls2c.new_wxTreeCtrl,_args,_kwargs)
         self.thisown = 1
-        #wx._StdWindowCallbacks(self)
-        self._setSelf(self, wxTreeCtrl)
+        self._setCallbackInfo(self, wxTreeCtrl)
+        self._setOORInfo(self)
+
 
 
+def wxPreTreeCtrl(*_args,**_kwargs):
+    val = wxTreeCtrlPtr(apply(controls2c.new_wxPreTreeCtrl,_args,_kwargs))
+    val.thisown = 1
+    val._setOORInfo(val)
+    return val
 
 
 
@@ -807,12 +1116,54 @@ class wxTreeCtrl(wxTreeCtrlPtr):
 
 #-------------- VARIABLE WRAPPERS ------------------
 
+wxEVT_COMMAND_LIST_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_DRAG
+wxEVT_COMMAND_LIST_BEGIN_RDRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_RDRAG
+wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
+wxEVT_COMMAND_LIST_END_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_END_LABEL_EDIT
+wxEVT_COMMAND_LIST_DELETE_ITEM = controls2c.wxEVT_COMMAND_LIST_DELETE_ITEM
+wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = controls2c.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
+wxEVT_COMMAND_LIST_GET_INFO = controls2c.wxEVT_COMMAND_LIST_GET_INFO
+wxEVT_COMMAND_LIST_SET_INFO = controls2c.wxEVT_COMMAND_LIST_SET_INFO
+wxEVT_COMMAND_LIST_ITEM_SELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_SELECTED
+wxEVT_COMMAND_LIST_ITEM_DESELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_DESELECTED
+wxEVT_COMMAND_LIST_KEY_DOWN = controls2c.wxEVT_COMMAND_LIST_KEY_DOWN
+wxEVT_COMMAND_LIST_INSERT_ITEM = controls2c.wxEVT_COMMAND_LIST_INSERT_ITEM
+wxEVT_COMMAND_LIST_COL_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_CLICK
+wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK
+wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK
+wxEVT_COMMAND_LIST_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_LIST_ITEM_ACTIVATED
+wxEVT_COMMAND_LIST_CACHE_HINT = controls2c.wxEVT_COMMAND_LIST_CACHE_HINT
+wxEVT_COMMAND_LIST_COL_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_RIGHT_CLICK
+wxEVT_COMMAND_LIST_COL_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_BEGIN_DRAG
+wxEVT_COMMAND_LIST_COL_DRAGGING = controls2c.wxEVT_COMMAND_LIST_COL_DRAGGING
+wxEVT_COMMAND_LIST_COL_END_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_END_DRAG
+wxLC_VRULES = controls2c.wxLC_VRULES
+wxLC_HRULES = controls2c.wxLC_HRULES
+wxLC_ICON = controls2c.wxLC_ICON
+wxLC_SMALL_ICON = controls2c.wxLC_SMALL_ICON
+wxLC_LIST = controls2c.wxLC_LIST
+wxLC_REPORT = controls2c.wxLC_REPORT
+wxLC_ALIGN_TOP = controls2c.wxLC_ALIGN_TOP
+wxLC_ALIGN_LEFT = controls2c.wxLC_ALIGN_LEFT
+wxLC_AUTOARRANGE = controls2c.wxLC_AUTOARRANGE
+wxLC_VIRTUAL = controls2c.wxLC_VIRTUAL
+wxLC_EDIT_LABELS = controls2c.wxLC_EDIT_LABELS
+wxLC_NO_HEADER = controls2c.wxLC_NO_HEADER
+wxLC_NO_SORT_HEADER = controls2c.wxLC_NO_SORT_HEADER
+wxLC_SINGLE_SEL = controls2c.wxLC_SINGLE_SEL
+wxLC_SORT_ASCENDING = controls2c.wxLC_SORT_ASCENDING
+wxLC_SORT_DESCENDING = controls2c.wxLC_SORT_DESCENDING
+wxLC_MASK_TYPE = controls2c.wxLC_MASK_TYPE
+wxLC_MASK_ALIGN = controls2c.wxLC_MASK_ALIGN
+wxLC_MASK_SORT = controls2c.wxLC_MASK_SORT
+wxLC_USER_TEXT = controls2c.wxLC_USER_TEXT
+wxLIST_MASK_STATE = controls2c.wxLIST_MASK_STATE
 wxLIST_MASK_TEXT = controls2c.wxLIST_MASK_TEXT
 wxLIST_MASK_IMAGE = controls2c.wxLIST_MASK_IMAGE
 wxLIST_MASK_DATA = controls2c.wxLIST_MASK_DATA
+wxLIST_SET_ITEM = controls2c.wxLIST_SET_ITEM
 wxLIST_MASK_WIDTH = controls2c.wxLIST_MASK_WIDTH
 wxLIST_MASK_FORMAT = controls2c.wxLIST_MASK_FORMAT
-wxLIST_MASK_STATE = controls2c.wxLIST_MASK_STATE
 wxLIST_STATE_DONTCARE = controls2c.wxLIST_STATE_DONTCARE
 wxLIST_STATE_DROPHILITED = controls2c.wxLIST_STATE_DROPHILITED
 wxLIST_STATE_FOCUSED = controls2c.wxLIST_STATE_FOCUSED
@@ -850,42 +1201,20 @@ wxLIST_FORMAT_LEFT = controls2c.wxLIST_FORMAT_LEFT
 wxLIST_FORMAT_RIGHT = controls2c.wxLIST_FORMAT_RIGHT
 wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE
 wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER
-wxEVT_COMMAND_LIST_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_DRAG
-wxEVT_COMMAND_LIST_BEGIN_RDRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_RDRAG
-wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
-wxEVT_COMMAND_LIST_END_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_END_LABEL_EDIT
-wxEVT_COMMAND_LIST_DELETE_ITEM = controls2c.wxEVT_COMMAND_LIST_DELETE_ITEM
-wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = controls2c.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
-wxEVT_COMMAND_LIST_GET_INFO = controls2c.wxEVT_COMMAND_LIST_GET_INFO
-wxEVT_COMMAND_LIST_SET_INFO = controls2c.wxEVT_COMMAND_LIST_SET_INFO
-wxEVT_COMMAND_LIST_ITEM_SELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_SELECTED
-wxEVT_COMMAND_LIST_ITEM_DESELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_DESELECTED
-wxEVT_COMMAND_LIST_KEY_DOWN = controls2c.wxEVT_COMMAND_LIST_KEY_DOWN
-wxEVT_COMMAND_LIST_INSERT_ITEM = controls2c.wxEVT_COMMAND_LIST_INSERT_ITEM
-wxEVT_COMMAND_LIST_COL_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_CLICK
-wxEVT_COMMAND_LIST_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_LIST_ITEM_ACTIVATED
-wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK
-wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK
-wxLC_ICON = controls2c.wxLC_ICON
-wxLC_SMALL_ICON = controls2c.wxLC_SMALL_ICON
-wxLC_LIST = controls2c.wxLC_LIST
-wxLC_REPORT = controls2c.wxLC_REPORT
-wxLC_ALIGN_TOP = controls2c.wxLC_ALIGN_TOP
-wxLC_ALIGN_LEFT = controls2c.wxLC_ALIGN_LEFT
-wxLC_AUTOARRANGE = controls2c.wxLC_AUTOARRANGE
-wxLC_USER_TEXT = controls2c.wxLC_USER_TEXT
-wxLC_EDIT_LABELS = controls2c.wxLC_EDIT_LABELS
-wxLC_NO_HEADER = controls2c.wxLC_NO_HEADER
-wxLC_NO_SORT_HEADER = controls2c.wxLC_NO_SORT_HEADER
-wxLC_SINGLE_SEL = controls2c.wxLC_SINGLE_SEL
-wxLC_SORT_ASCENDING = controls2c.wxLC_SORT_ASCENDING
-wxLC_SORT_DESCENDING = controls2c.wxLC_SORT_DESCENDING
-wxLC_MASK_TYPE = controls2c.wxLC_MASK_TYPE
-wxLC_MASK_ALIGN = controls2c.wxLC_MASK_ALIGN
-wxLC_MASK_SORT = controls2c.wxLC_MASK_SORT
-wxLC_HRULES = controls2c.wxLC_HRULES
-wxLC_VRULES = controls2c.wxLC_VRULES
-wxLC_VIRTUAL = controls2c.wxLC_VIRTUAL
+wxTR_NO_BUTTONS = controls2c.wxTR_NO_BUTTONS
+wxTR_HAS_BUTTONS = controls2c.wxTR_HAS_BUTTONS
+wxTR_TWIST_BUTTONS = controls2c.wxTR_TWIST_BUTTONS
+wxTR_NO_LINES = controls2c.wxTR_NO_LINES
+wxTR_MAC_BUTTONS = controls2c.wxTR_MAC_BUTTONS
+wxTR_SINGLE = controls2c.wxTR_SINGLE
+wxTR_MULTIPLE = controls2c.wxTR_MULTIPLE
+wxTR_EXTENDED = controls2c.wxTR_EXTENDED
+wxTR_EDIT_LABELS = controls2c.wxTR_EDIT_LABELS
+wxTR_LINES_AT_ROOT = controls2c.wxTR_LINES_AT_ROOT
+wxTR_HIDE_ROOT = controls2c.wxTR_HIDE_ROOT
+wxTR_ROW_LINES = controls2c.wxTR_ROW_LINES
+wxTR_HAS_VARIABLE_ROW_HEIGHT = controls2c.wxTR_HAS_VARIABLE_ROW_HEIGHT
+wxTR_DEFAULT_STYLE = controls2c.wxTR_DEFAULT_STYLE
 wxTreeItemIcon_Normal = controls2c.wxTreeItemIcon_Normal
 wxTreeItemIcon_Selected = controls2c.wxTreeItemIcon_Selected
 wxTreeItemIcon_Expanded = controls2c.wxTreeItemIcon_Expanded