]>
Commit | Line | Data |
---|---|---|
410bfc93 WS |
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
2 | %% Name: progdlg.tex | |
3 | %% Purpose: wxProgressDialog documentation | |
4 | %% Author: wxWidgets Team | |
5 | %% Modified by: | |
6 | %% Created: 01.06.03 | |
7 | %% RCS-ID: $Id$ | |
8 | %% Copyright: (c) wxWidgets Team | |
9 | %% License: wxWindows license | |
10 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
11 | ||
8fa2e6a2 KB |
12 | \section{\class{wxProgressDialog}}\label{wxprogressdialog} |
13 | ||
14 | This class represents a dialog that shows a short message and a | |
23ac7605 RR |
15 | progress bar. Optionally, it can display ABORT and SKIP buttons, |
16 | the elapsed, remaining and estimated time for the end of the progress. | |
17 | ||
8fa2e6a2 KB |
18 | |
19 | \wxheading{Derived from} | |
20 | ||
74d88854 | 21 | \helpref{wxDialog}{wxdialog}\\ |
8fa2e6a2 KB |
22 | \helpref{wxWindow}{wxwindow}\\ |
23 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
24 | \helpref{wxObject}{wxobject} | |
25 | ||
26 | \wxheading{Include files} | |
27 | ||
28 | <wx/progdlg.h> | |
29 | ||
23ac7605 RR |
30 | |
31 | \wxheading{Window styles} | |
32 | ||
33 | \twocolwidtha{7cm} | |
34 | \begin{twocollist}\itemsep=0pt | |
35 | \twocolitem{\windowstyle{wxPD\_APP\_MODAL}}{Make the progress dialog modal. If this flag is | |
36 | not given, it is only "locally" modal - that is the input to the parent | |
37 | window is disabled, but not to the other ones.} | |
38 | \twocolitem{\windowstyle{wxPD\_AUTO\_HIDE}}{Causes the progress dialog to disappear | |
39 | from screen as soon as the maximum value of the progress meter has been | |
40 | reached.} | |
41 | \twocolitem{\windowstyle{wxPD\_SMOOTH}}{Causes smooth progress of the gauge control.} | |
42 | \twocolitem{\windowstyle{wxPD\_CAN\_ABORT}}{This flag tells the dialog that it should have a | |
43 | "Cancel" button which the user may press. If this happens, the next call to | |
44 | \helpref{Update()}{wxprogressdialogupdate} will return false.} | |
45 | \twocolitem{\windowstyle{wxPD\_CAN\_SKIP}}{This flag tells the dialog that it should have a | |
46 | "Skip" button which the user may press. If this happens, the next call to | |
47 | \helpref{Update()}{wxprogressdialogupdate} will return true in its skip parameter.} | |
48 | \twocolitem{\windowstyle{wxPD\_ELAPSED\_TIME}}{This flag tells the dialog that it should show elapsed time (since creating the dialog).} | |
49 | \twocolitem{\windowstyle{wxPD\_ESTIMATED\_TIME}}{This flag tells the dialog that it should show estimated time.} | |
50 | \twocolitem{\windowstyle{wxPD\_REMAINING\_TIME}}{This flag tells the dialog that it should show remaining time.} | |
51 | \end{twocollist}% | |
52 | ||
53 | ||
8fa2e6a2 KB |
54 | \latexignore{\rtfignore{\wxheading{Members}}} |
55 | ||
3e79fa75 | 56 | \membersection{wxProgressDialog::wxProgressDialog}\label{wxprogressdialogctor} |
8fa2e6a2 | 57 | |
2723cfeb JS |
58 | \func{}{wxProgressDialog}{\param{const wxString\& }{title}, |
59 | \param{const wxString\& }{message},\rtfsp | |
60 | \param{int }{maximum = 100}, | |
61 | \param{wxWindow * }{parent = NULL},\rtfsp | |
62 | \param{int }{style = wxPD\_AUTO\_HIDE | wxPD\_APP\_MODAL}} | |
8fa2e6a2 KB |
63 | |
64 | Constructor. Creates the dialog, displays it and disables user input | |
88ac883a | 65 | for other windows, or, if wxPD\_APP\_MODAL flag is not given, for its parent |
8fa2e6a2 KB |
66 | window only. |
67 | ||
68 | \wxheading{Parameters} | |
69 | ||
70 | \docparam{title}{Dialog title to show in titlebar.} | |
71 | ||
72 | \docparam{message}{Message displayed above the progress bar.} | |
73 | ||
74 | \docparam{maximum}{Maximum value for the progress bar.} | |
75 | ||
76 | \docparam{parent}{Parent window.} | |
77 | ||
23ac7605 | 78 | \docparam{style}{The dialog style. See \helpref{wxProgressDialog}{wxprogressdialog}.} |
8fa2e6a2 | 79 | |
3e79fa75 | 80 | \membersection{wxProgressDialog::\destruct{wxProgressDialog}}\label{wxprogressdialogdtor} |
8fa2e6a2 | 81 | |
410bfc93 | 82 | \func{}{\destruct{wxProgressDialog}}{\void} |
2723cfeb JS |
83 | |
84 | Destructor. Deletes the dialog and enables all top level windows. | |
8fa2e6a2 | 85 | |
edb24720 JS |
86 | \membersection{wxProgressDialog::Resume}\label{wxprogressdialogresume} |
87 | ||
88 | \func{void}{Resume}{\void} | |
89 | ||
90 | Can be used to continue with the dialog, after the user had chosen | |
91 | ABORT. | |
92 | ||
8fa2e6a2 KB |
93 | \membersection{wxProgressDialog::Update}\label{wxprogressdialogupdate} |
94 | ||
3f54c58d | 95 | \func{virtual bool}{Update}{ |
3492e7c8 | 96 | \param{int }{value},\rtfsp |
ecda9475 WS |
97 | \param{const wxString\& }{newmsg = ""},\rtfsp |
98 | \param{bool *}{skip = NULL}} | |
8fa2e6a2 KB |
99 | |
100 | Updates the dialog, setting the progress bar to the new value and, if | |
23ac7605 | 101 | given changes the message above it. Returns \true unless the Cancel button |
3492e7c8 | 102 | has been pressed. |
8fa2e6a2 | 103 | |
23ac7605 | 104 | If \false is returned, the application can either immediately destroy the dialog |
88ac883a VZ |
105 | or ask the user for the confirmation and if the abort is not confirmed the |
106 | dialog may be resumed with \helpref{Resume}{wxprogressdialogresume} function. | |
107 | ||
3492e7c8 VZ |
108 | \wxheading{Parameters} |
109 | ||
37db0913 VZ |
110 | \docparam{value}{The new value of the progress meter. It should be less than or |
111 | equal to the maximum value given to the constructor and the dialog is closed if | |
112 | it is equal to the maximum.} | |
3492e7c8 VZ |
113 | \docparam{newmsg}{The new messages for the progress dialog text, if it is |
114 | empty (which is the default) the message is not changed.} | |
410bfc93 | 115 | \docparam{skip}{If "Skip" button was pressed since last |
23ac7605 RR |
116 | \helpref{Update}{wxprogressdialogupdate} call, this is set to true.} |
117 | ||
118 | ||
119 | \membersection{wxProgressDialog::UpdatePulse}\label{wxprogressdialogupdatepulse} | |
120 | ||
121 | \func{virtual bool}{UpdatePulse}{ | |
122 | \param{const wxString\& }{newmsg = ""},\rtfsp | |
123 | \param{bool *}{skip = NULL}} | |
124 | ||
125 | Just like \helpref{Update}{wxprogressdialogupdate} but makes | |
126 | the gauge control run in indeterminate mode (see \helpref{wxGauge}{wxgauge} documentation), | |
127 | sets the remaining and the estimated time labels (if present) to {\tt Unknown} and moves | |
128 | the progress bar a bit to indicate that some progress was done. |