1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Splash screen class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma interface "splash.h"
20 #include "wx/bitmap.h"
28 * A window for displaying a splash screen
31 #define wxSPLASH_CENTRE_ON_PARENT 0x01
32 #define wxSPLASH_CENTRE_ON_SCREEN 0x02
33 #define wxSPLASH_NO_CENTRE 0x00
34 #define wxSPLASH_TIMEOUT 0x04
35 #define wxSPLASH_NO_TIMEOUT 0x00
37 class WXDLLEXPORT wxSplashScreenWindow
;
43 class WXDLLEXPORT wxSplashScreen
: public wxFrame
46 // for RTTI macros only
48 wxSplashScreen(const wxBitmap
& bitmap
, long splashStyle
, int milliseconds
,
49 wxWindow
* parent
, wxWindowID id
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
,
52 long style
= wxSIMPLE_BORDER
|wxFRAME_NO_TASKBAR
|wxSTAY_ON_TOP
);
55 void OnCloseWindow(wxCloseEvent
& event
);
56 void OnNotify(wxTimerEvent
& event
);
58 long GetSplashStyle() const { return m_splashStyle
; }
59 wxSplashScreenWindow
* GetSplashWindow() const { return m_window
; }
60 int GetTimeout() const { return m_milliseconds
; }
63 wxSplashScreenWindow
* m_window
;
68 DECLARE_DYNAMIC_CLASS(wxSplashScreen
)
73 * wxSplashScreenWindow
76 class WXDLLEXPORT wxSplashScreenWindow
: public wxWindow
79 wxSplashScreenWindow(const wxBitmap
& bitmap
, wxWindow
* parent
, wxWindowID id
, const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
, long style
= wxNO_BORDER
);
81 void OnPaint(wxPaintEvent
& event
);
82 void OnEraseBackground(wxEraseEvent
& event
);
83 void OnMouseEvent(wxMouseEvent
& event
);
84 void OnChar(wxKeyEvent
& event
);
86 void SetBitmap(const wxBitmap
& bitmap
) { m_bitmap
= bitmap
; }
87 wxBitmap
& GetBitmap() { return m_bitmap
; }