1
/////////////////////////////////////////////////////////////////////////////
2
// Name: wx/generic/splash.h
3
// Purpose: Splash screen class
4
// Author: Julian Smart
7
// RCS-ID: $Id: splash.h 69796 2011-11-22 13:18:55Z VZ $
8
// Copyright: (c) Julian Smart
9
// Licence: wxWindows Licence
10
/////////////////////////////////////////////////////////////////////////////
15
#include "wx/bitmap.h"
16
#include "wx/eventfilter.h"
22
* A window for displaying a splash screen
25
#define wxSPLASH_CENTRE_ON_PARENT 0x01
26
#define wxSPLASH_CENTRE_ON_SCREEN 0x02
27
#define wxSPLASH_NO_CENTRE 0x00
28
#define wxSPLASH_TIMEOUT 0x04
29
#define wxSPLASH_NO_TIMEOUT 0x00
31
class WXDLLIMPEXP_FWD_ADV wxSplashScreenWindow;
37
class WXDLLIMPEXP_ADV wxSplashScreen: public wxFrame,
41
// for RTTI macros only
42
wxSplashScreen() { Init(); }
43
wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
44
wxWindow* parent, wxWindowID id,
45
const wxPoint& pos = wxDefaultPosition,
46
const wxSize& size = wxDefaultSize,
47
long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
48
virtual ~wxSplashScreen();
50
void OnCloseWindow(wxCloseEvent& event);
51
void OnNotify(wxTimerEvent& event);
53
long GetSplashStyle() const { return m_splashStyle; }
54
wxSplashScreenWindow* GetSplashWindow() const { return m_window; }
55
int GetTimeout() const { return m_milliseconds; }
57
// Override wxEventFilter method to hide splash screen on any user input.
58
virtual int FilterEvent(wxEvent& event);
61
// Common part of all ctors.
64
wxSplashScreenWindow* m_window;
69
DECLARE_DYNAMIC_CLASS(wxSplashScreen)
71
wxDECLARE_NO_COPY_CLASS(wxSplashScreen);
75
* wxSplashScreenWindow
78
class WXDLLIMPEXP_ADV wxSplashScreenWindow: public wxWindow
81
wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER);
83
void OnPaint(wxPaintEvent& event);
84
void OnEraseBackground(wxEraseEvent& event);
86
void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
87
wxBitmap& GetBitmap() { return m_bitmap; }
93
wxDECLARE_NO_COPY_CLASS(wxSplashScreenWindow);