Class

QCCompositionPickerView

The QCCompositionPickerView class allows users to browse compositions that are in the Quartz Composer composition repository, and to preview them. You can set the default input parameters for a composition preview by using the method setDefaultValue:forInputKey:.

Declaration

class QCCompositionPickerView : NSView

Overview

Note that the composition picker view does not automatically refresh its content when the composition repository is updated. It’s your responsibility to perform any necessary updating.

Topics

Setting and Getting the Background Color

func setBackgroundColor(NSColor!)

Sets the background color for the composition picker view.

func backgroundColor() -> NSColor!

Returns the background color of the composition picker view.

Managing Background Drawing

func setDrawsBackground(Bool)

Sets whether the composition picker view draws its background.

func drawsBackground() -> Bool

Returns whether the composition picker view draws its background.

Setting Composition Input Parameters

func setDefaultValue(Any!, forInputKey: String!)

Sets the default value to use for a composition input parameter.

func resetDefaultInputValues()

Clears all previously set default values for composition input parameters.

Managing Animation

func startAnimation(Any!)

Starts animating the composition in the composition picker view.

func stopAnimation(Any!)

Stops animating the composition that is currently animating in the composition picker view.

func isAnimating() -> Bool

Returns whether or not the composition picker view is currently animating its composition.

func setMaxAnimationFrameRate(Float)

Sets the maximum frame rate for animating compositions.

func maxAnimationFrameRate() -> Float

Retrieves the maximum frame rate for animating compositions.

Controlling Display of Composition Names

func setShowsCompositionNames(Bool)

Enables the display of composition names in the composition picker view.

func showsCompositionNames() -> Bool

Retrieves whether composition names can be shown in the composition picker view.

Setting and Retrieving the View Delegate

func setDelegate(Any!)

Sets the composition picker view delegate.

func delegate() -> Any!

Retrieves the composition picker view delegate.

Managing the Composition Picker View

func setCompositionsFromRepositoryWithProtocol(String!, andAttributes: [AnyHashable : Any]!)

Sets the compositions in the composition picker view to those that match the specified criteria.

func compositions() -> [Any]!

Returns the list of compositions that are currently in the composition picker view.

func setAllowsEmptySelection(Bool)

Sets whether to allow an empty selection in the composition picker view.

func allowsEmptySelection() -> Bool

Retrieves the empty-selection state of the composition picker view.

func setCompositionAspectRatio(NSSize)

Sets the aspect ratio used to display compositions in the composition picker view.

func compositionAspectRatio() -> NSSize

Retrieves the aspect ratio used to display compositions in the composition picker view.

func setSelectedComposition(QCComposition!)

Sets a composition as selected in the composition picker view.

func selectedComposition() -> QCComposition!

Returns the composition that is currently selected in the composition picker view.

Working with Columns and Rows

func setNumberOfColumns(Int)

Sets the number of columns in the composition picker view.

func numberOfColumns() -> Int

Retrieves the number of columns in the composition picker view.

func setNumberOfRows(Int)

Sets the number of rows in the composition picker view.

func numberOfRows() -> Int

Retrieves the number of rows in the composition picker view.

Notifications

static let QCCompositionPickerViewDidSelectComposition: NSNotification.Name

Posted when the user selects a composition in the picker view.