]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/splash.h
remove ancient defines left over from GTK1
[wxWidgets.git] / interface / wx / splash.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: splash.h
3 // Purpose: interface of wxSplashScreen
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
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
13
14
15 /**
16 @class wxSplashScreen
17
18 wxSplashScreen shows a window with a thin border, displaying a bitmap
19 describing your application.
20
21 Show it in application initialisation, and then either explicitly destroy
22 it or let it time-out.
23
24 Example usage:
25
26 @code
27 wxBitmap bitmap;
28 if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
29 {
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);
34 }
35 wxYield();
36 @endcode
37
38 @library{wxadv}
39 @category{managedwnd}
40 */
41 class wxSplashScreen : public wxFrame
42 {
43 public:
44 /**
45 Construct the splash screen passing a bitmap, a style, a timeout, a window id,
46 optional position and size, and a window style.
47
48 @a splashStyle is a bitlist of some of the following:
49 - wxSPLASH_CENTRE_ON_PARENT
50 - wxSPLASH_CENTRE_ON_SCREEN
51 - wxSPLASH_NO_CENTRE
52 - wxSPLASH_TIMEOUT
53 - wxSPLASH_NO_TIMEOUT
54
55 @a milliseconds is the timeout in milliseconds.
56 */
57 wxSplashScreen(const wxBitmap& bitmap, long splashStyle,
58 int milliseconds,
59 wxWindow* parent,
60 wxWindowID id,
61 const wxPoint& pos = wxDefaultPosition,
62 const wxSize& size = wxDefaultSize,
63 long style = wxBORDER_SIMPLE|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
64
65 /**
66 Destroys the splash screen.
67 */
68 virtual ~wxSplashScreen();
69
70 /**
71 Returns the splash style (see wxSplashScreen() for details).
72 */
73 long GetSplashStyle() const;
74
75 /**
76 Returns the window used to display the bitmap.
77 */
78 wxSplashScreenWindow* GetSplashWindow() const;
79
80 /**
81 Returns the timeout in milliseconds.
82 */
83 int GetTimeout() const;
84
85 /**
86 Reimplement this event handler if you want to set an application variable on
87 window destruction, for example.
88 */
89 void OnCloseWindow(wxCloseEvent& event);
90 };
91