X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc31a982ecb52ae6197c8856606eb85fe05a3a76..d3fa4bc22e84e3ca4d88cc1772f2d414140a1017:/interface/wx/progdlg.h diff --git a/interface/wx/progdlg.h b/interface/wx/progdlg.h index 517202bac5..8fab60b62b 100644 --- a/interface/wx/progdlg.h +++ b/interface/wx/progdlg.h @@ -6,13 +6,27 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#define wxPD_CAN_ABORT 0x0001 +#define wxPD_APP_MODAL 0x0002 +#define wxPD_AUTO_HIDE 0x0004 +#define wxPD_ELAPSED_TIME 0x0008 +#define wxPD_ESTIMATED_TIME 0x0010 +#define wxPD_SMOOTH 0x0020 +#define wxPD_REMAINING_TIME 0x0040 +#define wxPD_CAN_SKIP 0x0080 + /** - @class wxProgressDialog + @class wxGenericProgressDialog This class represents a dialog that shows a short message and a progress bar. Optionally, it can display ABORT and SKIP buttons, and the elapsed, remaining and estimated time for the end of the progress. + This class provides a generic implementation of the progress dialog. If + the platform has a native progress dialog available then it will be + accessible using the @a wxProgressDialog class, otherwise it will + essentially be the same as this class. + Note that you must be aware that wxProgressDialog internally calls wxEventLoopBase::YieldFor with @c wxEVT_CATEGORY_UI and @c wxEVT_CATEGORY_USER_INPUT and this may cause unwanted re-entrancies or the out-of-order processing @@ -51,10 +65,10 @@ This flag tells the dialog that it should show remaining time. @endStyleTable - @library{wxbase} + @library{wxcore} @category{cmndlg} */ -class wxProgressDialog : public wxDialog +class wxGenericProgressDialog : public wxDialog { public: /** @@ -75,15 +89,15 @@ public: @param style The dialog style. See wxProgressDialog. */ - wxProgressDialog(const wxString& title, const wxString& message, - int maximum = 100, - wxWindow* parent = NULL, - int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL); + wxGenericProgressDialog(const wxString& title, const wxString& message, + int maximum = 100, + wxWindow* parent = NULL, + int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL); /** Destructor. Deletes the dialog and enables all top level windows. */ - virtual ~wxProgressDialog(); + virtual ~wxGenericProgressDialog(); /** Returns the last value passed to the Update() function or @@ -114,7 +128,7 @@ public: Like Update() but makes the gauge control run in indeterminate mode. In indeterminate mode the remaining and the estimated time labels (if - present) are set to to "Unknown" or to @a newmsg (if it's non-empty). + present) are set to "Unknown" or to @a newmsg (if it's non-empty). Each call to this function moves the progress bar a bit to indicate that some progress was done. @@ -197,3 +211,20 @@ public: bool* skip = NULL); }; + + + +/** + @class wxProgressDialog + + If supported by the platform this class will provide the platform's native + progress dialog, else it will simply be the @a wxGenericProgressDialog. +*/ +class wxProgressDialog : public wxGenericProgressDialog +{ +public: + wxProgressDialog( const wxString& title, const wxString& message, + int maximum = 100, + wxWindow *parent = NULL, + int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE ); +};