1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxMediaCtrl docs
4 %% Author: Ryan Norton <wxprojects@comcast.net>
8 %% Copyright: (c) Ryan Norton
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxMediaCtrl
}}\label{wxmediactrl
}
14 Plays movies - Currently Windows and Mac only.
16 \wxheading{Derived from
}
18 \helpref{wxControl
}{wxcontrol
}
20 \wxheading{Include files
}
24 \latexignore{\rtfignore{\wxheading{Members
}}}
27 \membersection{wxMediaCtrl::wxMediaCtrl
}\label{wxmediactrlwxmediactrl
}
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
}}
32 \func{}{wxMediaCtrl
}{\void}
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.
}
46 \membersection{wxMediaCtrl::Create
}\label{wxmediactrlcreate
}
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
}}
50 Creates this control. Returns
\tt{false
} if it can't load the movie located at
\tt{fileName
}
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.
}
64 \membersection{wxMediaCtrl::GetDuration
}\label{wxmediactrlgetduration
}
66 \func{long
}{GetDuration
}{\void}
68 Obtains the length - the total amount of time the movie has
71 \membersection{wxMediaCtrl::GetPosition
}\label{wxmediactrlgetposition
}
73 \func{long
}{GetPosition
}{\void}
75 Obtains the current position in time within the movie.
78 \membersection{wxMediaCtrl::GetState
}\label{wxmediactrlgetstate
}
80 \func{wxMediaCtrlState
}{GetState
}{\void}
82 Obtains the state the playback of the movie is in -
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.
}
92 \membersection{wxMediaCtrl::Load
}\label{wxmediactrlload
}
94 \func{bool
}{Load
}{\param{const wxString\&
}{fileName
}}
96 Loads the file that
\tt{fileName
} refers to.
98 Unlike Create, you must manually call Play() to start playing the file.
101 \membersection{wxMediaCtrl::Pause
}\label{wxmediactrlpause
}
103 \func{bool
}{Pause
}{\void}
105 Pauses playback of the movie.
108 \membersection{wxMediaCtrl::Play
}\label{wxmediactrlplay
}
110 \func{bool
}{Play
}{\void}
112 Resumes playback of the movie.
115 \membersection{wxMediaCtrl::SetPosition
}\label{wxmediactrlsetposition
}
117 \func{bool
}{SetPosition
}{\param{long
}{where
}}
119 Seeks to a position within the movie.
122 \membersection{wxMediaCtrl::Stop
}\label{wxmediactrlstop
}
124 \func{bool
}{Stop
}{\void}
126 Stops the movie and rewinds the movie to the start.