]>
Commit | Line | Data |
---|---|---|
3f4fc796 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: splash.h | |
3 | // Purpose: Splash screen class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 28/6/2000 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
99d80019 | 9 | // Licence: wxWindows Licence |
3f4fc796 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
3f4fc796 JS |
12 | #ifndef _WX_SPLASH_H_ |
13 | #define _WX_SPLASH_H_ | |
14 | ||
d84d25dd VZ |
15 | #ifndef WX_PRECOMP |
16 | #include "wx/bitmap.h" | |
3f4fc796 | 17 | #include "wx/timer.h" |
d84d25dd VZ |
18 | #endif |
19 | ||
20 | #include "wx/frame.h" | |
21 | ||
3f4fc796 JS |
22 | |
23 | /* | |
24 | * A window for displaying a splash screen | |
25 | */ | |
26 | ||
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 | |
32 | ||
12f190b0 | 33 | class WXDLLIMPEXP_ADV wxSplashScreenWindow; |
3f4fc796 JS |
34 | |
35 | /* | |
36 | * wxSplashScreen | |
37 | */ | |
38 | ||
12f190b0 | 39 | class WXDLLIMPEXP_ADV wxSplashScreen: public wxFrame |
3f4fc796 JS |
40 | { |
41 | public: | |
479101ca | 42 | // for RTTI macros only |
6fb99eb3 | 43 | wxSplashScreen() {} |
479101ca RD |
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); | |
3f4fc796 JS |
49 | ~wxSplashScreen(); |
50 | ||
51 | void OnCloseWindow(wxCloseEvent& event); | |
52 | void OnNotify(wxTimerEvent& event); | |
53 | ||
54 | long GetSplashStyle() const { return m_splashStyle; } | |
55 | wxSplashScreenWindow* GetSplashWindow() const { return m_window; } | |
56 | int GetTimeout() const { return m_milliseconds; } | |
57 | ||
58 | protected: | |
59 | wxSplashScreenWindow* m_window; | |
60 | long m_splashStyle; | |
61 | int m_milliseconds; | |
62 | wxTimer m_timer; | |
63 | ||
12f190b0 VS |
64 | DECLARE_DYNAMIC_CLASS(wxSplashScreen) |
65 | DECLARE_EVENT_TABLE() | |
22f3361e | 66 | DECLARE_NO_COPY_CLASS(wxSplashScreen) |
3f4fc796 JS |
67 | }; |
68 | ||
69 | /* | |
70 | * wxSplashScreenWindow | |
71 | */ | |
72 | ||
12f190b0 | 73 | class WXDLLIMPEXP_ADV wxSplashScreenWindow: public wxWindow |
3f4fc796 JS |
74 | { |
75 | public: | |
76 | wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER); | |
77 | ||
78 | void OnPaint(wxPaintEvent& event); | |
79 | void OnEraseBackground(wxEraseEvent& event); | |
80 | void OnMouseEvent(wxMouseEvent& event); | |
81 | void OnChar(wxKeyEvent& event); | |
82 | ||
83 | void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } | |
84 | wxBitmap& GetBitmap() { return m_bitmap; } | |
85 | ||
86 | protected: | |
87 | wxBitmap m_bitmap; | |
88 | ||
2eb10e2a VZ |
89 | DECLARE_EVENT_TABLE() |
90 | DECLARE_NO_COPY_CLASS(wxSplashScreenWindow) | |
3f4fc796 JS |
91 | }; |
92 | ||
93 | ||
94 | #endif | |
95 | // _WX_SPLASH_H_ |