Up

NSTreeController class documentation

Authors

Generated by Gregory John Casamento,,,

Date: Generated at 2024-11-13 12:52:37 -0500

Software documentation for the NSTreeController class

NSTreeController : NSObjectController

class_NSTreeController NSObjectController NSObjectController NSTreeController NSTreeController NSObjectController->NSTreeController
Declared in:
AppKit/NSTreeController.h
Availability: MacOS-X 10.4.0

Description forthcoming.

Instance Variables

Method summary


add: 

- (IBAction) add: (id)sender;
Availability: MacOS-X 10.4.0

Adds a new objeect to the tree usin the newObject method. If the tree controller is in "object" mode, then newObject is called to add a new node.

addChild: 

- (IBAction) addChild: (id)sender;
Availability: MacOS-X 10.4.0

Adds a child to the current selection using the newObject method. If the tree controller is in "object" mode, then newObject is called to add a new node.

addSelectionIndexPaths: 

- (BOOL) addSelectionIndexPaths: (NSArray*)indexPaths;
Availability: MacOS-X 10.4.0

Adds the objects in the indexPaths array to the current selection.

alwaysUsesMultipleValuesMarker 

- (BOOL) alwaysUsesMultipleValuesMarker;
Availability: MacOS-X 10.4.0

BOOL that indicates if the controller returns the multiple values marker when multiple objects have been selected.

arrangedObjects 

- (NSTreeNode*) arrangedObjects;
Availability: MacOS-X 10.4.0

All objects managed by this tree controller.

avoidsEmptySelection 

- (BOOL) avoidsEmptySelection;
Availability: MacOS-X 10.4.0

If YES, requires the content array to maintain a selection.

canAddChild 

- (BOOL) canAddChild;
Availability: MacOS-X 10.4.0

If YES, a child can be added.

canInsert 

- (BOOL) canInsert;
Availability: MacOS-X 10.4.0

If YES, an object can be inserted.

canInsertChild 

- (BOOL) canInsertChild;
Availability: MacOS-X 10.4.0

If YES, a child can be inserted.

childrenKeyPath 

- (NSString*) childrenKeyPath;
Availability: MacOS-X 10.4.0

Key path for children of the node. This key must be key value compliant.

childrenKeyPathForNode: 

- (NSString*) childrenKeyPathForNode: (NSTreeNode*)node;
Availability: MacOS-X 10.5.0

children key path for the given NSTreeNode.

countKeyPath 

- (NSString*) countKeyPath;
Availability: MacOS-X 10.4.0

Key value path for the flag which gives the count for the children of this node. The path indicated here must be key-value compliant. If count is enabled, then add:, addChild:, remove:, removeChild: and insert: are disabled. This key path is option since it can be determined by the array of children retuned by the childKeyPath. The mode the tree controller is in when this is not specified is called "object" mode.

countKeyPathForNode: 

- (NSString*) countKeyPathForNode: (NSTreeNode*)node;
Availability: MacOS-X 10.5.0

count key path for the given NSTreeNode.

insert: 

- (IBAction) insert: (id)sender;
Availability: MacOS-X 10.4.0

Insert an object created by newObject into arranged objects. This method will only function if the tree controller is in "object" mode.

insertChild: 

- (IBAction) insertChild: (id)sender;
Availability: MacOS-X 10.4.0

Inserts a child using the newObject method. This method will fail if canInsertChild returns NO. If the tree controller is in "object" mode, then newObject is called to add a new node.

insertObject: atArrangedObjectIndexPath: 

- (void) insertObject: (id)object atArrangedObjectIndexPath: (NSIndexPath*)indexPath;
Availability: MacOS-X 10.4.0

Insert an object created by newObject into arranged objects. This method will only function if the tree controller is in "object" mode.

insertObjects: atArrangedObjectIndexPaths: 

- (void) insertObjects: (NSArray*)objects atArrangedObjectIndexPaths: (NSArray*)indexPaths;
Availability: MacOS-X 10.4.0

Inserts objects into arranged objects at the specified indexPaths. These arrays are expected to be parallel and have the same number of objects. This method will only function if the tree controller is in "object" mode.

leafKeyPath 

- (NSString*) leafKeyPath;
Availability: MacOS-X 10.4.0

Key value path for the flag which determins that this is a leaf. The path indicated here must be key-value compliant. This key path is optional as it can be determined by the children returned by the childrenKeyPath.

leafKeyPathForNode: 

- (NSString*) leafKeyPathForNode: (NSTreeNode*)node;
Availability: MacOS-X 10.5.0

leaf key path for the given NSTreeNode.

moveNode: toIndexPath: 

- (void) moveNode: (NSTreeNode*)node toIndexPath: (NSIndexPath*)indexPath;
Availability: MacOS-X 10.5.0

Moves node to given indexPath

moveNodes: toIndexPath: 

- (void) moveNodes: (NSArray*)nodes toIndexPath: (NSIndexPath*)startingIndexPath;
Availability: MacOS-X 10.5.0

Move nodes to position at startingIndexPath

preservesSelection 

- (BOOL) preservesSelection;
Availability: MacOS-X 10.4.0

