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