GetScroll.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:3k
- '"
- '" 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.
- '"
- '" RCS: @(#) $Id: GetScroll.3,v 1.5 2002/08/05 04:30:38 dgp Exp $
- '"
- .so man.macros
- .TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures"
- .BS
- .SH NAME
- Tk_GetScrollInfo, Tk_GetScrollInfoObj - parse arguments for scrolling commands
- .SH SYNOPSIS
- .nf
- fB#include <tk.h>fR
- .sp
- int
- fBTk_GetScrollInfo(fIinterp, argc, argv, dblPtr, intPtrfB)fR
- .sp
- int
- fBTk_GetScrollInfoObj(fIinterp, objc, objv, dblPtr, intPtrfB)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 fIargvfR array.
- .AP "CONST 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 fBxviewfR or fByviewfR.
- .AP int objc in
- Number of Tcl_Obj's in fIobjvfR array.
- .AP "Tcl_Obj *CONST" objv[] in
- Argument objects. These represent the entire widget command, of
- which the first word is typically the widget name and the second
- word is typically fBxviewfR or fByviewfR.
- .AP double *dblPtr out
- Filled in with fraction from fBmovetofR option, if any.
- .AP int *intPtr out
- Filled in with line or page count from fBscrollfR option, if any.
- The value may be negative.
- .BE
- .SH DESCRIPTION
- .PP
- fBTk_GetScrollInfofR parses the arguments expected by widget
- scrolling commands such as fBxviewfR and fByviewfR.
- It receives the entire list of words that make up a widget command
- and parses the words starting with fIargvfR[2].
- The words starting with fIargvfR[2] must have one of the following forms:
- .CS
- fBmoveto fIfractionfR
- fBscroll fInumberfB unitsfR
- fBscroll fInumberfB pagesfR
- .CE
- .LP
- Any of the fBmovetofR, fBscrollfR, fBunitsfR, and fBpagesfR
- keywords may be abbreviated.
- If fIargvfR has the fBmovetofR form, fBTK_SCROLL_MOVETOfR
- is returned as result and fI*dblPtrfR is filled in with the
- fIfractionfR argument to the command, which must be a proper real
- value.
- If fIargvfR has the fBscrollfR form, fBTK_SCROLL_UNITSfR
- or fBTK_SCROLL_PAGESfR is returned and fI*intPtrfR is filled
- in with the fInumberfR value, which must be a proper integer.
- If an error occurs in parsing the arguments, fBTK_SCROLL_ERRORfR
- is returned and an error message is left in fIinterp->resultfR.
- .PP
- fBTk_GetScrollInfoObjfR is identical in function to
- fBTk_GetScrollInfofR. However, fBTk_GetScrollInfoObjfR accepts
- Tcl_Obj style arguments, making it more appropriate for use with new
- development.
- .SH KEYWORDS
- parse, scrollbar, scrolling command, xview, yview