|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.QTObject | +--quicktime.std.comp.ComponentIdentifier | +--quicktime.std.comp.Component | +--quicktime.std.movies.MovieController
The MovieController class implements the corresponding data structure of the Movie Toolbox. MovieController allows your application to play and control movies with a standard interface. You obtain this identifier from the Component Manager's OpenComponent or OpenDefaultComponent function, or from the NewMovieController function (described on page 2-29 of Inside Macintosh: QuickTime Components).
If an application installs an ActionFilter callback, then it must remove this callback when it has finished with it to allow the native structures used in this callback to be properly disposed.
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Constructor Summary | |
MovieController(int subType,
Movie theMovie,
QDGraphics window,
QDPoint location)
This method constructs a MovieController object for a given subType. |
|
MovieController(Movie itsMovie)
This method locates a movie controller component for you and assigns a movie to that controller. |
|
MovieController(Movie itsMovie,
int someFlags)
This method locates a movie controller component for you and assigns a movie to that controller. |
Method Summary | |
void |
activate()
This method activates the movie controller. |
void |
activate(QDGraphics window,
boolean activate)
This method can be used in response to activate, deactivate, suspend, and resume events. |
void |
badgeClick(boolean flag)
Your application can use this method to switch badge clicking (false to ignore, true to process). |
void |
clear()
This method removes the current movie selection from the movie associated with a specified controller. |
boolean |
click(QDPoint where,
int modifiers)
Your application should call the method when the user clicks in a movie controller window. |
boolean |
clickAndHoldPoint(QDPoint point)
Your application can use this method to test if point has click and hold action. |
void |
controllerSizeChanged()
Your application can use this method to indicate that the controller size has changed. |
Movie |
copy()
This method returns a copy of the current movie selection from the movie associated with a specified controller. |
Movie |
cut()
This method returns a copy of the current movie selection from the movie associated with a specified controller and then removes the current movie selection from the source movie. |
void |
deactivate()
This method deactivates the movie controller. |
void |
draw()
Your application should call the draw method in response to an update event The movie controller component updates the movie controller if the controller is in the same window with the Canvas object. |
Region |
drawBadge(Region movieRgn,
boolean returnBadgeRgn)
This method allows you to display a controller's badge. |
void |
enableEditing(boolean enabled)
This method allows your application to enable and disable editing for a movie controller. |
void |
forceTimeTableUpdate()
Your application can use this method to force the update of the time table. |
QDRect |
getBounds()
This method returns a movie controller's boundary rectangle. |
Region |
getBoundsRgn()
This method returns the actual region occupied by the controller and its movie, if the movie is attached to the controller. |
Region |
getClip()
This method allows you to obtain information describing a movie controller's clipping regions. |
int |
getControllerInfo()
This method returns the current status of a movie controller and its associated movie. |
int |
getCurrentTime()
This method returns the time value represented by the indicator on the movie controller's slider. |
boolean |
getCursorSettingEnabled()
Your application can use this method to determine whether or not the movie controller is allowed to change the cursor. |
boolean |
getDragEnabled()
Your application can use this method to determine whether the movie controller has been instructed to enable drag & drop behavior. |
int |
getFlags()
Your application can use this action to retrieve a movie's control flags. |
boolean |
getKeysEnabled()
Your application can use this action to determine whether keystrokes are enabled for a movie controller. |
boolean |
getLooping()
Your application can use this action to determine whether a movie is looping. |
boolean |
getLoopIsPalindrome()
Your application can use this action to determine whether palindrome looping is enabled for a movie. |
Movie |
getMovie()
This method allows you to get the movie associated with controller. |
boolean |
getPlayEveryFrame()
Your application can use this action to determine whether the movie controller has been instructed to play every frame in a movie. |
float |
getPlayRate()
Your application can use this action to determine a movie's playback rate. |
boolean |
getPlaySelection()
Your application can use this action to determine whether a movie has been constrained to playing within its selection. |
QDGraphics |
getPort()
This method returns a movie controller's color graphics port. |
QDDimension |
getRequiredSize()
This returns the actual size of the controller itself - how many pixels high and wide that the controller takes up. |
TimeRecord |
getSelectionBegin()
Your application can use this method to receive the start time of a selection. |
TimeRecord |
getSelectionDuration()
Your application can use this method to receive the duration of a selection. |
int |
getTimeScale()
This method returns the time scale of the controller. |
QDRect |
getTimeSliderRect()
Your application can use this method to receive the QDRect specifying the location and size of the time slider. |
boolean |
getUseBadge()
Your application can use this action to determine whether a controller is using a badge. |
boolean |
getVisible()
This method returns a value that indicates whether a movie controller is visible. |
float |
getVolume()
Your application can use this action to determine a movie's volume. |
Region |
getWindowRgn(QDGraphics window)
This method allows your application to determine the window region that is actually in use by a controller and its movie. |
void |
goToTime(TimeRecord time)
Your application can use this action to goto a specific time. |
void |
idle()
This method performs idle processing for a movie controller. |
boolean |
inController(QDPoint thePt)
This method allows your application to determine if a point is within the controller's control area. |
void |
invalidate(QDGraphics window,
Region invalidRgn)
This method allows your application to invalidate portions of a movie controller. |
boolean |
isAttached()
Your application can use this method to receive information whether the controller is attached or not. |
boolean |
isEditingEnabled()
This method allows your application to determine whether editing is currently enabled for a movie controller. |
boolean |
key(int key,
int modifiers)
This method handles keyboard events for a movie controller. |
void |
linkToURL(java.lang.String url)
Your application can use this method to set a URL. |
void |
movieChanged()
This method lets you inform a movie controller component that your application has used the Movie Toolbox to change the characteristics of its associated movie. |
void |
movieEdited()
Your application can use this method to indicate that the movie has been edited. |
void |
paste()
This method inserts a specified movie at the current movie time in the movie associated with a specified controller. |
void |
paste(Movie srcMovie)
This method inserts a specified movie at the current movie time in the movie associated with a specified controller. |
void |
play(float rate)
Your application can use this action to start or stop playing a movie. |
void |
position(QDRect movieRect,
int someFlags)
This method allows you to control the position of a movie and its controller on the computer display. |
void |
position(QDRect movieRect,
QDRect controllerRect,
int someFlags)
This method allows you to control the position of a movie and its controller on the computer display. |
void |
prerollAndPlay(float rate)
Your application can use this method to start a movie. |
void |
removeActionFilter()
Removes the current action filter from the MovieController. |
void |
removeMovie()
This method allows you to remove the movie of the controller. |
void |
resume()
Indicates that a resume event has been received. |
void |
setActionFilter(ActionFilter filter)
Registers a class that can provide a filter function for any action the MovieController takes. |
void |
setActionFilter(ActionFilter filter,
boolean doIdle)
Registers a class that can provide a filter function for any action the MovieController takes. |
void |
setAttached(boolean attached)
Your application can use this method to make the controller attached or detached. |
void |
setBounds(QDRect newBoundsRect)
This method lets you change the position and size of a movie controller. |
void |
setClip(Region theClip)
This method allows you to set a movie controller's clipping region. |
void |
setColorTable(ColorTable newCTable)
Your application can use this method to assign a new color table to the controller QuickTime::MCDoAction() |
void |
setControllerKeysEnabled(boolean enabled)
This method allows your application to enable or disable responding to keys. |
void |
setCursorSettingEnabled(boolean enabled)
Your application can use this method to specify whether or not the movie controller is allowed to change the cursor. |
void |
setDragEnabled(boolean enabled)
Your application can use this method to enable drag & drop behavior. |
void |
setDuration(int duration)
This method allows your application to set a controller's duration in the case where a controller does not have a movie associated with it. |
void |
setFlags(int flags)
Your application can use this action to set a movie's control flags. |
void |
setGrowBoxBounds(QDRect limits)
Your application can use this action to set the limits for grow box. |
void |
setKeysEnabled(boolean enabled)
Your application can use this action to enable or disable keystrokes for a movie. |
void |
setLooping(boolean looping)
Your application can use this action to enable or disable looping for a movie. |
void |
setLoopIsPalindrome(boolean looping)
Your application can use this method to enable palindrome looping. |
void |
setMovie(Movie aMovie,
QDGraphics movieWindow,
QDPoint location)
This method replaces the current movie controlled by the movie controller with a new movie. |
void |
setMovieClip(Region theClip)
This method allows you to set a movie's clipping region. |
void |
setPlayEveryFrame(boolean play)
Your application can use this action to instruct the movie controller to play every frame in a movie. |
void |
setPlaySelection(boolean play)
Your application can use this action to constrain playing to the current selection. |
void |
setPort(QDGraphics grafPtr)
This method allows your application to set the graphics port for a movie controller. |
void |
setSelectionBegin(TimeRecord time)
Your application can use this action to set the start time of a selection. |
void |
setSelectionDuration(TimeRecord time)
Your application can use this action to set the duration of a selection. |
void |
setUseBadge(boolean useBadge)
Your application can use this action to enable or disable a movie's playback badge. |
void |
setVisible(boolean visible)
This method allows your application to control the visibility of a movie controller. |
void |
setVolume(float newVolume)
Your application can use this action to set a movie's volume. |
void |
step(int numberOfSteps)
Your application can use this action to play a movie while skipping a specified number of frames at a time. |
void |
suspend()
Indicates that a suspend event has been received. |
void |
undo()
This method allows your application to discard the effects of the most recent edit operation. |
Methods inherited from class quicktime.std.comp.Component |
count |
Methods inherited from class quicktime.std.comp.ComponentIdentifier |
find, find, getInfo, toString |
Methods inherited from class quicktime.QTObject |
disposeQTObject, equals, ID |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MovieController(Movie itsMovie) throws QTException
itsMovie
- Identifies the movie to be associated with the movie controller.public MovieController(Movie itsMovie, int someFlags) throws QTException
itsMovie
- Identifies the movie to be associated with the movie controller.someFlags
- Contains flags that control the operation.public MovieController(int subType, Movie theMovie, QDGraphics window, QDPoint location) throws QTException
subType
- the sub type of the MovieController.kType component that you wish to opentheMovie
- Specifies the movie to be associated with the movie controller.window
- Identifies the window in which the movie is to be displayed. This may NOT be null.location
- Specifies the upper-left corner of the movie within the window specified by the w parameter.Method Detail |
public final QDDimension getRequiredSize()
public final void idle() throws QTException
public final void setActionFilter(ActionFilter filter) throws StdQTException
filter
- the filter that you useQTCallBack
public final void setActionFilter(ActionFilter filter, boolean doIdle) throws StdQTException
filter
- the filter that you useidleFlag
- if true the filter will also be called with idle actions, otherwise false.QTCallBack
public final void removeActionFilter() throws StdQTException
public void setMovie(Movie aMovie, QDGraphics movieWindow, QDPoint location) throws StdQTException
aMovie
- Identifies the movie to be associated with the movie controller.movieWindow
- Identifies the window in which the movie is to be displayed. This may NOT be null unless the movie is also null.location
- Specifies the upper-left corner of the movie within the window
specified by the movieWindow parameter.MultiMovieController
public final Movie getMovie() throws StdQTException
public void removeMovie() throws StdQTException
public final void draw() throws StdQTException
public final boolean click(QDPoint where, int modifiers) throws StdQTException
where
- a QDPoint indicating the location of the clickmodifiers
- specifies java-defined modifier flags for the eventpublic final boolean key(int key, int modifiers) throws StdQTException
key
- specifies the java-defined keystrokemodifiers
- specifies java-defined modifier flags for the eventpublic final void activate() throws StdQTException
public final void deactivate() throws StdQTException
public final void play(float rate) throws StdQTException
rate
- Is a fixed value that indicates the rate of play.
Values greater than 0 correspond to forward rates;
values less than 0 play the movie backward. A value of 0 stops the movie.public final void goToTime(TimeRecord time) throws StdQTException
time
- Specifies the time to go.public final void setVolume(float newVolume) throws StdQTException
rate
- Is a 16-bit, fixed-point number that indicates
the relative volume of the movie. Volume values range from Ð1.0 to 1.0.
Negative values play no sound but preserve the absolute value of the volume setting.public final float getVolume() throws StdQTException
public final void step(int numberOfSteps) throws StdQTException
numberOfSteps
- value that specifies the number of steps
(that is, the frames and the play direction). Positive values
step the movie forward the specified number of frames; negative values
step the movie backward. A value of 0 steps the movie forward one frame.public final void setLooping(boolean looping) throws StdQTException
looping
- a value of true indicates that looping is to be enabled.public final boolean getLooping() throws StdQTException
public final void setLoopIsPalindrome(boolean looping) throws StdQTException
looping
- The parameter data must contain a Boolean valueÑa value
of true indicates that palindrome looping is to be enabled.public final boolean getLoopIsPalindrome() throws StdQTException
public final void setGrowBoxBounds(QDRect limits) throws StdQTException
limits
- Specifies the new limits.public final void setSelectionBegin(TimeRecord time) throws StdQTException
time
- Specifies the start time.public final void setSelectionDuration(TimeRecord time) throws StdQTException
time
- Specifies the start time.public final void setKeysEnabled(boolean enabled) throws StdQTException
enabled
- a value of true indicates that keystrokes are to be enabled.public final boolean getKeysEnabled() throws StdQTException
public final void setPlaySelection(boolean play) throws StdQTException
play
- a value of true indicates that playing within the current
selection is to be enabled.public final boolean getPlaySelection() throws StdQTException
public final void setUseBadge(boolean useBadge) throws StdQTException
useBadge
- a value of true indicates that the playback badge is to be enabled.public final boolean getUseBadge() throws StdQTException
public final void setFlags(int flags) throws StdQTException
flags
- an integer that contains the new control flag values.public final int getFlags() throws StdQTException
public final void setPlayEveryFrame(boolean play) throws StdQTException
play
- a value of true instructs the controller to play every frame
in the movie, even if that means playing the movie at a slower rate than
you previously specified.public final boolean getPlayEveryFrame() throws StdQTException
public final float getPlayRate() throws StdQTException
public final void suspend() throws StdQTException
public final void resume() throws StdQTException
public final void setControllerKeysEnabled(boolean enabled) throws StdQTException
public final QDRect getTimeSliderRect() throws StdQTException
public final boolean getDragEnabled() throws StdQTException
public final void setDragEnabled(boolean enabled) throws StdQTException
enabled
- a value of true indicates that the drag & drop behavior is to be enabled.public final TimeRecord getSelectionBegin() throws QTException
public final TimeRecord getSelectionDuration() throws QTException
public final void prerollAndPlay(float rate) throws StdQTException
rate
- a value indicating the rate of the movie playback.public final boolean getCursorSettingEnabled() throws StdQTException
public final void setCursorSettingEnabled(boolean enabled) throws StdQTException
enabled
- a value of true indicates that the movie controller is allowed to
change the cursor.public final void setColorTable(ColorTable newCTable) throws StdQTException
newCTable
- Specifies the new color tablepublic final void controllerSizeChanged() throws StdQTException
public final void badgeClick(boolean flag) throws StdQTException
flag
- true to process (the default), false to ignore.public final void movieEdited() throws StdQTException
public final void forceTimeTableUpdate() throws StdQTException
public final void linkToURL(java.lang.String url) throws QTException
url
- the URL that is used to create a DataReference.public final boolean clickAndHoldPoint(QDPoint point) throws StdQTException
point
- (local coordinates).public final void setAttached(boolean attached) throws QTException
attached
- Specifies the new state. true if attached.public final boolean isAttached() throws StdQTException
public final void setBounds(QDRect newBoundsRect) throws StdQTException
newBoundsRect
- Identifies the new boundary rectangle.public final QDRect getBounds() throws StdQTException
public final void setPort(QDGraphics grafPtr) throws StdQTException
grafPtr
- Points to the new graphics port for the movie controller. This may NOT be null.public final QDGraphics getPort() throws StdQTException
public final void setVisible(boolean visible) throws StdQTException
visible
- Specifies the action for this function. Set the visible parameter to
true to cause the controller to be visible. Set this parameter to false
to make the controller invisible.public final boolean getVisible() throws StdQTException
public final Region getBoundsRgn() throws QTException
public final Region getWindowRgn(QDGraphics window) throws QTException
window
- Specifies the window. This may NOT be null.public final void movieChanged() throws StdQTException
changedMovie
- Specifies the changed movie.public final void setDuration(int duration) throws StdQTException
duration
- Specifies the duration for the controller.public final int getCurrentTime() throws StdQTException
public final int getTimeScale() throws StdQTException
public final void activate(QDGraphics window, boolean activate) throws StdQTException, QDException
window
- Specifies the window in which the event has occurred. This may NOT be null.activate
- Indicates the nature of the event. Set this parameter to true for
activate and resume events. Set it to false for deactivate and
suspend events.public final void enableEditing(boolean enabled) throws StdQTException
enabled
- Specifies whether to enable or disable editing for the controller.public final boolean isEditingEnabled() throws StdQTException
public final Movie copy() throws QTException
public final Movie cut() throws QTException
public final void paste() throws StdQTException
public final void paste(Movie srcMovie) throws StdQTException
srcMovie
- Specifies the movie to be inserted into the current selection
in the movie associated with the movie controller.public final void clear() throws StdQTException
public final void undo() throws StdQTException
public final void position(QDRect movieRect, QDRect controllerRect, int someFlags) throws StdQTException
movieRect
- Specifies the coordinates of the movie's boundary rectangle.controllerRect
- Specifies the coordinates of the controller's boundary rectangle.someFlags
- If you set these flags to 0, the movie controller component centers the
movie in the rectangle specified by movieRect and scales the movie to
fit in that rectangle. You may control how the movie is drawn by setting
one or more of the flags to 1.public final void position(QDRect movieRect, int someFlags) throws StdQTException
movieRect
- Specifies the coordinates of the movie's boundary rectangle.someFlags
- If you set these flags to 0, the movie controller component centers the movie
in the rectangle specified by movieRect and scales the movie to fit in that rectangle.
You may control how the movie is drawn by setting one or more of the following flags to 1.public final int getControllerInfo() throws StdQTException
public final void setClip(Region theClip) throws StdQTException
theClip
- A Region that defines the controller's clipping region.public final Region getClip() throws QTException
public final void setMovieClip(Region theClip) throws StdQTException
theClip
- A Region that defines the movie's clipping region.public final Region drawBadge(Region movieRgn, boolean returnBadgeRgn) throws QTException
movieRgn
- Specifies the boundary region of the controller's movie.public final boolean inController(QDPoint thePt) throws StdQTException
public final void invalidate(QDGraphics window, Region invalidRgn) throws StdQTException, QDException
window
- Specifies the window where the invalid region is in. This may NOT be null.invalidRgn
- Specifies the invalid region.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |