]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/splash.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxSplashScreen
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #define wxSPLASH_CENTRE_ON_PARENT 0x01
10 #define wxSPLASH_CENTRE_ON_SCREEN 0x02
11 #define wxSPLASH_NO_CENTRE 0x00
12 #define wxSPLASH_TIMEOUT 0x04
13 #define wxSPLASH_NO_TIMEOUT 0x00
19 wxSplashScreen shows a window with a thin border, displaying a bitmap
20 describing your application.
22 Show it in application initialisation, and then either explicitly destroy
23 it or let it time-out.
29 if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
31 wxSplashScreen* splash = new wxSplashScreen(bitmap,
32 wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
33 6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
34 wxBORDER_SIMPLE|wxSTAY_ON_TOP);
42 class wxSplashScreen
: public wxFrame
46 Construct the splash screen passing a bitmap, a style, a timeout, a window id,
47 optional position and size, and a window style.
49 @a splashStyle is a bitlist of some of the following:
50 - wxSPLASH_CENTRE_ON_PARENT
51 - wxSPLASH_CENTRE_ON_SCREEN
56 @a milliseconds is the timeout in milliseconds.
58 wxSplashScreen(const wxBitmap
& bitmap
, long splashStyle
,
62 const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
,
64 long style
= wxBORDER_SIMPLE
|wxFRAME_NO_TASKBAR
|wxSTAY_ON_TOP
);
67 Destroys the splash screen.
69 virtual ~wxSplashScreen();
72 Returns the splash style (see wxSplashScreen() for details).
74 long GetSplashStyle() const;
77 Returns the window used to display the bitmap.
79 wxSplashScreenWindow
* GetSplashWindow() const;
82 Returns the timeout in milliseconds.
84 int GetTimeout() const;
87 Reimplement this event handler if you want to set an application variable on
88 window destruction, for example.
90 void OnCloseWindow(wxCloseEvent
& event
);