NSOutlineView

NSOutlineView Mac OS X 10.0

This subclass of NSTableView implements a user interface component that can display hierarchical data (such as how a filesystem structure is displayed in the Finder's list view). In an NSOutlineView, users can expand and collapse rows, change the width and order of columns, and edit the contents of the outline. NSOutlineView objects rely on classes that implement the NSOutlineViewDataSource protocol to provide the data to be displayed in the outline.

figs/cocn_1562.gif

@interface NSOutlineView : NSTableView
 // Accessor Methods
   - (void)setAutosaveExpandedItems:(BOOL)save;
   - (BOOL)autosaveExpandedItems;
   - (void)setAutoresizesOutlineColumn:(BOOL)resize;
   - (BOOL)autoresizesOutlineColumn;
   - (void)setIndentationPerLevel:(float)indentationPerLevel;
   - (float)indentationPerLevel;
   - (void)setDropItem:(id)item dropChildIndex:(int)index;
   - (void)setIndentationMarkerFollowsCell:(BOOL)drawInCell;
   - (BOOL)indentationMarkerFollowsCell;
   - (void)setOutlineTableColumn:(NSTableColumn *)outlineTableColumn;
   - (NSTableColumn *)outlineTableColumn;
 // Instance Methods
   - (void)collapseItem:(id)item;
   - (void)collapseItem:(id)item collapseChildren:(BOOL)collapseChildren;
   - (void)expandItem:(id)item;
   - (void)expandItem:(id)item expandChildren:(BOOL)expandChildren;
   - (BOOL)isExpandable:(id)item;
   - (BOOL)isItemExpanded:(id)item;
   - (id)itemAtRow:(int)row;
   - (int)levelForItem:(id)item;
   - (int)levelForRow:(int)row;
   - (void)reloadItem:(id)item;
   - (void)reloadItem:(id)item reloadChildren:(BOOL)reloadChildren;
   - (int)rowForItem:(id)item;
   - (BOOL)shouldCollapseAutoExpandedItemsForDeposited:(BOOL)deposited;
// Methods Implemented by the Delegate
   - (BOOL)outlineView:(NSOutlineView *)outlineView shouldCollapseItem:(id)item;
   - (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn
        item:(id)item;
   - (BOOL)outlineView:(NSOutlineView *)outlineView shouldExpandItem:(id)item;
   - (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
   - (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectTableColumn:(NSTableColumn *)tableColumn;
   - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell
        forTableColumn:(NSTableColumn *)tableColumn item:(id)item;
   - (void)outlineView:(NSOutlineView *)outlineView willDisplayOutlineCell:(id)cell
        forTableColumn:(NSTableColumn *)tableColumn item:(id)item;
   - (void)outlineViewColumnDidMove:(NSNotification *)notification;
   - (void)outlineViewColumnDidResize:(NSNotification *)notification;
   - (void)outlineViewItemDidCollapse:(NSNotification *)notification;
   - (void)outlineViewItemDidExpand:(NSNotification *)notification;
   - (void)outlineViewItemWillCollapse:(NSNotification *)notification;
   - (void)outlineViewItemWillExpand:(NSNotification *)notification;
   - (void)outlineViewSelectionDidChange:(NSNotification *)notification;
   - (void)outlineViewSelectionIsChanging:(NSNotification *)notification;
   - (BOOL)selectionShouldChangeInOutlineView:(NSOutlineView *)outlineView;
// Notifications NSOutlineViewSelectionDidChangeNotification; NSOutlineViewSelectionIsChangingNotification;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes