]> git.saurik.com Git - wxWidgets.git/blame_incremental - interface/wx/splash.h
generate a size event from ShowWithEffect() for consistency with Show()
[wxWidgets.git] / interface / wx / splash.h
... / ...
CommitLineData
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
14 application. Show it in application initialisation, and then either explicitly
15 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*/
35class wxSplashScreen : public wxFrame
36{
37public:
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.
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 @a milliseconds is the timeout in milliseconds.
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 */
61 ~wxSplashScreen();
62
63 /**
64 Returns the splash style (see wxSplashScreen() for
65 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