diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-28 10:22:50 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-28 10:22:50 (GMT) |
commit | bffdac3cbb0bfe12357f55cdc4fb24195743fbcf (patch) | |
tree | 4a0680cb493f74dee4162dbbed922841cdf25694 /doc | |
parent | f068b3c8aa0a0bfed87b981e99a3b096aed995d5 (diff) | |
download | tk-bffdac3cbb0bfe12357f55cdc4fb24195743fbcf.zip tk-bffdac3cbb0bfe12357f55cdc4fb24195743fbcf.tar.gz tk-bffdac3cbb0bfe12357f55cdc4fb24195743fbcf.tar.bz2 |
Assorted minor documentation fixes
Diffstat (limited to 'doc')
-rw-r--r-- | doc/bind.n | 52 | ||||
-rw-r--r-- | doc/bindtags.n | 4 | ||||
-rw-r--r-- | doc/button.n | 3 | ||||
-rw-r--r-- | doc/canvas.n | 10 | ||||
-rw-r--r-- | doc/checkbutton.n | 15 | ||||
-rw-r--r-- | doc/chooseDirectory.n | 4 | ||||
-rw-r--r-- | doc/clipboard.n | 10 | ||||
-rw-r--r-- | doc/console.n | 4 | ||||
-rw-r--r-- | doc/entry.n | 9 | ||||
-rw-r--r-- | doc/font.n | 6 | ||||
-rw-r--r-- | doc/grab.n | 4 | ||||
-rw-r--r-- | doc/grid.n | 24 | ||||
-rw-r--r-- | doc/menu.n | 4 | ||||
-rw-r--r-- | doc/messageBox.n | 6 | ||||
-rw-r--r-- | doc/radiobutton.n | 24 |
15 files changed, 104 insertions, 75 deletions
@@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bind.n,v 1.17 2004/08/29 09:27:35 dkf Exp $ +'\" RCS: @(#) $Id: bind.n,v 1.18 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH bind n 8.0 Tk "Tk Built-In Commands" @@ -115,7 +115,9 @@ Modifiers consist of any of the following values: \fBButton4, B4\fR \fBDouble\fR \fBButton5, B5\fR \fBTriple\fR \fBMod1, M1\fR \fBQuadruple\fR +.VS \fBExtended\fR +.VE .DE Where more than one value is listed, separated by commas, the values are equivalent. @@ -151,6 +153,7 @@ substantial mouse motion in between. For example, \fB<Double-Button-1>\fR is equivalent to \fB<Button-1><Button-1>\fR with the extra time and space requirement. .PP +.VS 8.5 The \fBExtended\fR modifier is, at present, specific to Windows. It appears on events that are associated with the keys on the "extended keyboard." On a US keyboard, the extended keys include the \fBAlt\fR @@ -158,6 +161,7 @@ and \fBControl\fR keys at the right of the keyboard, the cursor keys in the cluster to the left of the numeric pad, the \fBNumLock\fR key, the \fBBreak\fR key, the \fBPrintScreen\fR key, and the \fB/\fR and \fBEnter\fR keys in the numeric keypad. +.VE 8.5 .SS "EVENT TYPES" .PP The \fItype\fR field may be any of the standard X event types, with a @@ -219,13 +223,15 @@ are generated when the user presses or releases a mouse button. \fBMotion\fP events are generated whenever the pointer is moved. \fBButtonPress\fP, \fBButtonRelease\fP, and \fBMotion\fP events are normally sent to the window containing the pointer. - +.RS +.PP When a mouse button is pressed, the window containing the pointer automatically obtains a temporary pointer grab. Subsequent \fBButtonPress\fP, \fBButtonRelease\fP, and \fBMotion\fP events will be sent to that window, regardless of which window contains the pointer, until all buttons have been released. +.RE .IP \fBConfigure\fP 5 A \fBConfigure\fP event is sent to a window whenever its size, position, or border width changes, and sometimes @@ -233,19 +239,21 @@ when it has changed position in the stacking order. .IP "\fBMap\fP, \fBUnmap\fP" 5 The \fBMap\fP and \fBUnmap\fP events are generated whenever the mapping state of a window changes. - +.RS +.PP Windows are created in the unmapped state. Top-level windows become mapped when they transition to the \fBnormal\fP state, and are unmapped in the \fBwithdrawn\fP and \fBiconic\fP states. Other windows become mapped when they are placed under control of a geometry manager (for example \fBpack\fP or \fBgrid\fP). - +.PP A window is \fIviewable\fP only if it and all of its ancestors are mapped. Note that geometry managers typically do not map their children until they have been mapped themselves, and unmap all children when they become unmapped; hence in Tk \fBMap\fP and \fBUnmap\fP events indicate whether or not a window is viewable. +.RE .IP \fBVisibility\fP 5 A window is said to be \fIobscured\fP when another window above it in the stacking order fully or partially overlaps it. @@ -261,16 +269,19 @@ handle \fBExpose\fP events, since Tk handles them internally. .IP \fBDestroy\fP 5 A \fBDestroy\fP event is delivered to a window when it is destroyed. - +.RS +.PP When the \fBDestroy\fP event is delivered to a widget, it is in a ``half-dead'' state: the widget still exists, but most operations on it will fail. +.RE .IP "\fBFocusIn\fP, \fBFocusOut\fP" 5 The \fBFocusIn\fP and \fBFocusOut\fP events are generated whenever the keyboard focus changes. A \fBFocusOut\fP event is sent to the old focus window, and a \fBFocusIn\fP event is sent to the new one. - +.RS +.PP In addition, if the old and new focus windows do not share a common parent, ``virtual crossing'' focus events are sent to the intermediate @@ -279,22 +290,25 @@ Thus a \fBFocusIn\fP event indicates that the target window or one of its descendants has acquired the focus, and a \fBFocusOut\fP event indicates that the focus has been changed to a window outside the target window's hierarchy. - +.PP The keyboard focus may be changed explicitly by a call to \fBfocus\fP, or implicitly by the window manager. +.RE .IP "\fBEnter\fP, \fBLeave\fP" 5 An \fBEnter\fP event is sent to a window when the pointer enters that window, and a \fBLeave\fP event is sent when the pointer leaves it. - +.RS +.PP If there is a pointer grab in effect, \fBEnter\fP and \fBLeave\fP events are only delivered to the window owning the grab. - +.PP In addition, when the pointer moves between two windows, \fBEnter\fP and \fBLeave\fP ``virtual crossing'' events are sent to intermediate windows in the hierarchy in the same manner as for \fBFocusIn\fP and \fBFocusOut\fP events. +.RE .IP \fBProperty\fP A \fBProperty\fP event is sent to a window whenever an X property belonging to that window is changed or deleted. @@ -303,13 +317,15 @@ they are handled by the Tk core. .IP \fBColormap\fP A \fBColormap\fP event is generated whenever the colormap associated with a window has been changed, installed, or uninstalled. - +.RS +.PP Widgets may be assigned a private colormap by specifying a \fB-colormap\fP option; the window manager is responsible for installing and uninstalling colormaps as necessary. - +.PP Note that Tk provides no useful details for this event type. +.RE '\" The following events were added in TIP#47 .IP "\fBMapRequest\fP, \fBCirculateRequest\fP, \fBResizeRequest\fP, \fBConfigureRequest\fP, \fBCreate\fP" 5 These events are not normally delivered to Tk applications. @@ -322,7 +338,8 @@ the Tk core does not use this mask.) The events \fBGravity\fP and \fBReparent\fP are not normally delivered to Tk applications. They are included for completeness. - +.RS +.PP A \fBCirculate\fP event indicates that the window has moved to the top or to the bottom of the stacking order as a result of an \fBXCirculateSubwindows\fP protocol request. @@ -332,6 +349,7 @@ Tk does not use \fBXCirculateSubwindows()\fP internally. This event type is included only for completeness; there is no reliable way to track changes to a window's position in the stacking order. +.RE .SS "EVENT DETAILS" .PP The last part of a long event specification is \fIdetail\fR. In the @@ -428,13 +446,13 @@ For \fBConfigureRequest\fR events, the string will be one of: Below None BottomIf TopIf\fR .DE -.VS +.VS 8.5 For virtual events, the string will be whatever value is stored in the \fIuser_data\fR field when the event was created (typically with \fBevent generate\fR), or the empty string if the field is NULL. Virtual events corresponding to key sequence presses (see \fBevent add\fR for details) set the \fIuser_data\fR to NULL. -.VE +.VE 8.5 For events other than these, the substituted string is undefined. .RE .IP \fB%f\fR 5 @@ -641,8 +659,8 @@ be picked at random: event add <<Paste>> <Control-y> event add <<Paste>> <Button-2> event add <<Scroll>> <Button-2> -bind Entry <<Paste>> {puts Paste} -bind Entry <<Scroll>> {puts Scroll} +\fBbind\fR Entry <<Paste>> {puts Paste} +\fBbind\fR Entry <<Scroll>> {puts Scroll} .CE If the user types Control-y, the \fB<<Paste>>\fR binding will be invoked, but if the user presses button 2 then one of @@ -690,7 +708,7 @@ out when the mouse is double-clicked: puts "hi from (%x,%y)" } .CE - +.PP A little GUI that displays what the keysym name of the last key pressed is: .CS diff --git a/doc/bindtags.n b/doc/bindtags.n index 5f54b3d..f82b61b 100644 --- a/doc/bindtags.n +++ b/doc/bindtags.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bindtags.n,v 1.3 2004/05/23 20:56:55 dkf Exp $ +'\" RCS: @(#) $Id: bindtags.n,v 1.4 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH bindtags n 4.0 Tk "Tk Built-In Commands" @@ -91,7 +91,7 @@ proc setupBindtagsForTreeDelivery {widget} { lappend tags $w } lappend tags all - bindtags $widget $tags + \fBbindtags\fR $widget $tags } .CE diff --git a/doc/button.n b/doc/button.n index 16535aa..68aaf7d 100644 --- a/doc/button.n +++ b/doc/button.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: button.n,v 1.8 2004/08/17 22:37:24 dkf Exp $ +'\" RCS: @(#) $Id: button.n,v 1.9 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH button n 4.4 Tk "Tk Built-In Commands" @@ -25,7 +25,6 @@ button \- Create and manipulate button widgets \-compound \-justify \-underline \-cursor \-padx \-wraplength \-disabledforeground \-pady - .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command diff --git a/doc/canvas.n b/doc/canvas.n index bfd7b51..53c525f 100644 --- a/doc/canvas.n +++ b/doc/canvas.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: canvas.n,v 1.17 2004/09/19 16:05:36 dkf Exp $ +'\" RCS: @(#) $Id: canvas.n,v 1.18 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH canvas n 8.3 Tk "Tk Built-In Commands" @@ -1396,7 +1396,9 @@ irrelevant. .TP \fB\-smooth \fIsmoothMethod\fR \fIsmoothMethod\fR must have one of the forms accepted by -\fBTk_GetBoolean\fR or a line smoothing method. Only \fBtrue\fR and \fBraw\fR are +\fBTk_GetBoolean\fR or a line smoothing method. +.VS 8.5 +Only \fBtrue\fR and \fBraw\fR are supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime. If a boolean false value or empty string is given, no smoothing is applied. A boolean truth value assumes \fBtrue\fR smoothing. @@ -1414,6 +1416,7 @@ line segments can be venerated within a curve by making control points equal to their neighbouring knot points. If the last point is a control point and not a knot point, the point is repeated (one or two times) so that it also becomes a knot point. +.VE 8.5 .TP \fB\-splinesteps \fInumber\fR Specifies the degree of smoothness desired for curves: each spline @@ -1525,6 +1528,7 @@ If this option isn't specified then it defaults to \fBmiter\fR. .TP \fB\-smooth \fIboolean\fR \fIBoolean\fR must have one of the forms accepted by \fBTk_GetBoolean\fR +.VS 8.5 or a line smoothing method. Only \fBtrue\fR and \fBraw\fR are supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime. If a boolean false value or empty string is given, no smoothing is applied. A boolean @@ -1544,6 +1548,7 @@ equal to their neighbouring knot points. If the last point is not the second point of a pair of control points, the point is repeated (one or two times) so that it also becomes the second point of a pair of control points (the associated knot point will be the first control point). +.VE 8.5 .TP \fB\-splinesteps \fInumber\fR Specifies the degree of smoothness desired for curves: each spline @@ -1749,7 +1754,6 @@ See the documentation for \fBTk_CreateItemType\fR. In the current implementation, new canvases are not given any default behavior: you'll have to execute explicit Tcl commands to give the canvas its behavior. - .SH CREDITS .PP Tk's canvas widget is a blatant ripoff of ideas from Joel Bartlett's diff --git a/doc/checkbutton.n b/doc/checkbutton.n index b7607df..d36d54b 100644 --- a/doc/checkbutton.n +++ b/doc/checkbutton.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: checkbutton.n,v 1.8 2004/08/16 14:01:10 dkf Exp $ +'\" RCS: @(#) $Id: checkbutton.n,v 1.9 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH checkbutton n 4.4 Tk "Tk Built-In Commands" @@ -96,13 +96,17 @@ the widget and will ignore mouse button presses. In this state the \fBdisabledForeground\fR and \fBbackground\fR options determine how the checkbutton is displayed. .OP \-tristateimage tristateImage TristateImage +.VS 8.5 Specifies an image to display (in place of the \fBimage\fR option) when the checkbutton is in tri-state mode. This option is ignored unless the \fBimage\fR option has been specified. +.VE 8.5 .OP \-tristatevalue tristateValue Value +.VS 8.5 Specifies the value that causes the checkbutton to display the multi-value selection, also known as the tri-state mode. Defaults to ``""'' +.VE 8.5 .OP \-variable variable Variable Specifies name of global variable to set to indicate whether or not this button is selected. Defaults to the name of the @@ -149,10 +153,10 @@ checkbutton. .PP In addition, checkbuttons can be \fIselected\fR. If a checkbutton is selected then the indicator is normally -.VS drawn with a selected appearance, and a Tcl variable associated with the checkbutton is set to a particular value (normally 1). +.VS 8.5 The indicator is drawn with a check mark inside. If the checkbutton is not selected, then the indicator is drawn with a deselected appearance, and the associated variable is @@ -165,7 +169,6 @@ box represents the state of multiple items.) The indicator is drawn in a platform dependent manner. Under Unix and Windows, the background interior of the box is ``grayed''. Under Mac, the indicator is drawn with a dash mark inside. -.VE By default, the name of the variable associated with a checkbutton is the same as the \fIname\fR used to create the checkbutton. The variable name, and the ``on'', ``off'' and ``tristate'' values stored in @@ -178,7 +181,7 @@ itself on alternate button clicks. In addition, each checkbutton monitors its associated variable and automatically selects and deselects itself when the variables value changes to and from the button's ``on'', ``off'' and ``tristate'' values. - +.VE 8.5 .SH "WIDGET COMMAND" .PP The \fBcheckbutton\fR command creates a new Tcl command whose @@ -238,7 +241,6 @@ value. \fIpathName \fBtoggle\fR Toggles the selection state of the button, redisplaying it and modifying its associated variable to reflect the new state. - .SH BINDINGS .PP Tk automatically creates class bindings for checkbuttons that give them @@ -269,5 +271,8 @@ actions occur: the checkbutton is completely non-responsive. The behavior of checkbuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. +.SH "SEE ALSO" +button(n), options(n), radiobutton(n) + .SH KEYWORDS checkbutton, widget diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n index e0d7882..32f9166 100644 --- a/doc/chooseDirectory.n +++ b/doc/chooseDirectory.n @@ -2,7 +2,7 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: chooseDirectory.n,v 1.3 2004/08/20 10:56:36 dkf Exp $ +'\" RCS: @(#) $Id: chooseDirectory.n,v 1.4 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH tk_chooseDirectory n 8.3 Tk "Tk Built-In Commands" @@ -45,7 +45,7 @@ this parameter is true, then the user may only select directories that already exist. The default value is \fIfalse\fR. .SH EXAMPLE .CS -set dir [tk_chooseDirectory \\ +set dir [\fBtk_chooseDirectory\fR \\ \-initialdir ~ \-title "Choose a directory"] if {$dir eq ""} { label .l -text "No directory selected" diff --git a/doc/clipboard.n b/doc/clipboard.n index 570a90a..d8f04a2 100644 --- a/doc/clipboard.n +++ b/doc/clipboard.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: clipboard.n,v 1.8 2004/06/18 21:27:38 dkf Exp $ +'\" RCS: @(#) $Id: clipboard.n,v 1.9 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH clipboard n 8.4 Tk "Tk Built-In Commands" @@ -77,9 +77,9 @@ next argument will always be used as \fIdata\fR. This feature may be convenient if, for example, \fIdata\fR starts with a \fB\-\fR. .RE -.VS 8.4 .TP \fBclipboard get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-type\fR \fItype\fR? +.VS 8.4 Retrieve data from the clipboard on \fIwindow\fR's display. \fIwindow\fR defaults to ".". \fIType\fR specifies the form in which the data is to be returned and should be an atom name such as STRING @@ -89,15 +89,15 @@ equivalent to \fBselection get -selection CLIPBOARD\fR. .SH EXAMPLES Get the current contents of the clipboard. .CS -if {[catch {\fBclipboard\fR get} contents]} { +if {[catch {\fBclipboard get\fR} contents]} { # There were no clipboard contents at all } .CE .PP Set the clipboard to contain a fixed string. .CS -\fBclipboard\fR clear -\fBclipboard\fR append "some fixed string" +\fBclipboard clear\fR +\fBclipboard append\fR "some fixed string" .CE .SH "SEE ALSO" diff --git a/doc/console.n b/doc/console.n index f32bbdc..7992457 100644 --- a/doc/console.n +++ b/doc/console.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: console.n,v 1.6 2004/06/21 21:56:44 dkf Exp $ +'\" RCS: @(#) $Id: console.n,v 1.7 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH console n 8.4 Tk "Tk Built-In Commands" @@ -130,7 +130,7 @@ Not all platforms have the \fBconsole\fR command, so debugging code often has the following code fragment in it so output produced by \fBputs\fR can be seen while during development: .CS -catch {\fBconsole\fR show} +catch {\fBconsole show\fR} .CE .SH KEYWORDS diff --git a/doc/entry.n b/doc/entry.n index e02f4d8..67a4232 100644 --- a/doc/entry.n +++ b/doc/entry.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: entry.n,v 1.13 2004/08/17 22:37:24 dkf Exp $ +'\" RCS: @(#) $Id: entry.n,v 1.14 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH entry n 8.3 Tk "Tk Built-In Commands" @@ -123,9 +123,8 @@ may be used to change the view in the window. Entries use the standard \fBxScrollCommand\fR mechanism for interacting with scrollbars (see the description of the \fBxScrollCommand\fR option for details). They also support scanning, as described below. - -.VS 8.3 .SH VALIDATION +.VS 8.3 .PP Validation works by setting the \fBvalidateCommand\fR option to a script which will be evaluated according to the \fBvalidate\fR @@ -191,14 +190,13 @@ validated. If you wish to edit the entry widget (for example set it to {}) during validation and still have the \fBvalidate\fR option set, you should include the command .CS - \fIafter idle {%W config -validate %v}\fR +after idle {%W config -validate %v} .CE in the \fBvalidateCommand\fR or \fBinvalidCommand\fR (whichever one you were editing the entry widget from). It is also recommended to not set an associated \fBtextVariable\fR during validation, as that can cause the entry widget to become out of sync with the \fBtextVariable\fR. .VE - .SH "WIDGET COMMAND" .PP The \fBentry\fR command creates a new Tcl command whose @@ -424,7 +422,6 @@ If \fInumber\fR is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible. .RE - .SH "DEFAULT BINDINGS" .PP Tk automatically creates class bindings for entries that give them @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: font.n,v 1.6 2004/08/20 14:15:29 dkf Exp $ +'\" RCS: @(#) $Id: font.n,v 1.7 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH font n 8.0 Tk "Tk Built-In Commands" @@ -286,11 +286,11 @@ family installed on your system: pack [text .t -wrap none] -fill both -expand 1 set count 0 set tabwidth 0 -foreach family [lsort -dictionary [\fBfont\fR families]] { +foreach family [lsort -dictionary [\fBfont families\fR]] { .t tag configure f[incr count] -font [list $family 10] .t insert end ${family}:\\t {} \\ "This is a simple sampler\\n" f$count - set w [\fBfont\fR measure [.t cget -font] ${family}:] + set w [\fBfont measure\fR [.t cget -font] ${family}:] if {$w+5 > $tabwidth} { set tabwidth [expr {$w+5}] .t configure -tabs $tabwidth @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: grab.n,v 1.3 2004/06/21 21:19:41 dkf Exp $ +'\" RCS: @(#) $Id: grab.n,v 1.4 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH grab n "" Tk "Tk Built-In Commands" @@ -129,7 +129,7 @@ clicked. pack [button .b1 \-text "Click me! #1" \-command {destroy .b1}] pack [button .b2 \-text "Click me! #2" \-command {destroy .b2}] pack [button .b3 \-text "Click me! #3" \-command {destroy .b3}] -grab .b2 +\fBgrab\fR .b2 .CE .SH KEYWORDS @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: grid.n,v 1.12 2004/09/19 16:05:37 dkf Exp $ +'\" RCS: @(#) $Id: grid.n,v 1.13 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH grid n 8.5 Tk "Tk Built-In Commands" @@ -34,9 +34,9 @@ processed in the same way as \fBgrid configure\fR. .TP \fBgrid anchor \fImaster\fR ?\fIanchor\fR? The anchor value controls how to place the grid within the master -when no row/column has any weight. See ``THE GRID ALGORITHM'' below +when no row/column has any weight. See \fBTHE GRID ALGORITHM\fR below for further details. The default \fIanchor\fR is \fInw\fR. -.VE +.VE 8.5 .TP \fBgrid bbox \fImaster\fR ?\fIcolumn row\fR? ?\fIcolumn2 row2\fR? With no arguments, @@ -62,7 +62,7 @@ Indices may be integers, window names or the keyword \fIall\fP. For \fIall\fP the options apply to all columns currently occupied be slave windows. For a window name, that window must be a slave of this master and the options apply to all columns currently occupied be the slave. -.VE +.VE 8.5 The \fB\-minsize\fP option sets the minimum size, in screen units, that will be permitted for this column. The \fB\-weight\fP option (an integer value) @@ -77,7 +77,7 @@ the column in a \fIuniform group\fP with other columns that have the same value for \fB-uniform\fP. The space for columns belonging to a uniform group is allocated so that their sizes are always in strict proportion to their \fB-weight\fP values. See -``THE GRID ALGORITHM'' below for further details. +\fBTHE GRID ALGORITHM\fR below for further details. The \fB-pad\fP option specifies the number of screen units that will be added to the largest window contained completely in that column when the grid geometry manager requests a size from the containing window. @@ -201,7 +201,7 @@ For locations that are above or to the left of the grid, \fB-1\fP is returned. \fBgrid propagate \fImaster\fR ?\fIboolean\fR? If \fIboolean\fR has a true boolean value such as \fB1\fR or \fBon\fR then propagation is enabled for \fImaster\fR, which must be a window -name (see ``GEOMETRY PROPAGATION'' below). +name (see \fBGEOMETRY PROPAGATION\fR below). If \fIboolean\fR has a false boolean value then propagation is disabled for \fImaster\fR. In either of these cases an empty string is returned. @@ -222,7 +222,7 @@ Indices may be integers, window names or the keyword \fIall\fP. For \fIall\fP the options apply to all rows currently occupied be slave windows. For a window name, that window must be a slave of this master and the options apply to all rows currently occupied be the slave. -.VE +.VE 8.5 The \fB\-minsize\fP option sets the minimum size, in screen units, that will be permitted for this row. The \fB\-weight\fP option (an integer value) @@ -237,7 +237,7 @@ the row in a \fIuniform group\fP with other rows that have the same value for \fB-uniform\fP. The space for rows belonging to a uniform group is allocated so that their sizes are always in strict proportion to their \fB-weight\fP values. See -``THE GRID ALGORITHM'' below for further details. +\fBTHE GRID ALGORITHM\fR below for further details. The \fB-pad\fP option specifies the number of screen units that will be added to the largest window contained completely in that row when the grid geometry manager requests a size from the containing window. @@ -351,7 +351,7 @@ column or row shrinks to its minsize, its weight is taken to be zero. If more space needs to be removed from a layout than would be permitted, as when all the rows or columns are at their minimum sizes, the layout is placed and clipped according to the \fIanchor\fR value. -.VE +.VE 8.5 .SH "GEOMETRY PROPAGATION" .PP The grid geometry manager normally computes how large a master must be to @@ -400,8 +400,8 @@ scrollbar .t.h \-orient horizontal \-command {.t.txt xview} \fBgrid\fR .t.txt .t.v \-sticky nsew \fBgrid\fR .t.h \-sticky nsew # Tell the text widget to take all the extra room -\fBgrid\fR rowconfigure .t .t.txt -weight 1 -\fBgrid\fR columnconfigure .t .t.txt -weight 1 +\fBgrid rowconfigure\fR .t .t.txt -weight 1 +\fBgrid columnconfigure\fR .t .t.txt -weight 1 .CE .PP Three widgets of equal width, despite their different "natural" widths: @@ -410,7 +410,7 @@ button .b \-text "Foo" entry .e \-variable foo label .l \-text "This is a fairly long piece of text" \fBgrid\fR .b .e .l \-sticky ew -\fBgrid\fR columnconfigure . "all" \-uniform allTheSame +\fBgrid columnconfigure\fR . "all" \-uniform allTheSame .CE .SH "SEE ALSO" @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: menu.n,v 1.10 2004/08/17 22:37:24 dkf Exp $ +'\" RCS: @(#) $Id: menu.n,v 1.11 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH menu n 4.1 Tk "Tk Built-In Commands" @@ -654,9 +654,9 @@ Returns the type of the menu entry given by \fIindex\fR. This is the \fItype\fR argument passed to the \fBadd\fR widget command when the entry was created, such as \fBcommand\fR or \fBseparator\fR, or \fBtearoff\fR for a tear-off entry. -.VS .TP \fIpathName \fBunpost\fR +.VS Unmap the window so that it is no longer displayed. If a lower-level cascaded menu is posted, unpost that menu. Returns an empty string. This subcommand does not work on Windows and the diff --git a/doc/messageBox.n b/doc/messageBox.n index 887cc2f..78849fa 100644 --- a/doc/messageBox.n +++ b/doc/messageBox.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: messageBox.n,v 1.7 2004/05/29 19:00:32 jenglish Exp $ +'\" RCS: @(#) $Id: messageBox.n,v 1.8 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH tk_messageBox n 4.2 Tk "Tk Built-In Commands" @@ -86,12 +86,12 @@ and \fBcancel\fR. .PP .SH EXAMPLE .CS -set answer [tk_messageBox \-message "Really quit?" \e +set answer [\fBtk_messageBox\fR \-message "Really quit?" \e \-icon question \-type yesno \e \-detail "Select \e"Yes\e" to make the application exit"] switch -- $answer { yes exit - no {tk_messageBox \-message "I know you like this application!" \e + no {\fBtk_messageBox\fR \-message "I know you like this application!" \e \-type ok} } .CE diff --git a/doc/radiobutton.n b/doc/radiobutton.n index 73bb98e..902d205 100644 --- a/doc/radiobutton.n +++ b/doc/radiobutton.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: radiobutton.n,v 1.8 2004/08/16 14:01:09 dkf Exp $ +'\" RCS: @(#) $Id: radiobutton.n,v 1.9 2004/10/28 10:22:51 dkf Exp $ '\" .so man.macros .TH radiobutton n 4.4 Tk "Tk Built-In Commands" @@ -53,8 +53,8 @@ for the entire widget, in place of \fBbackground\fR or \fBactiveBackground\fR, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected. -.VS 8.4 .OP \-offrelief offRelief OffRelief +.VS 8.4 Specifies the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is "raised". By setting this option to "flat" and setting -indicatoron to false and -overrelief to raised, @@ -63,10 +63,9 @@ of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a word-processor, for example. - .VE 8.4 -.VS 8.4 .OP \-overrelief overRelief OverRelief +.VS 8.4 Specifies an alternative relief for the radiobutton, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring \fB\-relief flat \-overrelief @@ -91,13 +90,17 @@ the widget and will ignore mouse button presses. In this state the \fBdisabledForeground\fR and \fBbackground\fR options determine how the radiobutton is displayed. .OP \-tristateimage tristateImage TristateImage +.VS 8.5 Specifies an image to display (in place of the \fBimage\fR option) when the radiobutton is selected. This option is ignored unless the \fBimage\fR option has been specified. +.VE 8.5 .OP \-tristatevalue tristateValue Value +.VS 8.5 Specifies the value that causes the radiobutton to display the multi-value selection, also known as the tri-state mode. Defaults to ``""'' +.VE 8.5 .OP \-value value Value Specifies value to store in the button's associated variable whenever this button is selected. @@ -163,10 +166,12 @@ When a radiobutton is selected it sets the value of the variable to indicate that fact; each radiobutton also monitors the value of the variable and automatically selects and deselects itself when the variable's value changes. -If the variable's value matches the tristatevalue, then the radiobutton is +.VS 8.5 +If the variable's value matches the \fBtristateValue\fR, then the radiobutton is drawn using the tri-state mode. This mode is used to indicate mixed or -multiple values. (This is used when the radio button represents the state +multiple values. (This is used when the radiobutton represents the state of multiple items.) +.VE 8.5 By default the variable \fBselectedButton\fR is used; its contents give the name of the button that is selected, or the empty string if no button associated with that @@ -177,7 +182,6 @@ on the command line or in the option database. Configuration options may also be used to modify the way the indicator is displayed (or whether it is displayed at all). By default a radiobutton is configured to select itself on button clicks. - .SH "WIDGET COMMAND" .PP The \fBradiobutton\fR command creates a new Tcl command whose @@ -235,13 +239,12 @@ This command is ignored if the radiobutton's state is \fBdisabled\fR. \fIpathName \fBselect\fR Selects the radiobutton and sets the associated variable to the value corresponding to this widget. - .SH BINDINGS .PP Tk automatically creates class bindings for radiobuttons that give them the following default behavior: -.VS .IP [1] +.VS On Unix systems, a radiobutton activates whenever the mouse passes over it and deactivates whenever the mouse leaves the radiobutton. On Mac and Windows systems, when mouse button 1 is pressed over a @@ -263,5 +266,8 @@ actions occur: the radiobutton is completely non-responsive. The behavior of radiobuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. +.SH "SEE ALSO" +checkbutton(n), labelframe(n), listbox(n), options(n), scale(n) + .SH KEYWORDS radiobutton, widget |