]> git.saurik.com Git - wxWidgets.git/commitdiff
IsItemExpanded() function added
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 23 Jul 1998 16:09:55 +0000 (16:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 23 Jul 1998 16:09:55 +0000 (16:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/treectrl.h

index a26f8ffc80ec31c0c2b77b763d38a7344d969882..165148afb1e070bfae149a5251723961dcd9399d 100644 (file)
@@ -280,6 +280,14 @@ public:
   bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); }
   bool ToggleItem(long item)   { return ExpandItem(item, wxTREE_EXPAND_TOGGLE);   }
   bool ExpandItem( long item, int action );
+
+    // is the item expanded now?
+  bool IsItemExpanded(long item)
+  {
+    wxGenericTreeItem *pItem = FindItem(item);
+    return pItem && (pItem->GetState() & wxTREE_STATE_EXPANDED);
+  }
+
   bool GetItem( wxTreeItem &info ) const;
   long GetItemData( long item ) const;
   wxString GetItemText( long item ) const;
@@ -307,7 +315,7 @@ public:
 
   wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const;
   void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL);
-  
+
 private:
   wxGenericTreeItem   *m_anchor;
   wxGenericTreeItem   *m_current;