+ // update the label to show the given time (in seconds)
+ static void SetTimeLabel(unsigned long val, wxStaticText *label);
+
+ // common part of all ctors
+ void Init();
+
+ // 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
+ wxStaticText *CreateLabel(const wxString& text, wxSizer *sizer);
+
+ // updates the label message
+ void UpdateMessage(const wxString &newmsg);
+
+ // common part of Update() and Pulse(), returns true if not cancelled
+ bool DoBeforeUpdate(bool *skip);
+
+ // common part of Update() and Pulse()
+ void DoAfterUpdate();
+
+ // shortcuts for enabling buttons
+ void EnableClose();
+ void EnableSkip(bool enable = true);
+ void EnableAbort(bool enable = true);
+ void DisableSkip() { EnableSkip(false); }
+ void DisableAbort() { EnableAbort(false); }
+
+ // the widget displaying current status (may be NULL)
+ wxGauge *m_gauge;
+ // the message displayed
+ wxStaticText *m_msg;
+ // displayed elapsed, estimated, remaining time
+ wxStaticText *m_elapsed,
+ *m_estimated,
+ *m_remaining;
+
+ // parent top level window (may be NULL)
+ wxWindow *m_parentTop;
+
+ // Progress dialog styles: this is not the same as m_windowStyle because
+ // wxPD_XXX constants clash with the existing TLW styles so to be sure we
+ // don't have any conflicts we just use a separate variable for storing
+ // them.
+ int m_pdStyle;
+
+ // 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
+
+ // saves the time when elapsed time was updated so there is only one
+ // update per second
+ unsigned long m_last_timeupdate;
+
+ // tells how often a change of the estimated time has to be confirmed
+ // before it is actually displayed - this reduces the frequency of updates
+ // of estimated and remaining time
+ int m_delay;
+
+ // counts the confirmations
+ int m_ctdelay;
+ unsigned long m_display_estimated;
+
+ // for wxPD_APP_MODAL case
+ wxWindowDisabler *m_winDisabler;