summaryrefslogtreecommitdiffstats
path: root/macosx/HBTreeNode.h
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-05-14 19:37:49 +0000
committerritsuka <[email protected]>2015-05-14 19:37:49 +0000
commit2659b80cc0d4e078db19436f4f144b50525f2983 (patch)
tree54a8813f4a53c25e1630e6aa654c348e603f9ee8 /macosx/HBTreeNode.h
parent970688a142998ddf68cf1950436bb92e0385139c (diff)
MacGui: use libhb built-in presets and validation functions. Update the format and save the presets in UserPresets.json, the old presets are automatically imported if the new presets file is not found. The mac gui now requires 10.7 or later.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7181 b64f7644-9d1e-0410-96f1-a4d463321fa5
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;