Next Page > Hide TOC

QTMovieView Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/QTKit.framework
Availability
Available in Mac OS X v10.4 and later.
Declared in
QTMovieView.h
Related sample code

Overview

A QTMovieView is a subclass of NSView that can be used to display and control QuickTime movies. You normally use a QTMovieView in combination with a QTMovie object, which supplies the movie being displayed. A QTMovieView also supports editing operations on the movie.

The movie can be placed within an arbitrary bounding rectangle in the view’s coordinate system, and the remainder of the view can be filled with a fill color. The movie controller, if it is visible, can also be placed within an arbitrary bounding rectangle in the view’s coordinate system.

Adopted Protocols

NSMenuValidations
NSUserInterfaceValidations

Tasks

Initializing the View

Getting View Characteristics

Setting View Characteristics

Controlling Movie Playback

Editing a Movie

Showing and Hiding Buttons in the Movie Controller Bar

Instance Methods

add:

- (IBAction)add:(id)sender

Discussion

This action method adds the contents of the clipboard to the movie at the current movie time. This action is undoable. If the movie is not editable, this method raises an exception.

Availability
Declared In
QTMovieView.h

addScaled:

- (IBAction)addScaled:(id)sender

Discussion

This action method adds the contents of the clipboard to the movie, scaled to fit into the current movie selection. This action is undoable. If the movie is not editable, this method raises an exception.

Availability
Declared In
QTMovieView.h

areStepButtonsVisible

Returns the current visibility state of the specified controller bar button.

- (BOOL)areStepButtonsVisible

Availability
Declared In
QTMovieView.h

areZoomButtonsVisible

Returns the current visibility state of the specified controller bar button.

- (BOOL)areZoomButtonsVisible

Discussion

These methods allow applications to hide and show specific buttons in the movie controller bar.

Availability
Declared In
QTMovieView.h

controllerBarHeight

- (float)controllerBarHeight

Discussion

Returns the height of the controller bar.

Availability
Declared In
QTMovieView.h

copy:

- (IBAction)copy:(id)sender

Discussion

This action method copies the current movie selection onto the clipboard. If there is no selection, the current frame is copied. The movie does not need to be editable.

Availability
Declared In
QTMovieView.h

cut:

- (IBAction)cut:(id)sender

Discussion

This action method deletes the current movie selection from the movie, placing it on the clipboard. If there is no selection, the current frame is deleted. This action is undoable. If the movie is not editable, this method raises an exception.

Availability
Declared In
QTMovieView.h

delete:

- (IBAction)delete:(id)sender

Discussion

This action method deletes the current movie selection from the movie, placing it on the clipboard. If there is no selection, the current frame is deleted. This action is undoable. If the movie is not editable, this method raises an exception.

Availability
Declared In
QTMovieView.h

fillColor

- (NSColor *)fillColor

Discussion

Returns the fill color of the QTMovieView.

Availability
Declared In
QTMovieView.h

gotoBeginning:

- (IBAction)gotoBeginning:(id)sender

Discussion

This action method sets the current movie time to the beginning of the movie. If the movie is playing, the movie continues playing from the new position.

Availability
Declared In
QTMovieView.h

gotoEnd:

- (IBAction)gotoEnd:(id)sender

Discussion

This action method sets the current movie time to the end of the movie. If the movie is playing in one of the looping modes, the movie continues playing accordingly; otherwise, play stops.

Availability
Declared In
QTMovieView.h

gotoNextSelectionPoint:

- (IBAction)gotoNextSelectionPoint:(id)sender

Discussion

This action method sets the current movie time to the next selection point.

Availability
Declared In
QTMovieView.h

gotoPosterFrame:

- (IBAction)gotoPosterFrame:(id)sender

Discussion

This action method sets the current movie time to the movie poster frame.

Availability
Declared In
QTMovieView.h

gotoPreviousSelectionPoint:

- (IBAction)gotoPreviousSelectionPoint:(id)sender

Discussion

This action method sets the current movie time to the previous selection point.

Availability
Declared In
QTMovieView.h

initWithFrame:

- (id)initWithFrame:(NSRect)frame

Discussion

Initializes a newly allocated QTMovieView with frame as its frame rectangle. The new movie view object must be inserted into the view hierarchy of an NSWindow before it can be used. This method is the designated initializer for the QTMovieView class.

Availability
Declared In
QTMovieView.h

isBackButtonVisible

Returns the current visibility state of the specified controller bar button.

- (BOOL)isBackButtonVisible

Availability
Declared In
QTMovieView.h

isControllerVisible

- (BOOL)isControllerVisible

Discussion

Returns YES if the movie controller bar of the QTMovieView object is visible. The default is YES.

Availability
Declared In
QTMovieView.h

isCustomButtonVisible

Returns the current visibility state of the specified controller bar button.

- (BOOL)isCustomButtonVisible

Availability
Declared In
QTMovieView.h

isEditable

- (BOOL)isEditable

Discussion

Returns YES if the QTMovieView object is editable. When editable, a movie can be modified using editing methods and associated key commands. The default is NO.

Availability
Declared In
QTMovieView.h

isHotSpotButtonVisible

Returns the current visibility state of the specified controller bar button.

- (BOOL)isHotSpotButtonVisible

Availability
Declared In
QTMovieView.h

isTranslateButtonVisible

Returns the current visibility state of the specified controller bar button.

- (BOOL)isTranslateButtonVisible

Availability
Declared In
QTMovieView.h

isVolumeButtonVisible

Returns the current visibility state of the specified controller bar button.

- (BOOL)isVolumeButtonVisible

Availability
Declared In
QTMovieView.h

movie

- (QTMovie *)movie

Discussion

Returns the QTMovie object associated with the QTMovieView.

