| 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 object 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
Adds the contents of the clipboard to the movie at the current movie time.
- (IBAction)add:(id)sender
This action is undoable. If the movie is not editable, this method raises an exception.
QTMovieView.hAdds the contents of the clipboard to the movie, scaled to fit into the current movie selection.
- (IBAction)addScaled:(id)sender
This action is undoable. If the movie is not editable, this method raises an exception.
QTMovieView.hReturns the current visibility state of the specified controller bar button.
- (BOOL)areStepButtonsVisible
QTMovieView.hReturns 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.hReturns the height of the controller bar.
- (float)controllerBarHeight
QTMovieView.hCopies the current movie selection onto the clipboard.
- (IBAction)copy:(id)sender
If there is no selection, the current frame is copied. The movie does not need to be editable.
QTMovieView.hDeletes the current movie selection from the movie, placing it on the clipboard.
- (IBAction)cut:(id)sender
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.hReturns the receiver’s delegate.
- (id)delegate
QTMovieView.hDeletes the current movie selection from the movie, placing it on the clipboard.
- (IBAction)delete:(id)sender
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.hReturns the fill color of the QTMovieView.
- (NSColor *)fillColor
The fill color of the QTMovieView object.
QTMovieView.hSets the current movie time to the beginning of the movie.
- (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.hSets the current movie time to the end of the movie.
- (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.hSets the current movie time to the next selection point.
- (IBAction)gotoNextSelectionPoint:(id)sender
This action method sets the current movie time to the next selection point.
QTMovieView.hSets the current movie time to the movie poster frame.
- (IBAction)gotoPosterFrame:(id)sender
QTMovieView.hSets the current movie time to the previous selection point.
- (IBAction)gotoPreviousSelectionPoint:(id)sender
QTMovieView.hInitializes a newly allocated QTMovieView with frame as its frame rectangle.
- (id)initWithFrame:(NSRect)frame
The NSRect object with which to initialize the QTMovieView with 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.hReturns the current visibility state of the specified controller bar button.
- (BOOL)isBackButtonVisible
QTMovieView.hReturns an indication of whether the QTMovieView has been requested to display a built-in movie controller user interface.
- (BOOL)isControllerVisible
Using the setControllerVisible: method, the client tells QTMovieView whether or not to display a user interface for controlling the movie within its bounds. Using the isControllerVisible method, the client can determine whether a QTMovieView has been configured to display such an interface. By using the controllerBarHeight method, you can determine the height of the portion of the QTMovieView that is required to display that interface. Note that some types of QuickTime content are authored to display their own user interface; for those types of content it is possible for the controllerBarHeight method to return 0 even when the isControllerVisible method is YES.
QTMovieView.hReturns the current visibility state of the specified controller bar button.
- (BOOL)isCustomButtonVisible
QTMovieView.hReturns YES if the QTMovieView object is editable.
- (BOOL)isEditable
The editable state being returned by the QTMovieView object.
When editable, a movie can be modified using editing methods and associated key commands. The default is NO.
QTMovieView.hReturns the current visibility state of the specified controller bar button.
- (BOOL)isHotSpotButtonVisible
QTMovieView.hReturns the current visibility state of the specified controller bar button.
- (BOOL)isTranslateButtonVisible
QTMovieView.hReturns the current visibility state of the specified controller bar button.
- (BOOL)isVolumeButtonVisible
QTMovieView.hReturns an NSMenu object that is the contextual menu for the specified event.
- (NSMenu *)menuForEventDelegate:(NSEvent *)event
An NSEvent object that specifies an event.
This delegate method can be used instead of subclassing QTMovieView in cases where an application cannot hard-link against the QTKit framework.
Returns the QTMovie object associated with the QTMovieView.
- (QTMovie *)movie
The QuickTime movie to be returned with the QTMovieView object.
QTMovieView.hReturns the rectangle currently occupied by the movie in a QTMovieView.
- (NSRect)movieBounds
The NSRect rectangle returned by the movie in a QTMovieView object.
This rectangle does not include the area occupied by the movie controller bar (if it’s visible).
QTMovieView.hReturns the rectangle currently occupied by the movie controller bar (if it’s visible) in a QTMovieView.
- (NSRect)movieControllerBounds
QTMovieView.hInserts the contents of the clipboard (if it contains a movie clip) into the movie at the current play position.
- (IBAction)paste:(id)sender
This action is undoable. If the movie is not editable, this method raises an exception.
QTMovieView.hPauses the movie playing.
- (IBAction)pause:(id)sender
This action method pauses the movie playback. This method does nothing if the movie is already paused.
QTMovieView.hStarts the movie playing at its current location.
- (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.hReturns YES if the QTMovieView object maintains the aspect ratio of the movie when drawing it in the view.
- (BOOL)preservesAspectRatio
The state of the aspect ratio returned by the QTMovieView object.
The remainder is filled with fillColor.
QTMovieView.hReplaces the current movie selection with the contents of the clipboard.
- (IBAction)replace:(id)sender
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.hSelects the entire movie.
- (IBAction)selectAll:(id)sender
QTMovieView.hSelects nothing.
- (IBAction)selectNone:(id)sender
Note that this method does not change the movie time.
QTMovieView.hSets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setBackButtonVisible:(BOOL)state
QTMovieView.hSets the visibility state of the movie controller bar in a QTMovieView to controllerVisible.
- (void)setControllerVisible:(BOOL)controllerVisible
The state of controller visibility set in a QTMovieView object.
QTMovieView.hSets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setCustomButtonVisible:(BOOL)state
QTMovieView.hSets the receiver’s delegate.
- (void)setDelegate:(id)delegate
QTMovieView.hSets the edit state of a QTMovieView to editable.
- (void)setEditable:(BOOL)editable
The editable state of the QTMovieView object.
The default state is NO.
QTMovieView.hSets the fill color of a QTMovieView to fillColor.
- (void)setFillColor:(NSColor *)fillColor
Note that this may cause a redraw.
QTMovieView.hSets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setHotSpotButtonVisible:(BOOL)state
QTMovieView.hSets the QTMovie object in a QTMovieView to movie.
- (void)setMovie:(QTMovie *)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.hSets the aspect ratio state of a QTMovieView to preservesAspectRatio.
- (void)setPreservesAspectRatio:(BOOL)preservesAspectRatio
The aspect ratio of the movie rectangle.
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.hShows or hides the movie controller grow box.
- (void)setShowsResizeIndicator:(BOOL)show
QTMovieView.hSets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setStepButtonsVisible:(BOOL)state
QTMovieView.hSets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setTranslateButtonVisible:(BOOL)state
QTMovieView.hSets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setVolumeButtonVisible:(BOOL)state
QTMovieView.hSets the specified controller bar button to be visible or invisible, according to the state parameter.
- (void)setZoomButtonsVisible:(BOOL)state
QTMovieView.hSteps the movie backward one frame.
- (IBAction)stepBackward:(id)sender
QTMovieView.hSteps the movie forward one frame.
- (IBAction)stepForward:(id)sender
QTMovieView.hTrims the movie to the current movie selection.
- (IBAction)trim:(id)sender
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.hConstants for different movie view bindings.
NSString * const QTMovieViewMovieBinding; NSString * const QTMovieViewControllerVisibleBinding; NSString * const QTMovieViewPreservesAspectRatioBinding; NSString * const QTMovieViewFillColorBinding;
QTMovieViewMovieBindingA QTMovieView binding that determines the receiver's movie. Value is a QTMovie.
Available in Mac OS X v10.4 and later.
Declared in QTMovieView.h.
QTMovieViewControllerVisibleBindingA QTMovieView binding that determines whether or not the controls are visible. Value is a boolean.
Available in Mac OS X v10.4 and later.
Declared in QTMovieView.h.
QTMovieViewPreservesAspectRatioBindingA QTMovieView binding that determines whether or not the receiver preserves the natural aspect ratio of the movie. Value is a boolean.
Available in Mac OS X v10.4 and later.
Declared in QTMovieView.h.
QTMovieViewFillColorBindingA QTMovieView binding that determines the fill color. Value is an NSColor.
Available in Mac OS X v10.4 and later.
Declared in QTMovieView.h.
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-05-20)