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