*** empty log message ***
[wxWidgets.git] / src / generic / busyinfo.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: busyinfo.cpp
3 // Purpose: Information window when app is busy
4 // Author: Vaclav Slavik
5 // Copyright: (c) 1999 Vaclav Slavik
6 // Licence: wxWindows Licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifdef __GNUG__
10 #pragma implementation
11 #endif
12
13 #include <wx/wxprec.h>
14
15 #ifdef __BORDLANDC__
16 #pragma hdrstop
17 #endif
18
19 #ifndef WXPRECOMP
20 #include <wx/wx.h>
21 #endif
22
23 #if wxUSE_BUSYINFO
24
25 #include "wx/busyinfo.h"
26
27
28
29
30
31 wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message)
32 : wxFrame(parent, -1, "", wxPoint(0, 0), wxSize(400, 80), wxTHICK_FRAME | wxSIMPLE_BORDER | wxFRAME_TOOL_WINDOW)
33 {
34 wxPanel *p = new wxPanel(this);
35 wxStaticText *s = new wxStaticText(p, -1, message, wxPoint(20, 20), wxSize(360, 40), wxALIGN_CENTER);
36 Centre(wxBOTH);
37 p -> SetCursor(*wxHOURGLASS_CURSOR);
38 s -> SetCursor(*wxHOURGLASS_CURSOR);
39 }
40
41
42
43
44 wxBusyInfo::wxBusyInfo(const wxString& message) : wxObject()
45 {
46 m_InfoFrame = new wxInfoFrame(NULL, message);
47 m_InfoFrame -> Show(TRUE);
48 wxYield();
49 m_InfoFrame -> Refresh();
50 wxYield();
51 }
52
53
54
55 wxBusyInfo::~wxBusyInfo()
56 {
57 m_InfoFrame -> Show(FALSE);
58 m_InfoFrame -> Close();
59 wxYield();
60 }
61
62
63
64 #endif