NSTableHeaderView Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in OS X v10.0 and later.
Companion guide
Declared in
NSTableHeaderView.h

Overview

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

NSTableHeaderView uses NSTableHeaderCell to implement its user interface.

Tasks

Setting the Table View

Checking Altered Columns

Utility Methods

Instance Methods

columnAtPoint:

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

- (NSInteger)columnAtPoint:(NSPoint)aPoint
Discussion

aPoint is expressed in the receiver’s coordinate system.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSTableHeaderView.h

draggedColumn

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

- (NSInteger)draggedColumn
Discussion

Otherwise returns –1.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSTableHeaderView.h

draggedDistance

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

- (CGFloat)draggedDistance
Discussion

Otherwise the return value is meaningless.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSTableHeaderView.h

headerRectOfColumn:

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

- (NSRect)headerRectOfColumn:(NSInteger)columnIndex
Discussion

Raises an NSInternalInconsistencyException if columnIndex is out of bounds.

Availability
  • Available in OS X v10.0 and later.
See Also
Declared In
NSTableHeaderView.h

resizedColumn

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

- (NSInteger)resizedColumn
Discussion

Otherwise returns –1.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSTableHeaderView.h

setTableView:

Sets aTableView as the receiver’s NSTableView.

- (void)setTableView:(NSTableView *)aTableView
Discussion

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

Availability
  • Available in OS X v10.0 and later.
See Also
Declared In
NSTableHeaderView.h

tableView

Returns the NSTableView the receiver belongs to.

- (NSTableView *)tableView
Availability
  • Available in OS X v10.0 and later.
Declared In
NSTableHeaderView.h