1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/splash.h
3 // Purpose: Splash screen class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/bitmap.h"
21 * A window for displaying a splash screen
24 #define wxSPLASH_CENTRE_ON_PARENT 0x01
25 #define wxSPLASH_CENTRE_ON_SCREEN 0x02
26 #define wxSPLASH_NO_CENTRE 0x00
27 #define wxSPLASH_TIMEOUT 0x04
28 #define wxSPLASH_NO_TIMEOUT 0x00
30 class WXDLLIMPEXP_FWD_ADV wxSplashScreenWindow
;
36 class WXDLLIMPEXP_ADV wxSplashScreen
: public wxFrame
39 // for RTTI macros only
41 wxSplashScreen(const wxBitmap
& bitmap
, long splashStyle
, int milliseconds
,
42 wxWindow
* parent
, wxWindowID id
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
45 long style
= wxSIMPLE_BORDER
|wxFRAME_NO_TASKBAR
|wxSTAY_ON_TOP
);
46 virtual ~wxSplashScreen();
48 void OnCloseWindow(wxCloseEvent
& event
);
49 void OnNotify(wxTimerEvent
& event
);
51 long GetSplashStyle() const { return m_splashStyle
; }
52 wxSplashScreenWindow
* GetSplashWindow() const { return m_window
; }
53 int GetTimeout() const { return m_milliseconds
; }
56 wxSplashScreenWindow
* m_window
;
61 DECLARE_DYNAMIC_CLASS(wxSplashScreen
)
63 wxDECLARE_NO_COPY_CLASS(wxSplashScreen
);
67 * wxSplashScreenWindow
70 class WXDLLIMPEXP_ADV wxSplashScreenWindow
: public wxWindow
73 wxSplashScreenWindow(const wxBitmap
& bitmap
, wxWindow
* parent
, wxWindowID id
, const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
, long style
= wxNO_BORDER
);
75 void OnPaint(wxPaintEvent
& event
);
76 void OnEraseBackground(wxEraseEvent
& event
);
77 void OnMouseEvent(wxMouseEvent
& event
);
78 void OnChar(wxKeyEvent
& event
);
80 void SetBitmap(const wxBitmap
& bitmap
) { m_bitmap
= bitmap
; }
81 wxBitmap
& GetBitmap() { return m_bitmap
; }
87 wxDECLARE_NO_COPY_CLASS(wxSplashScreenWindow
);