Class

NSScrubberLayout

An abstract class that describes the layout of items within a scrubber control.

Declaration

@interface NSScrubberLayout : NSObject

Overview

To determine the layout of items in a scrubber, use one of the built-in subclasses (NSScrubberProportionalLayout or NSScrubberFlowLayout), or create a custom subclass to implement your own layout.

Topics

Creating a Scrubber Layout

- init

Initializes and returns a newly allocated scrubber layout object from code.

- initWithCoder:

Initializes and returns a newly allocated scrubber layout object from a storyboard or nib file.

Configuring a Scrubber Layout

layoutAttributesClass

A property containing a class that describes layout attributes.

scrubber

The scrubber control that this layout is assigned to.

visibleRect

The currently visible rectangle, in the coordinate space of the scrubber content.

- invalidateLayout

Signals that the layout has been invalidated, and that the scrubber control should perform a new layout pass.

Subclassing a Scrubber Layout

- prepareLayout

Gives you an opportunity to perform layout calculations when the scrubber's layout is invalidated.

scrubberContentSize

The size required to contain all elements within the scrubber.

- layoutAttributesForItemAtIndex:

The layout attributes for the item with the specified index.

- layoutAttributesForItemsInRect:

The set of layout attributes for all items within the provided rectangle.

shouldInvalidateLayoutForSelectionChange

Determines whether the scrubber should refresh its layout when the selection changes.

shouldInvalidateLayoutForHighlightChange

Determines whether the scrubber should refresh its layout when an item is highlighted.

- shouldInvalidateLayoutForChangeFromVisibleRect:toVisibleRect:

Determines whether the scrubber should refresh its layout in response to a change of its visible region.

automaticallyMirrorsInRightToLeftLayout

Determines whether the scrubber mirrors its layout for right-to-left layouts.

Relationships

Inherits From

Conforms To

See Also

Scrubber Layouts

NSScrubberFlowLayout

A concrete layout object that arranges items end-to-end in a linear strip.

NSScrubberFlowLayoutDelegate

A protocol that a scrubber delegate can adopt to provide the size of an item.

NSScrubberProportionalLayout

A concrete layout object that sizes each item to some fraction of the scrubber's visible size.

NSScrubberLayoutAttributes

The layout of a scrubber item.