]>
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 | |
9 | // Licence: | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma interface "splash.h" | |
14 | #endif | |
15 | ||
16 | #ifndef _WX_SPLASH_H_ | |
17 | #define _WX_SPLASH_H_ | |
18 | ||
d84d25dd VZ |
19 | #ifndef WX_PRECOMP |
20 | #include "wx/bitmap.h" | |
3f4fc796 | 21 | #include "wx/timer.h" |
d84d25dd VZ |
22 | #endif |
23 | ||
24 | #include "wx/frame.h" | |
25 | ||
3f4fc796 JS |
26 | |
27 | /* | |
28 | * A window for displaying a splash screen | |
29 | */ | |
30 | ||
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 | |
36 | ||
37 | class WXDLLEXPORT wxSplashScreenWindow; | |
38 | ||
39 | /* | |
40 | * wxSplashScreen | |
41 | */ | |
42 | ||
43 | class WXDLLEXPORT wxSplashScreen: public wxFrame | |
44 | { | |
45 | public: | |
46 | wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSIMPLE_BORDER|wxFRAME_FLOAT_ON_PARENT); | |
47 | ~wxSplashScreen(); | |
48 | ||
49 | void OnCloseWindow(wxCloseEvent& event); | |
50 | void OnNotify(wxTimerEvent& event); | |
51 | ||
52 | long GetSplashStyle() const { return m_splashStyle; } | |
53 | wxSplashScreenWindow* GetSplashWindow() const { return m_window; } | |
54 | int GetTimeout() const { return m_milliseconds; } | |
55 | ||
56 | protected: | |
57 | wxSplashScreenWindow* m_window; | |
58 | long m_splashStyle; | |
59 | int m_milliseconds; | |
60 | wxTimer m_timer; | |
61 | ||
62 | DECLARE_EVENT_TABLE() | |
63 | }; | |
64 | ||
65 | /* | |
66 | * wxSplashScreenWindow | |
67 | */ | |
68 | ||
69 | class WXDLLEXPORT wxSplashScreenWindow: public wxWindow | |
70 | { | |
71 | public: | |
72 | wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER); | |
73 | ||
74 | void OnPaint(wxPaintEvent& event); | |
75 | void OnEraseBackground(wxEraseEvent& event); | |
76 | void OnMouseEvent(wxMouseEvent& event); | |
77 | void OnChar(wxKeyEvent& event); | |
78 | ||
79 | void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } | |
80 | wxBitmap& GetBitmap() { return m_bitmap; } | |
81 | ||
82 | protected: | |
83 | wxBitmap m_bitmap; | |
84 | ||
85 | DECLARE_EVENT_TABLE() | |
86 | }; | |
87 | ||
88 | ||
89 | #endif | |
90 | // _WX_SPLASH_H_ |