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