]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/splash.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxSplashScreen
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
8 #define wxSPLASH_CENTRE_ON_PARENT 0x01
9 #define wxSPLASH_CENTRE_ON_SCREEN 0x02
10 #define wxSPLASH_NO_CENTRE 0x00
11 #define wxSPLASH_TIMEOUT 0x04
12 #define wxSPLASH_NO_TIMEOUT 0x00
18 wxSplashScreen shows a window with a thin border, displaying a bitmap
19 describing your application.
21 Show it in application initialisation, and then either explicitly destroy
22 it or let it time-out.
28 if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
30 wxSplashScreen* splash = new wxSplashScreen(bitmap,
31 wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
32 6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
33 wxBORDER_SIMPLE|wxSTAY_ON_TOP);
41 class wxSplashScreen
: public wxFrame
45 Construct the splash screen passing a bitmap, a style, a timeout, a window id,
46 optional position and size, and a window style.
48 @a splashStyle is a bitlist of some of the following:
49 - wxSPLASH_CENTRE_ON_PARENT
50 - wxSPLASH_CENTRE_ON_SCREEN
55 @a milliseconds is the timeout in milliseconds.
57 wxSplashScreen(const wxBitmap
& bitmap
, long splashStyle
,
61 const wxPoint
& pos
= wxDefaultPosition
,
62 const wxSize
& size
= wxDefaultSize
,
63 long style
= wxBORDER_SIMPLE
|wxFRAME_NO_TASKBAR
|wxSTAY_ON_TOP
);
66 Destroys the splash screen.
68 virtual ~wxSplashScreen();
71 Returns the splash style (see wxSplashScreen() for details).
73 long GetSplashStyle() const;
76 Returns the window used to display the bitmap.
78 wxSplashScreenWindow
* GetSplashWindow() const;
81 Returns the timeout in milliseconds.
83 int GetTimeout() const;
86 Reimplement this event handler if you want to set an application variable on
87 window destruction, for example.
89 void OnCloseWindow(wxCloseEvent
& event
);