Availability
Related Sample Code
Declared In
QTMovieView.h

movieBounds

- (NSRect)movieBounds

Discussion

Returns the rectangle currently occupied by the movie in a QTMovieView. This rectangle does not include the area occupied by the movie controller bar (if it’s visible).

Availability
Declared In
QTMovieView.h

movieControllerBounds

- (NSRect)movieControllerBounds

Discussion

Returns the rectangle currently occupied by the movie controller bar (if it’s visible) in a QTMovieView.

Availability
Declared In
QTMovieView.h

paste:

- (IBAction)paste:(id)sender

Discussion

This action method inserts the contents of the clipboard (if it contains a movie clip) into the movie at the current play position. This action is undoable. If the movie is not editable, this method raises an exception.

Availability
Declared In
QTMovieView.h

pause:

- (IBAction)pause:(id)sender

Discussion

This action method pauses the movie playback. This method does nothing if the movie is already paused.

Availability
Related Sample Code
Declared In
QTMovieView.h

play:

- (IBAction)play:(id)sender

Discussion

This action method starts the movie playing at its current location. This method does nothing if the movie is already playing.

Availability
Related Sample Code
Declared In
QTMovieView.h

preservesAspectRatio

- (BOOL)preservesAspectRatio

Discussion

Returns YES if the QTMovieView object maintains the aspect ratio of the movie when drawing it in the view. The remainder is filled with fillColor.

Availability
Declared In
QTMovieView.h

replace:

- (IBAction)replace:(id)sender

Discussion

This action method replaces the current movie selection with the contents of the clipboard. If there is no selection, the contents of the clipboard replace the entire movie. This action is undoable. If the movie is not editable, this method raises an exception.

Availability
Declared In
QTMovieView.h

selectAll:

- (IBAction)selectAll:(id)sender

Discussion

This action method selects the entire movie.

Availability
Declared In
QTMovieView.h

selectNone:

- (IBAction)selectNone:(id)sender

Discussion

This action method selects nothing. Note that it does not change the movie time.

Availability
Declared In
QTMovieView.h

setBackButtonVisible:

Sets the specified controller bar button to be visible or invisible, according to the state parameter.

- (void)setBackButtonVisible:(BOOL)state

Availability
Declared In
QTMovieView.h

setControllerVisible:

- (void)setControllerVisible:(BOOL)controllerVisible

Discussion

Sets the visibility state of the movie controller bar in a QTMovieView to controllerVisible.

Availability
Declared In
QTMovieView.h

setCustomButtonVisible:

Sets the specified controller bar button to be visible or invisible, according to the state parameter.

- (void)setCustomButtonVisible:(BOOL)state

Availability
Declared In
QTMovieView.h

setEditable:

- (void)setEditable:(BOOL)editable

Discussion

Sets the edit state of a QTMovieView to editable. The default state is NO.

Availability
Declared In
QTMovieView.h

setFillColor:

- (void)setFillColor:(NSColor *)fillColor

Discussion

Sets the fill color of a QTMovieView to fillColor. Note that this may cause a redraw.

Availability
Declared In
QTMovieView.h

setHotSpotButtonVisible:

Sets the specified controller bar button to be visible or invisible, according to the state parameter.

- (void)setHotSpotButtonVisible:(BOOL)state

Availability
Declared In
QTMovieView.h

setMovie:

- (void)setMovie:(QTMovie *)movie

Discussion

Sets the QTMovie object in a QTMovieView to movie. The currently set QuickTime movie is disposed of using DisposeMovie, unless the QTMovie was created with a call to initWithQuickTimeMovie and the disposeWhenDone flag was NO.

Availability
Declared In
QTMovieView.h

setPreservesAspectRatio:

- (void)setPreservesAspectRatio:(BOOL)preservesAspectRatio

Discussion

Sets the aspect ratio state of a QTMovieView to preservesAspectRatio. If preservesAspectRatio is YES, the longer side of the movie rectangle is scaled to exactly fit into the view’s frame and the other side is centered in the view frame; the remaining area is filled with the view’s fill color. Note that the movie view may be redrawn, but not resized.

Availability
Declared In
QTMovieView.h

setShowsResizeIndicator:

- (void)setShowsResizeIndicator:(BOOL)show

Discussion

Shows or hides the movie controller grow box.

Availability
Declared In
QTMovieView.h

setStepButtonsVisible:

Sets the specified controller bar button to be visible or invisible, according to the state parameter.

- (void)setStepButtonsVisible:(BOOL)state

Availability
Declared In
QTMovieView.h

setTranslateButtonVisible:

Sets the specified controller bar button to be visible or invisible, according to the state parameter.

- (void)setTranslateButtonVisible:(BOOL)state

Availability
Declared In
QTMovieView.h

setVolumeButtonVisible:

Sets the specified controller bar button to be visible or invisible, according to the state parameter.

- (void)setVolumeButtonVisible:(BOOL)state

Availability
Declared In
QTMovieView.h

setZoomButtonsVisible:

Sets the specified controller bar button to be visible or invisible, according to the state parameter.

- (void)setZoomButtonsVisible:(BOOL)state

Availability
Declared In
QTMovieView.h

stepBackward:

- (IBAction)stepBackward:(id)sender

Discussion

This action method steps the movie backward one frame.

Availability
Declared In
QTMovieView.h

stepForward:

- (IBAction)stepForward:(id)sender

Discussion

This action method steps the movie forward one frame.

Availability
Declared In
QTMovieView.h

trim:

- (IBAction)trim:(id)sender

Discussion

This action method trims the movie to the current movie selection. If there is no selection, the current frame is retained and the remainder of the movie is deleted. This action is undoable. If the movie is not editable, this method raises an exception.

Availability
Declared In
QTMovieView.h

Next Page > Hide TOC


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


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.