]> git.saurik.com Git - wxWidgets.git/blame - interface/splash.h
Commented out appearance sections in docs temporarily until screenshots are added.
[wxWidgets.git] / interface / splash.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: splash.h
e54c96f1 3// Purpose: interface of wxSplashScreen
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxSplashScreen
11 @wxheader{splash.h}
7c913512 12
23324ae1
FM
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.
7c913512 18
23324ae1 19 Example usage:
7c913512 20
23324ae1
FM
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
7c913512 32
23324ae1
FM
33 @library{wxadv}
34 @category{managedwnd}
35*/
36class wxSplashScreen : public wxFrame
37{
38public:
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.
4cc4bfaf 43 @a splashStyle is a bitlist of some of the following:
23324ae1
FM
44 wxSPLASH_CENTRE_ON_PARENT
45 wxSPLASH_CENTRE_ON_SCREEN
46 wxSPLASH_NO_CENTRE
47 wxSPLASH_TIMEOUT
48 wxSPLASH_NO_TIMEOUT
4cc4bfaf 49 @a milliseconds is the timeout in milliseconds.
23324ae1
FM
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 */
328f5751 68 long GetSplashStyle() const;
23324ae1
FM
69
70 /**
71 Returns the window used to display the bitmap.
72 */
328f5751 73 wxSplashScreenWindow* GetSplashWindow() const;
23324ae1
FM
74
75 /**
76 Returns the timeout in milliseconds.
77 */
328f5751 78 int GetTimeout() const;
23324ae1
FM
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};
e54c96f1 86