### _________________________________________________________Xaw Plus

### The Repeater Widget

Application Header file Class Header file Class Class Name Superclass | <X11/XawPlus/Repeater.h> <X11/XawPlus/RepeaterP.h> repeaterWidgetClass Repeater Command

The Repeater widget is a version of the Command button that triggers at an increasing rate while it is held down. It is typically used to implement valuators or certain types of scrollbars.

### Differences between Xaw and XawPlus

Since the 3D extensions of Simple are inserted, the Repeater widget has the additional resources highlightColor, shadowColor and buttonBorderWidth. The default background color is now grey75. These three colors and the width of the button border are used to draw the shape of a button with the inherited methods of the Simple class. Since XawPlus only supply rectangular buttons, the resources shapeStyle and cornerRoundPercent has no meaning.

The bitmap and leftBitmap resources now also provide support of XPM styled pixmaps. These resources are inherited from the Label widget class. Look there for a description of this new feature.

Repeater provides tooltips, inherited from Command. If a help text and useHelp is set in the resources, a help window is popped up afer 1.2 seconds when the mouse pointer stay over the widgets window.

### Resources

When creating a Command widget instance, the following resources are retrieved from the argument list of XtSetValues() or XtVaSetValues() or from the resource database:

Name | Class | Type | Default Value
OBJECT: |  |  |
destroyCallback | Callback | Pointer | NULL
RECTANGLE: |  |  |
borderWidth height sensitive width x y | BorderWidth Height Sensitive Width Position Position | Dimension Dimension Boolean Dimension Position Position | 0 12 True 12 0 0
CORE: |  |  |
border background mappedWhenManaged | BorderColor Background MappedWhenManaged | Pixel Pixel Boolean | XtDefaultForeground grey75 True
SIMPLE: |  |  |
cursor cursorName pointerColor pointerColorBackground insensitiveBorder international highlightColor shadowColor buttonBorderWidth | Cursor Cursor Foreground Background Insensitive International Background Background Width | Cursor String Pixel Pixel Pixmap Boolean Pixel Pixel Dimension | None NULL XtDefaultForeground XtDefaultBackground NULL False grey90 grey40 2
LABEL: |  |  |
font fontset encoding foreground internalHeight internalWidth justify resize truncateLabel truncLeftSide label leftBitmap leftClipMask bitmap clipMask | Font FontSet Encoding Foreground Height Width Justify Resize Truncate Truncate Label LeftBitmap LeftBitmap Pixmap Pixmap | XFontStruct* FontSet unsigned char Pixel Dimension Dimension XtJustify Boolean Boolean Boolean String Bitmap ClipMask Bitmap ClipMask | XtDefaultFont XtDefaultFontSet XawTextEncoding8bit XtDefaultForeground 2 4 XtJustifyCenter True True False NULL None None None None
COMMAND: |  |  |
helpText helpBackground useHelp highlightThickness highlightMode callback translations accelerators ancestorSensitive | Label Background Boolean Thickness Boolean Callback Translations Accelerators AncestorSensitive | String Pixel Boolean Dimension Boolean XtCallbackList TranslationTable AcceleratorTable Boolean | NULL LightGoldenrodYellow True 2 True NULL see doc or source NULL True
REPEATER: |  |  |
decay flash initialDelay minimumDelay repeatDelay startCallback stopCallback | Decay Boolean Delay MinimumDelay Delay StartCallback StopCallback | int Boolean int int int XtCallbackList XtCallbackList | 5 milliseconds FALSE 200 milliseconds 10 milliseconds 50 milliseconds NULL NULL

decay | The number of milliseconds that should be subtracted from each succeeding interval while the Repeater button is being held down until the interval has reached minimumDelay milliseconds.
flash | Whether or not to flash the Repeater button whenever the timer goes off.
initialDelay | The number of milliseconds between the beginning of the Repeater button being held down and the first invocation of the callback function.
minimumDelay | The minimum time between callbacks in milliseconds.
repeatDelay | The number of milliseconds between each callback after the first (minus an increasing number of decays).
startCallback | The list of functions to invoke by the start action (typically when the Repeater button is first pressed). The callback data parameter is set to NULL.
stopCallback | The list of functions to invoke by the stop action (typically when the Repeater button is released). The callback data parameter is set to NULL.

### Repeater Actions

The Repeater widget supports the following actions beyond those of the Command button:

start() | This invokes the functions on the startCallback and callback lists and sets a timer to go off in initialDelay milliseconds. The timer will cause the callback functions to be invoked with increasing frequency until the stop action occurs.
stop() | This invokes the functions on the stopCallback list and prevents any further timers from occuring until the next start action.

The following are the default translation bindings used by the Repeater widget:

> <EnterWindow> <LeaveWindow> <Btn1Down> <Btn1Up> | highlight() unhighlight() set(), start() stop(), unset()

### Xaw Plus_________________________________________________________