2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: splash.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxSplashScreen
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxSplashScreen
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
wxSplashScreen shows a window with a thin border, displaying a bitmap
|
2008-10-05 07:24:00 -04:00
|
|
|
describing your application.
|
|
|
|
|
|
|
|
Show it in application initialisation, and then either explicitly destroy
|
2008-03-08 08:52:38 -05:00
|
|
|
it or let it time-out.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Example usage:
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@code
|
2008-10-05 07:24:00 -04:00
|
|
|
wxBitmap bitmap;
|
2008-03-08 08:52:38 -05:00
|
|
|
if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
|
|
|
|
{
|
|
|
|
wxSplashScreen* splash = new wxSplashScreen(bitmap,
|
|
|
|
wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
|
2008-07-02 10:45:57 -04:00
|
|
|
6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
|
2008-03-08 08:52:38 -05:00
|
|
|
wxBORDER_SIMPLE|wxSTAY_ON_TOP);
|
|
|
|
}
|
|
|
|
wxYield();
|
|
|
|
@endcode
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05: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 07:24:00 -04:00
|
|
|
optional position and size, and a window style.
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@a splashStyle is a bitlist of some of the following:
|
2008-10-05 07:24:00 -04:00
|
|
|
- wxSPLASH_CENTRE_ON_PARENT
|
|
|
|
- wxSPLASH_CENTRE_ON_SCREEN
|
|
|
|
- wxSPLASH_NO_CENTRE
|
|
|
|
- wxSPLASH_TIMEOUT
|
|
|
|
- wxSPLASH_NO_TIMEOUT
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@a milliseconds is the timeout in milliseconds.
|
2008-03-08 08:52:38 -05: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 07:21:10 -04:00
|
|
|
virtual ~wxSplashScreen();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-10-05 07:24:00 -04:00
|
|
|
Returns the splash style (see wxSplashScreen() for details).
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
long GetSplashStyle() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the window used to display the bitmap.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxSplashScreenWindow* GetSplashWindow() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the timeout in milliseconds.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetTimeout() const;
|
2008-03-08 08:52:38 -05: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 11:24:38 -04:00
|
|
|
|