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$
|
2010-07-13 13:29:13 +00:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@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
|
2008-10-05 11:24:00 +00:00
|
|
|
describing your application.
|
|
|
|
|
|
|
|
Show it in application initialisation, and then either explicitly destroy
|
2008-03-08 13:52:38 +00:00
|
|
|
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
|
2008-10-05 11:24:00 +00:00
|
|
|
wxBitmap bitmap;
|
2008-03-08 13:52:38 +00:00
|
|
|
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,
|
2008-10-05 11:24:00 +00:00
|
|
|
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-10-05 11:24:00 +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.
|
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual ~wxSplashScreen();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-10-05 11:24:00 +00:00
|
|
|
Returns the splash style (see wxSplashScreen() for details).
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
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
|
|
|
|