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 .TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures"
12 Tk_GetScrollInfoObj, Tk_GetScrollInfo \- parse arguments for scrolling commands
18 \fBTk_GetScrollInfoObj(\fIinterp, objc, objv, fractionPtr, stepsPtr\fB)\fR
21 \fBTk_GetScrollInfo(\fIinterp, argc, argv, fractionPtr, stepsPtr\fB)\fR
23 .AS "Tcl_Interp" *fractionPtr
24 .AP Tcl_Interp *interp in
25 Interpreter to use for error reporting.
27 Number of Tcl_Obj's in \fIobjv\fR array.
28 .AP "Tcl_Obj *const *" objv in
29 Argument objects. These represent the entire widget command, of
30 which the first word is typically the widget name and the second
31 word is typically \fBxview\fR or \fByview\fR.
33 Number of strings in \fIargv\fR array.
34 .AP "const char **" argv in
35 Argument strings. These represent the entire widget command, of
36 which the first word is typically the widget name and the second
37 word is typically \fBxview\fR or \fByview\fR.
38 .AP double *fractionPtr out
39 Filled in with fraction from \fBmoveto\fR option, if any.
41 Filled in with line or page count from \fBscroll\fR option, if any.
42 The value may be negative.
46 \fBTk_GetScrollInfoObj\fR parses the arguments expected by widget
47 scrolling commands such as \fBxview\fR and \fByview\fR.
48 It receives the entire list of words that make up a widget command
49 and parses the words starting with \fIobjv\fR[2].
50 The words starting with \fIobjv\fR[2] must have one of the following forms:
52 \fBmoveto \fIfraction\fR
53 \fBscroll \fInumber\fB units\fR
54 \fBscroll \fInumber\fB pages\fR
57 Any of the \fBmoveto\fR, \fBscroll\fR, \fBunits\fR, and \fBpages\fR
58 keywords may be abbreviated.
59 If \fIobjv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR
60 is returned as result and \fI*fractionPtr\fR is filled in with the
61 \fIfraction\fR argument to the command, which must be a proper real
63 If \fIobjv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR
64 or \fBTK_SCROLL_PAGES\fR is returned and \fI*stepsPtr\fR is filled
65 in with the \fInumber\fR value, which must be a proper integer.
66 If an error occurs in parsing the arguments, \fBTK_SCROLL_ERROR\fR
67 is returned and an error message is left in interpreter
68 \fIinterp\fR's result.
70 \fBTk_GetScrollInfo\fR is identical in function to
71 \fBTk_GetScrollInfoObj\fR. However, \fBTk_GetScrollInfo\fR accepts
72 string arguments, making it more appropriate for use with legacy
75 parse, scrollbar, scrolling command, xview, yview