1Tk_GetScrollInfo(3)          Tk Library Procedures         Tk_GetScrollInfo(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_GetScrollInfo,  Tk_GetScrollInfoObj  - parse arguments for scrolling
9       commands
10

SYNOPSIS

12       #include <tk.h>
13
14       int
15       Tk_GetScrollInfo(interp, argc, argv, dblPtr, intPtr)
16
17       int
18       Tk_GetScrollInfoObj(interp, objc, objv, dblPtr, intPtr)
19

ARGUMENTS

21       Tcl_Interp   *interp   (in)      Interpreter to use for  error  report‐
22                                        ing.
23
24       int          argc      (in)      Number of strings in argv array.
25
26       CONST char   *argv[]   (in)      Argument strings.  These represent the
27                                        entire widget command,  of  which  the
28                                        first  word  is  typically  the widget
29                                        name and the second word is  typically
30                                        xview or yview.
31
32       int          objc      (in)      Number of Tcl_Obj's in objv array.
33
34       Tcl_Obj *CONST         objv[](in)
35                                        Argument objects.  These represent the
36                                        entire widget command,  of  which  the
37                                        first  word  is  typically  the widget
38                                        name and the second word is  typically
39                                        xview or yview.
40
41       double       *dblPtr   (out)     Filled  in  with  fraction from moveto
42                                        option, if any.
43
44       int          *intPtr   (out)     Filled in with line or page count from
45                                        scroll  option, if any.  The value may
46                                        be negative.
47_________________________________________________________________
48
49

DESCRIPTION

51       Tk_GetScrollInfo parses the arguments expected by widget scrolling com‐
52       mands  such  as  xview and yview.  It receives the entire list of words
53       that make up a widget  command  and  parses  the  words  starting  with
54       argv[2].   The words starting with argv[2] must have one of the follow‐
55       ing forms:
56              moveto fraction
57              scroll number units
58              scroll number pages
59
60       Any of the moveto, scroll, units, and pages keywords  may  be  abbrevi‐
61       ated.   If  argv  has  the moveto form, TK_SCROLL_MOVETO is returned as
62       result and *dblPtr is filled in with the fraction argument to the  com‐
63       mand,  which must be a proper real value.  If argv has the scroll form,
64       TK_SCROLL_UNITS or TK_SCROLL_PAGES is returned and *intPtr is filled in
65       with  the  number  value,  which must be a proper integer.  If an error
66       occurs in parsing the arguments, TK_SCROLL_ERROR  is  returned  and  an
67       error message is left in interp->result.
68
69       Tk_GetScrollInfoObj is identical in function to Tk_GetScrollInfo.  How‐
70       ever, Tk_GetScrollInfoObj accepts Tcl_Obj style  arguments,  making  it
71       more appropriate for use with new development.
72
73

KEYWORDS

75       parse, scrollbar, scrolling command, xview, yview
76
77
78
79Tk                                    8.0                  Tk_GetScrollInfo(3)
Impressum