*** 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 #include "wx/busyinfo.h"
24
25
26
27
28
29 wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message)
30 : wxFrame(parent, -1, "", wxPoint(0, 0), wxSize(400, 80), wxTHICK_FRAME | wxSIMPLE_BORDER | wxFRAME_TOOL_WINDOW)
31 {
32 wxPanel *p = new wxPanel(this);
33 wxStaticText *s = new wxStaticText(p, -1, message, wxPoint(20, 20), wxSize(360, 40), wxALIGN_CENTER);
34 Centre(wxBOTH);
35 p -> SetCursor(*wxHOURGLASS_CURSOR);
36 s -> SetCursor(*wxHOURGLASS_CURSOR);
37 }
38
39
40
41
42 wxBusyInfo::wxBusyInfo(const wxString& message) : wxObject()
43 {
44 m_InfoFrame = new wxInfoFrame(NULL, message);
45 m_InfoFrame -> Show(TRUE);
46 wxYield();
47 m_InfoFrame -> Refresh();
48 wxYield();
49 }
50
51
52
53 wxBusyInfo::~wxBusyInfo()
54 {
55 m_InfoFrame -> Show(FALSE);
56 m_InfoFrame -> Close();
57 wxYield();
58 }
59
60
61
62
63
64
65
66
67
68
69