~ubuntu-branches/ubuntu/dapper/tk8.0/dapper-updates

« back to all changes in this revision

Viewing changes to doc/GetScroll.3

  • Committer: Bazaar Package Importer
  • Author(s): Mike Markley
  • Date: 2001-07-24 21:57:40 UTC
  • Revision ID: james.westby@ubuntu.com-20010724215740-r70t25rtmbqjil2h
Tags: upstream-8.0.5
ImportĀ upstreamĀ versionĀ 8.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\"
 
2
'\" Copyright (c) 1994 The Regents of the University of California.
 
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
 
4
'\"
 
5
'\" See the file "license.terms" for information on usage and redistribution
 
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
7
'\" 
 
8
'\" RCS: @(#) $Id: GetScroll.3,v 1.2 1998/09/14 18:22:51 stanton Exp $
 
9
'\" 
 
10
.so man.macros
 
11
.TH Tk_GetScrollInfo 3 4.0 Tk "Tk Library Procedures"
 
12
.BS
 
13
.SH NAME
 
14
Tk_GetScrollInfo \- parse arguments for scrolling commands
 
15
.SH SYNOPSIS
 
16
.nf
 
17
\fB#include <tk.h>\fR
 
18
.sp
 
19
int
 
20
\fBTk_GetScrollInfo(\fIinterp, argc, argv, dblPtr, intPtr\fB)\fR
 
21
.SH ARGUMENTS
 
22
.AS "Tcl_Interp" *dblPtr
 
23
.AP Tcl_Interp *interp in
 
24
Interpreter to use for error reporting.
 
25
.AP int argc in
 
26
Number of strings in \fIargv\fR array.
 
27
.AP char *argv[] in
 
28
Argument strings.  These represent the entire widget command, of
 
29
which the first word is typically the widget name and the second
 
30
word is typically \fBxview\fR or \fByview\fR.  This procedure parses
 
31
arguments starting with \fIargv\fR[2].
 
32
.AP double *dblPtr out
 
33
Filled in with fraction from \fBmoveto\fR option, if any.
 
34
.AP int *intPtr out
 
35
Filled in with line or page count from \fBscroll\fR option, if any.
 
36
The value may be negative.
 
37
.BE
 
38
 
 
39
.SH DESCRIPTION
 
40
.PP
 
41
\fBTk_GetScrollInfo\fR parses the arguments expected by widget
 
42
scrolling commands such as \fBxview\fR and \fByview\fR.
 
43
It receives the entire list of words that make up a widget command
 
44
and parses the words starting with \fIargv\fR[2].
 
45
The words starting with \fIargv\fR[2] must have one of the following forms:
 
46
.CS
 
47
\fBmoveto \fIfraction\fR
 
48
\fBscroll \fInumber\fB units\fR
 
49
\fBscroll \fInumber\fB pages\fR
 
50
.CE
 
51
.LP
 
52
Any of the \fBmoveto\fR, \fBscroll\fR, \fBunits\fR, and \fBpages\fR
 
53
keywords may be abbreviated.
 
54
If \fIargv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR
 
55
is returned as result and \fI*dblPtr\fR is filled in with the
 
56
\fIfraction\fR argument to the command, which must be a proper real
 
57
value.
 
58
If \fIargv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR
 
59
or \fBTK_SCROLL_PAGES\fR is returned and \fI*intPtr\fR is filled
 
60
in with the \fInumber\fR value, which must be a proper integer.
 
61
If an error occurs in parsing the arguments, \fBTK_SCROLL_ERROR\fR
 
62
is returned and an error message is left in \fIinterp->result\fR.
 
63
 
 
64
.SH KEYWORDS
 
65
parse, scrollbar, scrolling command, xview, yview