2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: splash.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxSplashScreen
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxSplashScreen
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
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.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
Example usage:
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@code
|
|
|
|
wxBitmap bitmap;
|
|
|
|
if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
|
|
|
|
{
|
|
|
|
wxSplashScreen* splash = new wxSplashScreen(bitmap,
|
|
|
|
wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
|
2008-07-02 14:45:57 +00:00
|
|
|
6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
|
2008-03-08 13:52:38 +00:00
|
|
|
wxBORDER_SIMPLE|wxSTAY_ON_TOP);
|
|
|
|
}
|
|
|
|
wxYield();
|
|
|
|
@endcode
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxadv}
|
|
|
|
@category{managedwnd}
|
|
|
|
*/
|
|
|
|
class wxSplashScreen : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Construct the splash screen passing a bitmap, a style, a timeout, a window id,
|
|
|
|
optional position
|
|
|
|
and size, and a window style.
|
2008-03-09 12:33:59 +00:00
|
|
|
@a splashStyle is a bitlist of some of the following:
|
2008-03-08 13:52:38 +00:00
|
|
|
wxSPLASH_CENTRE_ON_PARENT
|
|
|
|
wxSPLASH_CENTRE_ON_SCREEN
|
|
|
|
wxSPLASH_NO_CENTRE
|
|
|
|
wxSPLASH_TIMEOUT
|
|
|
|
wxSPLASH_NO_TIMEOUT
|
2008-03-09 12:33:59 +00:00
|
|
|
@a milliseconds is the timeout in milliseconds.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
wxSplashScreen(const wxBitmap& bitmap, long splashStyle,
|
|
|
|
int milliseconds,
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxBORDER_SIMPLE|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Destroys the splash screen.
|
|
|
|
*/
|
|
|
|
~wxSplashScreen();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the splash style (see wxSplashScreen() for
|
|
|
|
details).
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
long GetSplashStyle() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the window used to display the bitmap.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
wxSplashScreenWindow* GetSplashWindow() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the timeout in milliseconds.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
int GetTimeout() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Reimplement this event handler if you want to set an application variable on
|
|
|
|
window destruction, for example.
|
|
|
|
*/
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|