home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2240.zip / wxWindows-2.4.0 / include / wx / generic / splash.h < prev    next >
C/C++ Source or Header  |  2002-08-31  |  3KB  |  98 lines

  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: splash.h,v 1.5 2002/08/31 11:29:12 GD Exp $
  8. // Copyright:   (c) Julian Smart
  9. // Licence:
  10. /////////////////////////////////////////////////////////////////////////////
  11.  
  12. #if defined(__GNUG__) && !defined(__APPLE__)
  13. #pragma interface "splash.h"
  14. #endif
  15.  
  16. #ifndef _WX_SPLASH_H_
  17. #define _WX_SPLASH_H_
  18.  
  19. #ifndef WX_PRECOMP
  20. #include "wx/bitmap.h"
  21. #include "wx/timer.h"
  22. #endif
  23.  
  24. #include "wx/frame.h"
  25.  
  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.     // for RTTI macros only
  47.     wxSplashScreen() {};
  48.     wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
  49.                    wxWindow* parent, wxWindowID id,
  50.                    const wxPoint& pos = wxDefaultPosition,
  51.                    const wxSize& size = wxDefaultSize,
  52.                    long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
  53.     ~wxSplashScreen();
  54.  
  55.     void OnCloseWindow(wxCloseEvent& event);
  56.     void OnNotify(wxTimerEvent& event);
  57.  
  58.     long GetSplashStyle() const { return m_splashStyle; }
  59.     wxSplashScreenWindow* GetSplashWindow() const { return m_window; }
  60.     int GetTimeout() const { return m_milliseconds; }
  61.  
  62. protected:
  63.     wxSplashScreenWindow*   m_window;
  64.     long                    m_splashStyle;
  65.     int                     m_milliseconds;
  66.     wxTimer                 m_timer;
  67.  
  68. DECLARE_DYNAMIC_CLASS(wxSplashScreen)
  69. DECLARE_EVENT_TABLE()
  70. };
  71.  
  72. /*
  73.  * wxSplashScreenWindow
  74.  */
  75.  
  76. class WXDLLEXPORT wxSplashScreenWindow: public wxWindow
  77. {
  78. public:
  79.     wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER);
  80.  
  81.     void OnPaint(wxPaintEvent& event);
  82.     void OnEraseBackground(wxEraseEvent& event);
  83.     void OnMouseEvent(wxMouseEvent& event);
  84.     void OnChar(wxKeyEvent& event);
  85.  
  86.     void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
  87.     wxBitmap& GetBitmap() { return m_bitmap; }
  88.  
  89. protected:
  90.     wxBitmap    m_bitmap;
  91.  
  92. DECLARE_EVENT_TABLE()
  93. };
  94.  
  95.  
  96. #endif
  97.     // _WX_SPLASH_H_
  98.