Protocol

NSBrowserDelegate

A set of methods that a browser delegate implements to manage selection, scrolling, sizing, and other behavior.

Declaration

@protocol NSBrowserDelegate

Topics

Getting Browser Information

- browser:isColumnValid:

Returns whether the contents of the specified column are valid.

- browser:numberOfRowsInColumn:

Returns the number of rows of data in the specified column.

- browser:numberOfChildrenOfItem:

Asks the delegate for the number of children the given item has.

- browser:titleOfColumn:

Asks the delegate for the title to display above the specified column.

Managing Selection Behavior

- browser:shouldTypeSelectForEvent:withCurrentSearchString:

Sent to the delegate to determine whether keyboard-based selection (type select) for a given event and search string should proceed.

- browser:typeSelectStringForRow:inColumn:

Sent to the delegate to get the keyboard-based selection (type select) string for the specified row and column.

- browser:nextTypeSelectMatchFromRow:toRow:inColumn:forString:

Sent to the delegate to customize a browser’s keyboard-based selection (type select) behavior.

Managing Selection

- browser:selectCellWithString:inColumn:

Asks the delegate to select the cell with the given title in the specified column.

- browser:selectRow:inColumn:

Asks the delegate to select the cell at the specified row and column location.

- browser:selectionIndexesForProposedSelection:inColumn:

Asks the delegate for a set of indexes to select when the user changes the selection in the browser with the keyboard or mouse.

Accessing Components

- browser:child:ofItem:

Asks the delegate to return the child of the specified item at the specified index.

- browser:isLeafItem:

Asks the delegate whether the specified item is a leaf item (an item that cannot be expanded).

- browser:shouldEditItem:

Asks the delegate whether the browser may start an editing session for the specified item.

- browser:objectValueForItem:

Returns the object that the specified item uses to draw its contents.

- browser:setObjectValue:forItem:

Sets the object that the specified item uses to draw its contents to the specified object.

- rootItemForBrowser:

Asks the delegate to return the root item of the browser.

- browser:previewViewControllerForLeafItem:

Asks the delegate for a controller that provides a preview column for the specified leaf item.

- browser:headerViewControllerForItem:

Asks the delegate for a controller that provides a header view for the specified column item.

Managing Columns

- browser:createRowsForColumn:inMatrix:

Creates a row in the given matrix for each row of data in the specified column of the browser.

- browser:willDisplayCell:atRow:column:

Gives the delegate the opportunity to modify the specified cell at the given row and column location before the browser displays it.

- browser:didChangeLastColumn:toColumn:

Tells the delegate that the browser’s last column changed.

Scrolling

- browserWillScroll:

Notifies the delegate when the browser will scroll.

- browserDidScroll:

Notifies the delegate when the browser has scrolled.

Dragging

- browser:canDragRowsWithIndexes:inColumn:withEvent:

Sent to the delegate to determine whether the browser can attempt to initiate a drag of the specified rows for the specified event.

- browser:draggingImageForRowsWithIndexes:inColumn:withEvent:offset:

Sent to the delegate to obtain an image to represent dragged rows during a drag operation on a browser.

- browser:validateDrop:proposedRow:column:dropOperation:

Sent to the delegate during a dragging session to determine whether a drop should be accepted and to obtain the drop location. This method is required for a browser to be a drag destination.

- browser:acceptDrop:atRow:column:dropOperation:

Sent to the delegate during a dragging session to determine whether to accept the drop.

- browser:writeRowsWithIndexes:inColumn:toPasteboard:

Determines whether a drag operation can proceed. This method is required for a browser to be a drag source.

Sizing

- browser:shouldSizeColumn:forUserResize:toWidth:

Used to determine a column’s initial size.

- browser:sizeToFitWidthOfColumn:

Returns the ideal width for a column.

- browserColumnConfigurationDidChange:

Used by clients to implement their own column width persistence.

- browser:heightOfRow:inColumn:

Specifies the height of the specified row in the specified column.

Displaying Cell Content

- browser:shouldShowCellExpansionForRow:column:

Invoked to allow the delegate to control cell expansion for a specific row and column.

Relationships

Inherits From