]> git.saurik.com Git - wxWidgets.git/commitdiff
correct Stopping - go to start of movie if stopped - add in preliminary docs
authorRyan Norton <wxprojects@comcast.net>
Sun, 7 Nov 2004 11:34:15 +0000 (11:34 +0000)
committerRyan Norton <wxprojects@comcast.net>
Sun, 7 Nov 2004 11:34:15 +0000 (11:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/classes.tex
docs/latex/wx/moviectrl.tex [new file with mode: 0644]
docs/latex/wx/movieevt.tex [new file with mode: 0644]
src/mac/carbon/moviectrl.cpp

index 4f0ddf2bf5a01cfedd9ad5f5fadea24acd2beebe..446e7d33f7dc9f06522a638ee3e2669907b0c24c 100644 (file)
 \input mcaptevt.tex
 \input mouseevt.tex
 \input moveevt.tex
 \input mcaptevt.tex
 \input mouseevt.tex
 \input moveevt.tex
+\input movieevt.tex
+\input moviectrl.tex
 \input mltchdlg.tex
 \input mutex.tex
 \input mutexlck.tex
 \input mltchdlg.tex
 \input mutex.tex
 \input mutexlck.tex
diff --git a/docs/latex/wx/moviectrl.tex b/docs/latex/wx/moviectrl.tex
new file mode 100644 (file)
index 0000000..7ca1e5d
--- /dev/null
@@ -0,0 +1,133 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        moviectrl.tex
+%% Purpose:     wxMovieCtrl docs
+%% Author:      Ryan Norton <wxprojects@comcast.net>
+%% Modified by:
+%% Created:     11/7/2004
+%% RCS-ID:      $Id$
+%% Copyright:   (c) Ryan Norton
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{\class{wxMovieCtrl}}\label{wxmoviectrl}
+
+PRELIMINARY
+
+Plays movies - Currently Windows and Mac only.
+
+
+\wxheading{Derived from}
+
+\helpref{wxControl}{wxcontrol}
+
+\wxheading{Include files}
+
+<wx/moviectrl.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+
+\membersection{wxMovieCtrl::wxMovieCtrl}\label{wxmoviectrlwxmoviectrl}
+
+\func{}{wxMovieCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{fileName}, \param{const wxString\& }{label = wxT("")}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxString\& }{name = wxPanelNameStr}}
+
+
+\func{}{wxMovieCtrl}{\void}
+
+Contructors
+
+\docparam{parent}{parent of this control.  Must not be NULL.}
+\docparam{id}{id to use for events}
+\docparam{fileName}{File the movie is located at.}
+\docparam{label}{Control label - possible caption for the movie.}
+\docparam{pos}{Position to put control at.}
+\docparam{size}{Size to put the control at and to stretch movie to.}
+\docparam{style}{Optional styles.}
+\docparam{name}{Window name.}
+
+
+\membersection{wxMovieCtrl::Create}\label{wxmoviectrlcreate}
+
+\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{fileName}, \param{const wxString\& }{label = wxT("")}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxString\& }{name = wxPanelNameStr}}
+
+Creates this control.  Returns \tt{false} if it can't load the movie located at \tt{fileName}
+
+
+\docparam{parent}{parent of this control.  Must not be NULL.}
+\docparam{id}{id to use for events}
+\docparam{fileName}{File the movie is located at.}
+\docparam{label}{Control label - possible caption for the movie.}
+\docparam{pos}{Position to put control at.}
+\docparam{size}{Size to put the control at and to stretch movie to.}
+\docparam{style}{Optional styles.}
+\docparam{name}{Window name.}
+
+
+\membersection{wxMovieCtrl::GetPlaybackRate}\label{wxmoviectrlgetplaybackrate}
+
+\func{double}{GetPlaybackRate}{\void}
+
+Obtains the current playback speed of the movie. 1.0 equals normal speed, 0.5 half, etc.
+
+
+\membersection{wxMovieCtrl::GetState}\label{wxmoviectrlgetstate}
+
+\func{wxMovieCtrlState}{GetState}{\void}
+
+Obtains the state the playback of the movie is in - 
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxMOVIECTRL\_STOPPED}}{The movie has stopped.}
+\twocolitem{{\bf wxMOVIECTRL\_PAUSED}}{The movie is paused.}
+\twocolitem{{\bf wxMOVIECTRL\_PLAYING}}{The movie is currently playing.}
+\end{twocollist}
+
+
+\membersection{wxMovieCtrl::Length}\label{wxmoviectrllength}
+
+\func{wxTimeSpan}{Length}{\void}
+
+Obtains the length - the total amount of time the movie has
+
+
+\membersection{wxMovieCtrl::Pause}\label{wxmoviectrlpause}
+
+\func{bool}{Pause}{\void}
+
+Pauses playback of the movie.
+
+
+\membersection{wxMovieCtrl::Play}\label{wxmoviectrlplay}
+
+\func{bool}{Play}{\void}
+
+Resumes playback of the movie.
+
+
+\membersection{wxMovieCtrl::Seek}\label{wxmoviectrlseek}
+
+\func{bool}{Seek}{\param{const wxTimeSpan\& }{where}}
+
+Seeks to a position within the movie.
+
+
+\membersection{wxMovieCtrl::SetPlaybackRate}\label{wxmoviectrlsetplaybackrate}
+
+\func{bool}{SetPlaybackRate}{\param{double }{dRate}}
+
+Sets the current playback speed of the movie. 1.0 equals normal speed, 0.5 half, etc.
+
+
+\membersection{wxMovieCtrl::Stop}\label{wxmoviectrlstop}
+
+\func{bool}{Stop}{\void}
+
+Stops the movie and rewinds the movie to the start.
+
+
+\membersection{wxMovieCtrl::Tell}\label{wxmoviectrltell}
+
+\func{wxTimeSpan}{Tell}{\void}
+
+Obtains the current position in time within the movie.
diff --git a/docs/latex/wx/movieevt.tex b/docs/latex/wx/movieevt.tex
new file mode 100644 (file)
index 0000000..b415bc2
--- /dev/null
@@ -0,0 +1,31 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        movieevt.tex
+%% Purpose:     wxMovieEvent docs
+%% Author:      Ryan Norton <wxprojects@comcast.net>
+%% Modified by:
+%% Created:     11/7/2004
+%% RCS-ID:      $Id$
+%% Copyright:   (c) Ryan Norton
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{\class{wxMovieEvent}}\label{wxmovieevent}
+
+Event \helpref{wxMovieCtrl}{wxmoviectrl} uses.
+
+\wxheading{Derived from}
+
+\helpref{wxNotifyEvent}{wxnotifyevent}
+
+\wxheading{Include files}
+
+<wx/moviectrl.h>
+
+\wxheading{Event table macros}
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf EVT\_MOVIE\_FINISHED(func)}}{Sent when a movie has finished playing in a \helpref{wxMovieCtrl}{wxmoviectrl}.}
+\end{twocollist}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
index 86f296a90efb73b83bbb28ab104958d97d692815..f4d141f78721520f282e8894db99dba13f4f2913 100644 (file)
@@ -76,6 +76,8 @@ public:
             else
             {
                 Stop();
             else
             {
                 Stop();
+                ::GoToBeginningOfMovie(m_movie);
+                wxASSERT( ::GetMoviesError() == noErr );
                 wxMovieEvent theEvent(wxEVT_MOVIE_FINISHED, m_parent->GetId());
                 m_parent->GetParent()->ProcessEvent(theEvent);
             }
                 wxMovieEvent theEvent(wxEVT_MOVIE_FINISHED, m_parent->GetId());
                 m_parent->GetParent()->ProcessEvent(theEvent);
             }
@@ -234,7 +236,7 @@ bool wxMovieCtrl::Stop()
     if(::GetMoviesError() != noErr)
         return false;
     
     if(::GetMoviesError() != noErr)
         return false;
     
-    ::GoToEndOfMovie(m_movie);
+    ::GoToBeginningOfMovie(m_movie);
     return ::GetMoviesError() == noErr;
 }
 
     return ::GetMoviesError() == noErr;
 }