X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e77570de2ecd420abf6c5642eb7fbdde616494c7..58ce18f2fdadecffb21e27555115af708325cf18:/include/wx/generic/progdlgg.h diff --git a/include/wx/generic/progdlgg.h b/include/wx/generic/progdlgg.h index 20ee5a17be..0840acceff 100644 --- a/include/wx/generic/progdlgg.h +++ b/include/wx/generic/progdlgg.h @@ -57,17 +57,18 @@ public: // This enum is an implementation detail and should not be used // by user code. - enum ProgressDialogState + enum State { Uncancelable = -1, // dialog can't be canceled Canceled, // can be cancelled and, in fact, was Continue, // can be cancelled but wasn't - Finished // finished, waiting to be removed from screen + Finished, // finished, waiting to be removed from screen + Dismissed // was closed by user after finishing }; protected: // This ctor is used by the native MSW implementation only. - wxGenericProgressDialog(wxWindow *parent, int maximum, int style); + wxGenericProgressDialog(wxWindow *parent, int style); void Create(const wxString& title, const wxString& message, @@ -75,6 +76,12 @@ protected: wxWindow *parent, int style); + // Update just the m_maximum field, this is used by public SetRange() but, + // unlike it, doesn't update the controls state. This makes it useful for + // both this class and its derived classes that don't use m_gauge to + // display progress. + void SetMaximum(int maximum); + // Return the labels to use for showing the elapsed/estimated/remaining // times respectively. static wxString GetElapsedLabel() { return _("Elapsed time:"); } @@ -121,7 +128,7 @@ protected: // continue processing or not (return value for Update()) - ProgressDialogState m_state; + State m_state; // the maximum value int m_maximum; @@ -144,7 +151,7 @@ private: static void SetTimeLabel(unsigned long val, wxStaticText *label); // common part of all ctors - void Init(wxWindow *parent, int maximum, int style); + void Init(wxWindow *parent, int style); // create the label with given text and another one to show the time nearby // as the next windows in the sizer, returns the created control