Mac Developer Library

Developer

QTKit Framework Reference QTMovieView Class Reference

Options
Deployment Target:

On This Page
Language:

QTMovieView

Inheritance


Import Statement


Swift

import QTKit

Objective-C

@import QTKit;

Availability


Available in OS X v10.4 and later.

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.

  • initWithFrame: - initWithFrame: Available in OS X v10.3 through OS X v10.5

    Initializes a newly allocated QTMovieView with frame as its frame rectangle.

    Declaration

    Objective-C

    - (id)initWithFrame:(NSRect)frame

    Parameters

    frame

    The NSRect object with which to initialize the QTMovieView with its frame rectangle.

    Discussion

    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.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 through OS X v10.5.

  • movie - movie (OS X v10.9)

    Returns the QTMovie object associated with the QTMovieView.

    Declaration

    Objective-C

    - (QTMovie *)movie

    Parameters

    movie

    The QuickTime movie to be returned with the QTMovieView object.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Returns an indication of whether the QTMovieView has been requested to display a built-in movie controller user interface.

    Declaration

    Objective-C

    - (BOOL)isControllerVisible

    Discussion

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • isEditable - isEditable (OS X v10.9)

    Returns YEStrue if the QTMovieView object is editable.

    Declaration

    Objective-C

    - (BOOL)isEditable

    Parameters

    isEditable

    The editable state being returned by the QTMovieView object.

    Discussion

    When editable, a movie can be modified using editing methods and associated key commands. The default is NOfalse.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Returns YEStrue if the QTMovieView object maintains the aspect ratio of the movie when drawing it in the view.

    Declaration

    Objective-C

    - (BOOL)preservesAspectRatio

    Parameters

    preservesAspectRatio

    The state of the aspect ratio returned by the QTMovieView object.

    Discussion

    The remainder is filled with fillColor.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • fillColor - fillColor (OS X v10.9)

    Returns the fill color of the QTMovieView.

    Declaration

    Objective-C

    - (NSColor *)fillColor

    Parameters

    fillColor

    The fill color of the QTMovieView object.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • movieBounds - movieBounds (OS X v10.9)

    Returns the rectangle currently occupied by the movie in a QTMovieView.

    Declaration

    Objective-C

    - (NSRect)movieBounds

    Parameters

    movieBounds

    The NSRect rectangle returned by the movie in a QTMovieView object.

    Discussion

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (NSRect)movieControllerBounds

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Returns the height of the controller bar.

    Declaration

    Objective-C

    - (float)controllerBarHeight

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • setMovie: - setMovie: (OS X v10.9)

    Sets the QTMovie object in a QTMovieView to movie.

    Declaration

    Objective-C

    - (void)setMovie:(QTMovie *)movie

    Discussion

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setControllerVisible:(BOOL)controllerVisible

    Parameters

    controllerVisible

    The state of controller visibility set in a QTMovieView object.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Sets the aspect ratio state of a QTMovieView to preservesAspectRatio.

    Declaration

    Objective-C

    - (void)setPreservesAspectRatio:(BOOL)preservesAspectRatio

    Parameters

    preservesAspectRatio

    The aspect ratio of the movie rectangle.

    Discussion

    If preservesAspectRatio is YEStrue, 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.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Shows or hides the movie controller grow box.

    Declaration

    Objective-C

    - (void)setShowsResizeIndicator:(BOOL)show

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Sets the fill color of a QTMovieView to fillColor.

    Declaration

    Objective-C

    - (void)setFillColor:(NSColor *)fillColor

    Discussion

    Note that this may cause a redraw.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Sets the edit state of a QTMovieView to editable.

    Declaration

    Objective-C

    - (void)setEditable:(BOOL)editable

    Parameters

    editable

    The editable state of the QTMovieView object.

    Discussion

    The default state is NOfalse.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • selectNone: - selectNone: (OS X v10.9)

    Selects nothing.

    Declaration

    Objective-C

    - (IBAction)selectNone:(id)sender

    Discussion

    Note that this method does not change the movie time.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • play: - play: (OS X v10.9)

    Starts the movie playing at its current location.

    Declaration

    Objective-C

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • pause: - pause: (OS X v10.9)

    Pauses the movie playing.

    Declaration

    Objective-C

    - (IBAction)pause:(id)sender

    Discussion

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Sets the current movie time to the beginning of the movie.

    Declaration

    Objective-C

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • gotoEnd: - gotoEnd: (OS X v10.9)

    Sets the current movie time to the end of the movie.

    Declaration

    Objective-C

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Sets the current movie time to the next selection point.

    Declaration

    Objective-C

    - (IBAction)gotoNextSelectionPoint:(id)sender

    Discussion

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Sets the current movie time to the previous selection point.

    Declaration

    Objective-C

    - (IBAction)gotoPreviousSelectionPoint:(id)sender

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Sets the current movie time to the movie poster frame.

    Declaration

    Objective-C

    - (IBAction)gotoPosterFrame:(id)sender

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Steps the movie forward one frame.

    Declaration

    Objective-C

    - (IBAction)stepForward:(id)sender

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • Steps the movie backward one frame.

    Declaration

    Objective-C

    - (IBAction)stepBackward:(id)sender

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • cut: - cut: (OS X v10.9)

    Deletes the current movie selection from the movie, placing it on the clipboard.

    Declaration

    Objective-C

    - (IBAction)cut:(id)sender

    Discussion

    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.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • copy: - copy: (OS X v10.9)

    Copies the current movie selection onto the clipboard.

    Declaration

    Objective-C

    - (IBAction)copy:(id)sender

    Discussion

    If there is no selection, the current frame is copied. The movie does not need to be editable.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • paste: - paste: (OS X v10.9)

    Inserts the contents of the clipboard (if it contains a movie clip) into the movie at the current play position.

    Declaration

    Objective-C

    - (IBAction)paste:(id)sender

    Discussion

    This action is undoable. If the movie is not editable, this method raises an exception.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • selectAll: - selectAll: (OS X v10.9)

    Selects the entire movie.

    Declaration

    Objective-C

    - (IBAction)selectAll:(id)sender

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • delete: - delete: (OS X v10.9)

    Deletes the current movie selection from the movie, placing it on the clipboard.

    Declaration

    Objective-C

    - (IBAction)delete:(id)sender

    Discussion

    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.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • add: - add: (OS X v10.9)

    Adds the contents of the clipboard to the movie at the current movie time.

    Declaration

    Objective-C

    - (IBAction)add:(id)sender

    Discussion

    This action is undoable. If the movie is not editable, this method raises an exception.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • addScaled: - addScaled: (OS X v10.9)

    Adds the contents of the clipboard to the movie, scaled to fit into the current movie selection.

    Declaration

    Objective-C

    - (IBAction)addScaled:(id)sender

    Discussion

    This action is undoable. If the movie is not editable, this method raises an exception.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • replace: - replace: (OS X v10.9)

    Replaces the current movie selection with the contents of the clipboard.

    Declaration

    Objective-C

    - (IBAction)replace:(id)sender

    Discussion

    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.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

  • trim: - trim: (OS X v10.9)

    Trims the movie to the current movie selection.

    Declaration

    Objective-C

    - (IBAction)trim:(id)sender

    Discussion

    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.

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setBackButtonVisible:(BOOL)state

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setCustomButtonVisible:(BOOL)state

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setHotSpotButtonVisible:(BOOL)state

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setStepButtonsVisible:(BOOL)state

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setTranslateButtonVisible:(BOOL)state

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setVolumeButtonVisible:(BOOL)state

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (void)setZoomButtonsVisible:(BOOL)state

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (BOOL)isBackButtonVisible

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (BOOL)isCustomButtonVisible

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (BOOL)isHotSpotButtonVisible

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (BOOL)areStepButtonsVisible

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (BOOL)isTranslateButtonVisible

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (BOOL)isVolumeButtonVisible

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

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

    Declaration

    Objective-C

    - (BOOL)areZoomButtonsVisible

    Discussion

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

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

  • Returns an NSMenu object that is the contextual menu for the specified event.

    Declaration

    Objective-C

    - (NSMenu *)menuForEventDelegate:(NSEvent *)event

    Parameters

    event

    An NSEvent object that specifies an event.

    Discussion

    This delegate method can be used instead of subclassing QTMovieView in cases where an application cannot hard-link against the QTKit framework.

    Availability

    OS X v10.6; QuickTime 7.6.3 or later.

  • delegate - delegate (OS X v10.9)

    Returns the receiver’s delegate.

    Declaration

    Objective-C

    - (id)delegate

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

  • Sets the receiver’s delegate.

    Declaration

    Objective-C

    - (void)setDelegate:(id)delegate

    Import Statement

    Objective-C

    @import QTKit;

    Availability

    QuickTime 7.2.1 or later.

    Deprecated in OS X v10.9.

  • Constants for different movie view bindings.

    Declaration

    Objective-C

    NSString * const QTMovieViewMovieBinding; NSString * const QTMovieViewControllerVisibleBinding; NSString * const QTMovieViewPreservesAspectRatioBinding; NSString * const QTMovieViewFillColorBinding;

    Constants

    • QTMovieViewMovieBinding

      QTMovieViewMovieBinding

      A QTMovieView binding that determines the receiver's movie. Value is a QTMovie.

      Available in OS X v10.4 and later.

      Deprecated in OS X v10.9.

    • QTMovieViewControllerVisibleBinding

      QTMovieViewControllerVisibleBinding

      A QTMovieView binding that determines whether or not the controls are visible. Value is a boolean.

      Available in OS X v10.4 and later.

      Deprecated in OS X v10.9.

    • QTMovieViewPreservesAspectRatioBinding

      QTMovieViewPreservesAspectRatioBinding

      A QTMovieView binding that determines whether or not the receiver preserves the natural aspect ratio of the movie. Value is a boolean.

      Available in OS X v10.4 and later.

      Deprecated in OS X v10.9.

    • QTMovieViewFillColorBinding

      QTMovieViewFillColorBinding

      A QTMovieView binding that determines the fill color. Value is an NSColor.

      Available in OS X v10.4 and later.

      Deprecated in OS X v10.9.