Add wxDataViewCtrl::GTKPathToItem() function and use it.

No real changes, just refactor the code to use a function mapping GtkTreeIter
to our wxDataViewItem and use it instead of duplicating its code everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-08-08 11:37:37 +00:00
parent 91012d561d
commit 17d98558b3
2 changed files with 41 additions and 51 deletions

View File

@@ -14,6 +14,8 @@
class WXDLLIMPEXP_FWD_ADV wxDataViewCtrlInternal;
struct _GtkTreePath;
// ---------------------------------------------------------
// wxDataViewColumn
// ---------------------------------------------------------
@@ -171,6 +173,10 @@ public:
GtkWidget *GtkGetTreeView() { return m_treeview; }
wxDataViewCtrlInternal* GtkGetInternal() { return m_internal; }
// Convert GTK path to our item. Returned item may be invalid if get_iter()
// failed.
wxDataViewItem GTKPathToItem(struct _GtkTreePath *path) const;
virtual void OnInternalIdle();
protected: