1wxProgressDialog(3) Erlang Module Definition wxProgressDialog(3)
2
3
4
6 wxProgressDialog - Functions for wxProgressDialog class
7
9 If supported by the platform this class will provide the platform's na‐
10 tive progress dialog, else it will simply be the wxGenericProgressDia‐
11 log (not implemented in wx).
12
13 This class is derived (and can use functions) from: wxDialog wxTo‐
14 pLevelWindow wxWindow wxEvtHandler
15
16 wxWidgets docs: wxProgressDialog
17
19 wxProgressDialog() = wx:wx_object()
20
22 new(Title, Message) -> wxProgressDialog()
23
24 Types:
25
26 Title = Message = unicode:chardata()
27
28 new(Title, Message, Options :: [Option]) -> wxProgressDialog()
29
30 Types:
31
32 Title = Message = unicode:chardata()
33 Option =
34 {maximum, integer()} |
35 {parent, wxWindow:wxWindow()} |
36 {style, integer()}
37
38 resume(This) -> ok
39
40 Types:
41
42 This = wxProgressDialog()
43
44 Can be used to continue with the dialog, after the user had
45 clicked the "Abort" button.
46
47 update(This, Value) -> boolean()
48
49 Types:
50
51 This = wxProgressDialog()
52 Value = integer()
53
54 update(This, Value, Options :: [Option]) -> boolean()
55
56 Types:
57
58 This = wxProgressDialog()
59 Value = integer()
60 Option = {newmsg, unicode:chardata()}
61
62 Updates the dialog, setting the progress bar to the new value
63 and updating the message if new one is specified.
64
65 Returns true unless the "Cancel" button has been pressed.
66
67 If false is returned, the application can either immediately de‐
68 stroy the dialog or ask the user for the confirmation and if the
69 abort is not confirmed the dialog may be resumed with resume/1
70 function.
71
72 If value is the maximum value for the dialog, the behaviour of
73 the function depends on whether wxPD_AUTO_HIDE was used when the
74 dialog was created. If it was, the dialog is hidden and the
75 function returns immediately. If it was not, the dialog becomes
76 a modal dialog and waits for the user to dismiss it, meaning
77 that this function does not return until this happens.
78
79 Notice that if newmsg is longer than the currently shown mes‐
80 sage, the dialog will be automatically made wider to account for
81 it. However if the new message is shorter than the previous one,
82 the dialog doesn't shrink back to avoid constant resizes if the
83 message is changed often. To do this and fit the dialog to its
84 current contents you may call wxWindow:fit/1 explicitly. However
85 the native MSW implementation of this class does make the dialog
86 shorter if the new text has fewer lines of text than the old
87 one, so it is recommended to keep the number of lines of text
88 constant in order to avoid jarring dialog size changes. You may
89 also want to make the initial message, specified when creating
90 the dialog, wide enough to avoid having to resize the dialog
91 later, e.g. by appending a long string of unbreakable spaces
92 (wxString (not implemented in wx)(L'\u00a0', 100)) to it.
93
94 destroy(This :: wxProgressDialog()) -> ok
95
96 Destroys the object.
97
98
99
100wxWidgets team. wx 2.1.4 wxProgressDialog(3)