1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Splash screen class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
16 #include "wx/bitmap.h"
24 * A window for displaying a splash screen
27 #define wxSPLASH_CENTRE_ON_PARENT 0x01
28 #define wxSPLASH_CENTRE_ON_SCREEN 0x02
29 #define wxSPLASH_NO_CENTRE 0x00
30 #define wxSPLASH_TIMEOUT 0x04
31 #define wxSPLASH_NO_TIMEOUT 0x00
33 class WXDLLIMPEXP_ADV wxSplashScreenWindow
;
39 class WXDLLIMPEXP_ADV wxSplashScreen
: public wxFrame
42 // for RTTI macros only
44 wxSplashScreen(const wxBitmap
& bitmap
, long splashStyle
, int milliseconds
,
45 wxWindow
* parent
, wxWindowID id
,
46 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxSize
& size
= wxDefaultSize
,
48 long style
= wxSIMPLE_BORDER
|wxFRAME_NO_TASKBAR
|wxSTAY_ON_TOP
);
51 void OnCloseWindow(wxCloseEvent
& event
);
52 void OnNotify(wxTimerEvent
& event
);
54 long GetSplashStyle() const { return m_splashStyle
; }
55 wxSplashScreenWindow
* GetSplashWindow() const { return m_window
; }
56 int GetTimeout() const { return m_milliseconds
; }
59 wxSplashScreenWindow
* m_window
;
64 DECLARE_DYNAMIC_CLASS(wxSplashScreen
)
66 DECLARE_NO_COPY_CLASS(wxSplashScreen
)
70 * wxSplashScreenWindow
73 class WXDLLIMPEXP_ADV wxSplashScreenWindow
: public wxWindow
76 wxSplashScreenWindow(const wxBitmap
& bitmap
, wxWindow
* parent
, wxWindowID id
, const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
, long style
= wxNO_BORDER
);
78 void OnPaint(wxPaintEvent
& event
);
79 void OnEraseBackground(wxEraseEvent
& event
);
80 void OnMouseEvent(wxMouseEvent
& event
);
81 void OnChar(wxKeyEvent
& event
);
83 void SetBitmap(const wxBitmap
& bitmap
) { m_bitmap
= bitmap
; }
84 wxBitmap
& GetBitmap() { return m_bitmap
; }
90 DECLARE_NO_COPY_CLASS(wxSplashScreenWindow
)