2
'\" Copyright (c) 1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8
'\" RCS: @(#) $Id: GetScroll.3,v 1.2 1998/09/14 18:22:51 stanton Exp $
11
.TH Tk_GetScrollInfo 3 4.0 Tk "Tk Library Procedures"
14
Tk_GetScrollInfo \- parse arguments for scrolling commands
20
\fBTk_GetScrollInfo(\fIinterp, argc, argv, dblPtr, intPtr\fB)\fR
22
.AS "Tcl_Interp" *dblPtr
23
.AP Tcl_Interp *interp in
24
Interpreter to use for error reporting.
26
Number of strings in \fIargv\fR array.
28
Argument strings. These represent the entire widget command, of
29
which the first word is typically the widget name and the second
30
word is typically \fBxview\fR or \fByview\fR. This procedure parses
31
arguments starting with \fIargv\fR[2].
32
.AP double *dblPtr out
33
Filled in with fraction from \fBmoveto\fR option, if any.
35
Filled in with line or page count from \fBscroll\fR option, if any.
36
The value may be negative.
41
\fBTk_GetScrollInfo\fR parses the arguments expected by widget
42
scrolling commands such as \fBxview\fR and \fByview\fR.
43
It receives the entire list of words that make up a widget command
44
and parses the words starting with \fIargv\fR[2].
45
The words starting with \fIargv\fR[2] must have one of the following forms:
47
\fBmoveto \fIfraction\fR
48
\fBscroll \fInumber\fB units\fR
49
\fBscroll \fInumber\fB pages\fR
52
Any of the \fBmoveto\fR, \fBscroll\fR, \fBunits\fR, and \fBpages\fR
53
keywords may be abbreviated.
54
If \fIargv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR
55
is returned as result and \fI*dblPtr\fR is filled in with the
56
\fIfraction\fR argument to the command, which must be a proper real
58
If \fIargv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR
59
or \fBTK_SCROLL_PAGES\fR is returned and \fI*intPtr\fR is filled
60
in with the \fInumber\fR value, which must be a proper integer.
61
If an error occurs in parsing the arguments, \fBTK_SCROLL_ERROR\fR
62
is returned and an error message is left in \fIinterp->result\fR.
65
parse, scrollbar, scrolling command, xview, yview