]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/splash.h
implement * and / operators for wxPoint, not only wxSize.
[wxWidgets.git] / interface / wx / 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
12 wxSplashScreen shows a window with a thin border, displaying a bitmap
13 describing your application.
14
15 Show it in application initialisation, and then either explicitly destroy
16 it or let it time-out.
17
18 Example usage:
19
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,
26 6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
27 wxBORDER_SIMPLE|wxSTAY_ON_TOP);
28 }
29 wxYield();
30 @endcode
31
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 and size, and a window style.
41
42 @a splashStyle is a bitlist of some of the following:
43 - wxSPLASH_CENTRE_ON_PARENT
44 - wxSPLASH_CENTRE_ON_SCREEN
45 - wxSPLASH_NO_CENTRE
46 - wxSPLASH_TIMEOUT
47 - wxSPLASH_NO_TIMEOUT
48
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 virtual ~wxSplashScreen();
63
64 /**
65 Returns the splash style (see wxSplashScreen() for details).
66 */
67 long GetSplashStyle() const;
68
69 /**
70 Returns the window used to display the bitmap.
71 */
72 wxSplashScreenWindow* GetSplashWindow() const;
73
74 /**
75 Returns the timeout in milliseconds.
76 */
77 int GetTimeout() const;
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 };
85