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