head	1.12;
access;
symbols
	core-8-5-9:1.10
	core-8-5-8:1.10
	macosx-cocoa-merge:1.12
	macosx-cocoa-premerge:1.12
	macosx-carbon-freeze:1.12
	core-8-5-7:1.10
	core-8-5-6:1.10
	core-8-6-b1:1.12
	core-8-6-a3:1.12
	core-8-5-5:1.10
	core-8-6-a2:1.11
	core-8-5-4:1.10
	core-8-5-3:1.10
	core-8-6-a1:1.10
	core-8-4-19:1.3.8.1
	core-8-5-branch:1.10.0.2
	core-8-5-2:1.10
	core-8-4-18:1.3.8.1
	core-8-5-1:1.10
	core-8-4-17:1.3.8.1
	core-8-5-0:1.10
	core-8-5-b3:1.9
	core-8-5-b2:1.8
	core-8-4-16:1.3.8.1
	core-8-5-b1:1.6
	core-stablilizer-merge:1.6
	core-stabilizer-branch:1.6.0.2
	core-stabilizer-merge:1.10
	core-8-4-15:1.3.8.1
	core-8-5-a6:1.6
	core-8-5-a5:1.6
	core-8-4-14:1.3.8.1
	core-8-5-a4:1.6
	core-8-4-13:1.3.8.1
	core-8-4-12:1.3.8.1
	core-8-4-11:1.3.8.1
	core-8-5-a3:1.6
	core-8-4-10:1.3.8.1
	core-8-4-9-branch:1.3.8.1.0.2
	core-8-5-a2:1.6
	core-8-4-9:1.3.8.1
	core-8-4-8:1.3.8.1
	core-8-4-7:1.3
	core-8-5-a1:1.3
	core-8-4-6:1.3
	core-8-4-5:1.3
	mistachkin-dev-branch:1.3.0.10
	core-8-4-4:1.3
	core-8-4-3:1.3
	core-8-4-branch:1.3.0.8
	core-8-4-2:1.3
	core-8-4-1:1.3
	core-8-3-5:1.2.18.1
	core-8-4-0:1.3
	macosx-8-4-merge-2002-08-31-trunk:1.3
	macosx-8-4-premerge-2002-08-31-branch:1.3
	macosx-8-4-premerge-2002-08-31-trunk:1.3
	macosx-8-4-merge-2002-08-30-branch:1.3
	macosx-8-4-merge-2002-08-30-trunk:1.3
	macosx-8-4-merge-2002-08-20-branch:1.3
	macosx-8-4-merge-2002-08-20-trunk:1.3
	core-8-4-b2:1.3
	core-8-4-b1:1.3
	macosx-premerge-6-9-02:1.3
	core-8-4-a4:1.3
	core-8-3-4:1.2.18.1
	macosx-8-4-branch:1.3.0.6
	macosx-8-4-branchpoint:1.3
	core-8-4-a3:1.3
	core-8-3-3:1.2.18.1
	dgp-privates-into-namespace:1.3.0.4
	tclpro-1-5-0:1.2
	core-8-4-win-speedup:1.3.0.2
	core-8-4-a2:1.3
	tclpro-1-4-1:1.2
	tclpro-1-4-0:1.2
	core-8-3-2:1.2
	ajuba-ajuba2-2-1-base:1.2
	ajuba-ajuba2-2-0:1.2
	core-8-4-a1:1.2
	core-8-3-1-branch:1.2.0.18
	core-8-3-1:1.2
	scriptics-sc-2-0-b5:1.2
	scriptics-sc-2-0-fixed:1.2
	scriptics-sc-2-0-b2:1.2
	scriptics-sc-2-0-b1:1.2
	core-8-3-0:1.2
	core-8-3-b2:1.2
	core-8-3-b1:1.2
	scriptics-sc-1-1:1.2
	scriptics-sc-1-1-b1:1.2
	core-8-2-3:1.2
	scriptics-sc-1-1-branch:1.2.0.16
	scriptics-sc-1-1-base:1.2
	scriptics-sc-1-0:1.2
	scriptics-sc-1-0-branch:1.2.0.14
	scriptics-sc-1-0-base:1.2
	core-8-2-2:1.2
	core-8-2-1:1.2
	scriptics-bc-1-0-b1:1.2
	core-8-2-1-branch:1.2.0.12
	scriptics-tclpro-1-3-0:1.2
	core-8-2-0:1.2
	core-8-2-b3-branch:1.2.0.10
	core-8-2-b3-base:1.2
	scriptics-tclpro-1-3-b4:1.2
	core-8-2-b2:1.2
	scriptics-tclpro-1-3-b3:1.2
	core-8-2-b1:1.2
	scriptics-tclpro-1-3-b2:1.2
	merge-to-mainline-5/21/99:1.2
	scriptics-tclpro-1-3-b2-branch:1.2.0.8
	core-8-1-1:1.2
	scriptics-tclpro-1-3-b1:1.2
	core-8-1-1-base:1.2
	core-8-1-0:1.2
	merge-to-mainline-4-29-99:1.2
	merge-to-mainline-4-23-99:1.2
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.1
	core-8-1-b2:1.1.4.1
	dev-8-1-stubs-branch:1.1.4.1.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.2
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.12
date	2008.09.23.13.36.54;	author dkf;	state Exp;
branches;
next	1.11;

