]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: splash.h | |
e54c96f1 | 3 | // Purpose: interface of wxSplashScreen |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxSplashScreen | |
7c913512 | 11 | |
23324ae1 FM |
12 | wxSplashScreen shows a window with a thin border, displaying a bitmap |
13 | describing your | |
14 | application. Show it in application initialisation, and then either explicitly | |
15 | destroy | |
16 | it or let it time-out. | |
7c913512 | 17 | |
23324ae1 | 18 | Example usage: |
7c913512 | 19 | |
23324ae1 FM |
20 | @code |
21 | wxBitmap bitmap; | |
22 | if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG)) | |
23 | { | |
24 | wxSplashScreen* splash = new wxSplashScreen(bitmap, | |
25 | wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT, | |
6bfc18d0 | 26 | 6000, NULL, -1, wxDefaultPosition, wxDefaultSize, |
23324ae1 FM |
27 | wxBORDER_SIMPLE|wxSTAY_ON_TOP); |
28 | } | |
29 | wxYield(); | |
30 | @endcode | |
7c913512 | 31 | |
23324ae1 FM |
32 | @library{wxadv} |
33 | @category{managedwnd} | |
34 | */ | |
35 | class wxSplashScreen : public wxFrame | |
36 | { | |
37 | public: | |
38 | /** | |
39 | Construct the splash screen passing a bitmap, a style, a timeout, a window id, | |
40 | optional position | |
41 | and size, and a window style. | |
4cc4bfaf | 42 | @a splashStyle is a bitlist of some of the following: |
23324ae1 FM |
43 | wxSPLASH_CENTRE_ON_PARENT |
44 | wxSPLASH_CENTRE_ON_SCREEN | |
45 | wxSPLASH_NO_CENTRE | |
46 | wxSPLASH_TIMEOUT | |
47 | wxSPLASH_NO_TIMEOUT | |
4cc4bfaf | 48 | @a milliseconds is the timeout in milliseconds. |
23324ae1 FM |
49 | */ |
50 | wxSplashScreen(const wxBitmap& bitmap, long splashStyle, | |
51 | int milliseconds, | |
52 | wxWindow* parent, | |
53 | wxWindowID id, | |
54 | const wxPoint& pos = wxDefaultPosition, | |
55 | const wxSize& size = wxDefaultSize, | |
56 | long style = wxBORDER_SIMPLE|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP); | |
57 | ||
58 | /** | |
59 | Destroys the splash screen. | |
60 | */ | |
adaaa686 | 61 | virtual ~wxSplashScreen(); |
23324ae1 FM |
62 | |
63 | /** | |
64 | Returns the splash style (see wxSplashScreen() for | |
65 | details). | |
66 | */ | |
328f5751 | 67 | long GetSplashStyle() const; |
23324ae1 FM |
68 | |
69 | /** | |
70 | Returns the window used to display the bitmap. | |
71 | */ | |
328f5751 | 72 | wxSplashScreenWindow* GetSplashWindow() const; |
23324ae1 FM |
73 | |
74 | /** | |
75 | Returns the timeout in milliseconds. | |
76 | */ | |
328f5751 | 77 | int GetTimeout() const; |
23324ae1 FM |
78 | |
79 | /** | |
80 | Reimplement this event handler if you want to set an application variable on | |
81 | window destruction, for example. | |
82 | */ | |
83 | void OnCloseWindow(wxCloseEvent& event); | |
84 | }; | |
e54c96f1 | 85 |