X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Ftreelistctrl.cpp;h=2df0ab96a5a6f63ed9460ab19a26a5b5b67b77b9;hb=b2bd47502b2ed48d4001e26bae3a961a3310c60d;hp=9ed044fd476ffc4571e4695b058333f1a9eb84ae;hpb=684add23b4f64cb3c6e39e12a4af20d2c2500df6;p=creaImageIO.git diff --git a/src/treelistctrl.cpp b/src/treelistctrl.cpp index 9ed044f..2df0ab9 100644 --- a/src/treelistctrl.cpp +++ b/src/treelistctrl.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Maintainer: Otto Wyss // Created: 01/02/97 -// RCS-ID: $Id: treelistctrl.cpp,v 1.1 2008/09/26 14:15:48 guigues Exp $ +// RCS-ID: $Id: treelistctrl.cpp,v 1.3 2008/10/01 14:23:59 guigues Exp $ // Copyright: (c) 2004 Robert Roebling, Julian Smart, Alberto Griggio, // Vadim Zeitlin, Otto Wyss // Licence: wxWindows @@ -25,12 +25,6 @@ #pragma implementation "treelistctrl.h" #endif -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif #include @@ -411,6 +405,9 @@ public: // get all the items currently selected, return count of items size_t GetSelections(wxArrayTreeItemIds&) const; + // returns the number of currently selected items + size_t GetSelectionSize() const; + // get the parent of this item (may return NULL if root) wxTreeItemId GetItemParent(const wxTreeItemId& item) const; @@ -2691,6 +2688,13 @@ void wxTreeListMainWindow::FillArray (wxTreeListItem *item, } } + +// returns the number of currently selected items + size_t wxTreeListMainWindow::GetSelectionSize() const + { + return m_selected.GetCount(); + } + size_t wxTreeListMainWindow::GetSelections (wxArrayTreeItemIds &array) const { /* LG : NOT OK AS IS NOT IN TREE ORDER @@ -4457,6 +4461,10 @@ wxTreeItemId wxTreeListCtrl::GetRootItem() const //{ return m_main_win->GetSelection(); } wxTreeItemId wxTreeListCtrl::GetCurrent() const { return m_main_win->GetCurrent(); } + + // returns the number of currently selected items + size_t wxTreeListCtrl::GetSelectionSize() const + { return m_main_win->GetSelectionSize(); } size_t wxTreeListCtrl::GetSelections(wxArrayTreeItemIds& arr) const { return m_main_win->GetSelections(arr); }