Switch to the TreeListCtrl from the wxCode project.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -25,6 +25,11 @@
 | 
			
		||||
%rename(TL_ALIGN_RIGHT)                     wxTL_ALIGN_RIGHT;
 | 
			
		||||
%rename(TL_ALIGN_CENTER)                    wxTL_ALIGN_CENTER;
 | 
			
		||||
%rename(TREE_HITTEST_ONITEMCOLUMN)          wxTREE_HITTEST_ONITEMCOLUMN;
 | 
			
		||||
%rename(TL_SEARCH_VISIBLE)                  wxTL_SEARCH_VISIBLE;
 | 
			
		||||
%rename(TL_SEARCH_LEVEL)                    wxTL_SEARCH_LEVEL;
 | 
			
		||||
%rename(TL_SEARCH_FULL)                     wxTL_SEARCH_FULL;
 | 
			
		||||
%rename(TL_SEARCH_PARTIAL)                  wxTL_SEARCH_PARTIAL;
 | 
			
		||||
%rename(TL_SEARCH_NOCASE)                   wxTL_SEARCH_NOCASE;
 | 
			
		||||
%rename(TreeListColumnInfo)                 wxTreeListColumnInfo;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@
 | 
			
		||||
#include <wx/treectrl.h>
 | 
			
		||||
#include <wx/imaglist.h>
 | 
			
		||||
 | 
			
		||||
#include "treelistctrl.h"
 | 
			
		||||
#include "wx/treelistctrl.h"
 | 
			
		||||
#include "wx/wxPython/pytree.h"
 | 
			
		||||
 | 
			
		||||
%}
 | 
			
		||||
@@ -421,6 +421,15 @@ enum {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
enum {
 | 
			
		||||
    // flags for FindItem
 | 
			
		||||
    wxTL_SEARCH_VISIBLE,
 | 
			
		||||
    wxTL_SEARCH_LEVEL,
 | 
			
		||||
    wxTL_SEARCH_FULL,
 | 
			
		||||
    wxTL_SEARCH_PARTIAL,
 | 
			
		||||
    wxTL_SEARCH_NOCASE
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class wxTreeListColumnInfo: public wxObject {
 | 
			
		||||
@@ -428,14 +437,18 @@ public:
 | 
			
		||||
    wxTreeListColumnInfo(const wxString& text = wxPyEmptyString,
 | 
			
		||||
			 int image = -1,
 | 
			
		||||
			 size_t width = 100,
 | 
			
		||||
                         bool shown = True,
 | 
			
		||||
			 wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT);
 | 
			
		||||
 | 
			
		||||
    bool GetShown() const;
 | 
			
		||||
    wxTreeListColumnAlign GetAlignment() const;
 | 
			
		||||
    wxString GetText() const;
 | 
			
		||||
    int GetImage() const;
 | 
			
		||||
    int GetSelectedImage() const;
 | 
			
		||||
    size_t GetWidth() const;
 | 
			
		||||
 | 
			
		||||
    // TODO:  These all actually return wxTreeListColumnInfo&, any problem with doing it for Python too?
 | 
			
		||||
    void SetShown(bool shown);
 | 
			
		||||
    void SetAlignment(wxTreeListColumnAlign alignment);
 | 
			
		||||
    void SetText(const wxString& text);
 | 
			
		||||
    void SetImage(int image);
 | 
			
		||||
@@ -521,10 +534,6 @@ public:
 | 
			
		||||
    unsigned int GetIndent() const;
 | 
			
		||||
    void SetIndent(unsigned int indent);
 | 
			
		||||
 | 
			
		||||
    // spacing is the number of pixels between the start and the Text
 | 
			
		||||
    unsigned int GetSpacing() const;
 | 
			
		||||
    void SetSpacing(unsigned int spacing);
 | 
			
		||||
 | 
			
		||||
    // line spacing is the space above and below the text on each line
 | 
			
		||||
    unsigned int GetLineSpacing() const;
 | 
			
		||||
    void SetLineSpacing(unsigned int spacing);
 | 
			
		||||
@@ -558,6 +567,9 @@ public:
 | 
			
		||||
 | 
			
		||||
    // adds a column
 | 
			
		||||
    void AddColumn(const wxString& text);
 | 
			
		||||
//     void AddColumn(const wxString& text,
 | 
			
		||||
//                    size_t width,
 | 
			
		||||
//                    wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT);
 | 
			
		||||
    %name(AddColumnInfo) void AddColumn(const wxTreeListColumnInfo& col);
 | 
			
		||||
 | 
			
		||||
    // inserts a column before the given one
 | 
			
		||||
@@ -591,6 +603,8 @@ public:
 | 
			
		||||
    void SetColumnImage(size_t column, int image);
 | 
			
		||||
    int GetColumnImage(size_t column) const;
 | 
			
		||||
 | 
			
		||||
    void ShowColumn(size_t column, bool shown);
 | 
			
		||||
    bool IsColumnShown(size_t column) const;
 | 
			
		||||
 | 
			
		||||
    %extend {
 | 
			
		||||
        // retrieves item's label of the given column (main column by default)
 | 
			
		||||
@@ -674,11 +688,11 @@ public:
 | 
			
		||||
    void SetItemBold(const wxTreeItemId& item, bool bold = True);
 | 
			
		||||
 | 
			
		||||
    // set the item's text colour
 | 
			
		||||
    void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
 | 
			
		||||
    void SetItemTextColour(const wxTreeItemId& item, const wxColour& colour);
 | 
			
		||||
 | 
			
		||||
    // set the item's background colour
 | 
			
		||||
    void SetItemBackgroundColour(const wxTreeItemId& item,
 | 
			
		||||
				 const wxColour& col);
 | 
			
		||||
				 const wxColour& colour);
 | 
			
		||||
 | 
			
		||||
    // set the item's font (should be of the same height for all items)
 | 
			
		||||
    void SetItemFont(const wxTreeItemId& item, const wxFont& font);
 | 
			
		||||
@@ -738,7 +752,7 @@ public:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // get the parent of this item (may return NULL if root)
 | 
			
		||||
    %name(GetItemParent)wxTreeItemId GetParent(const wxTreeItemId& item) const;
 | 
			
		||||
    wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
 | 
			
		||||
 | 
			
		||||
    // for this enumeration function you must pass in a "cookie" parameter
 | 
			
		||||
    // which is opaque for the application but is necessary for the library
 | 
			
		||||
@@ -748,17 +762,19 @@ public:
 | 
			
		||||
    // the same!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // NOTE: These are a copy of the same methods in _treectrl.i, be sure to
 | 
			
		||||
    // update both at the same time.  (Or find a good way to refactor!)
 | 
			
		||||
    %extend {
 | 
			
		||||
        // Get the first child of this item.  Returns a wxTreeItemId and an
 | 
			
		||||
        // opaque "cookie" value that should be passed to GetNextChild in
 | 
			
		||||
        // order to continue the search.
 | 
			
		||||
        PyObject* GetFirstChild(const wxTreeItemId& item) {
 | 
			
		||||
            long cookie = 0;
 | 
			
		||||
            void* cookie = 0;
 | 
			
		||||
            wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
 | 
			
		||||
            bool blocked = wxPyBeginBlockThreads();
 | 
			
		||||
            PyObject* tup = PyTuple_New(2);
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
 | 
			
		||||
            wxPyEndBlockThreads(blocked);
 | 
			
		||||
            return tup;
 | 
			
		||||
        }
 | 
			
		||||
@@ -768,15 +784,19 @@ public:
 | 
			
		||||
        // value returned from GetFirstChild or the previous GetNextChild.
 | 
			
		||||
        // Returns a wxTreeItemId and an opaque "cookie" value that should be
 | 
			
		||||
        // passed to GetNextChild in order to continue the search.
 | 
			
		||||
        PyObject* GetNextChild(const wxTreeItemId& item, long cookie) {
 | 
			
		||||
        PyObject* GetNextChild(const wxTreeItemId& item, void* cookie) {
 | 
			
		||||
            wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
 | 
			
		||||
            bool blocked = wxPyBeginBlockThreads();
 | 
			
		||||
            PyObject* tup = PyTuple_New(2);
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
 | 
			
		||||
            wxPyEndBlockThreads(blocked);
 | 
			
		||||
            return tup;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        // TODO:  GetPrevChild
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // get the last child of this item - this method doesn't use cookies
 | 
			
		||||
@@ -868,6 +888,8 @@ public:
 | 
			
		||||
    void SelectItem(const wxTreeItemId& item, bool unselect_others=True,
 | 
			
		||||
		    bool extended_select=False);
 | 
			
		||||
 | 
			
		||||
    void SelectAll(bool extended_select=False);
 | 
			
		||||
    
 | 
			
		||||
    // make sure this item is visible (expanding the parent item and/or
 | 
			
		||||
    // scrolling to this item if necessary)
 | 
			
		||||
    void EnsureVisible(const wxTreeItemId& item);
 | 
			
		||||
@@ -905,12 +927,8 @@ public:
 | 
			
		||||
    // sort the children of this item using OnCompareItems
 | 
			
		||||
    void SortChildren(const wxTreeItemId& item);
 | 
			
		||||
 | 
			
		||||
    // get the selected item image
 | 
			
		||||
    int GetItemSelectedImage(const wxTreeItemId& item) const;
 | 
			
		||||
 | 
			
		||||
    // set the selected item image
 | 
			
		||||
    void SetItemSelectedImage(const wxTreeItemId& item, int image);
 | 
			
		||||
 | 
			
		||||
    // searching
 | 
			
		||||
    wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int flags = 0);
 | 
			
		||||
 | 
			
		||||
    wxWindow* GetHeaderWindow() const;
 | 
			
		||||
    wxWindow* GetMainWindow() const;
 | 
			
		||||
@@ -935,8 +953,3 @@ public:
 | 
			
		||||
//----------------------------------------------------------------------
 | 
			
		||||
//----------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -353,18 +353,27 @@ TL_ALIGN_LEFT = _gizmos.TL_ALIGN_LEFT
 | 
			
		||||
TL_ALIGN_RIGHT = _gizmos.TL_ALIGN_RIGHT
 | 
			
		||||
TL_ALIGN_CENTER = _gizmos.TL_ALIGN_CENTER
 | 
			
		||||
TREE_HITTEST_ONITEMCOLUMN = _gizmos.TREE_HITTEST_ONITEMCOLUMN
 | 
			
		||||
TL_SEARCH_VISIBLE = _gizmos.TL_SEARCH_VISIBLE
 | 
			
		||||
TL_SEARCH_LEVEL = _gizmos.TL_SEARCH_LEVEL
 | 
			
		||||
TL_SEARCH_FULL = _gizmos.TL_SEARCH_FULL
 | 
			
		||||
TL_SEARCH_PARTIAL = _gizmos.TL_SEARCH_PARTIAL
 | 
			
		||||
TL_SEARCH_NOCASE = _gizmos.TL_SEARCH_NOCASE
 | 
			
		||||
class TreeListColumnInfo(_core.Object):
 | 
			
		||||
    def __repr__(self):
 | 
			
		||||
        return "<%s.%s; proxy of C++ wxTreeListColumnInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        """
 | 
			
		||||
        __init__(self, String text=EmptyString, int image=-1, size_t width=100, 
 | 
			
		||||
            int alignment=TL_ALIGN_LEFT) -> TreeListColumnInfo
 | 
			
		||||
            bool shown=True, int alignment=TL_ALIGN_LEFT) -> TreeListColumnInfo
 | 
			
		||||
        """
 | 
			
		||||
        newobj = _gizmos.new_TreeListColumnInfo(*args, **kwargs)
 | 
			
		||||
        self.this = newobj.this
 | 
			
		||||
        self.thisown = 1
 | 
			
		||||
        del newobj.thisown
 | 
			
		||||
    def GetShown(*args, **kwargs):
 | 
			
		||||
        """GetShown(self) -> bool"""
 | 
			
		||||
        return _gizmos.TreeListColumnInfo_GetShown(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetAlignment(*args, **kwargs):
 | 
			
		||||
        """GetAlignment(self) -> int"""
 | 
			
		||||
        return _gizmos.TreeListColumnInfo_GetAlignment(*args, **kwargs)
 | 
			
		||||
@@ -385,6 +394,10 @@ class TreeListColumnInfo(_core.Object):
 | 
			
		||||
        """GetWidth(self) -> size_t"""
 | 
			
		||||
        return _gizmos.TreeListColumnInfo_GetWidth(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SetShown(*args, **kwargs):
 | 
			
		||||
        """SetShown(self, bool shown)"""
 | 
			
		||||
        return _gizmos.TreeListColumnInfo_SetShown(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SetAlignment(*args, **kwargs):
 | 
			
		||||
        """SetAlignment(self, int alignment)"""
 | 
			
		||||
        return _gizmos.TreeListColumnInfo_SetAlignment(*args, **kwargs)
 | 
			
		||||
@@ -456,14 +469,6 @@ class TreeListCtrl(_core.Control):
 | 
			
		||||
        """SetIndent(self, unsigned int indent)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SetIndent(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetSpacing(*args, **kwargs):
 | 
			
		||||
        """GetSpacing(self) -> unsigned int"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_GetSpacing(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SetSpacing(*args, **kwargs):
 | 
			
		||||
        """SetSpacing(self, unsigned int spacing)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SetSpacing(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetLineSpacing(*args, **kwargs):
 | 
			
		||||
        """GetLineSpacing(self) -> unsigned int"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_GetLineSpacing(*args, **kwargs)
 | 
			
		||||
@@ -580,6 +585,14 @@ class TreeListCtrl(_core.Control):
 | 
			
		||||
        """GetColumnImage(self, size_t column) -> int"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_GetColumnImage(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def ShowColumn(*args, **kwargs):
 | 
			
		||||
        """ShowColumn(self, size_t column, bool shown)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_ShowColumn(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def IsColumnShown(*args, **kwargs):
 | 
			
		||||
        """IsColumnShown(self, size_t column) -> bool"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_IsColumnShown(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetItemText(*args, **kwargs):
 | 
			
		||||
        """GetItemText(self, TreeItemId item, int column=-1) -> String"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_GetItemText(*args, **kwargs)
 | 
			
		||||
@@ -623,11 +636,11 @@ class TreeListCtrl(_core.Control):
 | 
			
		||||
        return _gizmos.TreeListCtrl_SetItemBold(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SetItemTextColour(*args, **kwargs):
 | 
			
		||||
        """SetItemTextColour(self, TreeItemId item, Colour col)"""
 | 
			
		||||
        """SetItemTextColour(self, TreeItemId item, Colour colour)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SetItemTextColour(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SetItemBackgroundColour(*args, **kwargs):
 | 
			
		||||
        """SetItemBackgroundColour(self, TreeItemId item, Colour col)"""
 | 
			
		||||
        """SetItemBackgroundColour(self, TreeItemId item, Colour colour)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SetItemBackgroundColour(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SetItemFont(*args, **kwargs):
 | 
			
		||||
@@ -695,7 +708,7 @@ class TreeListCtrl(_core.Control):
 | 
			
		||||
        return _gizmos.TreeListCtrl_GetFirstChild(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetNextChild(*args, **kwargs):
 | 
			
		||||
        """GetNextChild(self, TreeItemId item, long cookie) -> PyObject"""
 | 
			
		||||
        """GetNextChild(self, TreeItemId item, void cookie) -> PyObject"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_GetNextChild(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetLastChild(*args, **kwargs):
 | 
			
		||||
@@ -802,6 +815,10 @@ class TreeListCtrl(_core.Control):
 | 
			
		||||
        """SelectItem(self, TreeItemId item, bool unselect_others=True, bool extended_select=False)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SelectItem(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SelectAll(*args, **kwargs):
 | 
			
		||||
        """SelectAll(self, bool extended_select=False)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SelectAll(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def EnsureVisible(*args, **kwargs):
 | 
			
		||||
        """EnsureVisible(self, TreeItemId item)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_EnsureVisible(*args, **kwargs)
 | 
			
		||||
@@ -830,13 +847,9 @@ class TreeListCtrl(_core.Control):
 | 
			
		||||
        """SortChildren(self, TreeItemId item)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SortChildren(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetItemSelectedImage(*args, **kwargs):
 | 
			
		||||
        """GetItemSelectedImage(self, TreeItemId item) -> int"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_GetItemSelectedImage(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def SetItemSelectedImage(*args, **kwargs):
 | 
			
		||||
        """SetItemSelectedImage(self, TreeItemId item, int image)"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_SetItemSelectedImage(*args, **kwargs)
 | 
			
		||||
    def FindItem(*args, **kwargs):
 | 
			
		||||
        """FindItem(self, TreeItemId item, String str, int flags=0) -> TreeItemId"""
 | 
			
		||||
        return _gizmos.TreeListCtrl_FindItem(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def GetHeaderWindow(*args, **kwargs):
 | 
			
		||||
        """GetHeaderWindow(self) -> Window"""
 | 
			
		||||
 
 | 
			
		||||
@@ -304,7 +304,7 @@ static swig_type_info *swig_types[32];
 | 
			
		||||
#include <wx/treectrl.h>
 | 
			
		||||
#include <wx/imaglist.h>
 | 
			
		||||
 | 
			
		||||
#include "treelistctrl.h"
 | 
			
		||||
#include "wx/treelistctrl.h"
 | 
			
		||||
#include "wx/wxPython/pytree.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -637,21 +637,21 @@ PyObject *wxPyTreeListCtrl_GetSelections(wxPyTreeListCtrl *self){
 | 
			
		||||
            return rval;
 | 
			
		||||
        }
 | 
			
		||||
PyObject *wxPyTreeListCtrl_GetFirstChild(wxPyTreeListCtrl *self,wxTreeItemId const &item){
 | 
			
		||||
            long cookie = 0;
 | 
			
		||||
            void* cookie = 0;
 | 
			
		||||
            wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
 | 
			
		||||
            bool blocked = wxPyBeginBlockThreads();
 | 
			
		||||
            PyObject* tup = PyTuple_New(2);
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
 | 
			
		||||
            wxPyEndBlockThreads(blocked);
 | 
			
		||||
            return tup;
 | 
			
		||||
        }
 | 
			
		||||
PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId const &item,long cookie){
 | 
			
		||||
PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId const &item,void *cookie){
 | 
			
		||||
            wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
 | 
			
		||||
            bool blocked = wxPyBeginBlockThreads();
 | 
			
		||||
            PyObject* tup = PyTuple_New(2);
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True));
 | 
			
		||||
            PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
 | 
			
		||||
            wxPyEndBlockThreads(blocked);
 | 
			
		||||
            return tup;
 | 
			
		||||
        }
 | 
			
		||||
@@ -2289,18 +2289,20 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py
 | 
			
		||||
    wxString *arg1 = (wxString *) &arg1_defvalue ;
 | 
			
		||||
    int arg2 = (int) -1 ;
 | 
			
		||||
    size_t arg3 = (size_t) 100 ;
 | 
			
		||||
    int arg4 = (int) wxTL_ALIGN_LEFT ;
 | 
			
		||||
    bool arg4 = (bool) True ;
 | 
			
		||||
    int arg5 = (int) wxTL_ALIGN_LEFT ;
 | 
			
		||||
    wxTreeListColumnInfo *result;
 | 
			
		||||
    bool temp1 = False ;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    PyObject * obj2 = 0 ;
 | 
			
		||||
    PyObject * obj3 = 0 ;
 | 
			
		||||
    PyObject * obj4 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "text",(char *) "image",(char *) "width",(char *) "alignment", NULL 
 | 
			
		||||
        (char *) "text",(char *) "image",(char *) "width",(char *) "shown",(char *) "alignment", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_TreeListColumnInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOO:new_TreeListColumnInfo",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
 | 
			
		||||
    if (obj0) {
 | 
			
		||||
        {
 | 
			
		||||
            arg1 = wxString_in_helper(obj0);
 | 
			
		||||
@@ -2317,12 +2319,16 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    if (obj3) {
 | 
			
		||||
        arg4 = (wxTreeListColumnAlign) SWIG_AsInt(obj3); 
 | 
			
		||||
        arg4 = (bool) SWIG_AsBool(obj3); 
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    if (obj4) {
 | 
			
		||||
        arg5 = (wxTreeListColumnAlign) SWIG_AsInt(obj4); 
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        result = (wxTreeListColumnInfo *)new wxTreeListColumnInfo((wxString const &)*arg1,arg2,arg3,(wxTreeListColumnAlign )arg4);
 | 
			
		||||
        result = (wxTreeListColumnInfo *)new wxTreeListColumnInfo((wxString const &)*arg1,arg2,arg3,arg4,(wxTreeListColumnAlign )arg5);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
@@ -2342,6 +2348,34 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListColumnInfo_GetShown(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ;
 | 
			
		||||
    bool result;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TreeListColumnInfo_GetShown",kwnames,&obj0)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTreeListColumnInfo,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        result = (bool)((wxTreeListColumnInfo const *)arg1)->GetShown();
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
 | 
			
		||||
    }
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListColumnInfo_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ;
 | 
			
		||||
@@ -2478,6 +2512,35 @@ static PyObject *_wrap_TreeListColumnInfo_GetWidth(PyObject *self, PyObject *arg
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListColumnInfo_SetShown(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ;
 | 
			
		||||
    bool arg2 ;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "shown", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListColumnInfo_SetShown",kwnames,&obj0,&obj1)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTreeListColumnInfo,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    arg2 = (bool) SWIG_AsBool(obj1); 
 | 
			
		||||
    if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        (arg1)->SetShown(arg2);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    Py_INCREF(Py_None); resultobj = Py_None;
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListColumnInfo_SetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ;
 | 
			
		||||
@@ -2960,61 +3023,6 @@ static PyObject *_wrap_TreeListCtrl_SetIndent(PyObject *self, PyObject *args, Py
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_GetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    unsigned int result;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TreeListCtrl_GetSpacing",kwnames,&obj0)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        result = (unsigned int)((wxPyTreeListCtrl const *)arg1)->GetSpacing();
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    resultobj = SWIG_FromUnsignedInt((unsigned int)result);
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_SetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    unsigned int arg2 ;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "spacing", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetSpacing",kwnames,&obj0,&obj1)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    arg2 = (unsigned int) SWIG_AsUnsignedInt(obj1); 
 | 
			
		||||
    if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        (arg1)->SetSpacing(arg2);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    Py_INCREF(Py_None); resultobj = Py_None;
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_GetLineSpacing(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
@@ -3937,6 +3945,71 @@ static PyObject *_wrap_TreeListCtrl_GetColumnImage(PyObject *self, PyObject *arg
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_ShowColumn(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    size_t arg2 ;
 | 
			
		||||
    bool arg3 ;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    PyObject * obj2 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "column",(char *) "shown", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_ShowColumn",kwnames,&obj0,&obj1,&obj2)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    arg2 = (size_t) SWIG_AsUnsignedLong(obj1); 
 | 
			
		||||
    if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    arg3 = (bool) SWIG_AsBool(obj2); 
 | 
			
		||||
    if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        (arg1)->ShowColumn(arg2,arg3);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    Py_INCREF(Py_None); resultobj = Py_None;
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_IsColumnShown(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    size_t arg2 ;
 | 
			
		||||
    bool result;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "column", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_IsColumnShown",kwnames,&obj0,&obj1)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    arg2 = (size_t) SWIG_AsUnsignedLong(obj1); 
 | 
			
		||||
    if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        result = (bool)((wxPyTreeListCtrl const *)arg1)->IsColumnShown(arg2);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
 | 
			
		||||
    }
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_GetItemText(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
@@ -4372,7 +4445,7 @@ static PyObject *_wrap_TreeListCtrl_SetItemTextColour(PyObject *self, PyObject *
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    PyObject * obj2 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "item",(char *) "col", NULL 
 | 
			
		||||
        (char *) "self",(char *) "item",(char *) "colour", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetItemTextColour",kwnames,&obj0,&obj1,&obj2)) goto fail;
 | 
			
		||||
@@ -4413,7 +4486,7 @@ static PyObject *_wrap_TreeListCtrl_SetItemBackgroundColour(PyObject *self, PyOb
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    PyObject * obj2 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "item",(char *) "col", NULL 
 | 
			
		||||
        (char *) "self",(char *) "item",(char *) "colour", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetItemBackgroundColour",kwnames,&obj0,&obj1,&obj2)) goto fail;
 | 
			
		||||
@@ -4976,7 +5049,7 @@ static PyObject *_wrap_TreeListCtrl_GetItemParent(PyObject *self, PyObject *args
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        result = ((wxPyTreeListCtrl const *)arg1)->GetParent((wxTreeItemId const &)*arg2);
 | 
			
		||||
        result = ((wxPyTreeListCtrl const *)arg1)->GetItemParent((wxTreeItemId const &)*arg2);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
@@ -5031,7 +5104,7 @@ static PyObject *_wrap_TreeListCtrl_GetNextChild(PyObject *self, PyObject *args,
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    wxTreeItemId *arg2 = 0 ;
 | 
			
		||||
    long arg3 ;
 | 
			
		||||
    void *arg3 = (void *) 0 ;
 | 
			
		||||
    PyObject *result;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
@@ -5050,8 +5123,7 @@ static PyObject *_wrap_TreeListCtrl_GetNextChild(PyObject *self, PyObject *args,
 | 
			
		||||
        PyErr_SetString(PyExc_TypeError,"null reference");
 | 
			
		||||
        SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    arg3 = (long) SWIG_AsLong(obj2); 
 | 
			
		||||
    if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj2,&arg3,0,SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        result = (PyObject *)wxPyTreeListCtrl_GetNextChild(arg1,(wxTreeItemId const &)*arg2,arg3);
 | 
			
		||||
@@ -6058,6 +6130,37 @@ static PyObject *_wrap_TreeListCtrl_SelectItem(PyObject *self, PyObject *args, P
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    bool arg2 = (bool) False ;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "extended_select", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TreeListCtrl_SelectAll",kwnames,&obj0,&obj1)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    if (obj1) {
 | 
			
		||||
        arg2 = (bool) SWIG_AsBool(obj1); 
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        (arg1)->SelectAll(arg2);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    Py_INCREF(Py_None); resultobj = Py_None;
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_EnsureVisible(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
@@ -6320,54 +6423,23 @@ static PyObject *_wrap_TreeListCtrl_SortChildren(PyObject *self, PyObject *args,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_GetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_FindItem(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    wxTreeItemId *arg2 = 0 ;
 | 
			
		||||
    int result;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "item", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetItemSelectedImage",kwnames,&obj0,&obj1)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxTreeItemId,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1)
 | 
			
		||||
    SWIG_fail;
 | 
			
		||||
    if (arg2 == NULL) {
 | 
			
		||||
        PyErr_SetString(PyExc_TypeError,"null reference");
 | 
			
		||||
        SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        result = (int)((wxPyTreeListCtrl const *)arg1)->GetItemSelectedImage((wxTreeItemId const &)*arg2);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    resultobj = SWIG_FromInt((int)result);
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject *_wrap_TreeListCtrl_SetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) {
 | 
			
		||||
    PyObject *resultobj;
 | 
			
		||||
    wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ;
 | 
			
		||||
    wxTreeItemId *arg2 = 0 ;
 | 
			
		||||
    int arg3 ;
 | 
			
		||||
    wxString *arg3 = 0 ;
 | 
			
		||||
    int arg4 = (int) 0 ;
 | 
			
		||||
    wxTreeItemId result;
 | 
			
		||||
    bool temp3 = False ;
 | 
			
		||||
    PyObject * obj0 = 0 ;
 | 
			
		||||
    PyObject * obj1 = 0 ;
 | 
			
		||||
    PyObject * obj2 = 0 ;
 | 
			
		||||
    PyObject * obj3 = 0 ;
 | 
			
		||||
    char *kwnames[] = {
 | 
			
		||||
        (char *) "self",(char *) "item",(char *) "image", NULL 
 | 
			
		||||
        (char *) "self",(char *) "item",(char *) "str",(char *) "flags", NULL 
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetItemSelectedImage",kwnames,&obj0,&obj1,&obj2)) goto fail;
 | 
			
		||||
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:TreeListCtrl_FindItem",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl,
 | 
			
		||||
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
 | 
			
		||||
    if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxTreeItemId,
 | 
			
		||||
@@ -6377,18 +6449,37 @@ static PyObject *_wrap_TreeListCtrl_SetItemSelectedImage(PyObject *self, PyObjec
 | 
			
		||||
        PyErr_SetString(PyExc_TypeError,"null reference");
 | 
			
		||||
        SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    arg3 = (int) SWIG_AsInt(obj2); 
 | 
			
		||||
    {
 | 
			
		||||
        arg3 = wxString_in_helper(obj2);
 | 
			
		||||
        if (arg3 == NULL) SWIG_fail;
 | 
			
		||||
        temp3 = True;
 | 
			
		||||
    }
 | 
			
		||||
    if (obj3) {
 | 
			
		||||
        arg4 = (int) SWIG_AsInt(obj3); 
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        PyThreadState* __tstate = wxPyBeginAllowThreads();
 | 
			
		||||
        (arg1)->SetItemSelectedImage((wxTreeItemId const &)*arg2,arg3);
 | 
			
		||||
        result = (arg1)->FindItem((wxTreeItemId const &)*arg2,(wxString const &)*arg3,arg4);
 | 
			
		||||
        
 | 
			
		||||
        wxPyEndAllowThreads(__tstate);
 | 
			
		||||
        if (PyErr_Occurred()) SWIG_fail;
 | 
			
		||||
    }
 | 
			
		||||
    Py_INCREF(Py_None); resultobj = Py_None;
 | 
			
		||||
    {
 | 
			
		||||
        wxTreeItemId * resultptr;
 | 
			
		||||
        resultptr = new wxTreeItemId((wxTreeItemId &) result);
 | 
			
		||||
        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxTreeItemId, 1);
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
        if (temp3)
 | 
			
		||||
        delete arg3;
 | 
			
		||||
    }
 | 
			
		||||
    return resultobj;
 | 
			
		||||
    fail:
 | 
			
		||||
    {
 | 
			
		||||
        if (temp3)
 | 
			
		||||
        delete arg3;
 | 
			
		||||
    }
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -6505,11 +6596,13 @@ static PyMethodDef SwigMethods[] = {
 | 
			
		||||
	 { (char *)"LEDNumberCtrl_SetValue", (PyCFunction) _wrap_LEDNumberCtrl_SetValue, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"LEDNumberCtrl_swigregister", LEDNumberCtrl_swigregister, METH_VARARGS },
 | 
			
		||||
	 { (char *)"new_TreeListColumnInfo", (PyCFunction) _wrap_new_TreeListColumnInfo, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_GetShown", (PyCFunction) _wrap_TreeListColumnInfo_GetShown, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_GetAlignment", (PyCFunction) _wrap_TreeListColumnInfo_GetAlignment, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_GetText", (PyCFunction) _wrap_TreeListColumnInfo_GetText, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_GetImage", (PyCFunction) _wrap_TreeListColumnInfo_GetImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_GetSelectedImage", (PyCFunction) _wrap_TreeListColumnInfo_GetSelectedImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_GetWidth", (PyCFunction) _wrap_TreeListColumnInfo_GetWidth, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_SetShown", (PyCFunction) _wrap_TreeListColumnInfo_SetShown, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_SetAlignment", (PyCFunction) _wrap_TreeListColumnInfo_SetAlignment, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_SetText", (PyCFunction) _wrap_TreeListColumnInfo_SetText, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListColumnInfo_SetImage", (PyCFunction) _wrap_TreeListColumnInfo_SetImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
@@ -6523,8 +6616,6 @@ static PyMethodDef SwigMethods[] = {
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetCount", (PyCFunction) _wrap_TreeListCtrl_GetCount, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetIndent", (PyCFunction) _wrap_TreeListCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SetIndent", (PyCFunction) _wrap_TreeListCtrl_SetIndent, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetSpacing", (PyCFunction) _wrap_TreeListCtrl_GetSpacing, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SetSpacing", (PyCFunction) _wrap_TreeListCtrl_SetSpacing, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetLineSpacing", (PyCFunction) _wrap_TreeListCtrl_GetLineSpacing, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SetLineSpacing", (PyCFunction) _wrap_TreeListCtrl_SetLineSpacing, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetImageList", (PyCFunction) _wrap_TreeListCtrl_GetImageList, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
@@ -6554,6 +6645,8 @@ static PyMethodDef SwigMethods[] = {
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetColumnAlignment", (PyCFunction) _wrap_TreeListCtrl_GetColumnAlignment, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SetColumnImage", (PyCFunction) _wrap_TreeListCtrl_SetColumnImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetColumnImage", (PyCFunction) _wrap_TreeListCtrl_GetColumnImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_ShowColumn", (PyCFunction) _wrap_TreeListCtrl_ShowColumn, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_IsColumnShown", (PyCFunction) _wrap_TreeListCtrl_IsColumnShown, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetItemText", (PyCFunction) _wrap_TreeListCtrl_GetItemText, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetItemImage", (PyCFunction) _wrap_TreeListCtrl_GetItemImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SetItemText", (PyCFunction) _wrap_TreeListCtrl_SetItemText, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
@@ -6606,6 +6699,7 @@ static PyMethodDef SwigMethods[] = {
 | 
			
		||||
	 { (char *)"TreeListCtrl_Unselect", (PyCFunction) _wrap_TreeListCtrl_Unselect, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_UnselectAll", (PyCFunction) _wrap_TreeListCtrl_UnselectAll, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SelectItem", (PyCFunction) _wrap_TreeListCtrl_SelectItem, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SelectAll", (PyCFunction) _wrap_TreeListCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_EnsureVisible", (PyCFunction) _wrap_TreeListCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_ScrollTo", (PyCFunction) _wrap_TreeListCtrl_ScrollTo, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_HitTest", (PyCFunction) _wrap_TreeListCtrl_HitTest, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
@@ -6613,8 +6707,7 @@ static PyMethodDef SwigMethods[] = {
 | 
			
		||||
	 { (char *)"TreeListCtrl_EditLabel", (PyCFunction) _wrap_TreeListCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_Edit", (PyCFunction) _wrap_TreeListCtrl_Edit, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SortChildren", (PyCFunction) _wrap_TreeListCtrl_SortChildren, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetItemSelectedImage", (PyCFunction) _wrap_TreeListCtrl_GetItemSelectedImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_SetItemSelectedImage", (PyCFunction) _wrap_TreeListCtrl_SetItemSelectedImage, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_FindItem", (PyCFunction) _wrap_TreeListCtrl_FindItem, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetHeaderWindow", (PyCFunction) _wrap_TreeListCtrl_GetHeaderWindow, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_GetMainWindow", (PyCFunction) _wrap_TreeListCtrl_GetMainWindow, METH_VARARGS | METH_KEYWORDS },
 | 
			
		||||
	 { (char *)"TreeListCtrl_swigregister", TreeListCtrl_swigregister, METH_VARARGS },
 | 
			
		||||
@@ -8205,6 +8298,11 @@ SWIGEXPORT(void) SWIG_init(void) {
 | 
			
		||||
    PyDict_SetItemString(d,"TL_ALIGN_RIGHT", SWIG_FromInt((int)wxTL_ALIGN_RIGHT));
 | 
			
		||||
    PyDict_SetItemString(d,"TL_ALIGN_CENTER", SWIG_FromInt((int)wxTL_ALIGN_CENTER));
 | 
			
		||||
    PyDict_SetItemString(d,"TREE_HITTEST_ONITEMCOLUMN", SWIG_FromInt((int)wxTREE_HITTEST_ONITEMCOLUMN));
 | 
			
		||||
    PyDict_SetItemString(d,"TL_SEARCH_VISIBLE", SWIG_FromInt((int)wxTL_SEARCH_VISIBLE));
 | 
			
		||||
    PyDict_SetItemString(d,"TL_SEARCH_LEVEL", SWIG_FromInt((int)wxTL_SEARCH_LEVEL));
 | 
			
		||||
    PyDict_SetItemString(d,"TL_SEARCH_FULL", SWIG_FromInt((int)wxTL_SEARCH_FULL));
 | 
			
		||||
    PyDict_SetItemString(d,"TL_SEARCH_PARTIAL", SWIG_FromInt((int)wxTL_SEARCH_PARTIAL));
 | 
			
		||||
    PyDict_SetItemString(d,"TL_SEARCH_NOCASE", SWIG_FromInt((int)wxTL_SEARCH_NOCASE));
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    wxPyPtrTypeMap_Add("wxTreeCompanionWindow", "wxPyTreeCompanionWindow");
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,12 @@
 | 
			
		||||
// -*- C++ -*- //////////////////////////////////////////////////////////////
 | 
			
		||||
// Name:        treelistctrl.h (derived by wx/treectrlg.h)
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// Name:        treelistctrl.h
 | 
			
		||||
// Purpose:     wxTreeListCtrl class
 | 
			
		||||
// Author:      Robert Roebling
 | 
			
		||||
// Modified by: Alberto Griggio, 2002
 | 
			
		||||
// Created:     01/02/97
 | 
			
		||||
// RCS-ID:      $Id$
 | 
			
		||||
// Copyright:   (c) 1997,1998 Robert Roebling
 | 
			
		||||
// Copyright:   (c) Robert Roebling, Julian Smart, Alberto Griggio,
 | 
			
		||||
//              Vadim Zeitlin, Otto Wyss
 | 
			
		||||
// Licence:     wxWindows license
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
@@ -33,6 +34,16 @@ class GIZMODLLEXPORT wxTreeListItem;
 | 
			
		||||
class GIZMODLLEXPORT wxTreeListHeaderWindow;
 | 
			
		||||
class GIZMODLLEXPORT wxTreeListMainWindow;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// Using this typedef removes an ambiguity when calling Remove()
 | 
			
		||||
#ifdef __WXMSW__
 | 
			
		||||
#if !wxCHECK_VERSION(2, 5, 0)
 | 
			
		||||
typedef long wxTreeItemIdValue;
 | 
			
		||||
#else
 | 
			
		||||
typedef void *wxTreeItemIdValue;
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//-----------------------------------------------------------------------------
 | 
			
		||||
// wxTreeListColumnAttrs
 | 
			
		||||
//-----------------------------------------------------------------------------
 | 
			
		||||
@@ -48,15 +59,17 @@ class GIZMODLLEXPORT wxTreeListColumnInfo: public wxObject {
 | 
			
		||||
public:
 | 
			
		||||
    enum { DEFAULT_COL_WIDTH = 100 };
 | 
			
		||||
 | 
			
		||||
    wxTreeListColumnInfo(const wxChar* text = wxT(""),
 | 
			
		||||
    wxTreeListColumnInfo(const wxString &text = wxT(""),
 | 
			
		||||
                         int image = -1,
 | 
			
		||||
                         size_t width = DEFAULT_COL_WIDTH,
 | 
			
		||||
                         bool shown = true,
 | 
			
		||||
                         wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT)
 | 
			
		||||
    {
 | 
			
		||||
        m_image = image;
 | 
			
		||||
        m_selected_image = -1;
 | 
			
		||||
        m_text = text;
 | 
			
		||||
        m_width = width;
 | 
			
		||||
        m_shown = shown;
 | 
			
		||||
        m_alignment = alignment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -66,12 +79,14 @@ public:
 | 
			
		||||
        m_selected_image = other.m_selected_image;
 | 
			
		||||
        m_text = other.m_text;
 | 
			
		||||
        m_width = other.m_width;
 | 
			
		||||
        m_shown = other.m_shown;
 | 
			
		||||
        m_alignment = other.m_alignment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~wxTreeListColumnInfo() {}
 | 
			
		||||
 | 
			
		||||
    // getters
 | 
			
		||||
    bool GetShown() const { return m_shown; }
 | 
			
		||||
    wxTreeListColumnAlign GetAlignment() const { return m_alignment; }
 | 
			
		||||
    wxString GetText() const { return m_text; }
 | 
			
		||||
    int GetImage() const { return m_image; }
 | 
			
		||||
@@ -79,6 +94,9 @@ public:
 | 
			
		||||
    size_t GetWidth() const { return m_width; }
 | 
			
		||||
 | 
			
		||||
    // setters
 | 
			
		||||
    wxTreeListColumnInfo& SetShown(bool shown)
 | 
			
		||||
    { m_shown = shown; return *this; }
 | 
			
		||||
 | 
			
		||||
    wxTreeListColumnInfo& SetAlignment(wxTreeListColumnAlign alignment)
 | 
			
		||||
    { m_alignment = alignment; return *this; }
 | 
			
		||||
 | 
			
		||||
@@ -95,6 +113,7 @@ public:
 | 
			
		||||
    { m_width = with; return *this; }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    bool m_shown;
 | 
			
		||||
    wxTreeListColumnAlign m_alignment;
 | 
			
		||||
    wxString m_text;
 | 
			
		||||
    int m_image;
 | 
			
		||||
@@ -106,6 +125,13 @@ private:
 | 
			
		||||
// wxTreeListCtrl - the multicolumn tree control
 | 
			
		||||
//----------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
// flags for FindItem
 | 
			
		||||
const int wxTL_SEARCH_VISIBLE = 0x0000;
 | 
			
		||||
const int wxTL_SEARCH_LEVEL   = 0x0001;
 | 
			
		||||
const int wxTL_SEARCH_FULL    = 0x0002;
 | 
			
		||||
const int wxTL_SEARCH_PARTIAL = 0x0010;
 | 
			
		||||
const int wxTL_SEARCH_NOCASE  = 0x0020;
 | 
			
		||||
 | 
			
		||||
// additional flag for HitTest
 | 
			
		||||
const int wxTREE_HITTEST_ONITEMCOLUMN = 0x2000;
 | 
			
		||||
extern GIZMODLLEXPORT const wxChar* wxTreeListCtrlNameStr;
 | 
			
		||||
@@ -152,10 +178,6 @@ public:
 | 
			
		||||
    unsigned int GetIndent() const;
 | 
			
		||||
    void SetIndent(unsigned int indent);
 | 
			
		||||
 | 
			
		||||
        // spacing is the number of pixels between the start and the Text
 | 
			
		||||
    unsigned int GetSpacing() const;
 | 
			
		||||
    void SetSpacing(unsigned int spacing);
 | 
			
		||||
 | 
			
		||||
    // line spacing is the space above and below the text on each line
 | 
			
		||||
    unsigned int GetLineSpacing() const;
 | 
			
		||||
    void SetLineSpacing(unsigned int spacing);
 | 
			
		||||
@@ -188,12 +210,20 @@ public:
 | 
			
		||||
 | 
			
		||||
    // adds a column
 | 
			
		||||
    void AddColumn(const wxString& text)
 | 
			
		||||
    { AddColumn(wxTreeListColumnInfo().SetText(text)); }
 | 
			
		||||
        { AddColumn(wxTreeListColumnInfo(text)); }
 | 
			
		||||
    void AddColumn(const wxString& text,
 | 
			
		||||
                   size_t width,
 | 
			
		||||
                   wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT)
 | 
			
		||||
        { AddColumn(wxTreeListColumnInfo(text,
 | 
			
		||||
                                         -1,
 | 
			
		||||
                                         width,
 | 
			
		||||
                                         true,
 | 
			
		||||
                                         alignment)); }
 | 
			
		||||
    void AddColumn(const wxTreeListColumnInfo& col);
 | 
			
		||||
 | 
			
		||||
    // inserts a column before the given one
 | 
			
		||||
    void InsertColumn(size_t before, const wxString& text)
 | 
			
		||||
    { InsertColumn(before, wxTreeListColumnInfo().SetText(text)); }
 | 
			
		||||
    { InsertColumn(before, wxTreeListColumnInfo(text)); }
 | 
			
		||||
    void InsertColumn(size_t before, const wxTreeListColumnInfo& col);
 | 
			
		||||
 | 
			
		||||
    // deletes the given column - does not delete the corresponding column
 | 
			
		||||
@@ -224,6 +254,9 @@ public:
 | 
			
		||||
    void SetColumnImage(size_t column, int image);
 | 
			
		||||
    int GetColumnImage(size_t column) const;
 | 
			
		||||
 | 
			
		||||
    void ShowColumn(size_t column, bool shown);
 | 
			
		||||
    bool IsColumnShown(size_t column) const;
 | 
			
		||||
 | 
			
		||||
    // Functions to work with tree list ctrl items.
 | 
			
		||||
 | 
			
		||||
    // accessors
 | 
			
		||||
@@ -280,11 +313,10 @@ public:
 | 
			
		||||
    void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
 | 
			
		||||
 | 
			
		||||
    // set the item's text colour
 | 
			
		||||
    void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
 | 
			
		||||
    void SetItemTextColour(const wxTreeItemId& item, const wxColour& colour);
 | 
			
		||||
 | 
			
		||||
    // set the item's background colour
 | 
			
		||||
    void SetItemBackgroundColour(const wxTreeItemId& item,
 | 
			
		||||
                                 const wxColour& col);
 | 
			
		||||
    void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& colour);
 | 
			
		||||
 | 
			
		||||
    // set the item's font (should be of the same height for all items)
 | 
			
		||||
    void SetItemFont(const wxTreeItemId& item, const wxFont& font);
 | 
			
		||||
@@ -336,7 +368,7 @@ public:
 | 
			
		||||
    size_t GetSelections(wxArrayTreeItemIds&) const;
 | 
			
		||||
 | 
			
		||||
    // get the parent of this item (may return NULL if root)
 | 
			
		||||
    wxTreeItemId GetParent(const wxTreeItemId& item) const;
 | 
			
		||||
    wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
 | 
			
		||||
 | 
			
		||||
    // for this enumeration function you must pass in a "cookie" parameter
 | 
			
		||||
    // which is opaque for the application but is necessary for the library
 | 
			
		||||
@@ -346,9 +378,23 @@ public:
 | 
			
		||||
    // the same!
 | 
			
		||||
 | 
			
		||||
    // get the first child of this item
 | 
			
		||||
#if !wxCHECK_VERSION(2, 5, 0)
 | 
			
		||||
    wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const;
 | 
			
		||||
#else
 | 
			
		||||
    wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
 | 
			
		||||
#endif
 | 
			
		||||
    // get the next child
 | 
			
		||||
#if !wxCHECK_VERSION(2, 5, 0)
 | 
			
		||||
    wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
 | 
			
		||||
#else
 | 
			
		||||
    wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
 | 
			
		||||
#endif
 | 
			
		||||
    // get the prev child
 | 
			
		||||
#if !wxCHECK_VERSION(2, 5, 0)
 | 
			
		||||
    wxTreeItemId GetPrevChild(const wxTreeItemId& item, long& cookie) const;
 | 
			
		||||
#else
 | 
			
		||||
    wxTreeItemId GetPrevChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
 | 
			
		||||
#endif
 | 
			
		||||
    // get the last child of this item - this method doesn't use cookies
 | 
			
		||||
    wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
 | 
			
		||||
 | 
			
		||||
@@ -428,6 +474,7 @@ public:
 | 
			
		||||
    // select this item
 | 
			
		||||
    void SelectItem(const wxTreeItemId& item, bool unselect_others=TRUE,
 | 
			
		||||
                    bool extended_select=FALSE);
 | 
			
		||||
    void SelectAll(bool extended_select=FALSE);
 | 
			
		||||
    // make sure this item is visible (expanding the parent item and/or
 | 
			
		||||
    // scrolling to this item if necessary)
 | 
			
		||||
    void EnsureVisible(const wxTreeItemId& item);
 | 
			
		||||
@@ -466,15 +513,8 @@ public:
 | 
			
		||||
    // NB: this function is not reentrant and not MT-safe (FIXME)!
 | 
			
		||||
    void SortChildren(const wxTreeItemId& item);
 | 
			
		||||
 | 
			
		||||
    // deprecated functions: use Set/GetItemImage directly
 | 
			
		||||
        // get the selected item image
 | 
			
		||||
    int GetItemSelectedImage(const wxTreeItemId& item) const
 | 
			
		||||
        { return GetItemImage(item, wxTreeItemIcon_Selected); }
 | 
			
		||||
        // set the selected item image
 | 
			
		||||
    void SetItemSelectedImage(const wxTreeItemId& item, int image)
 | 
			
		||||
        { SetItemImage(item, image, wxTreeItemIcon_Selected); }
 | 
			
		||||
 | 
			
		||||
    // implementation only from now on
 | 
			
		||||
    // searching
 | 
			
		||||
    wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int flags = 0);
 | 
			
		||||
 | 
			
		||||
    // overridden base class virtuals
 | 
			
		||||
    virtual bool SetBackgroundColour(const wxColour& colour);
 | 
			
		||||
@@ -487,20 +527,21 @@ public:
 | 
			
		||||
    wxTreeListMainWindow* GetMainWindow() const
 | 
			
		||||
    { return m_main_win; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    // header window, responsible for column visualization and manipulation
 | 
			
		||||
    wxTreeListHeaderWindow* m_header_win;
 | 
			
		||||
    // main window, the "true" tree ctrl
 | 
			
		||||
    wxTreeListMainWindow*   m_main_win;
 | 
			
		||||
 | 
			
		||||
    // the common part of all ctors
 | 
			
		||||
    void Init();
 | 
			
		||||
//     // the common part of all ctors
 | 
			
		||||
//     void Init();
 | 
			
		||||
 | 
			
		||||
    void OnSize(wxSizeEvent& event);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    size_t fill_column;
 | 
			
		||||
 | 
			
		||||
    DECLARE_EVENT_TABLE()
 | 
			
		||||
    DECLARE_DYNAMIC_CLASS(wxTreeListCtrl)
 | 
			
		||||
};
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
Recent Changes for wxPython
 | 
			
		||||
=====================================================================
 | 
			
		||||
 | 
			
		||||
2.5.1.6
 | 
			
		||||
2.5.2.0
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
wx.ADJUST_MINSIZE is now the default behaviour for window items in
 | 
			
		||||
@@ -64,6 +64,11 @@ running on wxGTK to work around the fact that GTK requires the locale
 | 
			
		||||
to be set to the system settings but Python depends on LC_NUMERIC
 | 
			
		||||
remaining compatible with "C".
 | 
			
		||||
 | 
			
		||||
Switched gizmos.TreeListCtrl to the newer version of the code from the
 | 
			
		||||
wxCode project.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
2.5.1.5
 | 
			
		||||
 
 | 
			
		||||
@@ -586,9 +586,9 @@ if BUILD_GIZMOS:
 | 
			
		||||
                            USE_SWIG, swig_force, swig_args, swig_deps)
 | 
			
		||||
 | 
			
		||||
    ext = Extension('_gizmos',
 | 
			
		||||
                    [ '%s/treelistctrl.cpp' % location ] + swig_sources,
 | 
			
		||||
                    [ '%s/treelistctrl.cpp' % opj(location, 'wxCode/src') ] + swig_sources,
 | 
			
		||||
 | 
			
		||||
                    include_dirs =  includes + [ location ] + CONTRIBS_INC,
 | 
			
		||||
                    include_dirs =  includes + [ location, opj(location, 'wxCode/include') ] + CONTRIBS_INC,
 | 
			
		||||
                    define_macros = defines,
 | 
			
		||||
 | 
			
		||||
                    library_dirs = libdirs,
 | 
			
		||||
 
 | 
			
		||||
@@ -58,6 +58,11 @@ wxTL_ALIGN_LEFT = wx.gizmos.TL_ALIGN_LEFT
 | 
			
		||||
wxTL_ALIGN_RIGHT = wx.gizmos.TL_ALIGN_RIGHT
 | 
			
		||||
wxTL_ALIGN_CENTER = wx.gizmos.TL_ALIGN_CENTER
 | 
			
		||||
wxTREE_HITTEST_ONITEMCOLUMN = wx.gizmos.TREE_HITTEST_ONITEMCOLUMN
 | 
			
		||||
wxTL_SEARCH_VISIBLE = wx.gizmos.TL_SEARCH_VISIBLE
 | 
			
		||||
wxTL_SEARCH_LEVEL = wx.gizmos.TL_SEARCH_LEVEL
 | 
			
		||||
wxTL_SEARCH_FULL = wx.gizmos.TL_SEARCH_FULL
 | 
			
		||||
wxTL_SEARCH_PARTIAL = wx.gizmos.TL_SEARCH_PARTIAL
 | 
			
		||||
wxTL_SEARCH_NOCASE = wx.gizmos.TL_SEARCH_NOCASE
 | 
			
		||||
wxTreeListColumnInfo = wx.gizmos.TreeListColumnInfo
 | 
			
		||||
wxTreeListColumnInfoPtr = wx.gizmos.TreeListColumnInfoPtr
 | 
			
		||||
wxTreeListCtrl = wx.gizmos.TreeListCtrl
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user