MCPositionController
TheMCPositionControllerfunction allows you to control the position of a movie and its controller on the computer display.
pascal ComponentResult MCPositionController (MovieController mc, const Rect *movieRect, const Rect *controllerRect, long someFlags);
mc- Specifies the movie controller for the operation. You obtain this
identifier from the Component Manager'sOpenComponentorOpenDefaultComponentfunction, or from theNewMovieControllerfunction (described on page 2-28).movieRect- Points to a
Rectstructure that specifies the coordinates of the movie's boundary rectangle. (For details on theRectstructure, see the chapter "Basic QuickDraw" in Inside Macintosh: Imaging.)controllerRect- Points to a
Rectstructure that specifies the coordinates of the controller's boundary rectangle. The movie controller component always centers the control portion of the controller inside this rectangle. The movie controller component only uses this parameter when the control portion of the controller is detached from the movie. If you are working with an attached controller, you can set this parameter tonil.someFlags- If you set these flags to 0, the movie controller component centers the movie in the rectangle specified by
movieRectand 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:mcTopLeftMovie- If this flag is set to 1, the movie controller component places the movie into the upper-left corner of the display rectangle specified by the
movieRectparameter. The component scales the movie to fit into the rectangle. Note that the control portion of the controller may fall outside of the rectangle, depending upon the results of the scaling operation.mcScaleMovieToFit- If this flag is set to 1, the movie controller component resizes the movie to fit into the display rectangle specified by the
movieRectparameter after it places the control portion of the controller into the rectangle.- If you set this flag and the
mcTopLeftMovieflag to 1, the movie controller component resizes the movie to fit into the specified rectangle and places the control portion of the controller outside of the rectangle.mcPositionDontInvalidate- If this flag is set to 1, the movie controller component is requested not to invalidate areas of the window that are changed as a result of repositioning the movie or the controller. This flag is useful for applications that use the movie controller as part of a larger document. In particular, if the document is scrolled using QuickDraw's
ScrollRectroutine, optimal redrawing occurs
(that is, scrolled areas are not redrawn) if this flag is set. For details onScrollRect, see the chapter "Basic QuickDraw" in Inside Macintosh: Imaging.DESCRIPTION
TheMCPositionControllerfunction works with controllers that are attached to movies and controllers that are not attached to movies.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help