Add wxProgressDialog::Was{Cancelled,Skipped}() convenience methods.

Although the information about "Cancel" and "Skip" buttons presses is returned
from Update(), sometimes it may be more convenient to ask the dialog about
whether it was cancelled or skipped instead of storing it in the program
itself.

Add the methods which allow to check for this.

Closes #10903.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-04-20 11:10:33 +00:00
parent ccb3689a19
commit f994a8ac8d
4 changed files with 44 additions and 0 deletions

View File

@@ -538,6 +538,18 @@ void wxProgressDialog::SetRange(int maximum)
#endif // __WXMSW__
}
bool wxProgressDialog::WasCancelled() const
{
return m_hasAbortButton && m_state == Canceled;
}
bool wxProgressDialog::WasSkipped() const
{
return m_hasSkipButton && m_skip;
}
// ----------------------------------------------------------------------------
// event handlers
// ----------------------------------------------------------------------------