diff options
author | rjohnson <rjohnson> | 1998-04-01 09:37:39 (GMT) |
---|---|---|
committer | rjohnson <rjohnson> | 1998-04-01 09:37:39 (GMT) |
commit | 13242623d2ff3ea02ab6a62bfb48a7dbb5c27e22 (patch) | |
tree | 3100714738a7941b590efee466a774862f9671c3 /doc/GetScroll.3 | |
parent | e4ab1102029f9ac557ff190bfb9d34408340f345 (diff) | |
download | tk-13242623d2ff3ea02ab6a62bfb48a7dbb5c27e22.zip tk-13242623d2ff3ea02ab6a62bfb48a7dbb5c27e22.tar.gz tk-13242623d2ff3ea02ab6a62bfb48a7dbb5c27e22.tar.bz2 |
Initial revision
Diffstat (limited to 'doc/GetScroll.3')
-rw-r--r-- | doc/GetScroll.3 | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/doc/GetScroll.3 b/doc/GetScroll.3 new file mode 100644 index 0000000..72b97f7 --- /dev/null +++ b/doc/GetScroll.3 @@ -0,0 +1,65 @@ +'\" +'\" 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. +'\" +'\" SCCS: @(#) GetScroll.3 1.7 96/03/26 18:12:29 +'\" +.so man.macros +.TH Tk_GetScrollInfo 3 4.0 Tk "Tk Library Procedures" +.BS +.SH NAME +Tk_GetScrollInfo \- parse arguments for scrolling commands +.SH SYNOPSIS +.nf +\fB#include <tk.h>\fR +.sp +int +\fBTk_GetScrollInfo(\fIinterp, argc, argv, dblPtr, intPtr\fB)\fR +.SH ARGUMENTS +.AS "Tcl_Interp" *dblPtr +.AP Tcl_Interp *interp in +Interpreter to use for error reporting. +.AP int argc in +Number of strings in \fIargv\fR array. +.AP char *argv[] in +Argument strings. These represent the entire widget command, of +which the first word is typically the widget name and the second +word is typically \fBxview\fR or \fByview\fR. This procedure parses +arguments starting with \fIargv\fR[2]. +.AP double *dblPtr out +Filled in with fraction from \fBmoveto\fR option, if any. +.AP int *intPtr out +Filled in with line or page count from \fBscroll\fR option, if any. +The value may be negative. +.BE + +.SH DESCRIPTION +.PP +\fBTk_GetScrollInfo\fR parses the arguments expected by widget +scrolling commands such as \fBxview\fR and \fByview\fR. +It receives the entire list of words that make up a widget command +and parses the words starting with \fIargv\fR[2]. +The words starting with \fIargv\fR[2] must have one of the following forms: +.CS +\fBmoveto \fIfraction\fR +\fBscroll \fInumber\fB units\fR +\fBscroll \fInumber\fB pages\fR +.CE +.LP +Any of the \fBmoveto\fR, \fBscroll\fR, \fBunits\fR, and \fBpages\fR +keywords may be abbreviated. +If \fIargv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR +is returned as result and \fI*dblPtr\fR is filled in with the +\fIfraction\fR argument to the command, which must be a proper real +value. +If \fIargv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR +or \fBTK_SCROLL_PAGES\fR is returned and \fI*intPtr\fR is filled +in with the \fInumber\fR value, which must be a proper integer. +If an error occurs in parsing the arguments, \fBTK_SCROLL_ERROR\fR +is returned and an error message is left in \fIinterp->result\fR. + +.SH KEYWORDS +parse, scrollbar, scrolling command, xview, yview |