wxPD_CAN_SKIP for skipping parts of progress and reintroduced wxPD_SMOOTH after removal of modal dialog flag.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-12-30 15:07:28 +00:00
parent e7b97da356
commit ecda94753a
6 changed files with 126 additions and 46 deletions

View File

@@ -1531,10 +1531,9 @@ enum wxBorder
#define wxPD_AUTO_HIDE 0x0004
#define wxPD_ELAPSED_TIME 0x0008
#define wxPD_ESTIMATED_TIME 0x0010
/* wxGA_SMOOTH = 0x0020 may also be used with wxProgressDialog */
/* NO!!! This is wxDIALOG_MODAL and will cause the progress dialog to */
/* be modal. No progress will then be made at all. */
#define wxPD_SMOOTH 0x0020
#define wxPD_REMAINING_TIME 0x0040
#define wxPD_CAN_SKIP 0x0080
/*
* wxDirDialog styles

View File

@@ -16,7 +16,7 @@
#pragma interface "progdlgg.h"
#endif
#include "wx/setup.h"
#include "wx/defs.h"
#if wxUSE_PROGRESSDLG
@@ -55,7 +55,7 @@ public:
@param newmsg if used, new message to display
@returns true if ABORT button has not been pressed
*/
virtual bool Update(int value, const wxString& newmsg = wxEmptyString);
virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL);
/* Can be called to continue after the cancel button has been pressed, but
the program decided to continue the operation (e.g., user didn't
@@ -69,6 +69,9 @@ protected:
// callback for optional abort button
void OnCancel(wxCommandEvent& event);
// callback for optional skip button
void OnSkip(wxCommandEvent& event);
// callback to disable "hard" window closing
void OnClose(wxCloseEvent& event);
@@ -108,8 +111,14 @@ private:
Finished // finished, waiting to be removed from screen
} m_state;
// the abort button (or NULL if none)
// skip some portion
bool m_skip;
#if !defined(__SMARTPHONE__)
// the abort and skip buttons (or NULL if none)
wxButton *m_btnAbort;
wxButton *m_btnSkip;
#endif
// the maximum value
int m_maximum;