00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __WXXTRA_ADVSPLASH_H
00010 #define __WXXTRA_ADVSPLASH_H
00011
00012 #include <wx/wx.h>
00013
00014 class wxAdvSplashScreenWindow;
00015
00016
00017
00018
00019
00020 class wxAdvSplashScreen: public wxFrame
00021 {
00022 public:
00023
00024 wxAdvSplashScreen() {}
00025 wxAdvSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
00026 wxWindow* parent, wxWindowID id,
00027 const wxPoint& pos = wxDefaultPosition,
00028 const wxSize& size = wxDefaultSize,
00029 long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
00030 ~wxAdvSplashScreen();
00031
00032 void OnCloseWindow(wxCloseEvent& event);
00033 void OnNotify(wxTimerEvent& event);
00034
00035 long GetSplashStyle() const { return m_splashStyle; }
00036 wxAdvSplashScreenWindow* GetSplashWindow() const { return m_window; }
00037 int GetTimeout() const { return m_milliseconds; }
00038
00039 protected:
00040 wxAdvSplashScreenWindow* m_window;
00041 long m_splashStyle;
00042 int m_milliseconds;
00043 wxTimer m_timer;
00044
00045 DECLARE_DYNAMIC_CLASS(wxAdvSplashScreen)
00046 DECLARE_EVENT_TABLE()
00047 DECLARE_NO_COPY_CLASS(wxAdvSplashScreen)
00048 };
00049
00050
00051
00052
00053
00054 class wxAdvSplashScreenWindow: public wxWindow
00055 {
00056 public:
00057 wxAdvSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER);
00058
00059 void OnPaint(wxPaintEvent& event);
00060 void OnEraseBackground(wxEraseEvent& event);
00061 void OnMouseEvent(wxMouseEvent& event);
00062 void OnChar(wxKeyEvent& event);
00063
00064 void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
00065 wxBitmap& GetBitmap() { return m_bitmap; }
00066
00067 protected:
00068 wxBitmap m_bitmap;
00069
00070 DECLARE_EVENT_TABLE()
00071 DECLARE_NO_COPY_CLASS(wxAdvSplashScreenWindow)
00072 };
00073
00074
00075
00076 #endif