File: Slider.man

package info (click to toggle)
mowitz 0.2.0-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,168 kB
  • ctags: 4,214
  • sloc: ansic: 30,869; sh: 9,051; makefile: 169
file content (204 lines) | stat: -rw-r--r-- 5,835 bytes parent folder | download
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
." $Id: Slider.man,v 1.2 2000/01/17 20:55:18 falk Exp $
." view with "tbl | nroff -man"
."
.TH "Slider" 3 "Nov 1999" "Version 1.0" ""
.SH NAME
Slider
.SH DESCRIPTION
Slider is a widget similar to the Motif XmScale widget.  It
allows the user to specify an input value by moving a slider.
Operation is very similar to a scrollbar, but the size of the
thumb does not change, and the slider always operates over its
full range.
.P
The key slider resources are: minimum value, maximum value, current
value, step size, input scale and orientation.
.P
In addition, input scaling is available for very small sliders.
This means that large cursor motions map to small changes in the
slider.  For example, theoretically that a slider with only one
pixel of motion (or no pixels of motion for that matter) can
still be controlled over its full range.  Input scaling is normally
performed automatically for sliders with less than 100 pixels of
motion, with the scale factor set such that the range of cursor
motion is 100 pixels.
.P
Callbacks are provided for continuous changes and operation complete.
.P
Scrollwheel mouse support is provided.

.SH CLASS
Core => Slider

Slider does not require any specific widget set, and may be combined with
any other widget set.

.SH RESOURCES

.ps -2
.TS
center box;
cBsss
lB|lB|lB|lB
l|l|l|l.
Slider
Name	Class	Type	Default
font	Font	XFontStruct*	XtDefaultFont
minimum	Minimum	int	0
maximum	Maximum	int	100
value	Value	int	0
step	Step	int	(max-min)/10
step2	Step2	int	1
orientation	Orientation	XtOrientation	horizontal
showValue	ShowValue	Boolean	False
decimalPoints	DecimalPoints	short	0
inputScale	InputScale	short	100%
autoScale	AutoScale	Boolean	True
sliderStyle	SliderStyle	SliderStyle	Normal
thumbLength	ThumbLength	short	20

shadowWidth	ShadowWidth	short	1
topShadowContrast	TopShadowContrast	short	20
bottomShadowContrast	BottomShadowContrast	short	40
armShadowContrast	ArmShadowContrast	short	40
insensitiveContrast	InsensitiveContrast	short	33
beNiceToColormap	BeNiceToColormap	Boolean	False

dragCallback	DragCallback	XtCallbackList	NULL
valueChangedCallback	ValueChangedCallback	XtCallbackList	NULL
.TE
.ps +2

.LP
See the \fBCore\fP widget for more resources.

.SS Descriptions.

.TP
.I Minimum
Value represented by the slider when at the left/bottom.

.TP
.I Maximum
Value represented by the slider when at the right/top.

.TP
.I Value
Current value represented by the slider.

.TP
.I Step
Amount slider value changes for clicks in the background to the left
or right of the thumb, or use of PageUp/PageDown keys.

.TP
.I Step2
Amount slider value changes for the arrow keys or scrollwheel motion.

.TP
.I Orientation
One of XtorientVertical or XtorientHorizontal.

.TP
.I InputScale
This is the ratio, in percent, of pointer motion to thumb motion in
the slider.  With the default value of 100%, one pixel of motion in the
pointer results in one pixel of motion in the thumb.  Smaller values
of inputScale result in smaller slider changes for a given amount of
pointer motion.  This can be used to allow the user finer control of
the slider.  This is especially useful for small sliders with a limited
range of motion.

.TP
.I AutoScale
Boolean.  When true, the inputScale is set automatically for small sliders.

.TP
.I DragCallback
Callback function called continuously as the thumb is dragged.  Call_data
is the current slider value.  This callback is not called for arrow
keys or scrollwheel mouse.

.TP
.I ValueChangedCallback
Callback function called once after the slider value changes.  Call_data
is the new slider value.

.TP
.I ShadowWidth
Width of the decorative shadow border.

.TP
.I TopShadowContrast, BottomShadowContrast, ArmShadowContrast, InsensitiveContrast
Controls the appearance of the slider.

.TP
.I BeNiceToColormap
Boolean.  When true, Slider widget allocates fewer colors for itself.

.TP
.I Font
Not used at this time.

.TP
.I ShowValue
Not used at this time.

.TP
.I DecimalPoints
Not used at this time.



.SH FUNCTIONS

.TP
void XawSliderSetValue(Widget w, int value, Boolean callCallbacks)
Sets the slider value.

.SH PROGRAMMING NOTES

See sliderdemo.c for a small sample application.  Minimum and maximum
are set to the values represented by the extreme ends of slider motion.
AutoScale and inputScale are normally left to their default values.
.P
A valueChangedCallback procedure should be provided to accept the
slider value after every change.  If some sort of continuous update
is required during drag operations, a dragCallback procedure should
also be provided.  Both procedures accept the same argument, so both
may be specified as the same procedure.


.SH SUBCLASSING

The slider class contains the following class methods:
\fBdraw_border, draw_background, draw_thumb, move_thumb\fP
and \fBfocus_proc\fP.  These may be specified as
XtInheritDrawBorder, XtInheritDrawBackground, XtInheritDrawThumb,
XtInheritMoveThumb and XtInheritFocusProc.  See Slider.c under
"Overview" for a detailed description.


.SH BUGS

Does not accept keyboard input in Motif.  Use the Motif XmScale
widget instead.


.SH AUTHOR
Edward Falk <falk@falconer.vip.best.com>

.SH COPYRIGHT
Copyright  2000 by Edward A. Falk.  This widget may be used freely in any
software.  Source code is freely distributable provided that my name
is not removed from it.

The X Consortium, and any party obtaining a copy of these files from the X
Consortium, directly or indirectly, is granted, free of charge, a full and
unrestricted irrevocable, world-wide, paid up, royalty-free, nonexclusive
right and license to deal in this software and documentation files (the
"Software"), including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and sell copies of the Software,
and to permit persons who receive copies from any such party to do so.