Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Repeater(3X) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

Repeater widget − a Command widget with auto-repeat. 

SYNOPSIS

Public Headers:<X11/StringDefs.h> <X11/Xaw/Repeater.h>

Private Header:<X11/Xaw/RepeaterP.h>

Class Name:Repeater

Class Pointer:repeaterWidgetClass

Instantiation:widget = XtCreateWidget(name, repeaterWidgetClass, ...) 

CLASS HIERARCHY

Core → Simple → Label → Command →  Repeater

AVAILABILITY

Release 5 and later. 

DESCRIPTION

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. 

RESOURCES

When creating a Repeater widget instance, the following resources are retrieved from the argument list or from the resource database:

Name Type Default Description









XtNaccelerators AcceleratorTable NULL Accelerators for this widget.


XtNancestor−
  Sensitive
Boolean True Sensitivity state of the ancestors of this widget. 


XtNbackground Pixel XtDefault−
  Background
Window background color.


XtNbackground−
  Pixmap
Pixmap XtUnspecified−
  Pixmap
Window background pixmap.


XtNbitmap Pixmap None Pixmap to display in place of the label. 


XtNborderColor Pixel XtDefault−
  Foreground
Window border color.


XtNborderPixmap Pixmap XtUnspecified−
  Pixmap
Window border pixmap.


XtNborderWidth Dimension 1 Width of button border.


XtNcallback XtCallbackList NULL Called for each activation. 


XtNcolormap Colormap Parent’s colormap. Colormap that this widget will use. 


XtNcornerRound−
  Percent
Dimension 25 Radius of rounded corner.


XtNcursor Cursor None Pointer cursor.


XtNcursorName String NULL A cursor glyph name.


XtNdecay int 5 See below.


XtNdepth int Parent’s depth. Depth of this widget’s window. 


XtNdestroy−
  Callback
XtCallbackList NULL Callbacks for XtDestroyWidget. 


XtNencoding unsigned char XawTextEncoding8bit 8 or 16-bit text.


XtNflash Boolean False Whether to flash on auto-repeat. 


XtNfont XFontStruct∗ XtDefaultFont Label font.


XtNforeground Pixel XtDefault−
  Foreground
Foreground color


XtNheight Dimension font height + 2 ∗
XtNinternalHeight
Button height


XtNhighlight−
  Thickness
Dimension 2 Width of border to be highlighted. 


XtNinitialDelay int 200 See below.


XtNinsensitive−
  Border
Pixmap Gray pixmap. Border when not sensitive. 


XtNinternal−
  Height
Dimension 2 Internal border height for highlighting. 


XtNinternalWidth Dimension 4 Internal border width for highlighting. 


XtNjustify XtJustify XtJustifyCenter Type of text alignment.


XtNlabel String Name of widget. Button label.


XtNleftBitmap Pixmap None A bitmap to display to the left of the label. 


XtNmappedWhen−
  Managed
Boolean TRUE Whether XtMapWidget is automatic. 


XtNminimumDelay int 10 See below.


XtNpointerColor Pixel XtDefaultForeground Cursor foreground color.


XtNpointerColor−
  Background
Pixel XtDefaultBackground Cursor background color.


XtNrepeatDelay int 50 See below.


XtNresize Boolean TRUE Whether to auto-resize in SetValues. 


XtNscreen Screen Parent’s screen. Screen on which this widget is displayed: this is not a settable resource. 


XtNsensitive Boolean TRUE Whether widget receives input. 


XtNshapeStyle ShapeStyle XmuShapeRectangle Shape of button.


XtNstartCallback XtCallbackList NULL Called when button pressed. 


XtNstopCallback XtCallbackList NULL Called when button released. 


XtNtranslations Translation−
  Table
See below. Event-to-action translations.


XtNwidth Dimension XtNlabel width + 2∗
XtNinternalWidth
Button width.


XtNx Position 0 x-coordinate in pixels.


XtNy Position 0 y-coordinate in pixels.









The Repeater widget invokes the callbacks on the XtNstartCallback and XtNcallback lists when it receives a ButtonDown event.  If the button is held down, it starts a timer for XtNinitialDelay milliseconds.  If the button is still down when that time has passed, it invokes the functions on the XtNcallback list again, and begins to repeat.  The second repetition occurs after XtNrepeatDelay milliseconds, and subsequent intervals are reduced by XtNdecay milliseconds until they reach a minimum of XtNminimumDelay milliseconds.  When the mouse button is released, the callbacks on the XtNstopCallback list are invoked, and all the timers are removed. 

The new resources (not inherited from superclasses) associated with the Repeater widget are:

XtNdecay
The number of milliseconds to subtract from the repeat interval after each repetition.  The interval starts at XtNrepeatDelay and decreases to XtNminimumDelay.  The default is 5 milliseconds. 

XtNflash
Whether or not to flash the Repeater button whenever the timer goes off.  The default is False. 

XtNinitialDelay
The number of milliseconds before the Repeater widget begins to repeat.  The default is 200.

XtNminimumDelay
The minimum time between callbacks in milliseconds. The default is 10.

XtNrepeatDelay
The number of milliseconds between repetitions, once the XtNinitialDelay has elapsed and the widget has begun to repeat.  The actual delay interval will have XtNdecay milliseconds subtracted from it at each repetition until it reaches XtNminimumDelay. 

XtNstartCallback
The list of functions executed from the start action (typically when the Repeater button is first pressed).  The call_data parameter is unused. 

XtNstopCallback
The list of functions executed from the stop action (typically when the Repeater button is released).  The call_data parameter is unused. 

TRANSLATIONS AND ACTIONS

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

start()
This invokes the functions on the XtNstartCallback and XtNcallback lists and sets a timer to go off in XtNinitialDelay milliseconds.  The timer will cause the XtNcallback functions to be invoked with increasing frequency until the stop action occurs. 

stop()
This invokes the functions on the XtNstopCallback list and prevents any further timers from occurring until the next start action. 

The following are the default translation bindings used by the Repeater widget: <EnterWindow>: highlight()  <LeaveWindow>: unhighlight()  <Btn1Down>: set() start()  <Btn1Up>: stop() unset()

SEE ALSO

Command. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026