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 wxMediaCtrl is a class that allows a way to convieniently display types of media,
15 such as videos, audio files, natively through native codecs.
17 On Windows wxMediaCtrl uses DirectShow, and on Macintosh wxMediaCtrl uses QuickTime.
19 wxMediaCtrl is not currently available on unix systems.
21 \wxheading{Derived from
}
23 \helpref{wxControl
}{wxcontrol
}
25 \wxheading{Include files
}
29 \latexignore{\rtfignore{\wxheading{Members
}}}
32 \membersection{wxMediaCtrl::wxMediaCtrl
}\label{wxmediactrlwxmediactrl
}
34 \func{}{wxMediaCtrl
}{\void}
36 Default constructor - you
\tt{must
} call Create before calling any other methods
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
}}
41 Constructor that calls Create. You may prefer to call Create directly to check to see if wxMediaCtrl is available
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.
}
54 \membersection{wxMediaCtrl::Create
}\label{wxmediactrlcreate
}
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
}}
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.
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.
}
71 \membersection{wxMediaCtrl::GetDuration
}\label{wxmediactrlgetduration
}
73 \func{long
}{GetDuration
}{\void}
75 Obtains the length - the total amount of time the movie has in milliseconds.
78 \membersection{wxMediaCtrl::GetPosition
}\label{wxmediactrlgetposition
}
80 \func{long
}{GetPosition
}{\void}
82 Obtains the current position in time within the movie in milliseconds.
85 \membersection{wxMediaCtrl::GetState
}\label{wxmediactrlgetstate
}
87 \func{wxMediaCtrlState
}{GetState
}{\void}
89 Obtains the state the playback of the movie is in -
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.
}
99 \membersection{wxMediaCtrl::Load
}\label{wxmediactrlload
}
101 \func{bool
}{Load
}{\param{const wxString\&
}{fileName
}}
103 Loads the file that
\tt{fileName
} refers to. Returns false if loading fails.
105 \membersection{wxMediaCtrl::Pause
}\label{wxmediactrlpause
}
107 \func{bool
}{Pause
}{\void}
109 Pauses playback of the movie.
112 \membersection{wxMediaCtrl::Play
}\label{wxmediactrlplay
}
114 \func{bool
}{Play
}{\void}
116 Resumes playback of the movie.
119 \membersection{wxMediaCtrl::SetPosition
}\label{wxmediactrlsetposition
}
121 \func{bool
}{SetPosition
}{\param{long
}{where
}}
123 Seeks to a position within the movie.
126 \membersection{wxMediaCtrl::Stop
}\label{wxmediactrlstop
}
128 \func{bool
}{Stop
}{\void}