Protocol

NSOutline​View​Delegate

The NSOutline​View​Delegate protocol defines the optional methods implemented by delegates of NSOutline​View objects.

Symbols

Expanding and Collapsing the Outline

func outline​View(NSOutline​View, should​Expand​Item:​ Any)

Returns a Boolean value that indicates whether the outline view should expand a given item.

func outline​View(NSOutline​View, should​Collapse​Item:​ Any)

Returns a Boolean value that indicates whether the outline view should collapse a given item.

Supporting Type Select

func outline​View(NSOutline​View, type​Select​String​For:​ NSTable​Column?, item:​ Any)

Returns the string that is used for type selection for a given column and item.

func outline​View(NSOutline​View, next​Type​Select​Match​From​Item:​ Any, to​Item:​ Any, for:​ String)

Returns the first item that matches the searchString from within the range of startItem to endItem

func outline​View(NSOutline​View, should​Type​Select​For:​ NSEvent, with​Current​Search:​ String?)

Returns a Boolean value that indicates whether type select should proceed for a given event and search string.

Working with Tooltips

Handling Selection

func outline​View(NSOutline​View, should​Select:​ NSTable​Column?)

Returns a Boolean value that indicates whether the outline view should select a given table column.

func outline​View(NSOutline​View, should​Select​Item:​ Any)

Returns a Boolean value that indicates whether the outline view should select a given item.

func selection​Should​Change(in:​ NSOutline​View)

Returns a Boolean value that indicates whether the outline view should change its selection.

func outline​View​Selection​Is​Changing(Notification)

Invoked when notification is posted—that is, whenever the outline view’s selection changes.

func outline​View​Selection​Did​Change(Notification)

Invoked when the selection did change notification is posted—that is, immediately after the outline view’s selection has changed.

Displaying Cells

func outline​View(NSOutline​View, will​Display​Cell:​ Any, for:​ NSTable​Column?, item:​ Any)

Informs the delegate that the cell specified by the column and item will be displayed.

func outline​View(NSOutline​View, will​Display​Outline​Cell:​ Any, for:​ NSTable​Column?, item:​ Any)

Informs the delegate that an outline view is about to display a cell used to draw the expansion symbol.

func outline​View(NSOutline​View, should​Show​Outline​Cell​For​Item:​ Any)

Returns whether the specified item should display the outline cell (the disclosure triangle).

func outline​View(NSOutline​View, should​Show​Cell​Expansion​For:​ NSTable​Column?, item:​ Any)

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

Moving and Resizing Columns

func outline​View(NSOutline​View, should​Reorder​Column:​ Int, to​Column:​ Int)

Sent to the delegate to allow or prohibit the specified column to be dragged to a new location.

Working with the Outline Column

func outline​View​Column​Did​Move(Notification)

Invoked whenever the user moves a column in the outline view.

func outline​View​Column​Did​Resize(Notification)

Invoked whenever the user resizes a column in the outline view.

func outline​View​Item​Will​Expand(Notification)

Invoked when notification is posted—that is, whenever the user is about to expand an item in the outline view.

func outline​View​Item​Did​Expand(Notification)

Invoked when notification is posted—that is, whenever the user expands an item in the outline view.

func outline​View​Item​Will​Collapse(Notification)

Invoked when notification is posted—that is, whenever the user is about to collapse an item in the outline view.

func outline​View​Item​Did​Collapse(Notification)

Invoked when the did collapse notification is posted—that is, whenever the user collapses an item in the outline view.

Editing Items

func outline​View(NSOutline​View, should​Edit:​ NSTable​Column?, item:​ Any)

Returns a Boolean value that indicates whether the outline view should allow editing of a given item in a given table column.

Working with Table Columns

func outline​View(NSOutline​View, mouse​Down​In​Header​Of:​ NSTable​Column)

Sent to the delegate whenever the mouse button is clicked in outline​View while the cursor is in a column header table​Column.

func outline​View(NSOutline​View, did​Click:​ NSTable​Column)

Sent at the time the mouse button subsequently goes up in outline​View and table​Column has been “clicked” without having been dragged anywhere.

func outline​View(NSOutline​View, did​Drag:​ NSTable​Column)

Sent at the time the mouse button goes up in outline​View and table​Column has been dragged during the time the mouse button was down.

Customizing Column and Row Sizes

func outline​View(NSOutline​View, height​Of​Row​By​Item:​ Any)

Returns the height in points of the row containing item.

func outline​View(NSOutline​View, size​To​Fit​Width​Of​Column:​ Int)

Invoked to allow the delegate to provide custom sizing behavior when a column’s resize divider is double clicked.

Customizing Tracking Support

func outline​View(NSOutline​View, should​Track​Cell:​ NSCell, for:​ NSTable​Column?, item:​ Any)

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

Grouping Rows

func outline​View(NSOutline​View, is​Group​Item:​ Any)

Returns a Boolean that indicates whether a given row should be drawn in the “group row” style.

Working with NSView-Based Outline Views

func outline​View(NSOutline​View, did​Add:​ NSTable​Row​View, for​Row:​ Int)

Implemented to know when a new row view is added to the table.

func outline​View(NSOutline​View, row​View​For​Item:​ Any)

implement this method to return a custom NSTable​Row​View for a particular item.

func outline​View(NSOutline​View, view​For:​ NSTable​Column?, item:​ Any)

Implemented to return the view used to display the specified item and column.

Relationships