Next Page > Hide TOC

QCCompositionPickerView Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/Quartz.framework/Frameworks/QuartzComposer.framework
Availability
Available in Mac OS X v10.5 and later.
Companion guide
Declared in
QCCompositionPickerView.h

Overview

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:.

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.

Tasks

Setting and Getting the Background Color

Managing Background Drawing

Setting Composition Input Parameters

Managing Animation

Controlling Display of Composition Names

Setting and Retrieving the View Delegate

Managing the Composition Picker View

Working with Columns and Rows

Instance Methods

allowsEmptySelection

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

- (BOOL) allowsEmptySelection

Return Value

YES if an empty selection is allowed NO otherwise.

Availability
See Also
Declared In
QCCompositionPickerView.h

backgroundColor

Returns the background color of the composition picker view.

- (NSColor*) backgroundColor;

Return Value

The background color.

Availability
See Also
Declared In
QCCompositionPickerView.h

compositionAspectRatio

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

- (NSSize) compositionAspectRatio

Return Value

The aspect ratio.

Availability
See Also
Declared In
QCCompositionPickerView.h

compositions

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

- (NSArray*) compositions

Return Value

An array of QCComposition objects.

Availability
See Also
Declared In
QCCompositionPickerView.h

delegate

Retrieves the composition picker view delegate.

- (id) delegate

Return Value

The delegate.

Availability
See Also
Declared In
QCCompositionPickerView.h

drawsBackground

Returns whether the composition picker view draws its background.

- (BOOL) drawsBackground;

Return Value

YES if the composition picker view draws its background; otherwise NO.

Availability
See Also
Declared In
QCCompositionPickerView.h

isAnimating

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

- (BOOL) isAnimating

Return Value

YES if a composition is animating in the composition picker view; NO otherwise.

Availability
See Also
Declared In
QCCompositionPickerView.h

maxAnimationFrameRate

Retrieves the maximum frame rate for animating compositions.

- (float) maxAnimationFrameRate

Return Value

The maximum frame rate.

Availability
See Also
Declared In
QCCompositionPickerView.h

numberOfColumns

Retrieves the number of columns in the composition picker view.

- (NSUInteger) numberOfColumns;

Return Value

The number of columns.

Availability
See Also
Declared In
QCCompositionPickerView.h

numberOfRows

Retrieves the number of rows in the composition picker view.

- (NSUInteger) numberOfRows;

Return Value

The number of columns.

Availability
See Also
Declared In
QCCompositionPickerView.h

resetDefaultInputValues

Clears all previously set default values for composition input parameters.

- (void) resetDefaultInputValues

Discussion

This method resets the defaults that were set with the method setDefaultValue:forInputKey:.

Availability
Declared In
QCCompositionPickerView.h

selectedComposition

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

- (QCComposition*) selectedComposition

Return Value

A QCComposition object, or nil if a composition is not selected.

Availability
See Also
Declared In
QCCompositionPickerView.h

setAllowsEmptySelection:

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

- (void) setAllowsEmptySelection:(BOOL)flag

Parameters
flag

YES to allow an empty selection. The default value is NO.

Availability
See Also
Declared In
QCCompositionPickerView.h

setBackgroundColor:

Sets the background color for the composition picker view.

- (void) setBackgroundColor:(NSColor*)aColor;

Parameters
aColor

The color for the background.

Availability
See Also
Declared In
QCCompositionPickerView.h

setCompositionAspectRatio:

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

- (void) setCompositionAspectRatio:(NSSize)ratio

Parameters
ratio

An aspect ratio.

Availability
See Also
Declared In
QCCompositionPickerView.h

setCompositionsFromRepositoryWithProtocol:andAttributes:

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

- (void) setCompositionsFromRepositoryWithProtocol:(NSString*)protocol andAttributes:(NSDictionary*)attributes

Parameters
protocol

The protocols that you want compositions shown in the picker view to conform to. You can pass any of these protocols: QCCompositionProtocolAnimation, QCCompositionProtocolImageProducer, QCCompositionProtocolImageFilter, QCCompositionProtocolImageCompositor, QCCompositionProtocolImageTransition, and QCCompositionProtocolScreenSaverRSS.

attributes

A dictionary that contains the attributes, and their associated values, that you want compositions in the picker view to match. For example, you can pass: QCCompositionAttributeNameKey, QCCompositionAttributeDescriptionKey, QCCompositionAttributeCopyrightKey, QCCompositionAttributeBuiltInKey, and QCCompositionAttributeTimeDependentKey. Pass nil if you don’t want to filter based on the attributes.

Availability
See Also
Declared In
QCCompositionPickerView.h

setDefaultValue:forInputKey:

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

- (void) setDefaultValue:(id)value forInputKey:(NSString*)key

Parameters
value

This default value overrides any initial value existing for composition input parameters with this key. Pass nil to clear the default value.

key

The input parameter key whose default value you want to set.

Availability
See Also
Declared In
QCCompositionPickerView.h

setDelegate:

Sets the composition picker view delegate.

- (void) setDelegate:(id)delegate

Parameters
delegate

The delegate to set.

Availability
See Also
Declared In
QCCompositionPickerView.h

setDrawsBackground:

Sets whether the composition picker view draws its background.

- (void) setDrawsBackground:(BOOL)flag;

Parameters
flag

The background drawing state. Pass YES if the composition picker view draws its background.

Availability
See Also
Declared In
QCCompositionPickerView.h

setMaxAnimationFrameRate:

Sets the maximum frame rate for animating compositions.

- (void) setMaxAnimationFrameRate:(float)maxFPS

Parameters
maxFPS

A frame rate in frames per second. Pass 0.0 to specify no limit to the maximum value.

Availability
See Also
Declared In
QCCompositionPickerView.h

setNumberOfColumns:

Sets the number of columns in the composition picker view.

- (void) setNumberOfColumns:(NSUInteger)columns;

Parameters
columns

The number of columns.

Availability
See Also
Declared In
QCCompositionPickerView.h

setNumberOfRows:

Sets the number of rows in the composition picker view.

- (void) setNumberOfRows:(NSUInteger)rows;

Parameters
columns

The number of rows.

Availability
See Also
Declared In
QCCompositionPickerView.h

setSelectedComposition:

Sets a composition as selected in the composition picker view.

- (void) setSelectedComposition:(QCComposition*)composition

Parameters
composition

The composition to select. Pass nil if you don’t want to select a composition. The behavior is undefined if you pass a composition that is not in the list of compositions that are currently in the composition picker view.

Availability
See Also
Declared In
QCCompositionPickerView.h

setShowsCompositionNames:

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

- (void) setShowsCompositionNames:(BOOL)flag

Parameters
flag

YES specifies to show compositions name. The default value is NO.

Availability
Declared In
QCCompositionPickerView.h

showsCompositionNames

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

- (BOOL) showsCompositionNames

Return Value

YES if the display of names is enabled; otherwise NO.

Availability
Declared In
QCCompositionPickerView.h

startAnimation:

Starts animating the composition in the composition picker view.

- (void) startAnimation:(id)sender

Parameters
sender

The object initiating the animation.

Availability
See Also
Declared In
QCCompositionPickerView.h

stopAnimation:

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

- (void) stopAnimation:(id)sender

Parameters
sender

The object stopping the animation.

Availability
See Also
Declared In
QCCompositionPickerView.h

Notifications

QCCompositionPickerViewDidSelectCompositionNotification

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

Availability
Declared In
QCCompositionPickerView.h

Next Page > Hide TOC


© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-05-09)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.