1wxGauge(3) Erlang Module Definition wxGauge(3)
2
3
4
6 wxGauge - Functions for wxGauge class
7
9 A gauge is a horizontal or vertical bar which shows a quantity (often
10 time).
11
12 wxGauge supports two working modes: determinate and indeterminate
13 progress.
14
15 The first is the usual working mode (see setValue/2 and setRange/2)
16 while the second can be used when the program is doing some processing
17 but you don't know how much progress is being done. In this case, you
18 can periodically call the pulse/1 function to make the progress bar
19 switch to indeterminate mode (graphically it's usually a set of blocks
20 which move or bounce in the bar control).
21
22 wxGauge supports dynamic switch between these two work modes.
23
24 There are no user commands for the gauge.
25
26 Styles
27
28 This class supports the following styles:
29
30 See: wxSlider, wxScrollBar
31
32 This class is derived (and can use functions) from: wxControl wxWindow
33 wxEvtHandler
34
35 wxWidgets docs: wxGauge
36
38 wxGauge() = wx:wx_object()
39
41 new() -> wxGauge()
42
43 Default constructor.
44
45 new(Parent, Id, Range) -> wxGauge()
46
47 Types:
48
49 Parent = wxWindow:wxWindow()
50 Id = Range = integer()
51
52 new(Parent, Id, Range, Options :: [Option]) -> wxGauge()
53
54 Types:
55
56 Parent = wxWindow:wxWindow()
57 Id = Range = integer()
58 Option =
59 {pos, {X :: integer(), Y :: integer()}} |
60 {size, {W :: integer(), H :: integer()}} |
61 {style, integer()} |
62 {validator, wx:wx_object()}
63
64 Constructor, creating and showing a gauge.
65
66 See: create/5
67
68 destroy(This :: wxGauge()) -> ok
69
70 Destructor, destroying the gauge.
71
72 create(This, Parent, Id, Range) -> boolean()
73
74 Types:
75
76 This = wxGauge()
77 Parent = wxWindow:wxWindow()
78 Id = Range = integer()
79
80 create(This, Parent, Id, Range, Options :: [Option]) -> boolean()
81
82 Types:
83
84 This = wxGauge()
85 Parent = wxWindow:wxWindow()
86 Id = Range = integer()
87 Option =
88 {pos, {X :: integer(), Y :: integer()}} |
89 {size, {W :: integer(), H :: integer()}} |
90 {style, integer()} |
91 {validator, wx:wx_object()}
92
93 Creates the gauge for two-step construction.
94
95 See new/4 for further details.
96
97 getRange(This) -> integer()
98
99 Types:
100
101 This = wxGauge()
102
103 Returns the maximum position of the gauge.
104
105 See: setRange/2
106
107 getValue(This) -> integer()
108
109 Types:
110
111 This = wxGauge()
112
113 Returns the current position of the gauge.
114
115 See: setValue/2
116
117 isVertical(This) -> boolean()
118
119 Types:
120
121 This = wxGauge()
122
123 Returns true if the gauge is vertical (has wxGA_VERTICAL style)
124 and false otherwise.
125
126 setRange(This, Range) -> ok
127
128 Types:
129
130 This = wxGauge()
131 Range = integer()
132
133 Sets the range (maximum value) of the gauge.
134
135 This function makes the gauge switch to determinate mode, if
136 it's not already.
137
138 When the gauge is in indeterminate mode, under wxMSW the gauge
139 repeatedly goes from zero to range and back; under other ports
140 when in indeterminate mode, the range setting is ignored.
141
142 See: getRange/1
143
144 setValue(This, Pos) -> ok
145
146 Types:
147
148 This = wxGauge()
149 Pos = integer()
150
151 Sets the position of the gauge.
152
153 The pos must be between 0 and the gauge range as returned by ge‐
154 tRange/1, inclusive.
155
156 This function makes the gauge switch to determinate mode, if it
157 was in indeterminate mode before.
158
159 See: getValue/1
160
161 pulse(This) -> ok
162
163 Types:
164
165 This = wxGauge()
166
167 Switch the gauge to indeterminate mode (if required) and makes
168 the gauge move a bit to indicate the user that some progress has
169 been made.
170
171 Note: After calling this function the value returned by get‐
172 Value/1 is undefined and thus you need to explicitly call set‐
173 Value/2 if you want to restore the determinate mode.
174
175
176
177wxWidgets team. wx 2.1 wxGauge(3)