summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-27 04:23:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-27 04:23:13 (GMT)
commit08a5977be6d47dbe4b3fa1bac892353f66dd2990 (patch)
tree5d20a5124f9e13b0312a2e4d94a76d06d90238b7
parente45899dfe4a136045461e8d0a243333b8ea5772d (diff)
downloadtk-08a5977be6d47dbe4b3fa1bac892353f66dd2990.zip
tk-08a5977be6d47dbe4b3fa1bac892353f66dd2990.tar.gz
tk-08a5977be6d47dbe4b3fa1bac892353f66dd2990.tar.bz2
merge updates from HEAD
-rw-r--r--ChangeLog61
-rw-r--r--README2
-rw-r--r--changes76
-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.n15
-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/tk.h2
-rw-r--r--generic/tkPlace.c46
-rw-r--r--generic/ttk/ttkButton.c52
-rw-r--r--generic/ttk/ttkClamTheme.c56
-rw-r--r--generic/ttk/ttkClassicTheme.c25
-rw-r--r--generic/ttk/ttkDefaultTheme.c5
-rw-r--r--generic/ttk/ttkElements.c264
-rw-r--r--generic/ttk/ttkFrame.c17
-rw-r--r--generic/ttk/ttkNotebook.c66
-rw-r--r--generic/ttk/ttkScale.c17
-rw-r--r--generic/ttk/ttkScrollbar.c25
-rw-r--r--generic/ttk/ttkSeparator.c15
-rw-r--r--generic/ttk/ttkSquare.c17
-rw-r--r--generic/ttk/ttkTheme.h4
-rw-r--r--generic/ttk/ttkTreeview.c4
-rw-r--r--library/demos/filebox.tcl12
-rw-r--r--library/tk.tcl2
-rw-r--r--library/tkfbox.tcl31
-rw-r--r--library/xmfbox.tcl29
-rw-r--r--macosx/tkMacOSXDialog.c88
-rw-r--r--macosx/tkMacOSXWm.c31
-rw-r--r--macosx/ttkMacOSXTheme.c50
-rw-r--r--tests/filebox.test27
-rw-r--r--tests/ttk/notebook.test31
-rw-r--r--tests/winDialog.test6
-rwxr-xr-xunix/configure12
-rw-r--r--unix/configure.in2
-rw-r--r--unix/tk.spec2
-rw-r--r--win/configure.in2
-rw-r--r--win/tkWinDialog.c118
-rw-r--r--win/ttkWinMonitor.c49
-rw-r--r--win/ttkWinTheme.c444
-rw-r--r--win/ttkWinXPTheme.c389
65 files changed, 2161 insertions, 2007 deletions
diff --git a/ChangeLog b/ChangeLog
index b23ea9f..81eded5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,65 @@
+2007-10-26 Don Porter <dgp@users.sourceforge.net>
+
+ *** 8.5b2 TAGGED FOR RELEASE ***
+
+ * changes: Update changes for 8.5b2 release.
+
+ * doc/*.1: Revert doc changes that broke
+ * doc/*.3: `make html` so we can get the release
+ * doc/*.n: out the door.
+
+ * README: Bump version number to 8.5b2.
+ * generic/tk.h:
+ * library/tk.tcl:
+ * unix/configure.in:
+ * unix/tk.spec:
+ * win/configure.in:
+
+ * unix/configure: autoconf-2.59
+ * win/configure:
+
+2007-10-26 Daniel Steffen <das@users.sourceforge.net>
+
+ * macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): fix window class of
+ transient toplevels that are not also overrideredirect. [Bug 1816252]
+
+ * macosx/tkMacOSXDialog.c: TIP#242 cleanup.
+ * library/demos/filebox.tcl: demo TIP#242 -typevariable.
+
+2007-10-25 Joe English <jenglish@users.sourceforge.net>
+
+ * generic/ttk/ttkNotebook.c: [Bug 1817596].
+
+2007-10-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * doc/getOpenFile.n: TIP#242 implementation of -typevariable to
+ * library/tkfbox.tcl: return type of selected file in file dialogs.
+ * library/xmfbox.tcl: [Bug 1156388]
+ * macosx/tkMacOSXDialog.c:
+ * tests/filebox.test:
+ * tests/winDialog.test:
+ * win/tkWinDialog.c:
+
+2007-10-25 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tkPlace.c: Prevent segfault in place geometry manager.
+ Thanks to Colin McDonald. [Bug 1818491]
+
+2007-10-24 Joe English <jenglish@users.sourceforge.net>
+
+ * generic/ttk/*.c, win/{ttkWinMonitor,ttkWinTheme,ttkWinXPTheme}.c,
+ macosx/ttkMacOSXTheme.c: Move widget layout registration
+ from TtkElements_Init() to widget *_Init() routines.
+ Renaming/consistency: s/...ElementGeometry()/...ElementSize()/
+
+2007-10-24 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * doc/*.n, doc/*.3, doc/*.1: Lots of changes to take advantage of the
+ new macros.
+
2007-10-24 Pat Thoyts <patthoyts@users.sourceforge.net>
- * win/tkWinDraw.c: Applied patch #1723362 for transparent bitmaps
+ * win/tkWinDraw.c: Applied [Patch 1723362] for transparent bitmaps.
* generic/tkWindow.c: permit wm manage of any widget (esp: ttk::frame)
diff --git a/README b/README
index 392b538..1ed7216 100644
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ README: Tk
You can get any source release of Tcl from the file distributions
link at the above URL.
-RCS: @(#) $Id: README,v 1.47.2.2 2007/10/02 20:43:52 dgp Exp $
+RCS: @(#) $Id: README,v 1.47.2.3 2007/10/27 04:23:13 dgp Exp $
1. Introduction
---------------
diff --git a/changes b/changes
index 144880c..55b724e 100644
--- a/changes
+++ b/changes
@@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was
released on March 13, 1991. Changes that aren't backward compatible
are marked specially.
-RCS: @(#) $Id: changes,v 1.107.2.2 2007/10/02 20:43:52 dgp Exp $
+RCS: @(#) $Id: changes,v 1.107.2.3 2007/10/27 04:23:13 dgp Exp $
3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from
the interpreter when the main window is deleted (otherwise there will
@@ -6251,20 +6251,20 @@ ttk::radiobutton, ttk::checkbutton, ttk::treeview, ttk::separator,
ttk::scrollbar, ttk::entry, ttk::frame and ttk::labelframe widgets. Adds
ttk::style command.
-2006-11-02 (enhancement) Improve OS X Carbon Update event handling.
+2006-11-02 (enhancement) Improve OS X Carbon Update event handling (steffen).
2006-11-07 (configure change) Unix --enable-xft is enabled by default now.
2006-11-23 (bug fix)[1599877] Fix unicode character underline in menus.
2006-11-24 (bug fix)[1487701] Better handling of tcl_interactive on OS X to
-control display of console.
+control display of console (hobbs, steffen)
-2006-11-26 (platform support)[1230558] --enable-64bit on more systems.
+2006-11-26 (platform support)[1230558] --enable-64bit on more systems (steffen)
-2006-11-30 (bug fix) Fix handling of Escape binding on OS X dialogs.
+2006-11-30 (bug fix) Fix handling of Escape binding on OS X dialogs (steffen)
-2006-12-01 (new feature) Add -transparentcolor wm attribute on Windows.
+2006-12-01 (new feature) Add -transparentcolor wm attribute on Windows (hobbs)
2006-12-02 (new feature)[TIP 300] Added [font actual $font $char].
@@ -6273,56 +6273,57 @@ control display of console.
2006-12-11 (enhancement) Improved EWMH support for _NET_WM_PID and
_NET_WM_PING.
-2007-01-25 (configure change) Ensure CPPFLAGS env var is used when set.
+2007-01-25 (configure change) ensure CPPFLAGS env var used when set (steffen)
2007-02-19 (configure change) Use SHLIB_SUFFIX=".so" on HP-UX IA64 (was
".sl").
2007-04-10 (platform support) Correctly handle theming on Vista/Aero.
-2007-04-23 (enhancement) Allow empty value for -selectforeground option.
+2007-04-23 (enhancement) Allow empty value for -selectforeground opt (steffen)
2007-04-23 (platform support) Aqua: remove Tk-internal double buffering that is
wasteful on Aqua; allows direct-to-window CoreGraphics drawing (e.g. adding
-support for colors with alpha).
+support for colors with alpha) (steffen)
2007-04-23 (platform support) Aqua: add all OS theme colors/brushes (patterns)
-as system colors.
+as system colors (steffen)
-2007-04-23 (platform support) Aqua: use OS theme for tk_dialog and bgerror.
+2007-04-23 (platform support) Aqua: tk_dialog & bgerror use OS theme (steffen)
-2007-04-23 (platform support) Aqua: add 'none' cursor & missing theme cursors.
+2007-04-23 (platform support) Aqua: add 'none' & missing theme cursors (steffen)
-2007-04-23 (platform support) Aqua: [tk_getOpenFile -parent] uses sheet dialog.
+2007-04-23 (platform support) Aqua: [tk_getOpenFile -parent] et al use sheet
+dialog (steffen)
-2007-04-23 (bug fix) Aqua: fix custom MDEF and tearoff menu display.
+2007-04-23 (bug fix) Aqua: fix custom MDEF and tearoff menu display (steffen)
-2007-04-23 (bug fix)[1620826] Aqua: fix <<MenuSelect>> support.
+2007-04-23 (bug fix)[1620826] Aqua: fix <<MenuSelect>> support (steffen)
2007-04-23 (platform support) Aqua: add support for live window resizing and
asynchronous window dragging; prevent window from becoming inacessible
-offscreen or under Dock after dragging; use transparent grow box.
+offscreen or under Dock after dragging; use transparent grow box (steffen)
2007-04-23 (platform support) Aqua: improve event processing during nested
-event loops (e.g. modal dialogs, menu tracking, window resizing etc).
+event loops (e.g. modal dialogs, menu tracking, window resizing etc) (steffen)
2007-04-23 (bug fix) Aqua: add support for all possible aqua scrollbar arrow
positions, scrollbar variants and for "jump to here" scrollbar behaviour;
-correct scroll view size computation; enforce minimal scrollbar height.
+correct scroll view size computation; enforce minimal scrollbar height (steffen)
2007-04-23 (platform support) Aqua: add [wm attributes] -topmost, -fullscreen
-and -transparent (allows fully transparent window via -bg "systemTransparent").
+and -transparent (fully transparent win via -bg "systemTransparent") (steffen)
2007-04-23 (platform support) Aqua: determine win min/max sizes dynamically;
correct size handling of gridded windows; improve computation of initial
-window bounds; correct window size handling on multi-headed systems.
+window bounds; correct window size handling on multi-headed systems (steffen)
2007-04-23 (platform support) Aqua: correct composite attribute handling in
[tk::unsupported::MacWindowStyle] and add new attributes; allow changing
-window class of already existing windows.
+window class of already existing windows (steffen)
2007-04-23 (platform support) Aqua: add tcl document extensions and mime type
-to Wish.app's Info.plist.
+to Wish.app's Info.plist (steffen)
--- Released 8.5a6, April 25, 2007 --- See ChangeLog for details ---
@@ -6380,3 +6381,34 @@ project for Xcode 3.0 (steffen)
2007-09-20 (bug fix)[1791052] [text] DLine layout crash (khomoutov,fellows)
--- Released 8.5b1, September 26, 2007 --- See ChangeLog for details ---
+
+2007-09-26 (enhancement)[1800742] msg catalog for Hungarian. (reszo)
+
+2007-10-11 (bug fix)[1810818] Aqua: [wm resizeable] (steffen)
+
+2007-10-12 (platform support) Aqua: replace RgnHandles by HIShapeRefs (steffen)
+ *** POTENTIAL INCOMPATIBILITY for C code acessing MacDrawable Rgns ***
+
+2007-10-15 (platform support) Mac OS X: 64-bit X11 support (steffen)
+
+2007-10-15 (new feature)[TIP 125][998125] dockable frame support (hobbs)
+
+2007-10-22 (bug fix)[1814778,1780286,1609168,1349586] combobox overhaul(english)
+
+2007-10-22 (platform support) Aqua: TIP 145 and Aqua Theme fonts (steffen)
+
+2007-10-23 (bug fix)[1818441] combobox & reparentable frames (hobbs)
+
+2007-10-24 (bug fix)[1723362] Win: transparent bitmaps (mcdonald,thoyts)
+
+2007-10-25 (bug fix)[1818491] crash in [place] manager (mcdonald)
+
+2007-10-25 (new feature)[TIP 242][1156388] file dialog filter (hobbs)
+
+2007-10-25 (bug fix)[1817596] ttk::notebook (english)
+
+2007-10-26 (bug fix)[1816252] Aqua: [wm transient] (steffen)
+
+Improvements to demo suite to make more use of Tk 8.5 features (fellows,steffen)
+
+--- Released 8.5b2, October 26, 2007 --- See ChangeLog for details ---
diff --git a/doc/canvas.n b/doc/canvas.n
index 4391ab5..2a104f1 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.2 2007/10/24 12:59:30 dgp Exp $
+'\" RCS: @(#) $Id: canvas.n,v 1.24.2.3 2007/10/27 04:23:13 dgp Exp $
'\"
.so man.macros
.TH canvas n 8.3 Tk "Tk Built-In Commands"
@@ -1026,6 +1026,7 @@ 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
@@ -1156,7 +1157,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.
-.PP
+.br
The following standard options are supported by arcs:
.CS
\-dash
@@ -1226,7 +1227,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.
-.PP
+.br
The following standard options are supported by bitmaps:
.CS
\-state
@@ -1290,7 +1291,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.
-.PP
+.br
The following standard options are supported by images:
.CS
\-state
@@ -1335,7 +1336,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.
-.PP
+.br
The following standard options are supported by lines:
.CS
\-dash
@@ -1445,7 +1446,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.
-.PP
+.br
The following standard options are supported by ovals:
.CS
\-dash
@@ -1492,7 +1493,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.
-.PP
+.br
The following standard options are supported by polygons:
.CS
\-dash
@@ -1584,7 +1585,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.
-.PP
+.br
The following standard options are supported by rectangles:
.CS
\-dash
@@ -1632,7 +1633,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.
-.PP
+.br
The following standard options are supported by text items:
.CS
\-fill
@@ -1713,7 +1714,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.
-.PP
+.br
The following standard options are supported by window items:
.CS
\-state
diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n
index fe69bbd..fdeef5d 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.2.1 2007/10/24 12:59:30 dgp Exp $
+'\" RCS: @(#) $Id: chooseDirectory.n,v 1.4.2.2 2007/10/27 04:23:13 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 \e
+set dir [\fBtk_chooseDirectory\fR \\
\-initialdir ~ \-title "Choose a directory"]
if {$dir eq ""} {
label .l -text "No directory selected"
diff --git a/doc/clipboard.n b/doc/clipboard.n
index 2cf941e..3589d40 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.2.1 2007/10/24 12:59:30 dgp Exp $
+'\" RCS: @(#) $Id: clipboard.n,v 1.11.2.2 2007/10/27 04:23:13 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 \e
+ \fBclipboard append -type\fR TkCanvasItem \\
[getItemConfig %W current]
# Delete because this is cut, not copy.
%W delete current
diff --git a/doc/dialog.n b/doc/dialog.n
index b075f5b..21571fd 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.2.1 2007/10/24 12:59:30 dgp Exp $
+'\" RCS: @(#) $Id: dialog.n,v 1.3.2.2 2007/10/27 04:23:14 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?" \e
+set reply [\fBtk_dialog\fR .foo "The Title" "Do you want to say yes?" \\
questhead 0 Yes No "I'm not sure"]
.CE
diff --git a/doc/font.n b/doc/font.n
index 66bb1e7..7f86567 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.2.1 2007/10/24 12:59:30 dgp Exp $
+'\" RCS: @(#) $Id: font.n,v 1.11.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH font n 8.0 Tk "Tk Built-In Commands"
@@ -261,92 +261,26 @@ 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 "STANDARD FONTS"
+.SH "PLATFORM-SPECIFIC ISSUES"
.LP
-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:
+The following named system fonts are supported:
.RS
.TP
-\fBX Windows\fR
+X Windows:
All valid X font names, including those listed by xlsfonts(1), are available.
.TP
-\fBMS Windows\fR
+MS Windows:
.DS
.ta 3c 6c
\fBsystem ansi device
systemfixed ansifixed oemfixed\fR
.DE
.TP
-\fBMac OS X\fR
+Mac OS X:
.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
@@ -357,7 +291,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 {} \e
+ .t insert end ${family}:\\t {} \\
"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 534e2fc..0b80056 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.2.1 2007/10/24 12:59:30 dgp Exp $
+'\" RCS: @(#) $Id: getOpenFile.n,v 1.15.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH tk_getOpenFile n 4.2 Tk "Tk Built-In Commands"
@@ -13,10 +13,9 @@
.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
@@ -88,6 +87,16 @@ dialog is displayed on top of its parent window.
\fB\-title\fR \fItitleString\fR
Specifies a string to display as the title of the dialog box. If this
option is not specified, then a default title is displayed.
+.TP
+\fB\-typevariable\fR \fIvariableName\fR
+The variable \fIvariableName\fR is used to preselect which filter is
+used from \fIfilterList\fR when the dialog box is opened and is
+updated when the dialog box is closed, to the last selected
+filter. The variable is read once at the beginning to select the
+appropriate filter. If the variable does not exist, or it's value does
+not match any filter typename, or is empty (\fB{}\fR), the dialog box
+will revert to the default behavior of selecting the first filter in
+the list. If the dialog is canceled, the variable is not modified.
.PP
If the user selects a file, both \fBtk_getOpenFile\fR and
\fBtk_getSaveFile\fR return the full pathname of this file. If the
diff --git a/doc/labelframe.n b/doc/labelframe.n
index 3aee105..93345bf 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: labelframe.n,v 1.3.2.2 2007/10/27 04:23:14 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"] \e
+grid [\fBlabelframe\fR .burger -text "Burger"] \\
[\fBlabelframe\fR .bun -text "Bun"] -sticky news
-grid [\fBlabelframe\fR .cheese -text "Cheese Option"] \e
+grid [\fBlabelframe\fR .cheese -text "Cheese Option"] \\
[\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 \e
+ set w [radiobutton .$type.$val -text $name -anchor w \\
-variable $type -value $val]
pack $w -side top -fill x
}
diff --git a/doc/text.n b/doc/text.n
index 794b542..8da94c9 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.2 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: text.n,v 1.43.2.3 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH text n 8.5 Tk "Tk Built-In Commands"
@@ -1458,13 +1458,11 @@ 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.
-.RS
-.PP
+.br
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 65cf329..abb9056 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_button.n,v 1.3.2.2 2007/10/27 04:23:14 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,11 +36,9 @@ 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.
-.RS
-.PP
+.br
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.
@@ -48,13 +46,14 @@ 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
@@ -68,6 +67,7 @@ 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,7 +75,9 @@ 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 1dd6c7a..b4035e0 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_checkbutton.n,v 1.4.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH ttk_checkbutton n 8.5 Tk "Tk Themed Widget"
@@ -21,23 +21,24 @@ 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 \fB\-variable\fR
+The value to store in the associated \fI-variable\fR
when the widget is deselected. Defaults to \fB0\fR.
.OP \-onvalue onValue OnValue
-The value to store in the associated \fB\-variable\fR
+The value to store in the associated \fI-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
@@ -46,24 +47,27 @@ widget commands:
.TP
\fIpathname\fR invoke
Toggles between the selected and deselected states
-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.
+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.
.\" 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 c18f8a5..85b83d2 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.2 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4.2.3 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH ttk_combobox n 8.5 Tk "Tk Themed Widget"
@@ -18,91 +18,94 @@ 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 34e2eb4..f5e3d1a 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_entry.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH ttk_entry n 8.5 Tk "Tk Themed Widget"
@@ -24,13 +24,14 @@ 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
@@ -87,6 +88,8 @@ 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
@@ -104,6 +107,7 @@ 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
@@ -134,6 +138,7 @@ 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:
@@ -215,7 +220,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
@@ -257,18 +262,19 @@ 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
@@ -287,22 +293,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
@@ -319,7 +325,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).
@@ -328,17 +334,18 @@ 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
@@ -418,6 +425,7 @@ 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.
@@ -428,7 +436,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,
@@ -436,7 +444,9 @@ 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 7a4e872..05b2567 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_frame.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH ttk_frame n 8.5 Tk "Tk Themed Widget"
@@ -20,35 +20,39 @@ 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 ea6fe88..a85fc76 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_image.n,v 1.6.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH ttk_image n 8.5 Tk "Tk Themed Widget"
@@ -16,58 +16,63 @@ 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 1c14207..663e7a9 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_intro.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH ttk_intro n 8.5 Tk "Tk Themed Widget"
@@ -14,15 +14,20 @@ 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
@@ -35,23 +40,28 @@ 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
@@ -61,84 +71,99 @@ 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 \fBttk::button\fR widget are:
+For example, the class bindings for the \fBtbutton\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 7080668..abb294b 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_label.n,v 1.3.2.2 2007/10/27 04:23:14 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,13 +62,14 @@ 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
@@ -79,5 +80,6 @@ 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 ae6fe32..758b2dd 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_labelframe.n,v 1.3.2.2 2007/10/27 04:23:14 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,21 +55,23 @@ 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 8b3b56d..120f7e5 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_menubutton.n,v 1.3.2.2 2007/10/27 04:23:14 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,11 +39,14 @@ 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 44cf842..8ce1e77 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_notebook.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $
'\"
.so man.macros
.TH ttk_notebook n 8.5 Tk "Tk Themed Widget"
@@ -13,161 +13,170 @@
.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 \-style
-\-takefocus
+\-class \-cursor \-takefocus \-style
.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
@@ -176,7 +185,9 @@ 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 824155d..ff2a799 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.2 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_panedwindow.n,v 1.4.2.3 2007/10/27 04:23:14 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,79 +23,81 @@ 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 \-style
-\-takefocus
+\-class \-cursor \-takefocus \-style
.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 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.
+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.
.\" 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 3a8d4bc..4f40414 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_progressbar.n,v 1.3.2.2 2007/10/27 04:23:14 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 \-style
-\-takefocus
+\-class \-cursor \-takefocus \-style
.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 7ee8167..cfaa188 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_radiobutton.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $
'\"
.so man.macros
.TH ttk_radiobutton n 8.5 Tk "Tk Themed Widget"
@@ -23,20 +23,21 @@ 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 \fB\-variable\fR
+The value to store in the associated \fI-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
@@ -44,22 +45,25 @@ commands, radiobuttons support the following additional
widget commands:
.TP
\fIpathname\fR invoke
-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.
+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.
.\" 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 29bd628..1eb81ae 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $
'\"
.so man.macros
.TH ttk_scrollbar n 8.5 Tk "Tk Themed Widget"
@@ -19,145 +19,149 @@ 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.
-.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)
+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)
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 \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]
+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]
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 5626c6a..52d8ef3 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.2.1 2007/10/24 12:59:31 dgp Exp $
+'\" RCS: @(#) $Id: ttk_separator.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $
'\"
.so man.macros
.TH ttk_separator n 8.5 Tk "Tk Themed Widget"
@@ -20,18 +20,22 @@ 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 3035579..1f1e5f0 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.3 2007/10/24 12:59:32 dgp Exp $
+'\" RCS: @(#) $Id: ttk_sizegrip.n,v 1.3.2.4 2007/10/27 04:23:15 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
-.CE
-.PP
-Using \fBgrid\fR:
-.CS
-grid [ttk::sizegrip $top.statusbar.grip] \e
- -row $lastRow -column $lastColumn -sticky se
+
+# Using grid:
+grid [ttk::sizegrip $top.statusbar.grip] \
+ -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,7 +56,9 @@ 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 86b75b8..0bf7dcf 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.2.1 2007/10/24 12:59:32 dgp Exp $
+'\" RCS: @(#) $Id: ttk_style.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $
'\"
.so man.macros
.TH ttk_style n 8.5 Tk "Tk Themed Widget"
@@ -15,13 +15,11 @@ 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
@@ -91,6 +89,7 @@ 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.
@@ -110,9 +109,10 @@ 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.
-.SH EXAMPLE
+.PP
+For example:
.CS
-\fBttk::style\fR layout Horizontal.TScrollbar {
+ttk::style layout Horizontal.TScrollbar {
Scrollbar.trough -children {
Scrollbar.leftarrow -side left
Scrollbar.rightarrow -side right
@@ -120,7 +120,9 @@ Specifies a list of elements to place inside the element.
}
}
.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 0e01b5f..e31199c 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.2.1 2007/10/24 12:59:32 dgp Exp $
+'\" RCS: @(#) $Id: ttk_treeview.n,v 1.5.2.2 2007/10/27 04:23:15 dgp Exp $
'\"
.so man.macros
.TH ttk_treeview n 8.5 Tk "Tk Themed Widget"
@@ -17,28 +17,33 @@ 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\-\fR[\fBxy\fR]\fBscrollcommand\fR options and \fB[xyview\fR widget
-commands.
+Treeview widgets support horizontal and vertical scrolling with the
+standard \fB-[xy]scrollcommand\fR options
+and \fB[xyview\fR widget commands.
.SO
\-class \-cursor \-takefocus \-style
\-xscrollcommand \-yscrollcommand
@@ -46,350 +51,324 @@ 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.
-.RS
-.PP
+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
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.
-.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
+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.
.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.
-.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:
+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:
.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.
-.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
+\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.
.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.
-.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
+.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
\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.
-.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
+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.
.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.
-.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
+.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.
.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
@@ -402,43 +381,47 @@ 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 \fB<<TreeviewSelect>>\fR
+.IP <<TreeviewSelect>>
Generated whenever the selection changes.
-.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.
+.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.
.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 fda05b5..3d93e74 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.2.1 2007/10/24 12:59:32 dgp Exp $
+'\" RCS: @(#) $Id: ttk_widget.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $
'\"
.so man.macros
.TH ttk_widget n 8.5 Tk "Tk Themed Widget"
@@ -19,206 +19,216 @@ 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.
-.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
+.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.
.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 \fBtext\fR
+.IP text
Display text only.
-.IP \fBimage\fR
+.IP image
Display image only.
-.IP \fBcenter\fR
+.IP center
Display text centered on top of image.
-.IP \fBtop\fR, \fBbottom\fR, \fBleft\fR, \fBright\fR
+.IP top
+.IP bottom
+.IP left
+.IP right
Display image above, below, left of, or right of the text, respectively.
-.IP \fBnone\fR
+.IP none
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
-.RS
+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
.CS
if {[\fIpathName\fR instate \fIstateSpec\fR]} \fIscript\fR
.CE
-.RE
-.TP
+.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:
-.RS
+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:
.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.
-.RE
+will restore \fIpathName\fR to the original state.
+If \fIstateSpec\fR is not specified,
+returns a list of the currently-enabled state flags.
.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
-.
-The widget is "On", "true", or "current" (for things like checkbuttons and
-radiobuttons).
+"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 ab95dea..4906e05 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.2 2007/10/24 12:59:32 dgp Exp $
+'\" RCS: @(#) $Id: wm.n,v 1.29.2.3 2007/10/27 04:23:15 dgp Exp $
'\"
.so man.macros
.TH wm n 8.5 Tk "Tk Built-In Commands"
@@ -220,14 +220,11 @@ 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. See
-\fBGEOMETRY MANAGEMENT\fR below for more details.
-.VE 8.5
+longer managed by \fBwm\fR, however, the -menu configuration will be
+remembered and the menus will return once the widget is managed again.
.TP
\fBwm frame \fIwindow\fR
If \fIwindow\fR has been reparented by the window manager into a
@@ -247,7 +244,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 \fBGRIDDED GEOMETRY MANAGEMENT\fR below) then the dimensions
+is gridded (see GRIDDED GEOMETRY MANAGEMENT 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.
@@ -406,17 +403,11 @@ 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. See
-\fBGEOMETRY MANAGEMENT\fR below for more details.
-.VE 8.5
+window will be decorated with the window managers title bar, etc.
.TP
\fBwm maxsize \fIwindow\fR ?\fIwidth height\fR?
If \fIwidth\fR and \fIheight\fR are specified, they give
@@ -625,7 +616,6 @@ 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
@@ -640,7 +630,6 @@ 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/tk.h b/generic/tk.h
index e9cccc6..0d8e1aa 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.98.2.4 2007/10/02 20:43:53 dgp Exp $
+ * RCS: @(#) $Id: tk.h,v 1.98.2.5 2007/10/27 04:23:15 dgp Exp $
*/
#ifndef _TK
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index ce334bc..c0150b0 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.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: tkPlace.c,v 1.20.2.2 2007/09/07 01:25:36 dgp Exp $
+ * RCS: @(#) $Id: tkPlace.c,v 1.20.2.3 2007/10/27 04:23:15 dgp Exp $
*/
#include "tkInt.h"
@@ -133,6 +133,12 @@ typedef struct Master {
Tk_Window tkwin; /* Tk's token for master window. */
struct Slave *slavePtr; /* First in linked list of slaves placed
* relative to this master. */
+ int *abortPtr; /* If non-NULL, it means that there is a nested
+ * call to RecomputePlacement already working on
+ * this window. *abortPtr may be set to 1 to
+ * abort that nested call. This happens, for
+ * example, if tkwin or any of its slaves
+ * is deleted. */
int flags; /* See below for bit definitions. */
} Master;
@@ -503,6 +509,10 @@ UnlinkSlave(
}
}
}
+
+ if (masterPtr->abortPtr != NULL) {
+ *masterPtr->abortPtr = 1;
+ }
slavePtr->masterPtr = NULL;
}
@@ -537,6 +547,7 @@ CreateMaster(
masterPtr = (Master *) ckalloc(sizeof(Master));
masterPtr->tkwin = tkwin;
masterPtr->slavePtr = NULL;
+ masterPtr->abortPtr = NULL;
masterPtr->flags = 0;
Tcl_SetHashValue(hPtr, masterPtr);
Tk_CreateEventHandler(masterPtr->tkwin, StructureNotifyMask,
@@ -846,14 +857,32 @@ RecomputePlacement(
int masterWidth, masterHeight, masterX, masterY;
double x1, y1, x2, y2;
+ int abort; /* May get set to non-zero to abort this
+ * placement operation. */
+
masterPtr->flags &= ~PARENT_RECONFIG_PENDING;
+
+ /*
+ * Abort any nested call to RecomputePlacement for this window, since
+ * we'll do everything necessary here, and set up so this call
+ * can be aborted if necessary.
+ */
+
+ if (masterPtr->abortPtr != NULL) {
+ *masterPtr->abortPtr = 1;
+ }
+ masterPtr->abortPtr = &abort;
+ abort = 0;
+ Tcl_Preserve((ClientData) masterPtr);
/*
* Iterate over all the slaves for the master. Each slave's geometry can
- * be computed independently of the other slaves.
+ * be computed independently of the other slaves. Changes to the window's
+ * structure could cause almost anything to happen, including deleting the
+ * parent or child. If this happens, we'll be told to abort.
*/
- for (slavePtr = masterPtr->slavePtr; slavePtr != NULL;
+ for (slavePtr = masterPtr->slavePtr; slavePtr != NULL && !abort;
slavePtr = slavePtr->nextPtr) {
/*
* Step 1: compute size and borderwidth of master, taking into account
@@ -993,6 +1022,9 @@ RecomputePlacement(
|| (height != Tk_Height(slavePtr->tkwin))) {
Tk_MoveResizeWindow(slavePtr->tkwin, x, y, width, height);
}
+ if (abort) {
+ break;
+ }
/*
* Don't map the slave unless the master is mapped: the slave will
@@ -1012,6 +1044,9 @@ RecomputePlacement(
}
}
}
+
+ masterPtr->abortPtr = NULL;
+ Tcl_Release((ClientData) masterPtr);
}
/*
@@ -1061,7 +1096,10 @@ MasterStructureProc(
Tcl_CancelIdleCall(RecomputePlacement, (ClientData) masterPtr);
}
masterPtr->tkwin = NULL;
- ckfree((char *) masterPtr);
+ if (masterPtr->abortPtr != NULL) {
+ *masterPtr->abortPtr = 1;
+ }
+ Tcl_EventuallyFree((ClientData) masterPtr, TCL_DYNAMIC);
} else if (eventPtr->type == MapNotify) {
/*
* When a master gets mapped, must redo the geometry computation so
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index 48dcea0..31bf47d 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -1,4 +1,4 @@
-/* $Id: ttkButton.c,v 1.6 2007/01/11 14:49:46 jenglish Exp $
+/* $Id: ttkButton.c,v 1.6.2.1 2007/10/27 04:23:15 dgp Exp $
* Copyright (c) 2003, Joe English
*
* label, button, checkbutton, radiobutton, and menubutton widgets.
@@ -194,9 +194,8 @@ BasePostConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
return status;
}
-
/*------------------------------------------------------------------------
- * +++ Label widget:
+ * +++ Label widget.
* Just a base widget that adds a few appearance-related options
*/
@@ -275,6 +274,12 @@ static WidgetSpec LabelWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(LabelLayout)
+ TTK_GROUP("Label.border", TTK_FILL_BOTH|TTK_BORDER,
+ TTK_GROUP("Label.padding", TTK_FILL_BOTH|TTK_BORDER,
+ TTK_NODE("Label.label", TTK_FILL_BOTH)))
+TTK_END_LAYOUT
+
/*------------------------------------------------------------------------
* +++ Button widget.
* Adds a new subcommand "invoke", and options "-command" and "-default"
@@ -377,6 +382,13 @@ static WidgetSpec ButtonWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(ButtonLayout)
+ TTK_GROUP("Button.border", TTK_FILL_BOTH|TTK_BORDER,
+ TTK_GROUP("Button.focus", TTK_FILL_BOTH,
+ TTK_GROUP("Button.padding", TTK_FILL_BOTH,
+ TTK_NODE("Button.label", TTK_FILL_BOTH))))
+TTK_END_LAYOUT
+
/*------------------------------------------------------------------------
* +++ Checkbutton widget.
*/
@@ -569,6 +581,13 @@ static WidgetSpec CheckbuttonWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(CheckbuttonLayout)
+ TTK_GROUP("Checkbutton.padding", TTK_FILL_BOTH,
+ TTK_NODE("Checkbutton.indicator", TTK_PACK_LEFT)
+ TTK_GROUP("Checkbutton.focus", TTK_PACK_LEFT | TTK_STICK_W,
+ TTK_NODE("Checkbutton.label", TTK_FILL_BOTH)))
+TTK_END_LAYOUT
+
/*------------------------------------------------------------------------
* +++ Radiobutton widget.
*/
@@ -740,6 +759,13 @@ static WidgetSpec RadiobuttonWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(RadiobuttonLayout)
+ TTK_GROUP("Radiobutton.padding", TTK_FILL_BOTH,
+ TTK_NODE("Radiobutton.indicator", TTK_PACK_LEFT)
+ TTK_GROUP("Radiobutton.focus", TTK_PACK_LEFT,
+ TTK_NODE("Radiobutton.label", TTK_FILL_BOTH)))
+TTK_END_LAYOUT
+
/*------------------------------------------------------------------------
* +++ Menubutton widget.
*/
@@ -802,13 +828,29 @@ static WidgetSpec MenubuttonWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
-/*
- * Initialization:
+TTK_BEGIN_LAYOUT(MenubuttonLayout)
+ TTK_GROUP("Menubutton.border", TTK_FILL_BOTH,
+ TTK_GROUP("Menubutton.focus", TTK_FILL_BOTH,
+ TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT)
+ TTK_GROUP("Menubutton.padding", TTK_PACK_LEFT|TTK_EXPAND|TTK_FILL_X,
+ TTK_NODE("Menubutton.label", TTK_PACK_LEFT))))
+TTK_END_LAYOUT
+
+/*------------------------------------------------------------------------
+ * +++ Initialization.
*/
MODULE_SCOPE
void TtkButton_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme, "TLabel", LabelLayout);
+ Ttk_RegisterLayout(theme, "TButton", ButtonLayout);
+ Ttk_RegisterLayout(theme, "TCheckbutton", CheckbuttonLayout);
+ Ttk_RegisterLayout(theme, "TRadiobutton", RadiobuttonLayout);
+ Ttk_RegisterLayout(theme, "TMenubutton", MenubuttonLayout);
+
RegisterWidget(interp, "ttk::label", &LabelWidgetSpec);
RegisterWidget(interp, "ttk::button", &ButtonWidgetSpec);
RegisterWidget(interp, "ttk::checkbutton", &CheckbuttonWidgetSpec);
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index f64b138..4cd3924 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -1,10 +1,9 @@
/*
- * $Id: ttkClamTheme.c,v 1.5 2007/01/11 19:59:26 jenglish Exp $
+ * $Id: ttkClamTheme.c,v 1.5.2.1 2007/10/27 04:23:15 dgp Exp $
*
* Copyright (C) 2004 Joe English
*
- * Ttk widget set: another theme engine.
- * Inspired by the XFCE family of Gnome themes.
+ * "clam" theme; inspired by the XFCE family of Gnome themes.
*/
#include <tk.h>
@@ -131,7 +130,7 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = {
* the excess is used as padding.
*/
-static void BorderElementGeometry(
+static void BorderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -184,7 +183,7 @@ static Ttk_ElementSpec BorderElementSpec = {
TK_STYLE_VERSION_2,
sizeof(BorderElement),
BorderElementOptions,
- BorderElementGeometry,
+ BorderElementSize,
BorderElementDraw
};
@@ -211,7 +210,7 @@ static Ttk_ElementOptionSpec FieldElementOptions[] = {
{0,0,0}
};
-static void FieldElementGeometry(
+static void FieldElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -237,7 +236,7 @@ static Ttk_ElementSpec FieldElementSpec = {
TK_STYLE_VERSION_2,
sizeof(FieldElement),
FieldElementOptions,
- FieldElementGeometry,
+ FieldElementSize,
FieldElementDraw
};
@@ -264,7 +263,7 @@ static Ttk_ElementSpec ComboboxFieldElementSpec = {
TK_STYLE_VERSION_2,
sizeof(FieldElement),
FieldElementOptions,
- FieldElementGeometry,
+ FieldElementSize,
ComboboxFieldElementDraw
};
@@ -297,8 +296,7 @@ static Ttk_ElementOptionSpec IndicatorElementOptions[] = {
{0,0,0}
};
-static void
-IndicatorElementGeometry(
+static void IndicatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -309,8 +307,7 @@ IndicatorElementGeometry(
*widthPtr = *heightPtr = size;
}
-static void
-RadioIndicatorElementDraw(
+static void RadioIndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned state)
{
@@ -338,8 +335,7 @@ RadioIndicatorElementDraw(
}
}
-static void
-CheckIndicatorElementDraw(
+static void CheckIndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned state)
{
@@ -383,7 +379,7 @@ static Ttk_ElementSpec RadioIndicatorElementSpec = {
TK_STYLE_VERSION_2,
sizeof(IndicatorElement),
IndicatorElementOptions,
- IndicatorElementGeometry,
+ IndicatorElementSize,
RadioIndicatorElementDraw
};
@@ -391,7 +387,7 @@ static Ttk_ElementSpec CheckIndicatorElementSpec = {
TK_STYLE_VERSION_2,
sizeof(IndicatorElement),
IndicatorElementOptions,
- IndicatorElementGeometry,
+ IndicatorElementSize,
CheckIndicatorElementDraw
};
@@ -594,11 +590,11 @@ static Ttk_ElementSpec TroughElementSpec = {
TK_STYLE_VERSION_2,
sizeof(ScrollbarElement),
ScrollbarElementOptions,
- TtkNullElementGeometry,
+ TtkNullElementSize,
TroughElementDraw
};
-static void ThumbElementGeometry(
+static void ThumbElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -656,14 +652,14 @@ static Ttk_ElementSpec ThumbElementSpec = {
TK_STYLE_VERSION_2,
sizeof(ScrollbarElement),
ScrollbarElementOptions,
- ThumbElementGeometry,
+ ThumbElementSize,
ThumbElementDraw
};
/*------------------------------------------------------------------------
* +++ Slider element.
*/
-static void SliderElementGeometry(
+static void SliderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -688,18 +684,18 @@ static Ttk_ElementSpec SliderElementSpec = {
TK_STYLE_VERSION_2,
sizeof(ScrollbarElement),
ScrollbarElementOptions,
- SliderElementGeometry,
+ SliderElementSize,
ThumbElementDraw
};
/*------------------------------------------------------------------------
* +++ Progress bar element
*/
-static void PbarElementGeometry(
+static void PbarElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
- SliderElementGeometry(clientData, elementRecord, tkwin,
+ SliderElementSize(clientData, elementRecord, tkwin,
widthPtr, heightPtr, paddingPtr);
*paddingPtr = Ttk_UniformPadding(2);
}
@@ -724,7 +720,7 @@ static Ttk_ElementSpec PbarElementSpec = {
TK_STYLE_VERSION_2,
sizeof(ScrollbarElement),
ScrollbarElementOptions,
- PbarElementGeometry,
+ PbarElementSize,
PbarElementDraw
};
@@ -734,7 +730,7 @@ static Ttk_ElementSpec PbarElementSpec = {
*/
static int ArrowElements[] = { ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT };
-static void ArrowElementGeometry(
+static void ArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -772,7 +768,7 @@ static Ttk_ElementSpec ArrowElementSpec = {
TK_STYLE_VERSION_2,
sizeof(ScrollbarElement),
ScrollbarElementOptions,
- ArrowElementGeometry,
+ ArrowElementSize,
ArrowElementDraw
};
@@ -803,7 +799,7 @@ static Ttk_ElementOptionSpec NotebookElementOptions[] = {
{0,0,0}
};
-static void TabElementGeometry(
+static void TabElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -854,11 +850,11 @@ static Ttk_ElementSpec TabElementSpec =
TK_STYLE_VERSION_2,
sizeof(NotebookElement),
NotebookElementOptions,
- TabElementGeometry,
+ TabElementSize,
TabElementDraw
};
-static void ClientElementGeometry(
+static void ClientElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -885,7 +881,7 @@ static Ttk_ElementSpec ClientElementSpec =
TK_STYLE_VERSION_2,
sizeof(NotebookElement),
NotebookElementOptions,
- ClientElementGeometry,
+ ClientElementSize,
ClientElementDraw
};
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index 19164aa..a5f4302 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -1,11 +1,9 @@
/*
- * $Id: ttkClassicTheme.c,v 1.3 2006/11/07 03:45:27 jenglish Exp $
+ * $Id: ttkClassicTheme.c,v 1.3.2.1 2007/10/27 04:23:15 dgp Exp $
*
* Copyright (c) 2004, Joe English
*
- * Ttk widget set: classic theme.
- *
- * Implements the "classic" Motif-like Tk look.
+ * "classic" theme; implements the classic Motif-like Tk look.
*
*/
@@ -35,10 +33,9 @@ static Ttk_ElementOptionSpec HighlightElementOptions[] = {
{NULL}
};
-static void
-HighlightElementSize(
- void *clientData, void *elementRecord,
- Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+static void HighlightElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
HighlightElement *hl = elementRecord;
int highlightThickness = 0;
@@ -47,9 +44,9 @@ HighlightElementSize(
*paddingPtr = Ttk_UniformPadding((short)highlightThickness);
}
-static void
-HighlightElementDraw(void *clientData, void *elementRecord,
- Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state)
+static void HighlightElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
HighlightElement *hl = elementRecord;
int highlightThickness = 0;
@@ -101,8 +98,7 @@ static Ttk_ElementOptionSpec ButtonBorderElementOptions[] =
{NULL}
};
-static void
-ButtonBorderElementSize(
+static void ButtonBorderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -124,8 +120,7 @@ ButtonBorderElementSize(
* padding for default ring is drawn in the wrong color
* when the button is active.)
*/
-static void
-ButtonBorderElementDraw(
+static void ButtonBorderElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index ec3ad93..47f5582 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -1,4 +1,4 @@
-/* $Id: ttkDefaultTheme.c,v 1.7 2007/01/11 19:59:26 jenglish Exp $
+/* $Id: ttkDefaultTheme.c,v 1.7.2.1 2007/10/27 04:23:15 dgp Exp $
*
* Copyright (c) 2003, Joe English
*
@@ -276,8 +276,7 @@ static void BorderElementSize(
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
-static void
-BorderElementDraw(
+static void BorderElementDraw(
void *clientData, void *elementRecord,
Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state)
{
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index 3c5c4c8..8c61f7d 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -1,4 +1,4 @@
-/* $Id: ttkElements.c,v 1.6 2007/01/11 19:59:26 jenglish Exp $
+/* $Id: ttkElements.c,v 1.6.2.1 2007/10/27 04:23:15 dgp Exp $
*
* Copyright (c) 2003, Joe English
*
@@ -25,7 +25,7 @@
/* public */ Ttk_ElementOptionSpec TtkNullElementOptions[] = { {NULL} };
/* public */ void
-TtkNullElementGeometry(
+TtkNullElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -43,7 +43,7 @@ TtkNullElementDraw(
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- TtkNullElementGeometry,
+ TtkNullElementSize,
TtkNullElementDraw
};
@@ -67,15 +67,13 @@ static Ttk_ElementOptionSpec BackgroundElementOptions[] =
{NULL}
};
-static void
-BackgroundElementGeometry(
+static void BackgroundElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
}
-static void
-BackgroundElementDraw(
+static void BackgroundElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -92,7 +90,7 @@ static Ttk_ElementSpec BackgroundElementSpec =
TK_STYLE_VERSION_2,
sizeof(BackgroundElement),
BackgroundElementOptions,
- BackgroundElementGeometry,
+ BackgroundElementSize,
BackgroundElementDraw
};
@@ -108,17 +106,16 @@ typedef struct {
static Ttk_ElementOptionSpec BorderElementOptions[] =
{
- { "-background", TK_OPTION_BORDER,
+ { "-background", TK_OPTION_BORDER,
Tk_Offset(BorderElement,borderObj), DEFAULT_BACKGROUND },
- { "-borderwidth", TK_OPTION_PIXELS,
+ { "-borderwidth", TK_OPTION_PIXELS,
Tk_Offset(BorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
- { "-relief", TK_OPTION_RELIEF,
+ { "-relief", TK_OPTION_RELIEF,
Tk_Offset(BorderElement,reliefObj), "flat" },
{NULL}
};
-static void
-BorderElementGeometry(
+static void BorderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -128,8 +125,7 @@ BorderElementGeometry(
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
-static void
-BorderElementDraw(
+static void BorderElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -152,7 +148,7 @@ static Ttk_ElementSpec BorderElementSpec =
TK_STYLE_VERSION_2,
sizeof(BorderElement),
BorderElementOptions,
- BorderElementGeometry,
+ BorderElementSize,
BorderElementDraw
};
@@ -173,8 +169,7 @@ static Ttk_ElementOptionSpec FieldElementOptions[] = {
{NULL}
};
-static void
-FieldElementGeometry(
+static void FieldElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -184,8 +179,7 @@ FieldElementGeometry(
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
-static void
-FieldElementDraw(
+static void FieldElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -203,7 +197,7 @@ static Ttk_ElementSpec FieldElementSpec =
TK_STYLE_VERSION_2,
sizeof(FieldElement),
FieldElementOptions,
- FieldElementGeometry,
+ FieldElementSize,
FieldElementDraw
};
@@ -213,7 +207,7 @@ static Ttk_ElementSpec FieldElementSpec =
*
* This element has no visual representation, only geometry.
* It adds a (possibly non-uniform) internal border.
- * In addition, if "-shiftrelief" is specified,
+ * In addition, if "-shiftrelief" is specified,
* adds additional pixels to shift child elements "in" or "out"
* depending on the -relief.
*/
@@ -235,8 +229,7 @@ static Ttk_ElementOptionSpec PaddingElementOptions[] =
{NULL}
};
-static void
-PaddingElementGeometry(
+static void PaddingElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -251,8 +244,7 @@ PaddingElementGeometry(
*paddingPtr = Ttk_RelievePadding(pad, relief, shiftRelief);
}
-static void
-PaddingElementDraw(
+static void PaddingElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -264,7 +256,7 @@ static Ttk_ElementSpec PaddingElementSpec =
TK_STYLE_VERSION_2,
sizeof(PaddingElement),
PaddingElementOptions,
- PaddingElementGeometry,
+ PaddingElementSize,
PaddingElementDraw
};
@@ -309,8 +301,7 @@ static Ttk_ElementOptionSpec FocusElementOptions[] = {
{NULL}
};
-static void
-FocusElementGeometry(
+static void FocusElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -321,8 +312,7 @@ FocusElementGeometry(
*paddingPtr = Ttk_UniformPadding((short)focusThickness);
}
-static void
-FocusElementDraw(
+static void FocusElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -340,7 +330,7 @@ static Ttk_ElementSpec FocusElementSpec =
TK_STYLE_VERSION_2,
sizeof(FocusElement),
FocusElementOptions,
- FocusElementGeometry,
+ FocusElementSize,
FocusElementDraw
};
@@ -366,16 +356,14 @@ static Ttk_ElementOptionSpec SeparatorElementOptions[] =
{NULL}
};
-static void
-SeparatorElementGeometry(
+static void SeparatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
*widthPtr = *heightPtr = 2;
}
-static void
-HorizontalSeparatorElementDraw(
+static void HorizontalSeparatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -388,8 +376,7 @@ HorizontalSeparatorElementDraw(
XDrawLine(Tk_Display(tkwin), d, lightGC, b.x, b.y+1, b.x + b.width, b.y+1);
}
-static void
-VerticalSeparatorElementDraw(
+static void VerticalSeparatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -402,8 +389,7 @@ VerticalSeparatorElementDraw(
XDrawLine(Tk_Display(tkwin), d, lightGC, b.x+1, b.y, b.x+1, b.y+b.height);
}
-static void
-GeneralSeparatorElementDraw(
+static void GeneralSeparatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -427,7 +413,7 @@ static Ttk_ElementSpec HorizontalSeparatorElementSpec =
TK_STYLE_VERSION_2,
sizeof(SeparatorElement),
SeparatorElementOptions,
- SeparatorElementGeometry,
+ SeparatorElementSize,
HorizontalSeparatorElementDraw
};
@@ -436,7 +422,7 @@ static Ttk_ElementSpec VerticalSeparatorElementSpec =
TK_STYLE_VERSION_2,
sizeof(SeparatorElement),
SeparatorElementOptions,
- SeparatorElementGeometry,
+ SeparatorElementSize,
HorizontalSeparatorElementDraw
};
@@ -445,7 +431,7 @@ static Ttk_ElementSpec SeparatorElementSpec =
TK_STYLE_VERSION_2,
sizeof(SeparatorElement),
SeparatorElementOptions,
- SeparatorElementGeometry,
+ SeparatorElementSize,
GeneralSeparatorElementDraw
};
@@ -540,8 +526,7 @@ static Ttk_ElementOptionSpec IndicatorElementOptions[] =
/*
* Checkbutton indicators (default): 3-D square.
*/
-static void
-SquareIndicatorElementGeometry(
+static void SquareIndicatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -552,8 +537,7 @@ SquareIndicatorElementGeometry(
*widthPtr = *heightPtr = diameter;
}
-static void
-SquareIndicatorElementDraw(
+static void SquareIndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -582,8 +566,7 @@ SquareIndicatorElementDraw(
/*
* Radiobutton indicators: 3-D diamond.
*/
-static void
-DiamondIndicatorElementGeometry(
+static void DiamondIndicatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -594,8 +577,7 @@ DiamondIndicatorElementGeometry(
*widthPtr = *heightPtr = diameter + 3;
}
-static void
-DiamondIndicatorElementDraw(
+static void DiamondIndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -636,7 +618,7 @@ static Ttk_ElementSpec CheckbuttonIndicatorElementSpec =
TK_STYLE_VERSION_2,
sizeof(IndicatorElement),
IndicatorElementOptions,
- SquareIndicatorElementGeometry,
+ SquareIndicatorElementSize,
SquareIndicatorElementDraw
};
@@ -645,7 +627,7 @@ static Ttk_ElementSpec RadiobuttonIndicatorElementSpec =
TK_STYLE_VERSION_2,
sizeof(IndicatorElement),
IndicatorElementOptions,
- DiamondIndicatorElementGeometry,
+ DiamondIndicatorElementSize,
DiamondIndicatorElementDraw
};
@@ -686,8 +668,7 @@ static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] =
{ NULL }
};
-static void
-MenuIndicatorElementGeometry(
+static void MenuIndicatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -697,8 +678,7 @@ MenuIndicatorElementGeometry(
Ttk_GetPaddingFromObj(NULL,tkwin,mi->marginObj,paddingPtr);
}
-static void
-MenuIndicatorElementDraw(
+static void MenuIndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -719,7 +699,7 @@ static Ttk_ElementSpec MenuIndicatorElementSpec =
TK_STYLE_VERSION_2,
sizeof(MenuIndicatorElement),
MenuIndicatorElementOptions,
- MenuIndicatorElementGeometry,
+ MenuIndicatorElementSize,
MenuIndicatorElementDraw
};
@@ -742,7 +722,7 @@ typedef struct
static Ttk_ElementOptionSpec ArrowElementOptions[] =
{
- { "-background", TK_OPTION_BORDER,
+ { "-background", TK_OPTION_BORDER,
Tk_Offset(ArrowElement,borderObj), DEFAULT_BACKGROUND },
{ "-relief",TK_OPTION_RELIEF,
Tk_Offset(ArrowElement,reliefObj),"raised"},
@@ -750,15 +730,14 @@ static Ttk_ElementOptionSpec ArrowElementOptions[] =
Tk_Offset(ArrowElement,borderWidthObj), "1" },
{ "-arrowcolor",TK_OPTION_COLOR,
Tk_Offset(ArrowElement,colorObj),"black"},
- { "-arrowsize", TK_OPTION_PIXELS,
+ { "-arrowsize", TK_OPTION_PIXELS,
Tk_Offset(ArrowElement,sizeObj), "14" },
{ NULL }
};
static Ttk_Padding ArrowPadding = { 3,3,3,3 };
-static void
-ArrowElementGeometry(
+static void ArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -772,8 +751,7 @@ ArrowElementGeometry(
*paddingPtr = ArrowPadding;
}
-static void
-ArrowElementDraw(
+static void ArrowElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -798,11 +776,10 @@ static Ttk_ElementSpec ArrowElementSpec =
TK_STYLE_VERSION_2,
sizeof(ArrowElement),
ArrowElementOptions,
- ArrowElementGeometry,
+ ArrowElementSize,
ArrowElementDraw
};
-
/*----------------------------------------------------------------------
* +++ Trough element.
*
@@ -827,8 +804,7 @@ static Ttk_ElementOptionSpec TroughElementOptions[] =
{ NULL }
};
-static void
-TroughElementGeometry(
+static void TroughElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -839,8 +815,7 @@ TroughElementGeometry(
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
-static void
-TroughElementDraw(
+static void TroughElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -861,7 +836,7 @@ static Ttk_ElementSpec TroughElementSpec =
TK_STYLE_VERSION_2,
sizeof(TroughElement),
TroughElementOptions,
- TroughElementGeometry,
+ TroughElementSize,
TroughElementDraw
};
@@ -896,8 +871,7 @@ static Ttk_ElementOptionSpec ThumbElementOptions[] =
{ NULL }
};
-static void
-ThumbElementGeometry(
+static void ThumbElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -916,8 +890,7 @@ ThumbElementGeometry(
}
}
-static void
-ThumbElementDraw(
+static void ThumbElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -936,7 +909,7 @@ static Ttk_ElementSpec ThumbElementSpec =
TK_STYLE_VERSION_2,
sizeof(ThumbElement),
ThumbElementOptions,
- ThumbElementGeometry,
+ ThumbElementSize,
ThumbElementDraw
};
@@ -974,8 +947,7 @@ static Ttk_ElementOptionSpec SliderElementOptions[] =
{ NULL }
};
-static void
-SliderElementGeometry(
+static void SliderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -999,8 +971,7 @@ SliderElementGeometry(
}
}
-static void
-SliderElementDraw(
+static void SliderElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -1047,7 +1018,7 @@ static Ttk_ElementSpec SliderElementSpec =
TK_STYLE_VERSION_2,
sizeof(SliderElement),
SliderElementOptions,
- SliderElementGeometry,
+ SliderElementSize,
SliderElementDraw
};
@@ -1057,7 +1028,7 @@ static Ttk_ElementSpec SliderElementSpec =
*
* -thickness specifies the size along the short axis of the bar.
* -length specifies the default size along the long axis;
- * the bar will be this long in indeterminate mode.
+ * the bar will be this long in indeterminate mode.
*/
#define DEFAULT_PBAR_THICKNESS "15"
@@ -1090,7 +1061,7 @@ static Ttk_ElementOptionSpec PbarElementOptions[] =
{ NULL }
};
-static void PbarElementGeometry(
+static void PbarElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -1136,7 +1107,7 @@ static Ttk_ElementSpec PbarElementSpec = {
TK_STYLE_VERSION_2,
sizeof(PbarElement),
PbarElementOptions,
- PbarElementGeometry,
+ PbarElementSize,
PbarElementDraw
};
@@ -1157,8 +1128,7 @@ static Ttk_ElementOptionSpec TabElementOptions[] = {
{0,0,0,0}
};
-static void
-TabElementGeometry(
+static void TabElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -1169,8 +1139,7 @@ TabElementGeometry(
paddingPtr->bottom = 0;
}
-static void
-TabElementDraw(
+static void TabElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -1227,7 +1196,7 @@ static Ttk_ElementSpec TabElementSpec =
TK_STYLE_VERSION_2,
sizeof(TabElement),
TabElementOptions,
- TabElementGeometry,
+ TabElementSize,
TabElementDraw
};
@@ -1238,8 +1207,7 @@ static Ttk_ElementSpec TabElementSpec =
typedef TabElement ClientElement;
#define ClientElementOptions TabElementOptions
-static void
-ClientElementDraw(
+static void ClientElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
@@ -1253,8 +1221,7 @@ ClientElementDraw(
b.x, b.y, b.width, b.height, borderWidth,TK_RELIEF_RAISED);
}
-static void
-ClientElementGeometry(
+static void ClientElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -1269,97 +1236,13 @@ static Ttk_ElementSpec ClientElementSpec =
TK_STYLE_VERSION_2,
sizeof(ClientElement),
ClientElementOptions,
- ClientElementGeometry,
+ ClientElementSize,
ClientElementDraw
};
-
-/*------------------------------------------------------------------------
- * +++ Widget layouts.
- */
-
-TTK_BEGIN_LAYOUT(FrameLayout)
- TTK_NODE("Frame.border", TTK_FILL_BOTH)
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(LabelframeLayout)
- /* Note: labelframe widget does its own layout */
- TTK_NODE("Labelframe.border", TTK_FILL_BOTH)
- TTK_NODE("Labelframe.text", TTK_FILL_BOTH)
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(LabelLayout)
- TTK_GROUP("Label.border", TTK_FILL_BOTH|TTK_BORDER,
- TTK_GROUP("Label.padding", TTK_FILL_BOTH|TTK_BORDER,
- TTK_NODE("Label.label", TTK_FILL_BOTH)))
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(ButtonLayout)
- TTK_GROUP("Button.border", TTK_FILL_BOTH|TTK_BORDER,
- TTK_GROUP("Button.focus", TTK_FILL_BOTH,
- TTK_GROUP("Button.padding", TTK_FILL_BOTH,
- TTK_NODE("Button.label", TTK_FILL_BOTH))))
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(CheckbuttonLayout)
- TTK_GROUP("Checkbutton.padding", TTK_FILL_BOTH,
- TTK_NODE("Checkbutton.indicator", TTK_PACK_LEFT)
- TTK_GROUP("Checkbutton.focus", TTK_PACK_LEFT | TTK_STICK_W,
- TTK_NODE("Checkbutton.label", TTK_FILL_BOTH)))
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(RadiobuttonLayout)
- TTK_GROUP("Radiobutton.padding", TTK_FILL_BOTH,
- TTK_NODE("Radiobutton.indicator", TTK_PACK_LEFT)
- TTK_GROUP("Radiobutton.focus", TTK_PACK_LEFT,
- TTK_NODE("Radiobutton.label", TTK_FILL_BOTH)))
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(MenubuttonLayout)
- TTK_GROUP("Menubutton.border", TTK_FILL_BOTH,
- TTK_GROUP("Menubutton.focus", TTK_FILL_BOTH,
- TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT)
- TTK_GROUP("Menubutton.padding", TTK_PACK_LEFT|TTK_EXPAND|TTK_FILL_X,
- TTK_NODE("Menubutton.label", TTK_PACK_LEFT))))
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(VerticalScrollbarLayout)
- TTK_GROUP("Vertical.Scrollbar.trough", TTK_FILL_Y,
- TTK_NODE("Vertical.Scrollbar.uparrow", TTK_PACK_TOP)
- TTK_NODE("Vertical.Scrollbar.downarrow", TTK_PACK_BOTTOM)
- TTK_NODE(
- "Vertical.Scrollbar.thumb", TTK_PACK_TOP|TTK_EXPAND|TTK_FILL_BOTH))
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(HorizontalScrollbarLayout)
- TTK_GROUP("Horizontal.Scrollbar.trough", TTK_FILL_X,
- TTK_NODE("Horizontal.Scrollbar.leftarrow", TTK_PACK_LEFT)
- TTK_NODE("Horizontal.Scrollbar.rightarrow", TTK_PACK_RIGHT)
- TTK_NODE(
- "Horizontal.Scrollbar.thumb", TTK_PACK_LEFT|TTK_EXPAND|TTK_FILL_BOTH))
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(VerticalScaleLayout)
- TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH,
- TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP) )
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(HorizontalScaleLayout)
- TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH,
- TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT) )
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(SeparatorLayout)
- TTK_NODE("Separator.separator", TTK_FILL_BOTH)
-TTK_END_LAYOUT
-
-TTK_BEGIN_LAYOUT(SizegripLayout)
- TTK_NODE("Sizegrip.sizegrip", TTK_PACK_BOTTOM|TTK_STICK_S|TTK_STICK_E)
-TTK_END_LAYOUT
-
/*----------------------------------------------------------------------
* TtkElements_Init --
- * Register elements and default layouts.
+ * Register default element implementations.
*/
MODULE_SCOPE
@@ -1406,9 +1289,9 @@ void TtkElements_Init(Tcl_Interp *interp)
Ttk_RegisterElement(interp, theme, "separator",
&SeparatorElementSpec, NULL);
- Ttk_RegisterElement(interp, theme, "hseparator",
+ Ttk_RegisterElement(interp, theme, "hseparator",
&HorizontalSeparatorElementSpec, NULL);
- Ttk_RegisterElement(interp, theme, "vseparator",
+ Ttk_RegisterElement(interp, theme, "vseparator",
&VerticalSeparatorElementSpec, NULL);
Ttk_RegisterElement(interp, theme, "sizegrip", &SizegripElementSpec, NULL);
@@ -1417,25 +1300,6 @@ void TtkElements_Init(Tcl_Interp *interp)
Ttk_RegisterElement(interp, theme, "client", &ClientElementSpec, NULL);
/*
- * Layouts:
- */
- Ttk_RegisterLayout(theme, "TFrame", FrameLayout);
- Ttk_RegisterLayout(theme, "TLabelframe", LabelframeLayout);
- Ttk_RegisterLayout(theme, "TLabel", LabelLayout);
- Ttk_RegisterLayout(theme, "TButton", ButtonLayout);
- Ttk_RegisterLayout(theme, "TCheckbutton", CheckbuttonLayout);
- Ttk_RegisterLayout(theme, "TRadiobutton", RadiobuttonLayout);
- Ttk_RegisterLayout(theme, "TMenubutton", MenubuttonLayout);
- Ttk_RegisterLayout(theme,
- "Vertical.TScrollbar", VerticalScrollbarLayout);
- Ttk_RegisterLayout(theme,
- "Horizontal.TScrollbar", HorizontalScrollbarLayout);
- Ttk_RegisterLayout(theme, "Vertical.TScale", VerticalScaleLayout);
- Ttk_RegisterLayout(theme, "Horizontal.TScale", HorizontalScaleLayout);
- Ttk_RegisterLayout(theme, "TSeparator", SeparatorLayout);
- Ttk_RegisterLayout(theme, "TSizegrip", SizegripLayout);
-
- /*
* Register "default" as a user-loadable theme (for now):
*/
Tcl_PkgProvide(interp, "ttk::theme::default", TTK_VERSION);
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index 9732d7c..0866116 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -1,4 +1,4 @@
-/* $Id: ttkFrame.c,v 1.5.2.1 2007/06/12 16:22:40 dgp Exp $
+/* $Id: ttkFrame.c,v 1.5.2.2 2007/10/27 04:23:15 dgp Exp $
* Copyright (c) 2004, Joe English
*
* ttk::frame and ttk::labelframe widgets.
@@ -165,6 +165,10 @@ static WidgetSpec FrameWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(FrameLayout)
+ TTK_NODE("Frame.border", TTK_FILL_BOTH)
+TTK_END_LAYOUT
+
/* ======================================================================
* +++ Labelframe widget:
*/
@@ -587,6 +591,11 @@ static WidgetSpec LabelframeWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(LabelframeLayout)
+ TTK_NODE("Labelframe.border", TTK_FILL_BOTH)
+ TTK_NODE("Labelframe.text", TTK_FILL_BOTH)
+TTK_END_LAYOUT
+
/* ======================================================================
* +++ Initialization:
*/
@@ -594,6 +603,12 @@ static WidgetSpec LabelframeWidgetSpec =
MODULE_SCOPE
void TtkFrame_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme, "TFrame", FrameLayout);
+ Ttk_RegisterLayout(theme, "TLabelframe", LabelframeLayout);
+
RegisterWidget(interp, "ttk::frame", &FrameWidgetSpec);
RegisterWidget(interp, "ttk::labelframe", &LabelframeWidgetSpec);
}
+
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 3fe4c08..e1285af 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -1,4 +1,4 @@
-/* $Id: ttkNotebook.c,v 1.8.2.1 2007/06/12 16:22:41 dgp Exp $
+/* $Id: ttkNotebook.c,v 1.8.2.2 2007/10/27 04:23:16 dgp Exp $
* Copyright (c) 2004, Joe English
*
* NOTE-ACTIVE: activeTabIndex is not always correct (it's
@@ -688,7 +688,9 @@ static void TabRemoved(Ttk_Manager *mgr, int index)
TtkRedisplayWidget(&nb->core);
}
-
+/* AddTab --
+ * Add new tab at specified index.
+ */
static int AddTab(
Tcl_Interp *interp, Notebook *nb,
int destIndex, Tk_Window slaveWindow,
@@ -717,6 +719,15 @@ static int AddTab(
}
Ttk_InsertSlave(nb->notebook.mgr, destIndex, slaveWindow, tab);
+
+ /* Adjust indices and/or autoselect first tab:
+ */
+ if (nb->notebook.currentIndex < 0) {
+ SelectTab(nb, destIndex);
+ } else if (nb->notebook.currentIndex >= destIndex) {
+ ++nb->notebook.currentIndex;
+ }
+
return TCL_OK;
}
@@ -859,13 +870,6 @@ static int NotebookAddCommand(
return TCL_ERROR;
}
- /* If no tab is currently selected (or if this is the first tab),
- * select this one:
- */
- if (nb->notebook.currentIndex < 0) {
- SelectTab(nb, index);
- }
-
TtkResizeWidget(&nb->core);
return TCL_OK;
@@ -881,7 +885,6 @@ static int NotebookInsertCommand(
int current = nb->notebook.currentIndex;
int nSlaves = Ttk_NumberSlaves(nb->notebook.mgr);
int srcIndex, destIndex;
- int status = TCL_OK;
if (objc < 4) {
Tcl_WrongNumArgs(interp, 2,objv, "index slave ?options...?");
@@ -895,29 +898,35 @@ static int NotebookInsertCommand(
return TCL_ERROR;
}
- if (TCL_OK != Ttk_GetSlaveIndexFromObj(
- interp, nb->notebook.mgr, objv[3], &srcIndex))
- {
- /* Try adding new slave:
+ if (Tcl_GetString(objv[3])[0] == '.') {
+ /* Window name -- could be new or existing slave.
*/
Tk_Window slaveWindow =
Tk_NameToWindow(interp,Tcl_GetString(objv[3]),nb->core.tkwin);
- /* Check validity.
- */
if (!slaveWindow) {
return TCL_ERROR;
}
- if (TCL_OK != AddTab(interp,nb,destIndex,slaveWindow,objc-4,objv+4)) {
- return TCL_ERROR;
- }
- if (nb->notebook.currentIndex >= destIndex) {
- ++nb->notebook.currentIndex;
+
+ srcIndex = Ttk_SlaveIndex(nb->notebook.mgr, slaveWindow);
+ if (srcIndex < 0) { /* New slave */
+ return AddTab(interp, nb, destIndex, slaveWindow, objc-4,objv+4);
}
- return TCL_OK;
+ } else if (Ttk_GetSlaveIndexFromObj(
+ interp, nb->notebook.mgr, objv[3], &srcIndex) != TCL_OK)
+ {
+ return TCL_ERROR;
}
- /* else - move existing slave: */
+ /* Move existing slave:
+ */
+ if (ConfigureTab(interp, nb,
+ Ttk_SlaveData(nb->notebook.mgr,srcIndex),
+ Ttk_SlaveWindow(nb->notebook.mgr,srcIndex),
+ objc-4,objv+4) != TCL_OK)
+ {
+ return TCL_ERROR;
+ }
if (destIndex >= nSlaves) {
destIndex = nSlaves - 1;
@@ -935,16 +944,9 @@ static int NotebookInsertCommand(
--nb->notebook.currentIndex;
}
- if (objc > 4) {
- status = ConfigureTab(interp, nb,
- Ttk_SlaveData(nb->notebook.mgr,destIndex),
- Ttk_SlaveWindow(nb->notebook.mgr,destIndex),
- objc-4,objv+4);
- }
-
TtkRedisplayWidget(&nb->core);
- return status;
+ return TCL_OK;
}
/* $nb forget $item --
@@ -1300,7 +1302,7 @@ static WidgetSpec NotebookWidgetSpec =
NotebookInitialize, /* initializeProc */
NotebookCleanup, /* cleanupProc */
NotebookConfigure, /* configureProc */
- TtkNullPostConfigure, /* postConfigureProc */
+ TtkNullPostConfigure, /* postConfigureProc */
NotebookGetLayout, /* getLayoutProc */
NotebookSize, /* geometryProc */
NotebookDoLayout, /* layoutProc */
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 1f32d13..bf8c680 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScale.c,v 1.5 2007/01/11 14:49:47 jenglish Exp $
+/* $Id: ttkScale.c,v 1.5.2.1 2007/10/27 04:23:16 dgp Exp $
* Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
*
* ttk::scale widget.
@@ -501,12 +501,27 @@ static WidgetSpec ScaleWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(VerticalScaleLayout)
+ TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH,
+ TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP) )
+TTK_END_LAYOUT
+
+TTK_BEGIN_LAYOUT(HorizontalScaleLayout)
+ TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH,
+ TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT) )
+TTK_END_LAYOUT
+
/*
* Initialization.
*/
MODULE_SCOPE
void TtkScale_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme, "Vertical.TScale", VerticalScaleLayout);
+ Ttk_RegisterLayout(theme, "Horizontal.TScale", HorizontalScaleLayout);
+
RegisterWidget(interp, "ttk::scale", &ScaleWidgetSpec);
}
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index c3be30f..753e856 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScrollbar.c,v 1.5 2007/01/11 14:49:47 jenglish Exp $
+/* $Id: ttkScrollbar.c,v 1.5.2.1 2007/10/27 04:23:16 dgp Exp $
* Copyright (c) 2003, Joe English
*
* ttk::scrollbar widget.
@@ -313,6 +313,22 @@ static WidgetSpec ScrollbarWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(VerticalScrollbarLayout)
+ TTK_GROUP("Vertical.Scrollbar.trough", TTK_FILL_Y,
+ TTK_NODE("Vertical.Scrollbar.uparrow", TTK_PACK_TOP)
+ TTK_NODE("Vertical.Scrollbar.downarrow", TTK_PACK_BOTTOM)
+ TTK_NODE(
+ "Vertical.Scrollbar.thumb", TTK_PACK_TOP|TTK_EXPAND|TTK_FILL_BOTH))
+TTK_END_LAYOUT
+
+TTK_BEGIN_LAYOUT(HorizontalScrollbarLayout)
+ TTK_GROUP("Horizontal.Scrollbar.trough", TTK_FILL_X,
+ TTK_NODE("Horizontal.Scrollbar.leftarrow", TTK_PACK_LEFT)
+ TTK_NODE("Horizontal.Scrollbar.rightarrow", TTK_PACK_RIGHT)
+ TTK_NODE(
+ "Horizontal.Scrollbar.thumb", TTK_PACK_LEFT|TTK_EXPAND|TTK_FILL_BOTH))
+TTK_END_LAYOUT
+
/*------------------------------------------------------------------------
* +++ Initialization.
*/
@@ -320,7 +336,12 @@ static WidgetSpec ScrollbarWidgetSpec =
MODULE_SCOPE
void TtkScrollbar_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme,"Vertical.TScrollbar",VerticalScrollbarLayout);
+ Ttk_RegisterLayout(theme,"Horizontal.TScrollbar",HorizontalScrollbarLayout);
+
RegisterWidget(interp, "ttk::scrollbar", &ScrollbarWidgetSpec);
-}
+}
/*EOF*/
diff --git a/generic/ttk/ttkSeparator.c b/generic/ttk/ttkSeparator.c
index 000db13..0b0b0ee 100644
--- a/generic/ttk/ttkSeparator.c
+++ b/generic/ttk/ttkSeparator.c
@@ -1,4 +1,4 @@
-/* $Id: ttkSeparator.c,v 1.5 2007/01/11 14:49:47 jenglish Exp $
+/* $Id: ttkSeparator.c,v 1.5.2.1 2007/10/27 04:23:16 dgp Exp $
*
* Copyright (c) 2004, Joe English
*
@@ -78,6 +78,10 @@ static WidgetSpec SeparatorWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(SeparatorLayout)
+ TTK_NODE("Separator.separator", TTK_FILL_BOTH)
+TTK_END_LAYOUT
+
/* +++ Sizegrip widget:
* Has no options or methods other than the standard ones.
*/
@@ -108,12 +112,21 @@ static WidgetSpec SizegripWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(SizegripLayout)
+ TTK_NODE("Sizegrip.sizegrip", TTK_PACK_BOTTOM|TTK_STICK_S|TTK_STICK_E)
+TTK_END_LAYOUT
+
/* +++ Initialization:
*/
MODULE_SCOPE
void TtkSeparator_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme, "TSeparator", SeparatorLayout);
+ Ttk_RegisterLayout(theme, "TSizegrip", SizegripLayout);
+
RegisterWidget(interp, "ttk::separator", &SeparatorWidgetSpec);
RegisterWidget(interp, "ttk::sizegrip", &SizegripWidgetSpec);
}
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index 4f1bd0f..85b1580 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -2,7 +2,7 @@
*
* Minimal sample ttk widget.
*
- * $Id: ttkSquare.c,v 1.4 2007/01/11 14:49:47 jenglish Exp $
+ * $Id: ttkSquare.c,v 1.4.2.1 2007/10/27 04:23:16 dgp Exp $
*/
#include <tk.h>
@@ -201,10 +201,9 @@ static Ttk_ElementOptionSpec SquareElementOptions[] =
* size and padding information
*/
-static void
-SquareElementGeometry(
- void *clientData, void *elementRecord,
- Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+static void SquareElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
SquareElement *square = elementRecord;
int borderWidth = 0;
@@ -219,9 +218,9 @@ SquareElementGeometry(
* Draw the element in the box provided.
*/
-static void
-SquareElementDraw(void *clientData, void *elementRecord,
- Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state)
+static void SquareElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
SquareElement *square = elementRecord;
Tk_3DBorder border = NULL, foreground = NULL;
@@ -241,7 +240,7 @@ static Ttk_ElementSpec SquareElementSpec =
TK_STYLE_VERSION_2,
sizeof(SquareElement),
SquareElementOptions,
- SquareElementGeometry,
+ SquareElementSize,
SquareElementDraw
};
diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h
index 12a471e..206784c 100644
--- a/generic/ttk/ttkTheme.h
+++ b/generic/ttk/ttkTheme.h
@@ -1,4 +1,4 @@
-/* $Id: ttkTheme.h,v 1.8 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkTheme.h,v 1.8.2.1 2007/10/27 04:23:16 dgp Exp $
* Copyright (c) 2003 Joe English. Freely redistributable.
*
* Declarations for Tk theme engine.
@@ -270,7 +270,7 @@ typedef struct {
Tcl_Obj *unused;
} NullElement;
-MODULE_SCOPE void TtkNullElementGeometry
+MODULE_SCOPE void TtkNullElementSize
(void *, void *, Tk_Window, int *, int *, Ttk_Padding *);
MODULE_SCOPE void TtkNullElementDraw
(void *, void *, Tk_Window, Drawable, Ttk_Box, Ttk_State);
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 9fa30c1..4e72781 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTreeview.c,v 1.16.2.1 2007/10/15 18:38:33 dgp Exp $
+/* $Id: ttkTreeview.c,v 1.16.2.2 2007/10/27 04:23:16 dgp Exp $
* Copyright (c) 2004, Joe English
*
* ttk::treeview widget implementation.
@@ -3178,7 +3178,7 @@ static Ttk_ElementSpec RowElementSpec =
TK_STYLE_VERSION_2,
sizeof(RowElement),
RowElementOptions,
- TtkNullElementGeometry,
+ TtkNullElementSize,
RowElementDraw
};
diff --git a/library/demos/filebox.tcl b/library/demos/filebox.tcl
index e27974b..0241a11 100644
--- a/library/demos/filebox.tcl
+++ b/library/demos/filebox.tcl
@@ -2,7 +2,7 @@
#
# This demonstration script prompts the user to select a file.
#
-# RCS: @(#) $Id: filebox.tcl,v 1.6 2004/12/21 11:56:35 dkf Exp $
+# RCS: @(#) $Id: filebox.tcl,v 1.6.2.1 2007/10/27 04:23:16 dgp Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -61,10 +61,16 @@ proc fileDialog {w ent operation} {
{"All files" *}
}
if {$operation == "open"} {
- set file [tk_getOpenFile -filetypes $types -parent $w]
+ global selected_type
+ if {![info exists selected_type]} {
+ set selected_type "Tcl Scripts"
+ }
+ set file [tk_getOpenFile -filetypes $types -parent $w \
+ -typevariable selected_type]
+ puts "You selected filetype \"$selected_type\""
} else {
set file [tk_getSaveFile -filetypes $types -parent $w \
- -initialfile Untitled -defaultextension .txt]
+ -initialfile Untitled -defaultextension .txt]
}
if {[string compare $file ""]} {
$ent delete 0 end
diff --git a/library/tk.tcl b/library/tk.tcl
index 4a30f0d..20ce436 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,7 +3,7 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.63.2.3 2007/10/02 20:43:53 dgp Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.63.2.4 2007/10/27 04:23:16 dgp Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index a9228e1..14c1ebd 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.59 2007/02/19 23:52:19 hobbs Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.59.2.1 2007/10/27 04:23:16 dgp Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -867,17 +867,32 @@ proc ::tk::dialog::file:: {type args} {
$data(dirMenuBtn) configure \
-textvariable ::tk::dialog::file::${dataName}(selectPath)
+ # Cleanup previous menu
+ #
+ $data(typeMenu) delete 0 end
+ $data(typeMenuBtn) configure -state normal -text ""
+
# Initialize the file types menu
#
if {[llength $data(-filetypes)]} {
- $data(typeMenu) delete 0 end
+ # Default type and name to first entry
+ set initialtype [lindex $data(-filetypes) 0]
+ set initialTypeName [lindex $initialtype 0]
+ if {($data(-typevariable) ne "")
+ && [uplevel 2 [list info exists $data(-typevariable)]]} {
+ set initialTypeName [uplevel 2 [list set $data(-typevariable)]]
+ }
foreach type $data(-filetypes) {
set title [lindex $type 0]
set filter [lindex $type 1]
$data(typeMenu) add command -label $title \
- -command [list ::tk::dialog::file::SetFilter $w $type]
+ -command [list ::tk::dialog::file::SetFilter $w $type]
+ # string first avoids glob-pattern char issues
+ if {[string first ${initialTypeName} $title] == 0} {
+ set initialtype $type
+ }
}
- SetFilter $w [lindex $data(-filetypes) 0]
+ SetFilter $w $initialtype
$data(typeMenuBtn) configure -state normal
$data(typeMenuLab) configure -state normal
} else {
@@ -949,6 +964,7 @@ proc ::tk::dialog::file::Config {dataName type argList} {
{-initialfile "" "" ""}
{-parent "" "" "."}
{-title "" "" ""}
+ {-typevariable "" "" ""}
}
# The "-multiple" option is only available for the "open" file dialog.
@@ -1383,6 +1399,7 @@ proc ::tk::dialog::file::SetFilter {w type} {
upvar ::tk::dialog::file::[winfo name $w] data
upvar ::tk::$data(icons) icons
+ set data(filterType) $type
set data(filter) [lindex $type 1]
$data(typeMenuBtn) configure -text [lindex $type 0] -indicatoron 1
@@ -1838,6 +1855,12 @@ proc ::tk::dialog::file::Done {w {selectFilePath ""}} {
return
}
}
+ if {[info exists data(-typevariable)] && $data(-typevariable) ne ""
+ && [info exists data(-filetypes)] && [llength $data(-filetypes)]
+ && [info exists data(filterType)] && $data(filterType) ne ""} {
+ upvar 4 $data(-typevariable) initialTypeName
+ set initialTypeName [lindex $data(filterType) 0]
+ }
}
bind $data(okBtn) <Destroy> {}
set Priv(selectFilePath) $selectFilePath
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl
index 2e68a15..39f355e 100644
--- a/library/xmfbox.tcl
+++ b/library/xmfbox.tcl
@@ -4,7 +4,7 @@
# Unix platform. This implementation is used only if the
# "::tk_strictMotif" flag is set.
#
-# RCS: @(#) $Id: xmfbox.tcl,v 1.29 2006/03/17 11:13:15 patthoyts Exp $
+# RCS: @(#) $Id: xmfbox.tcl,v 1.29.2.1 2007/10/27 04:23:16 dgp Exp $
#
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Scriptics Corporation
@@ -157,7 +157,22 @@ proc ::tk::MotifFDialog_FileTypes {w} {
# The filetypes radiobuttons
# set data(fileType) $data(-defaulttype)
+ # Default type to first entry
+ set initialTypeName [lindex $data(-filetypes) 0 0]
+ if {($data(-typevariable) ne "")
+ && [uplevel 4 [list info exists $data(-typevariable)]]} {
+ set initialTypeName [uplevel 4 [list set $data(-typevariable)]]
+ }
+ set ix 0
set data(fileType) 0
+ foreach fltr $data(-filetypes) {
+ set fname [lindex $fltr 0]
+ if {[string first $initialTypeName $fname] == 0} {
+ set data(fileType) $ix
+ break
+ }
+ incr ix
+ }
MotifFDialog_SetFilter $w [lindex $data(-filetypes) $data(fileType)]
@@ -176,7 +191,7 @@ proc ::tk::MotifFDialog_FileTypes {w} {
-text $title \
-variable ::tk::dialog::file::[winfo name $w](fileType) \
-value $cnt \
- -command "[list tk::MotifFDialog_SetFilter $w $type]"
+ -command [list tk::MotifFDialog_SetFilter $w $type]
pack $f.b$cnt -side left
incr cnt
}
@@ -226,6 +241,7 @@ proc ::tk::MotifFDialog_Config {dataName type argList} {
{-initialfile "" "" ""}
{-parent "" "" "."}
{-title "" "" ""}
+ {-typevariable "" "" ""}
}
if {$type eq "open"} {
lappend specs {-multiple "" "" "0"}
@@ -841,10 +857,17 @@ proc ::tk::MotifFDialog_ActivateSEnt {w} {
return
}
}
-
+
lappend newFileList $item
}
+ # Return selected filter
+ if {[info exists data(-typevariable)] && $data(-typevariable) ne ""
+ && [info exists data(-filetypes)] && $data(-filetypes) ne ""} {
+ upvar 2 $data(-typevariable) initialTypeName
+ set initialTypeName [lindex $data(-filetypes) $data(fileType) 0]
+ }
+
if {$data(-multiple) != 0} {
set Priv(selectFilePath) $newFileList
} else {
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 1eef8a9..f0f4f11 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.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: tkMacOSXDialog.c,v 1.25.2.4 2007/09/11 18:32:35 dgp Exp $
+ * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.25.2.5 2007/10/27 04:23:16 dgp Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -38,14 +38,14 @@
* The following structures are used in the GetFileName() function. They store
* information about the file dialog and the file filters.
*/
-
-typedef struct OpenFileData {
- FileFilterList fl; /* List of file filters. */
- SInt16 curType; /* The filetype currently being listed. */
- short popupItem; /* Item number of the popup in the dialog. */
- int usePopup; /* True if we show the popup menu (this is
- * an open operation and the -filetypes
- * option is set). */
+typedef struct _OpenFileData {
+ FileFilterList fl; /* List of file filters. */
+ SInt16 curType; /* The filetype currently being listed. */
+ short initialType; /* Type to use initially */
+ short popupItem; /* Item number of the popup in the dialog. */
+ short usePopup; /* True if we show the popup menu (this */
+ /* is an open operation and the */
+ /* -filetypes option is set). */
} OpenFileData;
typedef struct NavHandlerUserData {
@@ -85,7 +85,8 @@ static int NavServicesGetFile(Tcl_Interp *interp,
OpenFileData *ofd, AEDesc *initialDescPtr,
char *initialFile, AEDescList *selectDescPtr,
CFStringRef title, CFStringRef message,
- int multiple, int isOpen, Tk_Window parent);
+ const char *initialType, int multiple, int isOpen,
+ Tk_Window parent);
static int HandleInitialDirectory(Tcl_Interp *interp,
char *initialFile, char *initialDir, FSRef *dirRef,
AEDescList *selectDescPtr, AEDesc *dirDescPtr);
@@ -261,13 +262,15 @@ Tk_GetOpenFileObjCmd(
AEDesc *initialPtr = NULL;
AEDescList selectDesc = {typeNull, NULL};
char *initialFile = NULL, *initialDir = NULL;
+ Tcl_Obj *typeVariablePtr = NULL;
+ const char *initialtype = NULL;
static const char *openOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-message", "-multiple", "-parent", "-title", NULL
+ "-message", "-multiple", "-parent", "-title", "-typevariable", NULL
};
enum openOptions {
OPEN_DEFAULT, OPEN_FILETYPES, OPEN_INITDIR, OPEN_INITFILE,
- OPEN_MESSAGE, OPEN_MULTIPLE, OPEN_PARENT, OPEN_TITLE
+ OPEN_MESSAGE, OPEN_MULTIPLE, OPEN_PARENT, OPEN_TITLE, OPEN_TYPEVARIABLE
};
if (!fileDlgInited) {
@@ -275,6 +278,7 @@ Tk_GetOpenFileObjCmd(
}
TkInitFileFilters(&ofd.fl);
ofd.curType = 0;
+ ofd.initialType = -1;
ofd.popupItem = OPEN_POPUP_ITEM;
ofd.usePopup = 1;
@@ -338,6 +342,9 @@ Tk_GetOpenFileObjCmd(
title = CFStringCreateWithBytes(NULL, (unsigned char*)
choice, choiceLen, kCFStringEncodingUTF8, false);
break;
+ case OPEN_TYPEVARIABLE:
+ typeVariablePtr = objv[i + 1];
+ break;
}
}
@@ -349,8 +356,23 @@ Tk_GetOpenFileObjCmd(
if (initialDesc.descriptorType == typeFSRef) {
initialPtr = &initialDesc;
}
+
+ if (typeVariablePtr) {
+ initialtype = Tcl_GetVar(interp, Tcl_GetString(typeVariablePtr), 0);
+ }
result = NavServicesGetFile(interp, &ofd, initialPtr, NULL, &selectDesc,
- title, message, multiple, OPEN_FILE, parent);
+ title, message, initialtype, multiple, OPEN_FILE, parent);
+
+ if (typeVariablePtr) {
+ FileFilter *filterPtr = ofd.fl.filters;
+ int i = ofd.curType;
+
+ while (filterPtr && i-- > 0) {
+ filterPtr = filterPtr->next;
+ }
+ Tcl_SetVar(interp, Tcl_GetString(typeVariablePtr), filterPtr->name, 0);
+ }
+
end:
TkFreeFileFilters(&ofd.fl);
if (initialDesc.dataHandle) {
@@ -401,11 +423,11 @@ Tk_GetSaveFileObjCmd(
OpenFileData ofd;
static const char *saveOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-message", "-parent", "-title", NULL
+ "-message", "-parent", "-title", "-typevariable", NULL
};
enum saveOptions {
SAVE_DEFAULT, SAVE_FILETYPES, SAVE_INITDIR, SAVE_INITFILE,
- SAVE_MESSAGE, SAVE_PARENT, SAVE_TITLE
+ SAVE_MESSAGE, SAVE_PARENT, SAVE_TITLE, SAVE_TYPEVARIABLE
};
if (!fileDlgInited) {
@@ -480,7 +502,7 @@ Tk_GetSaveFileObjCmd(
initialPtr = &initialDesc;
}
result = NavServicesGetFile(interp, &ofd, initialPtr, initialFile, NULL,
- title, message, false, SAVE_FILE, parent);
+ title, message, NULL, false, SAVE_FILE, parent);
TkFreeFileFilters(&ofd.fl);
end:
if (initialDesc.dataHandle) {
@@ -588,7 +610,7 @@ Tk_ChooseDirectoryObjCmd(clientData, interp, objc, objv)
initialPtr = &initialDesc;
}
result = NavServicesGetFile(interp, &ofd, initialPtr, NULL, NULL, title,
- message, false, CHOOSE_FOLDER, parent);
+ message, NULL, false, CHOOSE_FOLDER, parent);
TkFreeFileFilters(&ofd.fl);
end:
if (initialDesc.dataHandle) {
@@ -737,6 +759,7 @@ NavServicesGetFile(
AEDescList *selectDescPtr,
CFStringRef title,
CFStringRef message,
+ const char *initialtype,
int multiple,
int isOpen,
Tk_Window parent)
@@ -800,6 +823,9 @@ NavServicesGetFile(
filterPtr = filterPtr->next, index++) {
menuItemNames[index] = CFStringCreateWithCString(NULL,
filterPtr->name, kCFStringEncodingUTF8);
+ if (initialtype && strcmp(filterPtr->name, initialtype) == 0) {
+ ofdPtr->initialType = index;
+ }
}
options.popupExtension = CFArrayCreate(NULL,
(const void **) menuItemNames, ofdPtr->fl.numFilters, NULL);
@@ -988,10 +1014,34 @@ OpenEventProc(
NavCallBackUserData callBackUD)
{
NavHandlerUserData *data = (NavHandlerUserData*) callBackUD;
+ OpenFileData *ofd = data->ofdPtr;
switch (callBackSelector) {
+ case kNavCBStart:
+ if (ofd && ofd->initialType >= 0) {
+ /* Select initial filter */
+ FileFilter *filterPtr = ofd->fl.filters;
+ int i = ofd->initialType;
+
+ while (filterPtr && i-- > 0) {
+ filterPtr = filterPtr->next;
+ }
+ if (filterPtr) {
+ NavMenuItemSpec selectItem;
+
+ selectItem.version = kNavMenuItemSpecVersion;
+ selectItem.menuCreator = 0;
+ selectItem.menuType = ofd->initialType;
+ selectItem.menuItemName[0] = strlen(filterPtr->name);
+ strncpy((char*) &selectItem.menuItemName[1],
+ filterPtr->name, 255);
+ ChkErr(NavCustomControl, callBackParams->context,
+ kNavCtlSelectCustomType, &selectItem);
+ }
+ }
+ break;
case kNavCBPopupMenuSelect:
- data->ofdPtr->curType = ((NavMenuItemSpec *)
+ ofd->curType = ((NavMenuItemSpec *)
callBackParams->eventData.eventDataParms.param)->menuType;
break;
case kNavCBAccept:
@@ -1077,7 +1127,7 @@ OpenFileFilterProc(
fileName[len] = '\0';
fileNamePtr = (unsigned char*) fileName;
- } else if ((theItem->descriptorType = typeFSRef)) {
+ } else if ((theItem->descriptorType == typeFSRef)) {
OSStatus err;
FSRef *theRef = (FSRef *) *theItem->dataHandle;
HFSUniStr255 uniFileName;
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 0f06464..1395821 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXWm.c,v 1.49.2.9 2007/10/19 14:35:33 dgp Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.49.2.10 2007/10/27 04:23:16 dgp Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -5367,7 +5367,7 @@ TkMacOSXMakeRealWindowExist(
macWin->grafPtr = GetWindowPort(newWindow);
macWin->rootControl = rootControl;
- if (wmPtr->master != None && winPtr->atts.override_redirect) {
+ if (wmPtr->master != None || winPtr->atts.override_redirect) {
ApplyMasterOverrideChanges(winPtr, newWindow);
}
SetWindowModified(newWindow, false);
@@ -6039,27 +6039,29 @@ ApplyMasterOverrideChanges(
WmInfo *wmPtr = winPtr->wmInfoPtr;
WindowClass oldClass = wmPtr->macClass;
WindowAttributes oldAttributes = wmPtr->attributes;
- int frontmost = 0;
+ const int wasOverrideredirect = (oldClass == kSimpleWindowClass &&
+ oldAttributes == kWindowNoActivatesAttribute);
+ const int wasTransient = (oldClass == kPlainWindowClass &&
+ oldAttributes == kWindowNoAttributes);
+ const int wasDefault = (oldClass == kDocumentWindowClass);
/*
* FIX: We need an UpdateWrapper equivalent to make this 100% correct
*/
if (winPtr->atts.override_redirect) {
- if (wmPtr->macClass == kDocumentWindowClass || (wmPtr->master != None
- && wmPtr->macClass == kFloatingWindowClass)) {
+ if (wasDefault || (wmPtr->master != None && wasTransient)) {
wmPtr->macClass = kSimpleWindowClass;
wmPtr->attributes = kWindowNoAttributes;
}
- if (wmPtr->master != None) {
- frontmost = 1;
- }
wmPtr->attributes |= kWindowNoActivatesAttribute;
} else {
- if (wmPtr->macClass == kSimpleWindowClass) {
- if (wmPtr->master != None) {
- wmPtr->macClass = kFloatingWindowClass;
- wmPtr->attributes = kWindowStandardFloatingAttributes;
- } else {
+ if (wmPtr->master != None) {
+ if (wasDefault || wasOverrideredirect) {
+ wmPtr->macClass = kPlainWindowClass;
+ wmPtr->attributes = kWindowNoAttributes;
+ }
+ } else {
+ if (wasTransient || wasOverrideredirect) {
wmPtr->macClass = kDocumentWindowClass;
wmPtr->attributes = kWindowStandardDocumentAttributes
| kWindowLiveResizeAttribute;
@@ -6081,7 +6083,8 @@ ApplyMasterOverrideChanges(
ApplyWindowClassAttributeChanges(winPtr, macWindow, oldClass,
oldAttributes, 0);
- val = Tcl_NewBooleanObj(frontmost);
+ val = Tcl_NewBooleanObj(winPtr->atts.override_redirect &&
+ wmPtr->master != None);
WmSetAttribute(winPtr, macWindow, NULL, WMATT_TOPMOST, val);
Tcl_DecrRefCount(val);
}
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index cf1672b..da68c84 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -27,7 +27,7 @@
* top-level window, not to the Tk_Window. BoxToRect()
* accounts for this.
*
- * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.7.2.3 2007/10/19 14:35:34 dgp Exp $
+ * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.7.2.4 2007/10/27 04:23:16 dgp Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -158,7 +158,7 @@ static ThemeButtonDrawInfo computeButtonDrawInfo(
return info;
}
-static void ButtonElementGeometryNoPadding(
+static void ButtonElementSizeNoPadding(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -172,7 +172,7 @@ static void ButtonElementGeometryNoPadding(
}
}
-static void ButtonElementGeometry(
+static void ButtonElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -181,7 +181,7 @@ static void ButtonElementGeometry(
Rect scratchRect, contentsRect;
const int scratchSize = 100;
- ButtonElementGeometryNoPadding(
+ ButtonElementSizeNoPadding(
clientData, elementRecord, tkwin,
widthPtr, heightPtr, paddingPtr);
@@ -225,7 +225,7 @@ static Ttk_ElementSpec ButtonElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- ButtonElementGeometry,
+ ButtonElementSize,
ButtonElementDraw
};
@@ -253,7 +253,7 @@ static Ttk_StateTable TabStyleTable[] = {
static const int TAB_HEIGHT = 21;
static const int TAB_OVERLAP = 3;
-static void TabElementGeometry(
+static void TabElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -278,13 +278,13 @@ static Ttk_ElementSpec TabElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- TabElementGeometry,
+ TabElementSize,
TabElementDraw
};
/* Notebook panes:
*/
-static void PaneElementGeometry(
+static void PaneElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -308,7 +308,7 @@ static Ttk_ElementSpec PaneElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- PaneElementGeometry,
+ PaneElementSize,
PaneElementDraw
};
@@ -321,7 +321,7 @@ static Ttk_ElementSpec PaneElementSpec = {
* "Maximum of 2 pixels thick" is apparently a lie;
* looks more like 4 to me with shading.
*/
-static void GroupElementGeometry(
+static void GroupElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -344,7 +344,7 @@ static Ttk_ElementSpec GroupElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- GroupElementGeometry,
+ GroupElementSize,
GroupElementDraw
};
@@ -364,7 +364,7 @@ static Ttk_ElementOptionSpec EntryElementOptions[] = {
{0}
};
-static void EntryElementGeometry(
+static void EntryElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -403,7 +403,7 @@ static Ttk_ElementSpec EntryElementSpec = {
TK_STYLE_VERSION_2,
sizeof(EntryElement),
EntryElementOptions,
- EntryElementGeometry,
+ EntryElementSize,
EntryElementDraw
};
@@ -413,8 +413,8 @@ static Ttk_ElementSpec EntryElementSpec = {
* function in the Appearance Manager reference.
*/
-static void PopupArrowElementGeometry(
- void *clientData, void *elementRecord, Tk_Window tkwin,
+static void PopupArrowElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
*widthPtr = 12; /* wild-assed guess */
@@ -456,7 +456,7 @@ static Ttk_ElementSpec PopupArrowElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- PopupArrowElementGeometry,
+ PopupArrowElementSize,
PopupArrowElementDraw
};
@@ -496,7 +496,7 @@ static Ttk_ElementOptionSpec TrackElementOptions[] = {
{0,0,0}
};
-static void TrackElementGeometry(
+static void TrackElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -557,7 +557,7 @@ static Ttk_ElementSpec TrackElementSpec = {
TK_STYLE_VERSION_2,
sizeof(TrackElement),
TrackElementOptions,
- TrackElementGeometry,
+ TrackElementSize,
TrackElementDraw
};
@@ -570,7 +570,7 @@ static Ttk_ElementSpec TrackElementSpec = {
* figure out how to get the Appearance Manager to tell me the
* slider size.
*/
-static void SliderElementGeometry(
+static void SliderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -581,7 +581,7 @@ static Ttk_ElementSpec SliderElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- SliderElementGeometry,
+ SliderElementSize,
TtkNullElementDraw
};
@@ -615,7 +615,7 @@ static Ttk_ElementOptionSpec PbarElementOptions[] = {
{0,0,0,0}
};
-static void PbarElementGeometry(
+static void PbarElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
@@ -665,7 +665,7 @@ static Ttk_ElementSpec PbarElementSpec = {
TK_STYLE_VERSION_2,
sizeof(PbarElement),
PbarElementOptions,
- PbarElementGeometry,
+ PbarElementSize,
PbarElementDraw
};
@@ -801,7 +801,7 @@ static Ttk_ElementSpec BackgroundElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- TtkNullElementGeometry,
+ TtkNullElementSize,
BackgroundElementDraw
};
@@ -838,7 +838,7 @@ static Ttk_ElementSpec ToolbarBackgroundElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- TtkNullElementGeometry,
+ TtkNullElementSize,
ToolbarBackgroundElementDraw
};
@@ -875,7 +875,7 @@ static Ttk_ElementSpec TreeHeaderElementSpec = {
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- ButtonElementGeometryNoPadding,
+ ButtonElementSizeNoPadding,
TreeHeaderElementDraw
};
diff --git a/tests/filebox.test b/tests/filebox.test
index 432323d..7e74546 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: filebox.test,v 1.18 2004/12/20 10:34:20 vincentdarley Exp $
+# RCS: @(#) $Id: filebox.test,v 1.18.2.1 2007/10/27 04:23:17 dgp Exp $
#
package require tcltest 2.1
@@ -113,8 +113,8 @@ if {$tcl_platform(platform) == "unix"} {
set modes 1
}
-set unknownOptionsMsg(tk_getOpenFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, or -title}
-set unknownOptionsMsg(tk_getSaveFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -parent, or -title}
+set unknownOptionsMsg(tk_getOpenFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable}
+set unknownOptionsMsg(tk_getSaveFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable}
set tmpFile "filebox.tmp"
makeFile {
@@ -269,6 +269,27 @@ foreach mode $modes {
-initialfile $fileName -initialdir $fileDir]
} $pathName
}
+ foreach {x res} [list 1 "-unset-" 2 "Text files"] {
+ set t [expr {$x + [llength [array names filters]]}]
+ test filebox-3.$t-$mode "tk_getOpenFile command" nonUnixUserInteraction {
+ catch {unset tv}
+ catch {unset typeName}
+ ToPressButton $parent ok
+ if {[info exists tv]} {
+ } else {
+ }
+ set choice [tk_getOpenFile -title "Press Ok" \
+ -filetypes $filters($x) -parent $parent \
+ -initialfile $fileName -initialdir $fileDir \
+ -typevariable tv]
+ if {[info exists tv]} {
+ regexp {^(.*) \(.*\)$} $tv dummy typeName
+ } else {
+ set typeName "-unset-"
+ }
+ set typeName
+ } $res
+ }
test filebox-4.1-$mode "tk_getSaveFile command" -body {
tk_getSaveFile -foo
diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test
index 76b6403..de286f9 100644
--- a/tests/ttk/notebook.test
+++ b/tests/ttk/notebook.test
@@ -1,5 +1,5 @@
#
-# $Id: notebook.test,v 1.1.2.1 2007/06/12 16:22:43 dgp Exp $
+# $Id: notebook.test,v 1.1.2.2 2007/10/27 04:23:17 dgp Exp $
#
package require Tk 8.5
@@ -312,7 +312,6 @@ test notebook-6.11 "Hide a non-current tab > current" -setup {
lappend result [$nb index current] [winfo ismapped $nb.f2]
} -result [list 1 1 1 1]
-
#
# Insert:
#
@@ -427,4 +426,32 @@ test notebook-7.end "insert - cleanup" -body {
destroy .nb
}
+test notebook-1817596-1 "insert should autoselect first tab" -body {
+ pack [ttk::notebook .nb]
+ list \
+ [.nb insert end [ttk::label .nb.l1 -text One] -text One] \
+ [.nb select] \
+ ;
+} -result [list "" .nb.l1] -cleanup { destroy .nb }
+
+test notebook-1817596-2 "error in insert should have no effect" -body {
+ pack [ttk::notebook .nb]
+ .nb insert end [ttk::label .nb.l1]
+ .nb insert end [ttk::label .nb.l2]
+ list \
+ [catch { .nb insert .l2 0 -badoption badvalue } err] \
+ [.nb tabs] \
+} -result [list 1 [list .nb.l1 .nb.l2]] -cleanup { destroy .nb }
+
+test notebook-1817596-3 "insert/configure" -body {
+ pack [ttk::notebook .nb]
+ .nb insert end [ttk::label .nb.l0] -text "L0"
+ .nb insert end [ttk::label .nb.l1] -text "L1"
+ .nb insert end [ttk::label .nb.l2] -text "XX"
+ .nb insert 0 2 -text "L2"
+
+ list [.nb tabs] [.nb tab 0 -text] [.nb tab 1 -text] [.nb tab 2 -text]
+
+} -result [list [list .nb.l2 .nb.l0 .nb.l1] L2 L0 L1] -cleanup { destroy .nb }
+
tcltest::cleanupTests
diff --git a/tests/winDialog.test b/tests/winDialog.test
index 38f125b..b80274f 100644
--- a/tests/winDialog.test
+++ b/tests/winDialog.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# Copyright (c) 1998-1999 ActiveState Corporation.
#
-# RCS: @(#) $Id: winDialog.test,v 1.13 2006/10/17 10:21:50 patthoyts Exp $
+# RCS: @(#) $Id: winDialog.test,v 1.13.2.1 2007/10/27 04:23:17 dgp Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -89,7 +89,7 @@ test winDialog-5.1 {GetFileName: no arguments} {nt testwinevent} {
} {0}
test winDialog-5.2 {GetFileName: one argument} {nt} {
list [catch {tk_getOpenFile -foo} msg] $msg
-} {1 {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, or -title}}
+} {1 {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable}}
test winDialog-5.4 {GetFileName: many arguments} {nt testwinevent} {
start {tk_getOpenFile -initialdir c:/ -parent . -title test -initialfile foo}
then {
@@ -98,7 +98,7 @@ test winDialog-5.4 {GetFileName: many arguments} {nt testwinevent} {
} {0}
test winDialog-5.5 {GetFileName: Tcl_GetIndexFromObj() != TCL_OK} {nt} {
list [catch {tk_getOpenFile -foo bar -abc} msg] $msg
-} {1 {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, or -title}}
+} {1 {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable}}
test winDialog-5.6 {GetFileName: Tcl_GetIndexFromObj() == TCL_OK} {nt testwinevent} {
start {tk_getOpenFile -title bar}
then {
diff --git a/unix/configure b/unix/configure
index 528fa24..d3565ff 100755
--- a/unix/configure
+++ b/unix/configure
@@ -9124,7 +9124,7 @@ ac_x_header_dirs='
/usr/openwin/share/include'
if test "$ac_x_includes" = no; then
- # Guess where to find include files, by looking for Intrinsic.h.
+ # Guess where to find include files, by looking for Xlib.h.
# First, try using that file with no special directory specified.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -9132,7 +9132,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -9159,7 +9159,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
for ac_dir in $ac_x_header_dirs; do
- if test -r "$ac_dir/X11/Intrinsic.h"; then
+ if test -r "$ac_dir/X11/Xlib.h"; then
ac_x_includes=$ac_dir
break
fi
@@ -9173,18 +9173,18 @@ if test "$ac_x_libraries" = no; then
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
- LIBS="-lXt $LIBS"
+ LIBS="-lX11 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
int
main ()
{
-XtMalloc (0)
+XrmInitialize ()
;
return 0;
}
diff --git a/unix/configure.in b/unix/configure.in
index da98e55..84b66a6 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.134.2.7 2007/10/15 18:38:40 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.134.2.8 2007/10/27 04:23:18 dgp Exp $
AC_INIT([tk],[8.5])
AC_PREREQ(2.59)
diff --git a/unix/tk.spec b/unix/tk.spec
index 83dbbbc..19d02f8 100644
--- a/unix/tk.spec
+++ b/unix/tk.spec
@@ -1,4 +1,4 @@
-# $Id: tk.spec,v 1.25.2.2 2007/10/02 20:43:54 dgp Exp $
+# $Id: tk.spec,v 1.25.2.3 2007/10/27 04:23:18 dgp Exp $
# This file is the basis for a binary Tk Linux RPM.
%{!?directory:%define directory /usr/local}
diff --git a/win/configure.in b/win/configure.in
index 5d8e922..ded20b5 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -3,7 +3,7 @@
# generate the file "configure", which is run during Tk installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.66.2.3 2007/10/15 18:38:41 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.66.2.4 2007/10/27 04:23:18 dgp Exp $
AC_INIT(../generic/tk.h)
AC_PREREQ(2.59)
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 87f13eb..20f9203 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDialog.c,v 1.44.2.2 2007/09/09 04:15:54 dgp Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.44.2.3 2007/10/27 04:23:18 dgp Exp $
*
*/
@@ -189,7 +189,8 @@ static int GetFileNameW(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[], int isOpen);
static int MakeFilter(Tcl_Interp *interp, Tcl_Obj *valuePtr,
- Tcl_DString *dsPtr);
+ Tcl_DString *dsPtr, Tcl_Obj *initialPtr,
+ int *index);
static UINT APIENTRY OFNHookProc(HWND hdlg, UINT uMsg, WPARAM wParam,
LPARAM lParam);
static UINT APIENTRY OFNHookProcW(HWND hdlg, UINT uMsg, WPARAM wParam,
@@ -575,10 +576,11 @@ GetFileNameW(
{
OPENFILENAMEW ofn;
WCHAR file[TK_MULTI_MAX_PATH];
- int result, winCode, oldMode, i, multi = 0;
+ int filterIndex, result, winCode, oldMode, i, multi = 0;
char *extension, *filter, *title;
Tk_Window tkwin;
HWND hWnd;
+ Tcl_Obj *filterObj, *initialTypeObj, *typeVariableObj;
Tcl_DString utfFilterString, utfDirString;
Tcl_DString extString, filterString, dirString, titleString;
Tcl_Encoding unicodeEncoding = TkWinGetUnicodeEncoding();
@@ -586,17 +588,17 @@ GetFileNameW(
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
static CONST char *saveOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-parent", "-title", NULL
+ "-parent", "-title", "-typevariable", NULL
};
static CONST char *openOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-multiple", "-parent", "-title", NULL
+ "-multiple", "-parent", "-title", "-typevariable", NULL
};
CONST char **optionStrings;
enum options {
FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE,
- FILE_MULTIPLE, FILE_PARENT, FILE_TITLE
+ FILE_MULTIPLE, FILE_PARENT, FILE_TITLE, FILE_TYPEVARIABLE
};
result = TCL_ERROR;
@@ -612,6 +614,9 @@ GetFileNameW(
Tcl_DStringInit(&utfDirString);
tkwin = (Tk_Window) clientData;
title = NULL;
+ filterObj = NULL;
+ typeVariableObj = NULL;
+ initialTypeObj = NULL;
if (open) {
optionStrings = openOptionStrings;
@@ -663,11 +668,7 @@ GetFileNameW(
extension = string;
break;
case FILE_TYPES:
- Tcl_DStringFree(&utfFilterString);
- if (MakeFilter(interp, valuePtr, &utfFilterString) != TCL_OK) {
- goto end;
- }
- filter = Tcl_DStringValue(&utfFilterString);
+ filterObj = valuePtr;
break;
case FILE_INITDIR:
Tcl_DStringFree(&utfDirString);
@@ -702,14 +703,18 @@ GetFileNameW(
case FILE_TITLE:
title = string;
break;
+ case FILE_TYPEVARIABLE:
+ typeVariableObj = valuePtr;
+ initialTypeObj = Tcl_ObjGetVar2(interp, typeVariableObj, NULL, 0);
+ break;
}
}
- if (filter == NULL) {
- if (MakeFilter(interp, NULL, &utfFilterString) != TCL_OK) {
- goto end;
- }
+ if (MakeFilter(interp, filterObj, &utfFilterString, initialTypeObj,
+ &filterIndex) != TCL_OK) {
+ goto end;
}
+ filter = Tcl_DStringValue(&utfFilterString);
Tk_MakeWindowExist(tkwin);
hWnd = Tk_GetHWND(Tk_WindowId(tkwin));
@@ -748,6 +753,7 @@ GetFileNameW(
Tcl_DStringValue(&utfFilterString),
Tcl_DStringLength(&utfFilterString), &filterString);
ofn.lpstrFilter = (WCHAR *) Tcl_DStringValue(&filterString);
+ ofn.nFilterIndex = filterIndex;
if (Tcl_DStringValue(&utfDirString)[0] != '\0') {
Tcl_UtfToExternalDString(unicodeEncoding,
@@ -878,6 +884,23 @@ GetFileNameW(
(char *) ofn.lpstrFile, &ds), NULL);
Tcl_DStringFree(&ds);
}
+ if ((ofn.nFilterIndex > 0) &&
+ Tcl_GetCharLength(Tcl_GetObjResult(interp)) > 0 &&
+ typeVariableObj && filterObj) {
+ int listObjc, count;
+ Tcl_Obj **listObjv = NULL;
+ Tcl_Obj **typeInfo = NULL;
+ if (Tcl_ListObjGetElements(interp, filterObj,
+ &listObjc, &listObjv) != TCL_OK) {
+ result = TCL_ERROR;
+ } else if (Tcl_ListObjGetElements(interp,
+ listObjv[ofn.nFilterIndex - 1],
+ &count, &typeInfo) != TCL_OK) {
+ result = TCL_ERROR;
+ } else {
+ Tcl_ObjSetVar2(interp, typeVariableObj, NULL, typeInfo[0], 0);
+ }
+ }
result = TCL_OK;
} else {
/*
@@ -997,27 +1020,28 @@ GetFileNameA(
{
OPENFILENAME ofn;
TCHAR file[TK_MULTI_MAX_PATH], savePath[MAX_PATH];
- int result, winCode, oldMode, i, multi = 0;
+ int filterIndex, result, winCode, oldMode, i, multi = 0;
char *extension, *filter, *title;
Tk_Window tkwin;
HWND hWnd;
+ Tcl_Obj *filterObj, *initialTypeObj, *typeVariableObj;
Tcl_DString utfFilterString, utfDirString;
Tcl_DString extString, filterString, dirString, titleString;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
static CONST char *saveOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-parent", "-title", NULL
+ "-parent", "-title", "-typevariable", NULL
};
static CONST char *openOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-multiple", "-parent", "-title", NULL
+ "-multiple", "-parent", "-title", "-typevariable", NULL
};
CONST char **optionStrings;
enum options {
FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE,
- FILE_MULTIPLE, FILE_PARENT, FILE_TITLE
+ FILE_MULTIPLE, FILE_PARENT, FILE_TITLE, FILE_TYPEVARIABLE
};
result = TCL_ERROR;
@@ -1033,6 +1057,9 @@ GetFileNameA(
Tcl_DStringInit(&utfDirString);
tkwin = (Tk_Window) clientData;
title = NULL;
+ filterObj = NULL;
+ typeVariableObj = NULL;
+ initialTypeObj = NULL;
if (open) {
optionStrings = openOptionStrings;
@@ -1084,11 +1111,7 @@ GetFileNameA(
extension = string;
break;
case FILE_TYPES:
- Tcl_DStringFree(&utfFilterString);
- if (MakeFilter(interp, valuePtr, &utfFilterString) != TCL_OK) {
- goto end;
- }
- filter = Tcl_DStringValue(&utfFilterString);
+ filterObj = valuePtr;
break;
case FILE_INITDIR:
Tcl_DStringFree(&utfDirString);
@@ -1122,14 +1145,18 @@ GetFileNameA(
case FILE_TITLE:
title = string;
break;
+ case FILE_TYPEVARIABLE:
+ typeVariableObj = valuePtr;
+ initialTypeObj = Tcl_ObjGetVar2(interp, typeVariableObj, NULL, 0);
+ break;
}
}
- if (filter == NULL) {
- if (MakeFilter(interp, NULL, &utfFilterString) != TCL_OK) {
- goto end;
- }
+ if (MakeFilter(interp, filterObj, &utfFilterString, initialTypeObj,
+ &filterIndex) != TCL_OK) {
+ goto end;
}
+ filter = Tcl_DStringValue(&utfFilterString);
Tk_MakeWindowExist(tkwin);
hWnd = Tk_GetHWND(Tk_WindowId(tkwin));
@@ -1306,6 +1333,23 @@ GetFileNameA(
(char *) ofn.lpstrFile, &ds), NULL);
Tcl_DStringFree(&ds);
}
+ if ((ofn.nFilterIndex > 0) &&
+ (Tcl_GetCharLength(Tcl_GetObjResult(interp)) > 0) &&
+ typeVariableObj && filterObj) {
+ int listObjc, count;
+ Tcl_Obj **listObjv = NULL;
+ Tcl_Obj **typeInfo = NULL;
+ if (Tcl_ListObjGetElements(interp, filterObj,
+ &listObjc, &listObjv) != TCL_OK) {
+ result = TCL_ERROR;
+ } else if (Tcl_ListObjGetElements(interp,
+ listObjv[ofn.nFilterIndex - 1],
+ &count, &typeInfo) != TCL_OK) {
+ result = TCL_ERROR;
+ } else {
+ Tcl_ObjSetVar2(interp, typeVariableObj, NULL, typeInfo[0], 0);
+ }
+ }
result = TCL_OK;
} else {
/*
@@ -1422,14 +1466,21 @@ static int
MakeFilter(
Tcl_Interp *interp, /* Current interpreter. */
Tcl_Obj *valuePtr, /* Value of the -filetypes option */
- Tcl_DString *dsPtr) /* Filled with windows filter string. */
+ Tcl_DString *dsPtr, /* Filled with windows filter string. */
+ Tcl_Obj *initialPtr, /* Initial type name */
+ int *index) /* Index of initial type in filter string */
{
char *filterStr;
char *p;
+ char *initial = NULL;
int pass;
+ int ix = 0; /* index counter */
FileFilterList flist;
FileFilter *filterPtr;
+ if (initialPtr) {
+ initial = Tcl_GetStringFromObj(initialPtr, NULL);
+ }
TkInitFileFilters(&flist);
if (TkGetFileFilters(interp, &flist, valuePtr, 1) != TCL_OK) {
return TCL_ERROR;
@@ -1485,6 +1536,15 @@ MakeFilter(
FileFilterClause *clausePtr;
/*
+ * Check initial index for match, set index.
+ * Filter index is 1 based so increment first
+ */
+ ix++;
+ if (index && initial && (strcmp(initial, filterPtr->name) == 0)) {
+ *index = ix;
+ }
+
+ /*
* First, put in the name of the file type.
*/
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c
index 31bc0fc..f6a74ea 100644
--- a/win/ttkWinMonitor.c
+++ b/win/ttkWinMonitor.c
@@ -1,4 +1,4 @@
-/* $Id: ttkWinMonitor.c,v 1.10.2.2 2007/09/09 04:15:55 dgp Exp $
+/* $Id: ttkWinMonitor.c,v 1.10.2.3 2007/10/27 04:23:18 dgp Exp $
*/
#ifdef _MSC_VER
@@ -56,9 +56,7 @@ static SystemColorEntry sysColors[] = {
{ NULL, 0 }
};
-static void
-RegisterSystemColors(
- Tcl_Interp *interp)
+static void RegisterSystemColors(Tcl_Interp *interp)
{
Ttk_ResourceCache cache = Ttk_GetResourceCache(interp);
SystemColorEntry *sysColor;
@@ -74,14 +72,12 @@ RegisterSystemColors(
}
static HWND
-CreateThemeMonitorWindow(
- HINSTANCE hinst,
- Tcl_Interp *interp)
+CreateThemeMonitorWindow(HINSTANCE hinst, Tcl_Interp *interp)
{
WNDCLASSEX wc;
- HWND hwnd = NULL;
- CHAR title[32] = "TtkMonitorWindow";
- CHAR name[32] = "TtkMonitorClass";
+ HWND hwnd = NULL;
+ CHAR title[32] = "TtkMonitorWindow";
+ CHAR name[32] = "TtkMonitorClass";
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW;
@@ -97,9 +93,9 @@ CreateThemeMonitorWindow(
wc.lpszClassName = name;
if (RegisterClassEx(&wc)) {
- hwnd = CreateWindow(name, title, WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
- NULL, NULL, hinst, NULL);
+ hwnd = CreateWindow( name, title, WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ NULL, NULL, hinst, NULL );
#ifdef _WIN64
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG)interp);
#else
@@ -112,20 +108,14 @@ CreateThemeMonitorWindow(
}
static void
-DestroyThemeMonitorWindow(
- void *clientData)
+DestroyThemeMonitorWindow(void *clientData)
{
HWND hwnd = (HWND)clientData;
-
DestroyWindow(hwnd);
}
static LRESULT WINAPI
-WndProc(
- HWND hwnd,
- UINT msg,
- WPARAM wp,
- LPARAM lp)
+WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
{
#ifdef _WIN64
Tcl_Interp *interp = (Tcl_Interp *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
@@ -144,8 +134,9 @@ WndProc(
case WM_THEMECHANGED:
/*
- * Reset the application theme to 'xpnative' if present, which will in
- * turn fall back to 'winnative' if XP theming is disabled.
+ * Reset the application theme to 'xpnative' if present,
+ * which will in turn fall back to 'winnative' if XP theming
+ * is disabled.
*/
theme = Ttk_GetTheme(interp, "xpnative");
@@ -165,9 +156,7 @@ WndProc(
MODULE_SCOPE int TtkWinTheme_Init(Tcl_Interp *, HWND hwnd);
MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *, HWND hwnd);
-MODULE_SCOPE int
-Ttk_WinPlatformInit(
- Tcl_Interp *interp)
+MODULE_SCOPE int Ttk_WinPlatformInit(Tcl_Interp *interp)
{
HWND hwnd;
@@ -179,11 +168,3 @@ Ttk_WinPlatformInit(
return TCL_OK;
}
-
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 4
- * fill-column: 78
- * End:
- */
diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c
index 9fdb44c..3f73620 100644
--- a/win/ttkWinTheme.c
+++ b/win/ttkWinTheme.c
@@ -1,6 +1,6 @@
/* winTheme.c - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sf.net>
*
- * $Id: ttkWinTheme.c,v 1.5.2.2 2007/09/09 04:15:55 dgp Exp $
+ * $Id: ttkWinTheme.c,v 1.5.2.3 2007/10/27 04:23:18 dgp Exp $
*/
#ifdef _MSC_VER
@@ -16,18 +16,14 @@
#endif
#include "ttk/ttkTheme.h"
-
+
/*
* BoxToRect --
* Helper routine. Converts a Ttk_Box to a Win32 RECT.
*/
-
-static RECT
-BoxToRect(
- Ttk_Box b)
+static RECT BoxToRect(Ttk_Box b)
{
RECT rc;
-
rc.top = b.y;
rc.left = b.x;
rc.bottom = b.y + b.height;
@@ -37,39 +33,31 @@ BoxToRect(
/*
* ReliefToEdge --
- * Convert a Tk "relief" value into an Windows "edge" value. NB: Caller
- * must check for RELIEF_FLAT and RELIEF_SOLID, which must be handled
- * specially.
+ * Convert a Tk "relief" value into an Windows "edge" value.
+ * NB: Caller must check for RELIEF_FLAT and RELIEF_SOLID,
+ * which must be handled specially.
*
- * Passing the BF_FLAT flag to DrawEdge() yields something similar to
- * TK_RELIEF_SOLID. TK_RELIEF_FLAT can be implemented by not drawing
- * anything.
+ * Passing the BF_FLAT flag to DrawEdge() yields something similar
+ * to TK_RELIEF_SOLID. TK_RELIEF_FLAT can be implemented by not
+ * drawing anything.
*/
-
-static unsigned int
-ReliefToEdge(
- int relief)
+static unsigned int ReliefToEdge(int relief)
{
switch (relief) {
- case TK_RELIEF_RAISED:
- return EDGE_RAISED;
- case TK_RELIEF_SUNKEN:
- return EDGE_SUNKEN;
- case TK_RELIEF_RIDGE:
- return EDGE_BUMP;
- case TK_RELIEF_GROOVE:
- return EDGE_ETCHED;
- case TK_RELIEF_SOLID:
- return BDR_RAISEDOUTER;
- default:
- case TK_RELIEF_FLAT:
- return BDR_RAISEDOUTER;
+ case TK_RELIEF_RAISED: return EDGE_RAISED;
+ case TK_RELIEF_SUNKEN: return EDGE_SUNKEN;
+ case TK_RELIEF_RIDGE: return EDGE_BUMP;
+ case TK_RELIEF_GROOVE: return EDGE_ETCHED;
+ case TK_RELIEF_SOLID: return BDR_RAISEDOUTER;
+ default:
+ case TK_RELIEF_FLAT: return BDR_RAISEDOUTER;
}
}
/* ---------------------------------------------------------------------- */
-static Ttk_StateTable checkbutton_statemap[] = {
+static Ttk_StateTable checkbutton_statemap[] =
+{
{ DFCS_CHECKED|DFCS_INACTIVE, TTK_STATE_SELECTED|TTK_STATE_DISABLED, 0 },
{ DFCS_CHECKED|DFCS_PUSHED, TTK_STATE_SELECTED|TTK_STATE_PRESSED, 0 },
{ DFCS_CHECKED, TTK_STATE_SELECTED, 0 },
@@ -78,24 +66,27 @@ static Ttk_StateTable checkbutton_statemap[] = {
{ 0, 0, 0 }
};
-static Ttk_StateTable pushbutton_statemap[] = {
+static Ttk_StateTable pushbutton_statemap[] =
+{
{ DFCS_INACTIVE, TTK_STATE_DISABLED, 0 },
{ DFCS_PUSHED, TTK_STATE_PRESSED, 0 },
{ DFCS_HOT, TTK_STATE_ACTIVE, 0 },
{ 0, 0, 0 }
};
-static Ttk_StateTable arrow_statemap[] = {
+static Ttk_StateTable arrow_statemap[] =
+{
{ DFCS_INACTIVE, TTK_STATE_DISABLED, 0 },
{ DFCS_PUSHED | DFCS_FLAT, TTK_STATE_PRESSED, 0 },
{ 0, 0, 0 }
};
-
+
/*------------------------------------------------------------------------
* +++ FrameControlElement --
* General-purpose element for things drawn with DrawFrameControl
*/
-typedef struct {
+typedef struct
+{
const char *name; /* element name */
int classId; /* class id for DrawFrameControl */
int partId; /* part id for DrawFrameControl */
@@ -105,7 +96,8 @@ typedef struct {
Ttk_Padding padding; /* additional placement padding */
} FrameControlElementData;
-static FrameControlElementData FrameControlElements[] = {
+static FrameControlElementData FrameControlElements[] =
+{
{ "Checkbutton.indicator",
DFC_BUTTON, DFCS_BUTTONCHECK, SM_CYMENUCHECK, SM_CYMENUCHECK,
checkbutton_statemap, {0,0,4,0} },
@@ -133,55 +125,46 @@ static FrameControlElementData FrameControlElements[] = {
/* ---------------------------------------------------------------------- */
-static void
-FrameControlElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void FrameControlElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
FrameControlElementData *elementData = clientData;
-
*widthPtr = GetSystemMetrics(elementData->cxId);
*heightPtr = GetSystemMetrics(elementData->cyId);
*paddingPtr = elementData->padding;
}
-static void
-FrameControlElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void FrameControlElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
FrameControlElementData *elementData = clientData;
RECT rc = BoxToRect(b);
TkWinDCState dcState;
HDC hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState);
- DrawFrameControl(hdc, &rc, elementData->classId,
- elementData->partId|Ttk_StateTableLookup(elementData->stateMap,state));
+ DrawFrameControl(hdc, &rc,
+ elementData->classId,
+ elementData->partId|Ttk_StateTableLookup(elementData->stateMap, state));
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
-static Ttk_ElementSpec FrameControlElementSpec = {
+static Ttk_ElementSpec FrameControlElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- FrameControlElementGeometry,
+ FrameControlElementSize,
FrameControlElementDraw
};
-
+
/*----------------------------------------------------------------------
* +++ Border element implementation.
*/
typedef struct {
- Tcl_Obj *reliefObj;
+ Tcl_Obj *reliefObj;
} BorderElement;
static Ttk_ElementOptionSpec BorderElementOptions[] = {
@@ -189,27 +172,17 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = {
{NULL}
};
-static void
-BorderElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void BorderElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
paddingPtr->left = paddingPtr->right = GetSystemMetrics(SM_CXEDGE);
paddingPtr->top = paddingPtr->bottom = GetSystemMetrics(SM_CYEDGE);
}
-static void
-BorderElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void BorderElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
BorderElement *border = elementRecord;
RECT rc = BoxToRect(b);
@@ -221,57 +194,49 @@ BorderElementDraw(
if (relief != TK_RELIEF_FLAT) {
UINT xFlags = (relief == TK_RELIEF_SOLID) ? BF_FLAT : 0;
-
hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState);
DrawEdge(hdc, &rc, ReliefToEdge(relief), BF_RECT | xFlags);
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
}
-static Ttk_ElementSpec BorderElementSpec = {
+static Ttk_ElementSpec BorderElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(BorderElement),
BorderElementOptions,
- BorderElementGeometry,
+ BorderElementSize,
BorderElementDraw
};
-
+
/*
* Entry field borders:
* Sunken border; also fill with window color.
*/
-typedef struct {
- Tcl_Obj *backgroundObj;
+typedef struct
+{
+ Tcl_Obj *backgroundObj;
} FieldElement;
-static Ttk_ElementOptionSpec FieldElementOptions[] = {
+static Ttk_ElementOptionSpec FieldElementOptions[] =
+{
{ "-fieldbackground", TK_OPTION_BORDER,
Tk_Offset(FieldElement,backgroundObj), "white" },
{NULL}
};
-static void
-FieldElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void FieldElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
paddingPtr->left = paddingPtr->right = GetSystemMetrics(SM_CXEDGE);
paddingPtr->top = paddingPtr->bottom = GetSystemMetrics(SM_CYEDGE);
}
-static void
-FieldElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void FieldElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
FieldElement *field = elementRecord;
Tk_3DBorder bg = Tk_Get3DBorderFromObj(tkwin, field->backgroundObj);
@@ -279,32 +244,32 @@ FieldElementDraw(
TkWinDCState dcState;
HDC hdc;
- Tk_Fill3DRectangle(tkwin, d, bg, b.x, b.y, b.width, b.height, 0,
- TK_RELIEF_FLAT);
+ Tk_Fill3DRectangle(
+ tkwin, d, bg, b.x, b.y, b.width, b.height, 0, TK_RELIEF_FLAT);
hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState);
DrawEdge(hdc, &rc, EDGE_SUNKEN, BF_RECT);
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
-static Ttk_ElementSpec FieldElementSpec = {
+static Ttk_ElementSpec FieldElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(FieldElement),
FieldElementOptions,
- FieldElementGeometry,
+ FieldElementSize,
FieldElementDraw
};
-
+
/*------------------------------------------------------------------------
* +++ Button borders.
* Drawn with DrawFrameControl instead of DrawEdge;
* Also draw default indicator and focus ring.
*/
-
typedef struct {
- Tcl_Obj *reliefObj;
- Tcl_Obj *highlightColorObj;
- Tcl_Obj *defaultStateObj;
+ Tcl_Obj *reliefObj;
+ Tcl_Obj *highlightColorObj;
+ Tcl_Obj *defaultStateObj;
} ButtonBorderElement;
static Ttk_ElementOptionSpec ButtonBorderElementOptions[] = {
@@ -317,14 +282,9 @@ static Ttk_ElementOptionSpec ButtonBorderElementOptions[] = {
{NULL}
};
-static void
-ButtonBorderElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void ButtonBorderElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
ButtonBorderElement *bd = elementRecord;
int relief = TK_RELIEF_RAISED;
@@ -339,8 +299,7 @@ ButtonBorderElementGeometry(
/* Space for default indicator:
*/
if (defaultState != TTK_BUTTON_DEFAULT_DISABLED) {
- ++cx;
- ++cy;
+ ++cx; ++cy;
}
/* Space for focus ring:
@@ -351,14 +310,9 @@ ButtonBorderElementGeometry(
*paddingPtr = Ttk_MakePadding(cx,cy,cx,cy);
}
-static void
-ButtonBorderElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void ButtonBorderElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
ButtonBorderElement *bd = elementRecord;
int relief = TK_RELIEF_FLAT;
@@ -372,7 +326,7 @@ ButtonBorderElementDraw(
if (defaultState == TTK_BUTTON_DEFAULT_ACTIVE) {
XColor *highlightColor =
- Tk_GetColorFromObj(tkwin, bd->highlightColorObj);
+ Tk_GetColorFromObj(tkwin, bd->highlightColorObj);
GC gc = Tk_GCForColor(highlightColor, d);
XDrawRectangle(Tk_Display(tkwin), d, gc, b.x,b.y,b.width-1,b.height-1);
}
@@ -383,69 +337,60 @@ ButtonBorderElementDraw(
hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState);
rc = BoxToRect(b);
- DrawFrameControl(hdc, &rc, DFC_BUTTON, /* classId */
- DFCS_BUTTONPUSH|Ttk_StateTableLookup(pushbutton_statemap, state));
+ DrawFrameControl(hdc, &rc,
+ DFC_BUTTON, /* classId */
+ DFCS_BUTTONPUSH | Ttk_StateTableLookup(pushbutton_statemap, state));
/* Draw focus ring:
*/
if (state & TTK_STATE_FOCUS) {
short int borderWidth = 3; /* @@@ Use GetSystemMetrics?*/
-
rc = BoxToRect(Ttk_PadBox(b, Ttk_UniformPadding(borderWidth)));
DrawFocusRect(hdc, &rc);
}
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
-static Ttk_ElementSpec ButtonBorderElementSpec = {
+static Ttk_ElementSpec ButtonBorderElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(ButtonBorderElement),
ButtonBorderElementOptions,
- ButtonBorderElementGeometry,
+ ButtonBorderElementSize,
ButtonBorderElementDraw
};
-
+
/*------------------------------------------------------------------------
* +++ Focus element.
* Draw dashed focus rectangle.
*/
-static void
-FocusElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void FocusElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
*paddingPtr = Ttk_UniformPadding(1);
}
-static void
-FocusElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void FocusElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
if (state & TTK_STATE_FOCUS) {
RECT rc = BoxToRect(b);
TkWinDCState dcState;
HDC hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState);
-
DrawFocusRect(hdc, &rc);
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
}
-static Ttk_ElementSpec FocusElementSpec = {
+static Ttk_ElementSpec FocusElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- FocusElementGeometry,
+ FocusElementSize,
FocusElementDraw
};
@@ -464,17 +409,11 @@ static Ttk_ElementOptionSpec FillFocusElementOptions[] = {
};
/* @@@ FIX THIS */
-static void
-FillFocusElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void FillFocusElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
FillFocusElement *focus = elementRecord;
-
if (state & TTK_STATE_FOCUS) {
RECT rc = BoxToRect(b);
TkWinDCState dcState;
@@ -493,77 +432,61 @@ FillFocusElementDraw(
* ComboboxFocusElement --
* Read-only comboboxes have a filled focus ring, editable ones do not.
*/
-
-static void
-ComboboxFocusElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void ComboboxFocusElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
if (state & TTK_STATE_READONLY) {
FillFocusElementDraw(clientData, elementRecord, tkwin, d, b, state);
}
}
-static Ttk_ElementSpec ComboboxFocusElementSpec = {
+static Ttk_ElementSpec ComboboxFocusElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(FillFocusElement),
FillFocusElementOptions,
- FocusElementGeometry,
+ FocusElementSize,
ComboboxFocusElementDraw
};
-
+
/*----------------------------------------------------------------------
* +++ Scrollbar trough element.
*
* The native windows scrollbar is drawn using a pattern brush giving a
- * stippled appearance when the trough might otherwise be invisible. We can
- * deal with this here.
+ * stippled appearance when the trough might otherwise be invisible.
+ * We can deal with this here.
*/
-typedef struct { /* clientData for Trough element */
- HBRUSH PatternBrush;
- HBITMAP PatternBitmap;
+typedef struct { /* clientData for Trough element */
+ HBRUSH PatternBrush;
+ HBITMAP PatternBitmap;
} TroughClientData;
static const WORD Pattern[] = {
0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa
};
-static void
-TroughClientDataDeleteProc(
- void *clientData)
+static void TroughClientDataDeleteProc(void *clientData)
{
TroughClientData *cd = clientData;
-
DeleteObject(cd->PatternBrush);
DeleteObject(cd->PatternBitmap);
ckfree(clientData);
}
-static TroughClientData *
-TroughClientDataInit(
- Tcl_Interp *interp)
+static TroughClientData *TroughClientDataInit(Tcl_Interp *interp)
{
- TroughClientData *cd = (TroughClientData *) ckalloc(sizeof(*cd));
-
+ TroughClientData *cd = (TroughClientData*)ckalloc(sizeof(*cd));
cd->PatternBitmap = CreateBitmap(8, 8, 1, 1, Pattern);
- cd->PatternBrush = CreatePatternBrush(cd->PatternBitmap);
+ cd->PatternBrush = CreatePatternBrush(cd->PatternBitmap);
Ttk_RegisterCleanup(interp, cd, TroughClientDataDeleteProc);
return cd;
}
-static void
-TroughElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void TroughElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
TroughClientData *cd = clientData;
TkWinDCState dcState;
@@ -589,34 +512,33 @@ TroughElementDraw(
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
-static Ttk_ElementSpec TroughElementSpec = {
+static Ttk_ElementSpec TroughElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- TtkNullElementGeometry,
+ TtkNullElementSize,
TroughElementDraw
};
-
+
/*------------------------------------------------------------------------
* +++ Thumb element.
*/
-typedef struct {
+typedef struct
+{
Tcl_Obj *orientObj;
} ThumbElement;
-static Ttk_ElementOptionSpec ThumbElementOptions[] = {
+static Ttk_ElementOptionSpec ThumbElementOptions[] =
+{
{ "-orient", TK_OPTION_ANY,Tk_Offset(ThumbElement,orientObj),"horizontal"},
{ NULL }
};
-static void ThumbElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void ThumbElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
ThumbElement *thumbPtr = elementRecord;
int orient;
@@ -631,60 +553,52 @@ static void ThumbElementGeometry(
}
}
-static void
-ThumbElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void ThumbElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
RECT rc = BoxToRect(b);
TkWinDCState dcState;
HDC hdc;
/* Windows doesn't show a thumb when the scrollbar is disabled */
- if (state & TTK_STATE_DISABLED) {
+ if (state & TTK_STATE_DISABLED)
return;
- }
hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState);
DrawEdge(hdc, &rc, EDGE_RAISED, BF_RECT | BF_MIDDLE);
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
-static Ttk_ElementSpec ThumbElementSpec = {
+static Ttk_ElementSpec ThumbElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(ThumbElement),
ThumbElementOptions,
- ThumbElementGeometry,
+ ThumbElementSize,
ThumbElementDraw
};
-
+
/* ----------------------------------------------------------------------
* The slider element is the shaped thumb used in the slider widget.
* Windows likes to call this a trackbar.
*/
-typedef struct {
+typedef struct
+{
Tcl_Obj *orientObj; /* orientation of the slider widget */
} SliderElement;
-static Ttk_ElementOptionSpec SliderElementOptions[] = {
+static Ttk_ElementOptionSpec SliderElementOptions[] =
+{
{ "-orient", TK_OPTION_ANY, Tk_Offset(SliderElement,orientObj),
"horizontal" },
{ NULL }
};
-static void
-SliderElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void SliderElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
SliderElement *slider = elementRecord;
int orient;
@@ -699,14 +613,9 @@ SliderElementGeometry(
}
}
-static void
-SliderElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void SliderElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
RECT rc = BoxToRect(b);
TkWinDCState dcState;
@@ -717,56 +626,47 @@ SliderElementDraw(
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
-static Ttk_ElementSpec SliderElementSpec = {
+static Ttk_ElementSpec SliderElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(SliderElement),
SliderElementOptions,
- SliderElementGeometry,
+ SliderElementSize,
SliderElementDraw
};
-
+
/*------------------------------------------------------------------------
* +++ Notebook elements.
*/
-static void
-ClientElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void ClientElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
paddingPtr->left = paddingPtr->right = GetSystemMetrics(SM_CXEDGE);
paddingPtr->top = paddingPtr->bottom = GetSystemMetrics(SM_CYEDGE);
}
-static void
-ClientElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void ClientElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
RECT rc = BoxToRect(b);
TkWinDCState dcState;
HDC hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState);
-
DrawEdge(hdc, &rc, EDGE_RAISED, BF_RECT | BF_SOFT);
TkWinReleaseDrawableDC(d, hdc, &dcState);
}
-static Ttk_ElementSpec ClientElementSpec = {
+static Ttk_ElementSpec ClientElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- ClientElementGeometry,
+ ClientElementSize,
ClientElementDraw
};
-
+
/*------------------------------------------------------------------------
* +++ Layouts.
*/
@@ -784,13 +684,11 @@ TTK_BEGIN_LAYOUT(ComboboxLayout)
TTK_GROUP("Combobox.focus", TTK_PACK_LEFT|TTK_EXPAND|TTK_FILL_BOTH,
TTK_NODE("Combobox.textarea", TTK_FILL_BOTH))))
TTK_END_LAYOUT
-
+
+
/* ---------------------------------------------------------------------- */
-MODULE_SCOPE int
-TtkWinTheme_Init(
- Tcl_Interp *interp,
- HWND hwnd)
+MODULE_SCOPE int TtkWinTheme_Init(Tcl_Interp *interp, HWND hwnd)
{
Ttk_Theme themePtr, parentPtr;
FrameControlElementData *fce = FrameControlElements;
@@ -803,15 +701,15 @@ TtkWinTheme_Init(
Ttk_RegisterElementSpec(themePtr, "border", &BorderElementSpec, NULL);
Ttk_RegisterElementSpec(themePtr, "Button.border",
- &ButtonBorderElementSpec, NULL);
+ &ButtonBorderElementSpec, NULL);
Ttk_RegisterElementSpec(themePtr, "field", &FieldElementSpec, NULL);
Ttk_RegisterElementSpec(themePtr, "focus", &FocusElementSpec, NULL);
Ttk_RegisterElementSpec(themePtr, "Combobox.focus",
- &ComboboxFocusElementSpec, NULL);
+ &ComboboxFocusElementSpec, NULL);
Ttk_RegisterElementSpec(themePtr, "thumb", &ThumbElementSpec, NULL);
Ttk_RegisterElementSpec(themePtr, "slider", &SliderElementSpec, NULL);
Ttk_RegisterElementSpec(themePtr, "Scrollbar.trough", &TroughElementSpec,
- TroughClientDataInit(interp));
+ TroughClientDataInit(interp));
Ttk_RegisterElementSpec(themePtr, "client", &ClientElementSpec, NULL);
@@ -826,11 +724,3 @@ TtkWinTheme_Init(
Tcl_PkgProvide(interp, "ttk::theme::winnative", TTK_VERSION);
return TCL_OK;
}
-
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 4
- * fill-column: 78
- * End:
- */
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 38e373b..b8a12e5 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkWinXPTheme.c,v 1.12 2007/04/17 14:32:28 dkf Exp $
+ * $Id: ttkWinXPTheme.c,v 1.12.2.1 2007/10/27 04:23:19 dgp Exp $
*
* Tk theme engine which uses the Windows XP "Visual Styles" API
* Adapted from Georgios Petasis' XP theme patch.
@@ -53,7 +53,8 @@ typedef HRESULT (STDAPICALLTYPE DrawThemeTextProc)(HTHEME hTheme, HDC hdc,
typedef BOOL (STDAPICALLTYPE IsThemeActiveProc)(VOID);
typedef BOOL (STDAPICALLTYPE IsAppThemedProc)(VOID);
-typedef struct {
+typedef struct
+{
OpenThemeDataProc *OpenThemeData;
CloseThemeDataProc *CloseThemeData;
GetThemePartSizeProc *GetThemePartSize;
@@ -66,7 +67,8 @@ typedef struct {
HWND stubWindow;
} XPThemeProcs;
-typedef struct {
+typedef struct
+{
HINSTANCE hlibrary;
XPThemeProcs *procs;
} XPThemeData;
@@ -86,39 +88,39 @@ typedef struct {
*/
static XPThemeProcs *
-LoadXPThemeProcs(
- HINSTANCE *phlib)
+LoadXPThemeProcs(HINSTANCE *phlib)
{
/*
- * Load the library "uxtheme.dll", where the native widget drawing
- * routines are implemented. This will only succeed if we are running at
- * least on Windows XP.
+ * Load the library "uxtheme.dll", where the native widget
+ * drawing routines are implemented. This will only succeed
+ * if we are running at least on Windows XP.
*/
-
HINSTANCE handle;
-
*phlib = handle = LoadLibrary("uxtheme.dll");
- if (handle != 0) {
+ if (handle != 0)
+ {
/*
* We have successfully loaded the library. Proceed in storing the
* addresses of the functions we want to use.
*/
- XPThemeProcs *procs = (XPThemeProcs *) ckalloc(sizeof(XPThemeProcs));
+ XPThemeProcs *procs = (XPThemeProcs*)ckalloc(sizeof(XPThemeProcs));
#define LOADPROC(name) \
(0 != (procs->name = (name ## Proc *)GetProcAddress(handle, #name) ))
- if ( LOADPROC(OpenThemeData) &&
- LOADPROC(CloseThemeData) &&
- LOADPROC(GetThemePartSize) &&
- LOADPROC(DrawThemeBackground) &&
- LOADPROC(GetThemeTextExtent) &&
- LOADPROC(DrawThemeText) &&
- LOADPROC(IsThemeActive) &&
- LOADPROC(IsAppThemed)) {
+ if ( LOADPROC(OpenThemeData)
+ && LOADPROC(CloseThemeData)
+ && LOADPROC(GetThemePartSize)
+ && LOADPROC(DrawThemeBackground)
+ && LOADPROC(GetThemeTextExtent)
+ && LOADPROC(DrawThemeText)
+ && LOADPROC(IsThemeActive)
+ && LOADPROC(IsAppThemed)
+ )
+ {
return procs;
}
#undef LOADPROC
- ckfree((char *) procs);
+ ckfree((char*)procs);
}
return 0;
}
@@ -130,8 +132,7 @@ LoadXPThemeProcs(
*/
static void
-XPThemeDeleteProc(
- void *clientData)
+XPThemeDeleteProc(void *clientData)
{
XPThemeData *themeData = clientData;
FreeLibrary(themeData->hlibrary);
@@ -139,9 +140,7 @@ XPThemeDeleteProc(
}
static int
-XPThemeEnabled(
- Ttk_Theme theme,
- void *clientData)
+XPThemeEnabled(Ttk_Theme theme, void *clientData)
{
XPThemeData *themeData = clientData;
int active = themeData->procs->IsThemeActive();
@@ -154,8 +153,7 @@ XPThemeEnabled(
* Helper routine. Returns a RECT data structure.
*/
static RECT
-BoxToRect(
- Ttk_Box b)
+BoxToRect(Ttk_Box b)
{
RECT rc;
rc.top = b.y;
@@ -360,38 +358,44 @@ static Ttk_StateTable tabitem_statemap[] =
* BP_PUSHBUTTONS). Set the IGNORE_THEMESIZE flag to skip this call.
*/
-typedef struct { /* XP element specifications */
- const char *elementName; /* Tk theme engine element name */
+typedef struct /* XP element specifications */
+{
+ const char *elementName; /* Tk theme engine element name */
Ttk_ElementSpec *elementSpec;
/* Element spec (usually GenericElementSpec) */
- LPCWSTR className; /* Windows window class name */
- int partId; /* BP_PUSHBUTTON, BP_CHECKBUTTON, etc. */
+ LPCWSTR className; /* Windows window class name */
+ int partId; /* BP_PUSHBUTTON, BP_CHECKBUTTON, etc. */
Ttk_StateTable *statemap; /* Map Tk states to XP states */
Ttk_Padding padding; /* See NOTE-GetThemeMargins */
- int flags;
-#define IGNORE_THEMESIZE 0x1 /* See NOTE-GetThemePartSize */
-#define PAD_MARGINS 0x2 /* See NOTE-GetThemeMargins */
+ int flags;
+# define IGNORE_THEMESIZE 0x1 /* See NOTE-GetThemePartSize */
+# define PAD_MARGINS 0x2 /* See NOTE-GetThemeMargins */
} ElementInfo;
-typedef struct {
- /* Static data, initialized when element is registered: */
+typedef struct
+{
+ /*
+ * Static data, initialized when element is registered:
+ */
ElementInfo *info;
XPThemeProcs *procs; /* Pointer to theme procedure table */
- /* Dynamic data, allocated by InitElementData: */
- HTHEME hTheme;
- HDC hDC;
- HWND hwnd;
+
+ /*
+ * Dynamic data, allocated by InitElementData:
+ */
+ HTHEME hTheme;
+ HDC hDC;
+ HWND hwnd;
+
/* For TkWinDrawableReleaseDC: */
- Drawable drawable;
+ Drawable drawable;
TkWinDCState dcState;
} ElementData;
static ElementData *
-NewElementData(
- XPThemeProcs *procs,
- ElementInfo *info)
+NewElementData(XPThemeProcs *procs, ElementInfo *info)
{
- ElementData *elementData = (ElementData *) ckalloc(sizeof(ElementData));
+ ElementData *elementData = (ElementData*)ckalloc(sizeof(ElementData));
elementData->procs = procs;
elementData->info = info;
@@ -400,29 +404,24 @@ NewElementData(
return elementData;
}
-static void
-DestroyElementData(
- void *elementData)
+static void DestroyElementData(void *elementData)
{
ckfree(elementData);
}
/*
* InitElementData --
- * Looks up theme handle. If Drawable argument is non-NULL, also
- * initializes DC.
+ * Looks up theme handle. If Drawable argument is non-NULL,
+ * also initializes DC.
*
* Returns:
* 1 on success, 0 on error.
- * Caller must later call FreeElementData() so this element can be
- * reused.
+ * Caller must later call FreeElementData() so this element
+ * can be reused.
*/
static int
-InitElementData(
- ElementData *elementData,
- Tk_Window tkwin,
- Drawable d)
+InitElementData(ElementData *elementData, Tk_Window tkwin, Drawable d)
{
Window win = Tk_WindowId(tkwin);
@@ -448,8 +447,7 @@ InitElementData(
}
static void
-FreeElementData(
- ElementData *elementData)
+FreeElementData(ElementData *elementData)
{
elementData->procs->CloseThemeData(elementData->hTheme);
if (elementData->drawable != 0) {
@@ -465,28 +463,26 @@ FreeElementData(
* such as radiobutton and checkbutton indicators, scrollbar arrows, etc.
*/
-static void
-GenericElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void GenericElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
ElementData *elementData = clientData;
HRESULT result;
SIZE size;
- if (!InitElementData(elementData, tkwin, 0)) {
+ if (!InitElementData(elementData, tkwin, 0))
return;
- }
if (!(elementData->info->flags & IGNORE_THEMESIZE)) {
- result = elementData->procs->GetThemePartSize(elementData->hTheme,
- elementData->hDC, elementData->info->partId,
- Ttk_StateTableLookup(elementData->info->statemap, 0),
- NULL /*RECT *prc*/, TS_TRUE, &size);
+ result = elementData->procs->GetThemePartSize(
+ elementData->hTheme,
+ elementData->hDC,
+ elementData->info->partId,
+ Ttk_StateTableLookup(elementData->info->statemap, 0),
+ NULL /*RECT *prc*/,
+ TS_TRUE,
+ &size);
if (SUCCEEDED(result)) {
*widthPtr = size.cx;
@@ -499,14 +495,9 @@ GenericElementGeometry(
*paddingPtr = elementData->info->padding;
}
-static void
-GenericElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void GenericElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
ElementData *elementData = clientData;
RECT rc;
@@ -520,19 +511,23 @@ GenericElementDraw(
}
rc = BoxToRect(b);
- elementData->procs->DrawThemeBackground(elementData->hTheme,
- elementData->hDC, elementData->info->partId,
- Ttk_StateTableLookup(elementData->info->statemap, state),
- &rc, NULL/*pContentRect*/);
+ elementData->procs->DrawThemeBackground(
+ elementData->hTheme,
+ elementData->hDC,
+ elementData->info->partId,
+ Ttk_StateTableLookup(elementData->info->statemap, state),
+ &rc,
+ NULL/*pContentRect*/);
FreeElementData(elementData);
}
-static Ttk_ElementSpec GenericElementSpec = {
+static Ttk_ElementSpec GenericElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- GenericElementGeometry,
+ GenericElementSize,
GenericElementDraw
};
@@ -541,41 +536,36 @@ static Ttk_ElementSpec GenericElementSpec = {
* Same as a GenericElement, but don't draw in the disabled state.
*/
-static void
-ThumbElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void ThumbElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
ElementData *elementData = clientData;
- unsigned stateId = Ttk_StateTableLookup(elementData->info->statemap,state);
+ unsigned stateId = Ttk_StateTableLookup(elementData->info->statemap, state);
RECT rc = BoxToRect(b);
/*
* Don't draw the thumb if we are disabled.
*/
- if (state & TTK_STATE_DISABLED) {
+ if (state & TTK_STATE_DISABLED)
return;
- }
- if (!InitElementData(elementData, tkwin, d)) {
+ if (!InitElementData(elementData, tkwin, d))
return;
- }
elementData->procs->DrawThemeBackground(elementData->hTheme,
- elementData->hDC, elementData->info->partId, stateId, &rc, NULL);
+ elementData->hDC, elementData->info->partId, stateId,
+ &rc, NULL);
FreeElementData(elementData);
}
-static Ttk_ElementSpec ThumbElementSpec = {
+static Ttk_ElementSpec ThumbElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- GenericElementGeometry,
+ GenericElementSize,
ThumbElementDraw
};
@@ -585,20 +575,15 @@ static Ttk_ElementSpec ThumbElementSpec = {
* so that indeterminate progress bars show 3 bars instead of 1.
*/
-static void
-PbarElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void PbarElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
ElementData *elementData = clientData;
int nBars = 3;
- GenericElementGeometry(clientData, elementRecord, tkwin,
- widthPtr, heightPtr, paddingPtr);
+ GenericElementSize(clientData, elementRecord, tkwin,
+ widthPtr, heightPtr, paddingPtr);
if (elementData->info->partId == PP_CHUNK) {
*widthPtr *= nBars;
@@ -607,103 +592,93 @@ PbarElementGeometry(
}
}
-static Ttk_ElementSpec PbarElementSpec = {
+static Ttk_ElementSpec PbarElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- PbarElementGeometry,
+ PbarElementSize,
GenericElementDraw
};
/*----------------------------------------------------------------------
* +++ Notebook tab element.
-
- * Same as generic element, with additional logic to select proper
- * iPartID for the leftmost tab.
+ * Same as generic element, with additional logic to select
+ * proper iPartID for the leftmost tab.
*
- * Notes: TABP_TABITEMRIGHTEDGE (or TABP_TOPTABITEMRIGHTEDGE, which
- * appears to be identical) should be used if the tab is exactly at the
- * right edge of the notebook, but not if it's simply the rightmost tab.
- * This information is not available.
+ * Notes: TABP_TABITEMRIGHTEDGE (or TABP_TOPTABITEMRIGHTEDGE,
+ * which appears to be identical) should be used if the
+ * tab is exactly at the right edge of the notebook, but
+ * not if it's simply the rightmost tab. This information
+ * is not available.
*
- * The TIS_* and TILES_* definitions are identical, so we can use the
- * same statemap no matter what the partId.
+ * The TIS_* and TILES_* definitions are identical, so
+ * we can use the same statemap no matter what the partId.
*/
-
-static void
-TabElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void TabElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
ElementData *elementData = clientData;
int partId = elementData->info->partId;
RECT rc = BoxToRect(b);
- if (!InitElementData(elementData, tkwin, d)) {
+ if (!InitElementData(elementData, tkwin, d))
return;
- }
- if (state & TTK_STATE_USER1) {
+ if (state & TTK_STATE_USER1)
partId = TABP_TABITEMLEFTEDGE;
- }
- elementData->procs->DrawThemeBackground(elementData->hTheme,
- elementData->hDC, partId,
- Ttk_StateTableLookup(elementData->info->statemap, state), &rc,
- NULL);
+ elementData->procs->DrawThemeBackground(
+ elementData->hTheme, elementData->hDC, partId,
+ Ttk_StateTableLookup(elementData->info->statemap, state), &rc, NULL);
FreeElementData(elementData);
}
-static Ttk_ElementSpec TabElementSpec = {
+static Ttk_ElementSpec TabElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- GenericElementGeometry,
+ GenericElementSize,
TabElementDraw
};
/*----------------------------------------------------------------------
* +++ Tree indicator element.
*
- * Generic element, but don't display at all if TTK_STATE_LEAF (=USER2)
- * set
+ * Generic element, but don't display at all if TTK_STATE_LEAF (=USER2) set
*/
#define TTK_STATE_OPEN TTK_STATE_USER1
#define TTK_STATE_LEAF TTK_STATE_USER2
-static Ttk_StateTable header_statemap[] = {
+static Ttk_StateTable header_statemap[] =
+{
{ HIS_PRESSED, TTK_STATE_PRESSED, 0 },
{ HIS_HOT, TTK_STATE_ACTIVE, 0 },
{ HIS_NORMAL, 0,0 },
};
-static Ttk_StateTable tvpglyph_statemap[] = {
+static Ttk_StateTable tvpglyph_statemap[] =
+{
{ GLPS_OPENED, TTK_STATE_OPEN, 0 },
{ GLPS_CLOSED, 0,0 },
};
-static void
-TreeIndicatorElementDraw(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void TreeIndicatorElementDraw(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
if (!(state & TTK_STATE_LEAF)) {
GenericElementDraw(clientData,elementRecord,tkwin,d,b,state);
}
}
-static Ttk_ElementSpec TreeIndicatorElementSpec = {
+static Ttk_ElementSpec TreeIndicatorElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(NullElement),
TtkNullElementOptions,
- GenericElementGeometry,
+ GenericElementSize,
TreeIndicatorElementDraw
};
@@ -713,18 +688,21 @@ static Ttk_ElementSpec TreeIndicatorElementSpec = {
*----------------------------------------------------------------------
* Text element (does not work yet).
*
- * According to "Using Windows XP Visual Styles", we need to select a font
- * into the DC before calling DrawThemeText(). There's just no easy way to get
- * an HFONT out of a Tk_Font. Maybe GetThemeFont() would work?
+ * According to "Using Windows XP Visual Styles", we need to select
+ * a font into the DC before calling DrawThemeText().
+ * There's just no easy way to get an HFONT out of a Tk_Font.
+ * Maybe GetThemeFont() would work?
*
*/
-typedef struct {
+typedef struct
+{
Tcl_Obj *textObj;
Tcl_Obj *fontObj;
} TextElement;
-static Ttk_ElementOptionSpec TextElementOptions[] = {
+static Ttk_ElementOptionSpec TextElementOptions[] =
+{
{ "-text", TK_OPTION_STRING,
Tk_Offset(TextElement,textObj), "" },
{ "-font", TK_OPTION_FONT,
@@ -732,76 +710,70 @@ static Ttk_ElementOptionSpec TextElementOptions[] = {
{ NULL }
};
-static void
-TextElementGeometry(
- void *clientData,
- void *elementRecord,
- Tk_Window tkwin,
- int *widthPtr,
- int *heightPtr,
- Ttk_Padding *paddingPtr)
+static void TextElementSize(
+ void *clientData, void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
TextElement *element = elementRecord;
ElementData *elementData = clientData;
RECT rc = {0, 0};
HRESULT hr = S_OK;
- if (!InitElementData(elementData, tkwin, 0)) {
+ if (!InitElementData(elementData, tkwin, 0))
return;
- }
- hr = elementData->procs->GetThemeTextExtent(elementData->hTheme,
- elementData->hDC, elementData->info->partId,
+ hr = elementData->procs->GetThemeTextExtent(
+ elementData->hTheme,
+ elementData->hDC,
+ elementData->info->partId,
Ttk_StateTableLookup(elementData->info->statemap, 0),
- Tcl_GetUnicode(element->textObj), -1,
- DT_LEFT,/*| DT_BOTTOM | DT_NOPREFIX,*/ NULL, &rc);
+ Tcl_GetUnicode(element->textObj),
+ -1,
+ DT_LEFT,// | DT_BOTTOM | DT_NOPREFIX,
+ NULL,
+ &rc);
if (SUCCEEDED(hr)) {
*widthPtr = rc.right - rc.left;
*heightPtr = rc.bottom - rc.top;
}
- if (*widthPtr < 80) {
- *widthPtr = 80;
- }
- if (*heightPtr < 20) {
- *heightPtr = 20;
- }
+ if (*widthPtr < 80) *widthPtr = 80;
+ if (*heightPtr < 20) *heightPtr = 20;
FreeElementData(elementData);
}
-static void
-TextElementDraw(
- ClientData clientData,
- void *elementRecord,
- Tk_Window tkwin,
- Drawable d,
- Ttk_Box b,
- unsigned int state)
+static void TextElementDraw(
+ ClientData clientData, void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, unsigned int state)
{
TextElement *element = elementRecord;
ElementData *elementData = clientData;
RECT rc = BoxToRect(b);
HRESULT hr = S_OK;
- if (!InitElementData(elementData, tkwin, d)) {
+ if (!InitElementData(elementData, tkwin, d))
return;
- }
- hr = elementData->procs->DrawThemeText(elementData->hTheme,
- elementData->hDC, elementData->info->partId,
+ hr = elementData->procs->DrawThemeText(
+ elementData->hTheme,
+ elementData->hDC,
+ elementData->info->partId,
Ttk_StateTableLookup(elementData->info->statemap, state),
- Tcl_GetUnicode(element->textObj), -1,
- DT_LEFT,/*| DT_BOTTOM | DT_NOPREFIX,*/
- (state & TTK_STATE_DISABLED) ? DTT_GRAYED : 0, &rc);
+ Tcl_GetUnicode(element->textObj),
+ -1,
+ DT_LEFT,// | DT_BOTTOM | DT_NOPREFIX,
+ (state & TTK_STATE_DISABLED) ? DTT_GRAYED : 0,
+ &rc);
FreeElementData(elementData);
}
-static Ttk_ElementSpec TextElementSpec = {
+static Ttk_ElementSpec TextElementSpec =
+{
TK_STYLE_VERSION_2,
sizeof(TextElement),
TextElementOptions,
- TextElementGeometry,
+ TextElementSize,
TextElementDraw
};
@@ -949,10 +921,7 @@ static ElementInfo ElementInfoTable[] = {
* +++ Initialization routine:
*/
-MODULE_SCOPE int
-TtkXPTheme_Init(
- Tcl_Interp *interp,
- HWND hwnd)
+MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd)
{
XPThemeData *themeData;
XPThemeProcs *procs;
@@ -961,9 +930,8 @@ TtkXPTheme_Init(
ElementInfo *infoPtr;
procs = LoadXPThemeProcs(&hlibrary);
- if (!procs) {
+ if (!procs)
return TCL_ERROR;
- }
procs->stubWindow = hwnd;
/*
@@ -972,9 +940,8 @@ TtkXPTheme_Init(
parentPtr = Ttk_GetTheme(interp, "winnative");
themePtr = Ttk_CreateTheme(interp, "xpnative", parentPtr);
- if (!themePtr) {
+ if (!themePtr)
return TCL_ERROR;
- }
/*
* Set theme data and cleanup proc
@@ -992,8 +959,8 @@ TtkXPTheme_Init(
*/
for (infoPtr = ElementInfoTable; infoPtr->elementName != 0; ++infoPtr) {
ClientData clientData = NewElementData(procs, infoPtr);
- Ttk_RegisterElementSpec(themePtr, infoPtr->elementName,
- infoPtr->elementSpec, clientData);
+ Ttk_RegisterElementSpec(
+ themePtr, infoPtr->elementName, infoPtr->elementSpec, clientData);
Ttk_RegisterCleanup(interp, clientData, DestroyElementData);
}
@@ -1005,9 +972,9 @@ TtkXPTheme_Init(
Ttk_RegisterLayout(themePtr, "TButton", ButtonLayout);
Ttk_RegisterLayout(themePtr, "TMenubutton", MenubuttonLayout);
Ttk_RegisterLayout(themePtr, "Vertical.TScrollbar",
- VerticalScrollbarLayout);
+ VerticalScrollbarLayout);
Ttk_RegisterLayout(themePtr, "Horizontal.TScrollbar",
- HorizontalScrollbarLayout);
+ HorizontalScrollbarLayout);
Ttk_RegisterLayout(themePtr, "Vertical.TScale", VerticalScaleLayout);
Ttk_RegisterLayout(themePtr, "Horizontal.TScale", HorizontalScaleLayout);