wxWidgets/docs/latex/wx/splash.tex

84 lines
2.6 KiB
TeX
Raw Normal View History

\section{\class{wxSplashScreen}}\label{wxsplashscreen}
wxSplashScreen shows a window with a thin border, displaying a bitmap describing your
application. Show it in application initialisation, and then either explicitly destroy
it or let it time-out.
Example usage:
\begin{verbatim}
wxBitmap bitmap;
if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
{
wxSplashScreen* splash = new wxSplashScreen(bitmap,
wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
}
wxYield();
\end{verbatim}
\wxheading{Derived from}
\helpref{wxFrame}{wxframe}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/splash.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSplashScreen::wxSplashScreen}\label{wxsplashscreenwxsplashscreen}
\func{}{wxSplashScreen}{\param{const wxBitmap\& }{bitmap}, \param{long }{splashStyle}, \param{int }{milliseconds}, \param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSIMPLE\_BORDER|wxFRAME\_NO\_TASKBAR|wxSTAY\_ON\_TOP}}
Construct the splash screen passing a bitmap, a style, a timeout, a window id, optional position
and size, and a window style.
{\it splashStyle} is a bitlist of some of the following:
\begin{itemize}\itemsep=0pt
\item wxSPLASH\_CENTRE\_ON\_PARENT
\item wxSPLASH\_CENTRE\_ON\_SCREEN
\item wxSPLASH\_NO\_CENTRE
\item wxSPLASH\_TIMEOUT
\item wxSPLASH\_NO\_TIMEOUT
\end{itemize}
{\it milliseconds} is the timeout in milliseconds.
\membersection{wxSplashScreen::\destruct{wxSplashScreen}}\label{wxsplashscreendtor}
\func{}{\destruct{wxSplashScreen}}{\void}
Destroys the splash screen.
\membersection{wxSplashScreen::OnCloseWindow}\label{wxsplashscreenonclosewindow}
\func{void}{OnCloseWindow}{\param{wxCloseEvent\& }{event}}
Reimplement this event handler if you want to set an application variable on window destruction, for example.
\membersection{wxSplashScreen::GetSplashStyle}\label{wxsplashscreengetsplashstyle}
\constfunc{long}{GetSplashStyle}{\void}
Returns the splash style (see \helpref{wxSplashScreen::wxSplashScreen}{wxsplashscreenwxsplashscreen} for
details).
\membersection{wxSplashScreen::GetSplashWindow}\label{wxsplashscreengetsplashwindow}
\constfunc{wxSplashScreenWindow*}{GetSplashWindow}{\void}
Returns the window used to display the bitmap.
\membersection{wxSplashScreen::GetTimeout}\label{wxsplashscreengettimeout}
\constfunc{int}{GetTimeout}{\void}
Returns the timeout in milliseconds.