# NSOutlineView

greg_casamento@yahoo.com
Generated at 2026-02-17 21:02:56 +0000

This class is a subclass of NSTableView which provides the user with a way to display tree structured data in an outline format. It is particularly useful for show hierarchical data such as a class inheritance tree or any other set of relationships.
NB. While it its illegal to have the same item in the view more than once, it is possible to have multiple equal items since tests for pointer equality are used rather than calls to the -isEqual: method.

2001 Free Software Foundation, Inc.
Software documentation for the NSOutlineView class
AppKit/NSOutlineView.h
Description forthcoming.
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.
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.
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.
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.
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.
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.
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.
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.
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.
autoResizesOutlineColumn
Causes the outline column, the column containing the expand/collapse gadget, to resize based on the amount of space needed by widest content.
autosaveExpandedItems
Causes the outline column, the column containing the expand/collapse gadget, to resize based on the amount of space needed by widest content.
collapseItem:
item
Collapses the given item only. This is the equivalent of calling [NSOutlineView -collapseItem:collapseChildren:] with `NO`.
collapseItem:
item
collapseChildren:
collapseChildren
Collapses the specified item. If collapseChildren is set to `YES`, then all of the expandable children of this item all also collapsed in a recursive fashion (i.e. all children, grandchildren and etc).
expandItem:
item
Expands the given item only. This is the equivalent of calling [NSOutlineView -expandItem:expandChildren:] with `NO`.
expandItem:
item
expandChildren:
expandChildren
Expands the specified item. If expandChildren is set to `YES`, then all of the expandable children of this item all also expanded in a recursive fashion (i.e. all children, grandchildren and etc).
frameOfOutlineCellAtRow:
row
Description forthcoming.
indentationMarkerFollowsCell
Returns whether or not the indentation marker or "knob" is indented along with the content inside the cell.
indentationPerLevel
Returns the amount of indentation, in points, for each level of the tree represented by the outline view.
isExpandable:
item
Returns `YES`, if the item is able to be expanded, `NO` otherwise. Returns `NO` when the item is `nil` (as Cocoa does).
isItemExpanded:
item
Returns `YES` if the item is expanded or open, `NO` otherwise. Returns `YES` when the item is `nil` (as Cocoa does).
itemAtRow:
row
Returns the item at a given row. If no item exists for the given row, returns `nil`.
levelForItem:
item
Returns the level for a given item.
levelForRow:
row
Returns the level for the given row.
outlineTableColumn
Returns the outline table column.
parentForItem:
item
Returns the parent of the given item or `nil` if the item is not found.
reloadItem:
item
Causes an item to be reloaded. This is the equivalent of calling [NSOutlineView -reloadItem:reloadChildren:] with reloadChildren set to `NO`.
reloadItem:
item
reloadChildren:
reloadChildren
Causes an item and all of it's children to be reloaded if reloadChildren is set to `YES`, if it's set to `NO`, then only the item itself is refreshed from the datasource.
rowForItem:
item
Returns the corresponding row in the outline view for the given item. Returns -1 if item is `nil` or not found.
setAutoresizesOutlineColumn:
resize
When set to `YES` this causes the outline column, the column containing the expand/collapse gadget, to resize based on the amount of space needed by widest content.
setAutosaveExpandedItems:
flag
When set to `YES`, the outline view will save the state of all expanded or collapsed items in the view to the users defaults for the application the outline view is running in.
setDropItem:
item
dropChildIndex:
childIndex
Description forthcoming.
setIndentationMarkerFollowsCell:
followsCell
If set to `YES`, the indentation marker will follow the content at each level. Otherwise, the indentation marker will remain at the left most position of the view regardless of how many levels in the content is indented.
setIndentationPerLevel:
newIndentLevel
Sets the amount, in points, that each level is to be indented by.
setOutlineTableColumn:
outlineTableColumn
Sets the outline table column in which to place the indentation marker.
shouldCollapseAutoExpandedItemsForDeposited:
deposited
Returns `YES`, by default. Subclasses should override this method if a different behaviour is required.
Software documentation for the NSOutlineViewDataSource protocol
AppKit/NSOutlineView.h
protocol NSOutlineViewDataSource
outlineView:
outlineView
acceptDrop:
info
item:
item
childIndex:
index
Called to perform drop operation and returns `YES` if successful, and `NO` otherwise.
outlineView:
outlineView
child:
index
ofItem:
item
Implementation of this method is required. Returns the child at the specified index for the given item.
outlineView:
outlineView
isItemExpandable:
item
This is a required method. Returns whether or not the outline view item specified is expandable or not.
outlineView:
outlineView
itemForPersistentObject:
object
Returns the item for the given persistent object.
outlineView:
outlineView
namesOfPromisedFilesDroppedAtDestination:
dropDestination
forDraggedItems:
items
Description forthcoming.
outlineView:
outlineView
numberOfChildrenOfItem:
item
Description forthcoming.
outlineView:
outlineView
objectValueForTableColumn:
tableColumn
byItem:
item
This is a required method. Returns the object corresponding to the item representing it in the outline view.
outlineView:
outlineView
persistentObjectForItem:
item
Returns the persistent object for the item specified.
outlineView:
outlineView
setObjectValue:
object
forTableColumn:
tableColumn
byItem:
item
Sets the object value of the given item in the given table column to the object provided.
outlineView:
outlineView
sortDescriptorsDidChange:
oldSortDescriptors
Description forthcoming.
outlineView:
outlineView
validateDrop:
info
proposedItem:
item
proposedChildIndex:
index
Used by the Drag and Drop system. Returns the drag operation which should be used when -outlineView:acceptDrop:item:childIndex: is called.
outlineView:
outlineView
writeItems:
items
toPasteboard:
pboard
Causes the outline view to write the specified items to the pastboard.
Software documentation for the NSOutlineViewDelegate protocol
AppKit/NSOutlineView.h
Description forthcoming.
outlineView:
outlineView
dataCellForTableColumn:
aTableColumn
item:
item
Description forthcoming.
outlineView:
outlineView
didAddRowView:
rowView
forRow:
rowIndex
Description forthcoming.
outlineView:
outlineView
didClickTableColumn:
aTableColumn
Description forthcoming.
outlineView:
outlineView
didRemoveRowView:
rowView
forRow:
rowIndex
Description forthcoming.
outlineView:
outlineView
rowViewForItem:
item
Description forthcoming.
outlineView:
outlineView
shouldCollapseItem:
item
Returns whether or not the specified item should be allowed to collapse.
outlineView:
outlineView
shouldEditTableColumn:
tableColumn
item:
item
Returns whether or not the given table column should be allowed to be edited.
outlineView:
outlineView
shouldExpandItem:
item
Returns whether or not the specified item should be expanded.
outlineView:
outlineView
shouldSelectItem:
item
Returns `YES` or `NO` depending on if the given item is selectable. If `YES`, the item is selected, otherwise the outline view will reject the selection.
outlineView:
outlineView
shouldSelectTableColumn:
tableColumn
Returns `YES` or `NO` depending on if the given table column is selectable according to the delegate. If `NO` is returned the outline view will not allow the selection, if `YES` it will allow the selection.
outlineView:
outlineView
viewForTableColumn:
aTableColumn
item:
item
Description forthcoming.
outlineView:
outlineView
willDisplayCell:
cell
forTableColumn:
tableColumn
item:
item
Called when the given cell is about to be displayed. This method is useful for making last second modifications to what will be shown.
outlineView:
outlineView
willDisplayOutlineCell:
cell
forTableColumn:
tableColumn
item:
item
Called when the given cell in the outline column is about to be displayed. This method is useful for making last second modifications to what will be shown.
outlineViewColumnDidMove:
aNotification
Called after the column has moved.
outlineViewColumnDidResize:
aNotification
Called after the view column is resized.
outlineViewItemDidCollapse:
aNotification
Called after the item has collapsed.
outlineViewItemDidExpand:
aNotification
Called after the item has expanded
outlineViewItemWillCollapse:
aNotification
Called before the item has collapsed.
outlineViewItemWillExpand:
aNotification
Called before the item is expanded.
outlineViewSelectionDidChange:
aNotification
Called when the selection has changed.
outlineViewSelectionIsChanging:
aNotification
Called when the selection is about to change.
selectionShouldChangeInOutlineView:
outlineView
Called before the selection is modified. This method should return `YES` if the selection is allowed and `NO`, if not.