# Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # =head1 NAME Tk_GetScrollInfo - parse arguments for scrolling commands =for category C Programming =head1 SYNOPSIS B<#include Etk.hE> int BIB<)> =head1 ARGUMENTS =over 4 =item Tcl_Interp *interp (in) Interpreter to use for error reporting. =item int argc (in) Number of strings in I array. =item char *argv[] (in) Argument strings. These represent the entire method, of which the first word is typically the widget name and the second word is typically B or B. This procedure parses arguments starting with I[2]. =item double *dblPtr (out) Filled in with fraction from B option, if any. =item int *intPtr (out) Filled in with line or page count from B option, if any. The value may be negative. =back =head1 DESCRIPTION B parses the arguments expected by widget scrolling commands such as B and B. It receives the entire list of words that make up a method and parses the words starting with I[2]. The words starting with I[2] must have one of the following forms: moveto fraction scroll number units scroll number pages Any of the B, B, B, and B keywords may be abbreviated. If I has the B form, B is returned as result and I<*dblPtr> is filled in with the I argument to the command, which must be a proper real value. If I has the B form, B or B is returned and I<*intPtr> is filled in with the I value, which must be a proper integer. If an error occurs in parsing the arguments, B is returned and an error message is left in Iresult>. =head1 KEYWORDS parse, scrollbar, scrolling command, xview, yview