If YES, then preserve the current selection when the content changes.

rearrangeObjects 

- (void) rearrangeObjects;
Availability: MacOS-X 10.4.0

Causes the controller to re-sort and rearrange the objects. This method should be called if anything has been done that affects the list of objects in the controller.

remove: 

- (IBAction) remove: (id)sender;
Availability: MacOS-X 10.4.0

Remove the currently selected object. This method will only function if the tree controller is in "object" mode.

removeObjectAtArrangedObjectIndexPath: 

- (void) removeObjectAtArrangedObjectIndexPath: (NSIndexPath*)indexPath;
Availability: MacOS-X 10.4.0

Remove the currently selected object

removeObjectsAtArrangedObjectIndexPaths: 

- (void) removeObjectsAtArrangedObjectIndexPaths: (NSArray*)indexPaths;
Availability: MacOS-X 10.4.0

Removes objects at the specified indexPaths.

removeSelectionIndexPaths: 

- (void) removeSelectionIndexPaths: (NSArray*)indexPaths;
Availability: MacOS-X 10.4.0

Removes selection of objects at the specified indexPaths.

selectedNodes 

- (NSArray*) selectedNodes;
Availability: MacOS-X 10.5.0

Array containing all selected nodes

selectedObjects 

- (NSArray*) selectedObjects;
Availability: MacOS-X 10.4.0

An NSArray containing all selected objects.

selectionIndexPath 

- (NSIndexPath*) selectionIndexPath;
Availability: MacOS-X 10.4.0

The index path of the first selected object.

selectionIndexPaths 

- (NSArray*) selectionIndexPaths;
Availability: MacOS-X 10.4.0

An array containing all of the currently selected objects.

selectsInsertedObjects 

- (BOOL) selectsInsertedObjects;
Availability: MacOS-X 10.4.0

If YES, then when an object is inserted it is added to the selection.

setAlwaysUsesMultipleValuesMarker: 

- (void) setAlwaysUsesMultipleValuesMarker: (BOOL)flag;
Availability: MacOS-X 10.4.0

Sets the flag to always use multiple values marker.

setAvoidsEmptySelection: 

- (void) setAvoidsEmptySelection: (BOOL)flag;
Availability: MacOS-X 10.4.0

Sets the flag to avoid empty selection.

setChildrenKeyPath: 

- (void) setChildrenKeyPath: (NSString*)path;
Availability: MacOS-X 10.4.0

Sets the children key path. This needs to be key-value compliant.

setCountKeyPath: 

- (void) setCountKeyPath: (NSString*)path;
Availability: MacOS-X 10.4.0

Sets the count key path. This needs to be key-value compliant. Setting this key path will disable add:, addChild:, remove:, removeChild:, and insert: methods. If this is not specified, the tree controller is in "object" mode.

setLeafKeyPath: 

- (void) setLeafKeyPath: (NSString*)key;
Availability: MacOS-X 10.4.0

Sets leaf key path. This value needs to be key-value compliant.

setPreservesSelection: 

- (void) setPreservesSelection: (BOOL)flag;
Availability: MacOS-X 10.4.0

Sets the preserves selection flag.

setSelectionIndexPath: 

- (BOOL) setSelectionIndexPath: (NSIndexPath*)indexPath;
Availability: MacOS-X 10.4.0

Makes indexPath the current selection.

setSelectionIndexPaths: 

- (BOOL) setSelectionIndexPaths: (NSArray*)indexPaths;
Availability: MacOS-X 10.4.0

Makes the array indexPaths the current selections.

setSelectsInsertedObjects: 

- (void) setSelectsInsertedObjects: (BOOL)flag;
Availability: MacOS-X 10.4.0

Sets the flag that determines if objects inserted are automatically selected.

setSortDescriptors: 

- (void) setSortDescriptors: (NSArray*)descriptors;
Availability: MacOS-X 10.5.0

Set the descriptors by which the content of this tree controller is sorted.

sortDescriptors 

- (NSArray*) sortDescriptors;
Availability: MacOS-X 10.4.0

An array containing sort descriptors used to arrange content.



Instance Variables for NSTreeController Class

_alwaysUsesMultipleValuesMarker

@protected BOOL _alwaysUsesMultipleValuesMarker;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_arranged_objects

@protected NSTreeNode* _arranged_objects;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_avoidsEmptySelection

@protected BOOL _avoidsEmptySelection;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_canAddChild

@protected BOOL _canAddChild;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_canInsert

@protected BOOL _canInsert;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_canInsertChild

@protected BOOL _canInsertChild;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_childrenKeyPath

@protected NSString* _childrenKeyPath;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_countKeyPath

@protected NSString* _countKeyPath;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_leafKeyPath

@protected NSString* _leafKeyPath;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_preservesSelection

@protected BOOL _preservesSelection;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_selection_index_paths

@protected NSMutableArray* _selection_index_paths;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_selectsInsertedObjects

@protected BOOL _selectsInsertedObjects;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_sortDescriptors

@protected NSArray* _sortDescriptors;
Availability: MacOS-X 10.4.0

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.





Up