aboutsummaryrefslogtreecommitdiff
path: root/libXaw/spec/Repeater
blob: 93872939c534ceb34d45491a92b0e2c05ad6c58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
.\" $Xorg: Repeater,v 1.3 2000/08/17 19:42:27 cpqbld Exp $
.NH 2
Repeater Widget
.XS
	Repeater Widget
.XE
.IN "Repeater widget" "" "@DEF@"
.Ds 0
.TA 2.0i
.ta 2.0i
.sp
Application header file	<X11/Xaw/Repeater.h>
.IN "Repeater.h" ""
Class header file	<X11/Xaw/RepeaterP.h>
.IN "RepeaterP.h" ""
Class	repeaterWidgetClass
.IN "repeaterWidgetClass" ""
Class Name	Repeater
.IN "Repeater widget" "class name"
Superclass	Command
.sp
.De
.LP
The Repeater widget is a subclass of the Command widget; see the
Command documentation for details.  The difference is that the Repeater can call its
registered callbacks repeatedly, at an increasing rate.  The default translation
does so for the duration the user holds down pointer button 1 while the pointer
is on the Repeater.
.NH 3
Resources
.LP
When creating a Repeater widget instance, the following resources are
retrieved from the argument list or from the resource database:
.LP
.IN "Repeater widget" "resources"
.TS H
expand;
lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
_
.sp 3p
.TB
Name	Class	Type	Notes	Default Value
.sp 3p
_
.TH
.R
.sp 3p
accelerators	Accelerators	AcceleratorTable		NULL
ancestorSensitive	AncestorSensitive	Boolean	D	True
background	Background	Pixel		XtDefaultBackground
backgroundPixmap	Pixmap	Pixmap		XtUnspecifiedPixmap
bitmap	Bitmap	Pixmap		None
borderColor	BorderColor	Pixel		XtDefaultForeground
borderPixmap	Pixmap	Pixmap		XtUnspecifiedPixmap
borderWidth	BorderWidth	Dimension		1
callback	Callback	XtCallbackList		NULL
colormap	Colormap	Colormap		Parent's Colormap
cornerRoundPercent	CornerRoundPercent	Dimension		25
cursor	Cursor	Cursor		None
cursorName	Cursor	String		NULL
decay	Decay	Int		5
depth	Depth	int	C	Parent's Depth
destroyCallback	Callback	XtCallbackList		NULL
encoding	Encoding	UnsignedChar		XawTextEncoding8bit
flash	Boolean	Boolean		False
font	Font	XFontStruct		XtDefaultFont
fontSet	FontSet	XFontSet		XtDefaultFontSet
foreground	Foreground	Pixel		XtDefaultForeground
height	Height	Dimension	A	graphic height + 2 * \fBinternalHeight\fP
highlightThickness	Thickness	Dimension	A	2 (0 if Shaped)
initialDelay	Delay	Int		200
insensitiveBorder	Insensitive	Pixmap		GreyPixmap
internalHeight	Height	Dimension		2
internalWidth	Width	Dimension		4
international	International	Boolean	C	False
justify	Justify	Justify		XtJustifyCenter (center)
label	Label	String		name of widget
leftBitmap	LeftBitmap	Bitmap		None
mappedWhenManaged	MappedWhenManaged	Boolean		True
minimumDelay	MinimumDelay	Int		10
pointerColor	Foreground	Pixel		XtDefaultForeground
pointerColorBackground	Background	Pixel		XtDefaultBackground
repeatDelay	Delay	Int		50
resize	Resize	Boolean		True
screen	Screen	Pointer	R	Parent's Screen
sensitive	Sensitive	Boolean		True
shapeStyle	ShapeStyle	ShapeStyle		Rectangle
startCallback	StartCallback	Callback		NULL
stopCallback	StopCallback	Callback		NULL
translations	Translations	TranslationTable		See below
width	Width	Dimension	A	graphic width + 2 * \fBinternalWidth\fP
x	Position	Position		0
y	Position	Position		0
.sp 3p
_
.TE
\" Resource Descriptions
.Ac
.As
.Bg
.Gp
.Bm
.Bc
.Bp
.Bw
.Cb
.Cm
.Cr
.Cu
.Cn
.IP \fBdecay\fP 1.5i
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 \fBminimumDelay\fP milliseconds.
.Dp
.Dc
.Le
.IP \fBflash\fP 1.5i
Whether or not to flash the Repeater button whenever the timer goes off.
.Lf
.Ls
.Lg
.Hw
.Ht
.IP \fBinitialDelay\fP 1.5i
The number of milliseconds between the beginning of the Repeater button
being held down and the first invocation of the \fBcallback\fP function.
.Ib
.Ih
.In
.Ju
.La
.Ll
.Mm
.IP \fBminimumDelay\fP 1.5i
The minimum time between callbacks in milliseconds.
.Pf
.Pb
.IP \fBrepeatDelay\fP 1.5i
The number of milliseconds between each callback after the first (minus an
increasing number of \fBdecay\fPs).
.Re
.Sc
.Se
.Ss
.IP \fBstartCallback\fP 1.5i
The list of functions to invoke by the \fBstart\fP action (typically
when the Repeater button is first pressed).  The callback data parameter
is set to NULL.
.IP \fBstopCallback\fP 1.5i
The list of functions to invoke by the \fBstop\fP action (typically
when the Repeater button is released).  The callback data parameter
is set to NULL.
.Tr
.Xy
.NH 3
Repeater Actions
.IN "Repeater widget" "actions"
.LP
The Repeater widget supports the following actions beyond those of the Command
button:
.IP \fBstart\fP() 1.5i
This invokes the functions on the \fBstartCallback\fP and \fBcallback\fP lists
and sets a timer to go off in \fBinitialDelay\fP milliseconds.  The timer
will cause the \fBcallback\fP functions to be invoked with increasing
frequency until the \fBstop\fP action occurs.
.IP \fBstop\fP() 1.5i
This invokes the functions on the \fBstopCallback\fP list and prevents any
further timers from occuring until the next \fBstart\fP action.
.LP
.sp
.IN "Repeater widget" "translation bindings"
The following are the default translation bindings used by the
Repeater widget:
.LP
.Ds 0
.TA .5i 2.25i
.ta .5i 2.25i
	<EnterWindow>:	highlight(\|)
	<LeaveWindow>:	unhighlight(\|)
	<Btn1Down>:	set(\|) start(\|)
	<Btn1Up>:	stop(\|) unset(\|)
.De
.LP