⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mediactrl.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 2 页
字号:
Constructor that calls \helpref{Create}{wxmediactrlcreate}.  You may prefer to call \helpref{Create}{wxmediactrlcreate} directly to check to see if wxMediaCtrl is available on the system.\docparam{parent}{parent of this control.  Must not be NULL.}\docparam{id}{id to use for events}\docparam{fileName}{If not empty, the path of a file to open.}\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{szBackend}{Name of backend you want to use, leave blank to makewxMediaCtrl figure it out.}\docparam{validator}{validator to use.}\docparam{name}{Window name.}\membersection{wxMediaCtrl::Create}\label{wxmediactrlcreate}\func{bool}{Create}{        \param{wxWindow* }{parent},         \param{wxWindowID }{id},         \param{const wxString\& }{fileName = wxT("")},        \param{const wxPoint\& }{pos = wxDefaultPosition},         \param{const wxSize\& }{size = wxDefaultSize},         \param{long }{style = 0},         \param{const wxString\& }{szBackend = wxT("")},        \param{const wxValidator& }{validator = wxDefaultValidator},        \param{const wxString\& }{name = wxPanelNameStr}                   }Creates this control.  Returns \tt{false} if it can't load the movie located at \tt{fileName} or it cannot load one of its native backends.If you specify a file to open via \tt{fileName} and you don't specify a backend to use, wxMediaCtrl tries each of its backends until one that can render the path referred to by \tt{fileName} can be found.\docparam{parent}{parent of this control.  Must not be NULL.}\docparam{id}{id to use for events}\docparam{fileName}{If not empty, the path of a file to open.}\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{szBackend}{Name of backend you want to use, leave blank to makewxMediaCtrl figure it out.}\docparam{validator}{validator to use.}\docparam{name}{Window name.}\membersection{wxMediaCtrl::GetBestSize}\label{wxmediactrlgetbestsize}\func{wxSize}{GetBestSize}{\void}Obtains the best size relative to the original/natural size of thevideo, if there is any. See \helpref{Video size}{videosizewxmediactrl}for more information.\membersection{wxMediaCtrl::GetPlaybackRate}\label{wxmediactrlgetplaybackrate}\func{double}{GetPlaybackrate}{\void}Obtains the playback rate, or speed of the media. \tt{1.0} represents normalspeed, while \tt{2.0} represents twice the normal speed of the media, forexample. Not supported on the GStreamer (Unix) backend.Returns 0 on failure.\membersection{wxMediaCtrl::GetVolume}\label{wxmediactrlgetvolume}\func{double}{GetVolume}{\void}Gets the volume of the media from a 0.0 to 1.0 range. Note that due to roundingand other errors this may not be the exact value sent to SetVolume.\membersection{wxMediaCtrl::GetState}\label{wxmediactrlgetstate}\func{wxMediaCtrlState}{GetState}{\void}Obtains the state the playback of the media is in -\twocolwidtha{7cm}\begin{twocollist}\itemsep=0pt\twocolitem{{\bf wxMEDIASTATE\_STOPPED}}{The movie has stopped.}\twocolitem{{\bf wxMEDIASTATE\_PAUSED}}{The movie is paused.}\twocolitem{{\bf wxMEDIASTATE\_PLAYING}}{The movie is currently playing.}\end{twocollist}\membersection{wxMediaCtrl::Length}\label{wxmediactrllength}\func{wxFileOffset}{Length}{\void}Obtains the length - the total amount of time the movie has in milliseconds.\membersection{wxMediaCtrl::Load}\label{wxmediactrlload}\func{bool}{Load}{\param{const wxString\& }{fileName}}Loads the file that \tt{fileName} refers to.  Returns false if loading fails.\membersection{wxMediaCtrl::Load}\label{wxmediactrlloaduri}\func{bool}{Load}{\param{const wxURI\& }{uri}}Loads the location that \tt{uri} refers to.  Note that this is very implementation-dependant, although HTTP URI/URLs are generally supported, for example. Returns false if loading fails.\membersection{wxMediaCtrl::Load}\label{wxmediactrlloaduriwithproxy}\func{bool}{Load}{\param{const wxURI\& }{uri}, \param{const wxURI\& }{proxy}}Loads the location that \tt{uri} refers to with the proxy \tt{proxy}. Not implemented on most backends so it should be called with caution. Returns false if loading fails.\membersection{wxMediaCtrl::LoadURI}\label{wxmediactrlloaduriliteral}\func{bool}{LoadURI}{\param{const wxURI\& }{uri}}Same as \helpref{Load}{wxmediactrlloaduri}. Kept for wxPython compatability.\membersection{wxMediaCtrl::LoadURIWithProxy}\label{wxmediactrlloaduriwithproxyliteral}\func{bool}{LoadURIWithProxy}{\param{const wxURI\& }{uri}, \param{const wxURI\& }{proxy}}Same as \helpref{Load}{wxmediactrlloaduriwithproxy}. Kept for wxPython compatability.\membersection{wxMediaCtrl::Pause}\label{wxmediactrlpause}\func{bool}{Pause}{\void}Pauses playback of the movie.\membersection{wxMediaCtrl::Play}\label{wxmediactrlplay}\func{bool}{Play}{\void}Resumes playback of the movie.\membersection{wxMediaCtrl::Seek}\label{wxmediactrlsetposition}\func{wxFileOffset}{Seek}{\param{wxFileOffset }{where}, \param{wxSeekMode }{mode}}Seeks to a position within the movie.\membersection{wxMediaCtrl::SetPlaybackRate}\label{wxmediactrlsetplaybackrate}\func{bool}{SetPlaybackRate}{\param{double }{dRate}}Sets the playback rate, or speed of the media, to that referred by \tt{dRate}.\tt{1.0} represents normal speed, while \tt{2.0} represents twice the normalspeed of the media, for example. Not supported on the GStreamer (Unix) backend.Returns true if successful.\membersection{wxMediaCtrl::SetVolume}\label{wxmediactrlsetvolume}\func{bool}{SetVolume}{\param{double }{dVolume}}Sets the volume of the media from a 0.0 to 1.0 range to that referredby \tt{dVolume}.  \tt{1.0} represents full volume, while \tt{0.5}represents half (50 percent) volume, for example.  Note that this may not beexact due to conversion and rounding errors, although setting the volume tofull or none is always exact. Returns true if successful.\membersection{wxMediaCtrl::ShowPlayerControls}\label{wxmediactrlshowplayercontrols}\func{bool}{ShowPlayerControls}{\param{wxMediaCtrlPlayerControls }{flags = wxMEDIACTRLPLAYERCONTROLS\_DEFAULT}}A special feature to wxMediaCtrl. Applications using native toolkits such asQuickTime usually have a scrollbar, play button, and more provided tothem by the toolkit. By default wxMediaCtrl does not do this. However, onthe directshow and quicktime backends you can show or hide the native controlsprovided by the underlying toolkit at will using ShowPlayerControls. Simplycalling the function with default parameters tells wxMediaCtrl to use thedefault controls provided by the toolkit. The function takes a\tt{wxMediaCtrlPlayerControls} enumeration as follows:\twocolwidtha{7cm}\begin{twocollist}\itemsep=0pt\twocolitem{{\bf wxMEDIACTRLPLAYERCONTROLS\_NONE}}{No controls. return wxMediaCtrl to it's default state.}\twocolitem{{\bf wxMEDIACTRLPLAYERCONTROLS\_STEP}}{Step controls like fastfoward, step one frame etc.}\twocolitem{{\bf wxMEDIACTRLPLAYERCONTROLS\_VOLUME}}{Volume controls like the speaker icon, volume slider, etc.}\twocolitem{{\bf wxMEDIACTRLPLAYERCONTROLS\_DEFAULT}}{Default controls for the toolkit. Currently a typedef for wxMEDIACTRLPLAYERCONTROLS\_STEP and wxMEDIACTRLPLAYERCONTROLS\_VOLUME.}\end{twocollist}For more see \helpref{Player controls}{playercontrolswxmediactrl}. Currentlyonly implemented on the QuickTime and DirectShow backends. The functionreturns true on success.\membersection{wxMediaCtrl::Stop}\label{wxmediactrlstop}\func{bool}{Stop}{\void}Stops the media.See \helpref{Operation}{operationwxmediactrl} for an overview of howstopping works.\membersection{wxMediaCtrl::Tell}\label{wxmediactrlgetposition}\func{wxFileOffset}{Tell}{\void}Obtains the current position in time within the movie in milliseconds.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -