PXSourceListDelegate protocol reference

PXSourceListDelegate.h

Overview

The PXSourceListDelegate protocol defines methods which can be used by delegates of PXSourceList objects.

All the methods defined in the protocol are optional, and build upon those defined in the NSOutlineViewDelegate protocol.

In addition to the methods defined in this protocol, there are also a collection of notifications which are dispatched by PXSourceList objects to their delegates. The documentation for these can be found in the NSObject(PXSourceListNotifications) category.

As a side note, many of the methods declared in this protocol are "wrapper" methods of the associated NSOutlineViewDelegate methods, simply to maintain consistency with the naming of the methods. As such, the documentation provided by Apple for the NSOutlineViewDelegate protocol will be more detailed for these methods.

Tasks

Displaying groups

Handling Selection

Editing Items

Customizing Tracking Support

Expanding and Collapsing the Outline

Customizing Row Sizes

Displaying cells

Instance Methods

sourceList:isGroupAlwaysExpanded:

Returns whether a group is displayed as always expanded or not.

- (BOOL)sourceList:(PXSourceList *)aSourceList isGroupAlwaysExpanded:(id)group
Parameters
aSourceList

The Source List that sent the message

group

The group to be displayed as always expanded

Return Value

YES to specify that the group should be displayed as always expanded, or NO if not.

Discussion

A group that is displayed as always expanded displays no disclosure triangle to the left of it, and its direct children are always expanded.

Availability

Available in Mac OS X v10.5 and later

See Also
Declared In
PXSourceListDelegate.h

sourceList:shouldSelectItem:

Returns a Boolean value that indicates whether the Source List should select a given item.

- (BOOL)sourceList:(PXSourceList *)aSourceList shouldSelectItem:(id)item
Parameters
aSourceList

The Source List that sent the message

item

The item that should be selected

Return Value

YES to allow selection of the item, NO to disallow it

Discussion

This method can be implemented by the delegate to disallow selection of specific items.

This is essentially a wrapper for outlineView:shouldSelectItem: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

See Also
Declared In
PXSourceListDelegate.h

sourceList:selectionIndexesForProposedSelection:

Returns the indexes of rows to be selected for the current selection.

- (NSIndexSet *)sourceList:(PXSourceList *)aSourceList selectionIndexesForProposedSelection:(NSIndexSet *)proposedSelectionIndexes
Parameters
aSourceList

The Source List that sent the message

proposedSelectionIndexes

The proposed indexes of rows that should be selected

Return Value

An NSIndexSet of indexes that should be selected; return proposedSelectionIndexes as the default

Discussion

This method can be implemented by the delegate to change the current selection before the selection is carried out

This is essentially a wrapper for outlineView:selectionIndexesForProposedSelection: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

See Also
Declared In
PXSourceListDelegate.h

sourceList:shouldEditItem:

Returns a Boolean value that indicates whether the Source List should allow editing of a given item.

- (BOOL)sourceList:(PXSourceList *)aSourceList shouldEditItem:(id)item
Parameters
aSourceList

The Source List that sent the message

item

The item that should be edited

Return Value

YES to allow editing of the item, NO to disallow it

Discussion

This method can be implemented by the delegate to disallow editing of specific items.

This is essentially a wrapper for outlineView:shouldEditItem: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

Declared In
PXSourceListDelegate.h

sourceList:shouldTrackCell:forItem:

Returns a Boolean value that indicates whether a given cell should be tracked.

- (BOOL)sourceList:(PXSourceList *)aSourceList shouldTrackCell:(NSCell *)cell forItem:(id)item
Parameters
aSourceList

The Source List that sent the message

cell

The cell used to display item

item

An item in the Source List

Return Value

YES to allow expansion of the item, NO to disallow it

Discussion

This is essentially a wrapper for outlineView:shouldTrackCell:forTableColumn:item: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

Declared In
PXSourceListDelegate.h

sourceList:shouldExpandItem:

Returns a Boolean value that indicates whether the Source List should expand a given item.

- (BOOL)sourceList:(PXSourceList *)aSourceList shouldExpandItem:(id)item
Parameters
aSourceList

The Source List that sent the message

item

The item that should expand

Return Value

YES to allow expansion of the item, NO to disallow it

Discussion

This method can be implemented by the delegate to disallow expansion of specific items in the Source List.

This is essentially a wrapper for outlineView:shouldExpandItem: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

See Also
Declared In
PXSourceListDelegate.h

sourceList:shouldCollapseItem:

Returns a Boolean value that indicates whether the Source List should collapse a given item.

- (BOOL)sourceList:(PXSourceList *)aSourceList shouldCollapseItem:(id)item
Parameters
aSourceList

The Source List that sent the message

item

The item that should collapse

Return Value

YES to allow collapsing of the item, NO to disallow it

Discussion

This method can be implemented by the delegate to disallow collapsing of specific items.

This is essentially a wrapper for outlineView:shouldCollapseItem: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

See Also
Declared In
PXSourceListDelegate.h

sourceList:heightOfRowByItem:

Returns a float that specifies the height of a particular row for an item in the Source List.

- (CGFloat)sourceList:(PXSourceList *)aSourceList heightOfRowByItem:(id)item
Parameters
aSourceList

The Source List that sent the message

item

The item that the row height refers to

Return Value

A float for the row height for that item

Discussion

This method can be implemented by the delegate to provide varying row heights for different items in the Source List

This is essentially a wrapper for outlineView:heightOfRowByItem: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

Declared In
PXSourceListDelegate.h

sourceList:dataCellForItem:

Returns the cell for use with a given item in the Source List.

- (NSCell *)sourceList:(PXSourceList *)aSourceList dataCellForItem:(id)item
Parameters
aSourceList

The Source List that sent the message

item

The item in the data source that the cell corresponds to

Discussion

This is essentially a wrapper for outlineView:willDisplayDataCellForTableColumn:item: defined in the NSOutlineViewDelegate protocol.

Availability

Available in Mac OS X v10.5 and later

Declared In
PXSourceListDelegate.h

Last updated: 2010-01-09
Back to index / hierarchy.