]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/treectrl/treetest.h
OS/2 updates
[wxWidgets.git] / samples / treectrl / treetest.h
index fdd2e9c720e68a1ce0d3ae1ee96d5aafefc74e10..12c6b2245b1791be30a4efacc3f1493df8efc85a 100644 (file)
@@ -71,6 +71,13 @@ public:
 protected:
     virtual int OnCompareItems(const wxTreeItemId& i1, const wxTreeItemId& i2);
 
+    // is this the test item which we use in several event handlers?
+    bool IsTestItem(const wxTreeItemId& item)
+    {
+        // the test item is the first child folder
+        return GetParent(item) == GetRootItem() && !GetPrevSibling(item);
+    }
+
 private:
     void AddItemsRecursively(const wxTreeItemId& idParent,
                              size_t nChildren,