summaryrefslogtreecommitdiffstats
path: root/macosx/HBTreeNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBTreeNode.h')
-rw-r--r--macosx/HBTreeNode.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/macosx/HBTreeNode.h b/macosx/HBTreeNode.h
index 0a8ade45b..52fa0aa37 100644
--- a/macosx/HBTreeNode.h
+++ b/macosx/HBTreeNode.h
@@ -13,7 +13,10 @@
*/
@protocol HBTreeNodeDelegate <NSObject>
-- (void)nodeDidChange;
+- (void)nodeDidChange:(id)node;
+
+@optional
+- (void)treeDidRemoveNode:(id)node;
@end
@@ -35,7 +38,24 @@
*/
- (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSIndexPath *idx, BOOL *stop))block;
+/**
+ * Returns the index path of an object in the tree.
+ *
+ * @param obj the object of the wanted NSIndexPath
+ *
+ * @return The index path whose corresponding value is equal to the preset. Returns nil if not found.
+ */
+- (NSIndexPath *)indexPathOfObject:(id)obj;
+
+/**
+ * Removes the object at the specified index path.
+ *
+ * @param idx the NSIndexPath of the object to delete.
+ */
+- (void)removeObjectAtIndexPath:(NSIndexPath *)idx;
+
// KVC Accessor Methods
+
@property (nonatomic, readonly) NSUInteger countOfChildren;
- (id)objectInChildrenAtIndex:(NSUInteger)index;
- (void)insertObject:(HBTreeNode *)presetObject inChildrenAtIndex:(NSUInteger)index;