ORIGIN '~beta/guienv/guienv'; BODY 'private/movieplayerbody'; -- guienvLib: attributes -- movie: (* A movie represents quicktime movies that can be * played in a moviePlayer. *) (# <<SLOT movieLib: attributes>>; read: (* Read the specified movie file. *) (# theFileName: ^text; enter theFileName[] ... #); userSelectFile: (* Let the user select a movie file in a standard file * dialog. *) (# success: @boolean; ... exit success #); duration: (* Return the duration of the movie in milliseconds *) (# theDuration: @integer; ... exit theDuration #); fileName: (* The name of the movie file. *) (# theFileName: ^text; ... exit theFileName[] #); displaySize: (* The natural width and height of the movie. *) (# width, height: @integer; ... exit (width, height) #); private: @...; #); -- windowLib: attributes -- moviePlayer: windowitem (# <<SLOT moviePlayerLib: attributes>>; controllerVisible:< (# value: @boolean; do TRUE -> value; INNER exit value#); (* Furtherbind controllerVisible to "false -> value" * to hide the controller. *) automaticResize:< (# value: @boolean; do TRUE -> value; INNER exit value#); (* Furtherbind automaticResize to "false -> value" * to prevent the moviePlayer from resizing autmatically * based on the natural size of the movie. *) contents: (* The movie that are selected in the moviePlayer. *) (# enter (# enter theMovie[] ... #) exit theMovie[] #); read: (* Read the specified movie file. This is a shortcut for initialising a * Movie. *) (# theFileName: ^text; enter theFileName[] ... #); userSelectFile: (* Let the user select a movie file in a standard file * dialog.This is a shortcut for initialising a * Movie. *) (# success: @boolean; ... exit success #); currentTime: (* The current time is measured in milliseconds *) (# theTime: @integer; enter (# enter theTime ... #) exit (# ... exit theTime #) #); currentFrame: (* The current frame *) (# theFrame: @integer; enter (# enter theFrame ... #) exit (# ... exit theFrame #) #); play: (* Start playing. *) (# ... #); stop: (* Stop playing. *) (# ... #); pause: (* Pause playing. *) (# ... #); open::< (# create::(# ...#); ... #); close::< (# ... #); eventHandler::< (# contentsChanged: event (# name:^text; enter name[] do INNER; #); onContentsChanged:< contentsChanged; onActivate::< (# ... #); onDeactivate::< (# ... #); onMouseDown::< (# ... #); onRefresh::< (# ... #); #); theMovie: ^movie; private: @...; #)
22.2 Movieplayer Interface | © 1994-2002 Mjølner Informatics |
[Modified: Wednesday July 7th 1999 at 16:22]
|