From e81851eb9c46584e04bd9b2505e4176508fc60ef Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 9 Sep 2006 19:36:27 +0000 Subject: [PATCH] Pulse mode in gauge git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_cmndlgs.i | 24 +++++++++++++++++++++++- wxPython/src/_defs.i | 9 --------- wxPython/src/_gauge.i | 3 +++ 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index bb15ae0138..c00b23f787 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -729,6 +729,17 @@ public: //--------------------------------------------------------------------------- +enum { + wxPD_AUTO_HIDE, + wxPD_APP_MODAL, + wxPD_CAN_ABORT, + wxPD_ELAPSED_TIME, + wxPD_ESTIMATED_TIME, + wxPD_REMAINING_TIME, + wxPD_SMOOTH, + wxPD_CAN_SKIP +}; + DocStr(wxProgressDialog, "A dialog that shows a short message and a progress bar. Optionally, it @@ -794,7 +805,8 @@ parent window only.", ""); // only if style is set. This is so the API doesn't change for existing // users... DocDeclAStr( - virtual bool , Update(int value, const wxString& newmsg = wxPyEmptyString, + virtual bool , Update(int value, + const wxString& newmsg = wxPyEmptyString, bool *OUTPUT), "Update(self, int value, String newmsg) --> (continue, skip)", "Updates the dialog, setting the progress bar to the new value and, if @@ -810,6 +822,16 @@ immediately destroy the dialog or ask the user for confirmation, and if the abort is not confirmed the dialog may be resumed with `Resume` function. ", ""); + + DocDeclAStr( + virtual bool , UpdatePulse(const wxString& newmsg = wxPyEmptyString, + bool *OUTPUT), + "UpdatePulse(self, String newmsg) --> (continue, skip)", + "Just like `Update` but switches the dialog to use a gauge in +interminante mode and calls `wx.Gauge.Pulse` to show the user a bit of +progress.", ""); + + DocDeclStr( void , Resume(), "Can be used to continue with the dialog, after the user had chosen to diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index c2b5eb4fb2..c0534eff69 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -692,15 +692,6 @@ enum { wxID_HIGHEST, - wxPD_AUTO_HIDE, - wxPD_APP_MODAL, - wxPD_CAN_ABORT, - wxPD_ELAPSED_TIME, - wxPD_ESTIMATED_TIME, - wxPD_REMAINING_TIME, - wxPD_SMOOTH, - wxPD_CAN_SKIP, - wxMENU_TEAROFF, wxMB_DOCKABLE, wxNO_FULL_REPAINT_ON_RESIZE, diff --git a/wxPython/src/_gauge.i b/wxPython/src/_gauge.i index 71302de644..6c5c16c5b6 100644 --- a/wxPython/src/_gauge.i +++ b/wxPython/src/_gauge.i @@ -59,6 +59,9 @@ public: virtual void SetValue(int pos); virtual int GetValue() const; + // indeterminate mode API + virtual void Pulse(); + // simple accessors bool IsVertical() const;