]> git.saurik.com Git - wxWidgets.git/blob - interface/splash.h
57df843ad2a9a32f6bba3b268d2d3bd9c7d73d80
[wxWidgets.git] / interface / splash.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: splash.h
3 // Purpose: documentation for wxSplashScreen class
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
44 @e splashStyle is a bitlist of some of the following:
45
46 wxSPLASH_CENTRE_ON_PARENT
47 wxSPLASH_CENTRE_ON_SCREEN
48 wxSPLASH_NO_CENTRE
49 wxSPLASH_TIMEOUT
50 wxSPLASH_NO_TIMEOUT
51
52 @e milliseconds is the timeout in milliseconds.
53 */
54 wxSplashScreen(const wxBitmap& bitmap, long splashStyle,
55 int milliseconds,
56 wxWindow* parent,
57 wxWindowID id,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 long style = wxBORDER_SIMPLE|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
61
62 /**
63 Destroys the splash screen.
64 */
65 ~wxSplashScreen();
66
67 /**
68 Returns the splash style (see wxSplashScreen() for
69 details).
70 */
71 long GetSplashStyle();
72
73 /**
74 Returns the window used to display the bitmap.
75 */
76 wxSplashScreenWindow* GetSplashWindow();
77
78 /**
79 Returns the timeout in milliseconds.
80 */
81 int GetTimeout();
82
83 /**
84 Reimplement this event handler if you want to set an application variable on
85 window destruction, for example.
86 */
87 void OnCloseWindow(wxCloseEvent& event);
88 };