Mac Developer Library

Developer

AppKit Framework Reference NSTableHeaderView Class Reference

Options
Deployment Target:

On This Page
Language:

NSTableHeaderView

An NSTableHeaderView is used by an NSTableView to draw headers over its columns and to handle mouse events in those headers. More...

Inheritance


Import Statement


import AppKit @import AppKit;

Availability


Available in OS X v10.0 and later.
  • Sets aTableView as the receiver’s NSTableView.

    Declaration

    Swift

    unowned(unsafe) var tableView: NSTableView?

    Objective-C

    @property(assign) NSTableView *tableView

    Discussion

    You should never need to invoke this method; it’s invoked automatically when you set the header view for an NSTableView.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    See Also

    – setHeaderView: (NSTableView)

  • Returns the NSTableView the receiver belongs to.

    Declaration

    Swift

    unowned(unsafe) var tableView: NSTableView?

    Objective-C

    @property(assign) NSTableView *tableView

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • If the user is dragging a column in the receiver, returns the index of that column.

    Declaration

    Swift

    var draggedColumn: Int { get }

    Objective-C

    @property(readonly) NSInteger draggedColumn

    Discussion

    Otherwise returns –1.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • If the user is dragging a column in the receiver, returns the column’s horizontal distance from its original position.

    Declaration

    Swift

    var draggedDistance: CGFloat { get }

    Objective-C

    @property(readonly) CGFloat draggedDistance

    Discussion

    Otherwise the return value is meaningless.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • If the user is resizing a column in the receiver, returns the index of that column.

    Declaration

    Swift

    var resizedColumn: Int { get }

    Objective-C

    @property(readonly) NSInteger resizedColumn

    Discussion

    Otherwise returns –1.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • Returns the index of the column whose header lies under aPoint in the receiver, or –1 if no such column is found.

    Declaration

    Swift

    func columnAtPoint(_ point: NSPoint) -> Int

    Objective-C

    - (NSInteger)columnAtPoint:(NSPoint)point

    Discussion

    aPoint is expressed in the receiver’s coordinate system.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • Returns the rectangle containing the header tile for the column at columnIndex.

    Declaration

    Swift

    func headerRectOfColumn(_ column: Int) -> NSRect

    Objective-C

    - (NSRect)headerRectOfColumn:(NSInteger)column

    Discussion

    Raises an NSInternalInconsistencyException if columnIndex is out of bounds.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    See Also

    – rectOfColumn: (NSTableView)