1.11
date	2008.06.30.22.57.03;	author dkf;	state Exp;
branches;
next	1.10;

1.10
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.9;

1.9
date	2007.10.29.16.04.14;	author dkf;	state Exp;
branches;
next	1.8;

1.8
date	2007.10.26.20.13.23;	author dgp;	state Exp;
branches;
next	1.7;

1.7
date	2007.10.24.14.32.58;	author dkf;	state Exp;
branches;
next	1.6;

1.6
date	2004.10.28.12.25.53;	author dkf;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2004.09.19.16.05.37;	author dkf;	state Exp;
branches;
next	1.4;

1.4
date	2004.08.17.22.37.24;	author dkf;	state Exp;
branches;
next	1.3;

1.3
date	2000.08.25.06.58.32;	author ericm;	state Exp;
branches
	1.3.8.1;
next	1.2;

1.2
date	98.09.14.18.22.59;	author stanton;	state Exp;
branches
	1.2.18.1;
next	1.1;

1.1
date	98.04.01.09.39.56;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.16.28;	author stanton;	state Exp;
branches;
next	;

1.2.18.1
date	2001.04.04.07.23.48;	author hobbs;	state Exp;
branches;
next	;

1.3.8.1
date	2004.10.28.12.25.22;	author dkf;	state Exp;
branches;
next	;

