]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/splash.h
Fixed to work with the new wxMacControl system.
[wxWidgets.git] / include / wx / generic / splash.h
CommitLineData
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
12028905 12#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
3f4fc796
JS
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
12f190b0 37class WXDLLIMPEXP_ADV wxSplashScreenWindow;
3f4fc796
JS
38
39/*
40 * wxSplashScreen
41 */
42
12f190b0 43class WXDLLIMPEXP_ADV wxSplashScreen: public wxFrame
3f4fc796
JS
44{
45public:
479101ca 46 // for RTTI macros only
d1d2cd38 47 wxSplashScreen() {};
479101ca
RD
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);
3f4fc796
JS
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
62protected:
63 wxSplashScreenWindow* m_window;
64 long m_splashStyle;
65 int m_milliseconds;
66 wxTimer m_timer;
67
12f190b0
VS
68 DECLARE_DYNAMIC_CLASS(wxSplashScreen)
69 DECLARE_EVENT_TABLE()
22f3361e 70 DECLARE_NO_COPY_CLASS(wxSplashScreen)
3f4fc796
JS
71};
72
73/*
74 * wxSplashScreenWindow
75 */
76
12f190b0 77class WXDLLIMPEXP_ADV wxSplashScreenWindow: public wxWindow
3f4fc796
JS
78{
79public:
80 wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER);
81
82 void OnPaint(wxPaintEvent& event);
83 void OnEraseBackground(wxEraseEvent& event);
84 void OnMouseEvent(wxMouseEvent& event);
85 void OnChar(wxKeyEvent& event);
86
87 void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
88 wxBitmap& GetBitmap() { return m_bitmap; }
89
90protected:
91 wxBitmap m_bitmap;
92
2eb10e2a
VZ
93 DECLARE_EVENT_TABLE()
94 DECLARE_NO_COPY_CLASS(wxSplashScreenWindow)
3f4fc796
JS
95};
96
97
98#endif
99 // _WX_SPLASH_H_