1 <sect1 id="Repeater_Widget">
2 <title>Repeater Widget</title>
4 <!-- Repeater Widget -->
6 <!-- .IN "Repeater widget" "" "@DEF@" -->
7 <literallayout class="monospaced">
11 Application header file <X11/Xaw/Repeater.h>
12 <!-- .IN "Repeater.h" "" -->
13 Class header file <X11/Xaw/RepeaterP.h>
14 <!-- .IN "RepeaterP.h" "" -->
15 Class repeaterWidgetClass
16 <!-- .IN "repeaterWidgetClass" "" -->
18 <!-- .IN "Repeater widget" "class name" -->
24 The Repeater widget is a subclass of the Command widget; see the <!-- xref -->
25 Command documentation for details. The difference is that the Repeater can call its
26 registered callbacks repeatedly, at an increasing rate. The default translation
27 does so for the duration the user holds down pointer button 1 while the pointer
30 <sect2 id='Repeater::Resources'>
31 <title>Resources</title>
34 When creating a Repeater widget instance, the following resources are
35 retrieved from the argument list or from the resource database:
39 <!-- .IN "Repeater widget" "resources" -->
41 <tgroup cols='5' align='center'>
42 <colspec colname='c1'/>
43 <colspec colname='c2'/>
44 <colspec colname='c3'/>
45 <colspec colname='c4'/>
46 <colspec colname='c5'/>
53 <entry>Default Value</entry>
58 <entry>accelerators</entry>
59 <entry>Accelerators</entry>
60 <entry>AcceleratorTable</entry>
65 <entry>ancestorSensitive</entry>
66 <entry>AncestorSensitive</entry>
67 <entry>Boolean</entry>
72 <entry>background</entry>
73 <entry>Background</entry>
76 <entry>XtDefaultBackground</entry>
79 <entry>backgroundPixmap</entry>
83 <entry>XtUnspecifiedPixmap</entry>
93 <entry>borderColor</entry>
94 <entry>BorderColor</entry>
97 <entry>XtDefaultForeground</entry>
100 <entry>borderPixmap</entry>
101 <entry>Pixmap</entry>
102 <entry>Pixmap</entry>
104 <entry>XtUnspecifiedPixmap</entry>
107 <entry>borderWidth</entry>
108 <entry>BorderWidth</entry>
109 <entry>Dimension</entry>
114 <entry>callback</entry>
115 <entry>Callback</entry>
116 <entry>XtCallbackList</entry>
121 <entry>colormap</entry>
122 <entry>Colormap</entry>
123 <entry>Colormap</entry>
125 <entry>Parent's Colormap</entry>
128 <entry>cornerRoundPercent</entry>
129 <entry>CornerRoundPercent</entry>
130 <entry>Dimension</entry>
135 <entry>cursor</entry>
136 <entry>Cursor</entry>
137 <entry>Cursor</entry>
142 <entry>cursorName</entry>
143 <entry>Cursor</entry>
144 <entry>String</entry>
160 <entry>Parent's Depth</entry>
163 <entry>destroyCallback</entry>
164 <entry>Callback</entry>
165 <entry>XtCallbackList</entry>
170 <entry>encoding</entry>
171 <entry>Encoding</entry>
172 <entry>UnsignedChar</entry>
174 <entry>XawTextEncoding8bit</entry>
178 <entry>Boolean</entry>
179 <entry>Boolean</entry>
186 <entry>XFontStruct</entry>
188 <entry>XtDefaultFont</entry>
191 <entry>fontSet</entry>
192 <entry>FontSet</entry>
193 <entry>XFontSet</entry>
195 <entry>XtDefaultFontSet</entry>
198 <entry>foreground</entry>
199 <entry>Foreground</entry>
202 <entry>XtDefaultForeground</entry>
205 <entry>height</entry>
206 <entry>Height</entry>
207 <entry>Dimension</entry>
209 <entry>graphic height + 2 * <function>internalHeight</function></entry>
212 <entry>highlightThickness</entry>
213 <entry>Thickness</entry>
214 <entry>Dimension</entry>
216 <entry>2 (0 if Shaped)</entry>
219 <entry>initialDelay</entry>
226 <entry>insensitiveBorder</entry>
227 <entry>Insensitive</entry>
228 <entry>Pixmap</entry>
230 <entry>GreyPixmap</entry>
233 <entry>internalHeight</entry>
234 <entry>Height</entry>
235 <entry>Dimension</entry>
240 <entry>internalWidth</entry>
242 <entry>Dimension</entry>
247 <entry>international</entry>
248 <entry>International</entry>
249 <entry>Boolean</entry>
254 <entry>justify</entry>
255 <entry>Justify</entry>
256 <entry>Justify</entry>
258 <entry>XtJustifyCenter (center)</entry>
263 <entry>String</entry>
265 <entry>name of widget</entry>
268 <entry>leftBitmap</entry>
269 <entry>LeftBitmap</entry>
270 <entry>Bitmap</entry>
275 <entry>mappedWhenManaged</entry>
276 <entry>MappedWhenManaged</entry>
277 <entry>Boolean</entry>
282 <entry>minimumDelay</entry>
283 <entry>MinimumDelay</entry>
289 <entry>pointerColor</entry>
290 <entry>Foreground</entry>
293 <entry>XtDefaultForeground</entry>
296 <entry>pointerColorBackground</entry>
297 <entry>Background</entry>
300 <entry>XtDefaultBackground</entry>
303 <entry>repeatDelay</entry>
310 <entry>resize</entry>
311 <entry>Resize</entry>
312 <entry>Boolean</entry>
317 <entry>screen</entry>
318 <entry>Screen</entry>
319 <entry>Pointer</entry>
321 <entry>Parent's Screen</entry>
324 <entry>sensitive</entry>
325 <entry>Sensitive</entry>
326 <entry>Boolean</entry>
331 <entry>shapeStyle</entry>
332 <entry>ShapeStyle</entry>
333 <entry>ShapeStyle</entry>
335 <entry>Rectangle</entry>
338 <entry>startCallback</entry>
339 <entry>StartCallback</entry>
340 <entry>Callback</entry>
345 <entry>stopCallback</entry>
346 <entry>StopCallback</entry>
347 <entry>Callback</entry>
352 <entry>translations</entry>
353 <entry>Translations</entry>
354 <entry>TranslationTable</entry>
356 <entry>See below</entry>
361 <entry>Dimension</entry>
363 <entry>graphic width + 2 * <function>internalWidth</function></entry>
367 <entry>Position</entry>
368 <entry>Position</entry>
374 <entry>Position</entry>
375 <entry>Position</entry>
382 \" Resource Descriptions
399 <function>decay</function>
403 The number of milliseconds that should be subtracted from each succeeding
404 interval while the Repeater button is being held down until the interval
405 has reached <function>minimumDelay</function> milliseconds.
414 <function>flash</function>
418 Whether or not to flash the Repeater button whenever the timer goes off.
429 <function>initialDelay</function>
433 The number of milliseconds between the beginning of the Repeater button
434 being held down and the first invocation of the <function>callback</function> function.
447 <function>minimumDelay</function>
451 The minimum time between callbacks in milliseconds.
459 <function>repeatDelay</function>
463 The number of milliseconds between each callback after the first (minus an
464 increasing number of <function>decay</function>s).
474 <function>startCallback</function>
478 The list of functions to invoke by the <function>start</function> action (typically
479 when the Repeater button is first pressed). The callback data parameter
486 <function>stopCallback</function>
490 The list of functions to invoke by the <function>stop</function> action (typically
491 when the Repeater button is released). The callback data parameter
501 <sect2 id="Repeater_Actions">
502 <title>Repeater Actions</title>
503 <!-- .IN "Repeater widget" "actions" -->
506 The Repeater widget supports the following actions beyond those of the Command
511 <function>start</function>()
515 This invokes the functions on the <function>startCallback</function> and <function>callback</function> lists
516 and sets a timer to go off in <function>initialDelay</function> milliseconds. The timer
517 will cause the <function>callback</function> functions to be invoked with increasing
518 frequency until the <function>stop</function> action occurs.
524 <function>stop</function>()
528 This invokes the functions on the <function>stopCallback</function> list and prevents any
529 further timers from occuring until the next <function>start</function> action.
538 <!-- .IN "Repeater widget" "translation bindings" -->
539 The following are the default translation bindings used by the
544 <literallayout class="monospaced">
545 <!-- .TA .5i 2.25i -->
546 <!-- .ta .5i 2.25i -->
547 <EnterWindow>: highlight(\|)
548 <LeaveWindow>: unhighlight(\|)
549 <Btn1Down>: set(\|) start(\|)
550 <Btn1Up>: stop(\|) unset(\|)