1.6.2.1
date	2007.11.01.16.37.16;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.12
log
@Fix [Bug 2118116]
@
text
@'\"
'\" Copyright (c) 1990-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: scale.n,v 1.11 2008/06/30 22:57:03 dkf Exp $
'\" 
.so man.macros
.TH scale n 4.1 Tk "Tk Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
scale \- Create and manipulate scale widgets
.SH SYNOPSIS
\fBscale\fR \fIpathName \fR?\fIoptions\fR?
.SO
\-activebackground	\-foreground	\-relief
\-background	\-highlightbackground	\-repeatdelay
\-borderwidth	\-highlightcolor	\-repeatinterval
\-cursor	\-highlightthickness	\-takefocus
\-font	\-orient	\-troughcolor
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-bigincrement bigIncrement BigIncrement
Some interactions with the scale cause its value to change by
.QW large
increments;  this option specifies the size of the
large increments.  If specified as 0, the large increments default
to 1/10 the range of the scale.
.OP \-command command Command
Specifies the prefix of a Tcl command to invoke whenever the scale's
value is changed via a widget command.
The actual command consists
of this option followed by a space and a real number indicating the
new value of the scale.
.OP \-digits digits Digits
An integer specifying how many significant digits should be retained
when converting the value of the scale to a string.
If the number is less than or equal to zero, then the scale picks
the smallest value that guarantees that every possible slider
position prints as a different string.
.OP \-from from From
A real value corresponding to the left or top end of the scale.
.OP \-label label Label
A string to display as a label for the scale.  For
vertical scales the label is displayed just to the right of the
top end of the scale.  For horizontal scales the label is displayed
just above the left end of the scale.  If the option is specified
as an empty string, no label is displayed.
.OP \-length length Length
Specifies the desired long dimension of the scale in screen units
(i.e. any of the forms acceptable to \fBTk_GetPixels\fR).
For vertical scales this is the scale's height;  for horizontal scales
it is the scale's width.
.OP \-resolution resolution Resolution
A real value specifying the resolution for the scale.
If this value is greater than zero then the scale's value will always be
rounded to an even multiple of this value, as will tick marks and
the endpoints of the scale.  If the value is less than zero then no
rounding occurs.  Defaults to 1 (i.e., the value will be integral).
.OP \-showvalue showValue ShowValue
Specifies a boolean value indicating whether or not the current
value of the scale is to be displayed.
.OP \-sliderlength sliderLength SliderLength
Specifies the size of the slider, measured in screen units along the slider's
long dimension.  The value may be specified in any of the forms acceptable
to \fBTk_GetPixels\fR.
.OP \-sliderrelief sliderRelief SliderRelief
Specifies the relief to use when drawing the slider, such as \fBraised\fR
or \fBsunken\fR.
.OP \-state state State
Specifies one of three states for the scale:  \fBnormal\fR,
\fBactive\fR, or \fBdisabled\fR.
If the scale is disabled then the value may not be changed and the scale
will not activate.
If the scale is active, the slider is displayed using the color
specified by the \fBactiveBackground\fR option.
.OP \-tickinterval tickInterval TickInterval
Must be a real value.
Determines the spacing between numerical
tick marks displayed below or to the left of the slider.
If 0, no tick marks will be displayed.
.OP \-to to To
Specifies a real value corresponding
to the right or bottom end of the scale.
This value may be either less than or greater than the \fBfrom\fR option.
.OP \-variable variable Variable
Specifies the name of a global variable to link to the scale.  Whenever the
value of the variable changes, the scale will update to reflect this
value.
Whenever the scale is manipulated interactively, the variable
will be modified to reflect the scale's new value.
.OP \-width width Width
Specifies the desired narrow dimension of the trough in screen units
(i.e. any of the forms acceptable to \fBTk_GetPixels\fR).
For vertical scales this is the trough's width;  for horizontal scales
this is the trough's height.
.BE
.SH DESCRIPTION
.PP
The \fBscale\fR command creates a new window (given by the
\fIpathName\fR argument) and makes it into a scale widget.
Additional
options, described above, may be specified on the command line
or in the option database
to configure aspects of the scale such as its colors, orientation,
and relief.  The \fBscale\fR command returns its
\fIpathName\fR argument.  At the time this command is invoked,
there must not exist a window named \fIpathName\fR, but
\fIpathName\fR's parent must exist.
.PP
A scale is a widget that displays a rectangular \fItrough\fR and a
small \fIslider\fR.  The trough corresponds to a range
of real values (determined by the \fBfrom\fR, \fBto\fR, and
\fBresolution\fR options),
and the position of the slider selects a particular real value.
The slider's position (and hence the scale's value) may be adjusted
with the mouse or keyboard as described in the \fBBINDINGS\fR
section below.  Whenever the scale's value is changed, a Tcl
command is invoked (using the \fBcommand\fR option) to notify
other interested widgets of the change.
In addition, the value
of the scale can be linked to a Tcl variable (using the \fBvariable\fR
option), so that changes in either are reflected in the other.
.PP
Three annotations may be displayed in a scale widget:  a label
appearing at the top right of the widget (top left for horizontal
scales), a number displayed just to the left of the slider
(just above the slider for horizontal scales), and a collection
of numerical tick marks just to the left of the current value
(just below the trough for horizontal scales).  Each of these three
annotations may be enabled or disabled using the
configuration options.
.SH "WIDGET COMMAND"
.PP
The \fBscale\fR command creates a new Tcl command whose
name is \fIpathName\fR.  This
command may be used to invoke various
operations on the widget.  It has the following general form:
.CS
\fIpathName option \fR?\fIarg arg ...\fR?
.CE
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command.  The following
commands are possible for scale widgets:
.TP
\fIpathName \fBcget\fR \fIoption\fR
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBscale\fR
command.
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
information on the format of this list).  If \fIoption\fR is specified
with no \fIvalue\fR, then the command returns a list describing the
one named option (this list will be identical to the corresponding
sublist of the value returned if no \fIoption\fR is specified).  If
one or more \fIoption\-value\fR pairs are specified, then the command
modifies the given widget option(s) to have the given value(s);  in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBscale\fR
command.
.TP
\fIpathName \fBcoords \fR?\fIvalue\fR?
Returns a list whose elements are the x and y coordinates of
the point along the centerline of the trough that corresponds
to \fIvalue\fR.
If \fIvalue\fR is omitted then the scale's current value is used.
.TP
\fIpathName \fBget\fR ?\fIx y\fR?
If \fIx\fR and \fIy\fR are omitted, returns the current value
of the scale.  If \fIx\fR and \fIy\fR are specified, they give
pixel coordinates within the widget;  the command returns
the scale value corresponding to the given pixel.
Only one of \fIx\fR or \fIy\fR is used:  for horizontal scales
\fIy\fR is ignored, and for vertical scales \fIx\fR is ignored.
.TP
\fIpathName \fBidentify\fR \fIx y\fR
Returns a string indicating what part of the scale lies under
the coordinates given by \fIx\fR and \fIy\fR.
A return value of \fBslider\fR means that the point is over
the slider;  \fBtrough1\fR means that the point is over the
portion of the slider above  or to the left of the slider;
and \fBtrough2\fR means that the point is over the portion
of the slider below or to the right of the slider.
If the point is not over one of these elements, an empty string
is returned.
.TP
\fIpathName \fBset\fR \fIvalue\fR
This command is invoked to change the current value of the scale,
and hence the position at which the slider is displayed.  \fIValue\fR
gives the new value for the scale.
The command has no effect if the scale is disabled.
.SH BINDINGS
.PP
Tk automatically creates class bindings for scales that give them
the following default behavior.
Where the behavior is different for vertical and horizontal scales,
the horizontal behavior is described in parentheses.
.IP [1]
If button 1 is pressed in the trough, the scale's value will
be incremented or decremented by the value of the \fBresolution\fR
option so that the slider moves in the direction of the cursor. 
If the button is held down, the action auto-repeats.
.IP [2]
If button 1 is pressed over the slider, the slider can be dragged
with the mouse.
.IP [3]
If button 1 is pressed in the trough with the Control key down,
the slider moves all the way to the end of its range, in the
direction towards the mouse cursor.
.IP [4]
If button 2 is pressed, the scale's value is set to the mouse
position.  If the mouse is dragged with button 2 down, the scale's
value changes with the drag.
.IP [5]
The Up and Left keys move the slider up (left) by the value
of the \fBresolution\fR option.
.IP [6]
The Down and Right keys move the slider down (right) by the value
of the \fBresolution\fR option.
.IP [7]
Control-Up and Control-Left move the slider up (left) by the
value of the \fBbigIncrement\fR option.
.IP [8]
Control-Down and Control-Right move the slider down (right) by the
value of the \fBbigIncrement\fR option.
.IP [9]
Home moves the slider to the top (left) end of its range.
.IP [10]
End moves the slider to the bottom (right) end of its range.
.PP
If the scale is disabled using the \fBstate\fR option then
none of the above bindings have any effect.
.PP
The behavior of scales can be changed by defining new bindings for
individual widgets or by redefining the class bindings.
.SH KEYWORDS
scale, slider, trough, widget
'\" Local Variables:
'\" mode: nroff
'\" End:
@


