]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/mediactrl.tex
333bb1d29a31c6c7b549ab948ea8a3def1d9b263
[wxWidgets.git] / docs / latex / wx / mediactrl.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: mediactrl.tex
3 %% Purpose: wxMediaCtrl docs
4 %% Author: Ryan Norton <wxprojects@comcast.net>
5 %% Modified by:
6 %% Created: 11/7/2004
7 %% RCS-ID: $Id$
8 %% Copyright: (c) Ryan Norton
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxMediaCtrl}}\label{wxmediactrl}
13
14 Plays movies - Currently Windows and Mac only.
15
16 \wxheading{Derived from}
17
18 \helpref{wxControl}{wxcontrol}
19
20 \wxheading{Include files}
21
22 <wx/mediactrl.h>
23
24 \latexignore{\rtfignore{\wxheading{Members}}}
25
26
27 \membersection{wxMediaCtrl::wxMediaCtrl}\label{wxmediactrlwxmediactrl}
28
29 \func{}{wxMediaCtrl}{\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{long }{driver = 0}, \param{const wxString\& }{name = wxPanelNameStr}}
30
31
32 \func{}{wxMediaCtrl}{\void}
33
34 Contructors
35
36 \docparam{parent}{parent of this control. Must not be NULL.}
37 \docparam{id}{id to use for events}
38 \docparam{fileName}{If not empty, loads this file and starts playing it immediately.}
39 \docparam{pos}{Position to put control at.}
40 \docparam{size}{Size to put the control at and to stretch movie to.}
41 \docparam{style}{Optional styles.}
42 \docparam{driver}{Reserved for future use.}
43 \docparam{name}{Window name.}
44
45
46 \membersection{wxMediaCtrl::Create}\label{wxmediactrlcreate}
47
48 \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{long }{driver = 0}, \param{const wxString\& }{name = wxPanelNameStr}}
49
50 Creates this control. Returns \tt{false} if it can't load the movie located at \tt{fileName}
51
52
53 \docparam{parent}{parent of this control. Must not be NULL.}
54 \docparam{id}{id to use for events}
55 \docparam{fileName}{If not empty, loads this file and starts playing it immediately.}
56 \docparam{pos}{Position to put control at.}
57 \docparam{size}{Size to put the control at and to stretch movie to.}
58 \docparam{driver}{Reserved for future use.}
59 \docparam{style}{Optional styles.}
60 \docparam{driver}{Reserved for future use.}
61 \docparam{name}{Window name.}
62
63
64 \membersection{wxMediaCtrl::GetDuration}\label{wxmediactrlgetduration}
65
66 \func{long}{GetDuration}{\void}
67
68 Obtains the length - the total amount of time the movie has
69
70
71 \membersection{wxMediaCtrl::GetPosition}\label{wxmediactrlgetposition}
72
73 \func{long}{GetPosition}{\void}
74
75 Obtains the current position in time within the movie.
76
77
78 \membersection{wxMediaCtrl::GetState}\label{wxmediactrlgetstate}
79
80 \func{wxMediaCtrlState}{GetState}{\void}
81
82 Obtains the state the playback of the movie is in -
83
84 \twocolwidtha{7cm}
85 \begin{twocollist}\itemsep=0pt
86 \twocolitem{{\bf wxMEDIASTATE\_STOPPED}}{The movie has stopped.}
87 \twocolitem{{\bf wxMEDIASTATE\_PAUSED}}{The movie is paused.}
88 \twocolitem{{\bf wxMEDIASTATE\_PLAYING}}{The movie is currently playing.}
89 \end{twocollist}
90
91
92 \membersection{wxMediaCtrl::Load}\label{wxmediactrlload}
93
94 \func{bool}{Load}{\param{const wxString\& }{fileName}}
95
96 Loads the file that \tt{fileName} refers to.
97
98 Unlike Create, you must manually call Play() to start playing the file.
99
100
101 \membersection{wxMediaCtrl::Pause}\label{wxmediactrlpause}
102
103 \func{bool}{Pause}{\void}
104
105 Pauses playback of the movie.
106
107
108 \membersection{wxMediaCtrl::Play}\label{wxmediactrlplay}
109
110 \func{bool}{Play}{\void}
111
112 Resumes playback of the movie.
113
114
115 \membersection{wxMediaCtrl::SetPosition}\label{wxmediactrlsetposition}
116
117 \func{bool}{SetPosition}{\param{long }{where}}
118
119 Seeks to a position within the movie.
120
121
122 \membersection{wxMediaCtrl::Stop}\label{wxmediactrlstop}
123
124 \func{bool}{Stop}{\void}
125
126 Stops the movie and rewinds the movie to the start.