]> git.saurik.com Git - wxWidgets.git/blob - src/generic/busyinfo.cpp
wxIsAbsolutePath is strange under wxMac
[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 "busyinfo.h"
11 #endif
12
13 #include "wx/wxprec.h"
14
15 #ifdef __BORDLANDC__
16 #pragma hdrstop
17 #endif
18
19 #if wxUSE_BUSYINFO
20
21 #include "wx/busyinfo.h"
22 #include "wx/stattext.h"
23 #include "wx/panel.h"
24 #include "wx/utils.h"
25
26
27 wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message)
28 : wxFrame(parent, -1, wxT(""), wxPoint(0, 0), wxSize(400, 80), wxTHICK_FRAME | wxSIMPLE_BORDER | wxFRAME_TOOL_WINDOW)
29 {
30 wxPanel *p = new wxPanel( this );
31 wxStaticText *s = new wxStaticText( p, -1, message, wxPoint(20, 20), wxSize(360, 40), wxALIGN_CENTER );
32 Centre(wxBOTH);
33 p->SetCursor(*wxHOURGLASS_CURSOR);
34 s->SetCursor(*wxHOURGLASS_CURSOR);
35 }
36
37 wxBusyInfo::wxBusyInfo(const wxString& message) : wxObject()
38 {
39 m_InfoFrame = new wxInfoFrame( (wxWindow*) NULL, message);
40 m_InfoFrame->Show(TRUE);
41 wxYield();
42 m_InfoFrame->Refresh();
43 wxYield();
44 }
45
46 wxBusyInfo::~wxBusyInfo()
47 {
48 m_InfoFrame->Show(FALSE);
49 m_InfoFrame->Close();
50 wxYield();
51 }
52
53 #endif
54 // wxUSE_BUSYINFO
55