mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-30 20:30:50 +00:00
Update header and add non-keyed encoding to the class
This commit is contained in:
parent
21e8018d7d
commit
bbce009d7e
2 changed files with 67 additions and 28 deletions
|
@ -48,13 +48,14 @@ APPKIT_EXPORT_CLASS
|
||||||
NSString *_leafKeyPath;
|
NSString *_leafKeyPath;
|
||||||
NSArray *_sort_descriptors;
|
NSArray *_sort_descriptors;
|
||||||
NSArray *_arranged_objects;
|
NSArray *_arranged_objects;
|
||||||
|
|
||||||
BOOL _alwaysUsesMultipleValuesMarker;
|
BOOL _alwaysUsesMultipleValuesMarker;
|
||||||
BOOL _avoidsEmptySelection;
|
BOOL _avoidsEmptySelection;
|
||||||
BOOL _preservesSelection;
|
BOOL _preservesSelection;
|
||||||
BOOL _selectsInsertedObjects;
|
BOOL _selectsInsertedObjects;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) addSelectionIndexPaths: (NSArray*)indexPaths;
|
- (BOOL) addSelectionIndexPaths: (NSArray *)indexPaths;
|
||||||
- (BOOL) alwaysUsesMultipleValuesMarker;
|
- (BOOL) alwaysUsesMultipleValuesMarker;
|
||||||
- (BOOL) avoidsEmptySelection;
|
- (BOOL) avoidsEmptySelection;
|
||||||
- (BOOL) canAddChild;
|
- (BOOL) canAddChild;
|
||||||
|
@ -62,8 +63,8 @@ APPKIT_EXPORT_CLASS
|
||||||
- (BOOL) canInsertChild;
|
- (BOOL) canInsertChild;
|
||||||
- (BOOL) preservesSelection;
|
- (BOOL) preservesSelection;
|
||||||
- (BOOL) selectsInsertedObjects;
|
- (BOOL) selectsInsertedObjects;
|
||||||
- (BOOL) setSelectionIndexPath: (NSIndexPath*)indexPath;
|
- (BOOL) setSelectionIndexPath: (NSIndexPath *)indexPath;
|
||||||
- (BOOL) setSelectionIndexPaths: (NSArray*)indexPaths;
|
- (BOOL) setSelectionIndexPaths: (NSArray *)indexPaths;
|
||||||
- (id) arrangedObjects;
|
- (id) arrangedObjects;
|
||||||
- (NSArray*) selectedObjects;
|
- (NSArray*) selectedObjects;
|
||||||
- (NSIndexPath*) selectionIndexPath;
|
- (NSIndexPath*) selectionIndexPath;
|
||||||
|
@ -75,29 +76,29 @@ APPKIT_EXPORT_CLASS
|
||||||
- (void) addChild: (id)sender;
|
- (void) addChild: (id)sender;
|
||||||
- (void) add: (id)sender;
|
- (void) add: (id)sender;
|
||||||
- (void) insertChild: (id)sender;
|
- (void) insertChild: (id)sender;
|
||||||
- (void) insertObject: (id)object atArrangedObjectIndexPath: (NSIndexPath*)indexPath;
|
- (void) insertObject: (id)object atArrangedObjectIndexPath: (NSIndexPath *)indexPath;
|
||||||
- (void) insertObjects: (NSArray*)objects atArrangedObjectIndexPaths: (NSArray*)indexPaths;
|
- (void) insertObjects: (NSArray *)objects atArrangedObjectIndexPaths: (NSArray *)indexPaths;
|
||||||
- (void) insert: (id)sender;
|
- (void) insert: (id)sender;
|
||||||
- (void) rearrangeObjects;
|
- (void) rearrangeObjects;
|
||||||
- (void) removeObjectAtArrangedObjectIndexPath: (NSIndexPath*)indexPath;
|
- (void) removeObjectAtArrangedObjectIndexPath: (NSIndexPath *)indexPath;
|
||||||
- (void) removeObjectsAtArrangedObjectIndexPaths: (NSArray*)indexPaths;
|
- (void) removeObjectsAtArrangedObjectIndexPaths: (NSArray *)indexPaths;
|
||||||
- (void) removeSelectionIndexPaths: (NSArray*)indexPaths;
|
- (void) removeSelectionIndexPaths: (NSArray *)indexPaths;
|
||||||
- (void) remove: (id)sender;
|
- (void) remove: (id)sender;
|
||||||
- (void) setAlwaysUsesMultipleValuesMarker: (BOOL)flag;
|
- (void) setAlwaysUsesMultipleValuesMarker: (BOOL)flag;
|
||||||
- (void) setAvoidsEmptySelection: (BOOL)flag;
|
- (void) setAvoidsEmptySelection: (BOOL)flag;
|
||||||
- (void) setChildrenKeyPath: (NSString*)path;
|
- (void) setChildrenKeyPath: (NSString *)path;
|
||||||
- (void) setCountKeyPath: (NSString*)path;
|
- (void) setCountKeyPath: (NSString *)path;
|
||||||
- (void) setLeafKeyPath: (NSString*)key;
|
- (void) setLeafKeyPath: (NSString *)key;
|
||||||
- (void) setPreservesSelection: (BOOL)flag;
|
- (void) setPreservesSelection: (BOOL)flag;
|
||||||
- (void) setSelectsInsertedObjects: (BOOL)flag;
|
- (void) setSelectsInsertedObjects: (BOOL)flag;
|
||||||
- (void) setSortDescriptors: (NSArray*)descriptors;
|
- (void) setSortDescriptors: (NSArray *)descriptors;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||||
- (NSString*) childrenKeyPathForNode: (NSTreeNode*)node;
|
- (NSString*) childrenKeyPathForNode: (NSTreeNode *)node;
|
||||||
- (NSString*) countKeyPathForNode: (NSTreeNode*)node;
|
- (NSString*) countKeyPathForNode: (NSTreeNode *)node;
|
||||||
- (NSString*) leafKeyPathForNode: (NSTreeNode*)node;
|
- (NSString*) leafKeyPathForNode: (NSTreeNode *)node;
|
||||||
- (void) moveNode: (NSTreeNode*)node toIndexPath: (NSIndexPath*)indexPath;
|
- (void) moveNode: (NSTreeNode *)node toIndexPath: (NSIndexPath *)indexPath;
|
||||||
- (void) moveNodes: (NSArray*)nodes toIndexPath: (NSIndexPath*)startingIndexPath;
|
- (void) moveNodes: (NSArray *)nodes toIndexPath: (NSIndexPath *)startingIndexPath;
|
||||||
- (NSArray*) selectedNodes;
|
- (NSArray*) selectedNodes;
|
||||||
#endif
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
|
|
||||||
[self setContent: obj];
|
[self setContent: obj];
|
||||||
theBinding = [GSKeyValueBinding getBinding: NSContentObjectBinding
|
theBinding = [GSKeyValueBinding getBinding: NSContentObjectBinding
|
||||||
forObject: self];
|
forObject: self];
|
||||||
if (theBinding != nil)
|
if (theBinding != nil)
|
||||||
[theBinding reverseSetValueFor: @"content"];
|
[theBinding reverseSetValueFor: @"content"];
|
||||||
}
|
}
|
||||||
|
@ -427,6 +427,25 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
id obj = nil;
|
||||||
|
BOOL f = NO;
|
||||||
|
|
||||||
|
obj = [coder decodeObject];
|
||||||
|
[self setChildrenKeyPath: obj];
|
||||||
|
obj = [coder decodeObject];
|
||||||
|
[self setCountKeyPath: obj];
|
||||||
|
obj = [coder decodeObject];
|
||||||
|
[self setLeafKeyPath: obj];
|
||||||
|
|
||||||
|
[coder decodeValueOfObjCType: @encode(BOOL)
|
||||||
|
at: &f];
|
||||||
|
[self setAvoidsEmptySelection: f];
|
||||||
|
[coder decodeValueOfObjCType: @encode(BOOL)
|
||||||
|
at: &f];
|
||||||
|
[self setPreservesSelection: f];
|
||||||
|
[coder decodeValueOfObjCType: @encode(BOOL)
|
||||||
|
at: &f];
|
||||||
|
[self setSelectsInsertedObjects: f];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -455,6 +474,25 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
id obj = nil;
|
||||||
|
BOOL f = NO;
|
||||||
|
|
||||||
|
obj = [self childrenKeyPath];
|
||||||
|
[coder encodeObject: obj];
|
||||||
|
obj = [self countKeyPath];
|
||||||
|
[coder encodeObject: obj];
|
||||||
|
obj = [self leafKeyPath];
|
||||||
|
[coder encodeObject: obj];
|
||||||
|
|
||||||
|
f = [self avoidsEmptySelection];
|
||||||
|
[coder encodeValueOfObjCType: @encode(BOOL)
|
||||||
|
at: &f];
|
||||||
|
f = [self preservesSelection];
|
||||||
|
[coder encodeValueOfObjCType: @encode(BOOL)
|
||||||
|
at: &f];
|
||||||
|
f = [self selectsInsertedObjects];
|
||||||
|
[coder encodeValueOfObjCType: @encode(BOOL)
|
||||||
|
at: &f];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue