]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/generic/splash.h
more extra semicolons removed (patch 1303724)
[wxWidgets.git] / include / wx / generic / splash.h
... / ...
CommitLineData
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: wxWindows Licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SPLASH_H_
13#define _WX_SPLASH_H_
14
15#ifndef WX_PRECOMP
16#include "wx/bitmap.h"
17#include "wx/timer.h"
18#endif
19
20#include "wx/frame.h"
21
22
23/*
24 * A window for displaying a splash screen
25 */
26
27#define wxSPLASH_CENTRE_ON_PARENT 0x01
28#define wxSPLASH_CENTRE_ON_SCREEN 0x02
29#define wxSPLASH_NO_CENTRE 0x00
30#define wxSPLASH_TIMEOUT 0x04
31#define wxSPLASH_NO_TIMEOUT 0x00
32
33class WXDLLIMPEXP_ADV wxSplashScreenWindow;
34
35/*
36 * wxSplashScreen
37 */
38
39class WXDLLIMPEXP_ADV wxSplashScreen: public wxFrame
40{
41public:
42 // for RTTI macros only
43 wxSplashScreen() {}
44 wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
45 wxWindow* parent, wxWindowID id,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
49 ~wxSplashScreen();
50
51 void OnCloseWindow(wxCloseEvent& event);
52 void OnNotify(wxTimerEvent& event);
53
54 long GetSplashStyle() const { return m_splashStyle; }
55 wxSplashScreenWindow* GetSplashWindow() const { return m_window; }
56 int GetTimeout() const { return m_milliseconds; }
57
58protected:
59 wxSplashScreenWindow* m_window;
60 long m_splashStyle;
61 int m_milliseconds;
62 wxTimer m_timer;
63
64 DECLARE_DYNAMIC_CLASS(wxSplashScreen)
65 DECLARE_EVENT_TABLE()
66 DECLARE_NO_COPY_CLASS(wxSplashScreen)
67};
68
69/*
70 * wxSplashScreenWindow
71 */
72
73class WXDLLIMPEXP_ADV wxSplashScreenWindow: public wxWindow
74{
75public:
76 wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER);
77
78 void OnPaint(wxPaintEvent& event);
79 void OnEraseBackground(wxEraseEvent& event);
80 void OnMouseEvent(wxMouseEvent& event);
81 void OnChar(wxKeyEvent& event);
82
83 void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
84 wxBitmap& GetBitmap() { return m_bitmap; }
85
86protected:
87 wxBitmap m_bitmap;
88
89 DECLARE_EVENT_TABLE()
90 DECLARE_NO_COPY_CLASS(wxSplashScreenWindow)
91};
92
93
94#endif
95 // _WX_SPLASH_H_