O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSOutlineView — Mac OS X 10.0

Synopsis

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.

image with no caption

@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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required