| 1 | \section{\class{wxProgressDialog}}\label{wxprogressdialog} |
| 2 | |
| 3 | This class represents a dialog that shows a short message and a |
| 4 | progress bar. Optionally, it can display an ABORT button. |
| 5 | |
| 6 | \wxheading{Derived from} |
| 7 | |
| 8 | \helpref{wxFrame}{wxframe}\\ |
| 9 | \helpref{wxWindow}{wxwindow}\\ |
| 10 | \helpref{wxEvtHandler}{wxevthandler}\\ |
| 11 | \helpref{wxObject}{wxobject} |
| 12 | |
| 13 | \wxheading{Include files} |
| 14 | |
| 15 | <wx/progdlg.h> |
| 16 | |
| 17 | \latexignore{\rtfignore{\wxheading{Members}}} |
| 18 | |
| 19 | \membersection{wxProgressDialog::wxProgressDialog}\label{wxprogressdialogconstr} |
| 20 | |
| 21 | \func{}{wxProgressDialog}{\param{const wxString\& }{title}, |
| 22 | \param{const wxString\& }{message},\rtfsp |
| 23 | \param{int }{maximum = 100}, |
| 24 | \param{wxWindow * }{parent = NULL},\rtfsp |
| 25 | \param{int }{style = wxPD\_AUTO\_HIDE | wxPD\_APP\_MODAL}} |
| 26 | |
| 27 | Constructor. Creates the dialog, displays it and disables user input |
| 28 | for other windows, or, if wxPD\_APP\_MODAL flag is not given, for its parent |
| 29 | window only. |
| 30 | |
| 31 | \wxheading{Parameters} |
| 32 | |
| 33 | \docparam{title}{Dialog title to show in titlebar.} |
| 34 | |
| 35 | \docparam{message}{Message displayed above the progress bar.} |
| 36 | |
| 37 | \docparam{maximum}{Maximum value for the progress bar.} |
| 38 | |
| 39 | \docparam{parent}{Parent window.} |
| 40 | |
| 41 | \docparam{message}{Message to show on the dialog.} |
| 42 | |
| 43 | \docparam{style}{The dialog style. This is the combination of the following |
| 44 | bitmask constants defined in wx/defs.h: |
| 45 | |
| 46 | \twocolwidtha{7cm} |
| 47 | \begin{twocollist}\itemsep=0pt |
| 48 | \twocolitem{wxPD\_APP\_MODAL}{Make the progress dialog modal. If this flag is |
| 49 | not given, it is only "locally" modal - that is the input to the parent |
| 50 | window is disabled, but not to the other ones.} |
| 51 | \twocolitem{wxPD\_AUTO\_HIDE}{By default, the progress dialog will disappear |
| 52 | from screen as soon as the maximum value of the progress meter has been |
| 53 | reached. This flag prevents it from doing it - instead the dialog will wait |
| 54 | until the user closes it.} |
| 55 | \twocolitem{wxPD\_CAN\_ABORT}{This flag tells the dialog that it should have a |
| 56 | "Cancel" button which the user may press. If this happens, the next call to |
| 57 | \helpref{Update()}{wxprogressdialogupdate} will return FALSE.} |
| 58 | \twocolitem{wxPD\_ELAPSED\_TIME}{This flag tells the dialog that it should show elapsed time (since creating the dialog).} |
| 59 | \twocolitem{wxPD\_ESTIMATED\_TIME}{This flag tells the dialog that it should show estimated time.} |
| 60 | \twocolitem{wxPD\_REMAINING\_TIME}{This flag tells the dialog that it should show remaining time.} |
| 61 | \twocolitem{wxGA\_SMOOTH}{This flag tells the dialog that it should use |
| 62 | smooth gauge (has effect only under 32bit Windows).} |
| 63 | \end{twocollist}% |
| 64 | } |
| 65 | |
| 66 | \membersection{wxProgressDialog::\destruct{wxProgressDialog}} |
| 67 | |
| 68 | \func{}{\destruct{wxMessageDialog}}{\void} |
| 69 | |
| 70 | Destructor. Deletes the dialog and enables all top level windows. |
| 71 | |
| 72 | \membersection{wxProgressDialog::Update}\label{wxprogressdialogupdate} |
| 73 | |
| 74 | \func{bool}{Update}{ |
| 75 | \param{int }{value = -1},\rtfsp |
| 76 | \param{const char * }{newmsg = NULL}, } |
| 77 | |
| 78 | Updates the dialog, setting the progress bar to the new value and, if |
| 79 | given changes the message above it. Returns TRUE if the ABORT button |
| 80 | has \emph{not} been pressed. |
| 81 | |
| 82 | If FALSE is returned, the application can either immediately destroy the dialog |
| 83 | or ask the user for the confirmation and if the abort is not confirmed the |
| 84 | dialog may be resumed with \helpref{Resume}{wxprogressdialogresume} function. |
| 85 | |
| 86 | \docparam{value}{The new value of the progress meter. It must be strictly less |
| 87 | than the maximum value given to the constructor (i.e., as usual in C, the |
| 88 | index runs from $0$ to $maximum-1$).} |
| 89 | \docparam{newmsg}{The new messages for the progress dialog text, if none is |
| 90 | given the message is not changed.} |
| 91 | |
| 92 | \membersection{wxProgressDialog::Resume}\label{wxprogressdialogresume} |
| 93 | |
| 94 | \func{void}{Resume}{\void} |
| 95 | |
| 96 | Can be used to continue with the dialog, after the user had chosen |
| 97 | ABORT. |
| 98 | |