1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     Splash screen class 
   4 // Author:      Julian Smart 
   8 // Copyright:   (c) Julian Smart 
  10 ///////////////////////////////////////////////////////////////////////////// 
  13 #pragma interface "splash.h" 
  23  * A window for displaying a splash screen 
  26 #define wxSPLASH_CENTRE_ON_PARENT   0x01 
  27 #define wxSPLASH_CENTRE_ON_SCREEN   0x02 
  28 #define wxSPLASH_NO_CENTRE          0x00 
  29 #define wxSPLASH_TIMEOUT            0x04 
  30 #define wxSPLASH_NO_TIMEOUT         0x00 
  32 class WXDLLEXPORT wxSplashScreenWindow
; 
  38 class WXDLLEXPORT wxSplashScreen
: public wxFrame
 
  41     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
); 
  44     void OnCloseWindow(wxCloseEvent
& event
); 
  45     void OnNotify(wxTimerEvent
& event
); 
  47     long GetSplashStyle() const { return m_splashStyle
; } 
  48     wxSplashScreenWindow
* GetSplashWindow() const { return m_window
; } 
  49     int GetTimeout() const { return m_milliseconds
; } 
  52     wxSplashScreenWindow
*   m_window
; 
  61  * wxSplashScreenWindow 
  64 class WXDLLEXPORT wxSplashScreenWindow
: public wxWindow
 
  67     wxSplashScreenWindow(const wxBitmap
& bitmap
, wxWindow
* parent
, wxWindowID id
, const wxPoint
& pos 
= wxDefaultPosition
, const wxSize
& size 
= wxDefaultSize
, long style 
= wxNO_BORDER
); 
  69     void OnPaint(wxPaintEvent
& event
); 
  70     void OnEraseBackground(wxEraseEvent
& event
); 
  71     void OnMouseEvent(wxMouseEvent
& event
); 
  72     void OnChar(wxKeyEvent
& event
); 
  74     void SetBitmap(const wxBitmap
& bitmap
) { m_bitmap 
= bitmap
; } 
  75     wxBitmap
& GetBitmap() { return m_bitmap
; }