]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/mediactrl.tex
be95ff3cb4a4f325474b6f5668fab4ff4355cfe7
[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 wxMediaCtrl is a class that allows a way to convieniently display types of media,
15 such as videos, audio files, natively through native codecs.
16
17 On Windows wxMediaCtrl uses DirectShow, and on Macintosh wxMediaCtrl uses QuickTime.
18
19 wxMediaCtrl is not currently available on unix systems.
20
21 \wxheading{Derived from}
22
23 \helpref{wxControl}{wxcontrol}
24
25 \wxheading{Include files}
26
27 <wx/mediactrl.h>
28
29 \latexignore{\rtfignore{\wxheading{Members}}}
30
31
32 \membersection{wxMediaCtrl::wxMediaCtrl}\label{wxmediactrlwxmediactrl}
33
34 \func{}{wxMediaCtrl}{\void}
35
36 Default constructor - you \tt{must} call Create before calling any other methods
37 of wxMediaCtrl.
38
39 \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}}
40
41 Constructor that calls Create. You may prefer to call Create directly to check to see if wxMediaCtrl is available
42 on the system.
43
44 \docparam{parent}{parent of this control. Must not be NULL.}
45 \docparam{id}{id to use for events}
46 \docparam{fileName}{If not empty, loads this file and starts playing it immediately.}
47 \docparam{pos}{Position to put control at.}
48 \docparam{size}{Size to put the control at and to stretch movie to.}
49 \docparam{style}{Optional styles.}
50 \docparam{driver}{Reserved for future use.}
51 \docparam{name}{Window name.}
52
53
54 \membersection{wxMediaCtrl::Create}\label{wxmediactrlcreate}
55
56 \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}}
57
58 Creates this control. Returns \tt{false} if it can't load the movie located at \tt{fileName} or it cannot load
59 one of its native backends.
60
61 \docparam{parent}{parent of this control. Must not be NULL.}
62 \docparam{id}{id to use for events}
63 \docparam{fileName}{If not empty, loads this file and starts playing it immediately.}
64 \docparam{pos}{Position to put control at.}
65 \docparam{size}{Size to put the control at and to stretch movie to.}
66 \docparam{style}{Optional styles.}
67 \docparam{driver}{Reserved for future use.}
68 \docparam{name}{Window name.}
69
70
71 \membersection{wxMediaCtrl::GetDuration}\label{wxmediactrlgetduration}
72
73 \func{long}{GetDuration}{\void}
74
75 Obtains the length - the total amount of time the movie has in milliseconds.
76
77
78 \membersection{wxMediaCtrl::GetPosition}\label{wxmediactrlgetposition}
79
80 \func{long}{GetPosition}{\void}
81
82 Obtains the current position in time within the movie in milliseconds.
83
84
85 \membersection{wxMediaCtrl::GetState}\label{wxmediactrlgetstate}
86
87 \func{wxMediaCtrlState}{GetState}{\void}
88
89 Obtains the state the playback of the movie is in -
90
91 \twocolwidtha{7cm}
92 \begin{twocollist}\itemsep=0pt
93 \twocolitem{{\bf wxMEDIASTATE\_STOPPED}}{The movie has stopped.}
94 \twocolitem{{\bf wxMEDIASTATE\_PAUSED}}{The movie is paused.}
95 \twocolitem{{\bf wxMEDIASTATE\_PLAYING}}{The movie is currently playing.}
96 \end{twocollist}
97
98
99 \membersection{wxMediaCtrl::Load}\label{wxmediactrlload}
100
101 \func{bool}{Load}{\param{const wxString\& }{fileName}}
102
103 Loads the file that \tt{fileName} refers to. Returns false if loading fails.
104
105 \membersection{wxMediaCtrl::Pause}\label{wxmediactrlpause}
106
107 \func{bool}{Pause}{\void}
108
109 Pauses playback of the movie.
110
111
112 \membersection{wxMediaCtrl::Play}\label{wxmediactrlplay}
113
114 \func{bool}{Play}{\void}
115
116 Resumes playback of the movie.
117
118
119 \membersection{wxMediaCtrl::SetPosition}\label{wxmediactrlsetposition}
120
121 \func{bool}{SetPosition}{\param{long }{where}}
122
123 Seeks to a position within the movie.
124
125
126 \membersection{wxMediaCtrl::Stop}\label{wxmediactrlstop}
127
128 \func{bool}{Stop}{\void}
129
130 Stops the media.