summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-24 12:59:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-24 12:59:29 (GMT)
commite45899dfe4a136045461e8d0a243333b8ea5772d (patch)
tree355358c10e10a1d3a4082cb6e6a24a379af08bd8
parent1716dd0b177db2823c1a9db54804b2ff72749534 (diff)
downloadtk-e45899dfe4a136045461e8d0a243333b8ea5772d.zip
tk-e45899dfe4a136045461e8d0a243333b8ea5772d.tar.gz
tk-e45899dfe4a136045461e8d0a243333b8ea5772d.tar.bz2
merge updates from HEAD
-rw-r--r--ChangeLog79
-rw-r--r--doc/canvas.n21
-rw-r--r--doc/chooseDirectory.n4
-rw-r--r--doc/clipboard.n4
-rw-r--r--doc/dialog.n4
-rw-r--r--doc/font.n80
-rw-r--r--doc/getOpenFile.n5
-rw-r--r--doc/labelframe.n8
-rw-r--r--doc/text.n6
-rw-r--r--doc/ttk_button.n32
-rw-r--r--doc/ttk_checkbutton.n32
-rw-r--r--doc/ttk_combobox.n87
-rw-r--r--doc/ttk_entry.n56
-rw-r--r--doc/ttk_frame.n22
-rw-r--r--doc/ttk_image.n79
-rw-r--r--doc/ttk_intro.n185
-rw-r--r--doc/ttk_label.n18
-rw-r--r--doc/ttk_labelframe.n40
-rw-r--r--doc/ttk_menubutton.n13
-rw-r--r--doc/ttk_notebook.n179
-rw-r--r--doc/ttk_panedwindow.n102
-rw-r--r--doc/ttk_progressbar.n76
-rw-r--r--doc/ttk_radiobutton.n28
-rw-r--r--doc/ttk_scrollbar.n184
-rw-r--r--doc/ttk_separator.n10
-rw-r--r--doc/ttk_sizegrip.n20
-rw-r--r--doc/ttk_style.n12
-rw-r--r--doc/ttk_treeview.n495
-rw-r--r--doc/ttk_widget.n256
-rw-r--r--doc/wm.n21
-rw-r--r--generic/tkFont.c19
-rw-r--r--generic/tkWindow.c4
-rw-r--r--generic/ttk/ttkTrack.c9
-rw-r--r--library/console.tcl8
-rw-r--r--library/demos/combo.tcl64
-rw-r--r--library/demos/en.msg4
-rw-r--r--library/demos/nl.msg75
-rw-r--r--library/demos/toolbar.tcl106
-rw-r--r--library/demos/tree.tcl96
-rw-r--r--library/demos/ttkbut.tcl41
-rw-r--r--library/demos/ttkmenu.tcl3
-rw-r--r--library/demos/ttknote.tcl60
-rw-r--r--library/demos/ttkpane.tcl46
-rw-r--r--library/demos/ttkprogress.tcl49
-rw-r--r--library/demos/widget59
-rw-r--r--library/ttk/aquaTheme.tcl8
-rw-r--r--library/ttk/combobox.tcl233
-rw-r--r--library/ttk/fonts.tcl64
-rw-r--r--library/ttk/utils.tcl21
-rw-r--r--macosx/Wish.xcode/project.pbxproj20
-rw-r--r--macosx/Wish.xcodeproj/project.pbxproj20
-rw-r--r--macosx/tkMacOSXFont.c134
-rw-r--r--tests/cursor.test4
-rw-r--r--win/tkWinDraw.c4
-rw-r--r--win/tkWinFont.c18
55 files changed, 2005 insertions, 1322 deletions
diff --git a/ChangeLog b/ChangeLog
index fb55f3a..b23ea9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,80 @@
+2007-10-24 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * win/tkWinDraw.c: Applied patch #1723362 for transparent bitmaps
+
+ * generic/tkWindow.c: permit wm manage of any widget (esp: ttk::frame)
+
+2007-10-23 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * library/ttk/combobox.tcl (ttk::combobox::PopdownWindow): redo wm
+ transient on each drop to handle reparent-able frames. [Bug 1818441]
+
+2007-10-23 Joe English <jenglish@users.sourceforge.net>
+
+ * library/ttk/combobox.tcl: [namespace import ::ttk::scrollbar]
+ doesn't work, since ttk::scrollbar isn't [namespace export]ed.
+
+2007-10-23 Don Porter <dgp@users.sourceforge.net>
+
+ * tests/cursor.test: Make tests robust against changes in Tcl's
+ rules for accepting integers in octal format.
+
+2007-10-23 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
+
+ * doc/font.n: Added section on the TIP#145 fonts.
+
+2007-10-23 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * win/tkWinFont.c: Fixed leak in CreateNamedFont spotted by das.
+
+2007-10-23 Daniel Steffen <das@users.sourceforge.net>
+
+ * library/demos/combo.tcl: Aqua GOOBE.
+ * library/demos/toolbar.tcl:
+ * library/demos/tree.tcl:
+ * library/demos/ttknote.tcl:
+ * library/demos/ttkprogress.tcl:
+ * library/demos/widget:
+
+ * macosx/Wish.xcodeproj/project.pbxproj: add new demo files.
+ * macosx/Wish.xcode/project.pbxproj:
+
+2007-10-22 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
+
+ * library/demos/widget: Added more demos, reorganized to make Tk and
+ Ttk demos seem to be more coherent whole. Made localization a bit
+ easier by reducing the amount of duplication.
+ * library/demos/{combo,toolbar,tree,ttknote,ttkprogress}.tcl: New
+ demos of new (mostly) Ttk widgets.
+ * library/demos/ttkbut.tcl: Improvements.
+
+2007-10-22 Joe English <jenglish@users.sourceforge.net>
+
+ * library/ttk/combobox.tcl: ttk::combobox overhaul; fixes [Bugs
+ 1814778, 1780286, 1609168, 1349586]
+ * library/ttk/aquaTheme.tcl: Factored out aqua-specific combobox
+ -postposition adjustments.
+ * generic/ttk/ttkTrack.c: Detect [grab]s and unpress pressed
+ element; combobox workaround no longer
+ needed.
+
+2007-10-22 Daniel Steffen <das@users.sourceforge.net>
+
+ * macosx/tkMacOSXFont.c: register named fonts for TIP #145 fonts
+ and all theme font IDs.
+
+ * generic/tkFont.c (Tk{Create,Delete}NamedFont): allow NULL interp.
+
+ * library/ttk/fonts.tcl: check for TIP #145 fonts on all
+ platforms; correct aqua font sizes.
+
+ * library/demos/ttkmenu.tcl: Aqua GOOBE.
+ * library/demos/ttkpane.tcl:
+ * library/demos/widget:
+
+ * macosx/Wish.xcodeproj/project.pbxproj: add new demo files.
+ * macosx/Wish.xcode/project.pbxproj:
+
2007-10-18 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
* library/demos/ttkmenu.tcl: Added more demos of Ttk widgets. These
@@ -6,7 +83,7 @@
2007-10-18 Pat Thoyts <patthoyts@users.sourceforge.net>
- * library/ttk/fonts.tcl: Create all the tip 145 font names on all
+ * library/ttk/fonts.tcl: Create all the TIP #145 font names on all
platforms (mac and unix get handled in script, windows in C)
2007-10-17 David Gravereaux <davygrvy@pobox.com>
diff --git a/doc/canvas.n b/doc/canvas.n
index 993cf30..4391ab5 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.24.2.1 2007/05/26 04:06:06 dgp Exp $
+'\" RCS: @(#) $Id: canvas.n,v 1.24.2.2 2007/10/24 12:59:30 dgp Exp $
'\"
.so man.macros
.TH canvas n 8.3 Tk "Tk Built-In Commands"
@@ -1026,7 +1026,6 @@ the coordinates of the item.
.PP
Many items share a common set of options. These options are
explained here, and then referred to be each widget type for brevity.
-.PP
.TP
\fB\-dash \fIpattern\fR
.TP
@@ -1157,7 +1156,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by arcs:
.CS
\-dash
@@ -1227,7 +1226,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by bitmaps:
.CS
\-state
@@ -1291,7 +1290,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by images:
.CS
\-state
@@ -1336,7 +1335,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by lines:
.CS
\-dash
@@ -1446,7 +1445,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by ovals:
.CS
\-dash
@@ -1493,7 +1492,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by polygons:
.CS
\-dash
@@ -1585,7 +1584,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by rectangles:
.CS
\-dash
@@ -1633,7 +1632,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by text items:
.CS
\-fill
@@ -1714,7 +1713,7 @@ pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration.
-.br
+.PP
The following standard options are supported by window items:
.CS
\-state
diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n
index 32f9166..fe69bbd 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.4 2004/10/28 10:22:51 dkf Exp $
+'\" RCS: @(#) $Id: chooseDirectory.n,v 1.4.2.1 2007/10/24 12:59:30 dgp 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 [\fBtk_chooseDirectory\fR \\
+set dir [\fBtk_chooseDirectory\fR \e
\-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 18e6c54..2cf941e 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.11 2005/08/04 10:01:59 dkf Exp $
+'\" RCS: @(#) $Id: clipboard.n,v 1.11.2.1 2007/10/24 12:59:30 dgp Exp $
'\"
.so man.macros
.TH clipboard n 8.4 Tk "Tk Built-In Commands"
@@ -125,7 +125,7 @@ pack $c
$c create text 150 30 -text "cut and paste me"
bind $c <<Cut>> {
\fBclipboard clear\fR
- \fBclipboard append -type\fR TkCanvasItem \\
+ \fBclipboard append -type\fR TkCanvasItem \e
[getItemConfig %W current]
# Delete because this is cut, not copy.
%W delete current
diff --git a/doc/dialog.n b/doc/dialog.n
index 269726a..b075f5b 100644
--- a/doc/dialog.n
+++ b/doc/dialog.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: dialog.n,v 1.3 2004/06/21 14:28:56 dkf Exp $
+'\" RCS: @(#) $Id: dialog.n,v 1.3.2.1 2007/10/24 12:59:30 dgp Exp $
'\"
.so man.macros
.TH tk_dialog n 4.1 Tk "Tk Built-In Commands"
@@ -62,7 +62,7 @@ grab. This prevents the user from interacting with the application
in any way except to invoke the dialog box.
.SH EXAMPLE
.CS
-set reply [\fBtk_dialog\fR .foo "The Title" "Do you want to say yes?" \\
+set reply [\fBtk_dialog\fR .foo "The Title" "Do you want to say yes?" \e
questhead 0 Yes No "I'm not sure"]
.CE
diff --git a/doc/font.n b/doc/font.n
index c7bee07..66bb1e7 100644
--- a/doc/font.n
+++ b/doc/font.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: font.n,v 1.11 2007/05/03 23:55:29 dkf Exp $
+'\" RCS: @(#) $Id: font.n,v 1.11.2.1 2007/10/24 12:59:30 dgp Exp $
'\"
.so man.macros
.TH font n 8.0 Tk "Tk Built-In Commands"
@@ -261,26 +261,92 @@ font should be underlined. The default value for underline is \fBfalse\fR.
The value is a boolean flag that specifies whether a horizontal line should
be drawn through the middle of characters in this font. The default value
for overstrike is \fBfalse\fR.
-.SH "PLATFORM-SPECIFIC ISSUES"
+.SH "STANDARD FONTS"
.LP
-The following named system fonts are supported:
+The following named fonts are supported on all systems, and default to values
+that match appropriate system defaults.
+.TP
+\fBTkDefaultFont\fR
+.
+This font is the default for all GUI items not otherwise specified.
+.TP
+\fBTkTextFont\fR
+.
+This font should be used for user text in entry widgets, listboxes etc.
+.TP
+\fBTkFixedFont\fR
+.
+This font is the standard fixed-width font.
+.TP
+\fBTkMenuFont\fR
+.
+This font is used for menu items.
+.TP
+\fBTkHeadingFont\fR
+.
+This font should be used for column headings in lists and tables.
+.TP
+\fBTkCaptionFont\fR
+.
+This font should be used for window and dialog caption bars.
+.TP
+\fBTkSmallCaptionFont\fR
+.
+This font should be used for captions on contained windows or tool dialogs.
+.TP
+\fBTkIconFont\fR
+.
+This font should be used for icon captions.
+.TP
+\fBTkTooltipFont\fR
+.
+This font should be used for tooltip windows (transient information windows).
+.LP
+It is \fInot\fR advised to change these fonts, as they may be modified by Tk
+itself in response to system changes. Instead, make a copy of the font and
+modify that.
+.SS "PLATFORM-SPECIFIC FONTS"
+.LP
+The following system fonts are supported:
.RS
.TP
-X Windows:
+\fBX Windows\fR
All valid X font names, including those listed by xlsfonts(1), are available.
.TP
-MS Windows:
+\fBMS Windows\fR
.DS
.ta 3c 6c
\fBsystem ansi device
systemfixed ansifixed oemfixed\fR
.DE
.TP
-Mac OS X:
+\fBMac OS X\fR
.DS
.ta 3c 6c
\fBsystem application menu\fR
.DE
+Additionally, the following named fonts provide access to the Aqua theme fonts:
+.DS
+\fBsystemSystemFont
+systemEmphasizedSystemFont
+systemSmallSystemFont
+systemSmallEmphasizedSystemFont
+systemApplicationFont
+systemLabelFont
+systemViewsFont
+systemMenuTitleFont
+systemMenuItemFont
+systemMenuItemMarkFont
+systemMenuItemCmdKeyFont
+systemWindowTitleFont
+systemPushButtonFont
+systemUtilityWindowTitleFont
+systemAlertHeaderFont
+systemToolbarFont
+systemMiniSystemFont
+systemDetailSystemFont
+systemDetailEmphasizedSystemFont\fR
+.DE
.RE
.SH EXAMPLE
Fill a text widget with lots of font demonstrators, one for every font
@@ -291,7 +357,7 @@ set count 0
set tabwidth 0
foreach family [lsort -dictionary [\fBfont families\fR]] {
.t tag configure f[incr count] -font [list $family 10]
- .t insert end ${family}:\\t {} \\
+ .t insert end ${family}:\\t {} \e
"This is a simple sampler\\n" f$count
set w [\fBfont measure\fR [.t cget -font] ${family}:]
if {$w+5 > $tabwidth} {
diff --git a/doc/getOpenFile.n b/doc/getOpenFile.n
index 7e8469a..534e2fc 100644
--- a/doc/getOpenFile.n
+++ b/doc/getOpenFile.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: getOpenFile.n,v 1.15 2005/07/06 22:17:06 hobbs Exp $
+'\" RCS: @(#) $Id: getOpenFile.n,v 1.15.2.1 2007/10/24 12:59:30 dgp Exp $
'\"
.so man.macros
.TH tk_getOpenFile n 4.2 Tk "Tk Built-In Commands"
@@ -13,9 +13,10 @@
.SH NAME
tk_getOpenFile, tk_getSaveFile \- pop up a dialog box for the user to select a file to open or save.
.SH SYNOPSIS
+.nf
\fBtk_getOpenFile \fR?\fIoption value ...\fR?
-.br
\fBtk_getSaveFile \fR?\fIoption value ...\fR?
+.fi
.BE
.SH DESCRIPTION
diff --git a/doc/labelframe.n b/doc/labelframe.n
index 2937893..3aee105 100644
--- a/doc/labelframe.n
+++ b/doc/labelframe.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: labelframe.n,v 1.3 2006/12/13 23:04:32 hobbs Exp $
+'\" RCS: @(#) $Id: labelframe.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH labelframe n 8.4 Tk "Tk Built-In Commands"
@@ -143,9 +143,9 @@ This shows how to build part of a GUI for a hamburger vendor. The
the kinds of things that the choices are being made over.
.PP
.CS
-grid [\fBlabelframe\fR .burger -text "Burger"] \\
+grid [\fBlabelframe\fR .burger -text "Burger"] \e
[\fBlabelframe\fR .bun -text "Bun"] -sticky news
-grid [\fBlabelframe\fR .cheese -text "Cheese Option"] \\
+grid [\fBlabelframe\fR .cheese -text "Cheese Option"] \e
[\fBlabelframe\fR .pickle -text "Pickle Option"] -sticky news
foreach {type name val} {
burger Beef beef
@@ -168,7 +168,7 @@ foreach {type name val} {
pickle Onions onion
pickle Chili chili
} {
- set w [radiobutton .$type.$val -text $name -anchor w \\
+ set w [radiobutton .$type.$val -text $name -anchor w \e
-variable $type -value $val]
pack $w -side top -fill x
}
diff --git a/doc/text.n b/doc/text.n
index 575a673..794b542 100644
--- a/doc/text.n
+++ b/doc/text.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: text.n,v 1.43.2.1 2007/10/17 14:37:05 dgp Exp $
+'\" RCS: @(#) $Id: text.n,v 1.43.2.2 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH text n 8.5 Tk "Tk Built-In Commands"
@@ -1458,11 +1458,13 @@ arguments, and the section on \fIpathName
\fBdelete\fR for an explanation of the handling of the indices. If
\fIindex2\fR corresponds to an index earlier in the text than
\fIindex1\fR, an error will be generated.
-.br
+.RS
+.PP
The deletion and insertion are arranged so that no unnecessary
scrolling of the window or movement of insertion cursor occurs. In
addition the undo/redo stack are correctly modified, if undo operations
are active in the text widget. The command returns an empty string.
+.RE
.VE 8.5
.TP
\fIpathName \fBscan\fR \fIoption args\fR
diff --git a/doc/ttk_button.n b/doc/ttk_button.n
index ce1771b..65cf329 100644
--- a/doc/ttk_button.n
+++ b/doc/ttk_button.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: ttk_button.n,v 1.3 2006/12/13 23:04:32 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_button.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_button n 8.5 Tk "Tk Themed Widget"
@@ -20,11 +20,11 @@ ttk_button \- Widget that issues a command when pressed
A \fBttk::button\fR widget displays a textual label and/or image,
and evaluates a command when pressed.
.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
A script to evaluate when the widget is invoked.
@@ -36,9 +36,11 @@ In a dialog box, one button may be designated the "default" button
\fBnormal\fR means that it may become the default button, and
\fBdisabled\fR means that it is not defaultable.
The default is \fBnormal\fR.
-.br
+.RS
+.PP
Depending on the theme, the default button may be displayed
with an extra highlight ring, or with a different border color.
+.RE
.OP \-width width Width
If greater than zero, specifies how much space, in character widths,
to allocate for the text label.
@@ -46,14 +48,13 @@ If less than zero, specifies a minimum width.
If zero or unspecified, the natural width of the text label is used.
Note that some themes may specify a non-zero \fB-width\fR
in the style.
-'\" Not documented -- may go away
-'\" .OP \-padding padding Padding
-'\" .OP \-foreground foreground Foreground
-'\" .OP \-font font Font
-'\" .OP \-anchor anchor Anchor
-'\" .OP \-padding padding Padding
-'\" .OP \-relief relief Relief
-
+.\" Not documented -- may go away
+.\" .OP \-padding padding Padding
+.\" .OP \-foreground foreground Foreground
+.\" .OP \-font font Font
+.\" .OP \-anchor anchor Anchor
+.\" .OP \-padding padding Padding
+.\" .OP \-relief relief Relief
.SH "WIDGET COMMAND"
.TP
\fIpathName \fBinvoke\fR
@@ -67,7 +68,6 @@ Invokes the command associated with the button.
.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR?
See \fIttk_widget(n)\fR
-
.SH "COMPATIBILITY OPTIONS"
.OP \-state state State
May be set to \fBnormal\fR or \fBdisabled\fR
@@ -75,9 +75,7 @@ to control the \fBdisabled\fR state bit.
This is a ``write-only'' option: setting it changes the
widget state, but the \fBstate\fR widget command does
not affect the state option.
-
.SH "SEE ALSO"
ttk_widget(n), button(n)
-
.SH "KEYWORDS"
widget, button, default, command
diff --git a/doc/ttk_checkbutton.n b/doc/ttk_checkbutton.n
index cd48748..1dd6c7a 100644
--- a/doc/ttk_checkbutton.n
+++ b/doc/ttk_checkbutton.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: ttk_checkbutton.n,v 1.4 2007/05/03 23:55:29 dkf Exp $
+'\" RCS: @(#) $Id: ttk_checkbutton.n,v 1.4.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_checkbutton n 8.5 Tk "Tk Themed Widget"
@@ -21,24 +21,23 @@ A \fBttk::checkbutton\fR widget is used to show or change a setting.
It has two states, selected and deselected.
The state of the checkbutton may be linked to a Tcl variable.
.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
A Tcl script to execute whenever the widget is invoked.
.OP \-offvalue offValue OffValue
-The value to store in the associated \fI-variable\fR
+The value to store in the associated \fB\-variable\fR
when the widget is deselected. Defaults to \fB0\fR.
.OP \-onvalue onValue OnValue
-The value to store in the associated \fI-variable\fR
+The value to store in the associated \fB\-variable\fR
when the widget is selected. Defaults to \fB1\fR.
.OP \-variable variable Variable
The name of a global variable whose value is linked to the widget.
Defaults to the widget pathname if not specified.
-
.SH "WIDGET COMMAND"
In addition to the standard
\fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR
@@ -47,27 +46,24 @@ widget commands:
.TP
\fIpathname\fR invoke
Toggles between the selected and deselected states
-and evaluates the associated \fI-command\fR.
-If the widget is currently selected, sets the \fI-variable\fR
-to the \fI-offvalue\fR and deselects the widget;
-otherwise, sets the \fI-variable\fR to the \fI-onvalue\fR
-Returns the result of the \fI-command\fR.
+and evaluates the associated \fB\-command\fR.
+If the widget is currently selected, sets the \fB\-variable\fR
+to the \fB\-offvalue\fR and deselects the widget;
+otherwise, sets the \fB\-variable\fR to the \fB\-onvalue\fR
+Returns the result of the \fB\-command\fR.
.\" Missing: select, deselect, toggle
.\" Are these useful? They don't invoke the -command
.\" Missing: flash. This is definitely not useful.
-
.SH "WIDGET STATES"
The widget does not respond to user input if the \fBdisabled\fR state is set.
The widget sets the \fBselected\fR state whenever
-the linked \fB-variable\fR is set to the widget's \fB-onvalue\fR,
+the linked \fB\-variable\fR is set to the widget's \fB\-onvalue\fR,
and clears it otherwise.
The widget sets the \fBalternate\fR state whenever the
-linked \fB-variable\fR is unset.
+linked \fB\-variable\fR is unset.
(The \fBalternate\fR state may be used to indicate a ``tri-state''
or ``indeterminate'' selection.)
-
.SH "SEE ALSO"
ttk_widget(n), ttk_radiobutton(n), checkbutton(n)
-
.SH "KEYWORDS"
widget, button, toggle, check, option
diff --git a/doc/ttk_combobox.n b/doc/ttk_combobox.n
index 027c661..c18f8a5 100644
--- a/doc/ttk_combobox.n
+++ b/doc/ttk_combobox.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: ttk_combobox.n,v 1.4.2.1 2007/09/04 17:44:21 dgp Exp $
+'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4.2.2 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_combobox n 8.5 Tk "Tk Themed Widget"
@@ -18,94 +18,91 @@ ttk_combobox \- text field with popdown selection list
.SH DESCRIPTION
A \fBttk::combobox\fR combines a text field with a pop-down list of values;
-the user may select the value of the text field from among the
-values in the list.
+the user may select the value of the text field from among the values in the
+list.
.SO
-\-class \-cursor \-takefocus \-style
+\-class \-cursor \-takefocus
+\-style
.SE
.\" ALSO: Other entry widget options
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-exportselection exportSelection ExportSelection
-Boolean value.
-If set, the widget selection is linked to the X selection.
+Boolean value. If set, the widget selection is linked to the X selection.
.OP \-justify justify Justify
-Specifies how the text is aligned within the widget.
-One of \fBleft\fR, \fBcenter\fR, or \fBright\fR.
+Specifies how the text is aligned within the widget. One of \fBleft\fR,
+\fBcenter\fR, or \fBright\fR.
.OP \-height height Height
Specifies the height of the pop-down listbox, in rows.
.OP \-postcommand postCommand PostCommand
-A Tcl script to evaluate immediately before displaying the listbox.
-The \fB-postcommand\fR script may specify the \fB-values\fR to display.
+A Tcl script to evaluate immediately before displaying the listbox. The
+\fB\-postcommand\fR script may specify the \fB\-values\fR to display.
.OP \-state state State
-One of \fBnormal\fR, \fBreadonly\fR, or \fBdisabled\fR.
-In the \fBreadonly\fR state,
-the value may not be edited directly, and
-the user can only select one of the \fB-values\fR from the
-dropdown list.
-In the \fBnormal\fR state,
-the text field is directly editable.
-In the \fBdisabled\fR state, no interaction is possible.
+One of \fBnormal\fR, \fBreadonly\fR, or \fBdisabled\fR. In the \fBreadonly\fR
+state, the value may not be edited directly, and the user can only select one
+of the \fB\-values\fR from the dropdown list. In the \fBnormal\fR state, the
+text field is directly editable. In the \fBdisabled\fR state, no interaction
+is possible.
.OP \-textvariable textVariable TextVariable
-Specifies the name of a variable whose value is linked
-to the widget value.
-Whenever the variable changes value the widget value is updated,
-and vice versa.
+Specifies the name of a variable whose value is linked to the widget value.
+Whenever the variable changes value the widget value is updated, and vice
+versa.
.OP \-values values Values
Specifies the list of values to display in the drop-down listbox.
.OP \-width width Width
Specifies an integer value indicating the desired width of the entry window,
in average-size characters of the widget's font.
.BE
-
.SH "WIDGET COMMAND"
.TP
\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the specified \fIoption\fR.
-See \fIttk_widget(n)\fR.
+.
+Returns the current value of the specified \fIoption\fR. See
+\fIttk_widget(n)\fR.
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Modify or query widget options.
-See \fIttk_widget(n)\fR.
+.
+Modify or query widget options. See \fIttk_widget(n)\fR.
.TP
\fIpathName \fBcurrent\fR ?\fInewIndex\fR?
-If \fInewIndex\fR is supplied, sets the combobox value
-to the element at position \fInewIndex\fR in the list of \fB-values\fR.
-Otherwise, returns the index of the current value in the list of \fB-values\fR
-or \fB-1\fR if the current value does not appear in the list.
+.
+If \fInewIndex\fR is supplied, sets the combobox value to the element at
+position \fInewIndex\fR in the list of \fB\-values\fR. Otherwise, returns the
+index of the current value in the list of \fB\-values\fR or \fB\-1\fR if the
+current value does not appear in the list.
.TP
\fIpathName \fBget\fR
+.
Returns the current value of the combobox.
.TP
\fIpathName \fBidentify \fIx y\fR
-Returns the name of the element at position \fIx\fR, \fIy\fR,
-or the empty string if the coordinates are outside the window.
+.
+Returns the name of the element at position \fIx\fR, \fIy\fR, or the empty
+string if the coordinates are outside the window.
.TP
\fIpathName \fBinstate \fIstateSpec\fR ?\fIscript\fR?
-Test the widget state.
-See \fIttk_widget(n)\fR.
+.
+Test the widget state. See \fIttk_widget(n)\fR.
.TP
\fIpathName \fBset\fR \fIvalue\fR
+.
Sets the value of the combobox to \fIvalue\fR.
.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR?
-Modify or query the widget state.
-See \fIttk_widget(n)\fR.
+.
+Modify or query the widget state. See \fIttk_widget(n)\fR.
.PP
-The combobox widget also supports the following \fIttk::entry\fR
-widget commands (see \fIttk_entry(n)\fR for details):
+The combobox widget also supports the following \fIttk::entry\fR widget
+commands (see \fIttk_entry(n)\fR for details):
.DS
.ta 5.5c 11c
bbox delete icursor
index insert selection
xview
.DE
-
.SH "VIRTUAL EVENTS"
-The combobox widget generates a \fB<<ComboboxSelected>>\fR virtual event
-when the user selects an element from the list of values.
-This event is generated after the listbox is unposted.
-
+The combobox widget generates a \fB<<ComboboxSelected>>\fR virtual event when
+the user selects an element from the list of values. This event is generated
+after the listbox is unposted.
.SH "SEE ALSO"
ttk_widget(n), ttk_entry(n)
.SH KEYWORDS
diff --git a/doc/ttk_entry.n b/doc/ttk_entry.n
index 66a3651..34e2eb4 100644
--- a/doc/ttk_entry.n
+++ b/doc/ttk_entry.n
@@ -7,7 +7,7 @@
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SOURCE: entry.n, r1.12
-'\" RCS: @(#) $Id: ttk_entry.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_entry.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_entry n 8.5 Tk "Tk Themed Widget"
@@ -24,14 +24,13 @@ ttk_entry \- Editable text field widget
An \fBttk::entry\fR widget displays a one-line text string and
allows that string to be edited by the user.
The value of the string may be linked to a Tcl variable
-with the \fB-textvariable\fR option.
+with the \fB\-textvariable\fR option.
Entry widgets support horizontal scrolling with the
-standard \fB-xscrollcommand\fR option and \fBxview\fR widget command.
+standard \fB\-xscrollcommand\fR option and \fBxview\fR widget command.
.SO
-\-class \-cursor \-style \-takefocus
-\-xscrollcommand
+\-class \-cursor \-style
+\-takefocus \-xscrollcommand
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-exportselection exportSelection ExportSelection
A boolean value specifying whether or not
@@ -88,8 +87,6 @@ Specifies an integer value indicating the desired width of the entry window,
in average-size characters of the widget's font.
.\" Not in ttk: If the value is less than or equal to zero, the widget picks a
.\" Not in ttk: size just large enough to hold its current text.
-.BE
-
.SH NOTES
A portion of the entry may be selected as described below.
If an entry is exporting its selection (see the \fBexportSelection\fR
@@ -107,7 +104,6 @@ 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).
-
.SH "INDICES"
Many of the \fBentry\fR widget commands take one or more indices as
arguments. An index specifies a particular character in the entry's
@@ -138,7 +134,6 @@ entry window.
Abbreviations may be used for any of the forms above, e.g. ``\fBe\fR''
or ``\fBsel.f\fR''. In general, out-of-range indices are automatically
rounded to the nearest legal value.
-
.SH "WIDGET COMMAND"
.PP
The following commands are possible for entry widgets:
@@ -220,7 +215,7 @@ See \fIttk_widget(n)\fR.
.TP
\fIpathName \fBvalidate\fR
Force revalidation, independent of the conditions specified
-by the \fB-validate\fR option.
+by the \fB\-validate\fR option.
Returns 0 if validation fails, 1 if it succeeds.
Sets or clears the \fBinvalid\fR state accordingly.
.TP
@@ -262,19 +257,18 @@ 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 VALIDATION
-The \fB-validate\fR, \fB-validatecommand\fR, and \fB-invalidcommand\fR
+The \fB\-validate\fR, \fB\-validatecommand\fR, and \fB\-invalidcommand\fR
options are used to enable entry widget validation.
.SS "VALIDATION MODES"
There are two main validation modes: \fIprevalidation\fR,
-in which the \fB-validatecommand\fR is evaluated prior to each edit
+in which the \fB\-validatecommand\fR is evaluated prior to each edit
and the return value is used to determine whether to accept
or reject the change;
-and \fIrevalidation\fR, in which the \fB-validatecommand\fR is
+and \fIrevalidation\fR, in which the \fB\-validatecommand\fR is
evaluated to determine whether the current value is valid.
.PP
-The \fB-validate\fR option determines when validation occurs;
+The \fB\-validate\fR option determines when validation occurs;
it may be set to any of the following values:
.IP \fBnone\fR
Default. This means validation will only occur when
@@ -293,22 +287,22 @@ The entry is revalidated when the entry loses focus.
.IP \fBall\fR
Validation is performed for all above conditions.
.PP
-The \fB-invalidcommand\fR is evaluated whenever
-the \fB-validatecommand\fR returns a false value.
+The \fB\-invalidcommand\fR is evaluated whenever
+the \fB\-validatecommand\fR returns a false value.
.PP
-The \fB-validatecommand\fR and \fB-invalidcommand\fR
+The \fB\-validatecommand\fR and \fB\-invalidcommand\fR
may modify the entry widget's value
via the widget \fBinsert\fR or \fBdelete\fR commands,
-or by setting the linked \fB-textvariable\fR.
+or by setting the linked \fB\-textvariable\fR.
If either does so during prevalidation,
then the edit is rejected
-regardless of the value returned by the \fB-validatecommand\fR.
+regardless of the value returned by the \fB\-validatecommand\fR.
.PP
-If \fB-validatecommand\fR is empty (the default),
+If \fB\-validatecommand\fR is empty (the default),
validation always succeeds.
.SS "VALIDATION SCRIPT SUBSTITUTIONS"
It is possible to perform percent substitutions on the
-\fB-validatecommand\fR and \fBinvalidCommand\fR,
+\fB\-validatecommand\fR and \fBinvalidCommand\fR,
just as in a \fBbind\fR script.
The following substitutions are recognized:
.IP \fB%d\fR
@@ -325,7 +319,7 @@ The current value of entry prior to editing.
.IP \fB%S\fR
The text string being inserted/deleted, if any, {} otherwise.
.IP \fB%v\fR
-The current value of the \fB-validate\fR option.
+The current value of the \fB\-validate\fR option.
.IP \fB%V\fR
The validation condition that triggered the callback
(\fBkey\fR, \fBfocusin\fR, \fBfocusout\fR, or \fBforced\fR).
@@ -334,18 +328,17 @@ The name of the entry widget.
.SS "DIFFERENCES FROM TK ENTRY WIDGET VALIDATION"
.IP \(bu
The standard Tk entry widget automatically disables validation
-(by setting \fB-validate\fR to \fBnone\fR)
-if the \fB-validatecommand\fR or \fB-invalidcommand\fR modifies
+(by setting \fB\-validate\fR to \fBnone\fR)
+if the \fB\-validatecommand\fR or \fB\-invalidcommand\fR modifies
the entry's value.
The Tk themed entry widget only disables validation if one
-of the validation scripts raises an error, or if \fB-validatecommand\fR
+of the validation scripts raises an error, or if \fB\-validatecommand\fR
does not return a valid boolean value.
(Thus, it is not necessary to reenable validation after
modifying the entry value in a validation script).
.IP \(bu
The standard entry widget invokes validation whenever the linked
-\fB-textvariable\fR is modified; the Tk themed entry widget does not.
-
+\fB\-textvariable\fR is modified; the Tk themed entry widget does not.
.SH "DEFAULT BINDINGS"
The entry widget's default bindings enable the following behavior.
In the descriptions below, ``word'' refers to a contiguous group
@@ -425,7 +418,6 @@ Control-d deletes the character to the right of the insert cursor.
.IP \(bu
Control-k deletes all the characters to the right of the insertion
cursor.
-
.SH "WIDGET STATES"
In the \fBdisabled\fR state,
the entry cannot be edited and the text cannot be selected.
@@ -436,7 +428,7 @@ the entry cannot be edited
The \fBdisabled\fR state is the same as \fBreadonly\fR,
and in addition text cannot be selected.
.PP
-Note that changes to the linked \fB-textvariable\fR will
+Note that changes to the linked \fB\-textvariable\fR will
still be reflected in the entry, even if it is disabled or readonly.
.PP
Typically, the text is "grayed-out" in the \fBdisabled\fR state,
@@ -444,9 +436,7 @@ and a different background is used in the \fBreadonly\fR state.
.PP
The entry widget sets the \fBinvalid\fR state if revalidation fails,
and clears it whenever validation succeeds.
-
.SH "SEE ALSO"
ttk_widget(n), entry(n)
-
.SH KEYWORDS
entry, widget, text field
diff --git a/doc/ttk_frame.n b/doc/ttk_frame.n
index 5c33aba..7a4e872 100644
--- a/doc/ttk_frame.n
+++ b/doc/ttk_frame.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: ttk_frame.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_frame.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_frame n 8.5 Tk "Tk Themed Widget"
@@ -20,39 +20,35 @@ ttk_frame \- Simple container widget
A \fBttk::frame\fR widget is a container, used to group other widgets
together.
.SO
-\-class \-cursor \-takefocus \-style
+\-class \-cursor \-takefocus
+\-style
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
-.OP -borderwidth borderWidth BorderWidth
+.OP \-borderwidth borderWidth BorderWidth
The desired width of the widget border. Defaults to 0.
-.OP -relief relief Relief
+.OP \-relief relief Relief
One of the standard Tk border styles:
\fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR,
\fBsolid\fR, or \fBsunken\fR.
Defaults to \fBflat\fR.
-.OP -padding padding Padding
+.OP \-padding padding Padding
Additional padding to include inside the border.
-.OP -width width Width
+.OP \-width width Width
If specified, the widget's requested width in pixels.
-.OP -height height Height
+.OP \-height height Height
If specified, the widget's requested height in pixels.
-
.SH "WIDGET COMMAND"
Supports the standard widget commands
\fBconfigure\fR, \fBcget\fR, \fBinstate\fR, and \fBstate\fR;
see \fIttk_widget(n)\fR.
-
.SH "NOTES"
Note that if the \fBpack\fR, \fBgrid\fR, or other geometry managers
are used to manage the children of the \fBframe\fR,
by the GM's requested size will normally take precedence
-over the \fBframe\fR widget's \fB-width\fR and \fB-height\fR options.
+over the \fBframe\fR widget's \fB\-width\fR and \fB\-height\fR options.
[\fBpack propagate\fR] and [\fBgrid propagate\fR] can be used
to change this.
-
.SH "SEE ALSO"
ttk_widget(n), ttk_labelframe(n), frame(n)
-
.SH "KEYWORDS"
widget, frame, container
diff --git a/doc/ttk_image.n b/doc/ttk_image.n
index 26034cf..ea6fe88 100644
--- a/doc/ttk_image.n
+++ b/doc/ttk_image.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: ttk_image.n,v 1.6 2007/04/23 21:19:51 das Exp $
+'\" RCS: @(#) $Id: ttk_image.n,v 1.6.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_image n 8.5 Tk "Tk Themed Widget"
@@ -16,63 +16,58 @@ ttk_image \- Define an element based on an image
.BE
.SH DESCRIPTION
-The \fIimage\fR element factory creates a new element
-in the current theme whose visual appearance is determined
-by Tk images.
-\fIimageSpec\fP is a list of one or more elements.
-The first element is the default image name.
-The rest of the list is a sequence of \fIstatespec / value\fR
-pairs specifying other images to use when the element is
-in a particular state or combination of states.
-
+The \fIimage\fR element factory creates a new element in the current theme
+whose visual appearance is determined by Tk images. \fIimageSpec\fP is a list
+of one or more elements. The first element is the default image name. The rest
+of the list is a sequence of \fIstatespec / value\fR pairs specifying other
+images to use when the element is in a particular state or combination of
+states.
.SH OPTIONS
Valid \fIoptions\fR are:
.TP
-\fB-border\fR \fIpadding\fR
-\fIpadding\fR is a list of up to four integers, specifying
-the left, top, right, and bottom borders, respectively.
-See \fBIMAGE STRETCHING\fR, below.
+\fB\-border\fR \fIpadding\fR
+.
+\fIpadding\fR is a list of up to four integers, specifying the left, top,
+right, and bottom borders, respectively. See \fBIMAGE STRETCHING\fR, below.
.TP
-\fB-height \fIheight\fR
-Specifies a minimum height for the element.
-If less than zero, the base image's height is used as a default.
+\fB\-height \fIheight\fR
+.
+Specifies a minimum height for the element. If less than zero, the base
+image's height is used as a default.
.TP
-\fB-padding\fR \fIpadding\fR
-Specifies the element's interior padding. Defaults to
-\fI-border\fR if not specified.
+\fB\-padding\fR \fIpadding\fR
+.
+Specifies the element's interior padding. Defaults to \fI\-border\fR if not
+specified.
.TP
-\fB-sticky\fR \fIspec\fR
-Specifies how the image is placed within the final parcel.
-\fIspec\fR contains zero or more characters "n", "s", "w", or "e".
+\fB\-sticky\fR \fIspec\fR
+.
+Specifies how the image is placed within the final parcel. \fIspec\fR contains
+zero or more characters "n", "s", "w", or "e".
.TP
-\fB-width \fIwidth\fR
-Specifies a minimum width for the element.
-If less than zero, the base image's width is used as a default.
-
+\fB\-width \fIwidth\fR
+.
+Specifies a minimum width for the element. If less than zero, the base image's
+width is used as a default.
.SH "IMAGE STRETCHING"
-If the element's allocated parcel is larger than the image,
-the image will be placed in the parcel based on the \fB-sticky\fR option.
-If the image needs to stretch horizontally (i.e., \fB-sticky ew\fR)
-or vertically (\fB-sticky ns\fR),
-subregions of the image are replicated to fill the parcel
-based on the \fB-border\fR option.
-The \fB-border\fR divides the image into 9 regions:
-four fixed corners, top and left edges (which may be tiled horizontally),
-left and right edges (which may be tiled vertically),
-and the central area (which may be tiled in both directions).
-
+If the element's allocated parcel is larger than the image, the image will be
+placed in the parcel based on the \fB\-sticky\fR option. If the image needs to
+stretch horizontally (i.e., \fB\-sticky ew\fR) or vertically (\fB\-sticky
+ns\fR), subregions of the image are replicated to fill the parcel based on the
+\fB\-border\fR option. The \fB\-border\fR divides the image into 9 regions:
+four fixed corners, top and left edges (which may be tiled horizontally), left
+and right edges (which may be tiled vertically), and the central area (which
+may be tiled in both directions).
.SH "EXAMPLE"
.CS
set img1 [image create photo -file button.png]
set img2 [image create photo -file button-pressed.png]
set img3 [image create photo -file button-active.png]
style element create Button.button image \e
- [list $img1 pressed $img2 active $img3] \e
- -border {2 4} -sticky we
+ [list $img1 pressed $img2 active $img3] \e
+ -border {2 4} -sticky we
.CE
-
.SH "SEE ALSO"
image(n), photo(n)
-
.SH KEYWORDS
pixmap theme, image
diff --git a/doc/ttk_intro.n b/doc/ttk_intro.n
index 2ee1944..1c14207 100644
--- a/doc/ttk_intro.n
+++ b/doc/ttk_intro.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: ttk_intro.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_intro.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_intro n 8.5 Tk "Tk Themed Widget"
@@ -14,20 +14,15 @@ ttk_intro \- Introduction to the Tk theme engine
.BE
.SH "OVERVIEW"
-The Tk themed widget set is based on a revised and enhanced version
-of TIP #48 (http://tip.tcl.tk/48) specified style engine.
-The main concepts are described below.
-The basic idea is to separate, to the extent possible,
-the code implementing a widget's behavior from
-the code implementing its appearance.
-Widget class bindings are primarily responsible for
-maintaining the widget state and invoking callbacks;
-all aspects of the widgets appearance is
-
+The Tk themed widget set is based on a revised and enhanced version of TIP #48
+(http://tip.tcl.tk/48) specified style engine. The main concepts are described
+below. The basic idea is to separate, to the extent possible, the code
+implementing a widget's behavior from the code implementing its appearance.
+Widget class bindings are primarily responsible for maintaining the widget
+state and invoking callbacks; all aspects of the widgets appearance is
.SH "THEMES"
-A \fItheme\fR is a collection of elements and styles
-that determine the look and feel of the widget set.
-Themes can be used to:
+A \fItheme\fR is a collection of elements and styles that determine the look
+and feel of the widget set. Themes can be used to:
.IP \(bu
Isolate platform differences (X11 vs. classic Windows vs. XP vs. Aqua ...)
.IP \(bu
@@ -40,28 +35,23 @@ Application suite "branding"
Blend in with the rest of the desktop (Gnome, KDE, Java)
.IP \(bu
And, of course: eye candy.
-
.SH "ELEMENTS"
-An \fIelement\fR displays an individual part of a widget.
-For example, a vertical scrollbar widget contains \fBuparrow\fR,
-\fBdownarrow\fR, \fBtrough\fR and \fBslider\fR elements.
+An \fIelement\fR displays an individual part of a widget. For example, a
+vertical scrollbar widget contains \fBuparrow\fR, \fBdownarrow\fR,
+\fBtrough\fR and \fBslider\fR elements.
.PP
-Element names use a recursive dotted notation.
-For example, \fBuparrow\fR identifies a generic arrow element,
-and \fBScrollbar.arrow\fR and \fBCombobox.uparrow\fR identify
-widget-specific elements.
-When looking for an element, the style engine looks for
-the specific name first, and if an element of that name is
-not found it looks for generic elements by stripping off
+Element names use a recursive dotted notation. For example, \fBuparrow\fR
+identifies a generic arrow element, and \fBScrollbar.arrow\fR and
+\fBCombobox.uparrow\fR identify widget-specific elements. When looking for an
+element, the style engine looks for the specific name first, and if an element
+of that name is not found it looks for generic elements by stripping off
successive leading components of the element name.
.PP
-Like widgets, elements have \fIoptions\fR which
-specify what to display and how to display it.
-For example, the \fBtext\fR element
-(which displays a text string) has
-\fB-text\fR, \fB-font\fR, \fB-foreground\fR, \fB-background\fR,
-\fB-underline\fR, and \fB-width\fR options.
-The value of an element resource is taken from:
+Like widgets, elements have \fIoptions\fR which specify what to display and
+how to display it. For example, the \fBtext\fR element (which displays a text
+string) has \fB\-text\fR, \fB\-font\fR, \fB\-foreground\fR,
+\fB\-background\fR, \fB\-underline\fR, and \fB\-width\fR options. The value of
+an element resource is taken from:
.IP \(bu
A dynamic setting specified by \fBstyle map\fR and the current state;
.IP \(bu
@@ -71,99 +61,84 @@ The default setting specified by \fBstyle default\fR; or
.IP \(bu
The element's built-in default value for the resource.
.SH "LAYOUTS"
-A \fIlayout\fR specifies which elements make up a widget
-and how they are arranged.
-The layout engine uses a simplified version of the \fBpack\fR
-algorithm: starting with an initial cavity equal to the size
-of the widget, elements are allocated a parcel within the cavity along
-the side specified by the \fB-side\fR option,
-and placed within the parcel according to the \fB-sticky\fR
-option.
-For example, the layout for a horizontal scrollbar
+A \fIlayout\fR specifies which elements make up a widget and how they are
+arranged. The layout engine uses a simplified version of the \fBpack\fR
+algorithm: starting with an initial cavity equal to the size of the widget,
+elements are allocated a parcel within the cavity along the side specified by
+the \fB\-side\fR option, and placed within the parcel according to the
+\fB\-sticky\fR option. For example, the layout for a horizontal scrollbar:
.CS
style layout Horizontal.TScrollbar {
Scrollbar.trough -children {
- Scrollbar.leftarrow -side left -sticky w
- Scrollbar.rightarrow -side right -sticky e
- Scrollbar.thumb -side left -expand true -sticky ew
+ Scrollbar.leftarrow -side left -sticky w
+ Scrollbar.rightarrow -side right -sticky e
+ Scrollbar.thumb -side left -expand true -sticky ew
}
}
.CE
-By default, the layout for a widget is the same as its class name.
-Some widgets may override this (for example, the \fBscrollbar\fR
-widget chooses different layouts based on the \fB-orient\fR option).
-
+By default, the layout for a widget is the same as its class name. Some
+widgets may override this (for example, the \fBscrollbar\fR widget chooses
+different layouts based on the \fB\-orient\fR option).
.SH "STATES"
-In standard Tk, many widgets have a \fB-state\fR option
-which (in most cases) is either \fBnormal\fR or \fBdisabled\fR.
-Some widgets support additional states, such
-as the \fBentry\fR widget which has a \fBreadonly\fR state
-and the various flavors of buttons which have \fBactive\fR state.
+In standard Tk, many widgets have a \fB\-state\fR option which (in most cases)
+is either \fBnormal\fR or \fBdisabled\fR. Some widgets support additional
+states, such as the \fBentry\fR widget which has a \fBreadonly\fR state and
+the various flavors of buttons which have \fBactive\fR state.
.PP
-The themed Tk widgets generalizes this idea:
-every widget has a bitmap of independent state flags.
-Widget state flags include \fBactive\fR, \fBdisabled\fR,
-\fBpressed\fR, \fBfocus\fR, etc.,
-(see \fIttk_widget(n)\fR for the full list of state flags).
+The themed Tk widgets generalizes this idea: every widget has a bitmap of
+independent state flags. Widget state flags include \fBactive\fR,
+\fBdisabled\fR, \fBpressed\fR, \fBfocus\fR, etc., (see \fIttk_widget(n)\fR for
+the full list of state flags).
.PP
-Instead of a \fB-state\fR option, every widget now has
-a \fBstate\fR widget command which is used to set or query
-the state.
-A \fIstate specification\fR is a list of symbolic state names
-indicating which bits are set, each optionally prefixed with an
-exclamation point indicating that the bit is cleared instead.
+Instead of a \fB\-state\fR option, every widget now has a \fBstate\fR widget
+command which is used to set or query the state. A \fIstate specification\fR
+is a list of symbolic state names indicating which bits are set, each
+optionally prefixed with an exclamation point indicating that the bit is
+cleared instead.
.PP
-For example, the class bindings for the \fBtbutton\fR
-widget are:
+For example, the class bindings for the \fBttk::button\fR widget are:
.CS
-bind TButton <Enter> { %W state active }
-bind TButton <Leave> { %W state !active }
-bind TButton <ButtonPress-1> { %W state pressed }
-bind TButton <Button1-Leave> { %W state !pressed }
-bind TButton <Button1-Enter> { %W state pressed }
-bind TButton <ButtonRelease-1> \e
+bind TButton <Enter> { %W state active }
+bind TButton <Leave> { %W state !active }
+bind TButton <ButtonPress-1> { %W state pressed }
+bind TButton <Button1-Leave> { %W state !pressed }
+bind TButton <Button1-Enter> { %W state pressed }
+bind TButton <ButtonRelease-1> \e
{ %W instate {pressed} { %W state !pressed ; %W invoke } }
.CE
-This specifies that the widget becomes \fBactive\fR when
-the pointer enters the widget, and inactive when it leaves.
-Similarly it becomes \fBpressed\fR when the mouse button is pressed,
-and \fB!pressed\fR on the ButtonRelease event.
-In addition, the button unpresses if
-pointer is dragged outside the widget while Button-1 is held down,
-and represses if it's dragged back in.
-Finally, when the mouse button is released, the widget's
-\fB-command\fR is invoked, but only if the button is currently
-in the \fBpressed\fR state.
-(The actual bindings are a little more complicated than the above,
-but not by much).
+This specifies that the widget becomes \fBactive\fR when the pointer enters
+the widget, and inactive when it leaves. Similarly it becomes \fBpressed\fR
+when the mouse button is pressed, and \fB!pressed\fR on the ButtonRelease
+event. In addition, the button unpresses if pointer is dragged outside the
+widget while Button-1 is held down, and represses if it's dragged back in.
+Finally, when the mouse button is released, the widget's \fB\-command\fR is
+invoked, but only if the button is currently in the \fBpressed\fR state. (The
+actual bindings are a little more complicated than the above, but not by
+much).
.PP
-\fINote to self: rewrite that paragraph. It's horrible.\fR
-
+\fINote to self: rewrite that paragraph. It's horrible.\fR
.SH "STYLES"
-Each widget is associated with a \fIstyle\fR,
-which specifies values for element resources.
-Style names use a recursive dotted notation like layouts and elements;
-by default, widgets use the class name to look up a style in the current theme.
-For example:
+Each widget is associated with a \fIstyle\fR, which specifies values for
+element resources. Style names use a recursive dotted notation like layouts
+and elements; by default, widgets use the class name to look up a style in the
+current theme. For example:
.CS
style default TButton \e
- -background #d9d9d9 \e
- -foreground black \e
- -relief raised \e
- ;
+ -background #d9d9d9 \e
+ -foreground black \e
+ -relief raised \e
+ ;
.CE
-Many elements are displayed differently depending on the widget state.
-For example, buttons have a different background when they are active,
-a different foreground when disabled, and a different relief when pressed.
-The \fBstyle map\fR command specifies dynamic resources
-for a particular style:
+Many elements are displayed differently depending on the widget state. For
+example, buttons have a different background when they are active, a different
+foreground when disabled, and a different relief when pressed. The \fBstyle
+map\fR command specifies dynamic resources for a particular style:
.CS
style map TButton \e
- -background [list disabled #d9d9d9 active #ececec] \e
- -foreground [list disabled #a3a3a3] \e
- -relief [list {pressed !disabled} sunken] \e
- ;
+ -background [list disabled #d9d9d9 active #ececec] \e
+ -foreground [list disabled #a3a3a3] \e
+ -relief [list {pressed !disabled} sunken] \e
+ ;
.CE
-
.SH "SEE ALSO"
ttk_widget(n), ttk_style(n)
diff --git a/doc/ttk_label.n b/doc/ttk_label.n
index 7a647bd..7080668 100644
--- a/doc/ttk_label.n
+++ b/doc/ttk_label.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: ttk_label.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_label.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_label n 8.5 Tk "Tk Themed Widget"
@@ -21,18 +21,18 @@ A \fBttk::label\fR widget displays a textual label and/or image.
The label may be linked to a Tcl variable
to automatically change the displayed text.
.SO
-\-class \-compound \-cursor \-image
-\-style \-takefocus \-text \-textvariable
-\-underline \-width
+\-class \-compound \-cursor
+\-image \-style \-takefocus
+\-text \-textvariable \-underline
+\-width
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-anchor anchor Anchor
Specifies how the information in the widget is positioned
relative to the inner margins. Legal values are
\fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
\fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, and \fBcenter\fR.
-See also \fB-justify\fR.
+See also \fB\-justify\fR.
.OP \-background frameColor FrameColor
The widget's background color.
If unspecified, the theme default is used.
@@ -45,7 +45,7 @@ If unspecified, the theme default is used.
If there are multiple lines of text, specifies how
the lines are laid out relative to one another.
One of \fBleft\fR, \fBcenter\fR, or \fBright\fR.
-See also \fB-anchor\fR.
+See also \fB\-anchor\fR.
.OP \-padding padding Padding
Specifies the amount of extra space to allocate for the widget.
The padding is a list of up to four length specifications
@@ -62,14 +62,13 @@ Valid values are
and \fBsunken\fR.
.OP \-text text Text
Specifies a text string to be displayed inside the widget
-(unless overridden by \fB-textvariable\fR).
+(unless overridden by \fB\-textvariable\fR).
.OP \-wraplength wrapLength WrapLength
Specifies the maximum line length (in pixels).
If this option is less than or equal to zero,
then automatic wrapping is not performed; otherwise
the text is split into lines such that no line is longer
than the specified value.
-
.SH "WIDGET COMMAND"
.TP
\fIpathName \fBcget\fR \fIoption\fR
@@ -80,6 +79,5 @@ than the specified value.
.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR?
See \fIttk_widget(n)\fR
-
.SH "SEE ALSO"
ttk_widget(n), label(n)
diff --git a/doc/ttk_labelframe.n b/doc/ttk_labelframe.n
index 7e13941..ae6fe32 100644
--- a/doc/ttk_labelframe.n
+++ b/doc/ttk_labelframe.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: ttk_labelframe.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_labelframe.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_labelframe n 8.5 Tk "Tk Themed Widget"
@@ -21,28 +21,28 @@ A \fBttk::labelframe\fR widget is a container used to group other widgets
together. It has an optional label, which may be a plain text string or
another widget.
.SO
-\-class \-cursor \-takefocus \-style
+\-class \-cursor \-takefocus
+\-style
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
-'\" XXX: Currently included, but may go away:
-'\" XXX: .OP -borderwidth borderWidth BorderWidth
-'\" XXX: The desired width of the widget border. Default is theme-dependent.
-'\" XXX: .OP -relief relief Relief
-'\" XXX: One of the standard Tk border styles:
-'\" XXX: \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR,
-'\" XXX: \fBsolid\fR, or \fBsunken\fR.
-'\" XXX: Default is theme-dependent.
+.\" XXX: Currently included, but may go away:
+.\" XXX: .OP -borderwidth borderWidth BorderWidth
+.\" XXX: The desired width of the widget border. Default is theme-dependent.
+.\" XXX: .OP -relief relief Relief
+.\" XXX: One of the standard Tk border styles:
+.\" XXX: \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR,
+.\" XXX: \fBsolid\fR, or \fBsunken\fR.
+.\" XXX: Default is theme-dependent.
.OP -labelanchor labelAnchor LabelAnchor
Specifies where to place the label.
Allowed values are (clockwise from the top upper left corner):
\fBnw\fR, \fBn\fR, \fBne\fR, \fBen\fR, \fBe\fR, \fBes\fR,
\fBse\fR, \fBs\fR,\fBsw\fR, \fBws\fR, \fBw\fR and \fBwn\fR.
The default value is theme-dependent.
-'\" Alternate explanation: The first character must be one of n, s, e, or w
-'\" and specifies which side the label should be placed on;
-'\" the remaining characters specify how the label is aligned on that side.
-'\" NOTE: Now allows other values as well; leave this undocumented for now
+.\" Alternate explanation: The first character must be one of n, s, e, or w
+.\" and specifies which side the label should be placed on;
+.\" the remaining characters specify how the label is aligned on that side.
+.\" NOTE: Now allows other values as well; leave this undocumented for now
.OP -text text Text
Specifies the text of the label.
.OP -underline underline Underline
@@ -55,23 +55,21 @@ sets the keyboard focus to the first child of the \fBttk::labelframe\fR widget.
Additional padding to include inside the border.
.OP -labelwidget labelWidget LabelWidget
The name of a widget to use for the label.
-If set, overrides the \fB-text\fR option.
-The \fB-labelwidget\fR must be a child of the \fBlabelframe\fR widget
+If set, overrides the \fB\-text\fR option.
+The \fB\-labelwidget\fR must be a child of the \fBlabelframe\fR widget
or one of the \fBlabelframe\fR's ancestors, and must belong to the
same top-level widget as the \fBlabelframe\fR.
.OP -width width Width
If specified, the widget's requested width in pixels.
.OP -height height Height
If specified, the widget's requested height in pixels.
-(See \fIttk_frame(n)\fR for further notes on \fB-width\fR and \fB-height\fR).
-
+(See \fIttk_frame(n)\fR for further notes on \fB\-width\fR and
+\fB\-height\fR).
.SH "WIDGET COMMAND"
Supports the standard widget commands
\fBconfigure\fR, \fBcget\fR, \fBinstate\fR, and \fBstate\fR;
see \fIttk_widget(n)\fR.
-
.SH "SEE ALSO"
ttk_widget(n), ttk_frame(n), labelframe(n)
-
.SH "KEYWORDS"
widget, frame, container, label, groupbox
diff --git a/doc/ttk_menubutton.n b/doc/ttk_menubutton.n
index 11bc820..8b3b56d 100644
--- a/doc/ttk_menubutton.n
+++ b/doc/ttk_menubutton.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: ttk_menubutton.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_menubutton.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_menubutton n 8.5 Tk "Tk Themed Widget"
@@ -20,11 +20,11 @@ ttk_menubutton \- Widget that pops down a menu when pressed
A \fBttk::menubutton\fR widget displays a textual label and/or image,
and displays a menu when pressed.
.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-direction direction Direction
Specifies where the menu is to be popped up relative
@@ -39,14 +39,11 @@ menubutton.
.\" not documented: may go away:
.\" .OP \-anchor anchor Anchor
.\" .OP \-padding padding Pad
-
.SH "WIDGET COMMAND"
Menubutton widgets support the standard
\fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR
methods. No other widget methods are used.
-
.SH "SEE ALSO"
ttk_widget(n), menu(n), menubutton(n)
-
.SH "KEYWORDS"
widget, button, menu
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n
index 18459d4..44cf842 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.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: ttk_notebook.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_notebook.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_notebook n 8.5 Tk "Tk Themed Widget"
@@ -13,170 +13,161 @@
.SH NAME
ttk_notebook \- Multi-paned container widget
.SH SYNOPSIS
+.nf
\fBttk::notebook\fR \fIpathName \fR?\fIoptions\fR?
-.br
+
\fIpathName \fBadd\fR \fIpathName\fR.\fIsubwindow\fR ?\fIoptions...\fR?
\fIpathName \fBinsert\fR \fIindex\fR \fIpathName\fR.\fIsubwindow\fR ?\fIoptions...\fR?
+.fi
.BE
.SH DESCRIPTION
-A \fBttk::notebook\fR widget manages a collection of subpanes
-and displays a single one at a time.
-Each pane is associated with a tab, which the user
-may select to change the currently-displayed pane.
+A \fBttk::notebook\fR widget manages a collection of subpanes and displays a
+single one at a time. Each pane is associated with a tab, which the user may
+select to change the currently-displayed pane.
.SO
-\-class \-cursor \-takefocus \-style
+\-class \-cursor \-style
+\-takefocus
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-height height Height
-If present and greater than zero,
-specifies the desired height of the pane area
-(not including internal padding or tabs).
-Otherwise, the maximum height of all panes is used.
+If present and greater than zero, specifies the desired height of the pane
+area (not including internal padding or tabs). Otherwise, the maximum height
+of all panes is used.
.OP \-padding padding Padding
-Specifies the amount of extra space to add around the outside
-of the notebook.
-The padding is a list of up to four length specifications
-\fIleft top right bottom\fR.
-If fewer than four elements are specified,
-\fIbottom\fR defaults to \fItop\fR,
-\fIright\fR defaults to \fIleft\fR, and
-\fItop\fR defaults to \fIleft\fR.
+Specifies the amount of extra space to add around the outside of the notebook.
+The padding is a list of up to four length specifications \fIleft top right
+bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to
+\fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to
+\fIleft\fR.
.OP \-width width Width
-If present and greater than zero,
-specifies the desired width of the pane area
-(not including internal padding).
-Otherwise, the maximum width of all panes is used.
+If present and greater than zero, specifies the desired width of the pane area
+(not including internal padding). Otherwise, the maximum width of all panes is
+used.
.SH "TAB OPTIONS"
The following options may be specified for individual notebook panes:
.OP \-state state State
-Either \fBnormal\fR, \fBdisabled\fR or \fBhidden\fR.
-If \fBdisabled\fR, then the tab is not selectable. If \fBhidden\fR,
-then the tab is not shown.
+Either \fBnormal\fR, \fBdisabled\fR or \fBhidden\fR. If \fBdisabled\fR, then
+the tab is not selectable. If \fBhidden\fR, then the tab is not shown.
.OP \-sticky sticky Sticky
-Specifies how the child pane is positioned within the pane area.
-Value is a string containing zero or more of the characters
-\fBn, s, e,\fR or \fBw\fR.
-Each letter refers to a side (north, south, east, or west)
-that the child window will "stick" to,
-as per the \fBgrid\fR geometry manager.
+Specifies how the child pane is positioned within the pane area. Value is a
+string containing zero or more of the characters \fBn, s, e,\fR or \fBw\fR.
+Each letter refers to a side (north, south, east, or west) that the child
+window will "stick" to, as per the \fBgrid\fR geometry manager.
.OP \-padding padding Padding
Specifies the amount of extra space to add between the notebook and this pane.
-Syntax is the same as for the widget \fB-padding\fR option.
+Syntax is the same as for the widget \fB\-padding\fR option.
.OP \-text text Text
Specifies a string to be displayed in the tab.
.OP \-image image Image
-Specifies an image to display in the tab,
-which must have been created with the \fBimage create\fR command.
+Specifies an image to display in the tab, which must have been created with
+the \fBimage create\fR command.
.OP \-compound compound Compound
-Specifies how to display the image relative to the text,
-in the case both \fB-text\fR and \fB-image\fR are present.
-See \fIlabel(n)\fR for legal values.
+Specifies how to display the image relative to the text, in the case both
+\fB\-text\fR and \fB\-image\fR are present. See \fIlabel(n)\fR for legal
+values.
.OP \-underline underline Underline
-Specifies the integer index (0-based) of a character to underline
-in the text string.
-The underlined character is used for mnemonic activation
-if \fBttk::notebook::enableTraversal\fR is called.
-
+Specifies the integer index (0-based) of a character to underline in the text
+string. The underlined character is used for mnemonic activation if
+\fBttk::notebook::enableTraversal\fR is called.
.SH "WIDGET COMMAND"
.TP
\fIpathname \fBadd \fIchild\fR ?\fIoptions...\fR?
-Adds a new tab to the notebook.
-When the tab is selected, the \fIchild\fR window
-will be displayed.
-\fIchild\fR must be a direct child of the notebook window.
-See \fBTAB OPTIONS\fR for the list of available \fIoptions\fR.
+.
+Adds a new tab to the notebook. When the tab is selected, the \fIchild\fR
+window will be displayed. \fIchild\fR must be a direct child of the notebook
+window. See \fBTAB OPTIONS\fR for the list of available \fIoptions\fR.
.TP
\fIpathname \fBconfigure\fR ?\fIoptions\fR?
+.
See \fIttk_widget(n)\fR.
.TP
\fIpathname \fBcget\fR \fIoption\fR
+.
See \fIttk_widget(n)\fR.
.TP
\fIpathname \fBforget\fR \fItabid\fR
-Removes the tab specified by \fItabid\fR,
-unmaps and unmanages the associated child window.
+.
+Removes the tab specified by \fItabid\fR, unmaps and unmanages the associated
+child window.
.TP
\fIpathname \fBindex\fR \fItabid\fR
-Returns the numeric index of the tab specified by \fItabid\fR,
-or the total number of tabs if \fItabid\fR is the string "\fBend\fR".
+.
+Returns the numeric index of the tab specified by \fItabid\fR, or the total
+number of tabs if \fItabid\fR is the string "\fBend\fR".
.TP
\fIpathname \fBinsert\fR \fIpos\fR \fIsubwindow\fR \fIoptions...\fR
-Inserts a pane at the specified position.
-\fIpos\fR is either the string \fBend\fR, an integer index,
-or the name of a managed subwindow.
-If \fIsubwindow\fR is already managed by the notebook,
-moves it to the specified position.
-See \fBTAB OPTIONS\fR for the list of available options.
+.
+Inserts a pane at the specified position. \fIpos\fR is either the string
+\fBend\fR, an integer index, or the name of a managed subwindow. If
+\fIsubwindow\fR is already managed by the notebook, moves it to the specified
+position. See \fBTAB OPTIONS\fR for the list of available options.
.TP
\fIpathname \fBinstate\fR \fIstatespec \fR?\fIscript...\fR?
+.
See \fIttk_widget(n)\fR.
.TP
\fIpathname \fBselect\fR ?\fItabid\fR?
-Selects the specified tab. The associated child pane will be displayed,
-and the previously-selected pane (if different) is unmapped.
-If \fItabid\fR is omitted, returns the widget name of the
-currently selected pane.
+.
+Selects the specified tab. The associated child pane will be displayed, and
+the previously-selected pane (if different) is unmapped. If \fItabid\fR is
+omitted, returns the widget name of the currently selected pane.
.TP
\fIpathname \fBstate\fR ?\fIstatespec\fR?
+.
See \fIttk_widget(n)\fR.
.TP
-\fIpathname \fBtab\fR \fItabid\fR ?\fI-options \fR?\fIvalue ...\fR
-Query or modify the options of the specific tab.
-If no \fI-option\fR is specified, returns a dictionary of the tab option values.
-If one \fI-option\fR is specified, returns the value of that \fIoption\fR.
-Otherwise, sets the \fI-option\fRs to the corresponding \fIvalue\fRs.
-See \fBTAB OPTIONS\fR for the available options.
+\fIpathname \fBtab\fR \fItabid\fR ?\fI\-options \fR?\fIvalue ...\fR
+.
+Query or modify the options of the specific tab. If no \fI\-option\fR is
+specified, returns a dictionary of the tab option values. If one
+\fI\-option\fR is specified, returns the value of that \fIoption\fR.
+Otherwise, sets the \fI\-option\fRs to the corresponding \fIvalue\fRs. See
+\fBTAB OPTIONS\fR for the available options.
.TP
\fIpathname \fBtabs\fR
+.
Returns a list of all windows managed by the widget.
.\" Perhaps "panes" is a better name for this command?
-
.SH "KEYBOARD TRAVERSAL"
-To enable keyboard traversal for a toplevel window
-containing a notebook widget \fI$nb\fR, call:
+To enable keyboard traversal for a toplevel window containing a notebook
+widget \fI$nb\fR, call:
.CS
ttk::notebook::enableTraversal $nb
.CE
.PP
-This will extend the bindings for the toplevel widget
-containing the notebook as follows:
+This will extend the bindings for the toplevel widget containing the notebook
+as follows:
.IP \(bu
\fBControl-Tab\fR selects the tab following the currently selected one.
.IP \(bu
\fBShift-Control-Tab\fR selects the tab preceding the currently selected one.
.IP \(bu
-\fBAlt-K\fR, where \fBK\fR is the mnemonic (underlined) character
-of any tab, will select that tab.
+\fBAlt-K\fR, where \fBK\fR is the mnemonic (underlined) character of any tab,
+will select that tab.
.PP
Multiple notebooks in a single toplevel may be enabled for traversal,
-including nested notebooks.
-However, notebook traversal only works properly if all panes
-are direct children of the notebook.
-
+including nested notebooks. However, notebook traversal only works properly if
+all panes are direct children of the notebook.
.SH "TAB IDENTIFIERS"
-The \fItabid\fR argument to the above commands may take
-any of the following forms:
+The \fItabid\fR argument to the above commands may take any of the following
+forms:
.IP \(bu
An integer between zero and the number of tabs;
.IP \(bu
The name of a child pane window;
.IP \(bu
-A positional specification of the form "@\fIx\fR,\fIy\fR",
-which identifies the tab
+A positional specification of the form "@\fIx\fR,\fIy\fR", which identifies
+the tab
.IP \(bu
-The literal string "\fBcurrent\fR",
-which identifies the currently-selected tab; or:
+The literal string "\fBcurrent\fR", which identifies the currently-selected
+tab; or:
.IP \(bu
-The literal string "\fBend\fR",
-which returns the number of tabs
-(only valid for "\fIpathname \fBindex\fR").
-
+The literal string "\fBend\fR", which returns the number of tabs (only valid
+for "\fIpathname \fBindex\fR").
.SH "VIRTUAL EVENTS"
-The notebook widget generates a \fB<<NotebookTabChanged>>\fR
-virtual event after a new tab is selected.
-
+The notebook widget generates a \fB<<NotebookTabChanged>>\fR virtual event
+after a new tab is selected.
.SH "EXAMPLE"
.CS
notebook .nb
@@ -185,9 +176,7 @@ notebook .nb
\.nb select .nb.f2
ttk::notebook::enableTraversal .nb
.CE
-
.SH "SEE ALSO"
ttk_widget(n), grid(n)
-
.SH "KEYWORDS"
pane, tab
diff --git a/doc/ttk_panedwindow.n b/doc/ttk_panedwindow.n
index b664f95..824155d 100644
--- a/doc/ttk_panedwindow.n
+++ b/doc/ttk_panedwindow.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: ttk_panedwindow.n,v 1.4.2.1 2007/06/12 16:22:40 dgp Exp $
+'\" RCS: @(#) $Id: ttk_panedwindow.n,v 1.4.2.2 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_panedwindow n 8.5 Tk "Tk Themed Widget"
@@ -15,7 +15,7 @@ ttk_panedwindow \- Multi-pane container window
.SH SYNOPSIS
.nf
\fBttk::panedwindow\fR \fIpathName \fR?\fIoptions\fR?
-.br
+
\fIpathName \fBadd\fR \fIpathName.subwindow\fR ?\fIoptions...\fR?
\fIpathName \fBinsert\fR \fIindex\fR \fIpathName.subwindow\fR ?\fIoptions...\fR?
.fi
@@ -23,81 +23,79 @@ ttk_panedwindow \- Multi-pane container window
.SH DESCRIPTION
A \fBttk::panedwindow\fR widget displays a number of subwindows, stacked
-either vertically or horizontally. The user may adjust the relative sizes
-of the subwindows by dragging the sash between panes.
+either vertically or horizontally. The user may adjust the relative sizes of
+the subwindows by dragging the sash between panes.
.SO
-\-class \-cursor \-takefocus \-style
+\-class \-cursor \-style
+\-takefocus
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-orient orient Orient
-Specifies the orientation of the window.
-If \fBvertical\fR, subpanes are stacked top-to-bottom;
-if \fBhorizontal\fR, subpanes are stacked left-to-right.
+Specifies the orientation of the window. If \fBvertical\fR, subpanes are
+stacked top-to-bottom; if \fBhorizontal\fR, subpanes are stacked
+left-to-right.
.OP \-width width Width
-If present and greater than zero,
-specifies the desired width of the widget in pixels.
-Otherwise, the requested width is determined by the width
-of the managed windows.
+If present and greater than zero, specifies the desired width of the widget in
+pixels. Otherwise, the requested width is determined by the width of the
+managed windows.
.OP \-height height Height
-If present and greater than zero,
-specifies the desired height of the widget in pixels.
-Otherwise, the requested height is determined by the height
-of the managed windows.
-
+If present and greater than zero, specifies the desired height of the widget
+in pixels. Otherwise, the requested height is determined by the height of the
+managed windows.
.SH "PANE OPTIONS"
The following options may be specified for each pane:
.OP \-weight weight Weight
-An integer specifying the relative stretchability of the pane.
-When the paned window is resized, the extra space is added
-or subtracted to each pane proportionally to its \fB-weight\fR.
-
+An integer specifying the relative stretchability of the pane. When the paned
+window is resized, the extra space is added or subtracted to each pane
+proportionally to its \fB\-weight\fR.
.SH "WIDGET COMMAND"
-Supports the standard \fBconfigure\fR, \fBcget\fR, \fBstate\fR,
-and \fBinstate\fR commands; see \fIttk_widget(n)\fR for details.
-Additional commands:
+Supports the standard \fBconfigure\fR, \fBcget\fR, \fBstate\fR, and
+\fBinstate\fR commands; see \fIttk_widget(n)\fR for details. Additional
+commands:
.TP
\fIpathname \fBadd\fR \fIsubwindow\fR \fIoptions...\fR
-Adds a new pane to the window.
-\fIsubwindow\fR must be a direct child of the paned window \fIpathname\fR.
-See \fBPANE OPTIONS\fR for the list of available options.
+.
+Adds a new pane to the window. \fIsubwindow\fR must be a direct child of the
+paned window \fIpathname\fR. See \fBPANE OPTIONS\fR for the list of available
+options.
.TP
\fIpathname \fBforget\fR \fIpane\fR
-Removes the specified subpane from the widget.
-\fIpane\fR is either an integer index or the name of a managed subwindow.
+.
+Removes the specified subpane from the widget. \fIpane\fR is either an integer
+index or the name of a managed subwindow.
.TP
\fIpathname \fBinsert\fR \fIpos\fR \fIsubwindow\fR \fIoptions...\fR
-Inserts a pane at the specified position.
-\fIpos\fR is either the string \fBend\fR, an integer index,
-or the name of a managed subwindow.
-If \fIsubwindow\fR is already managed by the paned window,
-moves it to the specified position.
-See \fBPANE OPTIONS\fR for the list of available options.
+.
+Inserts a pane at the specified position. \fIpos\fR is either the string
+\fBend\fR, an integer index, or the name of a managed subwindow. If
+\fIsubwindow\fR is already managed by the paned window, moves it to the
+specified position. See \fBPANE OPTIONS\fR for the list of available options.
.TP
\fIpathname \fBpane\fR \fIpane -option \fR?\fIvalue \fR?\fI-option value...\fR
-Query or modify the options of the specified \fIpane\fR,
-where \fIpane\fR is either an integer index or the name of a managed subwindow.
-If no \fI-option\fR is specified, returns a dictionary of the pane
-option values.
-If one \fI-option\fR is specified, returns the value of that \fIoption\fR.
-Otherwise, sets the \fI-option\fRs to the corresponding \fIvalue\fRs.
+.
+Query or modify the options of the specified \fIpane\fR, where \fIpane\fR is
+either an integer index or the name of a managed subwindow. If no
+\fI\-option\fR is specified, returns a dictionary of the pane option values.
+If one \fI\-option\fR is specified, returns the value of that \fIoption\fR.
+Otherwise, sets the \fI\-option\fRs to the corresponding \fIvalue\fRs.
.TP
\fIpathname\fR \fBsashpos\fR \fIindex\fR ?\fInewpos\fR?
-If \fInewpos\fR is specified, sets the position
-of sash number \fIindex\fR.
-May adjust the positions of adjacent sashes
-to ensure that positions are monotonically increasing.
-Sash positions are further constrained to be between 0
-and the total size of the widget.
+.
+If \fInewpos\fR is unspecified, returns the current position of sash number
+\fIindex\fR. If \fInewpos\fR is specified, sets the position of sash number
+\fIindex\fR, with the aim of making \fInewpos\fR its new position. May adjust
+the positions of adjacent sashes to ensure that positions are monotonically
+increasing. Sash positions are further constrained to be between 0 and the
+total size of the widget; these may mean that the actual new sash position is
+not what was requested.
.\" Full story: "total size" is either the -height (resp -width),
.\" or the actual window height (resp actual window width),
.\" depending on which changed most recently.
Returns the new position of sash number \fIindex\fR.
-.\" Full story: new position may be different than the requested position.
.TP
\fIpathname\fR \fBidentify\fR \fIx y\fR
-Returns the index of the sash at point \fIx,y\fR,
-or the empty string if \fIx,y\fR is not over a sash.
-
+.
+Returns the index of the sash at point \fIx,y\fR, or the empty string if
+\fIx,y\fR is not over a sash.
.SH "SEE ALSO"
ttk_widget(n), ttk_notebook(n), panedwindow(n)
diff --git a/doc/ttk_progressbar.n b/doc/ttk_progressbar.n
index f94c12e..3a8d4bc 100644
--- a/doc/ttk_progressbar.n
+++ b/doc/ttk_progressbar.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: ttk_progressbar.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_progressbar.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_progressbar n 8.5 Tk "Tk Themed Widget"
@@ -17,73 +17,73 @@ ttk_progressbar \- Provide progress feedback
.BE
.SH DESCRIPTION
-A \fBttk::progressbar\fR widget shows the status of a long-running
-operation. They can operate in two modes: \fIdeterminate\fR mode shows the
-amount completed relative to the total amount of work to be done, and
+A \fBttk::progressbar\fR widget shows the status of a long-running operation.
+They can operate in two modes: \fIdeterminate\fR mode shows the amount
+completed relative to the total amount of work to be done, and
\fIindeterminate\fR mode provides an animated display to let the user know
that something is happening.
.SO
-\-class \-cursor \-takefocus \-style
+\-class \-cursor \-style
+\-takefocus
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-orient orient Orient
-One of \fBhorizontal\fR or \fBvertical\fR.
-Specifies the orientation of the progress bar.
+One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the
+progress bar.
.OP \-length length Length
-Specifies the length of the long axis of the progress bar
-(width if horizontal, height if vertical).
+Specifies the length of the long axis of the progress bar (width if
+horizontal, height if vertical).
.OP \-mode mode Mode
One of \fBdeterminate\fR or \fBindeterminate\fR.
.OP \-maximum maximum Maximum
-A floating point number specifying the maximum \fB-value\fR.
-Defaults to 100.
+A floating point number specifying the maximum \fB\-value\fR. Defaults to 100.
.OP \-value value Value
-The current value of the progress bar.
-In \fIdeterminate\fR mode, this represents the amount of work completed.
-In \fIindeterminate\fR mode, it is interpreted modulo \fB-maximum\fR;
-that is, the progress bar completes one "cycle" when
-the \fB-value\fR increases by \fB-maximum\fR.
+The current value of the progress bar. In \fIdeterminate\fR mode, this
+represents the amount of work completed. In \fIindeterminate\fR mode, it is
+interpreted modulo \fB\-maximum\fR; that is, the progress bar completes one
+"cycle" when the \fB\-value\fR increases by \fB\-maximum\fR.
.OP \-variable variable Variable
-The name of a Tcl variable which is linked to the \fB-value\fR.
-If specified, the \fB-value\fR of the progress bar is
-automatically set to the value of the variable whenever
-the latter is modified.
+The name of a Tcl variable which is linked to the \fB\-value\fR. If specified,
+the \fB\-value\fR of the progress bar is automatically set to the value of the
+variable whenever the latter is modified.
.OP \-phase phase Phase
-Read-only option.
-The widget periodically increments the value of this option
-whenever the \fB-value\fR is greater than 0 and,
-in \fIdeterminate\fR mode, less than \fB-maximum\fR.
-This option may be used by the current theme
-to provide additional animation effects.
-
+Read-only option. The widget periodically increments the value of this option
+whenever the \fB\-value\fR is greater than 0 and, in \fIdeterminate\fR mode,
+less than \fB\-maximum\fR. This option may be used by the current theme to
+provide additional animation effects.
.SH "WIDGET COMMAND"
.TP
\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the specified \fIoption\fR; see \fIttk_widget(n)\fR.
+.
+Returns the current value of the specified \fIoption\fR; see
+\fIttk_widget(n)\fR.
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Modify or query widget options; see \fIttk_widget(n)\fR.
.TP
\fIpathName \fBinstate \fIstatespec\fR ?\fIscript\fR?
+.
Test the widget state; see \fIttk_widget(n)\fR.
.TP
\fIpathName \fBstart\fR ?\fIinterval\fR?
-Begin autoincrement mode:
-schedules a recurring timer event that calls \fBstep\fR
-every \fIinterval\fR milliseconds.
-If omitted, \fIinterval\fR defaults to 50 milliseconds (20 steps/second).
+.
+Begin autoincrement mode: schedules a recurring timer event that calls
+\fBstep\fR every \fIinterval\fR milliseconds. If omitted, \fIinterval\fR
+defaults to 50 milliseconds (20 steps/second).
.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR?
+.
Modify or query the widget state; see \fIttk_widget(n)\fR.
.TP
\fIpathName \fBstep\fR ?\fIamount\fR?
-Increments the \fB-value\fR by \fIamount\fR.
-\fIamount\fR defaults to 1.0 if omitted.
+.
+Increments the \fB\-value\fR by \fIamount\fR. \fIamount\fR defaults to 1.0 if
+omitted.
.TP
\fIpathName \fBstop\fR
-Stop autoincrement mode:
-cancels any recurring timer event initiated by \fIpathName \fBstart\fR.
-
+.
+Stop autoincrement mode: cancels any recurring timer event initiated by
+\fIpathName \fBstart\fR.
.SH "SEE ALSO"
ttk_widget(n)
diff --git a/doc/ttk_radiobutton.n b/doc/ttk_radiobutton.n
index e9e93a6..7ee8167 100644
--- a/doc/ttk_radiobutton.n
+++ b/doc/ttk_radiobutton.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: ttk_radiobutton.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_radiobutton.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_radiobutton n 8.5 Tk "Tk Themed Widget"
@@ -23,21 +23,20 @@ Radiobuttons are linked to a Tcl variable,
and have an associated value; when a radiobutton is clicked,
it sets the variable to its associated value.
.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
A Tcl script to evaluate whenever the widget is invoked.
.OP \-value Value Value
-The value to store in the associated \fI-variable\fR
+The value to store in the associated \fB\-variable\fR
when the widget is selected.
.OP \-variable variable Variable
The name of a global variable whose value is linked to the widget.
Default value is \fB::selectedButton\fR.
-
.SH "WIDGET COMMAND"
In addition to the standard
\fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR
@@ -45,25 +44,22 @@ commands, radiobuttons support the following additional
widget commands:
.TP
\fIpathname\fR invoke
-Sets the \fI-variable\fR to the \fI-value\fR, selects the widget,
-and evaluates the associated \fI-command\fR.
-Returns the result of the \fI-command\fR, or the empty
-string if no \fI-command\fR is specified.
+Sets the \fB\-variable\fR to the \fB\-value\fR, selects the widget,
+and evaluates the associated \fB\-command\fR.
+Returns the result of the \fB\-command\fR, or the empty
+string if no \fB\-command\fR is specified.
.\" Missing: select, deselect. Useful?
.\" Missing: flash. This is definitely not useful.
-
.SH "WIDGET STATES"
The widget does not respond to user input if the \fBdisabled\fR state is set.
The widget sets the \fBselected\fR state whenever
-the linked \fB-variable\fR is set to the widget's \fB-value\fR,
+the linked \fB\-variable\fR is set to the widget's \fB\-value\fR,
and clears it otherwise.
The widget sets the \fBalternate\fR state whenever the
-linked \fB-variable\fR is unset.
+linked \fB\-variable\fR is unset.
(The \fBalternate\fR state may be used to indicate a ``tri-state''
or ``indeterminate'' selection.)
-
.SH "SEE ALSO"
ttk_widget(n), ttk_checkbutton(n), radiobutton(n)
-
.SH "KEYWORDS"
widget, button, option
diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n
index de4a666..29bd628 100644
--- a/doc/ttk_scrollbar.n
+++ b/doc/ttk_scrollbar.n
@@ -6,7 +6,7 @@
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SOURCE: tk/doc/scrollbar.n, r1.4
-'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_scrollbar n 8.5 Tk "Tk Themed Widget"
@@ -19,149 +19,145 @@ ttk_scrollbar \- Control the viewport of a scrollable widget
.BE
.SH DESCRIPTION
-\fBttk::scrollbar\fR widgets are typically linked to an associated window
-that displays a document of some sort, such as a file being edited or a
-drawing.
-A scrollbar displays a \fIthumb\fR in the middle portion of the scrollbar,
-whose position and size provides information about the portion of the
-document visible in the associated window.
-The thumb may be dragged by the user to control the visible region.
-Depending on the theme, two or more arrow buttons may also be present;
-these are used to scroll the visible region in discrete units.
+\fBttk::scrollbar\fR widgets are typically linked to an associated window that
+displays a document of some sort, such as a file being edited or a drawing. A
+scrollbar displays a \fIthumb\fR in the middle portion of the scrollbar, whose
+position and size provides information about the portion of the document
+visible in the associated window. The thumb may be dragged by the user to
+control the visible region. Depending on the theme, two or more arrow buttons
+may also be present; these are used to scroll the visible region in discrete
+units.
.SO
-\-class \-cursor \-style \-takefocus
+\-class \-cursor \-style
+\-takefocus
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
-A Tcl script prefix to evaluate
-to change the view in the widget associated with the scrollbar.
-Additional arguments are appended to the value of this option,
-as described in \fBSCROLLING COMMANDS\fR below,
-whenever the user requests a view change by manipulating the scrollbar.
-.br
-This option typically consists of a two-element list,
-containing the name of a scrollable widget followed by
-either \fBxview\fR (for horizontal scrollbars)
+A Tcl script prefix to evaluate to change the view in the widget associated
+with the scrollbar. Additional arguments are appended to the value of this
+option, as described in \fBSCROLLING COMMANDS\fR below, whenever the user
+requests a view change by manipulating the scrollbar.
+.RS
+.PP
+This option typically consists of a two-element list, containing the name of a
+scrollable widget followed by either \fBxview\fR (for horizontal scrollbars)
or \fByview\fR (for vertical scrollbars).
+.RE
.OP \-orient orient Orient
-One of \fBhorizontal\fR or \fBvertical\fR.
-Specifies the orientation of the scrollbar.
+One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the
+scrollbar.
.BE
-
.SH "WIDGET COMMAND"
.TP
\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the specified \fIoption\fR; see \fIttk_widget(n)\fR.
+.
+Returns the current value of the specified \fIoption\fR; see
+\fIttk_widget(n)\fR.
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Modify or query widget options; see \fIttk_widget(n)\fR.
.TP
\fIpathName \fBget\fR
-Returns the scrollbar settings in the form of a list whose
-elements are the arguments to the most recent \fBset\fR widget command.
+.
+Returns the scrollbar settings in the form of a list whose elements are the
+arguments to the most recent \fBset\fR widget command.
.TP
\fIpathName \fBinstate \fIstatespec\fR ?\fIscript\fR?
+.
Test the widget state; see \fIttk_widget(n)\fR.
.TP
\fIpathName \fBset\fR \fIfirst last\fR
-This command is normally invoked by the scrollbar's associated widget
-from an \fB-xscrollcommand\fR or \fB-yscrollcommand\fR callback.
-Specifies the visible range to be displayed.
-\fIfirst\fR and \fIlast\fR are real fractions between 0 and 1.
+.
+This command is normally invoked by the scrollbar's associated widget from an
+\fB\-xscrollcommand\fR or \fB\-yscrollcommand\fR callback. Specifies the
+visible range to be displayed. \fIfirst\fR and \fIlast\fR are real fractions
+between 0 and 1.
.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR?
+.
Modify or query the widget state; see \fIttk_widget(n)\fR.
-
.SH "INTERNAL COMMANDS"
-The following widget commands are used internally
-by the TScrollbar widget class bindings.
+The following widget commands are used internally by the TScrollbar widget
+class bindings.
.TP
\fIpathName \fBdelta \fIdeltaX deltaY\fR
-Returns a real number indicating the fractional change in
-the scrollbar setting that corresponds to a given change
-in thumb position. For example, if the scrollbar is horizontal,
-the result indicates how much the scrollbar setting must change
-to move the thumb \fIdeltaX\fR pixels to the right (\fIdeltaY\fR is
-ignored in this case).
-If the scrollbar is vertical, the result indicates how much the
-scrollbar setting must change to move the thumb \fIdeltaY\fR pixels
-down. The arguments and the result may be zero or negative.
+.
+Returns a real number indicating the fractional change in the scrollbar
+setting that corresponds to a given change in thumb position. For example, if
+the scrollbar is horizontal, the result indicates how much the scrollbar
+setting must change to move the thumb \fIdeltaX\fR pixels to the right
+(\fIdeltaY\fR is ignored in this case). If the scrollbar is vertical, the
+result indicates how much the scrollbar setting must change to move the thumb
+\fIdeltaY\fR pixels down. The arguments and the result may be zero or
+negative.
.TP
\fIpathName \fBfraction \fIx y\fR
-Returns a real number between 0 and 1 indicating where the point
-given by \fIx\fR and \fIy\fR lies in the trough area of the scrollbar,
-where 0.0 corresponds to the top or left of the trough
-and 1.0 corresponds to the bottom or right.
-\fIX\fR and \fIy\fR are pixel coordinates relative to the scrollbar
-widget.
-If \fIx\fR and \fIy\fR refer to a point outside the trough, the closest
-point in the trough is used.
+.
+Returns a real number between 0 and 1 indicating where the point given by
+\fIx\fR and \fIy\fR lies in the trough area of the scrollbar, where 0.0
+corresponds to the top or left of the trough and 1.0 corresponds to the bottom
+or right. \fIX\fR and \fIy\fR are pixel coordinates relative to the scrollbar
+widget. If \fIx\fR and \fIy\fR refer to a point outside the trough, the
+closest point in the trough is used.
.TP
\fIpathName \fBidentify\fR \fIx y\fR
-Returns the name of the element under the point given
-by \fIx\fR and \fIy\fR, or an empty string if the point does
-not lie in any element of the scrollbar.
+.
+Returns the name of the element under the point given by \fIx\fR and \fIy\fR,
+or an empty string if the point does not lie in any element of the scrollbar.
\fIX\fR and \fIy\fR are pixel coordinates relative to the scrollbar widget.
-
.SH "SCROLLING COMMANDS"
-When the user interacts with the scrollbar, for example by dragging
-the thumb, the scrollbar notifies the associated widget that it
-must change its view.
-The scrollbar makes the notification by evaluating a Tcl command
-generated from the scrollbar's \fB\-command\fR option.
-The command may take any of the following forms.
-In each case, \fIprefix\fR is the contents of the
+When the user interacts with the scrollbar, for example by dragging the thumb,
+the scrollbar notifies the associated widget that it must change its view.
+The scrollbar makes the notification by evaluating a Tcl command generated
+from the scrollbar's \fB\-command\fR option. The command may take any of the
+following forms. In each case, \fIprefix\fR is the contents of the
\fB\-command\fR option, which usually has a form like \fB.t yview\fR
.TP
\fIprefix \fBmoveto \fIfraction\fR
-\fIFraction\fR is a real number between 0 and 1.
-The widget should adjust its view so that the point given
-by \fIfraction\fR appears at the beginning of the widget.
-If \fIfraction\fR is 0 it refers to the beginning of the
-document. 1.0 refers to the end of the document, 0.333
-refers to a point one-third of the way through the document,
-and so on.
+.
+\fIFraction\fR is a real number between 0 and 1. The widget should adjust its
+view so that the point given by \fIfraction\fR appears at the beginning of the
+widget. If \fIfraction\fR is 0 it refers to the beginning of the document. 1.0
+refers to the end of the document, 0.333 refers to a point one-third of the
+way through the document, and so on.
.TP
\fIprefix \fBscroll \fInumber \fBunits\fR
-The widget should adjust its view by \fInumber\fR units.
-The units are defined in whatever way makes sense for the widget,
-such as characters or lines in a text widget.
-\fINumber\fR is either 1, which means one unit should scroll off
-the top or left of the window, or \-1, which means that one unit
-should scroll off the bottom or right of the window.
+.
+The widget should adjust its view by \fInumber\fR units. The units are defined
+in whatever way makes sense for the widget, such as characters or lines in a
+text widget. \fINumber\fR is either 1, which means one unit should scroll off
+the top or left of the window, or \-1, which means that one unit should scroll
+off the bottom or right of the window.
.TP
\fIprefix \fBscroll \fInumber \fBpages\fR
-The widget should adjust its view by \fInumber\fR pages.
-It is up to the widget to define the meaning of a page; typically
-it is slightly less than what fits in the window, so that there
-is a slight overlap between the old and new views.
-\fINumber\fR is either 1, which means the next page should
-become visible, or \-1, which means that the previous page should
-become visible.
-
+.
+The widget should adjust its view by \fInumber\fR pages. It is up to the
+widget to define the meaning of a page; typically it is slightly less than
+what fits in the window, so that there is a slight overlap between the old and
+new views. \fINumber\fR is either 1, which means the next page should become
+visible, or \-1, which means that the previous page should become visible.
.SH "WIDGET STATES"
-The scrollbar automatically sets the \fBdisabled\fR state bit.
-when the entire range is visible (range is 0.0 to 1.0),
-and clears it otherwise.
-It also sets the \fBactive\fR and \fBpressed\fR state flags
-of individual elements, based on the position and state of the mouse pointer.
-
+The scrollbar automatically sets the \fBdisabled\fR state bit when the entire
+range is visible (range is 0.0 to 1.0), and clears it otherwise. It also sets
+the \fBactive\fR and \fBpressed\fR state flags of individual elements, based
+on the position and state of the mouse pointer.
.SH EXAMPLE
.CS
set f [frame .f]
-ttk::scrollbar $f.hsb -orient horizontal -command [list $f.t xview]
-ttk::scrollbar $f.vsb -orient vertical -command [list $f.t yview]
-text $f.t -xscrollcommand [list $f.hsb set] -yscrollcommand [list $f.vsb set]
+ttk::scrollbar $f.hsb -orient horizontal \e
+ -command [list $f.t xview]
+ttk::scrollbar $f.vsb -orient vertical \e
+ -command [list $f.t yview]
+text $f.t -xscrollcommand [list $f.hsb set] \e
+ -yscrollcommand [list $f.vsb set]
grid $f.t -row 0 -column 0 -sticky nsew
grid $f.vsb -row 0 -column 1 -sticky nsew
grid $f.hsb -row 1 -column 0 -sticky nsew
grid columnconfigure $f 0 -weight 1
grid rowconfigure $f 0 -weight 1
.CE
-
.SH "SEE ALSO"
ttk_widget(n), scrollbar(n)
-
.SH KEYWORDS
scrollbar, widget
diff --git a/doc/ttk_separator.n b/doc/ttk_separator.n
index 9e4ccbf..5626c6a 100644
--- a/doc/ttk_separator.n
+++ b/doc/ttk_separator.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: ttk_separator.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_separator.n,v 1.3.2.1 2007/10/24 12:59:31 dgp Exp $
'\"
.so man.macros
.TH ttk_separator n 8.5 Tk "Tk Themed Widget"
@@ -20,22 +20,18 @@ ttk_separator \- Separator bar
A \fBttk::separator\fR widget displays a horizontal or vertical separator
bar.
.SO
-\-class \-cursor \-state \-style
-\-takefocus
+\-class \-cursor \-state
+\-style \-takefocus
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-orient orient Orient
One of \fBhorizontal\fR or \fBvertical\fR.
Specifies the orientation of the separator.
-
.SH "WIDGET COMMAND"
Separator widgets support the standard
\fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR
methods. No other widget methods are used.
-
.SH "SEE ALSO"
ttk_widget(n)
-
.SH "KEYWORDS"
widget, separator
diff --git a/doc/ttk_sizegrip.n b/doc/ttk_sizegrip.n
index e9c33d8..3035579 100644
--- a/doc/ttk_sizegrip.n
+++ b/doc/ttk_sizegrip.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: ttk_sizegrip.n,v 1.3.2.2 2007/10/16 04:03:53 dgp Exp $
+'\" RCS: @(#) $Id: ttk_sizegrip.n,v 1.3.2.3 2007/10/24 12:59:32 dgp Exp $
'\"
.so man.macros
.TH ttk_sizegrip n 8.5 Tk "Tk Themed Widget"
@@ -24,30 +24,30 @@ by pressing and dragging the grip.
\-class \-cursor \-state \-style
\-takefocus
.SE
-
.SH "WIDGET COMMAND"
Sizegrip widgets support the standard
\fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR
methods. No other widget methods are used.
-
.SH "PLATFORM-SPECIFIC NOTES"
On Mac OSX, toplevel windows automatically include a built-in
size grip by default.
Adding an \fBttk::sizegrip\fR there is harmless, since
the built-in grip will just mask the widget.
.SH EXAMPLES
+.PP
+Using \fBpack\fR:
.CS
-# Using pack:
pack [ttk::frame $top.statusbar] -side bottom -fill x
pack [ttk::sizegrip $top.statusbar.grip] -side right -anchor se
-
-# Using grid:
-grid [ttk::sizegrip $top.statusbar.grip] \
- -row $lastRow -column $lastColumn -sticky se
+.CE
+.PP
+Using \fBgrid\fR:
+.CS
+grid [ttk::sizegrip $top.statusbar.grip] \e
+ -row $lastRow -column $lastColumn -sticky se
# ... optional: add vertical scrollbar in $lastColumn,
# ... optional: add horizontal scrollbar in $lastRow
.CE
-
.SH "BUGS"
If the containing toplevel's position was specified
relative to the right or bottom of the screen
@@ -56,9 +56,7 @@ instead of \fB[wm geometry ... \fIw\fBx\fIh\fB+\fIx\fB+\fIy\fB]\fR),
the sizegrip widget will not resize the window.
.PP
ttk::sizegrip widgets only support "southeast" resizing.
-
.SH "SEE ALSO"
ttk_widget(n)
-
.SH "KEYWORDS"
widget, sizegrip, grow box
diff --git a/doc/ttk_style.n b/doc/ttk_style.n
index 52322c3..86b75b8 100644
--- a/doc/ttk_style.n
+++ b/doc/ttk_style.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: ttk_style.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_style.n,v 1.3.2.1 2007/10/24 12:59:32 dgp Exp $
'\"
.so man.macros
.TH ttk_style n 8.5 Tk "Tk Themed Widget"
@@ -15,11 +15,13 @@ ttk_style \- Control overall look and feel of widgets
\fBttk::style\fR \fIoption\fR ?\fIargs\fR?
.BE
+.BS
.SH NOTES
.PP
This manpage has not been written yet.
Please see the Tcl'2004 conference presentation,
available at http://tktable.sourceforge.net/tile/tile-tcl2004.pdf
+.BE
.SH DEFINITIONS
.PP
@@ -89,7 +91,6 @@ Returns a list of the available themes.
.TP
\fBttk::style theme use\fR \fIthemeName\fR
Sets the current theme to \fIthemeName\fR, and refreshes all widgets.
-
.SH LAYOUTS
A \fIlayout\fR specifies a list of elements, each followed
by one or more options specifying how to arrange the element.
@@ -109,10 +110,9 @@ Specifies where the element is placed inside its allocated parcel.
\fB-children \fI{ sublayout... }\fR
Specifies a list of elements to place inside the element.
.\" Also: -border, -unit, -expand: may go away.
-.PP
-For example:
+.SH EXAMPLE
.CS
-ttk::style layout Horizontal.TScrollbar {
+\fBttk::style\fR layout Horizontal.TScrollbar {
Scrollbar.trough -children {
Scrollbar.leftarrow -side left
Scrollbar.rightarrow -side right
@@ -120,9 +120,7 @@ ttk::style layout Horizontal.TScrollbar {
}
}
.CE
-
.SH "SEE ALSO"
ttk_intro(n), ttk_widget(n), photo(n)
-
.SH KEYWORDS
style, theme, appearance
diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n
index f80b458..0e01b5f 100644
--- a/doc/ttk_treeview.n
+++ b/doc/ttk_treeview.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: ttk_treeview.n,v 1.5 2007/05/03 23:55:30 dkf Exp $
+'\" RCS: @(#) $Id: ttk_treeview.n,v 1.5.2.1 2007/10/24 12:59:32 dgp Exp $
'\"
.so man.macros
.TH ttk_treeview n 8.5 Tk "Tk Themed Widget"
@@ -17,33 +17,28 @@ ttk_treeview \- hierarchical multicolumn data display widget
.SH DESCRIPTION
The \fBttk::treeview\fR widget displays a hierarchical collection of items.
-Each item has a textual label, an optional image,
-and an optional list of data values.
-The data values are displayed in successive columns after
-the tree label.
+Each item has a textual label, an optional image, and an optional list of data
+values. The data values are displayed in successive columns after the tree
+label.
.PP
-The order in which data values are displayed may be controlled
-by setting the \fB-displaycolumns\fR widget option.
-The tree widget can also display column headings.
-Columns may be accessed by number or by symbolic names
-listed in the \fB-columns\fR widget option;
-see \fBCOLUMN IDENTIFIERS\fR.
+The order in which data values are displayed may be controlled by setting the
+\fB\-displaycolumns\fR widget option. The tree widget can also display column
+headings. Columns may be accessed by number or by symbolic names listed in the
+\fB\-columns\fR widget option; see \fBCOLUMN IDENTIFIERS\fR.
.PP
-Each item is identified by a unique name.
-The widget will generate item IDs if they are not supplied by the caller.
-There is a distinguished root item, named \fB{}\fR.
-The root item itself is not displayed;
-its children appear at the top level of the hierarchy.
+Each item is identified by a unique name. The widget will generate item IDs if
+they are not supplied by the caller. There is a distinguished root item, named
+\fB{}\fR. The root item itself is not displayed; its children appear at the
+top level of the hierarchy.
.PP
-Each item also has a list of \fItags\fR,
-which can be used to associate event bindings with individual items
-and control the appearance of the item.
+Each item also has a list of \fItags\fR, which can be used to associate event
+bindings with individual items and control the appearance of the item.
.\" .PP
.\" @@@HERE: describe selection, focus item
.PP
-Treeview widgets support horizontal and vertical scrolling with the
-standard \fB-[xy]scrollcommand\fR options
-and \fB[xyview\fR widget commands.
+Treeview widgets support horizontal and vertical scrolling with the standard
+\fB\-\fR[\fBxy\fR]\fBscrollcommand\fR options and \fB[xyview\fR widget
+commands.
.SO
\-class \-cursor \-takefocus \-style
\-xscrollcommand \-yscrollcommand
@@ -51,324 +46,350 @@ and \fB[xyview\fR widget commands.
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-columns columns Columns
-A list of column identifiers,
-specifying the number of columns and their names.
+A list of column identifiers, specifying the number of columns and their
+names.
.\"X: This is a read-only option; it may only be set when the widget is created.
.OP \-displaycolumns displayColumns DisplayColumns
-A list of column identifiers
-(either symbolic names or integer indices)
-specifying which data columns are displayed
-and the order in which they appear,
-or the string \fB#all\fP.
-.br
+A list of column identifiers (either symbolic names or integer indices)
+specifying which data columns are displayed and the order in which they
+appear, or the string \fB#all\fP.
+.RS
+.PP
If set to \fB#all\fP (the default), all columns are shown in the order given.
+.RE
.OP \-height height Height
-Specifies the number of rows which should be visible.
-Note:
-the requested width is determined from the sum of the column widths.
+Specifies the number of rows which should be visible. Note: the requested
+width is determined from the sum of the column widths.
.OP \-padding padding Padding
-Specifies the internal padding for the widget.
-The padding is a list of up to four length specifications;
-see \fBTtk_GetPaddingFromObj()\fR for details.
+Specifies the internal padding for the widget. The padding is a list of up to
+four length specifications; see \fBTtk_GetPaddingFromObj()\fR for details.
.OP \-selectmode selectMode SelectMode
-Controls how the built-in class bindings manage the selection.
-One of \fBextended\fR, \fBbrowse\fR, or \fBnone\fR.
-.br
-If set to \fBextended\fR (the default), multiple items may be selected.
-If \fBbrowse\fR, only a single item will be selected at a time.
-If \fBnone\fR, the selection will not be changed.
-.br
-Note that application code and tag bindings can set the selection
-however they wish, regardless of the value of \fB-selectmode\fR.
+Controls how the built-in class bindings manage the selection. One of
+\fBextended\fR, \fBbrowse\fR, or \fBnone\fR.
+.RS
+.PP
+If set to \fBextended\fR (the default), multiple items may be selected. If
+\fBbrowse\fR, only a single item will be selected at a time. If \fBnone\fR,
+the selection will not be changed.
+.PP
+Note that application code and tag bindings can set the selection however they
+wish, regardless of the value of \fB\-selectmode\fR.
+.RE
.OP \-show show Show
-A list containing zero or more of the following values, specifying
-which elements of the tree to display.
+A list containing zero or more of the following values, specifying which
+elements of the tree to display.
.RS
.IP \fBtree\fR
-Display tree labels in column #0.
+Display tree labels in column #0.
.IP \fBheadings\fR
Display the heading row.
.PP
The default is \fBtree headings\fR, i.e., show all elements.
.PP
-\fBNOTE:\fR Column #0 always refers to the tree column,
-even if \fB-show tree\fR is not specified.
+\fBNOTE:\fR Column #0 always refers to the tree column, even if \fB\-show
+tree\fR is not specified.
.RE
.SH "WIDGET COMMAND"
.TP
\fIpathname \fBbbox\fR \fIitem\fR ?\fIcolumn\fR?
-Returns the bounding box (relative to the treeview widget's window)
-of the specified \fIitem\fR
-in the form \fIx y width height\fR.
-If \fIcolumn\fR is specified, returns the bounding box of that cell.
-If the \fIitem\fR is not visible
-(i.e., if it is a descendant of a closed item or is scrolled offscreen),
-returns the empty list.
+.
+Returns the bounding box (relative to the treeview widget's window) of the
+specified \fIitem\fR in the form \fIx y width height\fR. If \fIcolumn\fR is
+specified, returns the bounding box of that cell. If the \fIitem\fR is not
+visible (i.e., if it is a descendant of a closed item or is scrolled
+offscreen), returns the empty list.
.TP
\fIpathname \fBcget\fR \fIoption\fR
-Returns the current value of the specified \fIoption\fR; see \fIttk_widget(n)\fR.
+.
+Returns the current value of the specified \fIoption\fR; see
+\fIttk_widget(n)\fR.
.TP
\fIpathname \fBchildren\fR \fIitem\fR ?\fInewchildren\fR?
-If \fInewchildren\fR is not specified,
-returns the list of children belonging to \fIitem\fR.
-.br
-If \fInewchildren\fR is specified, replaces \fIitem\fR's child list
-with \fInewchildren\fR.
-Items in the old child list not present in the new child list
-are detached from the tree.
-None of the items in \fInewchildren\fR may be an ancestor
-of \fIitem\fR.
-.TP
-\fIpathname \fBcolumn\fR \fIcolumn\fR ?\fI-option \fR?\fIvalue -option value...\fR?
-Query or modify the options for the specified \fIcolumn\fR.
-If no \fI-option\fR is specified,
-returns a dictionary of option/value pairs.
-If a single \fI-option\fR is specified,
-returns the value of that option.
-Otherwise, the options are updated with the specified values.
-The following options may be set on each column:
+.
+If \fInewchildren\fR is not specified, returns the list of children belonging
+to \fIitem\fR.
+.RS
+.PP
+If \fInewchildren\fR is specified, replaces \fIitem\fR's child list with
+\fInewchildren\fR. Items in the old child list not present in the new child
+list are detached from the tree. None of the items in \fInewchildren\fR may be
+an ancestor of \fIitem\fR.
+.RE
+.TP
+\fIpathname \fBcolumn\fR \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
+.
+Query or modify the options for the specified \fIcolumn\fR. If no
+\fI\-option\fR is specified, returns a dictionary of option/value pairs. If a
+single \fI\-option\fR is specified, returns the value of that option.
+Otherwise, the options are updated with the specified values. The following
+options may be set on each column:
.RS
.TP
-\fB-id \fIname\fR
-The column name. This is a read-only option.
-For example, [\fI$pathname \fBcolumn #\fIn \fB-id\fR]
-returns the data column associated with data column #\fIn\fR.
-.TP
-\fB-anchor\fR
-Specifies how the text in this column should be aligned
-with respect to the cell. One of
-\fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
-\fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR.
-.TP
-\fB-minwidth\fR
-The minimum width of the column in pixels.
-The treeview widget will not make the column any smaller than
-\fB-minwidth\fR when the widget is resized or the user drags a
-column separator.
-.TP
-\fB-stretch\fR
-Specifies whether or not the column's width should be adjusted
-when the widget is resized.
-.TP
-\fB-width \fIw\fR
-The width of the column in pixels. Default is something reasonable,
-probably 200 or so.
+\fB\-id \fIname\fR
+.
+The column name. This is a read-only option. For example, [\fI$pathname
+\fBcolumn #\fIn \fB\-id\fR] returns the data column associated with data
+column #\fIn\fR.
+.TP
+\fB\-anchor\fR
+.
+Specifies how the text in this column should be aligned with respect to the
+cell. One of \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR,
+\fBnw\fR, or \fBcenter\fR.
+.TP
+\fB\-minwidth\fR
+.
+The minimum width of the column in pixels. The treeview widget will not make
+the column any smaller than \fB\-minwidth\fR when the widget is resized or the
+user drags a column separator.
+.TP
+\fB\-stretch\fR
+.
+Specifies whether or not the column's width should be adjusted when the widget
+is resized.
+.TP
+\fB\-width \fIw\fR
+.
+The width of the column in pixels. Default is something reasonable, probably
+200 or so.
.PP
Use \fIpathname column #0\fR to configure the tree column.
.RE
.TP
\fIpathname \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Modify or query widget options; see \fIttk_widget(n)\fR.
.TP
\fIpathname \fBdelete\fR \fIitemList\fR
-Deletes each of the items in \fIitemList\fR and all of their descendants.
-The root item may not be deleted.
-See also: \fBdetach\fR.
+.
+Deletes each of the items in \fIitemList\fR and all of their descendants. The
+root item may not be deleted. See also: \fBdetach\fR.
.TP
\fIpathname \fBdetach\fR \fIitemList\fR
-Unlinks all of the specified items in \fIitemList\fR from the tree.
-The items and all of their descendants are still present
-and may be reinserted at another point in the tree
-but will not be displayed.
-The root item may not be detached.
-See also: \fBdelete\fR.
+.
+Unlinks all of the specified items in \fIitemList\fR from the tree. The items
+and all of their descendants are still present and may be reinserted at
+another point in the tree but will not be displayed. The root item may not be
+detached. See also: \fBdelete\fR.
.TP
\fIpathname \fBexists \fIitem\fR
-Returns 1 if the specified \fIitem\fR is present in the tree,
-0 otherwise.
+.
+Returns 1 if the specified \fIitem\fR is present in the tree, 0 otherwise.
.TP
\fIpathname \fBfocus \fR?\fIitem\fR?
-If \fIitem\fR is specified, sets the focus item to \fIitem\fR.
-Otherwise, returns the current focus item, or \fB{}\fR if there is none.
+.
+If \fIitem\fR is specified, sets the focus item to \fIitem\fR. Otherwise,
+returns the current focus item, or \fB{}\fR if there is none.
.\" Need: way to clear the focus item. {} works for this...
-.TP
-\fIpathname \fBheading\fR \fIcolumn\fR ?\fI-option \fR?\fIvalue -option value...\fR?
-Query or modify the heading options for the specified \fIcolumn\fR.
-Valid options are:
+.TP
+\fIpathname \fBheading\fR \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
+.
+Query or modify the heading options for the specified \fIcolumn\fR. Valid
+options are:
.RS
.TP
-\fB-text \fItext\fR
+\fB\-text \fItext\fR
+.
The text to display in the column heading.
.TP
-\fB-image \fIimageName\fR
+\fB\-image \fIimageName\fR
+.
Specifies an image to display to the right of the column heading.
.TP
-\fB-anchor \fIanchor\fR
-Specifies how the heading text should be aligned.
-One of the standard Tk anchor values.
+\fB\-anchor \fIanchor\fR
+.
+Specifies how the heading text should be aligned. One of the standard Tk
+anchor values.
.TP
-\fB-command \fIscript\fR
+\fB\-command \fIscript\fR
+.
A script to evaluate when the heading label is pressed.
.PP
Use \fIpathname heading #0\fR to configure the tree column heading.
.RE
.TP
\fIpathname \fBidentify \fIcomponent x y\fR
-Returns a description of the specified \fIcomponent\fR
-under the point given by \fIx\fR and \fIy\fR,
-or the empty string if no such \fIcomponent\fR is present at that position.
-The following subcommands are supported:
+.
+Returns a description of the specified \fIcomponent\fR under the point given
+by \fIx\fR and \fIy\fR, or the empty string if no such \fIcomponent\fR is
+present at that position. The following subcommands are supported:
.RS
.TP
\fIpathname \fBidentify row\fR \fIx y\fR
+.
Returns the item ID of the item at position \fIy\fR.
.TP
\fIpathname \fBidentify column\fR \fIx y\fR
-Returns the data column identifier of the cell at position \fIx\fR.
-The tree column has ID \fB#0\fR.
+.
+Returns the data column identifier of the cell at position \fIx\fR. The tree
+column has ID \fB#0\fR.
.PP
-See \fBCOLUMN IDENTIFIERS\fR for a discussion of display columns
-and data columns.
+See \fBCOLUMN IDENTIFIERS\fR for a discussion of display columns and data
+columns.
.RE
.TP
\fIpathname \fBindex \fIitem\fR
+.
Returns the integer index of \fIitem\fR within its parent's list of children.
.TP
-\fIpathname \fBinsert\fR \fIparent\fR \fIindex\fR ?\fB-id \fIid\fR? \fIoptions...\fR
-Creates a new item.
-\fIparent\fR is the item ID of the parent item,
-or the empty string \fB{}\fR
-to create a new top-level item.
-\fIindex\fR is an integer, or the value \fBend\fR, specifying where in the
-list of \fIparent\fR's children to insert the new item.
-If \fIindex\fR is less than or equal to zero,
-the new node is inserted at the beginning;
-if \fIindex\fR is greater than or equal to the current number of children,
-it is inserted at the end.
-If \fB-id\fR is specified, it is used as the item identifier;
-\fIid\fR must not already exist in the tree.
-Otherwise, a new unique identifier is generated.
-.br
-\fIpathname \fBinsert\fR returns the item identifier of the
-newly created item.
-See \fBITEM OPTIONS\fR for the list of available options.
+\fIpathname \fBinsert\fR \fIparent\fR \fIindex\fR ?\fB\-id \fIid\fR? \fIoptions...\fR
+.
+Creates a new item. \fIparent\fR is the item ID of the parent item, or the
+empty string \fB{}\fR to create a new top-level item. \fIindex\fR is an
+integer, or the value \fBend\fR, specifying where in the list of
+\fIparent\fR's children to insert the new item. If \fIindex\fR is less than or
+equal to zero, the new node is inserted at the beginning; if \fIindex\fR is
+greater than or equal to the current number of children, it is inserted at the
+end. If \fB\-id\fR is specified, it is used as the item identifier; \fIid\fR
+must not already exist in the tree. Otherwise, a new unique identifier is
+generated.
+.RS
+.PP
+\fIpathname \fBinsert\fR returns the item identifier of the newly created
+item. See \fBITEM OPTIONS\fR for the list of available options.
+.RE
.TP
\fIpathname \fBinstate \fIstatespec\fR ?\fIscript\fR?
+.
Test the widget state; see \fIttk_widget(n)\fR.
.TP
-\fIpathname \fBitem\fR \fIitem\fR ?\fI-option \fR?\fIvalue -option value...\fR?
-Query or modify the options for the specified \fIitem\fR.
-If no \fI-option\fR is specified,
-returns a dictionary of option/value pairs.
-If a single \fI-option\fR is specified,
-returns the value of that option.
-Otherwise, the item's options are updated with the specified values.
-See \fBITEM OPTIONS\fR for the list of available options.
+\fIpathname \fBitem\fR \fIitem\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
+.
+Query or modify the options for the specified \fIitem\fR. If no \fI\-option\fR
+is specified, returns a dictionary of option/value pairs. If a single
+\fI\-option\fR is specified, returns the value of that option. Otherwise, the
+item's options are updated with the specified values. See \fBITEM OPTIONS\fR
+for the list of available options.
.TP
\fIpathname \fBmove \fIitem parent index\fR
+.
Moves \fIitem\fR to position \fIindex\fR in \fIparent\fR's list of children.
It is illegal to move an item under one of its descendants.
-.br
-If \fIindex\fR is less than or equal to zero, \fIitem\fR is moved
-to the beginning; if greater than or equal to the number of children,
-it's moved to the end.
-.TP
+.RS
+.PP
+If \fIindex\fR is less than or equal to zero, \fIitem\fR is moved to the
+beginning; if greater than or equal to the number of children, it's moved to
+the end.
+.RE
+.TP
\fIpathname \fBnext \fIitem\fR
-Returns the identifier of \fIitem\fR's next sibling,
-or \fB{}\fR if \fIitem\fR is the last child of its parent.
+.
+Returns the identifier of \fIitem\fR's next sibling, or \fB{}\fR if \fIitem\fR
+is the last child of its parent.
.TP
\fIpathname \fBparent \fIitem\fR
-Returns the ID of the parent of \fIitem\fR,
-or \fB{}\fR if \fIitem\fR is at the top level of the hierarchy.
-.TP
+.
+Returns the ID of the parent of \fIitem\fR, or \fB{}\fR if \fIitem\fR is at
+the top level of the hierarchy.
+.TP
\fIpathname \fBprev \fIitem\fR
-Returns the identifier of \fIitem\fR's previous sibling,
-or \fB{}\fR if \fIitem\fR is the first child of its parent.
+.
+Returns the identifier of \fIitem\fR's previous sibling, or \fB{}\fR if
+\fIitem\fR is the first child of its parent.
.TP
\fIpathname \fBsee\fR \fIitem\fR
-Ensure that \fIitem\fR is visible:
-sets all of \fIitem\fR's ancestors to \fB-open true\fR,
-and scrolls the widget if necessary so that \fIitem\fR is
+.
+Ensure that \fIitem\fR is visible: sets all of \fIitem\fR's ancestors to
+\fB\-open true\fR, and scrolls the widget if necessary so that \fIitem\fR is
within the visible portion of the tree.
.TP
\fIpathname \fBselection\fR ?\fIselop\fR \fIitemList\fR?
+.
If \fIselop\fR is not specified, returns the list of selected items.
Otherwise, \fIselop\fR is one of the following:
.RS
.TP
\fIpathname \fBselection set \fIitemList\fR
+.
\fIitemList\fR becomes the new selection.
.TP
\fIpathname \fBselection add \fIitemList\fR
+.
Add \fIitemList\fR to the selection
.TP
\fIpathname \fBselection remove \fIitemList\fR
+.
Remove \fIitemList\fR from the selection
.TP
\fIpathname \fBselection toggle \fIitemList\fR
+.
Toggle the selection state of each item in \fIitemList\fR.
.RE
.TP
\fIpathname \fBset\fR \fIitem\fR ?\fIcolumn\fR ?\fIvalue\fR??
-With one argument, returns a dictionary of column/value pairs
-for the specified \fIitem\fR.
-With two arguments, returns the current value of the specified \fIcolumn\fR.
-With three arguments, sets the value of column \fIcolumn\fR
-in item \fIitem\fR to the specified \fIvalue\fR.
-See also \fBCOLUMN IDENTIFIERS\fR.
+.
+With one argument, returns a dictionary of column/value pairs for the
+specified \fIitem\fR. With two arguments, returns the current value of the
+specified \fIcolumn\fR. With three arguments, sets the value of column
+\fIcolumn\fR in item \fIitem\fR to the specified \fIvalue\fR. See also
+\fBCOLUMN IDENTIFIERS\fR.
.TP
\fIpathname \fBstate\fR ?\fIstateSpec\fR?
+.
Modify or query the widget state; see \fIttk_widget(n)\fR.
.TP
\fIpathName \fBtag \fIargs...\fR
+.
.RS
.TP
\fIpathName \fBtag bind \fItagName \fR?\fIsequence \fR?\fIscript\fR??
-Add a Tk binding script for the event sequence \fIsequence\fR
-to the tag \fItagName\fR. When an X event is delivered to an item,
-binding scripts for each of the item's \fB-tags\fR are evaluated
-in order as per \fIbindtags(n)\fR.
-.br
-\fB<KeyPress>\fR, \fB<KeyRelease>\fR, and virtual events
-are sent to the focus item.
-\fB<ButtonPress>\fR, \fB<ButtonRelease>\fR, and \fB<Motion>\fR events
-are sent to the item under the mouse pointer.
-No other event types are supported.
-.br
-The binding \fIscript\fR undergoes \fB%\fR-substitutions before
-evaluation; see \fBbind(n)\fR for details.
+.
+Add a Tk binding script for the event sequence \fIsequence\fR to the tag
+\fItagName\fR. When an X event is delivered to an item, binding scripts for
+each of the item's \fB\-tags\fR are evaluated in order as per
+\fIbindtags(n)\fR.
+.RS
+.PP
+\fB<KeyPress>\fR, \fB<KeyRelease>\fR, and virtual events are sent to the focus
+item. \fB<ButtonPress>\fR, \fB<ButtonRelease>\fR, and \fB<Motion>\fR events
+are sent to the item under the mouse pointer. No other event types are
+supported.
+.PP
+The binding \fIscript\fR undergoes \fB%\fR-substitutions before evaluation;
+see \fBbind(n)\fR for details.
+.RE
.TP
\fIpathName \fBtag configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the options for the specified \fItagName\fR.
-If one or more \fIoption/value\fR pairs are specified,
-sets the value of those options for the specified tag.
-If a single \fIoption\fR is specified,
-returns the value of that option
-(or the empty string if the option has not been specified for \fItagName\fR).
-With no additional arguments,
-returns a dictionary of the option settings for \fItagName\fR.
-See \fBTAG OPTIONS\fR for the list of available options.
+.
+Query or modify the options for the specified \fItagName\fR. If one or more
+\fIoption/value\fR pairs are specified, sets the value of those options for
+the specified tag. If a single \fIoption\fR is specified, returns the value of
+that option (or the empty string if the option has not been specified for
+\fItagName\fR). With no additional arguments, returns a dictionary of the
+option settings for \fItagName\fR. See \fBTAG OPTIONS\fR for the list of
+available options.
.RE
.TP
\fIpathName \fBxview \fIargs\fR
+.
Standard command for horizontal scrolling; see \fIwidget(n)\fR.
.TP
\fIpathName \fByview \fIargs\fR
+.
Standard command for vertical scrolling; see \fIttk_widget(n)\fR.
-
.PP
.SH "ITEM OPTIONS"
-The following item options may be specified for items
-in the \fBinsert\fR and \fBitem\fR widget commands.
+The following item options may be specified for items in the \fBinsert\fR and
+\fBitem\fR widget commands.
.OP \-text text Text
The textual label to display for the item.
.OP \-image image Image
A Tk image, displayed to the left of the label.
.OP \-values values Values
The list of values associated with the item.
-.br
-Each item should have the same number of values as
-the \fB-columns\fR widget option.
-If there are fewer values than columns,
-the remaining values are assumed empty.
-If there are more values than columns,
-the extra values are ignored.
+.RS
+.PP
+Each item should have the same number of values as the \fB\-columns\fR widget
+option. If there are fewer values than columns, the remaining values are
+assumed empty. If there are more values than columns, the extra values are
+ignored.
+.RE
.OP \-open open Open
-A boolean value indicating whether the item's children
-should be displayed (\fB-open true\fR) or hidden (\fB-open false\fR).
+A boolean value indicating whether the item's children should be displayed
+(\fB\-open true\fR) or hidden (\fB\-open false\fR).
.OP \-tags tags Tags
-A list of tags associated with this item.
+A list of tags associated with this item.
.SH "TAG OPTIONS"
The following options may be specified on tags:
.IP \-foreground
@@ -381,47 +402,43 @@ Specifies the font to use when drawing text.
.\" ??? Maybe: .IP \-padding
.\" ??? Maybe: .IP \-text
.IP \-image
-Specifies the item image, in case the item's \fB-image\fR option is empty.
+Specifies the item image, in case the item's \fB\-image\fR option is empty.
.PP
\fI(@@@ TODO: sort out order of precedence for options)\fR
-
.SH "COLUMN IDENTIFIERS"
Column identifiers take any of the following forms:
.IP \(bu
-A symbolic name from the list of \fB-columns\fR.
+A symbolic name from the list of \fB\-columns\fR.
.IP \(bu
An integer \fIn\fR, specifying the \fIn\fRth data column.
.IP \(bu
-A string of the form \fB#\fIn\fR, where \fIn\fR is an integer,
-specifying the \fIn\fRth display column.
+A string of the form \fB#\fIn\fR, where \fIn\fR is an integer, specifying the
+\fIn\fRth display column.
.PP
-\fBNOTE:\fR
-Item \fB-values\fR may be displayed in a different order than
-the order in which they are stored.
+\fBNOTE:\fR Item \fB\-values\fR may be displayed in a different order than the
+order in which they are stored.
.PP
-\fBNOTE:\fR Column #0 always refers to the tree column,
-even if \fB-show tree\fR is not specified.
+\fBNOTE:\fR Column #0 always refers to the tree column, even if \fB\-show
+tree\fR is not specified.
.PP
-A \fIdata column number\fR is an index into an item's \fB-values\fR list;
-a \fIdisplay column number\fR is the column number in the tree
-where the values are displayed.
-Tree labels are displayed in column #0.
-If \fB-displaycolumns\fR is not set,
-then data column \fIn\fR is displayed in display column \fB#\fIn+1\fR.
-Again, \fBcolumn #0 always refers to the tree column\fR.
+A \fIdata column number\fR is an index into an item's \fB\-values\fR list; a
+\fIdisplay column number\fR is the column number in the tree where the values
+are displayed. Tree labels are displayed in column #0. If
+\fB\-displaycolumns\fR is not set, then data column \fIn\fR is displayed in
+display column \fB#\fIn+1\fR. Again, \fBcolumn #0 always refers to the tree
+column\fR.
.SH "VIRTUAL EVENTS"
The treeview widget generates the following virtual events.
-.IP <<TreeviewSelect>>
+.IP \fB<<TreeviewSelect>>\fR
Generated whenever the selection changes.
-.IP <<TreeviewOpen>>
-Generated just before setting the focus item to \fB-open true\fR.
-.IP <<TreeviewClose>>
-Generated just after setting the focus item to \fB-open false\fR.
+.IP \fB<<TreeviewOpen>>\fR
+Generated just before setting the focus item to \fB\-open true\fR.
+.IP \fB<<TreeviewClose>>\fR
+Generated just after setting the focus item to \fB\-open false\fR.
.PP
-The \fBfocus\fR and \fBselection\fR widget commands can be used
-to determine the affected item or items.
-In Tk 8.5, the affected item is also passed as the \fB-detail\fR field
-of the virtual event.
+The \fBfocus\fR and \fBselection\fR widget commands can be used to determine
+the affected item or items. In Tk 8.5, the affected item is also passed as the
+\fB\-detail\fR field of the virtual event.
.SH "SEE ALSO"
ttk_widget(n), listbox(n), image(n), bind(n)
diff --git a/doc/ttk_widget.n b/doc/ttk_widget.n
index 1c70d67..fda05b5 100644
--- a/doc/ttk_widget.n
+++ b/doc/ttk_widget.n
@@ -1,10 +1,10 @@
'\"
'\" Copyright (c) 2004 Joe English
-'\"
+'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_widget.n,v 1.3 2006/12/13 23:04:33 hobbs Exp $
+'\" RCS: @(#) $Id: ttk_widget.n,v 1.3.2.1 2007/10/24 12:59:32 dgp Exp $
'\"
.so man.macros
.TH ttk_widget n 8.5 Tk "Tk Themed Widget"
@@ -19,216 +19,206 @@ This manual describes common widget options and commands.
.SH "STANDARD OPTIONS"
The following options are supported by all Tk themed widgets:
.OP \-class undefined undefined
-Specifies the window class.
-The class is used when querying the option database
-for the window's other options, to determine the default
-bindtags for the window, and to select the widget's default
-layout and style.
-This is a read-only option:
-it may only be specified when the window is created,
-and may not be changed with the \fBconfigure\fR widget command.
+Specifies the window class. The class is used when querying the option
+database for the window's other options, to determine the default bindtags for
+the window, and to select the widget's default layout and style. This is a
+read-only option: it may only be specified when the window is created, and may
+not be changed with the \fBconfigure\fR widget command.
.OP \-cursor cursor Cursor
-Specifies the mouse cursor to be used for the widget.
-See \fBTk_GetCursor\fR and \fIcursors(n)\fR in the Tk reference manual
-for the legal values.
-If set to the empty string (the default),
-the cursor is inherited from the parent widget.
+Specifies the mouse cursor to be used for the widget. See \fBTk_GetCursor\fR
+and \fIcursors(n)\fR in the Tk reference manual for the legal values. If set
+to the empty string (the default), the cursor is inherited from the parent
+widget.
.OP \-takefocus takeFocus TakeFocus
-Determines whether the window accepts the focus during keyboard traversal.
-Either \fB0\fR, \fB1\fR, a command prefix (to which the widget path
-is appended, and which should return \fB0\fR or \fB1\fR),
-or the empty string.
+Determines whether the window accepts the focus during keyboard traversal.
+Either \fB0\fR, \fB1\fR, a command prefix (to which the widget path is
+appended, and which should return \fB0\fR or \fB1\fR), or the empty string.
See \fIoptions(n)\fR in the Tk reference manual for the full description.
.OP \-style style Style
May be used to specify a custom widget style.
.SH "SCROLLABLE WIDGET OPTIONS"
.PP
-The following options are supported by widgets that
-are controllable by a scrollbar.
-See \fIscrollbar(n)\fR for more information
+The following options are supported by widgets that are controllable by a
+scrollbar. See \fIscrollbar(n)\fR for more information
.OP \-xscrollcommand xScrollCommand ScrollCommand
A command prefix, used to communicate with horizontal scrollbars.
-.br
-When the view in the widget's window changes, the widget will
-generate a Tcl command by concatenating the scroll command and
-two numbers.
-Each of the numbers is a fraction between 0 and 1 indicating
-a position in the document; 0 indicates the beginning,
-and 1 indicates the end.
-The first fraction indicates the first information in the widget
-that is visible in the window, and the second fraction indicates
-the information just after the last portion that is visible.
-.br
-Typically the \fBxScrollCommand\fR option consists of the path name
-of a \fBscrollbar\fR widget followed by ``set'', e.g. ``.x.scrollbar set''.
-This will cause the scrollbar to be updated whenever the view in the
-window changes.
-.br
-If this option is set to the empty string (the default),
-then no command is be executed.
+.RS
+.PP
+When the view in the widget's window changes, the widget will generate a Tcl
+command by concatenating the scroll command and two numbers. Each of the
+numbers is a fraction between 0 and 1 indicating a position in the document; 0
+indicates the beginning, and 1 indicates the end. The first fraction indicates
+the first information in the widget that is visible in the window, and the
+second fraction indicates the information just after the last portion that is
+visible.
+.PP
+Typically the \fBxScrollCommand\fR option consists of the path name of a
+\fBscrollbar\fR widget followed by ``set'', e.g. ``.x.scrollbar set''. This
+will cause the scrollbar to be updated whenever the view in the window
+changes.
+.PP
+If this option is set to the empty string (the default), then no command is be
+executed.
+.RE
.OP \-yscrollcommand yScrollCommand ScrollCommand
-A command prefix, used to communicate with vertical scrollbars.
-See the description of \fB-xscrollcommand\fR above for details.
+A command prefix, used to communicate with vertical scrollbars. See the
+description of \fB\-xscrollcommand\fR above for details.
.SH "LABEL OPTIONS"
-The following options are supported by labels, buttons,
-and other button-like widgets:
+The following options are supported by labels, buttons, and other button-like
+widgets:
.OP \-text text Text
-Specifies a text string to be displayed inside the widget
-(unless overridden by \fB-textvariable\fR).
+Specifies a text string to be displayed inside the widget (unless overridden
+by \fB\-textvariable\fR).
.OP \-textvariable textVariable Variable
-Specifies the name of variable whose value will be used
-in place of the \fB-text\fR resource.
+Specifies the name of variable whose value will be used in place of the
+\fB\-text\fR resource.
.OP \-underline underline Underline
-If set, specifies the integer index (0-based) of a character to underline
-in the text string.
-The underlined character is used for mnemonic activation.
+If set, specifies the integer index (0-based) of a character to underline in
+the text string. The underlined character is used for mnemonic activation.
.OP \-image image Image
-Specifies an image to display.
-This is a list of 1 or more elements.
-The first element is the default image name.
-The rest of the list is a sequence of \fIstatespec / value\fR pairs
-as per \fBstyle map\fR, specifying different images to use when
-the widget is in a particular state or combination of states.
-All images in the list should have the same size.
+Specifies an image to display. This is a list of 1 or more elements. The first
+element is the default image name. The rest of the list is a sequence of
+\fIstatespec / value\fR pairs as per \fBstyle map\fR, specifying different
+images to use when the widget is in a particular state or combination of
+states. All images in the list should have the same size.
.OP \-compound compound Compound
-Specifies how to display the image relative to the text,
-in the case both \fB-text\fR and \fB-image\fR are present.
-Valid values are:
+Specifies how to display the image relative to the text, in the case both
+\fB\-text\fR and \fB\-image\fR are present. Valid values are:
.RS
-.IP text
+.IP \fBtext\fR
Display text only.
-.IP image
+.IP \fBimage\fR
Display image only.
-.IP center
+.IP \fBcenter\fR
Display text centered on top of image.
-.IP top
-.IP bottom
-.IP left
-.IP right
+.IP \fBtop\fR, \fBbottom\fR, \fBleft\fR, \fBright\fR
Display image above, below, left of, or right of the text, respectively.
-.IP none
+.IP \fBnone\fR
The default; display the image if present, otherwise the text.
.RE
.OP \-width width Width
-If greater than zero, specifies how much space, in character widths,
-to allocate for the text label.
-If less than zero, specifies a minimum width.
-If zero or unspecified, the natural width of the text label is used.
+If greater than zero, specifies how much space, in character widths, to
+allocate for the text label. If less than zero, specifies a minimum width. If
+zero or unspecified, the natural width of the text label is used.
.SH "COMPATIBILITY OPTIONS"
.OP \-state state State
-May be set to \fBnormal\fR or \fBdisabled\fR
-to control the \fBdisabled\fR state bit.
-This is a ``write-only'' option: setting it changes the
-widget state, but the \fBstate\fR widget command does
-not affect the state option.
+May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR
+state bit. This is a ``write-only'' option: setting it changes the widget
+state, but the \fBstate\fR widget command does not affect the state option.
.SH COMMANDS
.TP
\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
+.
+Returns the current value of the configuration option given by \fIoption\fR.
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-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.
-If \fIoption\fR is specified with no \fIvalue\fR,
-then the command returns a list describing the named option:
-the elements of the list are the
-option name, database name, database class, default value,
-and current value.
+.
+Query or modify the configuration options of the widget. 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. If \fIoption\fR is specified with no \fIvalue\fR, then the
+command returns a list describing the named option: the elements of the list
+are the option name, database name, database class, default value, and current
+value.
.\" Note: Ttk widgets don't use TK_OPTION_SYNONYM.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR.
-.TP
+If no \fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR.
+.TP
\fIpathName \fBinstate\fR \fIstatespec\fR ?\fIscript\fR?
-Test the widget's state.
-If \fIscript\fR is not specified, returns 1 if
-the widget state matches \fIstatespec\fR and 0 otherwise.
-If \fIscript\fR is specified, equivalent to
+.
+Test the widget's state. If \fIscript\fR is not specified, returns 1 if the
+widget state matches \fIstatespec\fR and 0 otherwise. If \fIscript\fR is
+specified, equivalent to
+.RS
.CS
if {[\fIpathName\fR instate \fIstateSpec\fR]} \fIscript\fR
.CE
-.TP
+.RE
+.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR
-Modify or inquire widget state.
-If \fIstateSpec\fR is present, sets the widget state:
-for each flag in \fIstateSpec\fR, sets the corresponding flag
-or clears it if prefixed by an exclamation point.
-Returns a new state spec indicating which flags were changed:
+.
+Modify or inquire widget state. If \fIstateSpec\fR is present, sets the widget
+state: for each flag in \fIstateSpec\fR, sets the corresponding flag or clears
+it if prefixed by an exclamation point. Returns a new state spec indicating
+which flags were changed:
+.RS
.CS
set changes [\fIpathName \fRstate \fIspec\fR]
\fIpathName \fRstate $changes
.CE
-will restore \fIpathName\fR to the original state.
-If \fIstateSpec\fR is not specified,
-returns a list of the currently-enabled state flags.
+will restore \fIpathName\fR to the original state. If \fIstateSpec\fR is not
+specified, returns a list of the currently-enabled state flags.
+.RE
.SH "WIDGET STATES"
-The widget state is a bitmap of independent state flags.
-Widget state flags include:
+The widget state is a bitmap of independent state flags. Widget state flags
+include:
.TP
\fBactive\fR
-The mouse cursor is over the widget
-and pressing a mouse button will cause some action to occur.
-(aka "prelight" (Gnome), "hot" (Windows), "hover").
+.
+The mouse cursor is over the widget and pressing a mouse button will cause
+some action to occur. (aka "prelight" (Gnome), "hot" (Windows), "hover").
.TP
\fBdisabled\fR
-Widget is disabled under program control
-(aka "unavailable", "inactive")
+.
+Widget is disabled under program control (aka "unavailable", "inactive")
.TP
\fBfocus\fR
-Widget has keyboard focus
+.
+Widget has keyboard focus.
.TP
\fBpressed\fR
-Widget is being pressed (aka "armed" in Motif).
+.
+Widget is being pressed (aka "armed" in Motif).
.TP
\fBselected\fR
-"On", "true", or "current" for things like checkbuttons and radiobuttons.
+.
+The widget is "On", "true", or "current" (for things like checkbuttons and
+radiobuttons).
.TP
\fBbackground\fR
-Windows and the Mac have a notion of an "active" or foreground window.
-The \fBbackground\fR state is set for widgets in a background window,
-and cleared for those in the foreground window.
+.
+Windows and the Mac have a notion of an "active" or foreground window. The
+\fBbackground\fR state is set for widgets in a background window, and cleared
+for those in the foreground window.
.TP
\fBreadonly\fR
+.
Widget should not allow user modification.
.TP
\fBalternate\fR
-A widget-specific alternate display format.
-For example, used for checkbuttons and radiobuttons
-in the "tristate" or "mixed" state,
-and for buttons with \fB-default active\fR.
+.
+A widget-specific alternate display format. For example, used for checkbuttons
+and radiobuttons in the "tristate" or "mixed" state, and for buttons with
+\fB\-default active\fR.
.TP
\fBinvalid\fR
-The widget's value is invalid.
-(Potential uses: scale widget value out of bounds,
-entry widget value failed validation.)
+.
+The widget's value is invalid. (Potential uses: scale widget value out of
+bounds, entry widget value failed validation.)
.PP
-A \fIstate specification\fR or \fIstateSpec\fR is a list
-of state names, optionally prefixed with an exclamation point (!)
-indicating that the bit is off.
+A \fIstate specification\fR or \fIstateSpec\fR is a list of state names,
+optionally prefixed with an exclamation point (!) indicating that the bit is
+off.
.SH EXAMPLES
.CS
set b [ttk::button .b]
# Disable the widget:
-$b state disabled
+$b state disabled
# Invoke the widget only if it is currently pressed and enabled:
-$b instate {pressed !disabled} { .b invoke }
+$b instate {pressed !disabled} { .b invoke }
# Reenable widget:
-$b state !disabled
+$b state !disabled
.CE
.SH "SEE ALSO"
ttk_intro(n), style(n)
-
.SH KEYWORDS
state, configure, option
diff --git a/doc/wm.n b/doc/wm.n
index f8dfe61..ab95dea 100644
--- a/doc/wm.n
+++ b/doc/wm.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: wm.n,v 1.29.2.1 2007/10/16 04:03:53 dgp Exp $
+'\" RCS: @(#) $Id: wm.n,v 1.29.2.2 2007/10/24 12:59:32 dgp Exp $
'\"
.so man.macros
.TH wm n 8.5 Tk "Tk Built-In Commands"
@@ -220,11 +220,14 @@ The focus model defaults to \fBpassive\fR, and Tk's \fBfocus\fR command
assumes a passive model of focusing.
.TP
\fBwm forget \fIwindow\fR
+.VS 8.5
The \fIwindow\fR will be unmapped from the screen and will no longer
be managed by \fBwm\fR. Windows created with the \fBtoplevel\fR
command will be treated like \fBframe\fR windows once they are no
-longer managed by \fBwm\fR, however, the -menu configuration will be
-remembered and the menus will return once the widget is managed again.
+longer managed by \fBwm\fR, however, the \-menu configuration will be
+remembered and the menus will return once the widget is managed again. See
+\fBGEOMETRY MANAGEMENT\fR below for more details.
+.VE 8.5
.TP
\fBwm frame \fIwindow\fR
If \fIwindow\fR has been reparented by the window manager into a
@@ -244,7 +247,7 @@ the form \fB=\fIwidth\fBx\fIheight\fB\(+-\fIx\fB\(+-\fIy\fR, where
any of \fB=\fR, \fIwidth\fBx\fIheight\fR, or \fB\(+-\fIx\fB\(+-\fIy\fR
may be omitted. \fIWidth\fR and \fIheight\fR are positive integers
specifying the desired dimensions of \fIwindow\fR. If \fIwindow\fR
-is gridded (see GRIDDED GEOMETRY MANAGEMENT below) then the dimensions
+is gridded (see \fBGRIDDED GEOMETRY MANAGEMENT\fR below) then the dimensions
are specified in grid units; otherwise they are specified in pixel
units. \fIX\fR and \fIy\fR specify the desired location of
\fIwindow\fR on the screen, in pixels.
@@ -403,11 +406,17 @@ is no icon window currently specified for \fIwindow\fR.
Button press events are disabled for \fIwindow\fR as long as it is
an icon window; this is needed in order to allow window managers
to ``own'' those events.
+.RS
+.PP
Note: not all window managers support the notion of an icon window.
+.RE
.TP
\fBwm manage \fIwidget\fR
+.VS 8.5
The \fIwidget\fR specified will become a stand alone top-level window. The
-window will be decorated with the window managers title bar, etc.
+window will be decorated with the window managers title bar, etc. See
+\fBGEOMETRY MANAGEMENT\fR below for more details.
+.VE 8.5
.TP
\fBwm maxsize \fIwindow\fR ?\fIwidth height\fR?
If \fIwidth\fR and \fIheight\fR are specified, they give
@@ -616,6 +625,7 @@ well as manual resizes and the \fBwm geometry\fR command.
You can also use the command \fBwm resizable\fR to completely
disable interactive resizing in one or both dimensions.
.PP
+.VS 8.5
The \fBwm manage\fR and \fBwm forget\fR commands may be used to
perform undocking and docking of windows. After a widget is managed
by \fBwm manage\fR command, all other \fBwm\fR subcommands may be used
@@ -630,6 +640,7 @@ that have their top-level widget changed via a \fBwm manage\fR or
\fBwm forget\fR command, must be redone to adjust any top-level widget
path in the bindtags. Bindtags that have not been customized do not
have to be redone.
+.VE 8.5
.SH "GRIDDED GEOMETRY MANAGEMENT"
.PP
Gridded geometry management occurs when one of the widgets of an
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 6aeb9eb..51a7bb7 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFont.c,v 1.35.2.3 2007/09/07 01:25:34 dgp Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.35.2.4 2007/10/24 12:59:32 dgp Exp $
*/
#include "tkInt.h"
@@ -944,7 +944,7 @@ RecomputeWidgets(
int
TkCreateNamedFont(
- Tcl_Interp *interp, /* Interp for error return. */
+ Tcl_Interp *interp, /* Interp for error return (can be NULL). */
Tk_Window tkwin, /* A window associated with interp. */
const char *name, /* Name for the new named font. */
TkFontAttributes *faPtr) /* Attributes for the new named font. */
@@ -961,9 +961,10 @@ TkCreateNamedFont(
if (!isNew) {
nfPtr = (NamedFont *) Tcl_GetHashValue(namedHashPtr);
if (nfPtr->deletePending == 0) {
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "named font \"", name,
- "\" already exists", NULL);
+ if (interp) {
+ Tcl_AppendResult(interp, "named font \"", name,
+ "\" already exists", NULL);
+ }
return TCL_ERROR;
}
@@ -1001,7 +1002,7 @@ TkCreateNamedFont(
int
TkDeleteNamedFont(
- Tcl_Interp *interp, /* Interp for error return. */
+ Tcl_Interp *interp, /* Interp for error return (can be NULL). */
Tk_Window tkwin, /* A window associated with interp. */
CONST char *name) /* Name for the new named font. */
{
@@ -1013,8 +1014,10 @@ TkDeleteNamedFont(
namedHashPtr = Tcl_FindHashEntry(&fiPtr->namedTable, name);
if (namedHashPtr == NULL) {
- Tcl_AppendResult(interp, "named font \"", name,
- "\" doesn't exist", NULL);
+ if (interp) {
+ Tcl_AppendResult(interp, "named font \"", name,
+ "\" doesn't exist", NULL);
+ }
return TCL_ERROR;
}
nfPtr = (NamedFont *) Tcl_GetHashValue(namedHashPtr);
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index b80f8ca..182c96c 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.80.2.3 2007/09/17 15:22:01 dgp Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.80.2.4 2007/10/24 12:59:32 dgp Exp $
*/
#include "tkInt.h"
@@ -1706,7 +1706,7 @@ Tk_MakeWindowExist(
}
createProc = Tk_GetClassProc(winPtr->classProcsPtr, createProc);
- if (createProc != NULL) {
+ if (createProc != NULL && parent != None) {
winPtr->window = (*createProc)(tkwin, parent, winPtr->instanceData);
} else {
winPtr->window = TkpMakeWindow(winPtr, parent);
diff --git a/generic/ttk/ttkTrack.c b/generic/ttk/ttkTrack.c
index 6f0cc35..8957b41 100644
--- a/generic/ttk/ttkTrack.c
+++ b/generic/ttk/ttkTrack.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTrack.c,v 1.2 2006/11/03 03:06:22 das Exp $
+/* $Id: ttkTrack.c,v 1.2.2.1 2007/10/24 12:59:32 dgp Exp $
* Copyright (c) 2004, Joe English
*
* TtkTrackElementState() -- helper routine for widgets
@@ -21,8 +21,6 @@
* <ButtonRelease> event.
*
* TODO: Handle "chords" properly (e.g., <B1-ButtonPress-2>)
- * TODO: Deal with grabs -- possible to get a Press event w/no corresponding Release.
- *
*/
#include <tk.h>
@@ -132,6 +130,8 @@ ElementStateEventProc(ClientData clientData, XEvent *ev)
break;
case LeaveNotify:
ActivateElement(es, 0);
+ if (ev->xcrossing.mode == NotifyGrab)
+ PressElement(es, 0);
break;
case EnterNotify:
node = Ttk_LayoutIdentify(
@@ -152,7 +152,7 @@ ElementStateEventProc(ClientData clientData, XEvent *ev)
*/
Tk_DeleteEventHandler(es->corePtr->tkwin,
ElementStateMask, ElementStateEventProc, es);
- ckfree((ClientData)es);
+ ckfree(clientData);
break;
}
}
@@ -172,4 +172,3 @@ void TtkTrackElementState(WidgetCore *corePtr)
ElementStateMask,ElementStateEventProc,es);
}
-
diff --git a/library/console.tcl b/library/console.tcl
index 55c4add..994a0b4 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -4,7 +4,7 @@
# can be used by non-unix systems that do not have built-in support
# for shells.
#
-# RCS: @(#) $Id: console.tcl,v 1.31.2.1 2007/10/15 18:38:34 dgp Exp $
+# RCS: @(#) $Id: console.tcl,v 1.31.2.2 2007/10/24 12:59:33 dgp Exp $
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
@@ -123,7 +123,11 @@ proc ::tk::ConsoleInit {} {
set con [text .console -yscrollcommand [list .sb set] -setgrid true \
-borderwidth 0 -highlightthickness 0 -font TkConsoleFont]
- ::ttk::scrollbar .sb -command [list $con yview]
+ if {[tk windowingsystem] eq "aqua"} {
+ scrollbar .sb -command [list $con yview]
+ } else {
+ ::ttk::scrollbar .sb -command [list $con yview]
+ }
pack .sb -in .consoleframe -fill both -side right -padx 1 -pady 1
pack $con -in .consoleframe -fill both -expand 1 -side left -padx 1 -pady 1
pack .consoleframe -fill both -expand 1 -side left
diff --git a/library/demos/combo.tcl b/library/demos/combo.tcl
new file mode 100644
index 0000000..dad2fa1
--- /dev/null
+++ b/library/demos/combo.tcl
@@ -0,0 +1,64 @@
+# combo.tcl --
+#
+# This demonstration script creates several combobox widgets.
+#
+# RCS: @(#) $Id: combo.tcl,v 1.2.2.2 2007/10/24 12:59:33 dgp Exp $
+
+if {![info exists widgetDemo]} {
+ error "This script should be run from the \"widget\" demo."
+}
+
+package require Tk
+package require Ttk
+
+set w .combo
+catch {destroy $w}
+toplevel $w
+wm title $w "Combobox Demonstration"
+wm iconname $w "combo"
+positionWindow $w
+
+ttk::label $w.msg -font $font -wraplength 5i -justify left -text "Three different\
+ combo-boxes are displayed below. You can add characters to the first\
+ one by pointing, clicking and typing, just as with an entry; pressing\
+ Return will cause the current value to be added to the list that is\
+ selectable from the drop-down list, and you can choose other values\
+ by pressing the Down key, using the arrow keys to pick another one,\
+ and pressing Return again. The second combo-box is fixed to a\
+ particular value, and cannot be modified at all. The third one only\
+ allows you to select values from its drop-down list of Australian\
+ cities."
+pack $w.msg -side top -fill x
+
+## See Code / Dismiss buttons
+set btns [addSeeDismiss $w.buttons $w {firstValue secondValue ozCity}]
+pack $btns -side bottom -fill x
+
+ttk::frame $w.f
+pack $w.f -fill both -expand 1
+set w $w.f
+
+set australianCities {
+ Canberra Sydney Melbourne Perth Adelaide Brisbane
+ Hobart Darwin "Alice Springs"
+}
+set secondValue unchangable
+set ozCity Sydney
+
+ttk::labelframe $w.c1 -text "Fully Editable"
+ttk::combobox $w.c1.c -textvariable firstValue
+ttk::labelframe $w.c2 -text Disabled
+ttk::combobox $w.c2.c -textvariable secondValue -state disabled
+ttk::labelframe $w.c3 -text "Defined List Only"
+ttk::combobox $w.c3.c -textvariable ozCity -state readonly \
+ -values $australianCities
+bind $w.c1.c <Return> {
+ if {[%W get] ni [%W cget -values]} {
+ %W configure -values [concat [%W cget -values] [list [%W get]]]
+ }
+}
+
+pack $w.c1 $w.c2 $w.c3 -side top -pady 5 -padx 10
+pack $w.c1.c -pady 5 -padx 10
+pack $w.c2.c -pady 5 -padx 10
+pack $w.c3.c -pady 5 -padx 10
diff --git a/library/demos/en.msg b/library/demos/en.msg
index e3914c5..d4783fe 100644
--- a/library/demos/en.msg
+++ b/library/demos/en.msg
@@ -5,8 +5,10 @@
::msgcat::mcset en "&About..."
::msgcat::mcset en "<F1>"
::msgcat::mcset en "&Quit"
-::msgcat::mcset en "Meta-Q" ;# Displayed hotkey
+::msgcat::mcset en "Meta+Q" ;# Displayed hotkey
::msgcat::mcset en "Meta-q" ;# Actual binding sequence
+::msgcat::mcset en "Ctrl+Q" ;# Displayed hotkey
+::msgcat::mcset en "Control-q" ;# Actual binding sequence
::msgcat::mcset en "Variable values"
::msgcat::mcset en "Variable values:"
::msgcat::mcset en "OK"
diff --git a/library/demos/nl.msg b/library/demos/nl.msg
index cf89099..1c3a8c3 100644
--- a/library/demos/nl.msg
+++ b/library/demos/nl.msg
@@ -5,68 +5,42 @@ mcset nl "About..." "Info..."
mcset nl "&About..." "&Info..."
mcset nl "<F1>" "<F1>"
mcset nl "&Quit" "&Einde"
-mcset nl "Meta-Q" "Meta-E" ;# Displayed hotkey
+mcset nl "Meta+Q" "Meta+E" ;# Displayed hotkey
mcset nl "Meta-q" "Meta-e" ;# Actual binding sequence
+mcset nl "Ctrl+Q" "Ctrl+E" ;# Displayed hotkey
+mcset nl "Control-q" "Control-e" ;# Actual binding sequence
mcset nl "Dismiss" "Sluiten"
-mcset nl "See Code" "Bekijk Code"
mcset nl "See Variables" "Bekijk Variabelen"
mcset nl "Variable Values" "Waarden Variabelen"
mcset nl "OK" "OK"
mcset nl "Run the \"%s\" sample program" "Start voorbeeld \"%s\""
-mcset nl "Rerun Demo" "Herstart Demo"
mcset nl "Print Code" "Code Afdrukken"
mcset nl "Demo code: %s" "Code van Demo %s"
mcset nl "About Widget Demo" "Over deze demonstratie"
mcset nl "Tk widget demonstration" "Demonstratie van Tk widgets"
mcset nl "Copyright (c) %s" "Copyright (c) %s"
-mcset nl {
- @@title
- Tk Widget Demonstrations
- @@newline
- @@normal
- @@newline
-
- This application provides a front end for several short scripts
- that demonstrate what you can do with Tk widgets. Each of the
- numbered lines below describes a demonstration; you can click on
- it to invoke the demonstration. Once the demonstration window
- appears, you can click the
- @@bold
- See Code
- @@normal
- button to see the Tcl/Tk code that created the demonstration. If
- you wish, you can edit the code and click the
- @@bold
- Rerun Demo
- @@normal
- button in the code window to reinvoke the demonstration with the
- modified code.
- @@newline
-} {
- @@title
- Demostratie van Tk widgets
- @@newline
- @@normal
- @@newline
-
- Dit programma is een schil rond enkele korte scripts waarmee
- gedemonstreerd wordt wat je kunt doen met Tk widgets. Elk van de
- genummerde regels hieronder omschrijft een demonstratie; je kunt de
- demonstratie starten door op de regel te klikken.
- Zodra het nieuwe venster verschijnt, kun je op de knop
- @@bold
- Bekijk Code
- @@normal
- drukken om de achterliggende Tcl/Tk code te zien. Als je dat wilt,
- kun je de code wijzigen en op de knop
- @@bold
- Herstart Demo
- @@normal
- drukken in het codevenster om de demonstratie uit te voeren met de
- nieuwe code.
- @@newline
-}
+mcset nl "Tk Widget Demonstrations" "Demostratie van Tk widgets"
+mcset nl "This application provides a front end for several short scripts" \
+ "Dit programma is een schil rond enkele korte scripts waarmee"
+mcset nl "that demonstrate what you can do with Tk widgets. Each of the" \
+ "gedemonstreerd wordt wat je kunt doen met Tk widgets. Elk van de"
+mcset nl "numbered lines below describes a demonstration; you can click on" \
+ "genummerde regels hieronder omschrijft een demonstratie; je kunt de"
+mcset nl "it to invoke the demonstration. Once the demonstration window" \
+ "demonstratie starten door op de regel te klikken."
+mcset nl "appears, you can click the" \
+ "Zodra het nieuwe venster verschijnt, kun je op de knop"
+mcset nl "See Code" "Bekijk Code" ;# This is also button text!
+mcset nl "button to see the Tcl/Tk code that created the demonstration. If" \
+ "drukken om de achterliggende Tcl/Tk code te zien. Als je dat wilt,"
+mcset nl "you wish, you can edit the code and click the" \
+ "kun je de code wijzigen en op de knop"
+mcset nl "Rerun Demo" "Herstart Demo" ;# This is also button text!
+mcset nl "button in the code window to reinvoke the demonstration with the" \
+ "drukken in het codevenster om de demonstratie uit te voeren met de"
+mcset nl "modified code." \
+ "nieuwe code."
mcset nl "Labels, buttons, checkbuttons, and radiobuttons" \
"Labels, knoppen, vinkjes/aankruishokjes en radioknoppen"
@@ -142,4 +116,3 @@ mcset nl "A dialog box with a local grab" \
"Een dialoogvenster met een locale \"grab\""
mcset nl "A dialog box with a global grab" \
"Een dialoogvenster met een globale \"grab\""
-
diff --git a/library/demos/toolbar.tcl b/library/demos/toolbar.tcl
new file mode 100644
index 0000000..0850054
--- /dev/null
+++ b/library/demos/toolbar.tcl
@@ -0,0 +1,106 @@
+# toolbar.tcl --
+#
+# This demonstration script creates a toolbar that can be torn off.
+#
+# RCS: @(#) $Id: toolbar.tcl,v 1.2.2.2 2007/10/24 12:59:33 dgp Exp $
+
+if {![info exists widgetDemo]} {
+ error "This script should be run from the \"widget\" demo."
+}
+
+package require Tk
+package require Ttk
+
+set w .toolbar
+destroy $w
+toplevel $w
+wm title $w "Toolbar Demonstration"
+wm iconname $w "toolbar"
+positionWindow $w
+
+if {[tk windowingsystem] ne "aqua"} {
+ ttk::label $w.msg -wraplength 4i -text "This is a demonstration of how to do\
+ a toolbar that is styled correctly and which can be torn off. The\
+ buttons are configured to be \u201Ctoolbar style\u201D buttons by\
+ telling them that they are to use the Toolbutton style. At the left\
+ end of the toolbar is a simple marker that the cursor changes to a\
+ movement icon over; drag that away from the toolbar to tear off the\
+ whole toolbar into a separate toplevel widget. When the dragged-off\
+ toolbar is no longer needed, just close it like any normal toplevel\
+ and it will reattach to the window it was torn off from."
+} else {
+ttk::label $w.msg -wraplength 4i -text "This is a demonstration of how to do\
+ a toolbar that is styled correctly. The buttons are configured to\
+ be \u201Ctoolbar style\u201D buttons by telling them that they are\
+ to use the Toolbutton style."
+}
+
+## Set up the toolbar hull
+set t [frame $w.toolbar] ;# Must be a frame!
+ttk::separator $w.sep
+ttk::frame $t.tearoff -cursor fleur
+if {[tk windowingsystem] ne "aqua"} {
+ ttk::separator $t.tearoff.to -orient vertical
+ ttk::separator $t.tearoff.to2 -orient vertical
+ pack $t.tearoff.to -fill y -expand 1 -padx 2 -side left
+ pack $t.tearoff.to2 -fill y -expand 1 -side left
+}
+ttk::frame $t.contents
+grid $t.tearoff $t.contents -sticky nsew
+grid columnconfigure $t $t.contents -weight 1
+grid columnconfigure $t.contents 1000 -weight 1
+
+if {[tk windowingsystem] ne "aqua"} {
+ ## Bindings so that the toolbar can be torn off and reattached
+ bind $t.tearoff <B1-Motion> [list tearoff $t %X %Y]
+ bind $t.tearoff.to <B1-Motion> [list tearoff $t %X %Y]
+ bind $t.tearoff.to2 <B1-Motion> [list tearoff $t %X %Y]
+ proc tearoff {w x y} {
+ if {[string match $w* [winfo containing $x $y]]} {
+ return
+ }
+ grid remove $w
+ grid remove $w.tearoff
+ wm manage $w
+ wm protocol $w WM_DELETE_WINDOW [list untearoff $w]
+ }
+ proc untearoff {w} {
+ wm forget $w
+ grid $w.tearoff
+ grid $w
+ }
+}
+
+## Toolbar contents
+ttk::button $t.button -text "Button" -style Toolbutton -command [list \
+ $w.txt insert end "Button Pressed\n"]
+ttk::checkbutton $t.check -text "Check" -variable check -style Toolbutton \
+ -command [concat [list $w.txt insert end] {"check is $check\n"}]
+ttk::menubutton $t.menu -text "Menu" -menu $t.menu.m
+ttk::combobox $t.combo -value [lsort [font families]] -state readonly
+menu $t.menu.m
+$t.menu.m add command -label "Just" -command [list $w.txt insert end Just\n]
+$t.menu.m add command -label "An" -command [list $w.txt insert end An\n]
+$t.menu.m add command -label "Example" \
+ -command [list $w.txt insert end Example\n]
+bind $t.combo <<ComboboxSelected>> [list changeFont $w.txt $t.combo]
+proc changeFont {txt combo} {
+ $txt configure -font [list [$combo get] 10]
+}
+
+## Some content for the rest of the toplevel
+text $w.txt -width 40 -height 10
+interp alias {} doInsert {} $w.txt insert end ;# Make bindings easy to write
+
+## Arrange contents
+grid $t.button $t.check $t.menu $t.combo -in $t.contents -padx 2 -sticky ns
+grid $t -sticky ew
+grid $w.sep -sticky ew
+grid $w.msg -sticky ew
+grid $w.txt -sticky nsew
+grid rowconfigure $w $w.txt -weight 1
+grid columnconfigure $w $w.txt -weight 1
+
+## See Code / Dismiss buttons
+set btns [addSeeDismiss $w.buttons $w]
+grid $btns -sticky ew
diff --git a/library/demos/tree.tcl b/library/demos/tree.tcl
new file mode 100644
index 0000000..0946150
--- /dev/null
+++ b/library/demos/tree.tcl
@@ -0,0 +1,96 @@
+# tree.tcl --
+#
+# This demonstration script creates a toplevel window containing a Ttk
+# tree widget.
+#
+# RCS: @(#) $Id: tree.tcl,v 1.2.2.2 2007/10/24 12:59:33 dgp Exp $
+
+if {![info exists widgetDemo]} {
+ error "This script should be run from the \"widget\" demo."
+}
+
+package require Tk
+package require Ttk
+
+set w .tree
+catch {destroy $w}
+toplevel $w
+wm title $w "Directory Browser"
+wm iconname $w "tree"
+positionWindow $w
+
+## Explanatory text
+ttk::label $w.msg -font $font -wraplength 4i -justify left -anchor n -text "Ttk is the new Tk themed widget set. One of the widgets it includes is a tree widget, which allows the user to browse a hierarchical data-set such as a filesystem. The tree widget not only allows for the tree part itself, but it also supports an arbitrary number of additional columns which can show additional data (in this case, the size of the files found in your filesystem). You can also change the width of the columns by dragging the boundary between them."
+pack $w.msg -fill x
+
+## See Code / Dismiss
+pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x
+
+## Code to populate the roots of the tree (can be more than one on Windows)
+proc populateRoots {tree} {
+ foreach dir [lsort -dictionary [file volumes]] {
+ populateTree $tree [$tree insert {} end -text $dir \
+ -values [list $dir directory]]
+ }
+}
+
+## Code to populate a node of the tree
+proc populateTree {tree node} {
+ if {[$tree set $node type] ne "directory"} {
+ return
+ }
+ set path [$tree set $node fullpath]
+ $tree delete [$tree children $node]
+ foreach f [lsort -dictionary [glob -nocomplain -dir $path *]] {
+ set type [file type $f]
+ set id [$tree insert $node end -text [file tail $f] \
+ -values [list $f $type]]
+
+ if {$type eq "directory"} {
+ ## Make it so that this node is openable
+ $tree insert $id 0 -text dummy ;# a dummy
+ $tree item $id -text [file tail $f]/
+
+ } elseif {$type eq "file"} {
+ set size [file size $f]
+ ## Format the file size nicely
+ if {$size >= 1024*1024*1024} {
+ set size [format %.1f\ GB [expr {$size/1024/1024/1024.}]]
+ } elseif {$size >= 1024*1024} {
+ set size [format %.1f\ MB [expr {$size/1024/1024.}]]
+ } elseif {$size >= 1024} {
+ set size [format %.1f\ kB [expr {$size/1024.}]]
+ } else {
+ append size " bytes"
+ }
+ $tree set $id size $size
+ }
+ }
+
+ # Stop this code from rerunning on the current node
+ $tree set $node type processedDirectory
+}
+
+## Create the tree and set it up
+ttk::treeview $w.tree -columns {fullpath type size} -displaycolumns {size} \
+ -yscroll "$w.vsb set" -xscroll "$w.hsb set"
+if {[tk windowingsystem] ne "aqua"} {
+ ttk::scrollbar $w.vsb -orient vertical -command "$w.tree yview"
+ ttk::scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
+} else {
+ scrollbar $w.vsb -orient vertical -command "$w.tree yview"
+ scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
+}
+$w.tree heading \#0 -text "Directory Structure"
+$w.tree heading size -text "File Size"
+$w.tree column size -stretch 0 -width 70
+populateRoots $w.tree
+bind $w.tree <<TreeviewOpen>> {populateTree %W [%W focus]}
+
+## Arrange the tree and its scrollbars in the toplevel
+lower [ttk::frame $w.dummy]
+pack $w.dummy -fill both -expand 1
+grid $w.tree $w.vsb -sticky nsew -in $w.dummy
+grid $w.hsb -sticky nsew -in $w.dummy
+grid columnconfigure $w.dummy 0 -weight 1
+grid rowconfigure $w.dummy 0 -weight 1
diff --git a/library/demos/ttkbut.tcl b/library/demos/ttkbut.tcl
index 0ccca75..53f4ec1 100644
--- a/library/demos/ttkbut.tcl
+++ b/library/demos/ttkbut.tcl
@@ -4,7 +4,7 @@
# simple Ttk widgets, such as labels, labelframes, buttons, checkbuttons and
# radiobuttons.
#
-# RCS: @(#) $Id: ttkbut.tcl,v 1.2.2.2 2007/10/19 14:35:33 dgp Exp $
+# RCS: @(#) $Id: ttkbut.tcl,v 1.2.2.3 2007/10/24 12:59:33 dgp Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -20,13 +20,14 @@ wm title $w "Simple Ttk Widgets"
wm iconname $w "ttkbut"
positionWindow $w
-ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Ttk is the new Tk themed widget set. This is a Ttk themed label, and below are three groups of Ttk widgets in Ttk labelframes. The first group are all buttons that set the current application theme when pressed. The second group contains checkbuttons, with a separator widget between the first pair and the second. The third group has a collection of linked radiobuttons."
+ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Ttk is the new Tk themed widget set. This is a Ttk themed label, and below are three groups of Ttk widgets in Ttk labelframes. The first group are all buttons that set the current application theme when pressed. The second group contains three sets of checkbuttons, with a separator widget between the sets. Note that the \u201cEnabled\u201d button controls whether all the other themed widgets in this toplevel are in the disabled state. The third group has a collection of linked radiobuttons."
pack $w.msg -side top -fill x
## See Code / Dismiss
-pack [addSeeDismiss $w.seeDismiss $w {cheese tomato basil oregano happyness}]\
+pack [addSeeDismiss $w.seeDismiss $w {enabled cheese tomato basil oregano happyness}]\
-side bottom -fill x
+## Add buttons for setting the theme
ttk::labelframe $w.buttons -text "Buttons"
foreach theme [ttk::themes] {
ttk::button $w.buttons.$theme -text $theme \
@@ -34,15 +35,42 @@ foreach theme [ttk::themes] {
pack $w.buttons.$theme -pady 2
}
+## Helper procedure for the top checkbutton
+proc setState {rootWidget exceptThese value} {
+ if {$rootWidget in $exceptThese} {
+ return
+ }
+ ## Non-Ttk widgets (e.g. the toplevel) will fail, so make it silent
+ catch {
+ $rootWidget state $value
+ }
+ ## Recursively invoke on all children of this root that are in the same
+ ## toplevel widget
+ foreach w [winfo children $rootWidget] {
+ if {[winfo toplevel $w] eq [winfo toplevel $rootWidget]} {
+ setState $w $exceptThese $value
+ }
+ }
+}
+
+## Set up the checkbutton group
ttk::labelframe $w.checks -text "Checkbuttons"
+ttk::checkbutton $w.checks.e -text Enabled -variable enabled -command {
+ setState .ttkbut .ttkbut.checks.e \
+ [expr {$enabled ? "!disabled" : "disabled"}]
+}
+set enabled 1
+## See ttk_widget(n) for other possible state flags
+ttk::separator $w.checks.sep1
ttk::checkbutton $w.checks.c1 -text Cheese -variable cheese
ttk::checkbutton $w.checks.c2 -text Tomato -variable tomato
-ttk::separator $w.checks.sep
+ttk::separator $w.checks.sep2
ttk::checkbutton $w.checks.c3 -text Basil -variable basil
ttk::checkbutton $w.checks.c4 -text Oregano -variable oregano
-pack $w.checks.c1 $w.checks.c2 $w.checks.sep $w.checks.c3 $w.checks.c4 \
- -fill x -pady 2
+pack $w.checks.e $w.checks.sep1 $w.checks.c1 $w.checks.c2 $w.checks.sep2 \
+ $w.checks.c3 $w.checks.c4 -fill x -pady 2
+## Set up the radiobutton group
ttk::labelframe $w.radios -text "Radiobuttons"
ttk::radiobutton $w.radios.r1 -text "Great" -variable happyness -value great
ttk::radiobutton $w.radios.r2 -text "Good" -variable happyness -value good
@@ -52,6 +80,7 @@ ttk::radiobutton $w.radios.r5 -text "Awful" -variable happyness -value awful
pack $w.radios.r1 $w.radios.r2 $w.radios.r3 $w.radios.r4 $w.radios.r5 \
-fill x -padx 3 -pady 2
+## Arrange things neatly
pack [ttk::frame $w.f] -fill both -expand 1
lower $w.f
grid $w.buttons $w.checks $w.radios -in $w.f -sticky nwe -pady 2 -padx 3
diff --git a/library/demos/ttkmenu.tcl b/library/demos/ttkmenu.tcl
index 0fc8ced..7bf5c5f 100644
--- a/library/demos/ttkmenu.tcl
+++ b/library/demos/ttkmenu.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a toplevel window containing several Ttk
# menubutton widgets.
#
-# RCS: @(#) $Id: ttkmenu.tcl,v 1.1.2.2 2007/10/19 14:35:33 dgp Exp $
+# RCS: @(#) $Id: ttkmenu.tcl,v 1.1.2.3 2007/10/24 12:59:33 dgp Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -47,6 +47,7 @@ foreach theme [ttk::themes] {
}
pack [ttk::frame $w.f] -fill x
+pack [ttk::frame $w.f1] -fill both -expand yes
lower $w.f
grid anchor $w.f center
diff --git a/library/demos/ttknote.tcl b/library/demos/ttknote.tcl
new file mode 100644
index 0000000..dc2bf71
--- /dev/null
+++ b/library/demos/ttknote.tcl
@@ -0,0 +1,60 @@
+# ttknote.tcl --
+#
+# This demonstration script creates a toplevel window containing a Ttk
+# notebook widget.
+#
+# RCS: @(#) $Id: ttknote.tcl,v 1.2.2.2 2007/10/24 12:59:33 dgp Exp $
+
+if {![info exists widgetDemo]} {
+ error "This script should be run from the \"widget\" demo."
+}
+
+package require Tk
+package require Ttk
+
+set w .ttknote
+catch {destroy $w}
+toplevel $w
+wm title $w "Ttk Notebook Widget"
+wm iconname $w "ttknote"
+positionWindow $w
+
+## See Code / Dismiss
+pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x
+
+ttk::frame $w.f
+pack $w.f -fill both -expand 1
+set w $w.f
+
+## Make the notebook and set up Ctrl+Tab traversal
+ttk::notebook $w.note
+pack $w.note -fill both -expand 1 -padx 2 -pady 3
+ttk::notebook::enableTraversal $w.note
+
+## Popuplate the first pane
+ttk::frame $w.note.msg
+ttk::label $w.note.msg.m -font $font -wraplength 4i -justify left -anchor n -text "Ttk is the new Tk themed widget set. One of the widgets it includes is the notebook widget, which provides a set of tabs that allow the selection of a group of panels, each with distinct content. They are a feature of many modern user interfaces. Not only can the tabs be selected with the mouse, but they can also be switched between using Ctrl+Tab when the notebook page heading itself is selected. Note that the second tab is disabled, and cannot be selected."
+ttk::button $w.note.msg.b -text "Neat!" -underline 0 -command {
+ set neat "Yeah, I know..."
+ after 500 {set neat {}}
+}
+bind $w <Alt-n> "focus $w.note.msg.b; $w.note.msg.b invoke"
+ttk::label $w.note.msg.l -textvariable neat
+$w.note add $w.note.msg -text "Description" -underline 0 -padding 2
+grid $w.note.msg.m - -sticky new -pady 2
+grid $w.note.msg.b $w.note.msg.l -pady {2 4}
+grid rowconfigure $w.note.msg 1 -weight 1
+grid columnconfigure $w.note.msg {0 1} -weight 1 -uniform 1
+
+## Populate the second pane. Note that the content doesn't really matter
+ttk::frame $w.note.disabled
+$w.note add $w.note.disabled -text "Disabled" -state disabled
+
+## Popuplate the third pane
+ttk::frame $w.note.editor
+$w.note add $w.note.editor -text "Text Editor" -underline 0
+text $w.note.editor.t -width 40 -height 10 -wrap char \
+ -yscroll "$w.note.editor.s set"
+scrollbar $w.note.editor.s -orient vertical -command "$w.note.editor.t yview"
+pack $w.note.editor.s -side right -fill y -padx {0 2} -pady 2
+pack $w.note.editor.t -fill both -expand 1 -pady 2 -padx {2 0}
diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl
index ecbfad8..7664b58 100644
--- a/library/demos/ttkpane.tcl
+++ b/library/demos/ttkpane.tcl
@@ -2,7 +2,7 @@
#
# This demonstration script creates a Ttk pane with some content.
#
-# RCS: @(#) $Id: ttkpane.tcl,v 1.1.2.2 2007/10/19 14:35:33 dgp Exp $
+# RCS: @(#) $Id: ttkpane.tcl,v 1.1.2.3 2007/10/24 12:59:33 dgp Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -14,7 +14,7 @@ package require Ttk
set w .ttkpane
catch {destroy $w}
toplevel $w
-wm title $w "Ttk Menu Buttons"
+wm title $w "Themed Nested Panes"
wm iconname $w "ttkpane"
positionWindow $w
@@ -24,6 +24,9 @@ pack $w.msg [ttk::separator $w.msgSep] -side top -fill x
## See Code / Dismiss
pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x
+ttk::frame $w.f
+pack $w.f -fill both -expand 1
+set w $w.f
ttk::panedwindow $w.outer -orient horizontal
$w.outer add [ttk::panedwindow $w.outer.inLeft -orient vertical]
$w.outer add [ttk::panedwindow $w.outer.inRight -orient vertical]
@@ -31,6 +34,11 @@ $w.outer.inLeft add [ttk::labelframe $w.outer.inLeft.top -text Button]
$w.outer.inLeft add [ttk::labelframe $w.outer.inLeft.bot -text Clocks]
$w.outer.inRight add [ttk::labelframe $w.outer.inRight.top -text Progress]
$w.outer.inRight add [ttk::labelframe $w.outer.inRight.bot -text Text]
+if {[tk windowingsystem] eq "aqua"} {
+ foreach i [list inLeft.top inLeft.bot inRight.top inRight.bot] {
+ $w.outer.$i configure -padding 3
+ }
+}
# Fill the button pane
ttk::button $w.outer.inLeft.top.b -text "Press Me" -command {
@@ -78,18 +86,24 @@ pack $w.outer.inRight.top.progress -fill both -expand 1
$w.outer.inRight.top.progress start
# Fill the text pane
+if {[tk windowingsystem] ne "aqua"} {
+ # The trick with the ttk::frame makes the text widget look like it fits with
+ # the current Ttk theme despite not being a themed widget itself. It is done
+ # by styling the frame like an entry, turning off the border in the text
+ # widget, and putting the text widget in the frame with enough space to allow
+ # the surrounding border to show through (2 pixels seems to be enough).
+ ttk::frame $w.outer.inRight.bot.f -style TEntry
+ text $w.txt -wrap word -yscroll "$w.sb set" -width 30 -borderwidth 0
+ pack $w.txt -fill both -expand 1 -in $w.outer.inRight.bot.f -pady 2 -padx 2
+ ttk::scrollbar $w.sb -orient vertical -command "$w.txt yview"
+ pack $w.sb -side right -fill y -in $w.outer.inRight.bot
+ pack $w.outer.inRight.bot.f -fill both -expand 1
+ pack $w.outer -fill both -expand 1
+} else {
+ text $w.txt -wrap word -yscroll "$w.sb set" -width 30 -borderwidth 0
+ scrollbar $w.sb -orient vertical -command "$w.txt yview"
+ pack $w.sb -side right -fill y -in $w.outer.inRight.bot
+ pack $w.txt -fill both -expand 1 -in $w.outer.inRight.bot
+ pack $w.outer -fill both -expand 1 -padx 10 -pady {6 10}
+}
-# The trick with the ttk::frame makes the text widget look like it fits with
-# the current Ttk theme despite not being a themed widget itself. It is done
-# by styling the frame like an entry, turning off the border in the text
-# widget, and putting the text widget in the frame with enough space to allow
-# the surrounding border to show through (2 pixels seems to be enough).
-ttk::frame $w.outer.inRight.bot.f -style TEntry
-text $w.txt -wrap word -yscroll "$w.sb set" -width 30 -borderwidth 0
-pack $w.txt -fill both -expand 1 -in $w.outer.inRight.bot.f -pady 2 -padx 2
-
-ttk::scrollbar $w.sb -orient vertical -command "$w.txt yview"
-pack $w.sb -side right -fill y -in $w.outer.inRight.bot
-pack $w.outer.inRight.bot.f -fill both -expand 1
-
-pack $w.outer -fill both -expand 1
diff --git a/library/demos/ttkprogress.tcl b/library/demos/ttkprogress.tcl
new file mode 100644
index 0000000..9594f26
--- /dev/null
+++ b/library/demos/ttkprogress.tcl
@@ -0,0 +1,49 @@
+# ttkprogress.tcl --
+#
+# This demonstration script creates several progress bar widgets.
+#
+# RCS: @(#) $Id: ttkprogress.tcl,v 1.2.2.2 2007/10/24 12:59:33 dgp Exp $
+
+if {![info exists widgetDemo]} {
+ error "This script should be run from the \"widget\" demo."
+}
+
+package require Tk
+package require Ttk
+
+set w .ttkprogress
+catch {destroy $w}
+toplevel $w
+wm title $w "Progress Bar Demonstration"
+wm iconname $w "ttkprogress"
+positionWindow $w
+
+ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Below are two progress bars. The top one is a \u201Cdeterminate\u201D progress bar, which is used for showing how far through a defined task the program has got. The bottom one is an \u201Cindeterminate\u201D progress bar, which is used to show that the program is busy but does not know how long for. Both are run here in self-animated mode, which can be turned on and off using the buttons underneath."
+pack $w.msg -side top -fill x
+
+## See Code / Dismiss buttons
+set btns [addSeeDismiss $w.buttons $w]
+pack $btns -side bottom -fill x
+
+ttk::frame $w.f
+pack $w.f -fill both -expand 1
+set w $w.f
+
+proc doBars {op args} {
+ foreach w $args {
+ $w $op
+ }
+}
+ttk::progressbar $w.p1 -mode determinate
+ttk::progressbar $w.p2 -mode indeterminate
+ttk::button $w.start -text "Start Progress" -command [list \
+ doBars start $w.p1 $w.p2]
+ttk::button $w.stop -text "Stop Progress" -command [list \
+ doBars stop $w.p1 $w.p2]
+
+grid $w.p1 - -pady 5 -padx 10
+grid $w.p2 - -pady 5 -padx 10
+grid $w.start $w.stop -padx 10 -pady 5
+grid configure $w.start -sticky e
+grid configure $w.stop -sticky w
+grid columnconfigure $w all -weight 1
diff --git a/library/demos/widget b/library/demos/widget
index 2c1610c..f3be2c5 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -10,7 +10,7 @@ exec wish "$0" "$@"
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.
#
-# RCS: @(#) $Id: widget,v 1.29.2.4 2007/10/19 14:35:33 dgp Exp $
+# RCS: @(#) $Id: widget,v 1.29.2.5 2007/10/24 12:59:33 dgp Exp $
package require Tcl 8.5
package require Tk 8.5
@@ -45,6 +45,9 @@ if {"defaultFont" ni [font names]} {
font create titleFont {*}[font configure TkDefaultFont] -weight bold
font create statusFont {*}[font configure TkDefaultFont]
font create varsFont {*}[font configure TkDefaultFont]
+ if {[tk windowingsystem] eq "aqua"} {
+ font configure titleFont -size 17
+ }
} else {
font create mainFont -family Helvetica -size 12
font create fixedFont -family Courier -size 10
@@ -82,13 +85,15 @@ image create photo ::img::print -format GIF -data {
ryhH5pgnEQA7
}
-image create photo ::img::new -format GIF -data {
+# Note that this is run through the message catalog! This is because this is
+# actually an image of a word.
+image create photo ::img::new -format GIF -data [mc {
R0lGODlhHgAOALMPALMAANyIiOu7u8dEROaqqvru7sxVVeGZmbgREfXd3b0iItZ3
d8IzM9FmZvDMzP///yH5BAEAAA8ALAAAAAAeAA4AAASa8MlJq7046827WVOCHEkw
nANhUgJlEBIABJIwL3K+4IcUALCHjfbItYZDSgJgkBiYPmBMAUAkkLPKs/BAyLgM
wAQwOAAY2ByCaw4QAFQSoDEePJ6DmU1xInYZTw5nOEFFdgVUelkVDTIMd3AKFGQ1
MgI2AwEmQW8APZ0gdRONAks5nhIFVVxdAAkUAS2pAVwFl7ITB4UqHb0XEQA7
-}
+}]
#----------------------------------------------------------------
# The code below create the main window, consisting of a menu bar and a text
@@ -110,11 +115,18 @@ if {[tk windowingsystem] eq "aqua"} {
menu .menuBar.file -tearoff 0
::tk::AmpMenuArgs .menuBar.file add command -label [mc "&About..."] \
-command {aboutBox} -accelerator [mc "<F1>"]
+ bind . <F1> {aboutBox}
.menuBar.file add sep
- ::tk::AmpMenuArgs .menuBar.file add command -label [mc "&Quit"] \
- -command {exit} -accelerator [mc "Meta-Q"]
- bind . <[mc "Meta-q"]> {exit}
- bind . <F1> {aboutBox}
+ if {[string match win* [tk windowingsystem]]} {
+ # Windows doesn't usually have a Meta key
+ ::tk::AmpMenuArgs .menuBar.file add command -label [mc "&Quit"] \
+ -command {exit} -accelerator [mc "Ctrl+Q"]
+ bind . <[mc "Control-q"]> {exit}
+ } else {
+ ::tk::AmpMenuArgs .menuBar.file add command -label [mc "&Quit"] \
+ -command {exit} -accelerator [mc "Meta-Q"]
+ bind . <[mc "Meta-q"]> {exit}
+ }
}
. configure -menu .menuBar
@@ -218,14 +230,16 @@ set lastLine ""
# passing it through the message catalog to allow for localization.
# Lines starting with @@ are formatting directives (insert title, insert
# demo hyperlink, begin newline, or change style) and all other lines
-# are literal strings to be inserted. Blank lines are ignored.
+# are literal strings to be inserted. Substitutions are performed,
+# allowing processing pieces through the message catalog. Blank lines
+# are ignored.
#
proc addFormattedText {formattedText} {
set style normal
set isNL 1
set demoCount 0
set new 0
- foreach line [split [mc $formattedText] \n] {
+ foreach line [split $formattedText \n] {
set line [string trim $line]
if {$line eq ""} {
continue
@@ -243,7 +257,8 @@ proc addFormattedText {formattedText} {
set isNL 1
}
subtitle {
- .t insert end "\n" {} [mc $values] subtitle " \n " demospace
+ .t insert end "\n" {} [mc $values] subtitle \
+ " \n " demospace
set demoCount 0
}
demo {
@@ -269,7 +284,7 @@ proc addFormattedText {formattedText} {
.t insert end " " $style
}
set isNL 0
- .t insert end $line $style
+ .t insert end [mc $line] $style
}
}
@@ -307,16 +322,20 @@ addFormattedText {
@@new
@@demo ttkbut The simple Themed Tk widgets
- @@subtitle Listboxes
+ @@subtitle Listboxes and Trees
@@demo states The 50 states
@@demo colors Colors: change the color scheme for the application
@@demo sayings A collection of famous and infamous sayings
+ @@new
+ @@demo tree A directory browser tree
- @@subtitle Entries and Spin-boxes
+ @@subtitle Entries, Spin-boxes and Combo-boxes
@@demo entry1 Entries without scrollbars
@@demo entry2 Entries with scrollbars
@@demo entry3 Validated entries and password fields
@@demo spin Spin-boxes
+ @@new
+ @@demo combo Combo-boxes
@@demo form Simple Rolodex-like form
@@subtitle Text
@@ -337,21 +356,27 @@ addFormattedText {
@@demo floor A building floor plan
@@demo cscroll A simple scrollable canvas
- @@subtitle Scales
+ @@subtitle Scales and Progress Bars
@@demo hscale Horizontal scale
@@demo vscale Vertical scale
+ @@new
+ @@demo ttkprogress Progress bar
- @@subtitle Paned Windows
+ @@subtitle Paned Windows and Notebooks
@@demo paned1 Horizontal paned window
@@demo paned2 Vertical paned window
@@new
@@demo ttkpane Themed nested panes
+ @@new
+ @@demo ttknote Notebook widget
- @@subtitle Menus
+ @@subtitle Menus and Toolbars
@@demo menu Menus and cascades (sub-menus)
@@demo menubu Menu-buttons
@@new
@@demo ttkmenu Themed menu buttons
+ @@new
+ @@demo toolbar Themed toolbar
@@subtitle Common Dialogs
@@demo msgbox Message boxes
@@ -696,7 +721,7 @@ proc PrintTextWin32 {filename} {
#
proc aboutBox {} {
tk_messageBox -icon info -type ok -title [mc "About Widget Demo"] \
- -message "[mc {Tk widget demonstration application}]
+ -message "[mc {Tk widget demonstration application}]
[mc {Copyright (c) %s} {1996-1997 Sun Microsystems, Inc.}]
[mc {Copyright (c) %s} {1997-2000 Ajuba Solutions, Inc.}]
diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl
index e6659ff..4953197 100644
--- a/library/ttk/aquaTheme.tcl
+++ b/library/ttk/aquaTheme.tcl
@@ -1,5 +1,5 @@
#
-# $Id: aquaTheme.tcl,v 1.2.2.2 2007/10/19 14:35:33 dgp Exp $
+# $Id: aquaTheme.tcl,v 1.2.2.3 2007/10/24 12:59:33 dgp Exp $
#
# Aqua theme (OSX native look and feel)
#
@@ -35,6 +35,12 @@ namespace eval ttk::theme::aqua {
ttk::style configure TNotebook -tabposition n -padding {20 12}
ttk::style configure TNotebook.Tab -padding {10 2 10 2}
+
+ # Adjust combobox post position to ensure the box is
+ # directly under 'entry square'
+ #
+ ttk::style configure TCombobox -postoffset {3 -2 -6 0}
+
# Treeview:
ttk::style configure Treeview -rowheight 18
ttk::style configure Heading -font TkHeadingFont
diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl
index 2757832..fb189b9 100644
--- a/library/ttk/combobox.tcl
+++ b/library/ttk/combobox.tcl
@@ -1,5 +1,5 @@
#
-# $Id: combobox.tcl,v 1.3.2.1 2007/09/17 15:22:01 dgp Exp $
+# $Id: combobox.tcl,v 1.3.2.2 2007/10/24 12:59:34 dgp Exp $
#
# Combobox bindings.
#
@@ -11,7 +11,6 @@
namespace eval ttk::combobox {
variable Values ;# Values($cb) is -listvariable of listbox widget
-
variable State
set State(entryPress) 0
}
@@ -49,34 +48,23 @@ bind ComboboxListbox <KeyPress-Escape> { ttk::combobox::LBCancel %W }
bind ComboboxListbox <KeyPress-Tab> { ttk::combobox::LBTab %W next }
bind ComboboxListbox <<PrevWindow>> { ttk::combobox::LBTab %W prev }
bind ComboboxListbox <Destroy> { ttk::combobox::LBCleanup %W }
-# Default behavior is to follow selection on mouseover
-bind ComboboxListbox <Motion> {
- %W selection clear 0 end
- %W activate @%x,%y
- %W selection set @%x,%y
-}
-
-# The combobox has a global grab active when the listbox is posted,
-# but on Windows and OSX that doesn't prevent the user from interacting
-# with other applications. We need to popdown the listbox when this happens.
-#
-# On OSX, the listbox gets a <Deactivate> event. This doesn't happen
-# on Windows or X11, but it does get a <FocusOut> event. However on OSX
-# in Tk 8.5, the listbox gets spurious <FocusOut> events when the listbox
-# is posted (see #1349811).
-#
-# The following seems to work:
-#
+bind ComboboxListbox <Motion> { ttk::combobox::LBHover %W %x %y }
switch -- [tk windowingsystem] {
win32 {
+ # Dismiss listbox when user switches to a different application.
+ # NB: *only* do this on Windows (see #1814778)
bind ComboboxListbox <FocusOut> { ttk::combobox::LBCancel %W }
}
- aqua {
- bind ComboboxListbox <Deactivate> { ttk::combobox::LBCancel %W }
- }
}
+### Combobox popdown window bindings.
+#
+bind ComboboxPopdown <Map> { ttk::combobox::MapPopdown %W }
+bind ComboboxPopdown <Unmap> { ttk::combobox::UnmapPopdown %W }
+bind ComboboxPopdown <ButtonPress> \
+ { ttk::combobox::Unpost [winfo parent %W] }
+
### Option database settings.
#
@@ -98,8 +86,7 @@ switch -- [tk windowingsystem] {
### Binding procedures.
#
-## Press $mode $x $y --
-# ButtonPress binding for comboboxes.
+## Press $mode $x $y -- ButtonPress binding for comboboxes.
# Either post/unpost the listbox, or perform Entry widget binding,
# depending on widget state and location of button press.
#
@@ -120,12 +107,11 @@ proc ttk::combobox::Press {mode w x y} {
default { ttk::entry::Press $w $x }
}
} else {
- TogglePost $w
+ Post $w
}
}
-## Drag --
-# B1-Motion binding for comboboxes.
+## Drag -- B1-Motion binding for comboboxes.
# If the initial ButtonPress event was handled by Entry binding,
# perform Entry widget drag binding; otherwise nothing.
#
@@ -174,12 +160,9 @@ proc ttk::combobox::Scroll {cb dir} {
#
proc ttk::combobox::LBSelected {lb} {
set cb [LBMaster $lb]
- set selection [$lb curselection]
+ LBSelect $lb
Unpost $cb
focus $cb
- if {[llength $selection] == 1} {
- SelectEntry $cb [lindex $selection 0]
- }
}
## LBCancel --
@@ -189,8 +172,7 @@ proc ttk::combobox::LBCancel {lb} {
Unpost [LBMaster $lb]
}
-## LBTab --
-# Tab key binding for combobox listbox:
+## LBTab -- Tab key binding for combobox listbox.
# Set the selection, and navigate to next/prev widget.
#
proc ttk::combobox::LBTab {lb dir} {
@@ -201,19 +183,47 @@ proc ttk::combobox::LBTab {lb dir} {
}
if {$newFocus ne ""} {
- LBSelected $lb
+ LBSelect $lb
+ Unpost $cb
# The [grab release] call in [Unpost] queues events that later
# re-set the focus. [update] to make sure these get processed first:
update
- tk::TabToWindow $newFocus
+ ttk::traverseTo $newFocus
}
}
+## LBHover -- <Motion> binding for combobox listbox.
+# Follow selection on mouseover.
+#
+proc ttk::combobox::LBHover {w x y} {
+ $w selection clear 0 end
+ $w activate @$x,$y
+ $w selection set @$x,$y
+}
+
+## MapPopdown -- <Map> binding for ComboboxPopdown
+#
+proc ttk::combobox::MapPopdown {w} {
+ [winfo parent $w] state pressed
+ ttk::globalGrab $w
+}
+
+## UnmapPopdown -- <Unmap> binding for ComboboxPopdown
+#
+proc ttk::combobox::UnmapPopdown {w} {
+ [winfo parent $w] state !pressed
+ ttk::releaseGrab $w
+}
+
+###
+#
+
namespace eval ::ttk::combobox {
# @@@ Until we have a proper native scrollbar on Aqua, use
# @@@ the regular Tk one. Use ttk::scrollbar on other platforms.
- if {[tk windowingsystem] ne "aqua"} {
- namespace import -force ::ttk::scrollbar
+ variable scrollbar ttk::scrollbar
+ if {[tk windowingsystem] eq "aqua"} {
+ set scrollbar ::scrollbar
}
}
@@ -222,10 +232,13 @@ namespace eval ::ttk::combobox {
# creating it if necessary.
#
proc ttk::combobox::PopdownWindow {cb} {
- if {![winfo exists $cb.popdown]} {
- set popdown [PopdownToplevel $cb.popdown]
+ variable scrollbar
- scrollbar $popdown.sb \
+ set popdown $cb.popdown
+ if {![winfo exists $popdown]} {
+ PopdownToplevel $popdown
+
+ $scrollbar $popdown.sb \
-orient vertical -command [list $popdown.l yview]
listbox $popdown.l \
-listvariable ttk::combobox::Values($cb) \
@@ -242,51 +255,67 @@ proc ttk::combobox::PopdownWindow {cb} {
grid columnconfigure $popdown 0 -weight 1
grid rowconfigure $popdown 0 -weight 1
}
- return $cb.popdown
+ # to handle reparented frame/toplevel, recalculate transient each time
+ switch -- [tk windowingsystem] {
+ x11 {
+ wm transient $popdown [winfo toplevel [winfo parent $popdown]]
+ }
+ win32 {
+ wm transient $popdown [winfo toplevel [winfo parent $popdown]]
+ }
+ }
+ return $popdown
}
## PopdownToplevel -- Create toplevel window for the combobox popdown
#
+# NOTES:
+# On Windows: setting [wm transient] prevents the parent
+# toplevel from becoming inactive when the popdown is posted
+# (Tk 8.4.8+)
+#
+# On X11: WM_TRANSIENT_FOR on override-redirect windows
+# may be used by compositing managers and by EWMH-aware
+# window managers (even though the older ICCCM spec says
+# it's meaningless).
+#
+# On OSX: for MacWindowStyle "help", "noActivates" prevents
+# the parent toplevel from deactivating when the popdown
+# is posted, and is necessary for the popdown to receive
+# mouse events. "hideOnSuspend" makes the popdown disappear
+# (resp. reappear) when the parent toplevel is deactivated.
+#
proc ttk::combobox::PopdownToplevel {w} {
- toplevel $w -class Popdown
+ if {![winfo exists $w]} {
+ toplevel $w -class ComboboxPopdown
+ }
wm withdraw $w
- wm overrideredirect $w true
- wm transient $w [winfo toplevel [winfo parent $w]]
switch -- [tk windowingsystem] {
default -
x11 {
$w configure -relief solid -borderwidth 1
+ wm overrideredirect $w true
}
win32 {
$w configure -relief solid -borderwidth 1
+ wm overrideredirect $w true
}
aqua {
$w configure -relief solid -borderwidth 0
- # @@@ tk::unsupported::MacWindowStyle style $w help none
+ tk::unsupported::MacWindowStyle style $w \
+ help {noActivates hideOnSuspend}
}
}
return $w
}
-## Post $cb --
-# Pop down the associated listbox.
+## ConfigureListbox --
+# Set listbox values, selection, height, and scrollbar visibility
+# from current combobox values.
#
-proc ttk::combobox::Post {cb} {
- variable State
+proc ttk::combobox::ConfigureListbox {cb} {
variable Values
- # Don't do anything if disabled:
- #
- $cb instate disabled { return }
-
- # Run -postcommand callback:
- #
- uplevel #0 [$cb cget -postcommand]
-
- # Combobox is in 'pressed' state while listbox posted:
- #
- $cb state pressed
-
set popdown [PopdownWindow $cb]
set values [$cb cget -values]
set current [$cb current]
@@ -298,7 +327,6 @@ proc ttk::combobox::Post {cb} {
$popdown.l selection set $current
$popdown.l activate $current
$popdown.l see $current
- # Should allow user to control listbox height
set height [llength $values]
if {$height > [$cb cget -height]} {
set height [$cb cget -height]
@@ -307,61 +335,64 @@ proc ttk::combobox::Post {cb} {
grid remove $popdown.sb
}
$popdown.l configure -height $height
- update idletasks
+}
- # Position listbox (@@@ factor with menubutton::PostPosition
- #
+## PlacePopdown --
+# Set popdown window geometry.
+#
+# @@@TODO: factor with menubutton::PostPosition
+#
+proc ttk::combobox::PlacePopdown {cb popdown} {
set x [winfo rootx $cb]
set y [winfo rooty $cb]
set w [winfo width $cb]
set h [winfo height $cb]
- if {[tk windowingsystem] eq "aqua"} {
- # Adjust for platform-specific bordering to ensure the box is
- # directly under actual 'entry square'
- set xoff 3
- set yoff 2
- incr x $xoff
- set w [expr {$w - $xoff*2}]
- } else {
- set yoff 0
+ set postoffset [ttk::style lookup TCombobox -postoffset {} {0 0 0 0}]
+ foreach var {x y w h} delta $postoffset {
+ incr $var $delta
}
set H [winfo reqheight $popdown]
if {$y + $h + $H > [winfo screenheight $popdown]} {
- set Y [expr {$y - $H - $yoff}]
+ set Y [expr {$y - $H}]
} else {
- set Y [expr {$y + $h - $yoff}]
+ set Y [expr {$y + $h}]
}
wm geometry $popdown ${w}x${H}+${x}+${Y}
+}
+
+## Post $cb --
+# Pop down the associated listbox.
+#
+proc ttk::combobox::Post {cb} {
+ # Don't do anything if disabled:
+ #
+ $cb instate disabled { return }
+
+ # ASSERT: ![$cb instate pressed]
+
+ # Run -postcommand callback:
+ #
+ uplevel #0 [$cb cget -postcommand]
+
+ set popdown [PopdownWindow $cb]
+ ConfigureListbox $cb
+ update idletasks
+ PlacePopdown $cb $popdown
# Post the listbox:
#
wm deiconify $popdown
raise $popdown
- # @@@ Workaround for TrackElementState bug:
- event generate $cb <ButtonRelease-1>
- # /@@@
- ttk::globalGrab $cb
focus $popdown.l
}
## Unpost $cb --
-# Unpost the listbox, restore focus to combobox widget.
+# Unpost the listbox.
#
proc ttk::combobox::Unpost {cb} {
- $cb state !pressed
- ttk::releaseGrab $cb
- if {[winfo exists $cb.popdown]} {
- wm withdraw $cb.popdown
- }
- focus $cb
-}
-
-## TogglePost $cb --
-# Post the listbox if unposted, unpost otherwise.
-#
-proc ttk::combobox::TogglePost {cb} {
- if {[$cb instate pressed]} { Unpost $cb } { Post $cb }
+ wm withdraw $cb.popdown
+ grab release $cb.popdown ;# in case of stuck or unexpected grab [#1239190]
}
## LBMaster $lb --
@@ -371,6 +402,17 @@ proc ttk::combobox::LBMaster {lb} {
winfo parent [winfo parent $lb]
}
+## LBSelect $lb --
+# Transfer listbox selection to combobox value.
+#
+proc ttk::combobox::LBSelect {lb} {
+ set cb [LBMaster $lb]
+ set selection [$lb curselection]
+ if {[llength $selection] == 1} {
+ SelectEntry $cb [lindex $selection 0]
+ }
+}
+
## LBCleanup $lb --
# <Destroy> binding for combobox listboxes.
# Cleans up by unsetting the linked textvariable.
@@ -379,7 +421,6 @@ proc ttk::combobox::LBMaster {lb} {
# because the widget command is already gone when this binding fires).
# [winfo parent] still works, fortunately.
#
-
proc ttk::combobox::LBCleanup {lb} {
variable Values
unset Values([LBMaster $lb])
diff --git a/library/ttk/fonts.tcl b/library/ttk/fonts.tcl
index 8aa898d..83e19b5 100644
--- a/library/ttk/fonts.tcl
+++ b/library/ttk/fonts.tcl
@@ -1,5 +1,5 @@
#
-# $Id: fonts.tcl,v 1.4.2.1 2007/10/19 14:35:33 dgp Exp $
+# $Id: fonts.tcl,v 1.4.2.2 2007/10/24 12:59:35 dgp Exp $
#
# Font specifications.
#
@@ -7,23 +7,16 @@
# symbolic fonts based on the current platform:
#
# TkDefaultFont -- default for GUI items not otherwise specified
-# TkTextFont -- font for user text (entry, listbox, others). [not in #145]
-# TkHeadingFont -- headings (column headings, etc) [not in #145]
+# TkTextFont -- font for user text (entry, listbox, others)
+# TkFixedFont -- standard fixed width font
+# TkHeadingFont -- headings (column headings, etc)
# TkCaptionFont -- dialog captions (primary text in alert dialogs, etc.)
# TkTooltipFont -- font to use for tooltip windows
+# TkIconFont -- font to use for icon captions
+# TkMenuFont -- used to use for menu items
#
-# This is a temporary solution until TIP #145 is implemented.
-#
-# Symbolic fonts listed in TIP #145:
-#
-# TkDefaultFont -- the default for all GUI items not otherwise specified.
-# TkFixedFont -- standard fixed width font [not used by default]
-# TkMenuFont -- used for menu items [not used by default]
-# TkCaptionFont -- used for window and dialog caption bars [different meaning]
-# TkSmallCaptionFont -- captions on contained windows or tool dialogs [not used]
-# TkIconFont -- font in use for icon captions [not used by default]
-# TkTooltipFont -- font to use for tooltip windows
-#
+# In Tk 8.5, some of these fonts may be provided by the TIP#145 implementation
+# (On Windows and Mac OS X as of Oct 2007).
#
# +++ Platform notes:
#
@@ -51,13 +44,7 @@
# Note that the font for column headings (TkHeadingFont) is
# _smaller_ than the default font.
#
-# There's also a GetThemeFont() Appearance Manager API call
-# for looking up kThemeSystemFont dynamically.
-#
-# Mac classic:
-# Don't know, can't find *anything* on the Web about Mac pre-OSX.
-# Might have used Geneva. Doesn't matter, this platform
-# isn't supported anymore anyway.
+# There does not appear to be any recommendations for fixed-width fonts.
#
# X11:
# Need a way to tell if Xft is enabled or not.
@@ -75,7 +62,6 @@
namespace eval ttk {
-
set tip145 [catch {font create TkDefaultFont}]
catch {font create TkTextFont}
catch {font create TkHeadingFont}
@@ -86,6 +72,7 @@ catch {font create TkIconFont}
catch {font create TkMenuFont}
catch {font create TkSmallCaptionFont}
+if {!$tip145} {
variable F ;# miscellaneous platform-specific font parameters
switch -- [tk windowingsystem] {
win32 {
@@ -105,25 +92,25 @@ switch -- [tk windowingsystem] {
}
set F(size) 8
- if {!$tip145} {
- font configure TkDefaultFont -family $F(family) -size $F(size)
- font configure TkTextFont -family $F(family) -size $F(size)
- font configure TkHeadingFont -family $F(family) -size $F(size)
- font configure TkCaptionFont -family $F(family) -size $F(size) \
- -weight bold
- font configure TkTooltipFont -family $F(family) -size $F(size)
- font configure TkFixedFont -family Courier -size 10
- font configure TkIconFont -family $F(family) -size $F(size)
- font configure TkMenuFont -family $F(family) -size $F(size)
- font configure TkSmallCaptionFont -family $F(family) -size $F(size)
- }
+ font configure TkDefaultFont -family $F(family) -size $F(size)
+ font configure TkTextFont -family $F(family) -size $F(size)
+ font configure TkHeadingFont -family $F(family) -size $F(size)
+ font configure TkCaptionFont -family $F(family) -size $F(size) \
+ -weight bold
+ font configure TkTooltipFont -family $F(family) -size $F(size)
+ font configure TkFixedFont -family Courier -size 10
+ font configure TkIconFont -family $F(family) -size $F(size)
+ font configure TkMenuFont -family $F(family) -size $F(size)
+ font configure TkSmallCaptionFont -family $F(family) -size $F(size)
}
aqua {
set F(family) "Lucida Grande"
set F(fixed) "Monaco"
+ set F(menusize) 14
set F(size) 13
set F(viewsize) 12
set F(smallsize) 11
+ set F(labelsize) 10
set F(fixedsize) 9
font configure TkDefaultFont -family $F(family) -size $F(size)
@@ -131,11 +118,11 @@ switch -- [tk windowingsystem] {
font configure TkHeadingFont -family $F(family) -size $F(smallsize)
font configure TkCaptionFont -family $F(family) -size $F(size) \
-weight bold
- font configure TkTooltipFont -family $F(family) -size $F(viewsize)
+ font configure TkTooltipFont -family $F(family) -size $F(smallsize)
font configure TkFixedFont -family $F(fixed) -size $F(fixedsize)
font configure TkIconFont -family $F(family) -size $F(size)
- font configure TkMenuFont -family $F(family) -size $F(size)
- font configure TkSmallCaptionFont -family $F(family) -size $F(fixedsize)
+ font configure TkMenuFont -family $F(family) -size $F(menusize)
+ font configure TkSmallCaptionFont -family $F(family) -size $F(labelsize)
}
default -
x11 {
@@ -165,6 +152,7 @@ switch -- [tk windowingsystem] {
}
}
unset -nocomplain F
+}
}
diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl
index 8019303..1ddda1a 100644
--- a/library/ttk/utils.tcl
+++ b/library/ttk/utils.tcl
@@ -1,5 +1,5 @@
#
-# $Id: utils.tcl,v 1.3 2006/11/27 06:53:55 jenglish Exp $
+# $Id: utils.tcl,v 1.3.2.1 2007/10/24 12:59:35 dgp Exp $
#
# Utilities for widget implementations.
#
@@ -17,18 +17,6 @@ proc ttk::takefocus {w} {
expr {[$w instate !disabled] && [winfo viewable $w]}
}
-# ttk::traverseTo $w --
-# Set the keyboard focus to the specified window.
-#
-proc ttk::traverseTo {w} {
- set focus [focus]
- if {$focus ne ""} {
- event generate $focus <<TraverseOut>>
- }
- focus $w
- event generate $w <<TraverseIn>>
-}
-
## ttk::traverseTo $w --
# Set the keyboard focus to the specified window.
#
@@ -127,6 +115,13 @@ namespace eval ttk {
proc ttk::SaveGrab {w} {
variable Grab
+ if {[info exists Grab($w)]} {
+ # $w is already on the grab stack.
+ # This should not happen, but bail out in case it does anyway:
+ #
+ return
+ }
+
set restoreGrab [set restoreFocus ""]
set grabbed [grab current $w]
diff --git a/macosx/Wish.xcode/project.pbxproj b/macosx/Wish.xcode/project.pbxproj
index 6f51c88..3c1b3a4 100644
--- a/macosx/Wish.xcode/project.pbxproj
+++ b/macosx/Wish.xcode/project.pbxproj
@@ -595,9 +595,14 @@
/* Begin PBXFileReference section */
8DD76FB20486AB0100D96B5E /* tktest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tktest; sourceTree = BUILT_PRODUCTS_DIR; };
- F9099B8A0CC67D30005A9580 /* textpeer.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = textpeer.tcl; sourceTree = "<group>"; };
- F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ttkbut.tcl; sourceTree = "<group>"; };
+ F9099B8A0CC67D30005A9580 /* textpeer.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textpeer.tcl; sourceTree = "<group>"; };
+ F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttkbut.tcl; sourceTree = "<group>"; };
F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = "<group>"; };
+ F936FCD70CCD984500716967 /* ttkprogress.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttkprogress.tcl; sourceTree = "<group>"; };
+ F936FCD80CCD984600716967 /* tree.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tree.tcl; sourceTree = "<group>"; };
+ F936FCD90CCD984600716967 /* toolbar.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = toolbar.tcl; sourceTree = "<group>"; };
+ F936FCDA0CCD984600716967 /* ttknote.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttknote.tcl; sourceTree = "<group>"; };
+ F936FCDB0CCD984600716967 /* combo.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = combo.tcl; sourceTree = "<group>"; };
F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXFont.h; sourceTree = "<group>"; };
F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = macOSXLoad.test; sourceTree = "<group>"; };
F966BA0408F27A37005CB29B /* error.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = error.xbm; sourceTree = "<group>"; };
@@ -2038,6 +2043,8 @@
F9ECB1CB0B26534C00A28025 /* mathop.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = mathop.test; sourceTree = "<group>"; };
F9ECB1E10B26543C00A28025 /* platform_shell.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform_shell.n; sourceTree = "<group>"; };
F9ECB1E20B26543C00A28025 /* platform.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform.n; sourceTree = "<group>"; };
+ F9F4EFDC0CC7B3CA00378A27 /* ttkpane.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; languageSpecificationIdentifier = shell; path = ttkpane.tcl; sourceTree = "<group>"; };
+ F9F4EFDD0CC7B3CB00378A27 /* ttkmenu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; languageSpecificationIdentifier = shell; path = ttkmenu.tcl; sourceTree = "<group>"; };
F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixCompat.c; sourceTree = "<group>"; };
F9FD31F40CC1AD070073837D /* tktest-X11 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "tktest-X11"; sourceTree = BUILT_PRODUCTS_DIR; };
F9FD32140CC1AF170073837D /* libX11.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libX11.dylib; path = /usr/X11R6/lib/libX11.dylib; sourceTree = "<absolute>"; };
@@ -2084,7 +2091,7 @@
F966C06F08F281DC005CB29B /* Frameworks */,
1AB674ADFE9D54B511CA2CBB /* Products */,
);
- comments = "Copyright (c) 2004-2007 Daniel A. Steffen <das@users.sourceforge.net>\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.13.2.4 2007/10/19 14:35:34 dgp Exp $\n";
+ comments = "Copyright (c) 2004-2007 Daniel A. Steffen <das@users.sourceforge.net>\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.13.2.5 2007/10/24 12:59:35 dgp Exp $\n";
name = Wish;
path = .;
sourceTree = SOURCE_ROOT;
@@ -2459,6 +2466,7 @@
F966BB2208F27A39005CB29B /* check.tcl */,
F966BB2308F27A39005CB29B /* clrpick.tcl */,
F966BB2408F27A39005CB29B /* colors.tcl */,
+ F936FCDB0CCD984600716967 /* combo.tcl */,
F966BB2508F27A39005CB29B /* cscroll.tcl */,
F966BB2608F27A39005CB29B /* ctext.tcl */,
F966BB2708F27A39005CB29B /* dialog1.tcl */,
@@ -2503,7 +2511,13 @@
F966BB5C08F27A3A005CB29B /* text.tcl */,
F9099B8A0CC67D30005A9580 /* textpeer.tcl */,
F966BB5D08F27A3A005CB29B /* timer */,
+ F936FCD90CCD984600716967 /* toolbar.tcl */,
+ F936FCD80CCD984600716967 /* tree.tcl */,
F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */,
+ F9F4EFDD0CC7B3CB00378A27 /* ttkmenu.tcl */,
+ F936FCDA0CCD984600716967 /* ttknote.tcl */,
+ F9F4EFDC0CC7B3CA00378A27 /* ttkpane.tcl */,
+ F936FCD70CCD984500716967 /* ttkprogress.tcl */,
F966BB5E08F27A3A005CB29B /* twind.tcl */,
F966BB5F08F27A3A005CB29B /* unicodeout.tcl */,
F966BB6008F27A3A005CB29B /* vscale.tcl */,
diff --git a/macosx/Wish.xcodeproj/project.pbxproj b/macosx/Wish.xcodeproj/project.pbxproj
index b95b563..f0a7558 100644
--- a/macosx/Wish.xcodeproj/project.pbxproj
+++ b/macosx/Wish.xcodeproj/project.pbxproj
@@ -597,9 +597,14 @@
/* Begin PBXFileReference section */
8DD76FB20486AB0100D96B5E /* tktest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tktest; sourceTree = BUILT_PRODUCTS_DIR; };
- F9099B8A0CC67D30005A9580 /* textpeer.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = textpeer.tcl; sourceTree = "<group>"; };
- F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ttkbut.tcl; sourceTree = "<group>"; };
+ F9099B8A0CC67D30005A9580 /* textpeer.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textpeer.tcl; sourceTree = "<group>"; };
+ F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttkbut.tcl; sourceTree = "<group>"; };
F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = "<group>"; };
+ F936FCD70CCD984500716967 /* ttkprogress.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttkprogress.tcl; sourceTree = "<group>"; };
+ F936FCD80CCD984600716967 /* tree.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tree.tcl; sourceTree = "<group>"; };
+ F936FCD90CCD984600716967 /* toolbar.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = toolbar.tcl; sourceTree = "<group>"; };
+ F936FCDA0CCD984600716967 /* ttknote.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttknote.tcl; sourceTree = "<group>"; };
+ F936FCDB0CCD984600716967 /* combo.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = combo.tcl; sourceTree = "<group>"; };
F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXFont.h; sourceTree = "<group>"; };
F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = macOSXLoad.test; sourceTree = "<group>"; };
F966BA0408F27A37005CB29B /* error.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = error.xbm; sourceTree = "<group>"; };
@@ -2041,6 +2046,8 @@
F9ECB1E10B26543C00A28025 /* platform_shell.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform_shell.n; sourceTree = "<group>"; };
F9ECB1E20B26543C00A28025 /* platform.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform.n; sourceTree = "<group>"; };
F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = tclDTrace.d; sourceTree = "<group>"; };
+ F9F4EFDC0CC7B3CA00378A27 /* ttkpane.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; languageSpecificationIdentifier = shell; path = ttkpane.tcl; sourceTree = "<group>"; };
+ F9F4EFDD0CC7B3CB00378A27 /* ttkmenu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; languageSpecificationIdentifier = shell; path = ttkmenu.tcl; sourceTree = "<group>"; };
F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixCompat.c; sourceTree = "<group>"; };
F9FD31F40CC1AD070073837D /* tktest-X11 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "tktest-X11"; sourceTree = BUILT_PRODUCTS_DIR; };
F9FD32140CC1AF170073837D /* libX11.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libX11.dylib; path = /usr/X11R6/lib/libX11.dylib; sourceTree = "<absolute>"; };
@@ -2087,7 +2094,7 @@
F966C06F08F281DC005CB29B /* Frameworks */,
1AB674ADFE9D54B511CA2CBB /* Products */,
);
- comments = "Copyright (c) 2004-2007 Daniel A. Steffen <das@users.sourceforge.net>\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.21.2.8 2007/10/19 14:35:34 dgp Exp $\n";
+ comments = "Copyright (c) 2004-2007 Daniel A. Steffen <das@users.sourceforge.net>\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.21.2.9 2007/10/24 12:59:36 dgp Exp $\n";
name = Wish;
path = .;
sourceTree = SOURCE_ROOT;
@@ -2462,6 +2469,7 @@
F966BB2208F27A39005CB29B /* check.tcl */,
F966BB2308F27A39005CB29B /* clrpick.tcl */,
F966BB2408F27A39005CB29B /* colors.tcl */,
+ F936FCDB0CCD984600716967 /* combo.tcl */,
F966BB2508F27A39005CB29B /* cscroll.tcl */,
F966BB2608F27A39005CB29B /* ctext.tcl */,
F966BB2708F27A39005CB29B /* dialog1.tcl */,
@@ -2506,7 +2514,13 @@
F966BB5C08F27A3A005CB29B /* text.tcl */,
F9099B8A0CC67D30005A9580 /* textpeer.tcl */,
F966BB5D08F27A3A005CB29B /* timer */,
+ F936FCD90CCD984600716967 /* toolbar.tcl */,
+ F936FCD80CCD984600716967 /* tree.tcl */,
F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */,
+ F9F4EFDD0CC7B3CB00378A27 /* ttkmenu.tcl */,
+ F936FCDA0CCD984600716967 /* ttknote.tcl */,
+ F9F4EFDC0CC7B3CA00378A27 /* ttkpane.tcl */,
+ F936FCD70CCD984500716967 /* ttkprogress.tcl */,
F966BB5E08F27A3A005CB29B /* twind.tcl */,
F966BB5F08F27A3A005CB29B /* unicodeout.tcl */,
F966BB6008F27A3A005CB29B /* vscale.tcl */,
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index c16b080..8ad52e7 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -35,7 +35,7 @@
* that such fonts can not be used for controls, because controls
* definitely require a family id (this assertion needs testing).
*
- * RCS: @(#) $Id: tkMacOSXFont.c,v 1.24.2.5 2007/10/15 18:38:35 dgp Exp $
+ * RCS: @(#) $Id: tkMacOSXFont.c,v 1.24.2.6 2007/10/24 12:59:35 dgp Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -157,6 +157,38 @@ static int antialiasedTextEnabled;
#define APPLFONT_NAME "application"
#define MENUITEMFONT_NAME "menu"
+struct SystemFontMapEntry {
+ const ThemeFontID id;
+ const char *systemName;
+ const char *tkName;
+ const char *tkName1;
+};
+
+#define ThemeFont(n, ...) { kTheme##n##Font, "system" #n "Font", ##__VA_ARGS__ }
+static const struct SystemFontMapEntry systemFontMap[] = {
+ ThemeFont(System, "TkDefaultFont", "TkIconFont"),
+ ThemeFont(EmphasizedSystem, "TkCaptionFont"),
+ ThemeFont(SmallSystem, "TkHeadingFont", "TkTooltipFont"),
+ ThemeFont(SmallEmphasizedSystem),
+ ThemeFont(Application, "TkTextFont"),
+ ThemeFont(Label, "TkSmallCaptionFont"),
+ ThemeFont(Views),
+ ThemeFont(MenuTitle),
+ ThemeFont(MenuItem, "TkMenuFont"),
+ ThemeFont(MenuItemMark),
+ ThemeFont(MenuItemCmdKey),
+ ThemeFont(WindowTitle),
+ ThemeFont(PushButton),
+ ThemeFont(UtilityWindowTitle),
+ ThemeFont(AlertHeader),
+ ThemeFont(Toolbar),
+ ThemeFont(MiniSystem),
+ { kThemeSystemFontDetail, "systemDetailSystemFont" },
+ { kThemeSystemFontDetailEmphasized, "systemDetailEmphasizedSystemFont" },
+ { -1, NULL }
+};
+#undef ThemeFont
+
/*
* Procedures used only in this file.
*/
@@ -221,9 +253,13 @@ static OSStatus FontFamilyEnumCallback(ATSFontFamilyRef family, void *refCon);
static void SortFontFamilies(void);
static int CompareFontFamilies(const void *vp1, const void *vp2);
static const char *AddString(const char *in);
+
static OSStatus GetThemeFontAndFamily(const ThemeFontID themeFontId,
FMFontFamily *fontFamily, unsigned char *fontName, SInt16 *fontSize,
Style *fontStyle);
+static void InitSystemFonts(TkMainInfo *mainPtr);
+static int CreateNamedSystemFont(Tcl_Interp *interp, Tk_Window tkwin,
+ const char* name, TkFontAttributes *faPtr);
/*
@@ -249,6 +285,7 @@ TkpFontPkgInit(
TkMainInfo *mainPtr) /* The application being created. */
{
InitFontFamilies();
+ InitSystemFonts(mainPtr);
#if TK_MAC_COALESCE_LINE
Tcl_DStringInit(&currentLine);
@@ -256,6 +293,99 @@ TkpFontPkgInit(
}
/*
+ *-------------------------------------------------------------------------
+ *
+ * InitSystemFonts --
+ *
+ * Initialize named system fonts.
+ *
+ * Results:
+ *
+ * None.
+ *
+ * Side effects:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static void
+InitSystemFonts(
+ TkMainInfo *mainPtr)
+{
+ Tcl_Interp *interp = mainPtr->interp;
+ Tk_Window tkwin = (Tk_Window) mainPtr->winPtr;
+ const struct SystemFontMapEntry *systemFont = systemFontMap;
+ TkFontAttributes fa;
+
+ /* force this for now */
+ if (!mainPtr->winPtr->mainPtr) {
+ mainPtr->winPtr->mainPtr = mainPtr;
+ }
+ TkInitFontAttributes(&fa);
+ while (systemFont->systemName) {
+ Str255 fontName;
+ SInt16 fontSize;
+ Style fontStyle;
+
+ if (GetThemeFont(systemFont->id, smSystemScript, fontName,
+ &fontSize, &fontStyle) == noErr) {
+ CopyPascalStringToC(fontName, (char*)fontName);
+ fa.family = Tk_GetUid((char*)fontName);
+ fa.size = fontSize;
+ fa.weight = (fontStyle & bold) ? TK_FW_BOLD : TK_FW_NORMAL;
+ fa.slant = (fontStyle & italic) ? TK_FS_ITALIC : TK_FS_ROMAN;
+ fa.underline = ((fontStyle & underline) != 0);
+ CreateNamedSystemFont(interp, tkwin, systemFont->systemName, &fa);
+ if (systemFont->tkName) {
+ CreateNamedSystemFont(interp, tkwin, systemFont->tkName, &fa);
+ }
+ if (systemFont->tkName1) {
+ CreateNamedSystemFont(interp, tkwin, systemFont->tkName1, &fa);
+ }
+ }
+ systemFont++;
+ }
+ fa.family = Tk_GetUid("monaco");
+ fa.size = 9;
+ fa.weight = TK_FW_NORMAL;
+ fa.slant = TK_FS_ROMAN;
+ fa.underline = 0;
+ CreateNamedSystemFont(interp, tkwin, "TkFixedFont", &fa);
+
+}
+
+/*
+ *-------------------------------------------------------------------------
+ *
+ * CreateNamedSystemFont --
+ *
+ * Register a system font with the Tk named font mechanism.
+ *
+ * Results:
+ *
+ * Result from TkCreateNamedFont().
+ *
+ * Side effects:
+ *
+ * A new named font is added to the Tk font registry.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static int
+CreateNamedSystemFont(
+ Tcl_Interp *interp,
+ Tk_Window tkwin,
+ const char* name,
+ TkFontAttributes *faPtr)
+{
+ TkDeleteNamedFont(NULL, tkwin, name);
+ return TkCreateNamedFont(interp, tkwin, name, faPtr);
+}
+
+/*
*---------------------------------------------------------------------------
*
* GetThemeFontAndFamily --
@@ -323,7 +453,7 @@ TkpGetNativeFont(
Str255 fontName;
SInt16 fontSize;
Style fontStyle;
- MacFont * fontPtr;
+ MacFont *fontPtr;
if (strcmp(name, SYSTEMFONT_NAME) == 0) {
themeFontId = kThemeSystemFont;
diff --git a/tests/cursor.test b/tests/cursor.test
index d5dabcf..4c2f5ca 100644
--- a/tests/cursor.test
+++ b/tests/cursor.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: cursor.test,v 1.16 2006/12/17 00:43:06 mdejong Exp $
+# RCS: @(#) $Id: cursor.test,v 1.16.2.1 2007/10/24 12:59:36 dgp Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -76,7 +76,7 @@ set wincur(data_octal) {
}
set wincur(data_binary) {}
foreach wincur(num) $wincur(data_octal) {
- append wincur(data_binary) [binary format c 0$wincur(num)]
+ append wincur(data_binary) [binary format c [scan $wincur(num) %o]]
}
set wincur(dir) [makeDirectory {dir with spaces}]
set wincur(file) [makeFile $wincur(data_binary) "test file.cur" $wincur(dir)]
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 8c736ab..081be3f 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDraw.c,v 1.18 2007/01/11 15:35:40 dkf Exp $
+ * RCS: @(#) $Id: tkWinDraw.c,v 1.18.2.1 2007/10/24 12:59:36 dgp Exp $
*/
#include "tkWinInt.h"
@@ -414,6 +414,8 @@ XCopyPlane(
fgBrush = CreateSolidBrush(gc->foreground);
oldBrush = SelectObject(destDC, fgBrush);
+ SetBkColor(destDC, RGB(255,255,255));
+ SetTextColor(destDC, RGB(0,0,0));
BitBlt(destDC, dest_x, dest_y, (int) width, (int) height, srcDC,
src_x, src_y, MASKPAT);
SelectObject(destDC, oldBrush);
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index d4e4e41..bfdc111 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinFont.c,v 1.32.2.1 2007/09/09 04:15:54 dgp Exp $
+ * RCS: @(#) $Id: tkWinFont.c,v 1.32.2.2 2007/10/24 12:59:36 dgp Exp $
*/
#include "tkWinInt.h"
@@ -368,19 +368,13 @@ CreateNamedSystemFont(
CONST char* name,
HFONT hFont)
{
- TkFontAttributes *faPtr;
- WinFont *fontPtr;
+ WinFont winfont;
int r;
- TkDeleteNamedFont(interp, tkwin, name);
-
- fontPtr = (WinFont *) ckalloc(sizeof(WinFont));
- InitFont(tkwin, hFont, 0, fontPtr);
- faPtr = (TkFontAttributes*)ckalloc(sizeof(TkFontAttributes));
- memcpy(faPtr, &fontPtr->font.fa, sizeof(TkFontAttributes));
- r = TkCreateNamedFont(interp, tkwin, name, faPtr);
- TkpDeleteFont((TkFont *)fontPtr);
- ckfree((char *) fontPtr);
+ TkDeleteNamedFont(NULL, tkwin, name);
+ InitFont(tkwin, hFont, 0, &winfont);
+ r = TkCreateNamedFont(interp, tkwin, name, &winfont.font.fa);
+ TkpDeleteFont((TkFont *)&winfont);
return r;
}