BEGIN_EVENT_TABLE(wxProgressDialog, wxDialog)
EVT_BUTTON(wxID_CANCEL, wxProgressDialog::OnCancel)
BEGIN_EVENT_TABLE(wxProgressDialog, wxDialog)
EVT_BUTTON(wxID_CANCEL, wxProgressDialog::OnCancel)
EVT_CLOSE(wxProgressDialog::OnClose)
END_EVENT_TABLE()
IMPLEMENT_CLASS(wxProgressDialog, wxDialog)
// ============================================================================
EVT_CLOSE(wxProgressDialog::OnClose)
END_EVENT_TABLE()
IMPLEMENT_CLASS(wxProgressDialog, wxDialog)
// ============================================================================
// ============================================================================
// ----------------------------------------------------------------------------
// ============================================================================
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
wxProgressDialog::wxProgressDialog(wxString const &title,
// ----------------------------------------------------------------------------
wxProgressDialog::wxProgressDialog(wxString const &title,
// we can't have values > 65,536 in the progress control under Windows, so
// scale everything down
m_factor = m_maximum / 65536 + 1;
// we can't have values > 65,536 in the progress control under Windows, so
// scale everything down
m_factor = m_maximum / 65536 + 1;
long widthText;
dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL);
long widthText;
dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL);
c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
#else // !MSW
c->centreX.SameAs(this, wxCentreX);
#endif // MSW/!MSW
c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
#else // !MSW
c->centreX.SameAs(this, wxCentreX);
#endif // MSW/!MSW
c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
// VZ: I like the labels be centered - if the others don't mind, you may
// remove "#ifdef __WXMSW__" and use it for all ports
// VZ: I like the labels be centered - if the others don't mind, you may
// remove "#ifdef __WXMSW__" and use it for all ports
c->left.SameAs(this, wxCentreX, LAYOUT_X_MARGIN);
#else // !MSW
c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
c->left.SameAs(this, wxCentreX, LAYOUT_X_MARGIN);
#else // !MSW
c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
- if ( !newmsg )
- {
- // also provide the finishing message if the application didn't
- m_msg->SetLabel(_("Done."));
- }
-
- // so that we return TRUE below and that out [Cancel] handler knew what
- // to do
- m_state = Finished;
+ if ( !newmsg )
+ {
+ // also provide the finishing message if the application didn't
+ m_msg->SetLabel(_("Done."));
+ }
// ----------------------------------------------------------------------------
// event handlers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// event handlers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// destruction
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// destruction
// ----------------------------------------------------------------------------