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 |
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.
- validateMenuItem:
- validateUserInterfaceItem
– movie
– isControllerVisible
– isEditable
– preservesAspectRatio
– fillColor
– movieBounds
– movieControllerBounds
– controllerBarHeight
– setMovie:
– setControllerVisible:
– setPreservesAspectRatio:
– setShowsResizeIndicator:
– setFillColor:
– setEditable:
– selectNone:
– play:
– pause:
– gotoBeginning:
– gotoEnd:
– gotoNextSelectionPoint:
– gotoPreviousSelectionPoint:
– gotoPosterFrame:
– stepForward:
– stepBackward:
– setBackButtonVisible:
– setCustomButtonVisible:
– setHotSpotButtonVisible:
– setStepButtonsVisible:
– setTranslateButtonVisible:
– setVolumeButtonVisible:
– setZoomButtonsVisible:
– isBackButtonVisible
– isCustomButtonVisible
– isHotSpotButtonVisible
– areStepButtonsVisible
– isTranslateButtonVisible
– isVolumeButtonVisible
– areZoomButtonsVisible
- (IBAction)add:(id)sender
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.
QTMovieView.h
- (IBAction)addScaled:(id)sender
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.
QTMovieView.h
Returns the current visibility state of the specified controller bar button.
- (BOOL)areStepButtonsVisible
QTMovieView.h
Returns the current visibility state of the specified controller bar button.
- (BOOL)areZoomButtonsVisible
These methods allow applications to hide and show specific buttons in the movie controller bar.
QTMovieView.h
- (float)controllerBarHeight
Returns the height of the controller bar.
QTMovieView.h
- (IBAction)copy:(id)sender
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.
QTMovieView.h
- (IBAction)cut:(id)sender
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.
QTMovieView.h
- (IBAction)delete:(id)sender
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.
QTMovieView.h
- (NSColor *)fillColor
Returns the fill color of the QTMovieView.
QTMovieView.h
- (IBAction)gotoBeginning:(id)sender
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.
QTMovieView.h
- (IBAction)gotoEnd:(id)sender
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.
QTMovieView.h
- (IBAction)gotoNextSelectionPoint:(id)sender
This action method sets the current movie time to the next selection point.
QTMovieView.h
- (IBAction)gotoPosterFrame:(id)sender
This action method sets the current movie time to the movie poster frame.
QTMovieView.h
- (IBAction)gotoPreviousSelectionPoint:(id)sender
This action method sets the current movie time to the previous selection point.
QTMovieView.h
- (id)initWithFrame:(NSRect)frame
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.
QTMovieView.h
Returns the current visibility state of the specified controller bar button.
- (BOOL)isBackButtonVisible
QTMovieView.h
- (BOOL)isControllerVisible
Returns YES
if the movie controller bar of the QTMovieView object is visible. The default is YES
.
QTMovieView.h
Returns the current visibility state of the specified controller bar button.
- (BOOL)isCustomButtonVisible
QTMovieView.h
- (BOOL)isEditable
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
.
QTMovieView.h
Returns the current visibility state of the specified controller bar button.
- (BOOL)isHotSpotButtonVisible
QTMovieView.h
Returns the current visibility state of the specified controller bar button.
- (BOOL)isTranslateButtonVisible
QTMovieView.h
Returns the current visibility state of the specified controller bar button.
- (BOOL)isVolumeButtonVisible
QTMovieView.h
- (QTMovie *)movie
Returns the QTMovie object associated with the QTMovieView.
QTMovieView.h
- (NSRect)movieBounds
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).
QTMovieView.h
- (NSRect)movieControllerBounds
Returns the rectangle currently occupied by the movie controller bar (if it’s visible) in a QTMovieView.
QTMovieView.h
- (IBAction)paste:(id)sender
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.
QTMovieView.h
- (IBAction)pause:(id)sender
This action method pauses the movie playback. This method does nothing if the movie is already paused.
QTMovieView.h
- (IBAction)play:(id)sender
This action method starts the movie playing at its current location. This method does nothing if the movie is already playing.
QTMovieView.h
- (BOOL)preservesAspectRatio
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
.
QTMovieView.h
- (IBAction)replace:(id)sender
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.
QTMovieView.h
- (IBAction)selectAll:(id)sender
This action method selects the entire movie.
QTMovieView.h
- (IBAction)selectNone:(id)sender
This action method selects nothing. Note that it does not change the movie time.
QTMovieView.h
Sets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setBackButtonVisible:(BOOL)state
QTMovieView.h
- (void)setControllerVisible:(BOOL)controllerVisible
Sets the visibility state of the movie controller bar in a QTMovieView to controllerVisible.
QTMovieView.h
Sets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setCustomButtonVisible:(BOOL)state
QTMovieView.h
- (void)setEditable:(BOOL)editable
Sets the edit state of a QTMovieView to editable. The default state is NO
.
QTMovieView.h
- (void)setFillColor:(NSColor *)fillColor
Sets the fill color of a QTMovieView to fillColor. Note that this may cause a redraw.
QTMovieView.h
Sets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setHotSpotButtonVisible:(BOOL)state
QTMovieView.h
- (void)setMovie:(QTMovie *)movie
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
.
QTMovieView.h
- (void)setPreservesAspectRatio:(BOOL)preservesAspectRatio
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.
QTMovieView.h
- (void)setShowsResizeIndicator:(BOOL)show
Shows or hides the movie controller grow box.
QTMovieView.h
Sets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setStepButtonsVisible:(BOOL)state
QTMovieView.h
Sets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setTranslateButtonVisible:(BOOL)state
QTMovieView.h
Sets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setVolumeButtonVisible:(BOOL)state
QTMovieView.h
Sets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setZoomButtonsVisible:(BOOL)state
QTMovieView.h
- (IBAction)stepBackward:(id)sender
This action method steps the movie backward one frame.
QTMovieView.h
- (IBAction)stepForward:(id)sender
This action method steps the movie forward one frame.
QTMovieView.h
- (IBAction)trim:(id)sender
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.
QTMovieView.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-05-01)