diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2009-07-27 20:02:14 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2009-07-27 20:02:14 (GMT) |
commit | 4203c49d114828b206d844202a34d38aad21348c (patch) | |
tree | b193588c2dee35e85be62816390ca401340ba9dc /doc/GetScroll.3 | |
parent | afe60268d2ba96cb79e89f50527ddcd049fbadff (diff) | |
download | tk-4203c49d114828b206d844202a34d38aad21348c.zip tk-4203c49d114828b206d844202a34d38aad21348c.tar.gz tk-4203c49d114828b206d844202a34d38aad21348c.tar.bz2 |
Reword so that the modern API is presented as preferred.
Diffstat (limited to 'doc/GetScroll.3')
-rw-r--r-- | doc/GetScroll.3 | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/doc/GetScroll.3 b/doc/GetScroll.3 index c5aa97b..b5bb7f8 100644 --- a/doc/GetScroll.3 +++ b/doc/GetScroll.3 @@ -5,51 +5,51 @@ '\" 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.8 2009/05/04 09:12:33 dkf Exp $ +'\" RCS: @(#) $Id: GetScroll.3,v 1.9 2009/07/27 20:02:15 dkf 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 +Tk_GetScrollInfoObj, 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 +\fBTk_GetScrollInfoObj(\fIinterp, objc, objv, dblPtr, intPtr\fB)\fR .sp int -\fBTk_GetScrollInfoObj(\fIinterp, objc, objv, dblPtr, intPtr\fB)\fR +\fBTk_GetScrollInfo(\fIinterp, argc, argv, dblPtr, intPtr\fB)\fR .SH ARGUMENTS -.AS "Tcl_Interp" *dblPtr +.AS "Tcl_Interp" *fractionPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. -.AP int argc in -Number of strings in \fIargv\fR 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 \fBxview\fR or \fByview\fR. .AP int objc in Number of Tcl_Obj's in \fIobjv\fR 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 \fBxview\fR or \fByview\fR. -.AP double *dblPtr out +.AP int argc in +Number of strings in \fIargv\fR 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 \fBxview\fR or \fByview\fR. +.AP double *fractionPtr out Filled in with fraction from \fBmoveto\fR option, if any. -.AP int *intPtr out +.AP int *stepsPtr 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 +\fBTk_GetScrollInfoObj\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: +and parses the words starting with \fIobjv\fR[2]. +The words starting with \fIobjv\fR[2] must have one of the following forms: .CS \fBmoveto \fIfraction\fR \fBscroll \fInumber\fB units\fR @@ -58,20 +58,20 @@ The words starting with \fIargv\fR[2] must have one of the following forms: .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 +If \fIobjv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR +is returned as result and \fI*fractionPtr\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 +If \fIobjv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR +or \fBTK_SCROLL_PAGES\fR is returned and \fI*stepsPtr\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 interpreter \fIinterp\fR's result. .PP -\fBTk_GetScrollInfoObj\fR is identical in function to -\fBTk_GetScrollInfo\fR. However, \fBTk_GetScrollInfoObj\fR accepts -Tcl_Obj style arguments, making it more appropriate for use with new -development. +\fBTk_GetScrollInfo\fR is identical in function to +\fBTk_GetScrollInfoObj\fR. However, \fBTk_GetScrollInfo\fR accepts +string arguments, making it more appropriate for use with legacy +widgets. .SH KEYWORDS parse, scrollbar, scrolling command, xview, yview |