1.11
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@a0 1
'\" -*- nroff -*-
d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.10 2007/12/13 15:23:43 dgp Exp $
d245 3
@


1.10
log
@merge stable branch onto HEAD
@
text
@d1 1
d9 1
a9 1
'\" RCS: @@(#) $Id: scale.n,v 1.6.2.1 2007/11/01 16:37:16 dgp Exp $
a101 1

a243 1

@


1.9
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.8 2007/10/26 20:13:23 dgp Exp $
@


1.8
log
@        * doc/*.1:              Revert doc changes that broke
        * doc/*.3:              `make html` so we can get the release
        * doc/*.n:              out the door.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.6 2004/10/28 12:25:53 dkf Exp $
d28 2
a29 1
``large'' increments;  this option specifies the size of the
d77 1
a77 1
won't activate.
d192 1
a192 1
If the point isn't over one of these elements, an empty string
@


1.7
log
@Lots of improvements to look and feel of manual pages
@
text
@d28 1
a28 2
.QW large
increments;  this option specifies the size of the
@


1.6
log
@More minor doc fixes
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.5 2004/09/19 16:05:37 dkf Exp $
d28 2
a29 1
``large'' increments;  this option specifies the size of the
@


1.6.2.1
log
@merge updates from HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.6 2004/10/28 12:25:53 dkf Exp $
d28 1
a28 2
.QW large
increments;  this option specifies the size of the
d76 1
a76 1
will not activate.
d191 1
a191 1
If the point is not over one of these elements, an empty string
@


1.5
log
@Standardize style of section refs & public symbols. Remove displayed tabs
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.4 2004/08/17 22:37:24 dkf Exp $
a135 1

a198 1

@


1.4
log
@Doc patches [1010083] and [1010607] from Mikhail Kolesnitschenko.
Also some general fixes to menu.n and text.n
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.3 2000/08/25 06:58:32 ericm Exp $
d120 1
a120 1
with the mouse or keyboard as described in the BINDINGS
@


1.3
log
@* doc/toplevel.n:
* doc/spinbox.n:
* doc/scrollbar.n:
* doc/scale.n:
* doc/menubutton.n:
* doc/menu.n:
* doc/listbox.n:
* doc/entry.n:
* doc/frame.n:
* doc/message.n:
* doc/checkbutton.n:
* doc/radiobutton.n:
* doc/button.n:
* doc/label.n:
* doc/canvas.n:
* doc/text.n: Fixed Standard Options section to make best use of
new tab settings in man.macros.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.2 1998/09/14 18:22:59 stanton Exp $
d66 1
a66 1
Specfies the size of the slider, measured in screen units along the slider's
@


1.3.8.1
log
@More backporting of doc fixes
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.3 2000/08/25 06:58:32 ericm Exp $
d66 1
a66 1
Specifies the size of the slider, measured in screen units along the slider's
d120 1
a120 1
with the mouse or keyboard as described in the \fBBINDINGS\fR
d136 1
d200 1
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d19 5
a23 4
\-activebackground	\-font	\-highlightthickness	\-repeatinterval
\-background	\-foreground	\-orient	\-takefocus
\-borderwidth	\-highlightbackground	\-relief	\-troughcolor
\-cursor	\-highlightcolor	\-repeatdelay
@


1.2.18.1
log
@doc cleanup and clarifications from 8.4aCVS backport
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.3 2000/08/25 06:58:32 ericm Exp $
d19 4
a22 5
\-activebackground	\-foreground	\-relief
\-background	\-highlightbackground	\-repeatdelay
\-borderwidth	\-highlightcolor	\-repeatinterval
\-cursor	\-highlightthickness	\-takefocus
\-font	\-orient	\-troughcolor
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" SCCS: @@(#) scale.n 1.32 97/10/31 12:58:51
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: scale.n,v 1.2 1998/09/14 18:22:59 stanton Exp $
@


