summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/linux-build.yml4
-rw-r--r--.github/workflows/linux-with-tcl8-build.yml (renamed from .github/workflows/linux-with-tcl86-build.yml)8
-rw-r--r--.github/workflows/linux-with-tcl91-build.yml (renamed from .github/workflows/linux-with-tcl9-build.yml)6
-rw-r--r--.github/workflows/mac-build.yml8
-rw-r--r--.github/workflows/onefiledist.yml14
-rw-r--r--.github/workflows/win-build.yml9
-rw-r--r--.project2
-rw-r--r--README.md4
-rw-r--r--doc/3DBorder.378
-rw-r--r--doc/AddOption.31
-rw-r--r--doc/BindTable.319
-rw-r--r--doc/CanvPsY.35
-rw-r--r--doc/CanvTkwin.33
-rw-r--r--doc/CanvTxtInfo.33
-rw-r--r--doc/Clipboard.31
-rw-r--r--doc/ClrSelect.31
-rw-r--r--doc/ConfigWidg.391
-rw-r--r--doc/ConfigWind.31
-rw-r--r--doc/CoordToWin.31
-rw-r--r--doc/CrtCmHdlr.31
-rw-r--r--doc/CrtConsoleChan.31
-rw-r--r--doc/CrtErrHdlr.31
-rw-r--r--doc/CrtGenHdlr.31
-rw-r--r--doc/CrtImgType.345
-rw-r--r--doc/CrtItemType.344
-rw-r--r--doc/CrtPhImgFmt.389
-rw-r--r--doc/CrtSelHdlr.37
-rw-r--r--doc/CrtWindow.31
-rw-r--r--doc/DeleteImg.31
-rw-r--r--doc/DrawFocHlt.33
-rw-r--r--doc/EventHndlr.31
-rw-r--r--doc/FindPhoto.33
-rw-r--r--doc/FontId.39
-rw-r--r--doc/FreeXId.330
-rw-r--r--doc/GeomReq.313
-rw-r--r--doc/GetAnchor.37
-rw-r--r--doc/GetBitmap.399
-rw-r--r--doc/GetCapStyl.35
-rw-r--r--doc/GetClrmap.37
-rw-r--r--doc/GetColor.319
-rw-r--r--doc/GetCursor.321
-rw-r--r--doc/GetFont.319
-rw-r--r--doc/GetGC.33
-rw-r--r--doc/GetHINSTANCE.31
-rw-r--r--doc/GetHWND.31
-rw-r--r--doc/GetImage.31
-rw-r--r--doc/GetJoinStl.35
-rw-r--r--doc/GetJustify.316
-rw-r--r--doc/GetOption.31
-rw-r--r--doc/GetPixels.326
-rw-r--r--doc/GetPixmap.35
-rw-r--r--doc/GetRelief.37
-rw-r--r--doc/GetRootCrd.31
-rw-r--r--doc/GetScroll.37
-rw-r--r--doc/GetSelect.31
-rw-r--r--doc/GetUid.31
-rw-r--r--doc/GetVRoot.33
-rw-r--r--doc/GetVisual.38
-rw-r--r--doc/Grab.32
-rw-r--r--doc/HWNDToWindow.31
-rw-r--r--doc/HandleEvent.31
-rw-r--r--doc/IdToWindow.31
-rw-r--r--doc/ImgChanged.31
-rw-r--r--doc/Inactive.35
-rw-r--r--doc/InternAtom.35
-rw-r--r--doc/MainLoop.31
-rw-r--r--doc/MainWin.35
-rw-r--r--doc/MaintGeom.31
-rw-r--r--doc/ManageGeom.31
-rw-r--r--doc/MapWindow.31
-rw-r--r--doc/MeasureChar.316
-rw-r--r--doc/MoveToplev.33
-rw-r--r--doc/Name.31
-rw-r--r--doc/NameOfImg.31
-rw-r--r--doc/OwnSelect.31
-rw-r--r--doc/ParseArgv.368
-rw-r--r--doc/QWinEvent.31
-rw-r--r--doc/Restack.31
-rw-r--r--doc/RestrictEv.31
-rw-r--r--doc/SetAppName.31
-rw-r--r--doc/SetCaret.31
-rw-r--r--doc/SetClass.31
-rw-r--r--doc/SetClassProcs.33
-rw-r--r--doc/SetGrid.31
-rw-r--r--doc/SetOptions.3152
-rw-r--r--doc/SetVisual.33
-rw-r--r--doc/StrictMotif.31
-rw-r--r--doc/TextLayout.329
-rw-r--r--doc/TkInitStubs.31
-rw-r--r--doc/Tk_Init.310
-rw-r--r--doc/Tk_Main.32
-rw-r--r--doc/WinUtil.39
-rw-r--r--doc/WindowId.33
-rw-r--r--doc/bind.n13
-rw-r--r--doc/bitmap.n12
-rw-r--r--doc/busy.n26
-rw-r--r--doc/button.n22
-rw-r--r--doc/canvas.n284
-rw-r--r--doc/checkbutton.n26
-rw-r--r--doc/chooseColor.n14
-rw-r--r--doc/chooseDirectory.n30
-rw-r--r--doc/clipboard.n17
-rw-r--r--doc/colors.n3
-rw-r--r--doc/console.n19
-rw-r--r--doc/cursors.n2
-rw-r--r--doc/dialog.n18
-rw-r--r--doc/entry.n57
-rw-r--r--doc/event.n84
-rw-r--r--doc/focus.n22
-rw-r--r--doc/focusNext.n7
-rw-r--r--doc/font.n85
-rw-r--r--doc/fontchooser.n43
-rw-r--r--doc/frame.n6
-rw-r--r--doc/getOpenFile.n37
-rw-r--r--doc/grab.n18
-rw-r--r--doc/grid.n114
-rw-r--r--doc/image.n27
-rw-r--r--doc/label.n26
-rw-r--r--doc/labelframe.n22
-rw-r--r--doc/listbox.n54
-rw-r--r--doc/loadTk.n6
-rw-r--r--doc/menu.n88
-rw-r--r--doc/menubutton.n4
-rw-r--r--doc/message.n4
-rw-r--r--doc/messageBox.n61
-rw-r--r--doc/nsimage.n52
-rw-r--r--doc/option.n20
-rw-r--r--doc/options.n4
-rw-r--r--doc/pack.n82
-rw-r--r--doc/palette.n4
-rw-r--r--doc/panedwindow.n51
-rw-r--r--doc/photo.n240
-rw-r--r--doc/place.n48
-rw-r--r--doc/popup.n6
-rw-r--r--doc/radiobutton.n17
-rw-r--r--doc/raise.n10
-rw-r--r--doc/scale.n14
-rw-r--r--doc/scrollbar.n37
-rw-r--r--doc/selection.n55
-rw-r--r--doc/send.n10
-rw-r--r--doc/spinbox.n76
-rw-r--r--doc/sysnotify.n7
-rw-r--r--doc/systray.n9
-rw-r--r--doc/text.n135
-rw-r--r--doc/tk.n14
-rw-r--r--doc/tk_mac.n32
-rw-r--r--doc/tkerror.n6
-rw-r--r--doc/tkvars.n10
-rw-r--r--doc/tkwait.n7
-rw-r--r--doc/toplevel.n4
-rw-r--r--doc/ttk_Geometry.33
-rw-r--r--doc/ttk_button.n6
-rw-r--r--doc/ttk_checkbutton.n4
-rw-r--r--doc/ttk_combobox.n12
-rw-r--r--doc/ttk_entry.n26
-rw-r--r--doc/ttk_frame.n2
-rw-r--r--doc/ttk_image.n34
-rw-r--r--doc/ttk_intro.n20
-rw-r--r--doc/ttk_label.n2
-rw-r--r--doc/ttk_labelframe.n2
-rw-r--r--doc/ttk_menubutton.n2
-rw-r--r--doc/ttk_notebook.n38
-rw-r--r--doc/ttk_panedwindow.n24
-rw-r--r--doc/ttk_progressbar.n14
-rw-r--r--doc/ttk_radiobutton.n4
-rw-r--r--doc/ttk_scale.n6
-rw-r--r--doc/ttk_scrollbar.n31
-rw-r--r--doc/ttk_separator.n2
-rw-r--r--doc/ttk_sizegrip.n8
-rw-r--r--doc/ttk_spinbox.n12
-rw-r--r--doc/ttk_style.n64
-rw-r--r--doc/ttk_treeview.n175
-rw-r--r--doc/ttk_vsapi.n12
-rw-r--r--doc/ttk_widget.n76
-rw-r--r--doc/winfo.n106
-rw-r--r--doc/wish.121
-rw-r--r--doc/wm.n141
-rw-r--r--generic/tk.decls84
-rw-r--r--generic/tk.h189
-rw-r--r--generic/tkBind.c4
-rw-r--r--generic/tkCanvArc.c4
-rw-r--r--generic/tkCanvBmap.c4
-rw-r--r--generic/tkCanvImg.c4
-rw-r--r--generic/tkCanvLine.c26
-rw-r--r--generic/tkCanvPoly.c4
-rw-r--r--generic/tkCanvPs.c4
-rw-r--r--generic/tkCanvText.c8
-rw-r--r--generic/tkCanvWind.c4
-rw-r--r--generic/tkCanvas.c154
-rw-r--r--generic/tkCmds.c6
-rw-r--r--generic/tkConsole.c2
-rw-r--r--generic/tkDecls.h185
-rw-r--r--generic/tkEntry.c10
-rw-r--r--generic/tkFont.c10
-rw-r--r--generic/tkFrame.c73
-rw-r--r--generic/tkGet.c2
-rw-r--r--generic/tkIcu.c19
-rw-r--r--generic/tkImage.c23
-rw-r--r--generic/tkImgBmap.c2
-rw-r--r--generic/tkImgPhoto.c247
-rw-r--r--generic/tkInt.decls469
-rw-r--r--generic/tkInt.h67
-rw-r--r--generic/tkIntDecls.h158
-rw-r--r--generic/tkIntPlatDecls.h270
-rw-r--r--generic/tkIntXlibDecls.h795
-rw-r--r--generic/tkListbox.c28
-rw-r--r--generic/tkMain.c13
-rw-r--r--generic/tkMenu.c6
-rw-r--r--generic/tkMenu.h2
-rw-r--r--generic/tkMenuDraw.c4
-rw-r--r--generic/tkMessage.c11
-rw-r--r--generic/tkObj.c29
-rw-r--r--generic/tkOldConfig.c30
-rw-r--r--generic/tkOldTest.c418
-rw-r--r--generic/tkPack.c343
-rw-r--r--generic/tkPkgConfig.c8
-rw-r--r--generic/tkPlatDecls.h22
-rw-r--r--generic/tkRectOval.c6
-rw-r--r--generic/tkScrollbar.c60
-rw-r--r--generic/tkScrollbar.h19
-rw-r--r--generic/tkSquare.c29
-rw-r--r--generic/tkStubInit.c430
-rw-r--r--generic/tkTest.c10
-rw-r--r--generic/tkText.c36
-rw-r--r--generic/tkText.h56
-rw-r--r--generic/tkTextDisp.c10
-rw-r--r--generic/tkTextIndex.c16
-rw-r--r--generic/tkTextTag.c326
-rw-r--r--generic/tkUtil.c74
-rw-r--r--generic/tkWindow.c13
-rw-r--r--generic/ttk/ttk.decls4
-rw-r--r--generic/ttk/ttkClamTheme.c25
-rw-r--r--generic/ttk/ttkClassicTheme.c6
-rw-r--r--generic/ttk/ttkDecls.h13
-rw-r--r--generic/ttk/ttkDefaultTheme.c6
-rw-r--r--generic/ttk/ttkElements.c10
-rw-r--r--generic/ttk/ttkEntry.c8
-rw-r--r--generic/ttk/ttkInit.c10
-rw-r--r--generic/ttk/ttkLabel.c8
-rw-r--r--generic/ttk/ttkNotebook.c14
-rw-r--r--generic/ttk/ttkPanedwindow.c2
-rw-r--r--generic/ttk/ttkProgress.c4
-rw-r--r--generic/ttk/ttkStubInit.c4
-rw-r--r--generic/ttk/ttkTheme.h3
-rw-r--r--generic/ttk/ttkThemeInt.h6
-rw-r--r--generic/ttk/ttkTreeview.c45
-rw-r--r--generic/ttk/ttkWidget.c2
-rw-r--r--library/demos/anilabel.tcl2
-rw-r--r--library/demos/aniwave.tcl2
-rw-r--r--library/demos/arrow.tcl2
-rw-r--r--library/demos/bind.tcl2
-rw-r--r--library/demos/bitmap.tcl2
-rw-r--r--library/demos/browse2
-rw-r--r--library/demos/button.tcl2
-rw-r--r--library/demos/check.tcl2
-rw-r--r--library/demos/clrpick.tcl2
-rw-r--r--library/demos/colors.tcl2
-rw-r--r--library/demos/combo.tcl2
-rw-r--r--library/demos/cscroll.tcl6
-rw-r--r--library/demos/ctext.tcl4
-rw-r--r--library/demos/entry1.tcl2
-rw-r--r--library/demos/entry2.tcl2
-rw-r--r--library/demos/entry3.tcl2
-rw-r--r--library/demos/filebox.tcl2
-rw-r--r--library/demos/floor.tcl4
-rw-r--r--library/demos/fontchoose.tcl2
-rw-r--r--library/demos/form.tcl2
-rw-r--r--library/demos/goldberg.tcl2
-rw-r--r--library/demos/hello2
-rw-r--r--library/demos/hscale.tcl2
-rw-r--r--library/demos/icon.tcl2
-rw-r--r--library/demos/image1.tcl2
-rw-r--r--library/demos/image2.tcl2
-rw-r--r--library/demos/items.tcl4
-rw-r--r--library/demos/ixset2
-rw-r--r--library/demos/knightstour.tcl2
-rw-r--r--library/demos/label.tcl2
-rw-r--r--library/demos/labelframe.tcl2
-rw-r--r--library/demos/mac_styles.tcl4
-rw-r--r--library/demos/mac_tabs.tcl3
-rw-r--r--library/demos/mac_wm.tcl3
-rw-r--r--library/demos/mclist.tcl2
-rw-r--r--library/demos/menu.tcl2
-rw-r--r--library/demos/menubu.tcl2
-rw-r--r--library/demos/msgbox.tcl2
-rw-r--r--library/demos/paned1.tcl2
-rw-r--r--library/demos/paned2.tcl2
-rw-r--r--library/demos/pendulum.tcl2
-rw-r--r--library/demos/plot.tcl2
-rw-r--r--library/demos/puzzle.tcl2
-rw-r--r--library/demos/radio.tcl2
-rw-r--r--library/demos/rmt2
-rw-r--r--library/demos/rolodex2
-rw-r--r--library/demos/ruler.tcl2
-rw-r--r--library/demos/sayings.tcl2
-rw-r--r--library/demos/search.tcl2
-rw-r--r--library/demos/spin.tcl2
-rw-r--r--library/demos/states.tcl2
-rw-r--r--library/demos/style.tcl2
-rw-r--r--library/demos/tcolor2
-rw-r--r--library/demos/text.tcl2
-rw-r--r--library/demos/textpeer.tcl2
-rw-r--r--library/demos/timer2
-rw-r--r--library/demos/toolbar.tcl2
-rw-r--r--library/demos/tree.tcl2
-rw-r--r--library/demos/ttkbut.tcl2
-rw-r--r--library/demos/ttkmenu.tcl2
-rw-r--r--library/demos/ttknote.tcl2
-rw-r--r--library/demos/ttkpane.tcl2
-rw-r--r--library/demos/ttkprogress.tcl2
-rw-r--r--library/demos/ttkscale.tcl2
-rw-r--r--library/demos/twind.tcl2
-rw-r--r--library/demos/unicodeout.tcl2
-rw-r--r--library/demos/vscale.tcl2
-rw-r--r--library/demos/widget2
-rw-r--r--library/menu.tcl27
-rw-r--r--library/obsolete.tcl178
-rw-r--r--library/tclIndex5
-rw-r--r--library/tearoff.tcl12
-rw-r--r--library/tk.tcl2
-rw-r--r--library/ttk/clamTheme.tcl6
-rw-r--r--library/unsupported.tcl269
-rw-r--r--macosx/Tk.xcodeproj/project.pbxproj4
-rw-r--r--macosx/tkMacOSXDefault.h4
-rw-r--r--macosx/tkMacOSXFont.c70
-rw-r--r--macosx/tkMacOSXImage.c4
-rw-r--r--macosx/tkMacOSXKeyboard.c2
-rw-r--r--macosx/tkMacOSXNotify.c28
-rw-r--r--macosx/tkMacOSXWm.c6
-rw-r--r--macosx/tkMacOSXXStubs.c8
-rw-r--r--macosx/ttkMacOSXTheme.c12
-rw-r--r--tests/bind.test6
-rw-r--r--tests/button.test6
-rw-r--r--tests/cluster.test34
-rw-r--r--tests/config.test10
-rw-r--r--tests/constraints.tcl18
-rw-r--r--tests/imgPhoto.test6
-rw-r--r--tests/menu.test98
-rw-r--r--tests/menuDraw.test2
-rw-r--r--tests/panedwindow.test2
-rw-r--r--tests/scrollbar.test28
-rw-r--r--tests/textTag.test18
-rw-r--r--tests/ttk/entry.test2
-rw-r--r--tests/ttk/treeview.test15
-rw-r--r--unix/Makefile.in17
-rwxr-xr-xunix/configure161
-rw-r--r--unix/configure.ac27
-rw-r--r--unix/tcl.m427
-rw-r--r--unix/tk.spec6
-rw-r--r--unix/tkAppInit.c19
-rw-r--r--unix/tkConfig.h.in18
-rw-r--r--unix/tkUnixDefault.h4
-rw-r--r--unix/tkUnixFont.c246
-rw-r--r--unix/tkUnixKey.c2
-rw-r--r--unix/tkUnixMenu.c2
-rw-r--r--unix/tkUnixPort.h9
-rw-r--r--unix/tkUnixRFont.c4
-rw-r--r--win/Makefile.in6
-rw-r--r--win/README2
-rwxr-xr-xwin/configure43
-rw-r--r--win/configure.ac27
-rw-r--r--win/makefile.vc6
-rw-r--r--win/tcl.m48
-rw-r--r--win/tkWinDefault.h4
-rw-r--r--win/tkWinFont.c10
-rw-r--r--win/tkWinKey.c4
-rw-r--r--win/tkWinMenu.c2
-rw-r--r--win/tkWinPort.h9
-rw-r--r--win/ttkWinTheme.c4
-rw-r--r--win/winMain.c19
-rw-r--r--xlib/X11/keysymdef.h24
371 files changed, 4500 insertions, 6394 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
index 98fe4ca..ee5d2e7 100644
--- a/.github/workflows/linux-build.yml
+++ b/.github/workflows/linux-build.yml
@@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
@@ -143,7 +143,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
diff --git a/.github/workflows/linux-with-tcl86-build.yml b/.github/workflows/linux-with-tcl8-build.yml
index bdd77a1..557b0e9 100644
--- a/.github/workflows/linux-with-tcl86-build.yml
+++ b/.github/workflows/linux-with-tcl8-build.yml
@@ -1,4 +1,4 @@
-name: Linux (with Tcl 8.6)
+name: Linux (with Tcl 8.7)
on:
push:
branches:
@@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-6-branch
+ ref: core-8-branch
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
@@ -70,7 +70,7 @@ jobs:
working-directory: tcl/unix
- name: Configure (opts=${{ matrix.cfgopt }})
run: |
- ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH --disable-zipfs "--prefix=$HOME/install dir" || {
+ ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
cat config.log
echo "::error::Failure during Configure"
exit 1
@@ -124,7 +124,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-6-branch
+ ref: core-8-branch
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
diff --git a/.github/workflows/linux-with-tcl9-build.yml b/.github/workflows/linux-with-tcl91-build.yml
index ccff18c..4672b54 100644
--- a/.github/workflows/linux-with-tcl9-build.yml
+++ b/.github/workflows/linux-with-tcl91-build.yml
@@ -1,4 +1,4 @@
-name: Linux (with Tcl 9.0)
+name: Linux (with Tcl 9.1)
on:
push:
branches:
@@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: main
+ ref: tip-626
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
@@ -124,7 +124,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: main
+ ref: tip-626
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml
index 6f30417..2462a17 100644
--- a/.github/workflows/mac-build.yml
+++ b/.github/workflows/mac-build.yml
@@ -23,11 +23,11 @@ jobs:
uses: actions/checkout@v4
with:
path: tk
- - name: Checkout Tcl
+ - name: Check out Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Prepare checked out repositories
run: |
@@ -75,11 +75,11 @@ jobs:
uses: actions/checkout@v4
with:
path: tk
- - name: Checkout Tcl
+ - name: Check out Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Prepare checked out repositories
env:
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml
index c21d4d0..2c707a4 100644
--- a/.github/workflows/onefiledist.yml
+++ b/.github/workflows/onefiledist.yml
@@ -24,11 +24,11 @@ jobs:
uses: actions/checkout@v4
with:
path: tk
- - name: Checkout Tcl 8.7
+ - name: Checkout Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Setup Environment
run: |
@@ -58,7 +58,7 @@ jobs:
# TODO: need the Tk version separately for distro naming below
- name: Package
run: |
- cp bin/wish8.7 ${BUILD_NAME}
+ cp bin/wish9.0 ${BUILD_NAME}
chmod +x ${BUILD_NAME}
tar -cf ${BUILD_NAME}.tar ${BUILD_NAME}
working-directory: ${{ env.INST_DIR }}
@@ -88,11 +88,11 @@ jobs:
uses: actions/checkout@v4
with:
path: tk
- - name: Checkout Tcl 8.7
+ - name: Checkout Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Checkout create-dmg
uses: actions/checkout@v4
@@ -176,11 +176,11 @@ jobs:
uses: actions/checkout@v4
with:
path: tk
- - name: Checkout Tcl 8.7
+ - name: Checkout Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Setup Environment
run: |
diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml
index 4ef735f..62d3974 100644
--- a/.github/workflows/win-build.yml
+++ b/.github/workflows/win-build.yml
@@ -24,18 +24,17 @@ jobs:
config:
- ""
- "OPTS=symbols"
- - "OPTS=symbols STATS=compdbg,memdbg"
- "OPTS=static"
steps:
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- - name: Checkout Tcl 8.7
+ - name: Checkout Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Init MSVC
uses: ilammy/msvc-dev-cmd@v1
@@ -121,11 +120,11 @@ jobs:
install: git mingw-w64-x86_64-toolchain make zip
- name: Checkout Tk
uses: actions/checkout@v4
- - name: Checkout Tcl 8.7
+ - name: Checkout Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
- ref: core-8-branch
+ ref: main
path: tcl
- name: Prepare
run: |
diff --git a/.project b/.project
index cc5f605..0d24f11 100644
--- a/.project
+++ b/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>tk8.7</name>
+ <name>tk9.0</name>
<comment></comment>
<projects>
</projects>
diff --git a/README.md b/README.md
index 2390759..eb88ba9 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# README: Tk
-This is the **Tk 8.7a6** source distribution.
+This is the **Tk 9.0b1** source distribution.
You can get any source release of Tk from [our distribution
site](https://sourceforge.net/projects/tcl/files/Tcl/).
@@ -25,7 +25,7 @@ This directory contains the sources and documentation for Tk, a
cross-platform GUI toolkit implemented with the Tcl scripting language.
For details on features, incompatibilities, and potential problems with
-this release, see [the Tcl/Tk 8.7 Web page](https://www.tcl-lang.org/software/tcltk/8.7.html)
+this release, see [the Tcl/Tk 9.0 Web page](https://www.tcl-lang.org/software/tcltk/9.0.html)
or refer to the "changes" file in this directory, which contains a
historical record of all changes to Tk.
diff --git a/doc/3DBorder.3 b/doc/3DBorder.3
index a6deb30..d609d6d 100644
--- a/doc/3DBorder.3
+++ b/doc/3DBorder.3
@@ -13,58 +13,49 @@ Tk_Alloc3DBorderFromObj, Tk_ClipDrawableToRect, Tk_DrawHighlightBorder, Tk_Get3D
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
-.sp
+
Tk_3DBorder
-\fBTk_Alloc3DBorderFromObj(\fIinterp, tkwin, objPtr\fB)\fR
+\fBTk_Alloc3DBorderFromObj\fR(\fIinterp, tkwin, objPtr\fR)
.sp
-void
-\fBTk_ClipDrawableToRect(\fIdisplay, drawable, x, y, width, height\fB)\fR
+\fBTk_ClipDrawableToRect\fR(\fIdisplay, drawable, x, y, width, height\fR)
.sp
-void
-\fBTk_DrawHighlightBorder(\fItkwin, fgGC, bgGC, highlightWidth, drawable\fB)\fR
+\fBTk_DrawHighlightBorder\fR(\fItkwin, fgGC, bgGC, highlightWidth, drawable\fR)
.sp
Tk_3DBorder
-\fBTk_Get3DBorder(\fIinterp, tkwin, colorName\fB)\fR
+\fBTk_Get3DBorder\fR(\fIinterp, tkwin, colorName\fR)
.sp
-void
-\fBTk_Get3DBorderColors(\fIborder, bgColorPtr, darkColorPtr, lightColorPtr\fB)\fR
+\fBTk_Get3DBorderColors\fR(\fIborder, bgColorPtr, darkColorPtr, lightColorPtr\fR)
.sp
Tk_3DBorder
-\fBTk_Get3DBorderFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_Get3DBorderFromObj\fR(\fItkwin, objPtr\fR)
.sp
-void
-\fBTk_Draw3DRectangle(\fItkwin, drawable, border, x, y, width, height, borderWidth, relief\fB)\fR
+\fBTk_Draw3DRectangle\fR(\fItkwin, drawable, border, x, y, width, height, borderWidth, relief\fR)
.sp
-void
-\fBTk_Fill3DRectangle(\fItkwin, drawable, border, x, y, width, height, borderWidth, relief\fB)\fR
+\fBTk_Fill3DRectangle\fR(\fItkwin, drawable, border, x, y, width, height, borderWidth, relief\fR)
.sp
-void
-\fBTk_Draw3DPolygon(\fItkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief\fB)\fR
+\fBTk_Draw3DPolygon\fR(\fItkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief\fR)
.sp
-void
-\fBTk_Fill3DPolygon(\fItkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief\fB)\fR
+\fBTk_Fill3DPolygon\fR(\fItkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief\fR)
.sp
-void
-\fBTk_3DVerticalBevel\fR(\fItkwin, drawable, border, x, y, width, height, leftBevel, relief\fB)\fR
+\fBTk_3DVerticalBevel\fR(\fItkwin, drawable, border, x, y, width, height, leftBevel, relief\fR)
.sp
-void
-\fBTk_3DHorizontalBevel\fR(\fItkwin, drawable, border, x, y, width, height, leftIn, rightIn, topBevel, relief\fB)\fR
+\fBTk_3DHorizontalBevel\fR(\fItkwin, drawable, border, x, y, width, height, leftIn, rightIn, topBevel, relief\fR)
.sp
-void
-\fBTk_SetBackgroundFromBorder(\fItkwin, border\fB)\fR
+\fBTk_SetBackgroundFromBorder\fR(\fItkwin, border\fR)
.sp
const char *
-\fBTk_NameOf3DBorder(\fIborder\fB)\fR
+\fBTk_NameOf3DBorder\fR(\fIborder\fR)
.sp
XColor *
-\fBTk_3DBorderColor(\fIborder\fB)\fR
+\fBTk_3DBorderColor\fR(\fIborder\fR)
.sp
GC *
-\fBTk_3DBorderGC(\fItkwin, border, which\fB)\fR
+\fBTk_3DBorderGC\fR(\fItkwin, border, which\fR)
.sp
-\fBTk_Free3DBorderFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_Free3DBorderFromObj\fR(\fItkwin, objPtr\fR)
.sp
-\fBTk_Free3DBorder(\fIborder\fB)\fR
+\fBTk_Free3DBorder\fR(\fIborder\fR)
+.fi
.SH ARGUMENTS
.AS "Tk_3DBorder" borderWidth
.AP Tcl_Interp *interp in
@@ -100,7 +91,8 @@ Width of border in pixels. Positive means border is inside rectangle
given by \fIx\fR, \fIy\fR, \fIwidth\fR, \fIheight\fR, negative means
border is outside rectangle.
.AP int highlightWidth in
-Width of ring around the outside of the widget if the widget has received the input focus.
+Width of ring around the outside of the widget if the widget has received the
+input focus.
.AP int relief in
Indicates 3-D position of interior of value relative to exterior;
should be \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR,
@@ -147,9 +139,11 @@ Must be \fBTK_3D_FLAT_GC\fR, \fBTK_3D_LIGHT_GC\fR, or \fBTK_3D_DARK_GC\fR.
.AP XColor *bgColorPtr out
Pointer to location in which to store the background color of the given border.
.AP XColor *darkColorPtr out
-Pointer to location in which to store the color for darker areas of the given border.
+Pointer to location in which to store the color for darker areas of the
+given border.
.AP XColor *lightColorPtr out
-Pointer to location in which to store the color for lighter areas of the given border.
+Pointer to location in which to store the color for lighter areas of the
+given border.
.AP GC fgGC in
Foreground X graphics context.
.AP GC fgGC in
@@ -180,12 +174,15 @@ information about the return value in \fIobjPtr\fR, which speeds up
future calls to \fBTk_Alloc3DBorderFromObj\fR with the same \fIobjPtr\fR
and \fItkwin\fR.
.PP
-\fBTk_ClipDrawableToRect\fR will clip all drawing into the drawable d to the given rectangle. If width or height are negative, reset to no clipping.
-Subsequent drawing into d is offset and clipped as specified.
-The function is only used when \fBTK_NO_DOUBLE_BUFFERING\fR is specified at compile time.
+\fBTk_ClipDrawableToRect\fR will clip all drawing into the drawable \fId\fR
+to the given rectangle. If \fIwidth\fR or \fIheight\fR are negative, reset
+to no clipping.
+Subsequent drawing into \fId\fR is offset and clipped as specified.
+The function is only used when \fBTK_NO_DOUBLE_BUFFERING\fR is specified at
+compile time.
.PP
-\fBTk_DrawHighlightBorder\fR draws a rectangular ring around the outside of a widget
-to indicate that it has received the input focus.
+\fBTk_DrawHighlightBorder\fR draws a rectangular ring around the outside of
+a widget to indicate that it has received the input focus.
On the Macintosh, this puts a 1 pixel border in the bgGC color between
the widget and the focus ring, except in the case where highlightWidth
is 1, in which case the border is left out.
@@ -226,8 +223,8 @@ which of several three-dimensional effects is desired:
\fBTK_RELIEF_RAISED\fR means that the interior of the rectangle should
appear raised relative to the exterior of the rectangle, and
\fBTK_RELIEF_SUNKEN\fR means that the interior should appear depressed.
-\fBTK_RELIEF_GROOVE\fR and \fBTK_RELIEF_RIDGE\fR mean that there should appear to be
-a groove or ridge around the exterior of the rectangle.
+\fBTK_RELIEF_GROOVE\fR and \fBTK_RELIEF_RIDGE\fR mean that there should
+appear to be a groove or ridge around the exterior of the rectangle.
.PP
\fBTk_Fill3DRectangle\fR is somewhat like \fBTk_Draw3DRectangle\fR except
that it first fills the rectangular area with the background color
@@ -325,4 +322,5 @@ There should be exactly one call to \fBTk_Free3DBorderFromObj\fR or
\fBTk_Free3DBorder\fR for each call to \fBTk_Alloc3DBorderFromObj\fR
or \fBTk_Get3DBorder\fR.
.SH KEYWORDS
-3D, background, border, color, depressed, illumination, value, polygon, raised, shadow, three-dimensional effect
+3D, background, border, color, depressed, illumination, value, polygon,
+raised, shadow, three-dimensional effect
diff --git a/doc/AddOption.3 b/doc/AddOption.3
index fc46492..9d20a55 100644
--- a/doc/AddOption.3
+++ b/doc/AddOption.3
@@ -16,6 +16,7 @@ void
.sp
Tcl_Obj *
\fBTk_GetSystemDefault\fR(\fItkwin, dbName, className\fR)
+.fi
.SH ARGUMENTS
.AP Tk_Window tkwin in
Token for window.
diff --git a/doc/BindTable.3 b/doc/BindTable.3
index 1d3a85b..960801d 100644
--- a/doc/BindTable.3
+++ b/doc/BindTable.3
@@ -15,24 +15,25 @@ Tk_CreateBindingTable, Tk_DeleteBindingTable, Tk_CreateBinding, Tk_DeleteBinding
\fB#include <tk.h>\fR
.sp
Tk_BindingTable
-\fBTk_CreateBindingTable(\fIinterp\fB)\fR
+\fBTk_CreateBindingTable\fR(\fIinterp\fR)
.sp
-\fBTk_DeleteBindingTable(\fIbindingTable\fB)\fR
+\fBTk_DeleteBindingTable\fR(\fIbindingTable\fR)
.sp
unsigned long
-\fBTk_CreateBinding(\fIinterp, bindingTable, object, eventString, script, append\fB)\fR
+\fBTk_CreateBinding\fR(\fIinterp, bindingTable, object, eventString, script, append\fR)
.sp
int
-\fBTk_DeleteBinding(\fIinterp, bindingTable, object, eventString\fB)\fR
+\fBTk_DeleteBinding\fR(\fIinterp, bindingTable, object, eventString\fR)
.sp
const char *
-\fBTk_GetBinding(\fIinterp, bindingTable, object, eventString\fB)\fR
+\fBTk_GetBinding\fR(\fIinterp, bindingTable, object, eventString\fR)
.sp
-\fBTk_GetAllBindings(\fIinterp, bindingTable, object\fB)\fR
+\fBTk_GetAllBindings\fR(\fIinterp, bindingTable, object\fR)
.sp
-\fBTk_DeleteAllBindings(\fIbindingTable, object\fB)\fR
+\fBTk_DeleteAllBindings\fR(\fIbindingTable, object\fR)
.sp
-\fBTk_BindEvent(\fIbindingTable, eventPtr, tkwin, numObjects, objectPtr\fB)\fR
+\fBTk_BindEvent\fR(\fIbindingTable, eventPtr, tkwin, numObjects, objectPtr\fR)
+.fi
.SH ARGUMENTS
.AS Tk_BindingTable bindingTable
.AP Tcl_Interp *interp in
@@ -55,7 +56,7 @@ X event to match against bindings in \fIbindingTable\fR.
.AP Tk_Window tkwin in
Identifier for any window on the display where the event occurred.
Used to find display-related information such as key maps.
-.AP int numObjects in
+.AP Tcl_Size numObjects in
Number of object identifiers pointed to by \fIobjectPtr\fR.
.AP "void **" objectPtr in
Points to an array of object identifiers: bindings will be considered
diff --git a/doc/CanvPsY.3 b/doc/CanvPsY.3
index 1e4e320..5b613fb 100644
--- a/doc/CanvPsY.3
+++ b/doc/CanvPsY.3
@@ -29,8 +29,9 @@ int
.sp
int
\fBTk_CanvasPsStipple\fR(\fIinterp, canvas, bitmap\fR)
+.fi
.SH ARGUMENTS
-.AS int "numPoints"
+.AS Tcl_Size "numPoints"
.AP Tk_Canvas canvas in
A token that identifies a canvas widget for which Postscript is
being generated.
@@ -58,7 +59,7 @@ Pointer to an array of coordinates for one or more
points specified in canvas coordinates.
The order of values in \fIcoordPtr\fR is x1, y1, x2, y2, x3, y3,
and so on.
-.AP int numPoints in
+.AP Tcl_Size numPoints in
Number of points at \fIcoordPtr\fR.
.BE
.SH DESCRIPTION
diff --git a/doc/CanvTkwin.3 b/doc/CanvTkwin.3
index 5cb29fa..0862d82 100644
--- a/doc/CanvTkwin.3
+++ b/doc/CanvTkwin.3
@@ -30,6 +30,7 @@ int
Tk_OptionParseProc *\fBTk_CanvasTagsParseProc\fR;
.sp
Tk_OptionPrintProc *\fBTk_CanvasTagsPrintProc\fR;
+.fi
.SH ARGUMENTS
.AS Tk_ItemType *drawableXPtr
.AP Tk_Canvas canvas in
@@ -149,7 +150,7 @@ static const Tk_CustomOption tagsOption = {Tk_CanvasTagsParseProc,
static const Tk_ConfigSpec configSpecs[] = {
...
- {TK_CONFIG_CUSTOM, "\-tags", NULL, NULL,
+ {TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
...
};
diff --git a/doc/CanvTxtInfo.3 b/doc/CanvTxtInfo.3
index 1dd2354..9bc280b 100644
--- a/doc/CanvTxtInfo.3
+++ b/doc/CanvTxtInfo.3
@@ -15,6 +15,7 @@ Tk_CanvasTextInfo \- additional information for managing text items in canvases
.sp
Tk_CanvasTextInfo *
\fBTk_CanvasGetTextInfo\fR(\fIcanvas\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Canvas canvas
.AP Tk_Canvas canvas in
@@ -31,7 +32,7 @@ a structure that is shared between Tk and all the items that display
text.
The structure has the following form:
.CS
-typedef struct Tk_CanvasTextInfo {
+typedef struct {
Tk_3DBorder \fIselBorder\fR;
int \fIselBorderWidth\fR;
XColor *\fIselFgColorPtr\fR;
diff --git a/doc/Clipboard.3 b/doc/Clipboard.3
index cc09018..a4fcb6b 100644
--- a/doc/Clipboard.3
+++ b/doc/Clipboard.3
@@ -19,6 +19,7 @@ int
.sp
int
\fBTk_ClipboardAppend\fR(\fIinterp, tkwin, target, format, buffer\fR)
+.fi
.SH ARGUMENTS
.AS Tk_ClipboardClear tkwin
.AP Tcl_Interp *interp in
diff --git a/doc/ClrSelect.3 b/doc/ClrSelect.3
index 1b942b5..27dcd45 100644
--- a/doc/ClrSelect.3
+++ b/doc/ClrSelect.3
@@ -15,6 +15,7 @@ Tk_ClearSelection \- Deselect a selection
\fB#include <tk.h>\fR
.sp
\fBTk_ClearSelection\fR(\fItkwin, selection\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window tkwin
.AP Tk_Window tkwin in
diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3
index 58712db..61c49e8 100644
--- a/doc/ConfigWidg.3
+++ b/doc/ConfigWidg.3
@@ -15,15 +15,16 @@ Tk_ConfigureWidget, Tk_ConfigureInfo, Tk_ConfigureValue, Tk_FreeOptions \- proce
\fB#include <tk.h>\fR
.sp
int
-\fBTk_ConfigureWidget(\fIinterp, tkwin, specs, argc, argv, widgRec, flags\fB)\fR
+\fBTk_ConfigureWidget\fR(\fIinterp, tkwin, specs, objc, objv, widgRec, flags\fR)
.sp
int
-\fBTk_ConfigureInfo(\fIinterp, tkwin, specs, widgRec, argvName, flags\fB)\fR
+\fBTk_ConfigureInfo\fR(\fIinterp, tkwin, specs, widgRec, argvName, flags\fR)
.sp
int
-\fBTk_ConfigureValue(\fIinterp, tkwin, specs, widgRec, argvName, flags\fB)\fR
+\fBTk_ConfigureValue\fR(\fIinterp, tkwin, specs, widgRec, argvName, flags\fR)
.sp
-\fBTk_FreeOptions(\fIspecs, widgRec, display, flags\fB)\fR
+\fBTk_FreeOptions\fR(\fIspecs, widgRec, display, flags\fR)
+.fi
.SH ARGUMENTS
.AS void *widgRec in/out
.AP Tcl_Interp *interp in
@@ -33,9 +34,9 @@ Window used to represent widget (needed to set up X resources).
.AP "const Tk_ConfigSpec" *specs in
Pointer to table specifying legal configuration options for this
widget.
-.AP int argc in
-Number of arguments in \fIargv\fR.
-.AP "const char" **argv in
+.AP Tcl_Size objc in
+Number of arguments in \fIobjv\fR.
+.AP "Tcl_Obj *const *" objv in
Command-line options for configuring widget.
.AP char *widgRec in/out
Points to widget record structure. Fields in this structure get
@@ -62,8 +63,8 @@ order to free up resources.
.BE
.SH DESCRIPTION
.PP
-Note: \fBTk_ConfigureWidget\fR should be replaced with the new
-\fBTcl_Obj\fR based API \fBTk_SetOptions\fR. The old interface is
+Note that \fBTk_ConfigureWidget\fR should be replaced with the new
+\fBTcl_Obj\fR based API, \fBTk_SetOptions\fR. The old interface is
retained for backward compatibility.
.PP
\fBTk_ConfigureWidget\fR is called to configure various aspects of a
@@ -75,16 +76,16 @@ It is typically
invoked when widgets are created, and again when the \fBconfigure\fR
command is invoked for a widget.
Although intended primarily for widgets, \fBTk_ConfigureWidget\fR
-can be used in other situations where \fIargc-argv\fR information
+can be used in other situations where \fIobjc-objv\fR information
is to be used to fill in a record structure, such as configuring
graphical elements for a canvas widget or entries of a menu.
.PP
\fBTk_ConfigureWidget\fR processes
a table specifying the configuration options that are supported
-(\fIspecs\fR) and a collection of command-line arguments (\fIargc\fR and
-\fIargv\fR) to fill in fields of a record (\fIwidgRec\fR).
+(\fIspecs\fR) and a collection of command-line arguments (\fIobjc\fR and
+\fIobjv\fR) to fill in fields of a record (\fIwidgRec\fR).
It uses the option database and defaults specified in \fIspecs\fR
-to fill in fields of \fIwidgRec\fR that are not specified in \fIargv\fR.
+to fill in fields of \fIwidgRec\fR that are not specified in \fIobjv\fR.
\fBTk_ConfigureWidget\fR normally returns the value \fBTCL_OK\fR; in this
case it does not modify \fIinterp\fR.
If an error
@@ -120,12 +121,12 @@ The \fIargvName\fR field is a string such as
.QW \-font
or
.QW \-bg ,
-which is compared with the values in \fIargv\fR (if \fIargvName\fR is
+which is compared with the values in \fIobjv\fR (if \fIargvName\fR is
NULL it means this is a grouped entry; see \fBGROUPED ENTRIES\fR below). The
\fIdbName\fR and \fIdbClass\fR fields are used to look up a value
for this option in the option database. The \fIdefValue\fR field
specifies a default value for this configuration option if no
-value is specified in either \fIargv\fR or the option database.
+value is specified in either \fIobjv\fR or the option database.
\fIOffset\fR indicates where in \fIwidgRec\fR to store information
about this option, and \fIspecFlags\fR contains additional information
to control the processing of this configuration option (see FLAGS
@@ -133,14 +134,14 @@ below).
The last field, \fIcustomPtr\fR, is only used if \fItype\fR is
\fBTK_CONFIG_CUSTOM\fR; see CUSTOM OPTION TYPES below.
.PP
-\fBTk_ConfigureWidget\fR first processes \fIargv\fR to see which
+\fBTk_ConfigureWidget\fR first processes \fIobjv\fR to see which
(if any) configuration options are specified there. \fIArgv\fR
must contain an even number of fields; the first of each pair
of fields must match the \fIargvName\fR of some entry in \fIspecs\fR
(unique abbreviations are acceptable),
and the second field of the pair contains the value for that
configuration option. If there are entries in \fIspec\fR for which
-there were no matching entries in \fIargv\fR,
+there were no matching entries in \fIobjv\fR,
\fBTk_ConfigureWidget\fR uses the \fIdbName\fR and \fIdbClass\fR
fields of the \fIspecs\fR entry to probe the option database; if
a value is found, then it is used as the value for the option.
@@ -149,7 +150,7 @@ Finally, if no entry is found in the option database, the
value for the configuration option. If the \fIdefValue\fR is
NULL, or if the \fBTK_CONFIG_DONT_SET_DEFAULT\fR bit is set in
\fIflags\fR, then there is no default value and this \fIspecs\fR entry
-will be ignored if no value is specified in \fIargv\fR or the
+will be ignored if no value is specified in \fIobjv\fR or the
option database.
.PP
Once a string value has been determined for a configuration option,
@@ -171,6 +172,7 @@ to do with the string value of that configuration option. The
legal values for \fItype\fR, and the corresponding actions, are:
.TP
\fBTK_CONFIG_ACTIVE_CURSOR\fR
+.
The value
must be an ASCII string identifying a cursor in a form
suitable for passing to \fBTk_GetCursor\fR.
@@ -185,12 +187,14 @@ If the previous value of the target
was not \fBNone\fR, then it is freed by passing it to \fBTk_FreeCursor\fR.
.TP
\fBTK_CONFIG_ANCHOR\fR
+.
The value must be an ASCII string identifying an anchor point in one of the ways
accepted by \fBTk_GetAnchor\fR.
The string is converted to a \fBTk_Anchor\fR by calling
\fBTk_GetAnchor\fR and the result is stored in the target.
.TP
\fBTK_CONFIG_BITMAP\fR
+.
The value must be an ASCII string identifying a bitmap in a form
suitable for passing to \fBTk_GetBitmap\fR. The value is converted
to a \fBPixmap\fR by calling \fBTk_GetBitmap\fR and the result
@@ -201,6 +205,7 @@ If the previous value of the target
was not \fBNone\fR, then it is freed by passing it to \fBTk_FreeBitmap\fR.
.TP
\fBTK_CONFIG_BOOLEAN\fR
+.
The value must be an ASCII string specifying a boolean value. Any
of the values
.QW true ,
@@ -220,6 +225,7 @@ The target is expected to be an integer; for true values it will
be set to 1 and for false values it will be set to 0.
.TP
\fBTK_CONFIG_BORDER\fR
+.
The value must be an ASCII string identifying a border color in a form
suitable for passing to \fBTk_Get3DBorder\fR. The value is converted
to a (\fBTk_3DBorder *\fR) by calling \fBTk_Get3DBorder\fR and the result
@@ -230,6 +236,7 @@ If the previous value of the target
was not NULL, then it is freed by passing it to \fBTk_Free3DBorder\fR.
.TP
\fBTK_CONFIG_CAP_STYLE\fR
+.
The value must be
an ASCII string identifying a cap style in one of the ways
accepted by \fBTk_GetCapStyle\fR.
@@ -238,6 +245,7 @@ to the cap style by calling
\fBTk_GetCapStyle\fR and the result is stored in the target.
.TP
\fBTK_CONFIG_COLOR\fR
+.
The value must be an ASCII string identifying a color in a form
suitable for passing to \fBTk_GetColor\fR. The value is converted
to an (\fBXColor *\fR) by calling \fBTk_GetColor\fR and the result
@@ -248,27 +256,32 @@ If the previous value of the target
was not NULL, then it is freed by passing it to \fBTk_FreeColor\fR.
.TP
\fBTK_CONFIG_CURSOR\fR
+.
This option is identical to \fBTK_CONFIG_ACTIVE_CURSOR\fR except
that the new cursor is not made the active one for \fItkwin\fR.
.TP
\fBTK_CONFIG_CUSTOM\fR
+.
This option allows applications to define new option types.
The \fIcustomPtr\fR field of the entry points to a structure
defining the new option type.
See the section \fBCUSTOM OPTION TYPES\fR below for details.
.TP
\fBTK_CONFIG_DOUBLE\fR
+.
The value must be an ASCII floating-point number in
the format accepted by \fBstrtol\fR. The string is converted
to a \fBdouble\fR value, and the value is stored in the
target.
.TP
\fBTK_CONFIG_END\fR
+.
Marks the end of the table. The last entry in \fIspecs\fR
must have this type; all of its other fields are ignored and it
will never match any arguments.
.TP
\fBTK_CONFIG_FONT\fR
+.
The value must be an ASCII string identifying a font in a form
suitable for passing to \fBTk_GetFont\fR. The value is converted
to a \fBTk_Font\fR by calling \fBTk_GetFont\fR and the result
@@ -279,6 +292,7 @@ If the previous value of the target
was not NULL, then it is freed by passing it to \fBTk_FreeFont\fR.
.TP
\fBTK_CONFIG_INT\fR
+.
The value must be an ASCII integer string
in the format accepted by \fBstrtol\fR (e.g.
.QW 0
@@ -289,6 +303,7 @@ numbers, respectively). The string is converted to an integer
value and the integer is stored in the target.
.TP
\fBTK_CONFIG_JOIN_STYLE\fR
+.
The value must be
an ASCII string identifying a join style in one of the ways
accepted by \fBTk_GetJoinStyle\fR.
@@ -297,6 +312,7 @@ to the join style by calling
\fBTk_GetJoinStyle\fR and the result is stored in the target.
.TP
\fBTK_CONFIG_JUSTIFY\fR
+.
The value must be
an ASCII string identifying a justification method in one of the
ways accepted by \fBTk_GetJustify\fR.
@@ -304,26 +320,29 @@ The string is converted to a \fBTk_Justify\fR by calling
\fBTk_GetJustify\fR and the result is stored in the target.
.TP
\fBTK_CONFIG_MM\fR
+.
The value must specify a screen distance in one of the forms acceptable
to \fBTk_GetScreenMM\fR.
The string is converted to double-precision floating-point distance
in millimeters and the value is stored in the target.
.TP
\fBTK_CONFIG_PIXELS\fR
+.
The value must specify screen units in one of the forms acceptable
to \fBTk_GetPixels\fR.
The string is converted to an integer distance in pixels and the
value is stored in the target.
.TP
\fBTK_CONFIG_RELIEF\fR
+.
The value must be an ASCII string identifying a relief in a form
suitable for passing to \fBTk_GetRelief\fR. The value is converted
to an integer relief value by calling \fBTk_GetRelief\fR and the result
is stored in the target.
.TP
\fBTK_CONFIG_STRING\fR
-A copy
-of the value is made by allocating memory space with
+.
+A copy of the value is made by allocating memory space with
\fBTcl_Alloc\fR and copying the value into the dynamically-allocated
space. A pointer to the new string is stored in the target.
If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value
@@ -332,20 +351,22 @@ If the previous value of the target was not NULL, then it is
freed by passing it to \fBTcl_Free\fR.
.TP
\fBTK_CONFIG_SYNONYM\fR
+.
This \fItype\fR value identifies special entries in \fIspecs\fR that
-are synonyms for other entries. If an \fIargv\fR value matches the
+are synonyms for other entries. If an \fIobjv\fR value matches the
\fIargvName\fR of a \fBTK_CONFIG_SYNONYM\fR entry, the entry is not used
directly. Instead, \fBTk_ConfigureWidget\fR searches \fIspecs\fR
for another entry whose \fIargvName\fR is the same as the \fIdbName\fR
field in the \fBTK_CONFIG_SYNONYM\fR entry; this new entry is used just
-as if its \fIargvName\fR had matched the \fIargv\fR value. The
-synonym mechanism allows multiple \fIargv\fR values to be used for
+as if its \fIargvName\fR had matched the \fIobjv\fR value. The
+synonym mechanism allows multiple \fIobjv\fR values to be used for
a single configuration option, such as
.QW \-background
and
.QW \-bg .
.TP
\fBTK_CONFIG_UID\fR
+.
The value is translated to a \fBTk_Uid\fR
(by passing it to \fBTk_GetUid\fR). The resulting value
is stored in the target.
@@ -353,6 +374,7 @@ If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR and the value
is an empty string then the target will be set to NULL.
.TP
\fBTK_CONFIG_WINDOW\fR
+.
The value must be a window path name. It is translated to a
\fBTk_Window\fR token and the token is stored in the target.
.SH "GROUPED ENTRIES"
@@ -381,10 +403,11 @@ options. These values are used in three different ways as
described below.
.PP
First, if the \fIflags\fR argument to \fBTk_ConfigureWidget\fR has
-the \fBTK_CONFIG_ARGV_ONLY\fR bit set (i.e., \fIflags\fR | \fBTK_CONFIG_ARGV_ONLY\fR != 0),
+the \fBTK_CONFIG_ARGV_ONLY\fR bit set
+(i.e., \fIflags\fR | \fBTK_CONFIG_ARGV_ONLY\fR != 0),
then the option database and
\fIdefValue\fR fields are not used. In this case, if an entry in
-\fIspecs\fR does not match a field in \fIargv\fR then nothing happens:
+\fIspecs\fR does not match a field in \fIobjv\fR then nothing happens:
the corresponding target is not modified. This feature is useful
when the goal is to modify certain configuration options while
leaving others in their current state, such as when a \fBconfigure\fR
@@ -395,16 +418,19 @@ to control the processing of that entry. Each \fIspecFlags\fR
field may consists of an OR-ed combination of the following values:
.TP
\fBTK_CONFIG_COLOR_ONLY\fR
+.
If this bit is set then the entry will only be considered if the
display for \fItkwin\fR has more than one bit plane. If the display
is monochromatic then this \fIspecs\fR entry will be ignored.
.TP
\fBTK_CONFIG_MONO_ONLY\fR
+.
If this bit is set then the entry will only be considered if the
display for \fItkwin\fR has exactly one bit plane. If the display
is not monochromatic then this \fIspecs\fR entry will be ignored.
.TP
\fBTK_CONFIG_NULL_OK\fR
+.
This bit is only relevant for some types of entries (see the
descriptions of the various entry types above).
If this bit is set, it indicates that an empty string value
@@ -418,6 +444,7 @@ If this bit is not set then empty strings are processed as strings,
which generally results in an error.
.TP
\fBTK_CONFIG_DONT_SET_DEFAULT\fR
+.
If this bit is one, it means that the \fIdefValue\fR field of the
entry should only be used for returning the default value in
\fBTk_ConfigureInfo\fR.
@@ -428,14 +455,6 @@ This flag provides a performance optimization where it is expensive
to process the default string: the client can compute the default
once, save the value, and provide it before calling
\fBTk_ConfigureWidget\fR.
-.TP
-\fBTK_CONFIG_OPTION_SPECIFIED\fR
-This bit is
-deprecated. It used to be set and cleared by \fBTk_ConfigureWidget\fR
-so that callers could detect what entries were specified in
-\fIargv\fR, but it was removed because it was inherently
-thread-unsafe. Code that wishes to detect what options were specified
-should use \fBTk_SetOptions\fR instead.
.PP
The \fBTK_CONFIG_MONO_ONLY\fR and \fBTK_CONFIG_COLOR_ONLY\fR flags are typically
used to specify different default values for
@@ -533,7 +552,7 @@ Applications can extend the built-in configuration types with additional
configuration types by writing procedures to parse and print options
of the a type and creating a structure pointing to those procedures:
.CS
-typedef struct Tk_CustomOption {
+typedef struct {
Tk_OptionParseProc *\fIparseProc\fR;
Tk_OptionPrintProc *\fIprintProc\fR;
void *\fIclientData\fR;
@@ -545,13 +564,13 @@ typedef int \fBTk_OptionParseProc\fR(
Tk_Window \fItkwin\fR,
char *\fIvalue\fR,
char *\fIwidgRec\fR,
- int \fIoffset\fR);
+ Tcl_Size \fIoffset\fR);
typedef const char *\fBTk_OptionPrintProc\fR(
void *\fIclientData\fR,
Tk_Window \fItkwin\fR,
char *\fIwidgRec\fR,
- int \fIoffset\fR,
+ Tcl_Size \fIoffset\fR,
Tcl_FreeProc **\fIfreeProcPtr\fR);
.CE
The Tk_CustomOption structure contains three fields, which are pointers
diff --git a/doc/ConfigWind.3 b/doc/ConfigWind.3
index 3e83387..c5e035a 100644
--- a/doc/ConfigWind.3
+++ b/doc/ConfigWind.3
@@ -39,6 +39,7 @@ Tk_ConfigureWindow, Tk_MoveWindow, Tk_ResizeWindow, Tk_MoveResizeWindow, Tk_SetW
\fBTk_DefineCursor\fR(\fItkwin, cursor\fR)
.sp
\fBTk_UndefineCursor\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AS XSetWindowAttributes borderWidth
.AP Tk_Window tkwin in
diff --git a/doc/CoordToWin.3 b/doc/CoordToWin.3
index 1ebd681..be2663d 100644
--- a/doc/CoordToWin.3
+++ b/doc/CoordToWin.3
@@ -16,6 +16,7 @@ Tk_CoordsToWindow \- Find window containing a point
.sp
Tk_Window
\fBTk_CoordsToWindow\fR(\fIrootX, rootY, tkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window tkwin
.AP int rootX in
diff --git a/doc/CrtCmHdlr.3 b/doc/CrtCmHdlr.3
index 1ba6f63..a19206c 100644
--- a/doc/CrtCmHdlr.3
+++ b/doc/CrtCmHdlr.3
@@ -16,6 +16,7 @@ Tk_CreateClientMessageHandler, Tk_DeleteClientMessageHandler \- associate proced
\fBTk_CreateClientMessageHandler\fR(\fIproc\fR)
.sp
\fBTk_DeleteClientMessageHandler\fR(\fIproc\fR)
+.fi
.SH ARGUMENTS
.AP Tk_ClientMessageProc *proc in
Procedure to invoke whenever a ClientMessage X event occurs on any display.
diff --git a/doc/CrtConsoleChan.3 b/doc/CrtConsoleChan.3
index d8e0740..cae5242 100644
--- a/doc/CrtConsoleChan.3
+++ b/doc/CrtConsoleChan.3
@@ -14,6 +14,7 @@ Tk_InitConsoleChannels \- Install the console channels as standard channels
\fB#include <tk.h>\fR
.sp
\fBTk_InitConsoleChannels\fR(\fIinterp\fR)
+.fi
.SH ARGUMENTS
.AS Tcl_Interp *interp in
.AP Tcl_Interp *interp in
diff --git a/doc/CrtErrHdlr.3 b/doc/CrtErrHdlr.3
index 09dcf8b..6e874b7 100644
--- a/doc/CrtErrHdlr.3
+++ b/doc/CrtErrHdlr.3
@@ -18,6 +18,7 @@ Tk_ErrorHandler
\fBTk_CreateErrorHandler\fR(\fIdisplay, error, request, minor, proc, clientData\fR)
.sp
\fBTk_DeleteErrorHandler\fR(\fIhandler\fR)
+.fi
.SH ARGUMENTS
.AS "Tk_ErrorHandler" clientData
.AP Display *display in
diff --git a/doc/CrtGenHdlr.3 b/doc/CrtGenHdlr.3
index aaf3285..b203e19 100644
--- a/doc/CrtGenHdlr.3
+++ b/doc/CrtGenHdlr.3
@@ -17,6 +17,7 @@ Tk_CreateGenericHandler, Tk_DeleteGenericHandler \- associate procedure callback
\fBTk_CreateGenericHandler\fR(\fIproc, clientData\fR)
.sp
\fBTk_DeleteGenericHandler\fR(\fIproc, clientData\fR)
+.fi
.SH ARGUMENTS
.AS "Tk_GenericProc" clientData
.AP Tk_GenericProc *proc in
diff --git a/doc/CrtImgType.3 b/doc/CrtImgType.3
index b15a851..ddfbc54 100644
--- a/doc/CrtImgType.3
+++ b/doc/CrtImgType.3
@@ -9,7 +9,7 @@
.so man.macros
.BS
.SH NAME
-Tk_CreateImageType, Tk_GetImageModelData, Tk_InitImageArgs \- define new kind of image
+Tk_CreateImageType, Tk_GetImageModelData \- define new kind of image
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
@@ -18,8 +18,7 @@ Tk_CreateImageType, Tk_GetImageModelData, Tk_InitImageArgs \- define new kind of
.sp
void *
\fBTk_GetImageModelData\fR(\fIinterp, name, typePtrPtr\fR)
-.sp
-\fBTk_InitImageArgs\fR(\fIinterp, argc, argvPtr\fR)
+.fi
.SH ARGUMENTS
.AS "const Tk_ImageType" *typePtrPtr
.AP "const Tk_ImageType" *typePtr in
@@ -34,8 +33,6 @@ Name of existing image.
.AP Tk_ImageType **typePtrPtr out
Points to word in which to store a pointer to type information for
the given image, if it exists.
-.AP int argc in
-Number of arguments
.AP char ***argvPtr in/out
Pointer to argument list
.BE
@@ -58,7 +55,7 @@ The first data structure is a Tk_ImageType structure, which contains
the name of the image type and pointers to five procedures provided
by the image manager to deal with images of this type:
.CS
-typedef struct Tk_ImageType {
+typedef struct {
const char *\fIname\fR;
Tk_ImageCreateProc *\fIcreateProc\fR;
Tk_ImageGetProc *\fIgetProc\fR;
@@ -241,42 +238,6 @@ and the return value is the clientData value returned by the
\fIcreateProc\fR when the image was created (this is typically a
pointer to the image model data structure). If no such image exists
then NULL is returned and NULL is stored at \fI*typePtrPtr\fR.
-.SH "LEGACY INTERFACE SUPPORT"
-.PP
-In Tk 8.2 and earlier, the definition of \fBTk_ImageCreateProc\fR
-was incompatibly different, with the following prototype:
-.CS
-typedef int \fBTk_ImageCreateProc\fR(
- Tcl_Interp *\fIinterp\fR,
- char *\fIname\fR,
- int \fIargc\fR,
- char **\fIargv\fR,
- Tk_ImageType *\fItypePtr\fR,
- Tk_ImageModel \fImodel\fR,
- void **\fImodelDataPtr\fR);
-.CE
-Legacy programs and libraries dating from those days may still
-contain code that defines extended Tk image types using the old
-interface. The Tk header file will still support this legacy
-interface if the code is compiled with the macro \fBUSE_OLD_IMAGE\fR
-defined.
-.PP
-When the \fBUSE_OLD_IMAGE\fR legacy support is enabled, you may
-see the routine \fBTk_InitImageArgs\fR in use. This was a migration
-tool used to create stub-enabled extensions that could be loaded
-into interps containing all versions of Tk 8.1 and later. Tk 8.5 no longer
-provides this routine, but uses a macro to convert any attempted
-calls of this routine into an empty comment. Any stub-enabled
-extension providing an extended image type via the legacy interface
-that is compiled against Tk 8.5 headers and linked against the
-Tk 8.5 stub library will produce a file that can be loaded only
-into interps with Tk 8.5 or later; that is, the normal stub-compatibility
-rules. If a developer needs to generate from such code a file
-that is loadable into interps with Tk 8.4 or earlier, they must
-use Tk 8.4 headers and stub libraries to do so.
-.PP
-Any new code written today should not make use of the legacy
-interfaces. Expect their support to go away in Tk 9.
.SH "SEE ALSO"
Tk_ImageChanged, Tk_GetImage, Tk_FreeImage, Tk_RedrawImage, Tk_SizeOfImage
.SH KEYWORDS
diff --git a/doc/CrtItemType.3 b/doc/CrtItemType.3
index 82fc26e..3fb2d9f 100644
--- a/doc/CrtItemType.3
+++ b/doc/CrtItemType.3
@@ -17,10 +17,12 @@ Tk_CreateItemType, Tk_GetItemTypes \- define new kind of canvas item
.sp
Tk_ItemType *
\fBTk_GetItemTypes\fR()
+.fi
.SH ARGUMENTS
.AS Tk_ItemType *typePtr
.AP Tk_ItemType *typePtr in
Structure that defines the new type of canvas item.
+Note that this is not \fIconst\fR; Tk may write to these structures.
.BE
.SH INTRODUCTION
.PP
@@ -71,7 +73,7 @@ typedef struct Tk_ItemType {
Tk_ItemCoordProc *\fIcoordProc\fR;
Tk_ItemDeleteProc *\fIdeleteProc\fR;
Tk_ItemDisplayProc *\fIdisplayProc\fR;
- int \fIalwaysRedraw\fR;
+ int \fIflags\fR;
Tk_ItemPointProc *\fIpointProc\fR;
Tk_ItemAreaProc *\fIareaProc\fR;
Tk_ItemPostscriptProc *\fIpostscriptProc\fR;
@@ -82,7 +84,7 @@ typedef struct Tk_ItemType {
Tk_ItemSelectionProc *\fIselectionProc\fR;
Tk_ItemInsertProc *\fIinsertProc\fR;
Tk_ItemDCharsProc *\fIdCharsProc\fR;
- Tk_ItemType *\fInextPtr\fR;
+ struct Tk_ItemType *\fInextPtr\fR;
.VS "8.7, TIP164"
Tk_ItemRotateProc *\fIrotateProc\fR;
.VE "8.7, TIP164"
@@ -113,7 +115,7 @@ the first field.
For example, the item record for bitmap items is defined as follows:
.PP
.CS
-typedef struct BitmapItem {
+typedef struct {
Tk_Item \fIheader\fR;
double \fIx\fR, \fIy\fR;
Tk_Anchor \fIanchor\fR;
@@ -169,7 +171,7 @@ If there already existed an item type by this name then
the new item type replaces the old one.
.SS "FLAGS (IN ALWAYSREDRAW)"
.PP
-The \fItypePtr\->alwaysRedraw\fR field (so named for historic reasons)
+The \fItypePtr\->flags\fR field
contains a collection of flag bits that modify how the canvas core interacts
with the item. The following bits are defined:
.TP
@@ -180,14 +182,6 @@ is redrawn, rather than only when the bounding box of the item overlaps the
area being redrawn. This is used by window items, for example, which need to
unmap subwindows that are not on the screen.
.TP
-\fBTK_CONFIG_OBJS\fR
-.
-Indicates that operations which would otherwise take a string (or array of
-strings) actually take a Tcl_Obj reference (or an array of such references).
-The operations to which this applies are the \fIconfigProc\fR, the
-\fIcoordProc\fR, the \fIcreateProc\fR, the \fIindexProc\fR and the
-\fIinsertProc\fR.
-.TP
\fBTK_MOVABLE_POINTS\fR
.VS 8.6
Indicates that the item supports the \fIdCharsProc\fR, \fIindexProc\fR and
@@ -229,9 +223,6 @@ Tk has already initialized the item's header (the first
The \fIobjc\fR and \fIobjv\fR arguments describe all of the
arguments to the \fBcreate\fR command after the \fItype\fR
argument.
-Note that if \fBTK_CONFIG_OBJS\fR is not set in the
-\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually
-contain a pointer to an array of constant strings.
For example, in the widget command:
.PP
.CS
@@ -261,7 +252,8 @@ to retrieve option information in the \fBitemcget\fR and
\fBitemconfigure\fR widget commands.
\fItypePtr\->configSpecs\fR must point to the configuration table
for this type.
-Note: Tk provides a custom option type \fBtk_CanvasTagsOption\fR
+.PP
+Note that Tk provides a custom option type \fBtk_CanvasTagsOption\fR
for implementing the \fB\-tags\fR option; see an existing type
manager for an example of how to use it in \fIconfigSpecs\fR.
.SS CONFIGPROC
@@ -285,9 +277,6 @@ The \fIinterp\fR argument identifies the interpreter in which the
widget command was invoked, \fIcanvas\fR is a handle for the canvas
widget, and \fIitemPtr\fR is a pointer to the item being configured.
\fIobjc\fR and \fIobjv\fR contain the configuration options.
-Note that if \fBTK_CONFIG_OBJS\fR is not set in the
-\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually
-contain a pointer to an array of constant strings.
For example, if the following command is invoked:
.PP
.CS
@@ -324,9 +313,6 @@ typedef int \fBTk_ItemCoordProc\fR(
The arguments \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR
all have the standard meanings, and \fIobjc\fR and \fIobjv\fR
describe the coordinate arguments.
-Note that if \fBTK_CONFIG_OBJS\fR is not set in the
-\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually
-contain a pointer to an array of constant strings.
For example, if the following widget command is invoked:
.PP
.CS
@@ -401,9 +387,9 @@ of \fIdst\fR.
.PP
Normally an item's \fIdisplayProc\fR is only invoked if the item
overlaps the area being displayed.
-However, if bit zero of \fItypePtr\->alwaysRedraw\fR is 1,
+However, if bit zero of \fItypePtr\->flags\fR is 1,
(i.e.\|
-.QW "\fItypePtr\->alwaysRedraw & 1 == 1\fR" )
+.QW "\fItypePtr\->flags & 1 == 1\fR" )
then \fIdisplayProc\fR is invoked during every redisplay operation,
even if the item does not overlap the area of redisplay; this is useful for
cases such as window items, where the subwindow needs to be unmapped when it
@@ -577,8 +563,8 @@ they used to have coordinates \fIx\fR and \fIy\fR, they will have new
coordinates \fIx\(fm\fR and \fIy\(fm\fR, where
.PP
.CS
-\fIrelX\fR = \fIx\fR - \fIoriginX\fR
-\fIrelY\fR = \fIy\fR - \fIoriginY\fR
+\fIrelX\fR = \fIx\fR \(mi \fIoriginX\fR
+\fIrelY\fR = \fIy\fR \(mi \fIoriginY\fR
\fIx\(fm\fR = \fIoriginX\fR + \fIrelX\fR \(mu cos(\fIangleRad\fR) + \fIrelY\fR \(mu sin(\fIangleRad\fR)
\fIy\(fm\fR = \fIoriginY\fR \(mi \fIrelX\fR \(mu sin(\fIangleRad\fR) + \fIrelY\fR \(mu cos(\fIangleRad\fR)
.CE
@@ -616,9 +602,6 @@ have the usual meaning.
\fIindexObj\fR contains a textual description of an index,
and \fIindexPtr\fR points to an integer value that should be
filled in with a numerical index.
-Note that if \fBTK_CONFIG_OBJS\fR is not set in the
-\fItypePtr\->alwaysRedraw\fR field, the \fIindexObj\fR parameter will
-actually contain a pointer to a constant string.
It is up to the type manager to decide what forms of index
are supported (e.g., numbers, \fBinsert\fR, \fBsel.first\fR,
\fBend\fR, etc.).
@@ -702,9 +685,6 @@ typedef void \fBTk_ItemInsertProc\fR(
previous call to \fItypePtr\->insertProc\fR, and \fIobj\fR
contains new text to insert just before the character given
by \fIindex\fR.
-Note that if \fBTK_CONFIG_OBJS\fR is not set in the
-\fItypePtr\->alwaysRedraw\fR field, the \fIobj\fR parameter will
-actually contain a pointer to a constant string to be inserted.
If the item supports modification of the coordinates list by this
.PP
The type manager should insert the text and recompute the bounding
diff --git a/doc/CrtPhImgFmt.3 b/doc/CrtPhImgFmt.3
index c7accdb..0ba68fa 100644
--- a/doc/CrtPhImgFmt.3
+++ b/doc/CrtPhImgFmt.3
@@ -58,7 +58,7 @@ by the handler to deal with files and strings in this format. The
Tk_PhotoImageFormatVersion3 structure contains the following fields:
.VS 8.7
.CS
-typedef struct Tk_PhotoImageFormatVersion3 {
+typedef struct {
const char *\fIname\fR;
Tk_ImageFileMatchProcVersion3 *\fIfileMatchProc\fR;
Tk_ImageStringMatchProcVersion3 *\fIstringMatchProc\fR;
@@ -151,7 +151,7 @@ return 0.
Tk to call to read data from an image file into a photo image.
\fIformatPtr->fileReadProc\fR must match the following prototype:
.CS
-typedef int \fBTk_ImageFileReadProc\fR(
+typedef int \fBTk_ImageFileReadProcVersion3\fR(
Tcl_Interp *\fIinterp\fR,
Tcl_Channel \fIchan\fR,
const char *\fIfileName\fR,
@@ -184,7 +184,7 @@ The return value is a standard Tcl return value.
for Tk to call to read data from a string into a photo image.
\fIformatPtr->stringReadProc\fR must match the following prototype:
.CS
-typedef int \fBTk_ImageStringReadProc\fR(
+typedef int \fBTk_ImageStringReadProcVersion3\fR(
Tcl_Interp *\fIinterp\fR,
Tcl_Obj *\fIdata\fR,
Tcl_Obj *\fIformat\fR,
@@ -216,7 +216,7 @@ The return value is a standard Tcl return value.
Tk to call to write data from a photo image to a file.
\fIformatPtr->fileWriteProc\fR must match the following prototype:
.CS
-typedef int \fBTk_ImageFileWriteProc\fR(
+typedef int \fBTk_ImageFileWriteProcVersion3\fR(
Tcl_Interp *\fIinterp\fR,
const char *\fIfileName\fR,
Tcl_Obj *\fIformat\fR,
@@ -245,7 +245,7 @@ for Tk to call to translate image data from a photo image into a
string.
\fIformatPtr->stringWriteProc\fR must match the following prototype:
.CS
-typedef int \fBTk_ImageStringWriteProc\fR(
+typedef int \fBTk_ImageStringWriteProcVersion3\fR(
Tcl_Interp *\fIinterp\fR,
Tcl_Obj *\fIformat\fR,
Tcl_Obj *\fImetadataIn\fR,
@@ -276,7 +276,6 @@ level by including dictionary keys into the metadata property of the
image. Image metadata may be written to image data on file write or
image data output.
.PP
-.PP
.SS "METADATA KEYS"
.PP
The metadata may contain any key.
@@ -285,16 +284,13 @@ documentation. See the photo image manual page for currently defined
keys for the system drivers.
.PP
The following rules may give guidance to name metadata keys:
-.RS
-Abreviation are in upper case
-.RE
-.RS
+.IP \(bu
+Abbreviations are in upper case.
+.IP \(bu
Words are in US English in small case (except proper nouns)
-.RE
-.RS
+.IP \(bu
Vertical DPI is expressed as DPI/aspect. The reason is, that some
image formats may feature aspect and no resolution value.
-.RE
.SS "METADATA INPUT"
.PP
Each driver function gets a Tcl object pointer \fBmetadataIn\fR as
@@ -306,17 +302,20 @@ A typical driver code snipped to check for a metadata key is:
.CS
if (NULL != metadataIn) {
Tcl_Obj *itemData;
- Tcl_DictObjGet(interp, metadataIn, Tcl_NewStringObj("Comment",-1), &itemData));
+ Tcl_DictObjGet(interp, metadataIn, Tcl_NewStringObj("Comment",-1),
+ &itemData));
+ // use value reference in itemData
+}
.CE
.PP
-The \-metadata command option data of the following commands is passed
+The \fB\-metadata\fR command option data of the following commands is passed
to the driver: \fBimage create\fR, \fBconfigure\fR, \fBput\fR,
\fBread\fR, \fBdata\fR and \fBwrite\fR.
-If no \-metadata command option available or not given, the metadata
+If no \fB\-metadata\fR command option available or not given, the metadata
property of the image is passed to the driver using the following
commands: \fBcget\fR, \fBconfigure\fR, \fBdata\fR and \fBwrite\fR.
.PP
-Note that setting the \-metadata property of an image using
+Note that setting the \fB\-metadata\fR property of an image using
\fBconfigure\fR without any other option does not invoke any driver
function.
.PP
@@ -328,12 +327,12 @@ this purpose.
.SS "METADATA OUTPUT"
.PP
The image match and read driver functions may set keys in a prepared
-matadata dict to return them.
-Those functions get a Tcl object pointer \fBmetadataOut\fR as
+metadata dict to return them.
+Those functions get a Tcl object pointer \fImetadataOut\fR as
parameter.
-metadataOut may be NULL to indicate, that no metadata return is
-attended(\fBput\fR, \fBread\fR subcommands).
-\fBmetadataOut\fR is initialized to an empty unshared dict object if
+\fImetadataOut\fR may be NULL to indicate, that no metadata return is
+required (\fBput\fR, \fBread\fR subcommands). The variable pointed to
+by \fImetadataOut\fR is initialized to an empty unshared dict object if
metadata return is attended (\fBimage create\fR command, \fBconfigure\fR
subcommand). The driver may set dict keys in this object to return
metadata.
@@ -343,7 +342,9 @@ corresponding read function.
A sample driver code snippet is:
.CS
if (NULL != metadataOut) {
- Tcl_DictObjPut(NULL, metadataOut, Tcl_NewStringObj("XMP",-1), Tcl_NewStringObj(xmpMetadata);
+ Tcl_DictObjPut(NULL, metadataOut, Tcl_NewStringObj("XMP",-1),
+ Tcl_NewStringObj(xmpMetadata));
+}
.CE
.PP
The metadata keys returned by the driver are merged into the present
@@ -366,6 +367,7 @@ use the metadata dict for input or output.
\fB#include <tk.h>\fR
.sp
\fBTk_CreatePhotoImageFormat\fR(\fIformatPtr\fR)
+.fi
.SS ARGUMENTS
.AS "const Tk_PhotoImageFormat" *formatPtr
.AP "const Tk_PhotoImageFormat" *formatPtr in
@@ -376,7 +378,7 @@ A driver using the version 2 interface invokes \fBTk_CreatePhotoImageFormat\fR
for driver registration. The Tk_PhotoImageFormat structure
contains the following fields:
.CS
-typedef struct Tk_PhotoImageFormat {
+typedef struct {
const char *\fIname\fR;
Tk_ImageFileMatchProc *\fIfileMatchProc\fR;
Tk_ImageStringMatchProc *\fIstringMatchProc\fR;
@@ -457,45 +459,6 @@ typedef int \fBTk_ImageStringWriteProc\fR(
Tcl_Obj *\fIformat\fR,
Tk_PhotoImageBlock *\fIblockPtr\fR);
.CE
-.PP
-.SH "LEGACY INTERFACE SUPPORT"
-.PP
-In Tk 8.2 and earlier, the definition of all the function pointer
-types stored in fields of a \fBTk_PhotoImageFormat\fR struct were
-incompatibly different. Legacy programs and libraries dating from
-those days may still contain code that defines extended Tk photo image
-formats using the old interface. The Tk header file will still support
-this legacy interface if the code is compiled with the
-macro \fBUSE_OLD_IMAGE\fR defined. Alternatively, the legacy interfaces
-are used if the first character of \fIformatPtr->name\fR is an
-uppercase ASCII character (\fBA\fR-\fBZ\fR), and explicit casts
-are used to forgive the type mismatch. For example,
-.CS
-static Tk_PhotoImageFormat myFormat = {
- "MyFormat",
- (Tk_ImageFileMatchProc *) FileMatch,
- NULL,
- (Tk_ImageFileReadProc *) FileRead,
- NULL,
- NULL,
- NULL
-};
-.CE
-would define a minimal \fBTk_PhotoImageFormat\fR that operates provide
-only file reading capability, where \fBFileMatch\fR and \fBFileRead\fR
-are written according to the legacy interfaces of Tk 8.2 or earlier.
-.PP
-Any stub-enabled extension providing an extended photo image format
-via the legacy interface enabled by the \fBUSE_OLD_IMAGE\fR macro
-that is compiled against Tk 8.5 headers and linked against the
-Tk 8.5 stub library will produce a file that can be loaded only
-into interps with Tk 8.5 or later; that is, the normal stub-compatibility
-rules. If a developer needs to generate from such code a file
-that is loadable into interps with Tk 8.4 or earlier, they must
-use Tk 8.4 headers and stub libraries to do so.
-.PP
-Any new code written today should not make use of the legacy
-interfaces. Expect their support to go away in Tk 9.
.SH "SEE ALSO"
Tk_FindPhoto, Tk_PhotoPutBlock
.SH KEYWORDS
diff --git a/doc/CrtSelHdlr.3 b/doc/CrtSelHdlr.3
index b3c749c..1984c82 100644
--- a/doc/CrtSelHdlr.3
+++ b/doc/CrtSelHdlr.3
@@ -17,6 +17,7 @@ Tk_CreateSelHandler, Tk_DeleteSelHandler \- arrange to handle requests for a sel
\fBTk_CreateSelHandler\fR(\fItkwin, selection, target, proc, clientData, format\fR)
.sp
\fBTk_DeleteSelHandler\fR(\fItkwin, selection, target\fR)
+.fi
.SH ARGUMENTS
.AS Tk_SelectionProc clientData
.AP Tk_Window tkwin in
@@ -54,11 +55,11 @@ the selection. The most common form is STRING.
\fIProc\fR should have arguments and result that match the
type \fBTk_SelectionProc\fR:
.CS
-typedef int \fBTk_SelectionProc\fR(
+typedef Tcl_Size \fBTk_SelectionProc\fR(
void *\fIclientData\fR,
- int \fIoffset\fR,
+ Tcl_Size \fIoffset\fR,
char *\fIbuffer\fR,
- int \fImaxBytes\fR);
+ Tcl_Size \fImaxBytes\fR);
.CE
The \fIclientData\fR parameter to \fIproc\fR is a copy of the
\fIclientData\fR argument given to \fBTk_CreateSelHandler\fR.
diff --git a/doc/CrtWindow.3 b/doc/CrtWindow.3
index b254460..e6b4437 100644
--- a/doc/CrtWindow.3
+++ b/doc/CrtWindow.3
@@ -26,6 +26,7 @@ Tk_Window
\fBTk_DestroyWindow\fR(\fItkwin\fR)
.sp
\fBTk_MakeWindowExist\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tcl_Interp *topLevScreen
.AP Tcl_Interp *interp out
diff --git a/doc/DeleteImg.3 b/doc/DeleteImg.3
index eb6db1e..43944b7 100644
--- a/doc/DeleteImg.3
+++ b/doc/DeleteImg.3
@@ -14,6 +14,7 @@ Tk_DeleteImage \- Destroy an image.
\fB#include <tk.h>\fR
.sp
\fBTk_DeleteImage\fR(\fIinterp, name\fR)
+.fi
.SH ARGUMENTS
.AS Tcl_Interp *interp
.AP Tcl_Interp *interp in
diff --git a/doc/DrawFocHlt.3 b/doc/DrawFocHlt.3
index 59cd069..1e343e3 100644
--- a/doc/DrawFocHlt.3
+++ b/doc/DrawFocHlt.3
@@ -13,7 +13,8 @@ Tk_DrawFocusHighlight \- draw the traversal highlight ring for a widget
.nf
\fB#include <tk.h>\fR
.sp
-\fBTk_DrawFocusHighlight(\fItkwin, gc, width, drawable\fB)\fR
+\fBTk_DrawFocusHighlight\fR(\fItkwin, gc, width, drawable\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *joinPtr
.AP Tk_Window tkwin in
diff --git a/doc/EventHndlr.3 b/doc/EventHndlr.3
index 128f8ee..4e3c9d9 100644
--- a/doc/EventHndlr.3
+++ b/doc/EventHndlr.3
@@ -21,6 +21,7 @@ Tk_CreateEventHandler, Tk_DeleteEventHandler, Tk_GetButtonMask, Tk_SendVirtualEv
\fBTk_GetButtonMask\fR(\fIbutton\fR)
.sp
\fBTk_SendVirtualEvent\fR(\fItkwin, eventName, detail\fR)
+.fi
.SH ARGUMENTS
.AS "unsigned long" clientData
.AP unsigned button in
diff --git a/doc/FindPhoto.3 b/doc/FindPhoto.3
index dc218bf..57d0b77 100644
--- a/doc/FindPhoto.3
+++ b/doc/FindPhoto.3
@@ -32,17 +32,16 @@ zoomX, zoomY, subsampleX, subsampleY, compRule\fR)
int
\fBTk_PhotoGetImage\fR(\fIhandle, blockPtr\fR)
.sp
-void
\fBTk_PhotoBlank\fR(\fIhandle\fR)
.sp
int
\fBTk_PhotoExpand\fR(\fIinterp, handle, width, height\fR)
.sp
-void
\fBTk_PhotoGetSize\fR(\fIhandle, widthPtr, heightPtr\fR)
.sp
int
\fBTk_PhotoSetSize\fR(\fIinterp. handle, width, height\fR)
+.fi
.SH ARGUMENTS
.AS Tk_PhotoImageBlock window_path
.AP Tcl_Interp *interp in
diff --git a/doc/FontId.3 b/doc/FontId.3
index 9d35ae6..fa1427c 100644
--- a/doc/FontId.3
+++ b/doc/FontId.3
@@ -15,12 +15,13 @@ fonts
\fB#include <tk.h>\fR
.sp
Font
-\fBTk_FontId(\fItkfont\fB)\fR
+\fBTk_FontId\fR(\fItkfont\fR)
.sp
-\fBTk_GetFontMetrics(\fItkfont, fmPtr\fB)\fR
+\fBTk_GetFontMetrics\fR(\fItkfont, fmPtr\fR)
.sp
int
-\fBTk_PostscriptFontName(\fItkfont, dsPtr\fB)\fR
+\fBTk_PostscriptFontName\fR(\fItkfont, dsPtr\fR)
+.fi
.SH ARGUMENTS
.AS Tk_FontMetrics *dsPtr
.AP Tk_Font tkfont in
@@ -69,7 +70,7 @@ Postscript font name may be incorrect or not exist on the printer.
The \fBTk_FontMetrics\fR data structure is used by \fBTk_GetFontMetrics\fR to
return information about a font and is defined as follows:
.CS
-typedef struct Tk_FontMetrics {
+typedef struct {
int \fIascent\fR;
int \fIdescent\fR;
int \fIlinespace\fR;
diff --git a/doc/FreeXId.3 b/doc/FreeXId.3
deleted file mode 100644
index 84fef26..0000000
--- a/doc/FreeXId.3
+++ /dev/null
@@ -1,30 +0,0 @@
-'\"
-'\" Copyright (c) 1990 The Regents of the University of California.
-'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
-'\"
-'\" See the file "license.terms" for information on usage and redistribution
-'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
-.TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures"
-.so man.macros
-.BS
-.SH NAME
-Tk_FreeXId \- make X resource identifier available for reuse
-.SH SYNOPSIS
-.nf
-\fB#include <tk.h>\fR
-.sp
-\fBTk_FreeXId(\fIdisplay, id\fB)\fR
-.SH ARGUMENTS
-.AS Display *display out
-.AP Display *display in
-Display for which \fIid\fR was allocated.
-.AP XID id in
-Identifier of X resource (window, font, pixmap, cursor, graphics
-context, or colormap) that is no longer in use.
-.BE
-.SH DESCRIPTION
-.PP
-This function is deprecated, it doesn't do anything since 2008-08-19.
-.SH KEYWORDS
-resource identifier
diff --git a/doc/GeomReq.3 b/doc/GeomReq.3
index 7670521..e6f2eed 100644
--- a/doc/GeomReq.3
+++ b/doc/GeomReq.3
@@ -21,6 +21,7 @@ Tk_GeometryRequest, Tk_SetMinimumRequestSize, Tk_SetInternalBorder, Tk_SetIntern
\fBTk_SetInternalBorder\fR(\fItkwin, width\fR)
.sp
\fBTk_SetInternalBorderEx\fR(\fItkwin, left, right, top, bottom\fR)
+.fi
.SH ARGUMENTS
.AS baseHeight clientData
.AP Tk_Window tkwin in
@@ -36,13 +37,17 @@ Desired minimum requested height for \fItkwin\fR, in pixel units.
.AP int width in
Space to leave for internal border for \fItkwin\fR, in pixel units.
.AP int left in
-Space to leave for left side of internal border for \fItkwin\fR, in pixel units.
+Space to leave for left side of internal border for \fItkwin\fR,
+in pixel units.
.AP int right in
-Space to leave for right side of internal border for \fItkwin\fR, in pixel units.
+Space to leave for right side of internal border for \fItkwin\fR,
+in pixel units.
.AP int top in
-Space to leave for top side of internal border for \fItkwin\fR, in pixel units.
+Space to leave for top side of internal border for \fItkwin\fR,
+in pixel units.
.AP int bottom in
-Space to leave for bottom side of internal border for \fItkwin\fR, in pixel units.
+Space to leave for bottom side of internal border for \fItkwin\fR,
+in pixel units.
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/GetAnchor.3 b/doc/GetAnchor.3
index 5d41ad6..658911a 100644
--- a/doc/GetAnchor.3
+++ b/doc/GetAnchor.3
@@ -15,13 +15,14 @@ Tk_GetAnchorFromObj, Tk_GetAnchor, Tk_NameOfAnchor \- translate between strings
\fB#include <tk.h>\fR
.sp
int
-\fBTk_GetAnchorFromObj(\fIinterp, objPtr, anchorPtr\fB)\fR
+\fBTk_GetAnchorFromObj\fR(\fIinterp, objPtr, anchorPtr\fR)
.sp
int
-\fBTk_GetAnchor(\fIinterp, string, anchorPtr\fB)\fR
+\fBTk_GetAnchor\fR(\fIinterp, string, anchorPtr\fR)
.sp
const char *
-\fBTk_NameOfAnchor(\fIanchor\fB)\fR
+\fBTk_NameOfAnchor\fR(\fIanchor\fR)
+.fi
.SH ARGUMENTS
.AS "Tk_Anchor" *anchorPtr
.AP Tcl_Interp *interp in
diff --git a/doc/GetBitmap.3 b/doc/GetBitmap.3
index 88418c7..f470638 100644
--- a/doc/GetBitmap.3
+++ b/doc/GetBitmap.3
@@ -15,25 +15,26 @@ Tk_AllocBitmapFromObj, Tk_GetBitmap, Tk_GetBitmapFromObj, Tk_DefineBitmap, Tk_Na
\fB#include <tk.h>\fR
.sp
Pixmap
-\fBTk_AllocBitmapFromObj(\fIinterp, tkwin, objPtr\fB)\fR
+\fBTk_AllocBitmapFromObj\fR(\fIinterp, tkwin, objPtr\fR)
.sp
Pixmap
-\fBTk_GetBitmap(\fIinterp, tkwin, info\fB)\fR
+\fBTk_GetBitmap\fR(\fIinterp, tkwin, info\fR)
.sp
Pixmap
-\fBTk_GetBitmapFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_GetBitmapFromObj\fR(\fItkwin, objPtr\fR)
.sp
int
-\fBTk_DefineBitmap(\fIinterp, name, source, width, height\fB)\fR
+\fBTk_DefineBitmap\fR(\fIinterp, name, source, width, height\fR)
.sp
const char *
-\fBTk_NameOfBitmap(\fIdisplay, bitmap\fB)\fR
+\fBTk_NameOfBitmap\fR(\fIdisplay, bitmap\fR)
.sp
-\fBTk_SizeOfBitmap(\fIdisplay, bitmap, widthPtr, heightPtr\fB)\fR
+\fBTk_SizeOfBitmap\fR(\fIdisplay, bitmap, widthPtr, heightPtr\fR)
.sp
-\fBTk_FreeBitmapFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_FreeBitmapFromObj\fR(\fItkwin, objPtr\fR)
.sp
-\fBTk_FreeBitmap(\fIdisplay, bitmap\fB)\fR
+\fBTk_FreeBitmap\fR(\fIdisplay, bitmap\fR)
+.fi
.SH ARGUMENTS
.AS "unsigned long" *pixelPtr
.AP Tcl_Interp *interp in
@@ -80,98 +81,74 @@ creates a new one otherwise. \fIObjPtr\fR's value must have one
of the following forms:
.TP 20
\fB@\fIfileName\fR
+.
\fIFileName\fR must be the name of a file containing a bitmap
description in the standard X11 format.
.TP 20
\fIname\fR
+.
\fIName\fR must be the name of a bitmap defined previously with
a call to \fBTk_DefineBitmap\fR. The following names are pre-defined
by Tk:
.RS
-.TP 12
-\fBerror\fR
+.IP \fBerror\fR 12
The international
.QW don't
symbol: a circle with a diagonal line across it.
-.TP 12
-\fBgray75\fR
+.IP \fBgray75\fR 12
75% gray: a checkerboard pattern where three out of four bits are on.
-.TP 12
-\fBgray50\fR
+.IP \fBgray50\fR 12
50% gray: a checkerboard pattern where every other bit is on.
-.TP 12
-\fBgray25\fR
+.IP \fBgray25\fR 12
25% gray: a checkerboard pattern where one out of every four bits is on.
-.TP 12
-\fBgray12\fR
+.IP \fBgray12\fR 12
12.5% gray: a pattern where one-eighth of the bits are on, consisting of
every fourth pixel in every other row.
-.TP 12
-\fBhourglass\fR
+.IP \fBhourglass\fR 12
An hourglass symbol.
-.TP 12
-\fBinfo\fR
+.IP \fBinfo\fR 12
A large letter
.QW i .
-.TP 12
-\fBquesthead\fR
+.IP \fBquesthead\fR 12
The silhouette of a human head, with a question mark in it.
-.TP 12
-\fBquestion\fR
+.IP \fBquestion\fR 12
A large question-mark.
-.TP 12
-\fBwarning\fR
+.IP \fBwarning\fR 12
A large exclamation point.
.PP
In addition, the following pre-defined names are available only on the
\fBMacintosh\fR platform:
-.TP 12
-\fBdocument\fR
+.IP \fBdocument\fR 12
A generic document.
-.TP 12
-\fBstationery\fR
+.IP \fBstationery\fR 12
Document stationery.
-.TP 12
-\fBedition\fR
+.IP \fBedition\fR 12
The \fIedition\fR symbol.
-.TP 12
-\fBapplication\fR
+.IP \fBapplication\fR 12
Generic application icon.
-.TP 12
-\fBaccessory\fR
+.IP \fBaccessory\fR 12
A desk accessory.
-.TP 12
-\fBfolder\fR
+.IP \fBfolder\fR 12
Generic folder icon.
-.TP 12
-\fBpfolder\fR
+.IP \fBpfolder\fR 12
A locked folder.
-.TP 12
-\fBtrash\fR
+.IP \fBtrash\fR 12
A trash can.
-.TP 12
-\fBfloppy\fR
+.IP \fBfloppy\fR 12
A floppy disk.
-.TP 12
-\fBramdisk\fR
+.IP \fBramdisk\fR 12
A floppy disk with chip.
-.TP 12
-\fBcdrom\fR
+.IP \fBcdrom\fR 12
A cd disk icon.
-.TP 12
-\fBpreferences\fR
+.IP \fBpreferences\fR 12
A folder with prefs symbol.
-.TP 12
-\fBquerydoc\fR
+.IP \fBquerydoc\fR 12
A database document icon.
-.TP 12
-\fBstop\fR
+.IP \fBstop\fR 12
A stop sign.
-.TP 12
-\fBnote\fR
+.IP \fBnote\fR 12
A face with balloon words.
-.TP 12
-\fBcaution\fR
+.IP \fBcaution\fR 12
A triangle with an exclamation point.
.RE
.LP
@@ -210,7 +187,7 @@ describe the bitmap.
(e.g. a bitmap named \fInameId\fR has already been defined) then
\fBTCL_ERROR\fR is returned and an error message is left in
interpreter \fIinterp\fR's result.
-Note: \fBTk_DefineBitmap\fR expects the memory pointed to by
+Note that \fBTk_DefineBitmap\fR expects the memory pointed to by
\fIsource\fR to be static: \fBTk_DefineBitmap\fR does not make
a private copy of this memory, but uses the bytes pointed to
by \fIsource\fR later in calls to \fBTk_AllocBitmapFromObj\fR or
diff --git a/doc/GetCapStyl.3 b/doc/GetCapStyl.3
index 4e5d1d5..bb087a1 100644
--- a/doc/GetCapStyl.3
+++ b/doc/GetCapStyl.3
@@ -15,10 +15,11 @@ Tk_GetCapStyle, Tk_NameOfCapStyle \- translate between strings and cap styles
\fB#include <tk.h>\fR
.sp
int
-\fBTk_GetCapStyle(\fIinterp, string, capPtr\fB)\fR
+\fBTk_GetCapStyle\fR(\fIinterp, string, capPtr\fR)
.sp
const char *
-\fBTk_NameOfCapStyle(\fIcap\fB)\fR
+\fBTk_NameOfCapStyle\fR(\fIcap\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *capPtr
.AP Tcl_Interp *interp in
diff --git a/doc/GetClrmap.3 b/doc/GetClrmap.3
index 4b72b6c..2bfa4b9 100644
--- a/doc/GetClrmap.3
+++ b/doc/GetClrmap.3
@@ -15,11 +15,12 @@ Tk_GetColormap, Tk_PreserveColormap, Tk_FreeColormap \- allocate and free colorm
\fB#include <tk.h>\fR
.sp
Colormap
-\fBTk_GetColormap(\fIinterp, tkwin, string\fB)\fR
+\fBTk_GetColormap\fR(\fIinterp, tkwin, string\fR)
.sp
-\fBTk_PreserveColormap(\fIdisplay, colormap\fB)\fR
+\fBTk_PreserveColormap\fR(\fIdisplay, colormap\fR)
.sp
-\fBTk_FreeColormap(\fIdisplay, colormap\fB)\fR
+\fBTk_FreeColormap\fR(\fIdisplay, colormap\fR)
+.fi
.SH ARGUMENTS
.AS "Colormap" colormap
.AP Tcl_Interp *interp in
diff --git a/doc/GetColor.3 b/doc/GetColor.3
index 15254aa..bfb7ac0 100644
--- a/doc/GetColor.3
+++ b/doc/GetColor.3
@@ -15,26 +15,27 @@ Tk_AllocColorFromObj, Tk_GetColor, Tk_GetColorFromObj, Tk_GetColorByValue, Tk_Na
\fB#include <tk.h>\fR
.sp
XColor *
-\fBTk_AllocColorFromObj(\fIinterp, tkwin, objPtr\fB)\fR
+\fBTk_AllocColorFromObj\fR(\fIinterp, tkwin, objPtr\fR)
.sp
XColor *
-\fBTk_GetColor(\fIinterp, tkwin, name\fB)\fR
+\fBTk_GetColor\fR(\fIinterp, tkwin, name\fR)
.sp
XColor *
-\fBTk_GetColorFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_GetColorFromObj\fR(\fItkwin, objPtr\fR)
.sp
XColor *
-\fBTk_GetColorByValue(\fItkwin, prefPtr\fB)\fR
+\fBTk_GetColorByValue\fR(\fItkwin, prefPtr\fR)
.sp
const char *
-\fBTk_NameOfColor(\fIcolorPtr\fB)\fR
+\fBTk_NameOfColor\fR(\fIcolorPtr\fR)
.sp
GC
-\fBTk_GCForColor(\fIcolorPtr, drawable\fB)\fR
+\fBTk_GCForColor\fR(\fIcolorPtr, drawable\fR)
.sp
-\fBTk_FreeColorFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_FreeColorFromObj\fR(\fItkwin, objPtr\fR)
.sp
-\fBTk_FreeColor(\fIcolorPtr\fB)\fR
+\fBTk_FreeColor\fR(\fIcolorPtr\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *colorPtr
.AP Tcl_Interp *interp in
@@ -71,6 +72,7 @@ in a particular window. The desired color is specified with a
value whose string value must have one of the following forms:
.TP 20
\fIcolorname\fR
+.
Any of the valid textual names for a color defined in the
server's color database file, such as \fBred\fR or \fBPeachPuff\fR.
.TP 20
@@ -81,6 +83,7 @@ server's color database file, such as \fBred\fR or \fBPeachPuff\fR.
\fB#\fIRRRGGGBBB\fR
.TP 20
\fB#\fIRRRRGGGGBBBB\fR
+.
A numeric specification of the red, green, and blue intensities
to use to display the color. Each \fIR\fR, \fIG\fR, or \fIB\fR
represents a single hexadecimal digit. The four forms permit
diff --git a/doc/GetCursor.3 b/doc/GetCursor.3
index 403c05e..6f8e34f 100644
--- a/doc/GetCursor.3
+++ b/doc/GetCursor.3
@@ -15,23 +15,24 @@ Tk_AllocCursorFromObj, Tk_GetCursor, Tk_GetCursorFromObj, Tk_GetCursorFromData,
\fB#include <tk.h>\fR
.sp
Tk_Cursor
-\fBTk_AllocCursorFromObj(\fIinterp, tkwin, objPtr\fB)\fR
+\fBTk_AllocCursorFromObj\fR(\fIinterp, tkwin, objPtr\fR)
.sp
Tk_Cursor
-\fBTk_GetCursor(\fIinterp, tkwin, name\fB)\fR
+\fBTk_GetCursor\fR(\fIinterp, tkwin, name\fR)
.sp
Tk_Cursor
-\fBTk_GetCursorFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_GetCursorFromObj\fR(\fItkwin, objPtr\fR)
.sp
Tk_Cursor
-\fBTk_GetCursorFromData(\fIinterp, tkwin, source, mask, width, height, xHot, yHot, fg, bg\fB)\fR
+\fBTk_GetCursorFromData\fR(\fIinterp, tkwin, source, mask, width, height, xHot, yHot, fg, bg\fR)
.sp
const char *
-\fBTk_NameOfCursor(\fIdisplay, cursor\fB)\fR
+\fBTk_NameOfCursor\fR(\fIdisplay, cursor\fR)
.sp
-\fBTk_FreeCursorFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_FreeCursorFromObj\fR(\fItkwin, objPtr\fR)
.sp
-\fBTk_FreeCursor(\fIdisplay, cursor\fB)\fR
+\fBTk_FreeCursor\fR(\fIdisplay, cursor\fR)
+.fi
.SH ARGUMENTS
.AS "unsigned long" *pixelPtr
.AP Tcl_Interp *interp in
@@ -87,6 +88,7 @@ if \fIinterp\fR is not NULL. \fIObjPtr\fR must contain a standard Tcl
list with one of the following forms:
.TP
\fIname\fR\0[\fIfgColor\fR\0[\fIbgColor\fR]]
+.
\fIName\fR is the name of a cursor in the standard X cursor cursor,
i.e., any of the names defined in \fBcursorcursor.h\fR, without
the \fBXC_\fR. Some example values are \fBX_cursor\fR, \fBhand2\fR,
@@ -115,6 +117,7 @@ in preference to black and white cursors.
.RE
.TP
\fB@\fIsourceName\0maskName\0fgColor\0bgColor\fR
+.
In this form, \fIsourceName\fR and \fImaskName\fR are the names of
files describing cursors for the cursor's source bits and mask.
Each file must be in standard X11 cursor format.
@@ -124,12 +127,14 @@ cursor, in any of the forms acceptable to \fBTk_GetColor\fR. This
form of the command will not work on Macintosh or Windows computers.
.TP
\fB@\fIsourceName\0fgColor\fR
+.
This form is similar to the one above, except that the source is
used as mask also. This means that the cursor's background is
transparent. This form of the command will not work on Macintosh
or Windows computers.
.TP
\fB@\fIsourceName\fR
+.
This form only works on Windows, and will load a Windows system
cursor (\fB.ani\fR or \fB.cur\fR) from the file specified in
\fIsourceName\fR.
@@ -196,7 +201,7 @@ argument that was passed to \fBTk_GetCursor\fR to create the
cursor. If \fIcursor\fR was created by a call to \fBTk_GetCursorFromData\fR,
or by any other mechanism, then the return value is a hexadecimal string
giving the X identifier for the cursor.
-Note: the string returned by \fBTk_NameOfCursor\fR is
+Note that the string returned by \fBTk_NameOfCursor\fR is
only guaranteed to persist until the next call to
\fBTk_NameOfCursor\fR. Also, this call is not portable except for
cursors returned by \fBTk_GetCursor\fR.
diff --git a/doc/GetFont.3 b/doc/GetFont.3
index 9497556..60e8232 100644
--- a/doc/GetFont.3
+++ b/doc/GetFont.3
@@ -15,25 +15,25 @@ Tk_AllocFontFromObj, Tk_GetFont, Tk_GetFontFromObj, Tk_NameOfFont, Tk_FontGetDes
\fB#include <tk.h>\fR
.sp
Tk_Font
-\fBTk_AllocFontFromObj(\fIinterp, tkwin, objPtr\fB)\fR
+\fBTk_AllocFontFromObj\fR(\fIinterp, tkwin, objPtr\fR)
.sp
Tk_Font
-\fBTk_GetFont(\fIinterp, tkwin, string\fB)\fR
+\fBTk_GetFont\fR(\fIinterp, tkwin, string\fR)
.sp
Tk_Font
-\fBTk_GetFontFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_GetFontFromObj\fR(\fItkwin, objPtr\fR)
.sp
Tcl_Obj *
-\fBTk_FontGetDescription(\fItkfont\fB)\fR
+\fBTk_FontGetDescription\fR(\fItkfont\fR)
.sp
const char *
-\fBTk_NameOfFont(\fItkfont\fB)\fR
+\fBTk_NameOfFont\fR(\fItkfont\fR)
.sp
Tk_Font
-\fBTk_FreeFontFromObj(\fItkwin, objPtr\fB)\fR
+\fBTk_FreeFontFromObj\fR(\fItkwin, objPtr\fR)
.sp
-void
-\fBTk_FreeFont(\fItkfont\fB)\fR
+\fBTk_FreeFont\fR(\fItkfont\fR)
+.fi
.SH ARGUMENTS
.AS "const char" *tkfont
.AP "Tcl_Interp" *interp in
@@ -92,7 +92,8 @@ shared for all uses. The underlying resources will be freed automatically
when no-one is using the font anymore.
.PP
The procedure \fBTk_FontGetDescription\fR returns information about the font
-description as a Tcl list. One possible result is "{{DejaVu Sans} -16 bold underline}".
+description as a Tcl list. One possible result is
+.QW "{{DejaVu Sans} -16 bold underline}" .
.PP
The procedure \fBTk_NameOfFont\fR is roughly the inverse of
\fBTk_GetFont\fR. Given a \fItkfont\fR that was created by
diff --git a/doc/GetGC.3 b/doc/GetGC.3
index 6ee63a9..2b02c9d 100644
--- a/doc/GetGC.3
+++ b/doc/GetGC.3
@@ -17,7 +17,8 @@ Tk_GetGC, Tk_FreeGC \- maintain database of read-only graphics contexts
GC
\fBTk_GetGC\fR(\fItkwin, valueMask, valuePtr\fR)
.sp
-\fBTk_FreeGC(\fIdisplay, gc\fR)
+\fBTk_FreeGC\fR(\fIdisplay, gc\fR)
+.fi
.SH ARGUMENTS
.AS "unsigned long" valueMask
.AP Tk_Window tkwin in
diff --git a/doc/GetHINSTANCE.3 b/doc/GetHINSTANCE.3
index 8f82ee9..2069f3f 100644
--- a/doc/GetHINSTANCE.3
+++ b/doc/GetHINSTANCE.3
@@ -13,6 +13,7 @@ Tk_GetHINSTANCE \- retrieve the global application instance handle
.sp
HINSTANCE
\fBTk_GetHINSTANCE\fR()
+.fi
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/GetHWND.3 b/doc/GetHWND.3
index 1e8cdc9..bf780b4 100644
--- a/doc/GetHWND.3
+++ b/doc/GetHWND.3
@@ -16,6 +16,7 @@ HWND
.sp
Window
\fBTk_AttachHWND\fR(\fItkwin, hwnd\fR)
+.fi
.SH ARGUMENTS
.AP Window window in
X token for window.
diff --git a/doc/GetImage.3 b/doc/GetImage.3
index c437db7..7d899d8 100644
--- a/doc/GetImage.3
+++ b/doc/GetImage.3
@@ -22,6 +22,7 @@ Tk_Image
\fBTk_SizeOfImage\fR(\fIimage, widthPtr, heightPtr\fR)
.sp
\fBTk_FreeImage\fR(\fIimage\fR)
+.fi
.SH ARGUMENTS
.AS Tk_ImageChangedProc *changeProc
.AP Tcl_Interp *interp in
diff --git a/doc/GetJoinStl.3 b/doc/GetJoinStl.3
index 616719c..cef93c2 100644
--- a/doc/GetJoinStl.3
+++ b/doc/GetJoinStl.3
@@ -15,10 +15,11 @@ Tk_GetJoinStyle, Tk_NameOfJoinStyle \- translate between strings and join styles
\fB#include <tk.h>\fR
.sp
int
-\fBTk_GetJoinStyle(\fIinterp, string, joinPtr\fB)\fR
+\fBTk_GetJoinStyle\fR(\fIinterp, string, joinPtr\fR)
.sp
const char *
-\fBTk_NameOfJoinStyle(\fIjoin\fB)\fR
+\fBTk_NameOfJoinStyle\fR(\fIjoin\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *joinPtr
.AP Tcl_Interp *interp in
diff --git a/doc/GetJustify.3 b/doc/GetJustify.3
index 2e871cb..0d8d7ae 100644
--- a/doc/GetJustify.3
+++ b/doc/GetJustify.3
@@ -15,13 +15,14 @@ Tk_GetJustifyFromObj, Tk_GetJustify, Tk_NameOfJustify \- translate between strin
\fB#include <tk.h>\fR
.sp
int
-\fBTk_GetJustifyFromObj(\fIinterp, objPtr, justifyPtr\fB)\fR
+\fBTk_GetJustifyFromObj\fR(\fIinterp, objPtr, justifyPtr\fR)
.sp
int
-\fBTk_GetJustify(\fIinterp, string, justifyPtr\fB)\fR
+\fBTk_GetJustify\fR(\fIinterp, string, justifyPtr\fR)
.sp
const char *
-\fBTk_NameOfJustify(\fIjustify\fB)\fR
+\fBTk_NameOfJustify\fR(\fIjustify\fR)
+.fi
.SH ARGUMENTS
.AS "Tk_Justify" *justifyPtr
.AP Tcl_Interp *interp in
@@ -48,16 +49,13 @@ Justification style (one of the values listed below).
\fBTk_GetJustifyFromObj\fR places in \fI*justifyPtr\fR the justify value
corresponding to \fIobjPtr\fR's value.
This value will be one of the following:
-.TP
-\fBTK_JUSTIFY_LEFT\fR
+.IP \fBTK_JUSTIFY_LEFT\fR
Means that the text on each line should start at the left edge of
the line; as a result, the right edges of lines may be ragged.
-.TP
-\fBTK_JUSTIFY_RIGHT\fR
+.IP \fBTK_JUSTIFY_RIGHT\fR
Means that the text on each line should end at the right edge of
the line; as a result, the left edges of lines may be ragged.
-.TP
-\fBTK_JUSTIFY_CENTER\fR
+.IP \fBTK_JUSTIFY_CENTER\fR
Means that the text on each line should be centered; as a result,
both the left and right edges of lines may be ragged.
.PP
diff --git a/doc/GetOption.3 b/doc/GetOption.3
index 799786d..b727965 100644
--- a/doc/GetOption.3
+++ b/doc/GetOption.3
@@ -16,6 +16,7 @@ Tk_GetOption \- retrieve an option from the option database
.sp
Tk_Uid
\fBTk_GetOption\fR(\fItkwin, name, class\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window *class
.AP Tk_Window tkwin in
diff --git a/doc/GetPixels.3 b/doc/GetPixels.3
index 568c601..8a05a81 100644
--- a/doc/GetPixels.3
+++ b/doc/GetPixels.3
@@ -15,19 +15,20 @@ Tk_GetPixelsFromObj, Tk_GetPixels, Tk_GetMMFromObj, Tk_GetScreenMM, Tk_GetDouble
\fB#include <tk.h>\fR
.sp
int
-\fBTk_GetPixelsFromObj(\fIinterp, tkwin, objPtr, intPtr\fB)\fR
+\fBTk_GetPixelsFromObj\fR(\fIinterp, tkwin, objPtr, intPtr\fR)
.sp
int
-\fBTk_GetDoublePixelsFromObj(\fIinterp, tkwin, objPtr, doublePtr\fB)\fR
+\fBTk_GetDoublePixelsFromObj\fR(\fIinterp, tkwin, objPtr, doublePtr\fR)
.sp
int
-\fBTk_GetPixels(\fIinterp, tkwin, string, intPtr\fB)\fR
+\fBTk_GetPixels\fR(\fIinterp, tkwin, string, intPtr\fR)
.sp
int
-\fBTk_GetMMFromObj(\fIinterp, tkwin, objPtr, doublePtr\fB)\fR
+\fBTk_GetMMFromObj\fR(\fIinterp, tkwin, objPtr, doublePtr\fR)
.sp
int
-\fBTk_GetScreenMM(\fIinterp, tkwin, string, doublePtr\fB)\fR
+\fBTk_GetScreenMM\fR(\fIinterp, tkwin, string, doublePtr\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *joinPtr
.AP Tcl_Interp *interp in
@@ -56,20 +57,15 @@ In either case,
specifies a screen distance as a
floating-point number followed by one of the following characters
that indicates units:
-.TP
-<none>
+.IP <none>
The number specifies a distance in pixels.
-.TP
-\fBc\fR
+.IP \fBc\fR
The number specifies a distance in centimeters on the screen.
-.TP
-\fBi\fR
+.IP \fBi\fR
The number specifies a distance in inches on the screen.
-.TP
-\fBm\fR
+.IP \fBm\fR
The number specifies a distance in millimeters on the screen.
-.TP
-\fBp\fR
+.IP \fBp\fR
The number specifies a distance in printer's points (1/72 inch)
on the screen.
.PP
diff --git a/doc/GetPixmap.3 b/doc/GetPixmap.3
index 65fae2d..e9388df 100644
--- a/doc/GetPixmap.3
+++ b/doc/GetPixmap.3
@@ -15,9 +15,10 @@ Tk_GetPixmap, Tk_FreePixmap \- allocate and free pixmaps
\fB#include <tk.h>\fR
.sp
Pixmap
-\fBTk_GetPixmap(\fIdisplay, d, width, height, depth\fB)\fR
+\fBTk_GetPixmap\fR(\fIdisplay, d, width, height, depth\fR)
.sp
-\fBTk_FreePixmap(\fIdisplay, pixmap\fB)\fR
+\fBTk_FreePixmap\fR(\fIdisplay, pixmap\fR)
+.fi
.SH ARGUMENTS
.AS "Drawable" *pixelPtr
.AP Display *display in
diff --git a/doc/GetRelief.3 b/doc/GetRelief.3
index 5979662..528e1ba 100644
--- a/doc/GetRelief.3
+++ b/doc/GetRelief.3
@@ -15,13 +15,14 @@ Tk_GetReliefFromObj, Tk_GetRelief, Tk_NameOfRelief \- translate between strings
\fB#include <tk.h>\fR
.sp
int
-\fBTk_GetReliefFromObj(\fIinterp, objPtr, reliefPtr\fB)\fR
+\fBTk_GetReliefFromObj\fR(\fIinterp, objPtr, reliefPtr\fR)
.sp
int
-\fBTk_GetRelief(\fIinterp, name, reliefPtr\fB)\fR
+\fBTk_GetRelief\fR(\fIinterp, name, reliefPtr\fR)
.sp
const char *
-\fBTk_NameOfRelief(\fIrelief\fB)\fR
+\fBTk_NameOfRelief\fR(\fIrelief\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *reliefPtr
.AP Tcl_Interp *interp in
diff --git a/doc/GetRootCrd.3 b/doc/GetRootCrd.3
index 20520ea..46715c4 100644
--- a/doc/GetRootCrd.3
+++ b/doc/GetRootCrd.3
@@ -15,6 +15,7 @@ Tk_GetRootCoords \- Compute root-window coordinates of window
\fB#include <tk.h>\fR
.sp
\fBTk_GetRootCoords\fR(\fItkwin, xPtr, yPtr\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window tkwin
.AP Tk_Window tkwin in
diff --git a/doc/GetScroll.3 b/doc/GetScroll.3
index 91a2585..0322991 100644
--- a/doc/GetScroll.3
+++ b/doc/GetScroll.3
@@ -15,15 +15,16 @@ Tk_GetScrollInfoObj, Tk_GetScrollInfo \- parse arguments for scrolling commands
\fB#include <tk.h>\fR
.sp
int
-\fBTk_GetScrollInfoObj(\fIinterp, objc, objv, fractionPtr, stepsPtr\fB)\fR
+\fBTk_GetScrollInfoObj\fR(\fIinterp, objc, objv, fractionPtr, stepsPtr\fR)
.sp
int
-\fBTk_GetScrollInfo(\fIinterp, argc, argv, fractionPtr, stepsPtr\fB)\fR
+\fBTk_GetScrollInfo\fR(\fIinterp, argc, argv, fractionPtr, stepsPtr\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *fractionPtr
.AP Tcl_Interp *interp in
Interpreter to use for error reporting.
-.AP int objc in
+.AP Tcl_Size objc in
Number of Tcl_Obj's in \fIobjv\fR array.
.AP "Tcl_Obj *const *" objv in
Argument objects. These represent the entire widget command, of
diff --git a/doc/GetSelect.3 b/doc/GetSelect.3
index 455b142..89760cc 100644
--- a/doc/GetSelect.3
+++ b/doc/GetSelect.3
@@ -16,6 +16,7 @@ Tk_GetSelection \- retrieve the contents of a selection
.sp
int
\fBTk_GetSelection\fR(\fIinterp, tkwin, selection, target, proc, clientData\fR)
+.fi
.SH ARGUMENTS
.AS Tk_GetSelProc clientData
.AP Tcl_Interp *interp in
diff --git a/doc/GetUid.3 b/doc/GetUid.3
index 2cd95ad..407179e 100644
--- a/doc/GetUid.3
+++ b/doc/GetUid.3
@@ -16,6 +16,7 @@ Tk_GetUid, Tk_Uid \- convert from string to unique identifier
.sp
Tk_Uid
\fBTk_GetUid\fR(\fIstring\fR)
+.fi
.SH ARGUMENTS
.AP char *string in
String for which the corresponding unique identifier is
diff --git a/doc/GetVRoot.3 b/doc/GetVRoot.3
index 7e6003a..777d0a3 100644
--- a/doc/GetVRoot.3
+++ b/doc/GetVRoot.3
@@ -14,7 +14,8 @@ Tk_GetVRootGeometry \- Get location and size of virtual root for window
.nf
\fB#include <tk.h>\fR
.sp
-\fBTk_GetVRootGeometry(\fItkwin, xPtr, yPtr, widthPtr, heightPtr\fB)\fR
+\fBTk_GetVRootGeometry\fR(\fItkwin, xPtr, yPtr, widthPtr, heightPtr\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window heightPtr
.AP Tk_Window tkwin in
diff --git a/doc/GetVisual.3 b/doc/GetVisual.3
index fc6b6f8..e88f69b 100644
--- a/doc/GetVisual.3
+++ b/doc/GetVisual.3
@@ -15,7 +15,8 @@ Tk_GetVisual \- translate from string to visual
\fB#include <tk.h>\fR
.sp
Visual *
-\fBTk_GetVisual(\fIinterp, tkwin, string, depthPtr, colormapPtr\fB)\fR
+\fBTk_GetVisual\fR(\fIinterp, tkwin, string, depthPtr, colormapPtr\fR)
+.fi
.SH ARGUMENTS
.AS "Tcl_Interp" *colormapPtr
.AP Tcl_Interp *interp in
@@ -48,6 +49,7 @@ The \fIstring\fR argument specifies the desired visual in one
of the following ways:
.TP 15
\fIclass depth\fR
+.
The string consists of a class name followed by an integer depth,
with any amount of white space (including none) in between.
\fIclass\fR selects what sort of visual is desired and must be one of
@@ -62,17 +64,21 @@ looks first for a visual with greater depth, then one with less
depth.
.TP 15
\fBdefault\fR
+.
Use the default visual for \fItkwin\fR's screen.
.TP 15
\fIpathName\fR
+.
Use the visual for the window given by \fIpathName\fR.
\fIpathName\fR must be the name of a window on the same screen
as \fItkwin\fR.
.TP 15
\fInumber\fR
+.
Use the visual whose X identifier is \fInumber\fR.
.TP 15
\fBbest\fR ?\fIdepth\fR?
+.
Choose the
.QW "best possible"
visual, using the following rules, in decreasing order of priority:
diff --git a/doc/Grab.3 b/doc/Grab.3
index 4966edb..fc78dd2 100644
--- a/doc/Grab.3
+++ b/doc/Grab.3
@@ -14,8 +14,8 @@ Tk_Grab, Tk_Ungrab \- manipulate grab state in an application
int
\fBTk_Grab\fR(\fIinterp, tkwin, grabGlobal\fR)
.sp
-void
\fBTk_Ungrab\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AP Tcl_Interp *interp in
Interpreter to use for error reporting
diff --git a/doc/HWNDToWindow.3 b/doc/HWNDToWindow.3
index c5dafdd..64adebf 100644
--- a/doc/HWNDToWindow.3
+++ b/doc/HWNDToWindow.3
@@ -13,6 +13,7 @@ Tk_HWNDToWindow \- Find Tk's window information for a Windows window
.sp
Tk_Window
\fBTk_HWNDToWindow\fR(\fIhwnd\fR)
+.fi
.SH ARGUMENTS
.AP HWND hwnd in
Windows handle for the window.
diff --git a/doc/HandleEvent.3 b/doc/HandleEvent.3
index af3fde6..9b9ffc0 100644
--- a/doc/HandleEvent.3
+++ b/doc/HandleEvent.3
@@ -15,6 +15,7 @@ Tk_HandleEvent \- invoke event handlers for window system events
\fB#include <tk.h>\fR
.sp
\fBTk_HandleEvent\fR(\fIeventPtr\fR)
+.fi
.SH ARGUMENTS
.AS XEvent *eventPtr
.AP XEvent *eventPtr in
diff --git a/doc/IdToWindow.3 b/doc/IdToWindow.3
index f8ce1f9..5c7c896 100644
--- a/doc/IdToWindow.3
+++ b/doc/IdToWindow.3
@@ -15,6 +15,7 @@ Tk_IdToWindow \- Find Tk's window information for an X window
.sp
Tk_Window
\fBTk_IdToWindow\fR(\fIdisplay, window\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window display
.AP Display *display in
diff --git a/doc/ImgChanged.3 b/doc/ImgChanged.3
index ed47d26..9faa7aa 100644
--- a/doc/ImgChanged.3
+++ b/doc/ImgChanged.3
@@ -15,6 +15,7 @@ Tk_ImageChanged \- notify widgets that image needs to be redrawn
\fB#include <tk.h>\fR
.sp
\fBTk_ImageChanged\fR(\fImodel, x, y, width, height, imageWidth, imageHeight\fR)
+.fi
.SH ARGUMENTS
.AS Tk_ImageModel imageHeight
.AP Tk_ImageModel model in
diff --git a/doc/Inactive.3 b/doc/Inactive.3
index ea8d735..46327d2 100644
--- a/doc/Inactive.3
+++ b/doc/Inactive.3
@@ -12,9 +12,10 @@ Tk_GetUserInactiveTime, Tk_ResetUserInactiveTime \- discover user inactivity tim
\fB#include <tk.h>\fR
.sp
long
-\fBTk_GetUserInactiveTime(\fIdisplay\fB)\fR
+\fBTk_GetUserInactiveTime\fR(\fIdisplay\fR)
.sp
-\fBTk_ResetUserInactiveTime(\fIdisplay\fB)\fR
+\fBTk_ResetUserInactiveTime\fR(\fIdisplay\fR)
+.fi
.SH ARGUMENTS
.AS Display *display
.AP Display *display in
diff --git a/doc/InternAtom.3 b/doc/InternAtom.3
index e6756a5..7f1a68b 100644
--- a/doc/InternAtom.3
+++ b/doc/InternAtom.3
@@ -15,10 +15,11 @@ Tk_InternAtom, Tk_GetAtomName \- manage cache of X atoms
\fB#include <tk.h>\fR
.sp
Atom
-\fBTk_InternAtom(\fItkwin, name\fR)
+\fBTk_InternAtom\fR(\fItkwin, name\fR)
.sp
const char *
-\fBTk_GetAtomName(\fItkwin, atom\fR)
+\fBTk_GetAtomName\fR(\fItkwin, atom\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window parent
.AP Tk_Window tkwin in
diff --git a/doc/MainLoop.3 b/doc/MainLoop.3
index 770f254..7dbda0f 100644
--- a/doc/MainLoop.3
+++ b/doc/MainLoop.3
@@ -15,6 +15,7 @@ Tk_MainLoop \- loop for events until all windows are deleted
\fB#include <tk.h>\fR
.sp
\fBTk_MainLoop\fR()
+.fi
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/MainWin.3 b/doc/MainWin.3
index b11b6cd..d6da326 100644
--- a/doc/MainWin.3
+++ b/doc/MainWin.3
@@ -17,14 +17,13 @@ Tk_MainWindow, Tk_GetNumMainWindows \- functions for querying main window inform
Tk_Window
\fBTk_MainWindow\fR(\fIinterp\fR)
.sp
-void
\fBTk_SetMainMenubar\fR(\fIinterp, tkwin, menuName\fR)
.sp
-void
\fBTk_SetWindowMenubar\fR(\fIinterp, tkwin, oldMenuName, menuName\fR)
.sp
int
\fBTk_GetNumMainWindows\fR()
+.fi
.SH ARGUMENTS
.AS Tcl_Interp *pathName
.AP Tcl_Interp *interp in/out
@@ -52,7 +51,7 @@ leaves an error message in interpreter \fIinterp\fR's result.
windows currently open in the current thread.
\fBTk_SetMainMenubar\fR
Called when a toplevel widget is brought to front. On the Macintosh,
-sets up the menubar that goes accross the top of the main monitor. On
+sets up the menubar that goes across the top of the main monitor. On
other platforms, nothing is necessary.
\fBTk_SetWindowMenubar\fR associates a menu with a window.
The old menu clones for the menubar are thrown away, and a handler is
diff --git a/doc/MaintGeom.3 b/doc/MaintGeom.3
index d6418b5..0196a0d 100644
--- a/doc/MaintGeom.3
+++ b/doc/MaintGeom.3
@@ -17,6 +17,7 @@ Tk_MaintainGeometry, Tk_UnmaintainGeometry \- maintain geometry of one window re
\fBTk_MaintainGeometry\fR(\fIwindow, container, x, y, width, height\fR)
.sp
\fBTk_UnmaintainGeometry\fR(\fIwindow, container\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window container
.AP Tk_Window window in
diff --git a/doc/ManageGeom.3 b/doc/ManageGeom.3
index dd69273..dd2703c 100644
--- a/doc/ManageGeom.3
+++ b/doc/ManageGeom.3
@@ -15,6 +15,7 @@ Tk_ManageGeometry \- arrange to handle geometry requests for a window
\fB#include <tk.h>\fR
.sp
\fBTk_ManageGeometry\fR(\fItkwin, mgrPtr, clientData\fR)
+.fi
.SH ARGUMENTS
.AS Tk_GeometryProc clientData
.AP Tk_Window tkwin in
diff --git a/doc/MapWindow.3 b/doc/MapWindow.3
index a3c6296..7de87df 100644
--- a/doc/MapWindow.3
+++ b/doc/MapWindow.3
@@ -18,6 +18,7 @@ Tk_Window
\fBTk_MapWindow\fR(\fItkwin\fR)
.sp
\fBTk_UnmapWindow\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window parent
.AP Tk_Window tkwin in
diff --git a/doc/MeasureChar.3 b/doc/MeasureChar.3
index 3959978..1f62a55 100644
--- a/doc/MeasureChar.3
+++ b/doc/MeasureChar.3
@@ -14,15 +14,15 @@ Tk_MeasureChars, Tk_TextWidth, Tk_DrawChars, Tk_UnderlineChars \- routines to me
\fB#include <tk.h>\fR
.sp
int
-\fBTk_MeasureChars(\fItkfont, string, numBytes, maxPixels, flags, lengthPtr\fB)\fR
+\fBTk_MeasureChars\fR(\fItkfont, string, numBytes, maxPixels, flags, lengthPtr\fR)
.sp
int
-\fBTk_TextWidth(\fItkfont, string, numBytes\fB)\fR
+\fBTk_TextWidth\fR(\fItkfont, string, numBytes\fR)
.sp
-\fBTk_DrawChars(\fIdisplay, drawable, gc, tkfont, string, numBytes, x, y\fB)\fR
-.sp
-\fBTk_UnderlineChars(\fIdisplay, drawable, gc, tkfont, string, x, y, firstByte, lastByte\fB)\fR
+\fBTk_DrawChars\fR(\fIdisplay, drawable, gc, tkfont, string, numBytes, x, y\fR)
.sp
+\fBTk_UnderlineChars\fR(\fIdisplay, drawable, gc, tkfont, string, x, y, firstByte, lastByte\fR)
+.fi
.SH ARGUMENTS
.AS "const char" firstChar
.AP Tk_Font tkfont in
@@ -33,7 +33,7 @@ Text to be measured or displayed. Need not be null terminated. Any
non-printing meta-characters in the string (such as tabs, newlines, and
other control characters) will be measured or displayed in a
platform-dependent manner.
-.AP int numBytes in
+.AP Tcl_Size numBytes in
The maximum number of bytes to consider when measuring or drawing
\fIstring\fR. Must be greater than or equal to 0.
.AP int maxPixels in
@@ -48,8 +48,8 @@ otherwise, a character must fit completely to be considered.
\fBTK_WHOLE_WORDS\fR means stop on a word boundary, if possible. If
\fBTK_AT_LEAST_ONE\fR is set, it means return at least one character even if no
characters could fit in the length given by \fImaxPixels\fR. If
-\fBTK_AT_LEAST_ONE\fR is set and \fBTK_WHOLE_WORDS\fR is also set, it means that if
-not even one word fits on the line, return the first few letters of the
+\fBTK_AT_LEAST_ONE\fR is set and \fBTK_WHOLE_WORDS\fR is also set, it means
+that if not even one word fits on the line, return the first few letters of the
word that did fit; if not even one letter of the word fit, then the first
letter will still be returned.
.AP int *lengthPtr out
diff --git a/doc/MoveToplev.3 b/doc/MoveToplev.3
index f67627f..a8646f3 100644
--- a/doc/MoveToplev.3
+++ b/doc/MoveToplev.3
@@ -14,7 +14,8 @@ Tk_MoveToplevelWindow \- Adjust the position of a top-level window
.nf
\fB#include <tk.h>\fR
.sp
-\fBTk_MoveToplevelWindow(\fItkwin, x, y\fB)\fR
+\fBTk_MoveToplevelWindow\fR(\fItkwin, x, y\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window tkwin
.AP Tk_Window tkwin in
diff --git a/doc/Name.3 b/doc/Name.3
index 1653cf5..538c57c 100644
--- a/doc/Name.3
+++ b/doc/Name.3
@@ -22,6 +22,7 @@ char *
.sp
Tk_Window
\fBTk_NameToWindow\fR(\fIinterp, pathName, tkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tcl_Interp *pathName
.AP Tk_Window tkwin in
diff --git a/doc/NameOfImg.3 b/doc/NameOfImg.3
index 781650f..afca117 100644
--- a/doc/NameOfImg.3
+++ b/doc/NameOfImg.3
@@ -15,6 +15,7 @@ Tk_NameOfImage \- Return name of image.
.sp
const char *
\fBTk_NameOfImage\fR(\fIimageModel\fR)
+.fi
.SH ARGUMENTS
.AS Tk_ImageModel imageModel
.AP Tk_ImageModel imageModel in
diff --git a/doc/OwnSelect.3 b/doc/OwnSelect.3
index 67bac55..eb8eabe 100644
--- a/doc/OwnSelect.3
+++ b/doc/OwnSelect.3
@@ -15,6 +15,7 @@ Tk_OwnSelection \- make a window the owner of the primary selection
\fB#include <tk.h>\fR
.sp
\fBTk_OwnSelection\fR(\fItkwin, selection, proc, clientData\fR)
+.fi
.SH ARGUMENTS
.AS Tk_LostSelProc clientData
.AP Tk_Window tkwin in
diff --git a/doc/ParseArgv.3 b/doc/ParseArgv.3
index 727dcfa..08ad292 100644
--- a/doc/ParseArgv.3
+++ b/doc/ParseArgv.3
@@ -16,6 +16,7 @@ Tk_ParseArgv \- process command-line options
.sp
int
\fBTk_ParseArgv\fR(\fIinterp, tkwin, argcPtr, argv, argTable, flags\fR)
+.fi
.SH ARGUMENTS
.AS Tk_ArgvInfo *argTable
.AP Tcl_Interp *interp in
@@ -113,18 +114,15 @@ after the matching argument, which is called
.QW "the following argument" .
The legal values for \fItype\fR, and the processing
that they cause, are as follows:
-.TP
-\fBTK_ARGV_END\fR
+.IP \fBTK_ARGV_END\fR
Marks the end of the table. The last entry in \fIargTable\fR
must have this type; all of its other fields are ignored and it
will never match any arguments.
-.TP
-\fBTK_ARGV_CONSTANT\fR
+.IP \fBTK_ARGV_CONSTANT\fR
\fISrc\fR is treated as an integer and \fIdst\fR is treated
as a pointer to an integer. \fISrc\fR is stored at \fI*dst\fR.
The matching argument is discarded.
-.TP
-\fBTK_ARGV_INT\fR
+.IP \fBTK_ARGV_INT\fR
The following argument must contain an
integer string in the format accepted by \fBstrtol\fR (e.g.
.QW 0
@@ -135,22 +133,19 @@ numbers, respectively). \fIDst\fR is treated as a pointer to an
integer; the following argument is converted to an integer value
and stored at \fI*dst\fR. \fISrc\fR is ignored. The matching
and following arguments are discarded from \fIargv\fR.
-.TP
-\fBTK_ARGV_FLOAT\fR
+.IP \fBTK_ARGV_FLOAT\fR
The following argument must contain a floating-point number in
the format accepted by \fBstrtol\fR.
\fIDst\fR is treated as the address of a double-precision
floating point value; the following argument is converted to a
double-precision value and stored at \fI*dst\fR. The matching
and following arguments are discarded from \fIargv\fR.
-.TP
-\fBTK_ARGV_STRING\fR
+.IP \fBTK_ARGV_STRING\fR
In this form, \fIdst\fR is treated as a pointer to a (char *);
\fBTk_ParseArgv\fR stores at \fI*dst\fR a pointer to the following
argument, and discards the matching and following arguments from
\fIargv\fR. \fISrc\fR is ignored.
-.TP
-\fBTK_ARGV_UID\fR
+.IP \fBTK_ARGV_UID\fR
This form is similar to \fBTK_ARGV_STRING\fR, except that the argument
is turned into a Tk_Uid by calling \fBTk_GetUid\fR.
\fIDst\fR is treated as a pointer to a
@@ -158,32 +153,28 @@ Tk_Uid; \fBTk_ParseArgv\fR stores at \fI*dst\fR the Tk_Uid
corresponding to the following
argument, and discards the matching and following arguments from
\fIargv\fR. \fISrc\fR is ignored.
-.TP
-\fBTK_ARGV_CONST_OPTION\fR
+.IP \fBTK_ARGV_CONST_OPTION\fR
This form causes a Tk option to be set (as if the \fBoption\fR
command had been invoked). The \fIsrc\fR field is treated as a
pointer to a string giving the value of an option, and \fIdst\fR
is treated as a pointer to the name of the option. The matching
argument is discarded. If \fItkwin\fR is NULL, then argument
specifiers of this type are ignored (as if they did not exist).
-.TP
-\fBTK_ARGV_OPTION_VALUE\fR
+.IP \fBTK_ARGV_OPTION_VALUE\fR
This form is similar to \fBTK_ARGV_CONST_OPTION\fR, except that the
value of the option is taken from the following argument instead
of from \fIsrc\fR. \fIDst\fR is used as the name of the option.
\fISrc\fR is ignored. The matching and following arguments
are discarded. If \fItkwin\fR is NULL, then argument
specifiers of this type are ignored (as if they did not exist).
-.TP
-\fBTK_ARGV_OPTION_NAME_VALUE\fR
+.IP \fBTK_ARGV_OPTION_NAME_VALUE\fR
In this case the following argument is taken as the name of a Tk
option and the argument after that is taken as the value for that
option. Both \fIsrc\fR and \fIdst\fR are ignored. All three
arguments are discarded from \fIargv\fR. If \fItkwin\fR is NULL,
then argument
specifiers of this type are ignored (as if they did not exist).
-.TP
-\fBTK_ARGV_HELP\fR
+.IP \fBTK_ARGV_HELP\fR
When this kind of option is encountered, \fBTk_ParseArgv\fR uses the
\fIhelp\fR fields of \fIargTable\fR to format a message describing
all the valid arguments. The message is placed in interpreter
@@ -194,8 +185,7 @@ field of a \fBTK_ARGV_HELP\fR specifier is NULL, then the specifier will
never match any arguments; in this case the specifier simply provides
extra documentation, which will be included when some other
\fBTK_ARGV_HELP\fR entry causes help information to be returned.
-.TP
-\fBTK_ARGV_REST\fR
+.IP \fBTK_ARGV_REST\fR
This option is used by programs or commands that allow the last
several of their options to be the name and/or options for some
other program. If a \fBTK_ARGV_REST\fR argument is found, then
@@ -207,8 +197,7 @@ integer value, and stores at \fI*dst\fR the index of the first of the
\fBTK_ARGV_REST\fR options in the returned \fIargv\fR. This allows the
program to distinguish the \fBTK_ARGV_REST\fR options from other
unprocessed options that preceded the \fBTK_ARGV_REST\fR.
-.TP
-\fBTK_ARGV_FUNC\fR
+.IP \fBTK_ARGV_FUNC\fR
For this kind of argument, \fIsrc\fR is treated as the address of
a procedure, which is invoked to process the following argument.
The procedure should have the following structure:
@@ -232,8 +221,7 @@ should return 0 and \fBTkParseArgv\fR will process the following
argument in the normal fashion. In either event the matching argument
is discarded.
.RE
-.TP
-\fBTK_ARGV_GENFUNC\fR
+.IP \fBTK_ARGV_GENFUNC\fR
This form provides a more general procedural escape. It treats
\fIsrc\fR as the address of a procedure, and passes that procedure
all of the remaining arguments. The procedure should have the following
@@ -266,27 +254,23 @@ in the usual Tcl fashion, and return \-1; when this happens
\fBTk_ParseArgv\fR will abort its processing and return \fBTCL_ERROR\fR.
.RE
.SS "FLAGS"
-.TP
-\fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR
+.IP \fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR
\fBTk_ParseArgv\fR normally treats \fIargv[0]\fR as a program
or command name, and returns it to the caller just as if it
had not matched \fIargTable\fR. If this flag is given, then
\fIargv[0]\fR is not given special treatment.
-.TP
-\fBTK_ARGV_NO_ABBREV\fR
+.IP \fBTK_ARGV_NO_ABBREV\fR
Normally, \fBTk_ParseArgv\fR accepts unique abbreviations for
\fIkey\fR values in \fIargTable\fR. If this flag is given then
only exact matches will be acceptable.
-.TP
-\fBTK_ARGV_NO_LEFTOVERS\fR
+.IP \fBTK_ARGV_NO_LEFTOVERS\fR
Normally, \fBTk_ParseArgv\fR returns unrecognized arguments to the
caller. If this bit is set in \fIflags\fR then \fBTk_ParseArgv\fR
will return an error if it encounters any argument that does not
match \fIargTable\fR. The only exception to this rule is \fIargv[0]\fR,
which will be returned to the caller with no errors as
long as \fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR is not specified.
-.TP
-\fBTK_ARGV_NO_DEFAULTS\fR
+.IP \fBTK_ARGV_NO_DEFAULTS\fR
Normally, \fBTk_ParseArgv\fR searches an internal table of
standard argument specifiers in addition to \fIargTable\fR. If
this bit is set in \fIflags\fR, then \fBTk_ParseArgv\fR will
@@ -312,11 +296,11 @@ Boolean exec = FALSE;
* Define option descriptions.
*/
Tk_ArgvInfo argTable[] = {
- {"\-X", TK_ARGV_CONSTANT, (char *) 1, &debugFlag,
+ {"-X", TK_ARGV_CONSTANT, (char *) 1, &debugFlag,
"Turn on debugging printfs"},
- {"\-N", TK_ARGV_INT, NULL, &numReps,
+ {"-N", TK_ARGV_INT, NULL, &numReps,
"Number of repetitions"},
- {"\-of", TK_ARGV_STRING, NULL, &fileName,
+ {"-of", TK_ARGV_STRING, NULL, &fileName,
"Name of file for output"},
{"x", TK_ARGV_REST, NULL, &exec,
"File to exec, followed by any arguments (must be last argument)."},
@@ -324,9 +308,7 @@ Tk_ArgvInfo argTable[] = {
NULL}
};
-main(argc, argv)
- int argc;
- char *argv[];
+int main(int argc, char *argv[])
{
\&...
@@ -346,9 +328,9 @@ Note that default values can be assigned to variables named in
particular arguments are present in \fIargv\fR.
Here are some example command lines and their effects.
.CS
-prog \-N 200 infile # just sets the numReps variable to 200
-prog \-of out200 infile # sets fileName to reference "out200"
-prog \-XN 10 infile # sets the debug flag, also sets numReps
+prog -N 200 infile # just sets the numReps variable to 200
+prog -of out200 infile # sets fileName to reference "out200"
+prog -XN 10 infile # sets the debug flag, also sets numReps
.CE
In all of the above examples, \fIargc\fR will be set by \fBTk_ParseArgv\fR to 2,
\fIargv\fR[0] will be
diff --git a/doc/QWinEvent.3 b/doc/QWinEvent.3
index 9c43ce5..28db0c9 100644
--- a/doc/QWinEvent.3
+++ b/doc/QWinEvent.3
@@ -17,6 +17,7 @@ int
\fBTk_CollapseMotionEvents\fR(\fIdisplay, collapse\fR)
.sp
\fBTk_QueueWindowEvent\fR(\fIeventPtr, position\fR)
+.fi
.SH ARGUMENTS
.AS Tcl_QueuePosition position
.AP Display *display in
diff --git a/doc/Restack.3 b/doc/Restack.3
index 5cd02eb..59ab9ec 100644
--- a/doc/Restack.3
+++ b/doc/Restack.3
@@ -16,6 +16,7 @@ Tk_RestackWindow \- Change a window's position in the stacking order
.sp
int
\fBTk_RestackWindow\fR(\fItkwin, aboveBelow, other\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window aboveBelow
.AP Tk_Window tkwin in
diff --git a/doc/RestrictEv.3 b/doc/RestrictEv.3
index f61e764..fdf2250 100644
--- a/doc/RestrictEv.3
+++ b/doc/RestrictEv.3
@@ -16,6 +16,7 @@ Tk_RestrictEvents \- filter and selectively delay X events
.sp
Tk_RestrictProc *
\fBTk_RestrictEvents\fR(\fIproc, arg, prevArgPtr\fR)
+.fi
.SH ARGUMENTS
.AS Tk_RestrictProc **prevArgPtr
.AP Tk_RestrictProc *proc in
diff --git a/doc/SetAppName.3 b/doc/SetAppName.3
index 91516a0..84984a7 100644
--- a/doc/SetAppName.3
+++ b/doc/SetAppName.3
@@ -16,6 +16,7 @@ Tk_SetAppName \- Set the name of an application for 'send' commands
.sp
const char *
\fBTk_SetAppName\fR(\fItkwin, name\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window parent
.AP Tk_Window tkwin in
diff --git a/doc/SetCaret.3 b/doc/SetCaret.3
index 24cc18c..401b57f 100644
--- a/doc/SetCaret.3
+++ b/doc/SetCaret.3
@@ -15,6 +15,7 @@ Tk_SetCaretPos \- set the display caret location
.sp
int
\fBTk_SetCaretPos\fR(\fItkwin, x, y, height\fR)
+.fi
.SH ARGUMENTS
.AP Tk_Window tkwin in
Token for window.
diff --git a/doc/SetClass.3 b/doc/SetClass.3
index 0ea81bb..c5a02c8 100644
--- a/doc/SetClass.3
+++ b/doc/SetClass.3
@@ -18,6 +18,7 @@ Tk_SetClass, Tk_Class \- set or retrieve a window's class
.sp
Tk_Uid
\fBTk_Class\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window parent
.AP Tk_Window tkwin in
diff --git a/doc/SetClassProcs.3 b/doc/SetClassProcs.3
index d8f89a4..c0a702f 100644
--- a/doc/SetClassProcs.3
+++ b/doc/SetClassProcs.3
@@ -14,6 +14,7 @@ Tk_SetClassProcs \- register widget specific procedures
\fB#include <tk.h>\fR
.sp
\fBTk_SetClassProcs\fR(\fItkwin, procs, instanceData\fR)
+.fi
.SH ARGUMENTS
.AS Tk_ClassProc instanceData
.AP Tk_Window tkwin in
@@ -32,7 +33,7 @@ are used as callbacks in different places.
.PP
The structure pointed to by \fIprocs\fR contains the following:
.CS
-typedef struct Tk_ClassProcs {
+typedef struct {
size_t \fIsize\fR;
Tk_ClassWorldChangedProc *\fIworldChangedProc\fR;
Tk_ClassCreateProc *\fIcreateProc\fR;
diff --git a/doc/SetGrid.3 b/doc/SetGrid.3
index ea32afb..5440ebf 100644
--- a/doc/SetGrid.3
+++ b/doc/SetGrid.3
@@ -17,6 +17,7 @@ Tk_SetGrid, Tk_UnsetGrid \- control the grid for interactive resizing
\fBTk_SetGrid\fR(\fItkwin, reqWidth, reqHeight, widthInc, heightInc\fR)
.sp
\fBTk_UnsetGrid\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window heightInc
.AP Tk_Window tkwin in
diff --git a/doc/SetOptions.3 b/doc/SetOptions.3
index cbbe648..cc206d4 100644
--- a/doc/SetOptions.3
+++ b/doc/SetOptions.3
@@ -14,27 +14,28 @@ Tk_CreateOptionTable, Tk_DeleteOptionTable, Tk_InitOptions, Tk_SetOptions, Tk_Fr
\fB#include <tk.h>\fR
.sp
Tk_OptionTable
-\fBTk_CreateOptionTable(\fIinterp, templatePtr\fB)\fR
+\fBTk_CreateOptionTable\fR(\fIinterp, templatePtr\fR)
.sp
-\fBTk_DeleteOptionTable(\fIoptionTable\fB)\fR
+\fBTk_DeleteOptionTable\fR(\fIoptionTable\fR)
.sp
int
-\fBTk_InitOptions(\fIinterp, recordPtr, optionTable, tkwin\fB)\fR
+\fBTk_InitOptions\fR(\fIinterp, recordPtr, optionTable, tkwin\fR)
.sp
int
-\fBTk_SetOptions(\fIinterp, recordPtr, optionTable, objc, objv, tkwin, savePtr, maskPtr\fB)\fR
+\fBTk_SetOptions\fR(\fIinterp, recordPtr, optionTable, objc, objv, tkwin, savePtr, maskPtr\fR)
.sp
-\fBTk_FreeSavedOptions(\fIsavedPtr\fB)\fR
+\fBTk_FreeSavedOptions\fR(\fIsavedPtr\fR)
.sp
-\fBTk_RestoreSavedOptions(\fIsavedPtr\fB)\fR
+\fBTk_RestoreSavedOptions\fR(\fIsavedPtr\fR)
.sp
Tcl_Obj *
-\fBTk_GetOptionValue(\fIinterp, recordPtr, optionTable, namePtr, tkwin\fB)\fR
+\fBTk_GetOptionValue\fR(\fIinterp, recordPtr, optionTable, namePtr, tkwin\fR)
.sp
Tcl_Obj *
-\fBTk_GetOptionInfo(\fIinterp, recordPtr, optionTable, namePtr, tkwin\fB)\fR
+\fBTk_GetOptionInfo\fR(\fIinterp, recordPtr, optionTable, namePtr, tkwin\fR)
.sp
-\fBTk_FreeConfigOptions(\fIrecordPtr, optionTable, tkwin\fB)\fR
+\fBTk_FreeConfigOptions\fR(\fIrecordPtr, optionTable, tkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tk_SavedOptions "*const objv[]" in/out
.AP Tcl_Interp *interp in
@@ -58,7 +59,7 @@ For options such as \fBTK_OPTION_COLOR\fR, this argument indicates
the window in which the option will be used. If \fIoptionTable\fR uses
no window-dependent options, then a NULL value may be supplied for
this argument.
-.AP int objc in
+.AP Tcl_Size objc in
Number of values in \fIobjv\fR.
.AP Tcl_Obj "*const *objv" in
Command-line arguments for setting configuring options.
@@ -98,7 +99,7 @@ practice the object may not actually be a widget. The term
is used to refer to the C-level structure in
which information about a particular widget or object is stored.
.PP
-Note: the easiest way to learn how to use these procedures is to
+Note that the easiest way to learn how to use these procedures is to
look at a working example. In Tk, the simplest example is the code
that implements the button family of widgets, which is in \fBtkButton.c\fR.
Other examples are in \fBtkSquare.c\fR and \fBtkMenu.c\fR.
@@ -301,8 +302,7 @@ greater than or equal to zero.
.PP
The \fIflags\fR field consists of one or more bits ORed together. The
following flags are supported:
-.TP
-\fBTK_OPTION_NULL_OK\fR
+.IP \fBTK_OPTION_NULL_OK\fR
If this bit is set for an option then an empty string will be accepted as
the value for the option and the resulting internal form will be a NULL
pointer, a zero value, or \fBNone\fR, depending on the type of the option.
@@ -313,27 +313,25 @@ feature to be turned off entirely, e.g. set a cursor value to
Not all option types support the \fBTK_OPTION_NULL_OK\fR
flag; for those that do, there is an explicit indication of that fact
in the descriptions below.
-.TP
-\fBTK_OPTION_DONT_SET_DEFAULT\fR
+.IP \fBTK_OPTION_DONT_SET_DEFAULT\fR
If this bit is set for an option then no default value will be set in
\fBTk_InitOptions\fR for this option. Neither the option database, nor any
system default value, nor \fIoptionTable\fR are used to give a default
value to this option. Instead it is assumed that the caller has already
supplied a default value in the widget code.
-.TP
-\fBTK_OPTION_ENUM_VAR\fR
+.IP \fBTK_OPTION_ENUM_VAR\fR
If this value is set for an option, then it indicates the the
internalOffset points to an enum variable in stead of an int variable.
Only useful in combination with \fBTK_OPTION_STRING_TABLE\fR,
\fBTK_OPTION_BOOLEAN\fR, \fBTK_OPTION_ANCHOR\fR, \fBTK_OPTION_JUSTIFY\fR,
or \fBTK_OPTION_ANCHOR\fR.
-.TP
-\fBTK_OPTION_VAR(type)\fR
+.IP \fBTK_OPTION_VAR(\fItype\fB)\fR
If this value is set for an option, then it indicates the the
internalOffset points to a \fItype\fR variable in stead of an int variable.
Only useful in combination with \fBTK_OPTION_STRING_TABLE\fR or
\fBTK_OPTION_BOOLEAN\fR, or as \fBTK_OPTION_VAR(Tcl_Size)\fR
with \fBTK_OPTION_INT\fR
+.RS
.PP
The \fItype\fR field of each Tk_OptionSpec structure determines
how to parse the value of that configuration option. The
@@ -343,43 +341,38 @@ passed into procedures like \fBTk_SetOptions\fR, or if it uses
the \fIclientData\fR field of the Tk_OptionSpec, then it is indicated
explicitly; if not mentioned, the type requires neither \fItkwin\fR
nor \fIclientData\fR.
-.TP
-\fBTK_OPTION_ANCHOR\fR
+.RE
+.IP \fBTK_OPTION_ANCHOR\fR
The value must be a standard anchor position such as \fBne\fR or
\fBcenter\fR. The internal form is a Tk_Anchor value like the ones
-returned by \fBTk_GetAnchorFromObj\fR. This option type supports the \fBTK_OPTION_NULL_OK\fR
-flag; if the empty string is specified as the value for the option,
-the integer relief value is set to \fBTK_ANCHOR_NULL\fR.
-.TP
-\fBTK_OPTION_BITMAP\fR
+returned by \fBTk_GetAnchorFromObj\fR. This option type supports the
+\fBTK_OPTION_NULL_OK\fR flag; if the empty string is specified as the
+value for the option, the integer relief value is set to \fBTK_ANCHOR_NULL\fR.
+.IP \fBTK_OPTION_BITMAP\fR
The value must be a standard Tk bitmap name. The internal form is a
Pixmap token like the ones returned by \fBTk_AllocBitmapFromObj\fR.
This option type requires \fItkwin\fR to be supplied to procedures
such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag.
-.TP
-\fBTK_OPTION_BOOLEAN\fR
+.IP \fBTK_OPTION_BOOLEAN\fR
The value must be a standard boolean value such as \fBtrue\fR or
-\fBno\fR. The internal form is an integer with value 0 or 1. Note: if the
-\fIobjOffset\fR field is not used then information about the original value
-of this option will be lost. This option type supports the
+\fBno\fR. The internal form is an integer with value 0 or 1. Note that if
+the \fIobjOffset\fR field is not used, information about the original
+value of this option will be lost. This option type supports the
\fBTK_OPTION_NULL_OK\fR flag; if a NULL value is set, the internal
representation is set to -1.
-.TP
-\fBTK_OPTION_BORDER\fR
+.IP \fBTK_OPTION_BORDER\fR
The value must be a standard color name such as \fBred\fR or \fB#ff8080\fR.
The internal form is a Tk_3DBorder token like the ones returned
by \fBTk_Alloc3DBorderFromObj\fR.
This option type requires \fItkwin\fR to be supplied to procedures
such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag.
-.TP
-\fBTK_OPTION_COLOR\fR
+.IP \fBTK_OPTION_COLOR\fR
The value must be a standard color name such as \fBred\fR or \fB#ff8080\fR.
The internal form is an (XColor *) token like the ones returned by
\fBTk_AllocColorFromObj\fR.
This option type requires \fItkwin\fR to be supplied to procedures
such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag.
-.TP
-\fBTK_OPTION_CURSOR\fR
+.IP \fBTK_OPTION_CURSOR\fR
The value must be a standard cursor name such as \fBcross\fR or \fB@foo\fR.
The internal form is a Tk_Cursor token like the ones returned by
\fBTk_AllocCursorFromObj\fR.
@@ -387,19 +380,16 @@ This option type requires \fItkwin\fR to be supplied to procedures
such as \fBTk_SetOptions\fR, and when the option is set the cursor
for the window is changed by calling \fBXDefineCursor\fR. This
option type also supports the \fBTK_OPTION_NULL_OK\fR flag.
-.TP
-\fBTK_OPTION_CUSTOM\fR
+.IP \fBTK_OPTION_CUSTOM\fR
This option allows applications to define new option types. The
clientData field of the entry points to a structure defining the new
option type. See the section \fBCUSTOM OPTION TYPES\fR below for details.
-.TP
-\fBTK_OPTION_DOUBLE\fR
+.IP \fBTK_OPTION_DOUBLE\fR
The string value must be a floating-point number in
the format accepted by \fBstrtol\fR. The internal form is a C
\fBdouble\fR value. This option type supports the \fBTK_OPTION_NULL_OK\fR
flag; if a NULL value is set, the internal representation is set to NaN.
-.TP
-\fBTK_OPTION_END\fR
+.IP \fBTK_OPTION_END\fR
Marks the end of the template. There must be a Tk_OptionSpec structure
with \fItype\fR \fBTK_OPTION_END\fR at the end of each template. If the
\fIclientData\fR field of this structure is not NULL, then it points to
@@ -407,60 +397,54 @@ an additional array of Tk_OptionSpec's, which is itself terminated by
another \fBTK_OPTION_END\fR entry. Templates may be chained arbitrarily
deeply. This feature allows common options to be shared by several
widget classes.
-.TP
-\fBTK_OPTION_FONT\fR
+.IP \fBTK_OPTION_FONT\fR
The value must be a standard font name such as \fBTimes 16\fR.
The internal form is a Tk_Font handle like the ones returned by
\fBTk_AllocFontFromObj\fR.
This option type requires \fItkwin\fR to be supplied to procedures
such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag.
-.TP
-\fBTK_OPTION_INT\fR
+.IP \fBTK_OPTION_INT\fR
The string value must be an integer in the format accepted by
\fBstrtol\fR (e.g. \fB0\fR and \fB0x\fR prefixes may be used to
-specify octal or hexadecimal numbers, respectively). The internal
-form is a C \fBint\fR value. This option type supports the \fBTK_OPTION_NULL_OK\fR
+specify octal or hexadecimal numbers, respectively). The internal form is
+a C \fBint\fR value. This option type supports the \fBTK_OPTION_NULL_OK\fR
flag; if a NULL value is set, the internal representation is set to INT_MIN.
-.TP
-\fBTK_OPTION_INDEX\fR
-The string value must be an index in the format accepted by \fBTcl_GetIntForIndex()\fR
+.IP \fBTK_OPTION_INDEX\fR
+The string value must be an index in the format accepted by
+\fBTcl_GetIntForIndex()\fR
or the empty string. The internal form is a C \fBint\fR value. If the string
-starts with \fB-\fR, the internal representation will be set to INT_MIN. If the
+starts with \fB\-\fR, the internal representation will be set to INT_MIN. If the
string has the form \fBend-???\fR, then the result will be a negative number:
\fB-1\fR stands for \fBend\fR, \fB-2\fR stands for \fBend-1\fR and so on.
This option type supports the \fBTK_OPTION_NULL_OK\fR flag;
if a NULL value is set, the internal representation is set to INT_MIN.
-.TP
-\fBTK_OPTION_JUSTIFY\fR
+.IP \fBTK_OPTION_JUSTIFY\fR
The value must be a standard justification value such as \fBleft\fR.
The internal form is a Tk_Justify like the values returned by
-\fBTk_GetJustifyFromObj\fR. This option type supports the \fBTK_OPTION_NULL_OK\fR
+\fBTk_GetJustifyFromObj\fR. This option type supports the
+\fBTK_OPTION_NULL_OK\fR
flag; if the empty string is specified as the value for the option,
the integer relief value is set to \fBTK_JUSTIFY_NULL\fR.
-.TP
-\fBTK_OPTION_PIXELS\fR
+.IP \fBTK_OPTION_PIXELS\fR
The value must specify a screen distance such as \fB2i\fR or \fB6.4\fR.
The internal form is an integer value giving a
distance in pixels, like the values returned by
-\fBTk_GetPixelsFromObj\fR. Note: if the \fIobjOffset\fR field is not
-used then information about the original value of this option will be lost.
+\fBTk_GetPixelsFromObj\fR. Note that if the \fIobjOffset\fR field is not
+used, information about the original value of this option will be lost.
See \fBOBJOFFSET VS. INTERNALOFFSET\fR below for details. This option
type supports the \fBTK_OPTION_NULL_OK\fR flag; if a NULL value is set, the
internal representation is set to INT_MIN.
-.TP
-\fBTK_OPTION_RELIEF\fR
+.IP \fBTK_OPTION_RELIEF\fR
The value must be standard relief such as \fBraised\fR.
The internal form is an integer relief value such as
\fBTK_RELIEF_RAISED\fR. This option type supports the \fBTK_OPTION_NULL_OK\fR
flag; if a NULL value is set, the internal representation is set to
\fBTK_RELIEF_NULL\fR.
-.TP
-\fBTK_OPTION_STRING\fR
+.IP \fBTK_OPTION_STRING\fR
The value may be any string. The internal form is a (char *) pointer
that points to a dynamically allocated copy of the value.
This option type supports the \fBTK_OPTION_NULL_OK\fR flag.
-.TP
-\fBTK_OPTION_STRING_TABLE\fR
+.IP \fBTK_OPTION_STRING_TABLE\fR
For this type, \fIclientData\fR is a pointer to an array of strings
suitable for passing to \fBTcl_GetIndexFromObj\fR. The value must
be one of the strings in the table, or a unique abbreviation of
@@ -469,15 +453,13 @@ into the table of the matching string, like the return value
from \fBTcl_GetStringFromObj\fR. This option type supports the
\fBTK_OPTION_NULL_OK\fR flag; if a NULL value is set, the internal
representation is set to -1.
-.TP
-\fBTK_OPTION_SYNONYM\fR
+.IP \fBTK_OPTION_SYNONYM\fR
This type is used to provide alternative names for an option (for
example, \fB\-bg\fR is often used as a synonym for \fB\-background\fR).
The \fBclientData\fR field is a string that gives the name of another
option in the same table. Whenever the synonym option is used, the
information from the other option will be used instead.
-.TP
-\fBTK_OPTION_WINDOW\fR
+.IP \fBTK_OPTION_WINDOW\fR
The value must be a window path name. The internal form is a
\fBTk_Window\fR token for the window.
This option type requires \fItkwin\fR to be supplied to procedures
@@ -527,8 +509,8 @@ the option is retrieved. In most cases it is convenient to use the
\fIinternalOffset\fR field as well, so that the integer value is
immediately available for use in the widget code (alternatively,
\fBTk_GetPixelsFromObj\fR can be used to extract the integer value from
-the object whenever it is needed). Note: the problem of losing information
-on retrievals exists only for \fBTK_OPTION_PIXELS\fR options.
+the object whenever it is needed). Note that the problem of losing
+information on retrievals exists only for \fBTK_OPTION_PIXELS\fR options.
.PP
The second reason to use the \fIobjOffset\fR field is in order to
implement new types of options not supported by these procedures.
@@ -547,7 +529,7 @@ additional configuration types by writing procedures to parse, print,
free, and restore saved copies of the type and creating a structure
pointing to those procedures:
.CS
-typedef struct Tk_ObjCustomOption {
+typedef struct {
char *name;
Tk_CustomOptionSetProc *\fIsetProc\fR;
Tk_CustomOptionGetProc *\fIgetProc\fR;
@@ -597,18 +579,14 @@ The \fIsetProc\fR procedure is invoked by \fBTk_SetOptions\fR to
convert a Tcl_Obj into an internal representation and store the
resulting value in the widget record. The arguments are:
.RS
-.TP
-\fIclientData\fR
+.IP \fIclientData\fR
A copy of the \fIclientData\fR field in the Tk_ObjCustomOption
structure.
-.TP
-\fIinterp\fR
+.IP \fIinterp\fR
A pointer to a Tcl interpreter, used for error reporting.
-.TP
-\fITkwin\fR
+.IP \fITkwin\fR
A copy of the \fItkwin\fR argument to \fBTk_SetOptions\fR
-.TP
-\fIvaluePtr\fR
+.IP \fIvaluePtr\fR
A pointer to a reference to a Tcl_Obj describing the new value for the
option; it could have been specified explicitly in the call to
\fBTk_SetOptions\fR or it could come from the option database or a
@@ -618,22 +596,18 @@ pointer referenced by \fIvaluePtr\fR is the pointer that will be
stored at the objOffset for the option. \fISetProc\fR may modify the
value if necessary; for example, \fIsetProc\fR may change the value to
NULL to support the \fBTK_OPTION_NULL_OK\fR flag.
-.TP
-\fIrecordPtr\fR
+.IP \fIrecordPtr\fR
A pointer to the start of the widget record to modify.
-.TP
-\fIinternalOffset\fR
+.IP \fIinternalOffset\fR
Offset in bytes from the start of the widget record to the location
where the internal representation of the option value is to be placed.
-.TP
-\fIsaveInternalPtr\fR
+.IP \fIsaveInternalPtr\fR
A pointer to storage allocated in a Tk_SavedOptions structure for the
internal representation of the original option value. Before setting
the option to its new value, \fIsetProc\fR should set the value
referenced by \fIsaveInternalPtr\fR to the original value of the
option in order to support \fBTk_RestoreSavedOptions\fR.
-.TP
-\fIflags\fR
+.IP \fIflags\fR
A copy of the \fIflags\fR field in the Tk_OptionSpec structure for the
option
.RE
diff --git a/doc/SetVisual.3 b/doc/SetVisual.3
index a5b9efd..a3b50d1 100644
--- a/doc/SetVisual.3
+++ b/doc/SetVisual.3
@@ -16,6 +16,7 @@ Tk_SetWindowVisual \- change visual characteristics of window
.sp
int
\fBTk_SetWindowVisual\fR(\fItkwin, visual, depth, colormap\fR)
+.fi
.SH ARGUMENTS
.AS "Tk_Window int" colormap
.AP Tk_Window tkwin in
@@ -43,7 +44,7 @@ is called then it returns 0 and does not make any changes; otherwise
it returns 1 to signify that the operation
completed successfully.
.PP
-Note: \fBTk_SetWindowVisual\fR should not be called if you just want
+Note that \fBTk_SetWindowVisual\fR should not be called if you just want
to change a window's colormap without changing its visual or depth;
call \fBTk_SetWindowColormap\fR instead.
.SH KEYWORDS
diff --git a/doc/StrictMotif.3 b/doc/StrictMotif.3
index ec9319f..c8a6e08 100644
--- a/doc/StrictMotif.3
+++ b/doc/StrictMotif.3
@@ -15,6 +15,7 @@ Tk_StrictMotif \- Return value of tk_strictMotif variable
.sp
int
\fBTk_StrictMotif\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window tkwin
.AP Tk_Window tkwin in
diff --git a/doc/TextLayout.3 b/doc/TextLayout.3
index 7df0685..5e83a7b 100644
--- a/doc/TextLayout.3
+++ b/doc/TextLayout.3
@@ -14,31 +14,28 @@ Tk_ComputeTextLayout, Tk_FreeTextLayout, Tk_DrawTextLayout, Tk_UnderlineTextLayo
\fB#include <tk.h>\fR
.sp
Tk_TextLayout
-\fBTk_ComputeTextLayout(\fItkfont, string, numChars, wrapLength, justify, flags, widthPtr, heightPtr\fB)\fR
+\fBTk_ComputeTextLayout\fR(\fItkfont, string, numChars, wrapLength, justify, flags, widthPtr, heightPtr\fR)
.sp
-void
-\fBTk_FreeTextLayout(\fIlayout\fB)\fR
+\fBTk_FreeTextLayout\fR(\fIlayout\fR)
.sp
-void
-\fBTk_DrawTextLayout(\fIdisplay, drawable, gc, layout, x, y, firstChar, lastChar\fB)\fR
+\fBTk_DrawTextLayout\fR(\fIdisplay, drawable, gc, layout, x, y, firstChar, lastChar\fR)
.sp
-void
-\fBTk_UnderlineTextLayout(\fIdisplay, drawable, gc, layout, x, y, underline\fB)\fR
+\fBTk_UnderlineTextLayout\fR(\fIdisplay, drawable, gc, layout, x, y, underline\fR)
.sp
int
-\fBTk_PointToChar(\fIlayout, x, y\fB)\fR
+\fBTk_PointToChar\fR(\fIlayout, x, y\fR)
.sp
int
-\fBTk_CharBbox(\fIlayout, index, xPtr, yPtr, widthPtr, heightPtr\fB)\fR
+\fBTk_CharBbox\fR(\fIlayout, index, xPtr, yPtr, widthPtr, heightPtr\fR)
.sp
int
-\fBTk_DistanceToTextLayout(\fIlayout, x, y\fB)\fR
+\fBTk_DistanceToTextLayout\fR(\fIlayout, x, y\fR)
.sp
int
-\fBTk_IntersectTextLayout(\fIlayout, x, y, width, height\fB)\fR
+\fBTk_IntersectTextLayout\fR(\fIlayout, x, y, width, height\fR)
.sp
-void
-\fBTk_TextLayoutToPostscript(\fIinterp, layout\fB)\fR
+\fBTk_TextLayoutToPostscript\fR(\fIinterp, layout\fR)
+.fi
.SH ARGUMENTS
.AS Tk_TextLayout "*xPtr, *yPtr"
.AP Tk_Font tkfont in
@@ -100,10 +97,10 @@ Point, in pixels, at which to place the upper-left hand corner of the
text layout when it is being drawn, or the coordinates of a point (with
respect to the upper-left hand corner of the text layout) to check
against the text layout.
-.AP int firstChar in
+.AP Tcl_Size firstChar in
The index of the first character to draw from the given text layout.
The number 0 means to draw from the beginning.
-.AP int lastChar in
+.AP Tcl_Size lastChar in
The index of the last character up to which to draw. The character
specified by \fIlastChar\fR itself will not be drawn. A number less
than 0 means to draw all characters in the text layout.
@@ -111,7 +108,7 @@ than 0 means to draw all characters in the text layout.
Index of the single character to underline in the text layout, or a
negative number counting backwards from the end of the string. Any
out-of-range number (e.g. INT_MIN) means no underline.
-.AP int index in
+.AP Tcl_Size index in
The index of the character whose bounding box is desired. The bounding
box is computed with respect to the upper-left hand corner of the text layout.
.AP int "*xPtr, *yPtr" out
diff --git a/doc/TkInitStubs.3 b/doc/TkInitStubs.3
index 57ec9e6..4429bc9 100644
--- a/doc/TkInitStubs.3
+++ b/doc/TkInitStubs.3
@@ -15,6 +15,7 @@ Tk_InitStubs \- initialize the Tk stubs mechanism
.sp
const char *
\fBTk_InitStubs\fR(\fIinterp, version, exact\fR)
+.fi
.SH ARGUMENTS
.AS Tcl_Interp *interp in
.AP Tcl_Interp *interp in
diff --git a/doc/Tk_Init.3 b/doc/Tk_Init.3
index fc29318..1f769c6 100644
--- a/doc/Tk_Init.3
+++ b/doc/Tk_Init.3
@@ -47,38 +47,48 @@ all Tk commands that are considered unsafe. Those commands and the
reasons for their exclusion are:
.TP
\fBbell\fR
+.
Continuous ringing of the bell is a nuisance.
.TP
\fBclipboard\fR
+.
A malicious script could replace the contents of the clipboard with
the string
.QW "\fBrm \-r *\fR"
and lead to surprises when the contents of the clipboard are pasted.
.TP
\fBgrab\fR
+.
Grab can be used to block the user from using any other applications.
.TP
\fBmenu\fR
+.
Menus can be used to cover the entire screen and to steal input from
the user.
.TP
\fBselection\fR
+.
See clipboard.
.TP
\fBsend\fR
+.
Send can be used to cause unsafe interpreters to execute commands.
.TP
\fBtk\fR
+.
The tk command recreates the send command, which is unsafe.
.TP
\fBtkwait\fR
+.
Tkwait can block the containing process forever
.TP
\fBtoplevel\fR
+.
Toplevels can be used to cover the entire screen and to steal input
from the user.
.TP
\fBwm\fR
+.
If toplevels are ever allowed, wm can be used to remove decorations,
move windows around, etc.
.SH KEYWORDS
diff --git a/doc/Tk_Main.3 b/doc/Tk_Main.3
index ea5f771..a1e12ce 100644
--- a/doc/Tk_Main.3
+++ b/doc/Tk_Main.3
@@ -17,7 +17,7 @@ Tk_Main \- main program for Tk-based applications
\fBTk_Main\fR(\fIargc, argv, appInitProc\fR)
.SH ARGUMENTS
.AS Tcl_AppInitProc *appInitProc
-.AP int argc in
+.AP Tcl_Size argc in
Number of elements in \fIargv\fR.
.AP char *argv[] in
Array of strings containing command-line arguments. On Windows, when
diff --git a/doc/WinUtil.3 b/doc/WinUtil.3
index 253ed19..7208200 100644
--- a/doc/WinUtil.3
+++ b/doc/WinUtil.3
@@ -15,14 +15,15 @@ Tk_GetOtherWindow, Tk_MakeContainer, Tk_MakeWindow, Tk_UseWindow \- window utili
\fB#include <tk.h>\fR
.sp
Tk_Window
-\fBTk_GetOtherWindow(\fItkwin\fB)\fR
+\fBTk_GetOtherWindow\fR(\fItkwin\fR)
.sp
-\fBTk_MakeContainer(\fItkwin\fB)\fR
+\fBTk_MakeContainer\fR(\fItkwin\fR)
.sp
-\fBTk_MakeWindow(\fItkwin, parent\fB)\fR
+\fBTk_MakeWindow\fR(\fItkwin, parent\fR)
.sp
int
-\fBTk_UseWindow(\fIinterp, tkwin, string\fB)\fR
+\fBTk_UseWindow\fR(\fIinterp, tkwin, string\fR)
+.fi
.SH ARGUMENTS
.AS XSetWindowAttributes borderWidth
.AP Tcl_Interp * interp in
diff --git a/doc/WindowId.3 b/doc/WindowId.3
index 477efe1..68597d8 100644
--- a/doc/WindowId.3
+++ b/doc/WindowId.3
@@ -103,6 +103,7 @@ Tcl_Interp *
.sp
Tcl_Obj *
\fBTk_NewWindowObj\fR(\fItkwin\fR)
+.fi
.SH ARGUMENTS
.AS Tk_Window tkwin
.AP Tk_Window tkwin in
@@ -147,7 +148,7 @@ information plus a few other fields. \fBTk_Attributes\fR
returns a pointer to an XSetWindowAttributes structure describing
all of the attributes of the \fItkwin\fR's window, such as background
pixmap, event mask, and so on (Tk keeps track of all this information
-as it is changed by the application). Note: it is essential that
+as it is changed by the application). Note that it is essential that
applications use Tk procedures like \fBTk_ResizeWindow\fR instead
of X procedures like \fBXResizeWindow\fR, so that Tk can keep its
data structures up-to-date.
diff --git a/doc/bind.n b/doc/bind.n
index 9fb5c07..a388152 100644
--- a/doc/bind.n
+++ b/doc/bind.n
@@ -149,8 +149,9 @@ substantial mouse motion in between. For example, \fB<Double\-Button\-1>\fR
is equivalent to \fB<Button\-1><Button\-1>\fR with the extra time and space
requirement.
.PP
-The \fBCommand\fR, \fBOption\fR, \fBNum\fR and \fBFn\fRmodifiers are equivalents
-of \fBMod1\fR up to \fBMod4\fR, they correspond to Macintosh-specific modifier keys.
+The \fBCommand\fR, \fBOption\fR, \fBNum\fR and \fBFn\fRmodifiers are
+equivalents of \fBMod1\fR up to \fBMod4\fR; they correspond to
+Macintosh-specific modifier keys.
.PP
The \fBExtended\fR modifier is, at present, specific to Windows. It
appears on events that are associated with the keys on the
@@ -649,9 +650,9 @@ then that script terminates and no other scripts will be invoked
for the event.
.PP
Within a script called from the binding script, \fBreturn\fR
-\fB-code ok\fR may be used to continue processing (including
+\fB\-code ok\fR may be used to continue processing (including
.QW +
-appended scripts), or \fBreturn\fR \fB-code break\fR may be used to
+appended scripts), or \fBreturn\fR \fB\-code break\fR may be used to
stop processing all other binding scripts.
.PP
If more than one binding matches a particular event and they
@@ -739,7 +740,7 @@ The \fBbgerror\fR command will be executed at global level
Arrange for a string describing the motion of the mouse to be printed
out when the mouse is double-clicked:
.CS
-\fBbind\fR . <Double\-1> {
+\fBbind\fR . <Double-1> {
puts "hi from (%x,%y)"
}
.CE
@@ -748,7 +749,7 @@ A little GUI that displays what the keysym name of the last key
pressed is:
.CS
set keysym "Press any key"
-pack [label .l \-textvariable keysym \-padx 2m \-pady 1m]
+pack [label .l -textvariable keysym -padx 2m -pady 1m]
\fBbind\fR . <Key> {
set keysym "You pressed %K"
}
diff --git a/doc/bitmap.n b/doc/bitmap.n
index 19716e1..3ef2254 100644
--- a/doc/bitmap.n
+++ b/doc/bitmap.n
@@ -15,7 +15,7 @@ bitmap \- Images that display two colors
.nf
\fBimage create bitmap \fR?\fIname\fR? ?\fIoptions\fR?
-\fIimageName \fBcget\fR \fIoption\fR
+\fIimageName \fBcget\fI option\fR
\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.fi
.BE
@@ -39,6 +39,7 @@ data is zero.
Like all images, bitmaps are created using the \fBimage create\fR
command.
Bitmaps support the following \fIoptions\fR:
+.\" OPTION: -background
.TP
\fB\-background \fIcolor\fR
.
@@ -47,6 +48,7 @@ ways accepted by Tk. If this option is set to an empty string
then the background pixels will be transparent. This effect
is achieved by using the source bitmap as the mask bitmap, ignoring
any \fB\-maskdata\fR or \fB\-maskfile\fR options.
+.\" OPTION: -data
.TP
\fB\-data \fIstring\fR
.
@@ -55,6 +57,7 @@ The string must adhere to X11 bitmap format (e.g., as generated
by the \fBbitmap\fR program).
If both the \fB\-data\fR and \fB\-file\fR options are specified,
the \fB\-data\fR option takes precedence.
+.\" OPTION: -file
.TP
\fB\-file \fIname\fR
.
@@ -62,11 +65,13 @@ the \fB\-data\fR option takes precedence.
source bitmap.
The file must adhere to X11 bitmap format (e.g., as generated
by the \fBbitmap\fR program).
+.\" OPTION: -foreground
.TP
\fB\-foreground \fIcolor\fR
.
Specifies a foreground color for the image in any of the standard
ways accepted by Tk.
+.\" OPTION: -maskdata
.TP
\fB\-maskdata \fIstring\fR
.
@@ -75,6 +80,7 @@ The string must adhere to X11 bitmap format (e.g., as generated
by the \fBbitmap\fR program).
If both the \fB\-maskdata\fR and \fB\-maskfile\fR options are specified,
the \fB\-maskdata\fR option takes precedence.
+.\" OPTION: -maskfile
.TP
\fB\-maskfile \fIname\fR
.
@@ -95,13 +101,15 @@ It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for bitmap images:
+.\" METHOD: cget
.TP
-\fIimageName \fBcget\fR \fIoption\fR
+\fIimageName \fBcget\fI option\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the
\fBimage create\fR \fBbitmap\fR command.
+.\" METHOD: configure
.TP
\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
diff --git a/doc/busy.n b/doc/busy.n
index 3274524..b1453bb 100644
--- a/doc/busy.n
+++ b/doc/busy.n
@@ -30,19 +30,15 @@
.SH NAME
busy \- Make Tk widgets busy, temporarily blocking user interactions
.SH SYNOPSIS
-\fBtk busy\fR \fIwindow \fR?\fIoptions\fR?
-.sp
+.nf
+\fBtk busy\fI window \fR?\fIoptions\fR?
\fBtk busy busywindow \fIwindow\fR
-.sp
-\fBtk busy hold\fR \fIwindow \fR?\fIoptions\fR?
-.sp
+\fBtk busy hold\fI window \fR?\fIoptions\fR?
\fBtk busy configure \fIwindow\fR ?\fIoption value\fR?...
-.sp
-\fBtk busy forget\fR \fIwindow \fR?\fIwindow \fR?...
-.sp
+\fBtk busy forget\fI window \fR?\fIwindow \fR?...
\fBtk busy current\fR ?\fIpattern\fR?
-.sp
\fBtk busy status \fIwindow\fR
+.fi
.BE
.SH DESCRIPTION
.PP
@@ -116,7 +112,7 @@ The busy window has a configurable cursor. You can change the busy cursor
using the \fBconfigure\fR operation.
.PP
.CS
-\fBtk busy\fR configure .top \-cursor "watch"
+\fBtk busy\fR configure .top -cursor "watch"
.CE
.PP
Destroying the widget will also clean up any resources allocated by the \fBtk
@@ -129,20 +125,23 @@ The following operations are available for the \fBtk busy\fR command:
\fBtk busy \fIwindow\fR ?\fIoption value\fR?...
.
Shortcut for \fBtk busy hold\fR command.
+.\" METHOD: busywindow
.TP
\fBtk busy busywindow \fIwindow\fR
.
Returns the pathname of the busy window (i.e. the transparent window
shielding the window appearing busy) created by the \fBtk busy hold\fR
command for \fIwindow\fR, or the empty string if \fIwindow\fR is not busy.
+.\" METHOD: cget
.TP
-\fBtk busy cget \fIwindow\fR \fIoption\fR
+\fBtk busy cget \fIwindow option\fR
.
Queries the \fBtk busy\fR command configuration options for \fIwindow\fR.
\fIWindow\fR must be the path name of a widget previously made busy by the
\fBhold\fR operation. The command returns the present value of the specified
\fIoption\fR. \fIOption\fR may have any of the values accepted by the
\fBhold\fR operation.
+.\" METHOD: configure
.TP
\fBtk busy configure \fIwindow\fR ?\fIoption value\fR?...
.
@@ -169,12 +168,14 @@ option add *frame.busyCursor gumby
option add *Frame.BusyCursor gumby
.CE
.RE
+.\" METHOD: current
.TP
\fBtk busy current \fR?\fIpattern\fR?
.
Returns the pathnames of all widgets that are currently busy. If a
\fIpattern\fR is given, only the path names of busy widgets matching
\fIpattern\fR are returned.
+.\" METHOD: forget
.TP
\fBtk busy forget \fIwindow\fR ?\fIwindow\fR?...
.
@@ -183,6 +184,7 @@ including the transparent window. User events will again be received by
\fIwindow\fR. Resources are also released when \fIwindow\fR is destroyed.
\fIWindow\fR must be the name of a widget specified in the \fBhold\fR
operation, otherwise an error is reported.
+.\" METHOD: hold
.TP
\fBtk busy hold \fIwindow\fR ?\fIoption value\fR?...
.
@@ -197,6 +199,7 @@ command returns the pathname of the busy window that was created (i.e. the
transparent window shielding the window appearing busy). The following
configuration options are valid:
.RS
+.\" OPTION: -cursor
.TP
\fB\-cursor \fIcursorName\fR
.
@@ -204,6 +207,7 @@ Specifies the cursor to be displayed when the widget is made busy.
\fICursorName\fR can be in any form accepted by \fBTk_GetCursor\fR. The
default cursor is \fBwait\fR on Windows and \fBwatch\fR on other platforms.
.RE
+.\" METHOD: status
.TP
\fBtk busy status \fIwindow\fR
.
diff --git a/doc/button.n b/doc/button.n
index 70e0e65..9850670 100644
--- a/doc/button.n
+++ b/doc/button.n
@@ -12,7 +12,7 @@
.SH NAME
button \- Create and manipulate 'button' action widgets
.SH SYNOPSIS
-\fBbutton\fR \fIpathName \fR?\fIoptions\fR?
+\fBbutton\fI pathName \fR?\fIoptions\fR?
.SO
\-activebackground \-font \-relief
\-activeforeground \-foreground \-repeatdelay
@@ -114,14 +114,18 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for button widgets:
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
+.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBbutton\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
@@ -134,15 +138,19 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBbutton\fR
command.
+.\" METHOD: flash
.TP
\fIpathName \fBflash\fR
+.
Flash the button. This is accomplished by redisplaying the button
several times, alternating between the configured activebackground
and background colors. At the end of the flash the button is left
in the same normal/active state as when the command was invoked.
This command is ignored if the button's state is \fBdisabled\fR.
+.\" METHOD: invoke
.TP
\fIpathName \fBinvoke\fR
+.
Invoke the Tcl command associated with the button, if there is one.
The return value is the return value from the Tcl command, or an
empty string if there is no command associated with the button.
@@ -188,17 +196,17 @@ This is the classic Tk
demonstration:
.PP
.CS
-\fBbutton\fR .b \-text "Hello, World!" \-command exit
+\fBbutton\fR .b -text "Hello, World!" -command exit
pack .b
.CE
.PP
This example demonstrates how to handle button accelerators:
.PP
.CS
-\fBbutton\fR .b1 \-text Hello \-underline 0
-\fBbutton\fR .b2 \-text World \-underline 0
-bind . <Key\-h> {.b1 flash; .b1 invoke}
-bind . <Key\-w> {.b2 flash; .b2 invoke}
+\fBbutton\fR .b1 -text Hello -underline 0
+\fBbutton\fR .b2 -text World -underline 0
+bind . <Key-h> {.b1 flash; .b1 invoke}
+bind . <Key-w> {.b2 flash; .b2 invoke}
pack .b1 .b2
.CE
.SH "SEE ALSO"
diff --git a/doc/canvas.n b/doc/canvas.n
index cda7706..7484a6e 100644
--- a/doc/canvas.n
+++ b/doc/canvas.n
@@ -13,7 +13,7 @@
.SH NAME
canvas \- Create and manipulate 'canvas' hypergraphics drawing surface widgets
.SH SYNOPSIS
-\fBcanvas\fR \fIpathName \fR?\fIoptions\fR?
+\fBcanvas\fI pathName \fR?\fIoptions\fR?
.SO
\-background \-borderwidth \-cursor
\-highlightbackground \-highlightcolor \-highlightthickness
@@ -256,9 +256,7 @@ tasks as inserting new text at the end of the item.
Lines and Polygons do not support the insertion cursor
and the selection. Their indices are supposed to be even
always, because coordinates always appear in pairs.
-.TP 10
-\fInumber\fR
-.
+.IP \fInumber\fR 10
A decimal number giving the position of the desired character
within the text item.
0 refers to the first character, 1 to the next character, and
@@ -271,30 +269,20 @@ polygons, numbers less than 0 or greater than the length
of the coordinate list will be adjusted by adding or subtracting
the length until the result is between zero and the length,
inclusive.
-.TP 10
-\fBend\fR
-.
+.IP \fBend\fR 10
Refers to the character or coordinate just after the last one
in the item (same as the number of characters or coordinates
in the item).
-.TP 10
-\fBinsert\fR
-.
+.IP \fBinsert\fR 10
Refers to the character just before which the insertion cursor
is drawn in this item. Not valid for lines and polygons.
-.TP 10
-\fBsel.first\fR
-.
+.IP \fBsel.first\fR 10
Refers to the first selected character in the item.
If the selection is not in this item then this form is illegal.
-.TP 10
-\fBsel.last\fR
-.
+.IP \fBsel.last\fR 10
Refers to the last selected character in the item.
If the selection is not in this item then this form is illegal.
-.TP 10
-\fB@\fIx,y\fR
-.
+.IP \fB@\fIx,y\fR 10
Refers to the character or coordinate at the point given by \fIx\fR and
\fIy\fR, where \fIx\fR and \fIy\fR are specified in the coordinate
system of the canvas.
@@ -353,6 +341,7 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command.
The following widget commands are possible for canvas widgets:
+.\" METHOD: addtag
.TP
\fIpathName \fBaddtag \fItag searchSpec \fR?\fIarg ...\fR?
.
@@ -367,27 +356,19 @@ This command returns an empty string as result.
\fISearchSpec\fR and \fIarg\fR's may take any of the following
forms:
.RS
-.TP
-\fBabove \fItagOrId\fR
-.
+.IP "\fBabove \fItagOrId\fR"
Selects the item just after (above) the one given by \fItagOrId\fR
in the display list.
If \fItagOrId\fR denotes more than one item, then the last (topmost)
of these items in the display list is used.
-.TP
-\fBall\fR
-.
+.IP \fBall\fR
Selects all the items in the canvas.
-.TP
-\fBbelow \fItagOrId\fR
-.
+.IP "\fBbelow \fItagOrId\fR"
Selects the item just before (below) the one given by \fItagOrId\fR
in the display list.
If \fItagOrId\fR denotes more than one item, then the first (lowest)
of these items in the display list is used.
-.TP
-\fBclosest \fIx y \fR?\fIhalo\fR? ?\fIstart\fR?
-.
+.IP "\fBclosest \fIx y \fR?\fIhalo\fR? ?\fIstart\fR?"
Selects the item closest to the point given by \fIx\fR and \fIy\fR.
If more than one item is at the same closest distance (e.g. two
items overlap the point), then the top-most of these items (the
@@ -405,26 +386,21 @@ Instead of selecting the topmost closest item, this form will
select the topmost closest item that is below \fIstart\fR in
the display list; if no such item exists, then the selection
behaves as if the \fIstart\fR argument had not been specified.
-.TP
-\fBenclosed\fR \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR
-.
+.IP "\fBenclosed\fI x1 y1 x2 y2\fR"
Selects all the items completely enclosed within the rectangular
region given by \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR.
\fIX1\fR must be no greater than \fIx2\fR and \fIy1\fR must be
no greater than \fIy2\fR.
-.TP
-\fBoverlapping\fR \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR
-.
+.IP "\fBoverlapping\fI x1 y1 x2 y2\fR"
Selects all the items that overlap or are enclosed within the
rectangular region given by \fIx1\fR, \fIy1\fR, \fIx2\fR,
and \fIy2\fR.
\fIX1\fR must be no greater than \fIx2\fR and \fIy1\fR must be
no greater than \fIy2\fR.
-.TP
-\fBwithtag \fItagOrId\fR
-.
+.IP "\fBwithtag \fItagOrId\fR"
Selects all the items given by \fItagOrId\fR.
.RE
+.\" METHOD: bbox
.TP
\fIpathName \fBbbox \fItagOrId\fR ?\fItagOrId tagOrId ...\fR?
.
@@ -442,6 +418,7 @@ If no items match any of the \fItagOrId\fR arguments or if the
matching items have empty bounding boxes (i.e. they have nothing
to display)
then an empty string is returned.
+.\" METHOD: bind
.TP
\fIpathName \fBbind \fItagOrId\fR ?\fIsequence\fR? ?\fIcommand\fR?
.
@@ -503,6 +480,7 @@ the canvas's items using the \fBbind\fR widget command.
The bindings for items will be invoked before any of the bindings
for the window as a whole.
.RE
+.\" METHOD: canvasx
.TP
\fIpathName \fBcanvasx \fIscreenx\fR ?\fIgridspacing\fR?
.
@@ -510,6 +488,7 @@ Given a window x-coordinate in the canvas \fIscreenx\fR, this command returns
the canvas x-coordinate that is displayed at that location.
If \fIgridspacing\fR is specified, then the canvas coordinate is
rounded to the nearest multiple of \fIgridspacing\fR units.
+.\" METHOD: canvasy
.TP
\fIpathName \fBcanvasy \fIscreeny\fR ?\fIgridspacing\fR?
.
@@ -517,13 +496,15 @@ Given a window y-coordinate in the canvas \fIscreeny\fR this command returns
the canvas y-coordinate that is displayed at that location.
If \fIgridspacing\fR is specified, then the canvas coordinate is
rounded to the nearest multiple of \fIgridspacing\fR units.
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBcanvas\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure ?\fIoption\fR? ?\fIvalue\fR? ?\fIoption value ...\fR?
.
@@ -539,10 +520,11 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBcanvas\fR
command.
+.\" METHOD: coords
.TP
-\fIpathName\fR \fBcoords \fItagOrId \fR?\fIx0 y0 ...\fR?
+\fIpathName \fBcoords \fItagOrId \fR?\fIx0 y0 ...\fR?
.TP
-\fIpathName\fR \fBcoords \fItagOrId \fR?\fIcoordList\fR?
+\fIpathName \fBcoords \fItagOrId \fR?\fIcoordList\fR?
.
Query or modify the coordinates that define an item.
If no coordinates are specified, this command returns a list
@@ -561,6 +543,7 @@ returned in screen units with no units (that is, in pixels). So if the
original coordinates were specified for instance in centimeters or inches,
the returned values will nevertheless be in pixels.
.RE
+.\" METHOD: create
.TP
\fIpathName \fBcreate \fItype x y \fR?\fIx y ...\fR? ?\fIoption value ...\fR?
.TP
@@ -574,6 +557,7 @@ more item options.
See the subsections on individual item types below for more
on the syntax of this command.
This command returns the id for the new item.
+.\" METHOD: dchars
.TP
\fIpathName \fBdchars \fItagOrId first \fR?\fIlast\fR?
.
@@ -586,11 +570,13 @@ line and polygon items interpret them as indices to a coordinate (an x,y pair).
Indices are described in \fBINDICES\fR above.
If \fIlast\fR is omitted, it defaults to \fIfirst\fR.
This command returns an empty string.
+.\" METHOD: delete
.TP
\fIpathName \fBdelete \fR?\fItagOrId tagOrId ...\fR?
.
Delete each of the items given by each \fItagOrId\fR, and return
an empty string.
+.\" METHOD: dtag
.TP
\fIpathName \fBdtag \fItagOrId \fR?\fItagToDelete\fR?
.
@@ -601,6 +587,7 @@ If an item does not have the tag \fItagToDelete\fR then
the item is unaffected by the command.
If \fItagToDelete\fR is omitted then it defaults to \fItagOrId\fR.
This command returns an empty string.
+.\" METHOD: find
.TP
\fIpathName \fBfind \fIsearchCommand \fR?\fIarg ...\fR?
.
@@ -610,6 +597,7 @@ meet the constraints specified by \fIsearchCommand\fR and
\fISearchCommand\fR and \fIargs\fR have any of the forms
accepted by the \fBaddtag\fR command.
The items are returned in stacking order, with the lowest item first.
+.\" METHOD: focus
.TP
\fIpathName \fBfocus \fR?\fItagOrId\fR?
.
@@ -639,8 +627,9 @@ In most cases it is advisable to follow the \fBfocus\fR widget
command with the \fBfocus\fR command to set the focus window to
the canvas (if it was not there already).
.RE
+.\" METHOD: gettags
.TP
-\fIpathName \fBgettags\fR \fItagOrId\fR
+\fIpathName \fBgettags\fI tagOrId\fR
.
Return a list whose elements are the tags associated with the
item given by \fItagOrId\fR.
@@ -648,6 +637,7 @@ If \fItagOrId\fR refers to more than one item, then the tags
are returned from the first such item in the display list.
If \fItagOrId\fR does not refer to any items, or if the item
contains no tags, then an empty string is returned.
+.\" METHOD: icursor
.TP
\fIpathName \fBicursor \fItagOrId index\fR
.
@@ -657,25 +647,37 @@ If some or all of the items given by \fItagOrId\fR do not support
an insertion cursor then this command has no effect on them.
See \fBINDICES\fR above for a description of the
legal forms for \fIindex\fR.
-Note: the insertion cursor is only displayed in an item if
+.RS
+.PP
+Note that the insertion cursor is only displayed in an item if
that item currently has the keyboard focus (see the \fBfocus\fR widget
command, above), but the cursor position may
be set even when the item does not have the focus.
+.PP
This command returns an empty string.
+.RE
+.\" METHOD: image
.TP
\fIpathName \fBimage \fIimagename\fR ?\fIsubsample\fR? ?\fIzoom\fR?
.
-Draw the canvas into the Tk photo image named \fIimagename\fR. If a \fB-scrollregion\fR
-has been defined then this will be the boundaries of the canvas region drawn and the
-final size of the photo image. Otherwise the widget width and height with an origin
-of 0,0 will be the size of the canvas region drawn and the final size of the photo
-image. Optionally an integer \fIsubsample\fR factor may be given and the photo image
-will be reduced in size. In addition to the \fIsubsample\fR an integer \fIzoom\fR
-factor can also be given and the photo image will be enlarged. The image background
-will be filled with the canvas background colour. The canvas widget does not need to
-be mapped for this widget command to work, but at least one of it's ancestors must be
-mapped.
+Draw the canvas into the Tk photo image named \fIimagename\fR.
+If a \fB\-scrollregion\fR has been defined then this will be the boundaries
+of the canvas region drawn and the final size of the photo image. Otherwise
+the widget width and height with an origin of 0,0 will be the size of the
+canvas region drawn and the final size of the photo image. Optionally an
+integer \fIsubsample\fR factor may be given and the photo image
+will be reduced in size.
+.RS
+.PP
+In addition to the \fIsubsample\fR an integer \fIzoom\fR factor can also
+be given and the photo image will be enlarged. The image background will
+be filled with the canvas background colour. The canvas widget does not
+need to be mapped for this widget command to work, but at least one of
+it's ancestors must be mapped.
+.PP
This command returns an empty string.
+.RE
+.\" METHOD: imove
.TP
\fIpathName \fBimove \fItagOrId index x y\fR
.
@@ -684,6 +686,7 @@ indicated by \fItagOrId\fR to be relocated to the location (\fIx\fR,\fIy\fR).
Each item interprets \fIindex\fR independently according to the rules
described in \fBINDICES\fR above. Out of the standard set of items, only line
and polygon items may have their coordinates relocated this way.
+.\" METHOD: index
.TP
\fIpathName \fBindex \fItagOrId index\fR
.
@@ -698,6 +701,7 @@ of characters, or coordinates, within the item, inclusive.
If \fItagOrId\fR refers to multiple items, then the index
is processed in the first of these items that supports indexing
operations (in display list order).
+.\" METHOD: insert
.TP
\fIpathName \fBinsert \fItagOrId beforeThis string\fR
.
@@ -708,11 +712,16 @@ Text items interpret \fIbeforeThis\fR as an index to a character,
line and polygon items interpret it as an index to a coordinate (an x,y pair).
For lines and polygons the \fIstring\fR must be a valid coordinate
sequence.
+.RS
+.PP
See \fBINDICES\fR above for information about the forms allowed
for \fIbeforeThis\fR.
+.PP
This command returns an empty string.
+.RE
+.\" METHOD: itemcget
.TP
-\fIpathName \fBitemcget\fR \fItagOrId\fR \fIoption\fR
+\fIpathName \fBitemcget\fI tagOrId option\fR
.
Returns the current value of the configuration option for the
item given by \fItagOrId\fR whose name is \fIoption\fR.
@@ -722,6 +731,7 @@ it applies to a particular item rather than the widget as a whole.
widget command when the item was created.
If \fItagOrId\fR is a tag that refers to more than one item,
the first (lowest) such item is used.
+.\" METHOD: itemconfigure
.TP
\fIpathName \fBitemconfigure \fItagOrId\fR ?\fIoption\fR? ?\fIvalue\fR? ?\fIoption value ...\fR?
.
@@ -744,6 +754,7 @@ The \fIoption\fRs and \fIvalue\fRs are the same as those permissible
in the \fBcreate\fR widget command when the item(s) were created;
see the sections describing individual item types below for details
on the legal options.
+.\" METHOD: lower
.TP
\fIpathName \fBlower \fItagOrId \fR?\fIbelowThis\fR?
.
@@ -754,11 +765,12 @@ but the relative order of the moved items will not be changed.
\fIBelowThis\fR is a tag or id; if it refers to more than one
item then the first (lowest) of these items in the display list is used
as the destination location for the moved items.
-Note: this command has no effect on window items. Window items always
+Note that this command has no effect on window items. Window items always
obscure other item types, and the stacking order of window items is
determined by the \fBraise\fR command and \fBlower\fR command, not the
\fBraise\fR widget command and \fBlower\fR widget command for canvases.
This command returns an empty string.
+.\" METHOD: move
.TP
\fIpathName \fBmove \fItagOrId xAmount yAmount\fR
.
@@ -767,6 +779,7 @@ space by adding \fIxAmount\fR to the x-coordinate of each point
associated with the item and \fIyAmount\fR to the y-coordinate of
each point associated with the item.
This command returns an empty string.
+.\" METHOD: moveto
.TP
\fIpathName \fBmoveto \fItagOrId xPos yPos\fR
.
@@ -779,6 +792,7 @@ the empty string, in which case the corresponding coordinate
will be unchanged. All items matching
\fItagOrId\fR remain in the same positions relative to each other.
This command returns an empty string.
+.\" METHOD: postscript
.TP
\fIpathName \fBpostscript \fR?\fIoption value option value ...\fR?
.
@@ -805,6 +819,7 @@ The \fIoption\fR\-\fIvalue\fR argument pairs provide additional
information to control the generation of Postscript. The following
options are supported:
.RS
+.\" OPTION: -channel
.TP
\fB\-channel \fIchannelName\fR
.
@@ -812,6 +827,7 @@ Specifies the name of the channel to which to write the Postscript.
If this option and the \fB\-file\fR option are
not specified then the Postscript is returned as the
result of the command.
+.\" OPTION: -colormap
.TP
\fB\-colormap \fIvarName\fR
.
@@ -825,9 +841,13 @@ to see if there is an element of \fIvarName\fR with the same
name as the color.
If so, Tk uses the value of the element as the Postscript command
to set the color.
+.RS
+.PP
If this option has not been specified, or if there is no entry
in \fIvarName\fR for a given color, then Tk uses the red, green,
and blue intensities from the X color.
+.RE
+.\" OPTION: -colormode
.TP
\fB\-colormode \fImode\fR
.
@@ -835,6 +855,7 @@ Specifies how to output color information. \fIMode\fR must be either
\fBcolor\fR (for full color output), \fBgray\fR (convert all colors
to their gray-scale equivalents) or \fBmono\fR (convert all colors
to black or white).
+.\" OPTION: -file
.TP
\fB\-file \fIfileName\fR
.
@@ -842,6 +863,7 @@ Specifies the name of the file in which to write the Postscript.
If this option and the \fB\-channel\fR option are
not specified then the Postscript is returned as the
result of the command.
+.\" OPTION: -fontmap
.TP
\fB\-fontmap \fIvarName\fR
.
@@ -858,23 +880,32 @@ Otherwise Tk attempts to guess what Postscript font to use.
Tk's guesses generally only work for well-known fonts such as
Times and Helvetica and Courier, and only if the X font name does not
omit any dashes up through the point size.
+.RS
+.PP
For example, \fB\-*\-Courier\-Bold\-R\-Normal\-\-*\-120\-*\fR will work but
\fB*Courier\-Bold\-R\-Normal*120*\fR will not; Tk needs the dashes to
parse the font name).
+.RE
+.\" OPTION: -height
.TP
\fB\-height \fIsize\fR
.
Specifies the height of the area of the canvas to print.
Defaults to the height of the canvas window.
+.\" OPTION: -pageanchor
.TP
\fB\-pageanchor \fIanchor\fR
.
Specifies which point of the printed area of the canvas should appear over
the positioning point on the page (which is given by the \fB\-pagex\fR
and \fB\-pagey\fR options).
+.RS
+.PP
For example, \fB\-pageanchor n\fR means that the top center of the
area of the canvas being printed (as it appears in the canvas window)
should be over the positioning point. Defaults to \fBcenter\fR.
+.RE
+.\" OPTION: -pageheight
.TP
\fB\-pageheight \fIsize\fR
.
@@ -887,6 +918,7 @@ Defaults to the height of the printed area on the screen.
If both \fB\-pageheight\fR and \fB\-pagewidth\fR are specified then
the scale factor from \fB\-pagewidth\fR is used (non-uniform scaling
is not implemented).
+.\" OPTION: -pagewidth
.TP
\fB\-pagewidth \fIsize\fR
.
@@ -897,6 +929,7 @@ Defaults to the width of the printed area on the screen.
If both \fB\-pageheight\fR and \fB\-pagewidth\fR are specified then
the scale factor from \fB\-pagewidth\fR is used (non-uniform scaling
is not implemented).
+.\" OPTION: -pagex
.TP
\fB\-pagex \fIposition\fR
.
@@ -905,6 +938,7 @@ the Postscript page, using any of the forms allowed for \fB\-pageheight\fR.
Used in conjunction with the \fB\-pagey\fR and \fB\-pageanchor\fR options
to determine where the printed area appears on the Postscript page.
Defaults to the center of the page.
+.\" OPTION: -pagey
.TP
\fB\-pagey \fIposition\fR
.
@@ -913,6 +947,7 @@ the Postscript page, using any of the forms allowed for \fB\-pageheight\fR.
Used in conjunction with the \fB\-pagex\fR and \fB\-pageanchor\fR options
to determine where the printed area appears on the Postscript page.
Defaults to the center of the page.
+.\" OPTION: -rotate
.TP
\fB\-rotate \fIboolean\fR
.
@@ -924,11 +959,13 @@ the short dimension of the page
in rotated output the x-axis runs along the long dimension of the page
.PQ landscape " orientation" .
Defaults to non-rotated.
+.\" OPTION: -width
.TP
\fB\-width \fIsize\fR
.
Specifies the width of the area of the canvas to print.
Defaults to the width of the canvas window.
+.\" OPTION: -x
.TP
\fB\-x \fIposition\fR
.
@@ -936,6 +973,7 @@ Specifies the x-coordinate of the left edge of the area of the
canvas that is to be printed, in canvas coordinates, not window
coordinates.
Defaults to the coordinate of the left edge of the window.
+.\" OPTION: -y
.TP
\fB\-y \fIposition\fR
.
@@ -944,6 +982,7 @@ canvas that is to be printed, in canvas coordinates, not window
coordinates.
Defaults to the coordinate of the top edge of the window.
.RE
+.\" METHOD: raise
.TP
\fIpathName \fBraise \fItagOrId \fR?\fIaboveThis\fR?
.
@@ -957,11 +996,12 @@ as the destination location for the moved items.
This command returns an empty string.
.RS
.PP
-Note: this command has no effect on window items. Window items always
+Note this this command has no effect on window items. Window items always
obscure other item types, and the stacking order of window items is
determined by the \fBraise\fR command and \fBlower\fR command, not the
\fBraise\fR widget command and \fBlower\fR widget command for canvases.
.RE
+.\" METHOD: rchars
.TP
\fIpathName \fBrchars \fItagOrId first last string\fR
.
@@ -973,6 +1013,7 @@ set of items, text items support this operation by altering their text as
directed, and line and polygon items support this operation by altering their
coordinate list (in which case \fIstring\fR should be a list of coordinates to
use as a replacement). The other items ignore this operation.
+.\" METHOD: rotate
.TP
\fIpathName \fBrotate \fItagOrId xOrigin yOrigin angle\fR
.VS "8.7, TIP164"
@@ -994,6 +1035,7 @@ Some items (currently \fBarc\fR and\fB text\fR) have angles in their options;
this command \fIdoes not\fR affect those options.
.RE
.VE "8.7, TIP164"
+.\" METHOD: scale
.TP
\fIpathName \fBscale \fItagOrId xOrigin yOrigin xScale yScale\fR
.
@@ -1015,8 +1057,9 @@ Note that some items have only a single pair of coordinates (e.g., text,
images and windows) and so scaling of them by this command can only move them
around.
.RE
+.\" METHOD: scan
.TP
-\fIpathName \fBscan\fR \fIoption args\fR
+\fIpathName \fBscan\fI option args\fR
.
This command is used to implement scanning on canvases. It has
two forms, depending on \fIoption\fR:
@@ -1042,6 +1085,7 @@ with mouse motion events in the widget, to produce the effect of
dragging the canvas at high speed through its window. The return
value is an empty string.
.RE
+.\" METHOD: select
.TP
\fIpathName \fBselect \fIoption\fR ?\fItagOrId arg\fR?
.
@@ -1108,6 +1152,7 @@ If the selection anchor point for the widget is not currently in
by \fIindex\fR.
Returns an empty string.
.RE
+.\" METHOD: type
.TP
\fIpathName \fBtype\fI tagOrId\fR
.
@@ -1117,6 +1162,7 @@ If \fItagOrId\fR refers to more than one item, then the type
of the first item in the display list is returned.
If \fItagOrId\fR does not refer to any items at all then
an empty string is returned.
+.\" METHOD: xview
.TP
\fIpathName \fBxview \fR?\fIargs\fR?
.
@@ -1160,6 +1206,7 @@ If \fIwhat\fR is \fBunits\fR, the view adjusts left or right in units
of the \fBxScrollIncrement\fR option, if it is greater than zero,
or in units of one-tenth the window's width otherwise.
.RE
+.\" METHOD: yview
.TP
\fIpathName \fByview ?\fIargs\fR?
.
@@ -1220,6 +1267,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.
+.\" OPTION: -anchor
.TP
\fB\-anchor \fIanchorPos\fR
.
@@ -1230,18 +1278,22 @@ is \fBcenter\fR then the item is centered on the point; if
\fIanchorPos\fR is \fBn\fR then the item will be drawn so that
its top center point is at the positioning point.
This option defaults to \fBcenter\fR.
+.\" OPTION: -dash
.TP
\fB\-dash \fIpattern\fR
+.\" OPTION: -activedash
.TP
\fB\-activedash \fIpattern\fR
+.\" OPTION: -disableddash
.TP
\fB\-disableddash \fIpattern\fR
.
-This option specifies dash patterns for the normal, active
+These options specify dash patterns for the normal, active
state, and disabled state of an item.
\fIpattern\fR may have any of the forms accepted by \fBTk_GetDash\fR.
If the dash options are omitted then the default is a solid outline.
See \fBDASH PATTERNS\fR for more information.
+.\" OPTION: -dashoffset
.TP
\fB\-dashoffset \fIoffset\fR
.
@@ -1249,14 +1301,17 @@ The starting \fIoffset\fR in pixels into the pattern provided by the
\fB\-dash\fR option. \fB\-dashoffset\fR is ignored if there is no
\fB\-dash\fR pattern. The \fIoffset\fR may have any of the forms described
in the \fBCOORDINATES\fR section above.
+.\" OPTION: -fill
.TP
\fB\-fill \fIcolor\fR
+.\" OPTION: -activefill
.TP
\fB\-activefill \fIcolor\fR
+.\" OPTION: -disabledfill
.TP
\fB\-disabledfill \fIcolor\fR
.
-Specifies the color to be used to fill item's area.
+These options specify the color to be used to fill item's area.
in its normal, active, and disabled states.
The even-odd fill rule is used.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
@@ -1264,18 +1319,22 @@ For the line item, it specifies the color of the line drawn.
For the text item, it specifies the foreground color of the text.
If \fIcolor\fR is an empty string (the default for all canvas items
except line and text), then the item will not be filled.
+.\" OPTION: -outline
.TP
\fB\-outline \fIcolor\fR
+.\" OPTION: -activeoutline
.TP
\fB\-activeoutline \fIcolor\fR
+.\" OPTION: -disabledoutline
.TP
\fB\-disabledoutline \fIcolor\fR
.
-This option specifies the color that should be used to draw the
+These options specify the color that should be used to draw the
outline of the item in its normal, active and disabled states.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
If \fIcolor\fR is specified as an empty string then no outline is drawn
for the item.
+.\" OPTION: -offset
.TP
\fB\-offset \fIoffset\fR
.
@@ -1290,14 +1349,17 @@ used for stippling as well. For the line and polygon canvas items you can
also specify an index as argument, which connects the stipple origin to one
of the coordinate points of the line/polygon. Note that stipple offsets are
\fIonly supported on X11\fR; they are silently ignored on other platforms.
+.\" OPTION: -outlinestipple
.TP
\fB\-outlinestipple \fIbitmap\fR
+.\" OPTION: -activeoutlinestipple
.TP
\fB\-activeoutlinestipple \fIbitmap\fR
+.\" OPTION: -disabledoutlinestipple
.TP
\fB\-disabledoutlinestipple \fIbitmap\fR
.
-This option specifies stipple patterns that should be used to draw the
+These options specify stipple patterns that should be used to draw the
outline of the item in its normal, active and disabled states.
Indicates that the outline for the item should be drawn with a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
@@ -1308,20 +1370,24 @@ If \fIbitmap\fR is an empty string (the default), then the outline is drawn
in a solid fashion.
\fINote that stipples are not well supported on platforms that do not
use X11 as their drawing API.\fR
+.\" OPTION: -outlineoffset
.TP
\fB\-outlineoffset \fIoffset\fR
.
Specifies the offset of the stipple pattern used for outlines, in the same way
that the \fB\-outline\fR option controls fill stipples. (See the
\fB\-outline\fR option for a description of the syntax of \fIoffset\fR.)
+.\" OPTION: -stipple
.TP
\fB\-stipple \fIbitmap\fR
+.\" OPTION: -activestipple
.TP
\fB\-activestipple \fIbitmap\fR
+.\" OPTION: -disabledstipple
.TP
\fB\-disabledstipple \fIbitmap\fR
.
-This option specifies stipple patterns that should be used to fill
+These options specify stipple patterns that should be used to fill
the item in its normal, active and disabled states.
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
@@ -1332,26 +1398,31 @@ in a solid fashion.
For the text item, it affects the actual text.
\fINote that stipples are not well supported on platforms that do not
use X11 as their drawing API.\fR
+.\" OPTION: -state
.TP
\fB\-state \fIstate\fR
.
This allows an item to override the canvas widget's global \fIstate\fR
option. It takes the same values:
\fInormal\fR, \fIdisabled\fR or \fIhidden\fR.
+.\" OPTION: -tags
.TP
\fB\-tags \fItagList\fR
.
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item. \fITagList\fR may be an empty list.
+.\" OPTION: -width
.TP
\fB\-width \fIoutlineWidth\fR
+.\" OPTION: -activewidth
.TP
\fB\-activewidth \fIoutlineWidth\fR
+.\" OPTION: -disabledwidth
.TP
\fB\-disabledwidth \fIoutlineWidth\fR
.
-Specifies the width of the outline to be drawn around
+These options specify the width of the outline to be drawn around
the item's region, in its normal, active and disabled states.
\fIoutlineWidth\fR may be in any of the forms described in the
\fBCOORDINATES\fR section above.
@@ -1364,8 +1435,9 @@ arc's region.
.PP
Items of type \fBarc\fR appear on the display as arc-shaped regions.
An arc is a section of an oval delimited by two angles (specified
-by either the \fB\-start\fR and \fB\-extent\fR options or the \fB\-height\fR option)
-and displayed in one of several ways (specified by the \fB\-style\fR option).
+by either the \fB\-start\fR and \fB\-extent\fR options or the \fB\-height\fR
+option) and displayed in one of several ways (specified by the \fB\-style\fR
+option).
Arcs are created with widget commands of the following form:
.CS
\fIpathName \fBcreate arc \fIx1 y1 x2 y2 \fR?\fIoption value ...\fR?
@@ -1401,26 +1473,32 @@ The following standard options are supported by arcs:
\fB\-disabledwidth\fR
.DE
The following extra options are supported for arcs:
+.\" OPTION: -extent
.TP
\fB\-extent \fIdegrees\fR
+.
Specifies the size of the angular range occupied by the arc.
The arc's range extends for \fIdegrees\fR degrees counter-clockwise
from the starting angle given by the \fB\-start\fR option.
\fIDegrees\fR may be negative.
If it is greater than 360 or less than \-360, then \fIdegrees\fR
modulo 360 is used as the extent.
+.\" OPTION: -start
.TP
\fB\-start \fIdegrees\fR
+.
Specifies the beginning of the angular range occupied by the
arc.
\fIDegrees\fR is given in units of degrees measured counter-clockwise
from the 3-o'clock position; it may be either positive or negative.
+.\" OPTION: -height
.TP
\fB\-height \fIdistance\fR
+.
Provides a shortcut for creating a circular arc segment by defining the
distance of the mid-point of the arc from its chord. When this option
is used the coordinates are interpreted as the start and end coordinates
-of the chord, and the options \fB\-start\fR and \fB-extent\fR are ignored.
+of the chord, and the options \fB\-start\fR and \fB\-extent\fR are ignored.
The value of \fIdistance\fR has the following meaning:
.RS
.PP
@@ -1443,8 +1521,10 @@ choosing the minus sign for the minor arc and the plus sign for the major arc.
Note that \fBitemcget \-height\fR always returns 0 so that introspection code
can be kept simple.
.RE
+.\" OPTION: -style
.TP
\fB\-style \fItype\fR
+.
Specifies how to draw the arc. If \fItype\fR is \fBpieslice\fR
(the default) then the arc's region is defined by a section
of the oval's perimeter plus two line segments, one between the center
@@ -1482,12 +1562,16 @@ The following standard options are supported by bitmaps:
\fB\-tags\fR
.DE
The following extra options are supported for bitmaps:
+.\" OPTION: -background
.TP
\fB\-background \fIcolor\fR
+.\" OPTION: -activebackground
.TP
\fB\-activebackground \fIcolor\fR
+.\" OPTION: -disabledbackground
.TP
\fB\-disabledbackground \fIcolor\fR
+.
Specifies the color to use for each of the bitmap's
.QW 0
valued pixels in its normal, active and disabled states.
@@ -1495,22 +1579,30 @@ valued pixels in its normal, active and disabled states.
If this option is not specified, or if it is specified as an empty
string, then nothing is displayed where the bitmap pixels are 0; this
produces a transparent effect.
+.\" OPTION: -bitmap
.TP
\fB\-bitmap \fIbitmap\fR
+.\" OPTION: -activebitmap
.TP
\fB\-activebitmap \fIbitmap\fR
+.\" OPTION: -disabledbitmap
.TP
\fB\-disabledbitmap \fIbitmap\fR
-Specifies the bitmaps to display in the item in its normal, active and
-disabled states.
+.
+These options specify the bitmaps to display in the item in its normal,
+active and disabled states.
\fIBitmap\fR may have any of the forms accepted by \fBTk_GetBitmap\fR.
+.\" OPTION: -foreground
.TP
\fB\-foreground \fIcolor\fR
+.\" OPTION: -activeforeground
.TP
\fB\-activeforeground \fIcolor\fR
+.\" OPTION: -disabledforeground
.TP
\fB\-disabledforeground \fIcolor\fR
-Specifies the color to use for each of the bitmap's
+.
+These options specify the color to use for each of the bitmap's
.QW 1
valued pixels in its normal, active and disabled states.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
@@ -1540,12 +1632,16 @@ The following standard options are supported by images:
\fB\-tags\fR
.DE
The following extra options are supported for images:
+.\" OPTION: -image
.TP
\fB\-image \fIname\fR
+.\" OPTION: -activeimage
.TP
\fB\-activeimage \fIname\fR
+.\" OPTION: -disabledimage
.TP
\fB\-disabledimage \fIname\fR
+.
Specifies the name of the images to display in the item in is normal,
active and disabled states.
This image must have been created previously with the
@@ -1585,8 +1681,10 @@ The following standard options are supported by lines:
\fB\-disabledwidth\fR
.DE
The following extra options are supported for lines:
+.\" OPTION: -arrow
.TP
\fB\-arrow \fIwhere\fR
+.
Indicates whether or not arrowheads are to be drawn at one or both
ends of the line.
\fIWhere\fR must have one of the values \fBnone\fR (for no arrowheads),
@@ -1600,8 +1698,10 @@ rather than at its tip so that the line doesn't extend past the edge of the
arrowhead. This may trigger a \fBLeave\fR event if the mouse is hovering this
line end. Conversely, when removing an arrowhead Tk adjusts the corresponding
line point the other way round, which may trigger an \fBEnter\fR event.
+.\" OPTION: -arrowshape
.TP
\fB\-arrowshape \fIshape\fR
+.
This option indicates how to draw arrowheads.
The \fIshape\fR argument must be a list with three elements, each
specifying a distance in any of the forms described in
@@ -1615,16 +1715,20 @@ trailing points.
If this option is not specified then Tk picks a
.QW reasonable
shape.
+.\" OPTION: -capstyle
.TP
\fB\-capstyle \fIstyle\fR
+.
Specifies the ways in which caps are to be drawn at the endpoints
of the line.
\fIStyle\fR may have any of the forms accepted by \fBTk_GetCapStyle\fR
(\fBbutt\fR, \fBprojecting\fR, or \fBround\fR).
If this option is not specified then it defaults to \fBbutt\fR.
Where arrowheads are drawn the cap style is ignored.
+.\" OPTION: -joinstyle
.TP
\fB\-joinstyle \fIstyle\fR
+.
Specifies the ways in which joints are to be drawn at the vertices
of the line.
\fIStyle\fR may have any of the forms accepted by \fBTk_GetJoinStyle\fR
@@ -1632,12 +1736,15 @@ of the line.
If this option is not specified then it defaults to \fBround\fR.
If the line only contains two points then this option is
irrelevant.
+.\" OPTION: -smooth
.TP
\fB\-smooth \fIsmoothMethod\fR
+.
\fIsmoothMethod\fR must have one of the forms accepted by
\fBTcl_GetBoolean\fR or a line smoothing method.
Only \fBtrue\fR and \fBraw\fR are
-supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime. If a boolean
+supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR),
+but more can be added at runtime. If a boolean
false value or empty string is given, no smoothing is applied. A boolean
truth value assumes \fBtrue\fR smoothing.
If the smoothing method is \fBtrue\fR, this indicates that the line
@@ -1654,8 +1761,10 @@ line segments can be generated within a curve by making control points
equal to their neighbouring knot points. If the last point is a
control point and not a knot point, the point is repeated (one or two
times) so that it also becomes a knot point.
+.\" OPTION: -splinesteps
.TP
\fB\-splinesteps \fInumber\fR
+.
Specifies the degree of smoothness desired for curves: each spline
will be approximated with \fInumber\fR line segments. This
option is ignored unless the \fB\-smooth\fR option is true or \fBraw\fR.
@@ -1712,8 +1821,8 @@ Polygons are created with widget commands of the following form:
\fIpathName \fBcreate polygon \fIx1 y1 ... xn yn \fR?\fIoption value ...\fR?
\fIpathName \fBcreate polygon \fIcoordList\fR ?\fIoption value ...\fR?
.CE
-The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR specify the coordinates for
-three or more points that define a polygon.
+The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR specify the
+coordinates for three or more points that define a polygon.
The first point should not be repeated as the last to
close the shape; Tk will automatically close the periphery between
the first and last points.
@@ -1742,18 +1851,23 @@ The following standard options are supported by polygons:
\fB\-disabledwidth\fR
.DE
The following extra options are supported for polygons:
+.\" OPTION: -joinstyle
.TP
\fB\-joinstyle \fIstyle\fR
+.
Specifies the ways in which joints are to be drawn at the vertices
of the outline.
\fIStyle\fR may have any of the forms accepted by \fBTk_GetJoinStyle\fR
(\fBbevel\fR, \fBmiter\fR, or \fBround\fR).
If this option is not specified then it defaults to \fBround\fR.
+.\" OPTION: -smooth
.TP
\fB\-smooth \fIboolean\fR
+.
\fIBoolean\fR must have one of the forms accepted by \fBTcl_GetBoolean\fR
or a line smoothing method. Only \fBtrue\fR and \fBraw\fR are
-supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime. If a boolean
+supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR),
+but more can be added at runtime. If a boolean
false value or empty string is given, no smoothing is applied. A boolean
truth value assumes \fBtrue\fR smoothing.
If the smoothing method is \fBtrue\fR, this indicates that the polygon
@@ -1771,8 +1885,10 @@ equal to their neighbouring knot points. If the last point is not the
second point of a pair of control points, the point is repeated (one or two
times) so that it also becomes the second point of a pair of control
points (the associated knot point will be the first control point).
+.\" OPTION: -splinesteps
.TP
\fB\-splinesteps \fInumber\fR
+.
Specifies the degree of smoothness desired for curves: each spline
will be approximated with \fInumber\fR line segments. This
option is ignored unless the \fB\-smooth\fR option is true or \fBraw\fR.
@@ -1863,6 +1979,7 @@ The following standard options are supported by text items:
\fB\-tags\fR
.DE
The following extra options are supported for text items:
+.\" OPTION: -angle
.TP
\fB\-angle \fIrotationDegrees\fR
.
@@ -1871,36 +1988,46 @@ about the positioning point for the text; it may have any floating-point value
from 0.0 to 360.0. For example, if \fIrotationDegrees\fR is \fB90\fR, then the
text will be drawn vertically from bottom to top.
This option defaults to \fB0.0\fR.
+.\" OPTION: -font
.TP
\fB\-font \fIfontName\fR
+.
Specifies the font to use for the text item.
\fIFontName\fR may be any string acceptable to \fBTk_GetFont\fR.
If this option is not specified, it defaults to a system-dependent
font.
+.\" OPTION: -justify
.TP
\fB\-justify \fIhow\fR
+.
Specifies how to justify the text within its bounding region.
\fIHow\fR must be one of the values \fBleft\fR, \fBright\fR,
or \fBcenter\fR.
This option will only matter if the text is displayed as multiple
lines.
If the option is omitted, it defaults to \fBleft\fR.
+.\" OPTION: -text
.TP
\fB\-text \fIstring\fR
+.
\fIString\fR specifies the characters to be displayed in the text item.
Newline characters cause line breaks.
The characters in the item may also be changed with the
\fBinsert\fR and \fBdelete\fR widget commands.
This option defaults to an empty string.
+.\" OPTION: -underline
.TP
-\fB\-underline \fI\fR
+\fB\-underline \fInumber\fR
+.
Specifies the integer index of a character within the text to be
underlined. 0 corresponds to the first character of the text
displayed, 1 to the next character, and so on. \-1 means that no
underline should be drawn (if the whole text item is to be underlined,
the appropriate font should be used instead).
+.\" OPTION: -width
.TP
\fB\-width \fIlineLength\fR
+.
Specifies a maximum line length for the text, in any of the forms
described in the \fBCOORDINATES\fR section above.
If this option is zero (the default) the text is broken into
@@ -1939,6 +2066,7 @@ The following standard options are supported by window items:
\fB\-tags\fR
.DE
The following extra options are supported for window items:
+.\" OPTION: -height
.TP
\fB\-height \fIpixels\fR
.
@@ -1947,6 +2075,7 @@ Specifies the height to assign to the item's window.
forms described in the \fBCOORDINATES\fR section above.
If this option is not specified, or if it is specified as zero,
then the window is given whatever height it requests internally.
+.\" OPTION: -width
.TP
\fB\-width \fIpixels\fR
.
@@ -1955,6 +2084,7 @@ Specifies the width to assign to the item's window.
forms described in the \fBCOORDINATES\fR section above.
If this option is not specified, or if it is specified as zero,
then the window is given whatever width it requests internally.
+.\" OPTION: -window
.TP
\fB\-window \fIpathName\fR
.
@@ -1963,7 +2093,7 @@ The window specified by \fIpathName\fR must either be a child of
the canvas widget or a child of some ancestor of the canvas widget.
\fIPathName\fR may not refer to a top-level window.
.PP
-Note: due to restrictions in the ways that windows are managed, it is not
+Note that, due to restrictions in the ways that windows are managed, it is not
possible to draw other graphical items (such as lines and images) on top
of window items. A window item always obscures any graphics that
overlap it, regardless of their order in the display list. Also note that
diff --git a/doc/checkbutton.n b/doc/checkbutton.n
index 411045f..ccfe691 100644
--- a/doc/checkbutton.n
+++ b/doc/checkbutton.n
@@ -197,14 +197,18 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for checkbutton widgets:
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
+.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBcheckbutton\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
@@ -217,33 +221,43 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBcheckbutton\fR
command.
+.\" METHOD: deselect
.TP
\fIpathName \fBdeselect\fR
+.
Deselects the checkbutton and sets the associated variable to its
.QW off
value.
+.\" METHOD: flash
.TP
\fIpathName \fBflash\fR
+.
Flashes the checkbutton. This is accomplished by redisplaying the checkbutton
several times, alternating between active and normal colors. At
the end of the flash the checkbutton is left in the same normal/active
state as when the command was invoked.
This command is ignored if the checkbutton's state is \fBdisabled\fR.
+.\" METHOD: invoke
.TP
\fIpathName \fBinvoke\fR
+.
Does just what would have happened if the user invoked the checkbutton
with the mouse: toggle the selection state of the button and invoke
the Tcl command associated with the checkbutton, if there is one.
The return value is the return value from the Tcl command, or an
empty string if there is no command associated with the checkbutton.
This command is ignored if the checkbutton's state is \fBdisabled\fR.
+.\" METHOD: select
.TP
\fIpathName \fBselect\fR
+.
Selects the checkbutton and sets the associated variable to its
.QW on
value.
+.\" METHOD: toggle
.TP
\fIpathName \fBtoggle\fR
+.
Toggles the selection state of the button, redisplaying it and
modifying its associated variable to reflect the new state.
.SH BINDINGS
@@ -277,11 +291,11 @@ individual widgets or by redefining the class bindings.
This example shows a group of uncoupled checkbuttons.
.PP
.CS
-labelframe .lbl \-text "Steps:"
-\fBcheckbutton\fR .c1 \-text Lights \-variable lights
-\fBcheckbutton\fR .c2 \-text Cameras \-variable cameras
-\fBcheckbutton\fR .c3 \-text Action! \-variable action
-pack .c1 .c2 .c3 \-in .lbl
+labelframe .lbl -text "Steps:"
+\fBcheckbutton\fR .c1 -text Lights -variable lights
+\fBcheckbutton\fR .c2 -text Cameras -variable cameras
+\fBcheckbutton\fR .c3 -text Action! -variable action
+pack .c1 .c2 .c3 -in .lbl
pack .lbl
.CE
.SH "SEE ALSO"
diff --git a/doc/chooseColor.n b/doc/chooseColor.n
index 3fa6de3..b485b77 100644
--- a/doc/chooseColor.n
+++ b/doc/chooseColor.n
@@ -18,17 +18,23 @@ tk_chooseColor \- pops up a dialog box for the user to select a color.
The procedure \fBtk_chooseColor\fR pops up a dialog box for the
user to select a color. The following \fIoption\-value\fR pairs are
possible as command line arguments:
+.\" OPTION: -initialcolor
.TP
-\fB\-initialcolor\fR \fIcolor\fR
+\fB\-initialcolor\fI color\fR
+.
Specifies the color to display in the color dialog when it pops
up. \fIcolor\fR must be in a form acceptable to the \fBTk_GetColor\fR
function.
+.\" OPTION: -parent
.TP
-\fB\-parent\fR \fIwindow\fR
+\fB\-parent\fI window\fR
+.
Makes \fIwindow\fR the logical parent of the color dialog. The color
dialog is displayed on top of its parent window.
+.\" OPTION: -title
.TP
-\fB\-title\fR \fItitleString\fR
+\fB\-title\fI titleString\fR
+.
Specifies a string to display as the title of the dialog box. If this
option is not specified, then a default title will be displayed.
.LP
@@ -39,7 +45,7 @@ string.
.SH EXAMPLE
.PP
.CS
-button .b \-bg [tk_chooseColor \-initialcolor gray \-title "Choose color"]
+button .b -bg [tk_chooseColor -initialcolor gray -title "Choose color"]
.CE
.SH KEYWORDS
color, color selection, dialog
diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n
index a5b30f5..44e9530 100644
--- a/doc/chooseDirectory.n
+++ b/doc/chooseDirectory.n
@@ -16,15 +16,19 @@ tk_chooseDirectory \- pops up a dialog box for the user to select a directory.
The procedure \fBtk_chooseDirectory\fR pops up a dialog box for the
user to select a directory. The following \fIoption\-value\fR pairs are
possible as command line arguments:
+.\" OPTION: -command
.TP
-\fB\-command\fR \fIstring\fR
+\fB\-command\fI string\fR
+.
Specifies the prefix of a Tcl command to invoke when the user closes the
dialog after having selected an item. This callback is not called if the
user cancelled the dialog. The actual command consists of \fIstring\fR
followed by a space and the value selected by the user in the dialog. This
is only available on Mac OS X.
+.\" OPTION: -initialdir
.TP
-\fB\-initialdir\fR \fIdirname\fR
+\fB\-initialdir\fI dirname\fR
+.
Specifies that the directories in \fIdirectory\fR should be displayed
when the dialog pops up. If this parameter is not specified,
the initial directory defaults to the current working directory
@@ -33,33 +37,41 @@ On Vista and later systems, the initial directory defaults to the last
user-selected directory for the application. If the
parameter specifies a relative path, the return value will convert the
relative path to an absolute path.
+.\" OPTION: -message
.TP
-\fB\-message\fR \fIstring\fR
+\fB\-message\fI string\fR
+.
Specifies a message to include in the client area of the dialog.
This is only available on Mac OS X.
+.\" OPTION: -mustexist
.TP
-\fB\-mustexist\fR \fIboolean\fR
+\fB\-mustexist\fI boolean\fR
+.
Specifies whether the user may specify non-existent directories. If
this parameter is true, then the user may only select directories that
already exist. The default value is \fIfalse\fR.
+.\" OPTION: -parent
.TP
-\fB\-parent\fR \fIwindow\fR
+\fB\-parent\fI window\fR
+.
Makes \fIwindow\fR the logical parent of the dialog. The dialog
is displayed on top of its parent window. On Mac OS X, this
turns the file dialog into a sheet attached to the parent window.
+.\" OPTION: -title
.TP
-\fB\-title\fR \fItitleString\fR
+\fB\-title\fI titleString\fR
+.
Specifies a string to display as the title of the dialog box. If this
option is not specified, then a default title will be displayed.
.SH EXAMPLE
.PP
.CS
set dir [\fBtk_chooseDirectory\fR \e
- \-initialdir ~ \-title "Choose a directory"]
+ -initialdir ~ -title "Choose a directory"]
if {$dir eq ""} {
- label .l \-text "No directory selected"
+ label .l -text "No directory selected"
} else {
- label .l \-text "Selected $dir"
+ label .l -text "Selected $dir"
}
.CE
.SH "SEE ALSO"
diff --git a/doc/clipboard.n b/doc/clipboard.n
index ee964df..587ab34 100644
--- a/doc/clipboard.n
+++ b/doc/clipboard.n
@@ -27,8 +27,9 @@ appends should be completed before returning to the event loop.
The first argument to \fBclipboard\fR determines the format of the
rest of the arguments and the behavior of the command. The following
forms are currently supported:
+.\" METHOD: append
.TP
-\fBclipboard append\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-format\fR \fIformat\fR? ?\fB\-type\fR \fItype\fR? ?\fB\-\|\-\fR? \fIdata\fR
+\fBclipboard append\fR ?\fB\-displayof\fI window\fR? ?\fB\-format\fI format\fR? ?\fB\-type\fI type\fR? ?\fB\-\|\-\fR? \fIdata\fR
.
Appends \fIdata\fR to the clipboard on \fIwindow\fR's
display in the form given by \fItype\fR with the representation given
@@ -71,15 +72,17 @@ next argument will always be used as \fIdata\fR.
This feature may be convenient if, for example, \fIdata\fR starts
with a \fB\-\fR.
.RE
+.\" METHOD: clear
.TP
-\fBclipboard clear\fR ?\fB\-displayof\fR \fIwindow\fR?
+\fBclipboard clear\fR ?\fB\-displayof\fI window\fR?
.
Claims ownership of the clipboard on \fIwindow\fR's display and removes
any previous contents. \fIWindow\fR defaults to
.QW . .
Returns an empty string.
+.\" METHOD: get
.TP
-\fBclipboard get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-type\fR \fItype\fR?
+\fBclipboard get\fR ?\fB\-displayof\fI window\fR? ?\fB\-type\fI type\fR?
.
Retrieve data from the clipboard on \fIwindow\fR's display.
\fIWindow\fR defaults to
@@ -122,7 +125,7 @@ proc getItemConfig {canvas tag} {
append script {$canvas create } [$canvas type $item]
append script { } [$canvas coords $item] { }
foreach config [$canvas itemconf $item] {
- lassign $config name \- \- \- value
+ lassign $config name - - - value
append script [list $name $value] { }
}
append script \en
@@ -133,10 +136,10 @@ proc getItemConfig {canvas tag} {
# Set up a binding on a canvas to cut and paste an item
set c [canvas .c]
pack $c
-$c create text 150 30 \-text "cut and paste me"
+$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 \e
[getItemConfig %W current]
# Delete because this is cut, not copy.
%W delete current
@@ -144,7 +147,7 @@ bind $c <<Cut>> {
bind $c <<Paste>> {
catch {
set canvas %W
- eval [\fBclipboard get \-type\fR TkCanvasItem]
+ eval [\fBclipboard get -type\fR TkCanvasItem]
}
}
.CE
diff --git a/doc/colors.n b/doc/colors.n
index 9c64b1d..09c2289 100644
--- a/doc/colors.n
+++ b/doc/colors.n
@@ -896,7 +896,7 @@ systemTextColor
.
The numbered systemWindowBackgroundColors below
are used in the \fBttk::notebook\fR and \fBttk::labelframe\fR widgets
-to provide a contrasting background. Each numbered color constrasts
+to provide a contrasting background. Each numbered color contrasts
with its predecessor.
.RS
.DS
@@ -911,7 +911,6 @@ systemWindowBackgroundColor7
.DE
.RE
.TP
-
\fBWindows\fR
.
On Windows, the following additional system colors are available
diff --git a/doc/console.n b/doc/console.n
index 0a9a794..9ca7475 100644
--- a/doc/console.n
+++ b/doc/console.n
@@ -11,7 +11,7 @@
.SH NAME
console \- Control the console on systems without a real console
.SH SYNOPSIS
-\fBconsole\fR \fIsubcommand\fR ?\fIarg ...\fR?
+\fBconsole\fI subcommand\fR ?\fIarg ...\fR?
.BE
.SH DESCRIPTION
.PP
@@ -23,30 +23,39 @@ the \fBconsole\fR command. The behaviour of the console window is
defined mainly through the contents of the \fIconsole.tcl\fR file in
the Tk library. Except for TkAqua, this command is not available when
Tk is loaded into a tclsh interpreter with
-.QW "\fBpackage require tk\fR" ,
+.QW "\fBpackage require Tk\fR" ,
as a conventional terminal is expected to be present in that case.
In TkAqua, this command is disabled when there is a startup script
and stdin is \fB/dev/null\fR (as is the case e.g. when a bundled application
embedding Tk is started by the macOS Launcher). To enable the command
in that case, define the environment variable \fBTK_CONSOLE\fR. This can be
done by modifying the Info.plist file by adding the LSEnvironment key
-to the main dict and setting its value to be a dict with the key \fBTK_CONSOLE\fR.
+to the main dict and setting its value to be a dict with the key
+\fBTK_CONSOLE\fR.
.PP
+.\" METHOD: eval
.TP
\fBconsole eval \fIscript\fR
+.
Evaluate the \fIscript\fR argument as a Tcl script in the console
interpreter. The normal interpreter is accessed through the
\fBconsoleinterp\fR command in the console interpreter.
+.\" METHOD: hide
.TP
\fBconsole hide\fR
+.
Hide the console window from view. Precisely equivalent to
withdrawing the \fB.\fR window in the console interpreter.
+.\" METHOD: show
.TP
\fBconsole show\fR
+.
Display the console window. Precisely equivalent to deiconifying the
\fB.\fR window in the console interpreter.
+.\" METHOD: title
.TP
\fBconsole title \fR?\fIstring\fR?
+.
Query or modify the title of the console window. If \fIstring\fR is
not specified, queries the title of the console window, and sets the
title of the console window to \fIstring\fR otherwise. Precisely
@@ -58,12 +67,16 @@ The \fBconsoleinterp\fR command in the console interpreter allows
scripts to be evaluated in the main interpreter. It supports two
subcommands: \fBeval\fR and \fBrecord\fR.
.PP
+.\" METHOD: eval
.TP
\fBconsoleinterp eval \fIscript\fR
+.
Evaluates \fIscript\fR as a Tcl script at the global level in the main
interpreter.
+.\" METHOD: record
.TP
\fBconsoleinterp record \fIscript\fR
+.
Records and evaluates \fIscript\fR as a Tcl script at the global level
in the main interpreter as if \fIscript\fR had been typed in at the
console.
diff --git a/doc/cursors.n b/doc/cursors.n
index bf8a05e..7a757f5 100644
--- a/doc/cursors.n
+++ b/doc/cursors.n
@@ -101,6 +101,7 @@ The \fBnone\fR cursor can be specified to eliminate the cursor.
.SH "PORTABILITY ISSUES"
.TP
\fBWindows\fR
+.
On Windows systems, the following cursors are mapped to native cursors:
.RS
.CS
@@ -131,6 +132,7 @@ wait
.RE
.TP
\fBMac OS X\fR
+.
On Mac OS X systems, the following cursors are mapped to native cursors:
.RS
.CS
diff --git a/doc/dialog.n b/doc/dialog.n
index e4938d2..f1f63ef 100644
--- a/doc/dialog.n
+++ b/doc/dialog.n
@@ -19,31 +19,25 @@ tk_dialog \- Create modal dialog and wait for response
This procedure is part of the Tk script library.
It is largely \fIdeprecated\fR by the \fBtk_messageBox\fR.
Its arguments describe a dialog box:
-.TP
-\fIwindow\fR
+.IP \fIwindow\fR
Name of top-level window to use for dialog. Any existing window
by this name is destroyed.
-.TP
-\fItitle\fR
+.IP \fItitle\fR
Text to appear in the window manager's title bar for the dialog.
-.TP
-\fItext\fR
+.IP \fItext\fR
Message to appear in the top portion of the dialog box.
-.TP
-\fIbitmap\fR
+.IP \fIbitmap\fR
If non-empty, specifies a bitmap (in a form suitable for Tk_GetBitmap)
to display in the top portion of
the dialog, to the left of the text.
If this is an empty string then no bitmap is displayed in the dialog.
-.TP
-\fIdefault\fR
+.IP \fIdefault\fR
If this is an integer greater than or equal to zero, then it gives
the index of the button that is to be the default button for the dialog
(0 for the leftmost button, and so on).
If less than zero or an empty string then there will not be any default
button.
-.TP
-\fIstring\fR
+.IP \fIstring\fR
There will be one button for each of these arguments.
Each \fIstring\fR specifies text to display in a button,
in order from left to right.
diff --git a/doc/entry.n b/doc/entry.n
index 80e8428..747e99c 100644
--- a/doc/entry.n
+++ b/doc/entry.n
@@ -13,7 +13,7 @@
.SH NAME
entry \- Create and manipulate 'entry' one-line text entry widgets
.SH SYNOPSIS
-\fBentry\fR \fIpathName \fR?\fIoptions\fR?
+\fBentry\fI pathName \fR?\fIoptions\fR?
.SO
\-background \-highlightthickness \-selectbackground
\-borderwidth \-insertbackground \-selectborderwidth
@@ -176,9 +176,9 @@ entry widget from within either the \fB\-validatecommand\fR or the
\fB\-invalidcommand\fR. Such editions will override the one that was being
validated. If you wish to edit the entry widget (for example set it to {})
during validation and still have the \fB\-validate\fR option set, you should
-include the command
+include the command:
.CS
-after idle {%W config \-validate %v}
+after idle {%W config -validate %v}
.CE
in the \fB\-validatecommand\fR or \fB\-invalidcommand\fR (whichever one you
were editing the entry widget from). It is also recommended to not set an
@@ -201,32 +201,39 @@ arguments. An index specifies a particular character in the entry's
string, in any of the following ways:
.TP 12
\fInumber\fR
+.
Specifies the character as a numerical index, where 0 corresponds
to the first character in the string.
.TP 12
\fBanchor\fR
+.
Indicates the anchor point for the selection, which is set with the
\fBselect from\fR and \fBselect adjust\fR widget commands.
.TP 12
\fBend\fR
+.
Indicates the character just after the last one in the entry's string.
This is equivalent to specifying a numerical index equal to the length
of the entry's string.
.TP 12
\fBinsert\fR
+.
Indicates the character adjacent to and immediately following the
insertion cursor.
.TP 12
\fBsel.first\fR
+.
Indicates the first character in the selection. It is an error to
use this form if the selection is not in the entry window.
.TP 12
\fBsel.last\fR
+.
Indicates the character just after the last one in the selection.
It is an error to use this form if the selection is not in the
entry window.
.TP 12
\fB@\fInumber\fR
+.
In this form, \fInumber\fR is treated as an x-coordinate in the
entry's window; the character spanning that x-coordinate is used.
For example,
@@ -245,8 +252,10 @@ arithmetic and indexing relative to \fBend\fR.
.SS SUBCOMMANDS
.PP
The following commands are possible for entry widgets:
+.\" METHOD: bbox
.TP
\fIpathName \fBbbox \fIindex\fR
+.
Returns a list of four numbers describing the bounding box of the
character given by \fIindex\fR.
The first two elements of the list give the x and y coordinates of
@@ -255,14 +264,18 @@ the upper-left corner of the screen area covered by the character
the width and height of the character, in pixels.
The bounding box may refer to a region outside the visible area
of the window.
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
+.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBentry\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
@@ -275,8 +288,10 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBentry\fR
command.
+.\" METHOD: delete
.TP
\fIpathName \fBdelete \fIfirst \fR?\fIlast\fR?
+.
Delete one or more elements of the entry.
\fIFirst\fR is the index of the first character to delete, and
\fIlast\fR is the index of the character just after the last
@@ -284,33 +299,45 @@ one to delete.
If \fIlast\fR is not specified it defaults to \fIfirst\fR+1,
i.e. a single character is deleted.
This command returns an empty string.
+.\" METHOD: get
.TP
\fIpathName \fBget\fR
+.
Returns the entry's string.
+.\" METHOD: icursor
.TP
\fIpathName \fBicursor \fIindex\fR
+.
Arrange for the insertion cursor to be displayed just before the character
given by \fIindex\fR. Returns an empty string.
+.\" METHOD: index
.TP
\fIpathName \fBindex\fI index\fR
+.
Returns the numerical index corresponding to \fIindex\fR.
+.\" METHOD: insert
.TP
\fIpathName \fBinsert \fIindex string\fR
+.
Insert the characters of \fIstring\fR just before the character
indicated by \fIindex\fR. Returns an empty string.
+.\" METHOD: scan
.TP
-\fIpathName \fBscan\fR \fIoption args\fR
+\fIpathName \fBscan\fI option args\fR
+.
This command is used to implement scanning on entries. It has
two forms, depending on \fIoption\fR:
.RS
.TP
\fIpathName \fBscan mark \fIx\fR
+.
Records \fIx\fR and the current view in the entry window; used in
conjunction with later \fBscan dragto\fR commands. Typically this
command is associated with a mouse button press in the widget. It
returns an empty string.
.TP
\fIpathName \fBscan dragto \fIx\fR
+.
This command computes the difference between its \fIx\fR argument
and the \fIx\fR argument to the last \fBscan mark\fR command for
the widget. It then adjusts the view left or right by 10 times the
@@ -319,13 +346,16 @@ with mouse motion events in the widget, to produce the effect of
dragging the entry at high speed through the window. The return
value is an empty string.
.RE
+.\" METHOD: selection
.TP
\fIpathName \fBselection \fIoption arg\fR
+.
This command is used to adjust the selection within an entry. It
has several forms, depending on \fIoption\fR:
.RS
.TP
\fIpathName \fBselection adjust \fIindex\fR
+.
Locate the end of the selection nearest to the character given by
\fIindex\fR, and adjust that end of the selection to be at \fIindex\fR
(i.e. including but not going beyond \fIindex\fR). The other
@@ -337,20 +367,24 @@ selection anchor point, inclusive.
Returns an empty string.
.TP
\fIpathName \fBselection clear\fR
+.
Clear the selection if it is currently in this widget. If the
selection is not in this widget then the command has no effect.
Returns an empty string.
.TP
\fIpathName \fBselection from \fIindex\fR
+.
Set the selection anchor point to just before the character
given by \fIindex\fR. Does not change the selection.
Returns an empty string.
.TP
\fIpathName \fBselection present\fR
+.
Returns 1 if there is are characters selected in the entry,
0 if nothing is selected.
.TP
-\fIpathName \fBselection range \fIstart\fR \fIend\fR
+\fIpathName \fBselection range \fIstart end\fR
+.
Sets the selection to include the characters starting with
the one indexed by \fIstart\fR and ending with the one just
before \fIend\fR.
@@ -358,6 +392,7 @@ If \fIend\fR refers to the same character as \fIstart\fR or an
earlier one, then the entry's selection is cleared.
.TP
\fIpathName \fBselection to \fIindex\fR
+.
If \fIindex\fR is before the anchor point, set the selection
to the characters from \fIindex\fR up to but not including
the anchor point.
@@ -371,20 +406,25 @@ If the selection is not in this widget then a new selection is
created using the most recent anchor point specified for the widget.
Returns an empty string.
.RE
+.\" METHOD: validate
.TP
\fIpathName \fBvalidate\fR
+.
This command is used to force an evaluation of the \fB\-validatecommand\fR
independent of the conditions specified by the \fB\-validate\fR option.
This is done by temporarily setting the \fB\-validate\fR option to \fBall\fR.
It returns 0 or 1.
+.\" METHOD: xview
.TP
\fIpathName \fBxview \fIargs\fR
+.
This command is used to query and change the horizontal position of the
text in the widget's window. It can take any of the following
forms:
.RS
.TP
\fIpathName \fBxview\fR
+.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the horizontal span that is visible in the window.
@@ -394,16 +434,19 @@ in the window, and 40% of the text is off-screen to the right.
These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
option.
.TP
-\fIpathName \fBxview\fR \fIindex\fR
+\fIpathName \fBxview\fI index\fR
+.
Adjusts the view in the window so that the character given by \fIindex\fR
is displayed at the left edge of the window.
.TP
\fIpathName \fBxview moveto\fI fraction\fR
+.
Adjusts the view in the window so that the character \fIfraction\fR of the
way through the text appears at the left edge of the window.
\fIFraction\fR must be a fraction between 0 and 1.
.TP
\fIpathName \fBxview scroll \fInumber what\fR
+.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer or a float, but if it is a float then
diff --git a/doc/event.n b/doc/event.n
index 9f5a4c6..760efcc 100644
--- a/doc/event.n
+++ b/doc/event.n
@@ -20,8 +20,10 @@ The \fBevent\fR command provides several facilities for dealing with
window system events, such as defining virtual events and synthesizing
events. The command has several different forms, determined by the
first argument. The following forms are currently supported:
+.\" METHOD: add
.TP
\fBevent add <<\fIvirtual\fB>>\fI sequence \fR?\fIsequence ...\fR?
+.
Associates the virtual event \fIvirtual\fR with the physical
event sequence(s) given by the \fIsequence\fR arguments, so that
the virtual event will trigger whenever any one of the \fIsequence\fRs
@@ -31,8 +33,10 @@ any of the values allowed for the \fIsequence\fR argument to the
\fBbind\fR command.
If \fIvirtual\fR is already defined, the new physical event sequences
add to the existing sequences for the event.
+.\" METHOD: delete
.TP
-\fBevent delete <<\fIvirtual\fB>> \fR?\fIsequence\fR \fIsequence ...\fR?
+\fBevent delete <<\fIvirtual\fB>> \fR?\fIsequence sequence ...\fR?
+.
Deletes each of the \fIsequence\fRs from those associated with
the virtual event given by \fIvirtual\fR.
\fIVirtual\fR may be any string value and \fIsequence\fR may have
@@ -43,8 +47,10 @@ are ignored.
If no \fIsequence\fR argument is provided, all physical event sequences
are removed for \fIvirtual\fR, so that the virtual event will not
trigger anymore.
+.\" METHOD: generate
.TP
\fBevent generate \fIwindow event \fR?\fIoption value option value ...\fR?
+.
Generates a window event and arranges for it to be processed just as if
it had come from the window system.
\fIWindow\fR gives the path name of the window for which the event
@@ -65,8 +71,10 @@ will complete before the \fBevent generate\fR command returns.
If the \fB\-when\fR option is specified then it determines when the
event is processed. Certain events, such as key events, require
that the window has focus to receive the event properly.
+.\" METHOD: info
.TP
\fBevent info \fR?\fB<<\fIvirtual\fB>>\fR?
+.
Returns information about virtual events.
If the \fB<<\fIvirtual\fB>>\fR argument is omitted, the return value
is a list of all the virtual events that are currently defined.
@@ -85,36 +93,48 @@ The following options are supported for the \fBevent generate\fR
command. These correspond to the
.QW %
expansions allowed in binding scripts for the \fBbind\fR command.
+.\" OPTION: -above
.TP
\fB\-above\fI window\fR
+.
\fIWindow\fR specifies the \fIabove\fR field for the event,
either as a window path name or as an integer window id.
Valid for \fBConfigure\fR events.
Corresponds to the \fB%a\fR substitution for binding scripts.
+.\" OPTION: -borderwidth
.TP
\fB\-borderwidth\fI size\fR
+.
\fISize\fR must be a screen distance; it specifies the
\fIborder_width\fR field for the event.
Valid for \fBConfigure\fR events.
Corresponds to the \fB%B\fR substitution for binding scripts.
+.\" OPTION: -button
.TP
\fB\-button\fI number\fR
+.
\fINumber\fR must be an integer; it specifies the \fIdetail\fR field
for a \fBButton\fR or \fBButtonRelease\fR event, overriding
any button number provided in the base \fIevent\fR argument.
Corresponds to the \fB%b\fR substitution for binding scripts.
+.\" OPTION: -count
.TP
\fB\-count\fI number\fR
+.
\fINumber\fR must be an integer; it specifies the \fIcount\fR field
for the event. Valid for \fBExpose\fR events.
Corresponds to the \fB%c\fR substitution for binding scripts.
+.\" OPTION: -data
.TP
\fB\-data\fI string\fR
+.
\fIString\fR may be any value; it specifies the \fIuser_data\fR field
for the event. Only valid for virtual events. Corresponds to the
\fB%d\fR substitution for virtual events in binding scripts.
+.\" OPTION: -delta
.TP
\fB\-delta\fI number\fR
+.
\fINumber\fR must be an integer; it specifies the \fIdelta\fR field
for the \fBMouseWheel\fR event. The \fIdelta\fR refers to the
direction and magnitude the mouse wheel was rotated. Note the value
@@ -124,8 +144,10 @@ scroll the text widget up 4 lines and \-240 would scroll the text
widget down 8 lines. Of course, other widgets may define different
behaviors for mouse wheel motion. This field corresponds to the
\fB%D\fR substitution for binding scripts.
+.\" OPTION: -detail
.TP
\fB\-detail\fI detail\fR
+.
\fIDetail\fR specifies the \fIdetail\fR field for the event
and must be one of the following:
.RS
@@ -140,86 +162,112 @@ Valid for \fBEnter\fR, \fBLeave\fR, \fBFocusIn\fR and
\fBFocusOut\fR events.
Corresponds to the \fB%d\fR substitution for binding scripts.
.RE
+.\" OPTION: -focus
.TP
\fB\-focus\fI boolean\fR
+.
\fIBoolean\fR must be a boolean value; it specifies the \fIfocus\fR
field for the event.
Valid for \fBEnter\fR and \fBLeave\fR events.
Corresponds to the \fB%f\fR substitution for binding scripts.
+.\" OPTION: -height
.TP
\fB\-height\fI size\fR
+.
\fISize\fR must be a screen distance; it specifies the \fIheight\fR
field for the event. Valid for \fBConfigure\fR events.
Corresponds to the \fB%h\fR substitution for binding scripts.
+.\" OPTION: -keycode
.TP
\fB\-keycode\fI number\fR
+.
\fINumber\fR must be an integer; it specifies the \fIkeycode\fR
field for the event.
Valid for \fBKey\fR and \fBKeyRelease\fR events.
Corresponds to the \fB%k\fR substitution for binding scripts.
+.\" OPTION: -keysym
.TP
\fB\-keysym\fI name\fR
+.
\fIName\fR must be the name of a valid keysym, such as \fBg\fR,
\fBspace\fR, or \fBReturn\fR; its corresponding
keycode value is used as the \fIkeycode\fR field for event, overriding
any detail specified in the base \fIevent\fR argument.
Valid for \fBKey\fR and \fBKeyRelease\fR events.
Corresponds to the \fB%K\fR substitution for binding scripts.
+.\" OPTION: -mode
.TP
\fB\-mode\fI notify\fR
+.
\fINotify\fR specifies the \fImode\fR field for the event and must be
one of \fBNotifyNormal\fR, \fBNotifyGrab\fR, \fBNotifyUngrab\fR, or
\fBNotifyWhileGrabbed\fR.
Valid for \fBEnter\fR, \fBLeave\fR, \fBFocusIn\fR, and
\fBFocusOut\fR events.
Corresponds to the \fB%m\fR substitution for binding scripts.
+.\" OPTION: -override
.TP
\fB\-override\fI boolean\fR
+.
\fIBoolean\fR must be a boolean value; it specifies the
\fIoverride_redirect\fR field for the event.
Valid for \fBMap\fR, \fBReparent\fR, and \fBConfigure\fR events.
Corresponds to the \fB%o\fR substitution for binding scripts.
+.\" OPTION: -place
.TP
\fB\-place\fI where\fR
+.
\fIWhere\fR specifies the \fIplace\fR field for the event; it must be
either \fBPlaceOnTop\fR or \fBPlaceOnBottom\fR.
Valid for \fBCirculate\fR events.
Corresponds to the \fB%p\fR substitution for binding scripts.
+.\" OPTION: -root
.TP
\fB\-root\fI window\fR
+.
\fIWindow\fR must be either a window path name or an integer window
identifier; it specifies the \fIroot\fR field for the event.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
\fBButtonRelease\fR, \fBEnter\fR, \fBLeave\fR, and \fBMotion\fR
events.
Corresponds to the \fB%R\fR substitution for binding scripts.
+.\" OPTION: -rootx
.TP
\fB\-rootx\fI coord\fR
+.
\fICoord\fR must be a screen distance; it specifies the \fIx_root\fR
field for the event.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
\fBButtonRelease\fR, \fBEnter\fR, \fBLeave\fR, and \fBMotion\fR
events. Corresponds to the \fB%X\fR substitution for binding scripts.
+.\" OPTION: -rooty
.TP
\fB\-rooty\fI coord\fR
+.
\fICoord\fR must be a screen distance; it specifies the \fIy_root\fR
field for the event.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
\fBButtonRelease\fR, \fBEnter\fR, \fBLeave\fR, and \fBMotion\fR
events.
Corresponds to the \fB%Y\fR substitution for binding scripts.
+.\" OPTION: -sendevent
.TP
\fB\-sendevent\fI boolean\fR
+.
\fIBoolean\fR must be a boolean value; it specifies the \fIsend_event\fR
field for the event. Valid for all events. Corresponds to the
\fB%E\fR substitution for binding scripts.
+.\" OPTION: -serial
.TP
\fB\-serial\fI number\fR
+.
\fINumber\fR must be an integer; it specifies the \fIserial\fR field
for the event. Valid for all events.
Corresponds to the \fB%#\fR substitution for binding scripts.
+.\" OPTION: -state
.TP
\fB\-state\fI state\fR
+.
\fIState\fR specifies the \fIstate\fR field for the event.
For \fBKey\fR, \fBKeyRelease\fR, \fBButtons\fR,
\fBButtonRelease\fR, \fBEnter\fR, \fBLeave\fR, and \fBMotion\fR events
@@ -229,37 +277,47 @@ For \fBVisibility\fR events it must be one of \fBVisibilityUnobscured\fR,
This option overrides any modifiers such as \fBMeta\fR or \fBControl\fR
specified in the base \fIevent\fR.
Corresponds to the \fB%s\fR substitution for binding scripts.
+.\" OPTION: -subwindow
.TP
\fB\-subwindow\fI window\fR
+.
\fIWindow\fR specifies the \fIsubwindow\fR field for the event, either
as a path name for a Tk widget or as an integer window identifier.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
\fBButtonRelease\fR, \fBEnter\fR, \fBLeave\fR, and \fBMotion\fR events.
Similar to \fB%S\fR substitution for binding scripts.
+.\" OPTION: -time
.TP
\fB\-time\fI integer\fR
+.
\fIInteger\fR must be an integer value; it specifies the \fItime\fR field
-for the event. Additonally the special value \fBcurrent\fR is allowed,
+for the event. Additionally, the special value \fBcurrent\fR is allowed;
this value will be substituted by the current event time.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
\fBButtonRelease\fR, \fBEnter\fR, \fBLeave\fR, \fBMotion\fR,
and \fBProperty\fR events.
Corresponds to the \fB%t\fR substitution for binding scripts.
+.\" OPTION: -warp
.TP
\fB\-warp\fI boolean\fR
+.
\fIboolean\fR must be a boolean value; it specifies whether
the screen pointer should be warped as well.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
\fBButtonRelease\fR, and \fBMotion\fR events. The pointer will
only warp to a window if it is mapped.
+.\" OPTION: -width
.TP
\fB\-width\fI size\fR
+.
\fISize\fR must be a screen distance; it specifies the \fIwidth\fR field
for the event.
Valid for \fBConfigure\fR events.
Corresponds to the \fB%w\fR substitution for binding scripts.
+.\" OPTION: -when
.TP
\fB\-when\fI when\fR
+.
\fIWhen\fR determines when the event will be processed; it must have one
of the following values:
.RS
@@ -278,8 +336,10 @@ other events already queued with \fB\-when mark\fR.
This option is useful when generating a series of events that should
be processed in order but at the front of the queue.
.RE
+.\" OPTION: -x
.TP
\fB\-x\fI coord\fR
+.
\fICoord\fR must be a screen distance; it specifies the \fIx\fR field
for the event.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
@@ -290,8 +350,10 @@ Corresponds to the \fB%x\fR substitution for binding scripts.
If \fIWindow\fR is empty the coordinate is relative to the
screen, and this option corresponds to the \fB%X\fR substitution
for binding scripts.
+.\" OPTION: -y
.TP
\fB\-y\fI coord\fR
+.
\fICoord\fR must be a screen distance; it specifies the \fIy\fR
field for the event.
Valid for \fBKey\fR, \fBKeyRelease\fR, \fBButton\fR,
@@ -312,6 +374,7 @@ Tk defines the following virtual events for the purposes of
notification:
.TP
\fB<<AltUnderlined>>\fR
+.
This is sent to widget to notify it that the letter it has underlined
(as an accelerator indicator) with the \fB\-underline\fR option has
been pressed in combination with the Alt key. The usual response to
@@ -319,26 +382,32 @@ this is to either focus into the widget (or some related widget) or to
invoke the widget.
.TP
\fB<<Invoke>>\fR
+.
This can be sent to some widgets (e.g. button, listbox, menu) as an
alternative to <space>.
.TP
\fB<<ListboxSelect>>\fR
+.
This is sent to a listbox when the set of selected item(s) in the
listbox is updated.
.TP
\fB<<MenuSelect>>\fR
+.
This is sent to a menu when the currently selected item in the menu
changes. It is intended for use with context-sensitive help systems.
.TP
\fB<<Modified>>\fR
+.
This is sent to a text widget when the contents of the widget are
changed.
.TP
\fB<<Selection>>\fR
+.
This is sent to a text widget when the selection in the widget is
changed.
.TP
\fB<<ThemeChanged>>\fR
+.
This is sent to all widgets when the ttk theme changed. The ttk
widgets listen to this event and redisplay themselves when it fires.
The legacy widgets ignore this event.
@@ -353,22 +422,26 @@ cause of the change. NOTE: all tk and ttk widgets already handle this
event internally.
.TP
\fB<<TraverseIn>>\fR
+.
This is sent to a widget when the focus enters the widget because of a
user-driven
.QW "tab to widget"
action.
.TP
\fB<<TraverseOut>>\fR
+.
This is sent to a widget when the focus leaves the widget because of a
user-driven
.QW "tab to widget"
action.
.TP
\fB<<UndoStack>>\fR
+.
This is sent to a text widget when its undo stack or redo stack becomes
empty or unempty.
.TP
\fB<<WidgetViewSync>>\fR
+.
This is sent to a text widget when its internal data become obsolete,
and again when these internal data are back in sync with the widget
view. The detail field (%d substitution) is either true (when the
@@ -379,12 +452,15 @@ bindings across multiple platforms. Users expect them to behave in the
following way:
.TP
\fB<<Clear>>\fR
+.
Delete the currently selected widget contents.
.TP
\fB<<Copy>>\fR
+.
Copy the currently selected widget contents to the clipboard.
.TP
\fB<<Cut>>\fR
+.
Move the currently selected widget contents to the clipboard.
.TP
\fB<<LineEnd>>\fR
@@ -418,10 +494,12 @@ Move to the next group of items (i.e., visible word) in the current widget
while deselecting any selected contents.
.TP
\fB<<Paste>>\fR
+.
Replace the currently selected widget contents with the contents of
the clipboard.
.TP
\fB<<PasteSelection>>\fR
+.
Insert the contents of the selection at the mouse location. (This
event has meaningful \fB%x\fR and \fB%y\fR substitutions).
.TP
@@ -441,6 +519,7 @@ Move to the previous paragraph in the current widget while deselecting any
selected contents.
.TP
\fB<<PrevWindow>>\fR
+.
Traverse to the previous window.
.TP
\fB<<PrevWord>>\fR
@@ -449,6 +528,7 @@ Move to the previous group of items (i.e., visible word) in the current widget
while deselecting any selected contents.
.TP
\fB<<Redo>>\fR
+.
Redo one undone action.
.TP
\fB<<SelectAll>>\fR
diff --git a/doc/focus.n b/doc/focus.n
index a6b0575..8b50765 100644
--- a/doc/focus.n
+++ b/doc/focus.n
@@ -55,6 +55,7 @@ things.
The \fBfocus\fR command can take any of the following forms:
.TP
\fBfocus\fR
+.
Returns the path name of the focus window on the display containing
the application's main window, or an empty string if no window in
this application has the focus on that display. Note: it is
@@ -63,6 +64,7 @@ better to specify the display explicitly using \fB\-displayof\fR
displays.
.TP
\fBfocus \fIwindow\fR
+.
If the application currently has the input focus on \fIwindow\fR's
display, this command resets the input focus for \fIwindow\fR's display
to \fIwindow\fR and returns an empty string.
@@ -72,12 +74,14 @@ for its top-level; the next time the focus arrives at the top-level,
Tk will redirect it to \fIwindow\fR.
If \fIwindow\fR is an empty string then the command does nothing.
.TP
-\fBfocus \-displayof\fR \fIwindow\fR
+\fBfocus \-displayof \fIwindow\fR
+.
Returns the name of the focus window on the display containing \fIwindow\fR.
If the focus window for \fIwindow\fR's display is not in this
application, the return value is an empty string.
.TP
\fBfocus \-force \fIwindow\fR
+.
Sets the focus of \fIwindow\fR's display to \fIwindow\fR, even if
the application does not currently have the input focus for the display.
This command should be used sparingly, if at all.
@@ -86,7 +90,8 @@ itself; instead, it should wait for the window manager to give it
the focus.
If \fIwindow\fR is an empty string then the command does nothing.
.TP
-\fBfocus \-lastfor\fR \fIwindow\fR
+\fBfocus \-lastfor \fIwindow\fR
+.
Returns the name of the most recent window to have the input focus
among all the windows in the same top-level as \fIwindow\fR.
If no window in that top-level has ever had the input focus, or
@@ -109,12 +114,13 @@ you use C code to query the X server directly.
To make a window that only participates in the focus traversal ring
when a variable is set, add the following bindings to the widgets
\fIbefore\fR and \fIafter\fR it in that focus ring:
+.PP
.CS
-button .before \-text "Before"
-button .middle \-text "Middle"
-button .after \-text "After"
-checkbutton .flag \-variable traverseToMiddle \-takefocus 0
-pack .flag \-side left
+button .before -text "Before"
+button .middle -text "Middle"
+button .after -text "After"
+checkbutton .flag -variable traverseToMiddle -takefocus 0
+pack .flag -side left
pack .before .middle .after
bind .before <Tab> {
if {!$traverseToMiddle} {
@@ -122,7 +128,7 @@ bind .before <Tab> {
break
}
}
-bind .after <Shift\-Tab> {
+bind .after <Shift-Tab> {
if {!$traverseToMiddle} {
\fBfocus\fR .before
break
diff --git a/doc/focusNext.n b/doc/focusNext.n
index 3283d4b..4740346 100644
--- a/doc/focusNext.n
+++ b/doc/focusNext.n
@@ -12,11 +12,11 @@
.SH NAME
tk_focusNext, tk_focusPrev, tk_focusFollowsMouse \- Utility procedures for managing the input focus.
.SH SYNOPSIS
+.nf
\fBtk_focusNext \fIwindow\fR
-.sp
\fBtk_focusPrev \fIwindow\fR
-.sp
\fBtk_focusFollowsMouse\fR
+.fi
.BE
.SH DESCRIPTION
.PP
@@ -49,7 +49,8 @@ Tk will automatically give it the input focus.
The \fBfocus\fR command may be used to move the focus to a window
other than the one under the mouse, but as soon as the mouse moves
into a new window the focus will jump to that window.
-Note: at present there is no built-in support for returning the
+.PP
+Note that at present there is no built-in support for returning the
application to an explicit focus model; to do this you will have
to write a script that deletes the bindings created by
\fBtk_focusFollowsMouse\fR.
diff --git a/doc/font.n b/doc/font.n
index 4d2f5f4..c479e48 100644
--- a/doc/font.n
+++ b/doc/font.n
@@ -20,6 +20,7 @@ The \fBfont\fR command provides several facilities for dealing with
fonts, such as defining named fonts and inspecting the actual attributes of
a font. The command has several different forms, determined by the
first argument. The following forms are currently supported:
+.\" METHOD: actual
.TP
\fBfont actual \fIfont\fR ?\fB\-displayof \fIwindow\fR? ?\fIoption\fR? ?\fB\-\|\-\fR? ?\fIchar\fR?
.
@@ -38,6 +39,7 @@ that character, which will be different from the base font if the base
font does not contain the given character. If \fIchar\fR may be a hyphen, it
should be preceded by \fB\-\|\-\fR to distinguish it from a misspelled
\fIoption\fR.
+.\" METHOD: configure
.TP
\fBfont configure \fIfontname\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -58,6 +60,7 @@ are implemented by the system theme. To achieve the effect of modification,
use \fBfont actual\fR to get their configuration and \fBfont create\fR to
synthesize a copy of the font which can be modified.
.RE
+.\" METHOD: create
.TP
\fBfont create\fR ?\fIfontname\fR? ?\fIoption value ...\fR?
.
@@ -67,8 +70,9 @@ form \fBfont\fIx\fR, where \fIx\fR is an integer. There may be any number
of \fIoption\fR\-\fIvalue\fR pairs, which provide the desired attributes for
the new named font. See \fBFONT OPTIONS\fR below for a list of the possible
attributes.
+.\" METHOD: delete
.TP
-\fBfont delete\fR \fIfontname\fR ?\fIfontname ...\fR?
+\fBfont delete\fI fontname\fR ?\fIfontname ...\fR?
.
Delete the specified named fonts. If there are widgets using the named font,
the named font will not actually be deleted until all the instances are
@@ -76,12 +80,14 @@ released. Those widgets will continue to display using the last known values
for the named font. If a deleted named font is subsequently recreated with
another call to \fBfont create\fR, the widgets will use the new named font
and redisplay themselves using the new attributes of that font.
+.\" METHOD: families
.TP
\fBfont families\fR ?\fB\-displayof \fIwindow\fR?
.
The return value is a list of the case-insensitive names of all font families
that exist on \fIwindow\fR's display. If the \fIwindow\fR argument is
omitted, it defaults to the main window.
+.\" METHOD: measure
.TP
\fBfont measure \fIfont\fR ?\fB\-displayof \fIwindow\fR? \fItext\fR
.
@@ -96,6 +102,7 @@ characters such as cursive
If the string contains newlines or tabs,
those characters are not expanded or treated specially when measuring the
string.
+.\" METHOD: metrics
.TP
\fBfont metrics \fIfont\fR ?\fB\-displayof \fIwindow\fR? ?\fIoption\fR?
.
@@ -107,8 +114,10 @@ omitted, it defaults to the main window. If \fIoption\fR is specified,
returns the value of that metric; if it is omitted, the return value is a
list of all the metrics and their values. See \fBFONT METRICS\fR
below for a list of the possible metrics.
+.\" METHOD: names
.TP
\fBfont names\fR
+.
The return value is a list of all the named fonts that are currently defined.
.SH "FONT DESCRIPTIONS"
.PP
@@ -200,16 +209,19 @@ horizontal line where the bottom of most letters line up; certain letters,
such as lower-case
.QW g
stick below the baseline.
+.\" OPTION: -ascent
.TP
-\fB\-ascent \0\fR
+\fB\-ascent\fR
.
The amount in pixels that the tallest letter sticks up above the baseline of
the font, plus any extra blank space added by the designer of the font.
+.\" OPTION: -descent
.TP
-\fB\-descent \0\fR
+\fB\-descent\fR
.
The largest amount in pixels that any letter sticks down below the baseline
of the font, plus any extra blank space added by the designer of the font.
+.\" OPTION: -linespace
.TP
\fB\-linespace\fR
.
@@ -217,8 +229,9 @@ Returns how far apart vertically in pixels two lines of text using the same
font should be placed so that none of the characters in one line overlap any
of the characters in the other line. This is generally the sum of the ascent
above the baseline line plus the descent below the baseline.
+.\" OPTION: -fixed
.TP
-\fB\-fixed \0\fR
+\fB\-fixed\fR
.
Returns a boolean flag that is
.QW \fB1\fR
@@ -235,6 +248,7 @@ included when calculating this value.
The following options are supported on all platforms, and are used when
constructing a named font or when specifying a font using style [5] as
above:
+.\" OPTION: -family
.TP
\fB\-family \fIname\fR
.
@@ -251,6 +265,7 @@ The \fIname\fR may also be the name of a native, platform-specific font
family; in that case it will work as desired on one platform but may not
display correctly on other platforms. If the family is unspecified or
unrecognized, a platform-specific default font will be chosen.
+.\" OPTION: -size
.TP
\fB\-size \fIsize\fR
.
@@ -270,6 +285,7 @@ to a fixed-size bitmap. The mapping between points and pixels is set when
the application starts, based on properties of the installed monitor, but it
can be overridden by calling the \fBtk scaling\fR command.
.RE
+.\" OPTION: -weight
.TP
\fB\-weight \fIweight\fR
.
@@ -277,20 +293,26 @@ The nominal thickness of the characters in the font. The value
\fBnormal\fR specifies a normal weight font, while \fBbold\fR specifies a
bold font. The closest available weight to the one specified will
be chosen. The default weight is \fBnormal\fR.
+.\" OPTION: -slant
.TP
\fB\-slant \fIslant\fR
+.
The amount the characters in the font are slanted away from the
vertical. Valid values for slant are \fBroman\fR and \fBitalic\fR.
A roman font is the normal, upright appearance of a font, while
an italic font is one that is tilted some number of degrees from upright.
The closest available slant to the one specified will be chosen.
The default slant is \fBroman\fR.
+.\" OPTION: -underline
.TP
\fB\-underline \fIboolean\fR
+.
The value is a boolean flag that specifies whether characters in this
font should be underlined. The default value for underline is \fBfalse\fR.
+.\" OPTION: -overstrike
.TP
\fB\-overstrike \fIboolean\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.
@@ -298,41 +320,23 @@ for overstrike is \fBfalse\fR.
.PP
The following named fonts are supported on all systems, and default to values
that match appropriate system defaults.
-.TP
-\fBTkDefaultFont\fR
-.
+.IP \fBTkDefaultFont\fR
This font is the default for all GUI items not otherwise specified.
-.TP
-\fBTkTextFont\fR
-.
+.IP \fBTkTextFont\fR
This font should be used for user text in entry widgets, listboxes etc.
-.TP
-\fBTkFixedFont\fR
-.
+.IP \fBTkFixedFont\fR
This font is the standard fixed-width font.
-.TP
-\fBTkMenuFont\fR
-.
+.IP \fBTkMenuFont\fR
This font is used for menu items.
-.TP
-\fBTkHeadingFont\fR
-.
+.IP \fBTkHeadingFont\fR
This font should be used for column headings in lists and tables.
-.TP
-\fBTkCaptionFont\fR
-.
+.IP \fBTkCaptionFont\fR
This font should be used for window and dialog caption bars.
-.TP
-\fBTkSmallCaptionFont\fR
-.
+.IP \fBTkSmallCaptionFont\fR
This font should be used for captions on contained windows or tool dialogs.
-.TP
-\fBTkIconFont\fR
-.
+.IP \fBTkIconFont\fR
This font should be used for icon captions.
-.TP
-\fBTkTooltipFont\fR
-.
+.IP \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
@@ -343,9 +347,11 @@ modify that.
The following system fonts are supported:
.TP
\fBX Windows\fR
+.
All valid X font names, including those listed by xlsfonts(1), are available.
.TP
\fBMS Windows\fR
+.
The following fonts are supported, and are mapped to the user's
style defaults.
.RS
@@ -357,6 +363,7 @@ style defaults.
.RE
.TP
\fBMac OS X\fR
+.
The following fonts are supported, and are mapped to the user's
style defaults.
.RS
@@ -386,17 +393,17 @@ theme fonts:
Fill a text widget with lots of font demonstrators, one for every font
family installed on your system:
.CS
-pack [text .t \-wrap none] \-fill both \-expand 1
+pack [text .t -wrap none] -fill both -expand 1
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
+foreach family [lsort -dictionary [\fBfont families\fR]] {
+ .t tag configure f[incr count] -font [list $family 10]
+ .t insert end ${family}:\et {} \e
"This is a simple sampler\en" f$count
- set w [\fBfont measure\fR [.t cget \-font] ${family}:]
- if {$w+5 > $tabwidth} {
- set tabwidth [expr {$w+5}]
- .t configure \-tabs $tabwidth
+ set w [\fBfont measure\fR [.t cget -font] ${family}:]
+ if {$w + 5 > $tabwidth} {
+ set tabwidth [expr {$w + 5}]
+ .t configure -tabs $tabwidth
}
}
.CE
diff --git a/doc/fontchooser.n b/doc/fontchooser.n
index 465af2e..4e667e5 100644
--- a/doc/fontchooser.n
+++ b/doc/fontchooser.n
@@ -11,11 +11,11 @@
.SH NAME
fontchooser \- control font selection dialog
.SH SYNOPSIS
+.nf
\fBtk fontchooser\fR \fBconfigure\fR ?\fI\-option value ...\fR?
-.sp
\fBtk fontchooser\fR \fBshow\fR
-.sp
\fBtk fontchooser\fR \fBhide\fR
+.fi
.BE
.SH DESCRIPTION
.PP
@@ -30,16 +30,19 @@ difference, all user interaction with the dialog will be communicated to the
caller via callbacks or virtual events.
.PP
The \fBtk fontchooser\fR command can have one of the following forms:
+.\" METHOD: configure
.TP
\fBtk fontchooser\fR \fBconfigure \fR?\fI\-option value ...\fR?
.
Set or query one or more of the configurations options below (analogous to Tk
widget configuration).
+.\" METHOD: show
.TP
\fBtk fontchooser\fR \fBshow\fR
.
Show the font selection dialog. Depending on the platform, may return
immediately or only once the dialog has been withdrawn.
+.\" METHOD: hide
.TP
\fBtk fontchooser\fR \fBhide\fR
.
@@ -47,24 +50,32 @@ Hide the font selection dialog if it is visible and cause any pending
\fBtk fontchooser\fR \fBshow\fR command to return.
.PP
.SH "CONFIGURATION OPTIONS"
+.\" OPTION: -parent
.TP
\fB\-parent\fR
+.
Specifies/returns the logical parent window of the font selection dialog
(similar to the \fB\-parent\fR option to other dialogs). The font selection
dialog is hidden if it is visible when the parent window is destroyed.
+.\" OPTION: -title
.TP
\fB\-title\fR
+.
Specifies/returns the title of the dialog. Has no effect on platforms where the
font selection dialog does not support titles.
+.\" OPTION: -font
.TP
\fB\-font\fR
+.
Specifies/returns the font that is currently selected in the dialog if it is
visible, or that will be initially selected when the dialog is shown (if
supported by the platform). Can be set to the empty string to indicate that no
font should be selected. Fonts can be specified in any form given by the "FONT
DESCRIPTION" section in the \fBfont\fR manual page.
+.\" OPTION: -command
.TP
\fB\-command\fR
+.
Specifies/returns the command prefix to be called when a font selection has
been made by the user. The command prefix is evaluated at the global level
after having the specification of the selected font appended. On platforms
@@ -74,8 +85,10 @@ evaluation. Can be set to the empty string to indicate that no callback should
be invoked. Fonts are specified by a list of form [3] of the "FONT DESCRIPTION"
section in the \fBfont\fR manual page (i.e. a list of the form
\fI{family size style ?style ...?}\fR).
+.\" OPTION: -visible
.TP
\fB\-visible\fR
+.
Read-only option that returns a boolean indicating whether the font selection
dialog is currently visible. Attempting to set this option results in an error.
@@ -83,6 +96,7 @@ dialog is currently visible. Attempting to set this option results in an error.
.SH "VIRTUAL EVENTS"
.TP
\fB<<TkFontchooserVisibility>>\fR
+.
Sent to the dialog parent whenever the visibility of the font selection dialog
changes, both as a result of user action (e.g. disposing of the dialog via
OK/Cancel button or close box) and of the \fBtk fontchooser\fR
@@ -91,6 +105,7 @@ current visibility of the dialog by querying the \fB\-visible\fR configuration
option.
.TP
\fB<<TkFontchooserFontChanged>>\fR
+.
Sent to the dialog parent whenever the font selection dialog is visible and the
selected font changes, both as a result of user action and of the \fB\-font\fR
configuration option being set. Binding scripts can determine the currently
@@ -139,36 +154,36 @@ to ensure its selected font matches the new value of the named font.
.CS
proc fontchooserDemo {} {
wm title . "Font Chooser Demo"
- \fBtk fontchooser\fR \fBconfigure\fR \-parent .
- button .b \-command fontchooserToggle \-takefocus 0
+ \fBtk fontchooser\fR \fBconfigure\fR -parent .
+ button .b -command fontchooserToggle -takefocus 0
fontchooserVisibility .b
- bind . \fB<<TkFontchooserVisibility>>\fR \\
+ bind . \fB<<TkFontchooserVisibility>>\fR \e
[list fontchooserVisibility .b]
foreach w {.t1 .t2} {
- text $w \-width 20 \-height 4 \-borderwidth 1 \-relief solid
+ text $w -width 20 -height 4 -borderwidth 1 -relief solid
bind $w <FocusIn> [list fontchooserFocus $w]
$w insert end "Text Widget $w"
}
- .t1 configure \-font {Courier 14}
- .t2 configure \-font {Times 16}
+ .t1 configure -font {Courier 14}
+ .t2 configure -font {Times 16}
pack .b .t1 .t2; focus .t1
}
proc fontchooserToggle {} {
\fBtk fontchooser\fR [expr {
- [\fBtk fontchooser\fR \fBconfigure\fR \-visible] ?
+ [\fBtk fontchooser\fR \fBconfigure\fR -visible] ?
"\fBhide\fR" : "\fBshow\fR"}]
}
proc fontchooserVisibility {w} {
- $w configure \-text [expr {
- [\fBtk fontchooser\fR \fBconfigure\fR \-visible] ?
+ $w configure -text [expr {
+ [\fBtk fontchooser\fR \fBconfigure\fR -visible] ?
"Hide Font Dialog" : "Show Font Dialog"}]
}
proc fontchooserFocus {w} {
- \fBtk fontchooser\fR \fBconfigure\fR \-font [$w cget \-font] \\
- \-command [list fontchooserFontSelection $w]
+ \fBtk fontchooser\fR \fBconfigure\fR -font [$w cget -font] \e
+ -command [list fontchooserFontSelection $w]
}
proc fontchooserFontSelection {w font args} {
- $w configure \-font [font actual $font]
+ $w configure -font [font actual $font]
}
fontchooserDemo
.CE
diff --git a/doc/frame.n b/doc/frame.n
index 5520f32..078bac6 100644
--- a/doc/frame.n
+++ b/doc/frame.n
@@ -12,7 +12,7 @@
.SH NAME
frame \- Create and manipulate 'frame' simple container widgets
.SH SYNOPSIS
-\fBframe\fR \fIpathName\fR ?\fIoptions\fR?
+\fBframe\fI pathName\fR ?\fIoptions\fR?
.SO
\-borderwidth \-highlightcolor \-pady
\-cursor \-highlightthickness \-relief
@@ -127,13 +127,15 @@ operations on the widget. It has the following general form:
the frame widget's path name. \fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for frame widgets:
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBframe\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
diff --git a/doc/getOpenFile.n b/doc/getOpenFile.n
index d2323de..757d91f 100644
--- a/doc/getOpenFile.n
+++ b/doc/getOpenFile.n
@@ -34,21 +34,26 @@ whether the existing file should be overwritten or not.
.PP
The following \fIoption\-value\fR pairs are possible as command line
arguments to these two commands:
+.\" OPTION: -command
.TP
-\fB\-command\fR \fIstring\fR
+\fB\-command\fI string\fR
+.
Specifies the prefix of a Tcl command to invoke when the user closes the
dialog after having selected an item. This callback is not called if the
user cancelled the dialog. The actual command consists of \fIstring\fR
followed by a space and the value selected by the user in the dialog. This
is only available on Mac OS X.
+.\" OPTION: -confirmoverwrite
.TP
-\fB\-confirmoverwrite\fR \fIboolean\fR
+\fB\-confirmoverwrite\fI boolean\fR
+.
Configures how the Save dialog reacts when the selected file already
exists, and saving would overwrite it. A true value requests a
confirmation dialog be presented to the user. A false value requests
that the overwrite take place without confirmation. Default value is true.
+.\" OPTION: -defaultextension
.TP
-\fB\-defaultextension\fR \fIextension\fR
+\fB\-defaultextension\fI extension\fR
.
Specifies a string that will be appended to the filename if the user
enters a filename without an extension. The default value is the empty
@@ -57,8 +62,9 @@ any case. This option is ignored on Mac OS X, which
does not require extensions to filenames,
and the UNIX implementation guesses reasonable values for this from
the \fB\-filetypes\fR option when this is not supplied.
+.\" OPTION: -filetypes
.TP
-\fB\-filetypes\fR \fIfilePatternList\fR
+\fB\-filetypes\fI filePatternList\fR
.
If a \fBFile types\fR listbox exists in the file dialog on the particular
platform, this option gives the \fIfiletype\fRs in this listbox. When
@@ -68,8 +74,9 @@ empty list, or if the \fBFile types\fR listbox is not supported by the
particular platform then all files are listed regardless of their
types. See the section \fBSPECIFYING FILE PATTERNS\fR below for a
discussion on the contents of \fIfilePatternList\fR.
+.\" OPTION: -initialdir
.TP
-\fB\-initialdir\fR \fIdirectory\fR
+\fB\-initialdir\fI directory\fR
.
Specifies that the files in \fIdirectory\fR should be displayed
when the dialog pops up. If this parameter is not specified,
@@ -79,32 +86,38 @@ On Vista and later systems, the initial directory defaults to the last
user-selected directory for the application. If the
parameter specifies a relative path, the return value will convert the
relative path to an absolute path.
+.\" OPTION: -initialfile
.TP
-\fB\-initialfile\fR \fIfilename\fR
+\fB\-initialfile\fI filename\fR
.
Specifies a filename to be displayed in the dialog when it pops up.
+.\" OPTION: -message
.TP
-\fB\-message\fR \fIstring\fR
+\fB\-message\fI string\fR
.
Specifies a message to include in the client area of the dialog.
This is only available on Mac OS X.
+.\" OPTION: -multiple
.TP
-\fB\-multiple\fR \fIboolean\fR
+\fB\-multiple\fI boolean\fR
.
Allows the user to choose multiple files from the Open dialog.
+.\" OPTION: -parent
.TP
-\fB\-parent\fR \fIwindow\fR
+\fB\-parent\fI window\fR
.
Makes \fIwindow\fR the logical parent of the file dialog. The file
dialog is displayed on top of its parent window. On Mac OS X, this
turns the file dialog into a sheet attached to the parent window.
+.\" OPTION: -title
.TP
-\fB\-title\fR \fItitleString\fR
+\fB\-title\fI titleString\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.
+.\" OPTION: -typevariable
.TP
-\fB\-typevariable\fR \fIvariableName\fR
+\fB\-typevariable\fI variableName\fR
.
The global variable \fIvariableName\fR is used to preselect which filter is
used from \fIfilterList\fR when the dialog box is opened and is
@@ -192,7 +205,7 @@ set types {
{{GIF Files} {} GIFF}
{{All Files} * }
}
-set filename [\fBtk_getOpenFile\fR \-filetypes $types]
+set filename [\fBtk_getOpenFile\fR -filetypes $types]
if {$filename ne ""} {
# Open the file ...
diff --git a/doc/grab.n b/doc/grab.n
index 259d68e..fc4ce02 100644
--- a/doc/grab.n
+++ b/doc/grab.n
@@ -12,9 +12,10 @@
.SH NAME
grab \- Confine pointer and keyboard events to a window sub-tree
.SH SYNOPSIS
+.nf
\fBgrab \fR?\fB\-global\fR? \fIwindow\fR
-.sp
\fBgrab \fIoption \fR?\fIarg \fR...?
+.fi
.BE
.SH DESCRIPTION
.PP
@@ -83,21 +84,28 @@ grab on a given display at once.
The \fBgrab\fR command can take any of the following forms:
.TP
\fBgrab \fR?\fB\-global\fR? \fIwindow\fR
+.
Same as \fBgrab set\fR, described below.
+.\" METHOD: current
.TP
\fBgrab current \fR?\fIwindow\fR?
+.
If \fIwindow\fR is specified, returns the name of the current grab
window in this application for \fIwindow\fR's display, or an empty
string if there is no such window.
If \fIwindow\fR is omitted, the command returns a list whose elements
are all of the windows grabbed by this application for all displays,
or an empty string if the application has no grabs.
+.\" METHOD: release
.TP
\fBgrab release \fIwindow\fR
+.
Releases the grab on \fIwindow\fR if there is one, otherwise does
nothing. Returns an empty string.
+.\" METHOD: set
.TP
\fBgrab set \fR?\fB\-global\fR? \fIwindow\fR
+.
Sets a grab on \fIwindow\fR. If \fB\-global\fR is specified then the
grab is global, otherwise it is local.
If a grab was already in effect for this application on
@@ -105,8 +113,10 @@ If a grab was already in effect for this application on
If there is already a grab on \fIwindow\fR and it has the same
global/local form as the requested grab, then the command
does nothing. Returns an empty string.
+.\" METHOD: status
.TP
\fBgrab status \fIwindow\fR
+.
Returns \fBnone\fR if no grab is currently set on \fIwindow\fR,
\fBlocal\fR if a local grab is set on \fIwindow\fR, and
\fBglobal\fR if a global grab is set.
@@ -136,9 +146,9 @@ Set a grab so that only one button may be clicked out of a group. The
other buttons are unresponsive to the mouse until the middle button is
clicked.
.CS
-pack [button .b1 \-text "Click me! #1" \-command {destroy .b1}]
-pack [button .b2 \-text "Click me! #2" \-command {destroy .b2}]
-pack [button .b3 \-text "Click me! #3" \-command {destroy .b3}]
+pack [button .b1 -text "Click me! #1" -command {destroy .b1}]
+pack [button .b2 -text "Click me! #2" -command {destroy .b2}]
+pack [button .b3 -text "Click me! #3" -command {destroy .b3}]
\fBgrab\fR .b2
.CE
.SH "SEE ALSO"
diff --git a/doc/grid.n b/doc/grid.n
index 90f80cd..eaeaf41 100644
--- a/doc/grid.n
+++ b/doc/grid.n
@@ -28,12 +28,14 @@ argument to \fBgrid configure\fR, either a window name (any value
starting with \fB.\fR) or one of the characters \fBx\fR or \fB^\fR
(see the \fBRELATIVE PLACEMENT\fR section below), then the command is
processed in the same way as \fBgrid configure\fR.
+.\" METHOD: anchor
.TP
\fBgrid anchor \fIwindow\fR ?\fIanchor\fR?
.
The anchor value controls how to place the grid within the container window
when no row/column has any weight. See \fBTHE GRID ALGORITHM\fR below
for further details. The default \fIanchor\fR is \fInw\fR.
+.\" METHOD: bbox
.TP
\fBgrid bbox \fIwindow\fR ?\fIcolumn row\fR? ?\fIcolumn2 row2\fR?
.
@@ -47,6 +49,7 @@ the command line, then the bounding box for that cell is returned, where the
top left cell is numbered from zero. If both \fIcolumn\fR and \fIrow\fR
arguments are specified, then the bounding box spanning the rows and columns
indicated is returned.
+.\" METHOD: columnconfigure
.TP
\fBgrid columnconfigure \fIwindow index \fR?\fI\-option value...\fR?
.
@@ -82,8 +85,9 @@ If only an option is specified, with no value,
the current value of that option is returned.
If only the container window and index is specified, all the current settings
are returned in a list of
-.QW "\-option value"
+.QW "\fI\-option value\fR"
pairs.
+.\" METHOD: configure
.TP
\fBgrid configure \fIwindow \fR?\fIwindow ...\fR? ?\fIoptions\fR?
.
@@ -96,6 +100,7 @@ location of a \fIwindow\fR, as described in the \fBRELATIVE PLACEMENT\fR
section, below.
The following options are supported:
.RS
+.\" OPTION: -column
.TP
\fB\-column \fIn\fR
.
@@ -108,6 +113,7 @@ if it is the first window. For each
\fBx\fR that immediately precedes the \fIwindow\fR, the column position
is incremented by one. Thus the \fBx\fR represents a blank column
for this row in the grid.
+.\" OPTION: -columnspan
.TP
\fB\-columnspan \fIn\fR
.
@@ -115,12 +121,14 @@ Insert the window so that it occupies \fIn\fR columns in the grid.
The default is one column, unless the window name is followed by a
\fB\-\fR, in which case the columnspan is incremented once for each immediately
following \fB\-\fR.
+.\" OPTION: -in
.TP
\fB\-in \fIcontainer\fR
.
Insert the window(s) in the container
window given by \fIcontainer\fR. The default is the first window's
parent window.
+.\" OPTION: -ipadx
.TP
\fB\-ipadx \fIamount\fR
.
@@ -129,6 +137,7 @@ leave on each side of the content. This is space is added
inside the content border.
The \fIamount\fR must be a valid screen distance, such as \fB2\fR or \fB.5c\fR.
It defaults to 0.
+.\" OPTION: -ipady
.TP
\fB\-ipady \fIamount\fR
.
@@ -136,6 +145,7 @@ The \fIamount\fR specifies how much vertical internal padding to
leave on the top and bottom of the content.
This space is added inside the content border.
The \fIamount\fR defaults to 0.
+.\" OPTION: -padx
.TP
\fB\-padx \fIamount\fR
.
@@ -145,6 +155,7 @@ leave on each side of the content, in screen units.
of two values to specify padding for left and right separately.
The \fIamount\fR defaults to 0.
This space is added outside the content border.
+.\" OPTION: -pady
.TP
\fB\-pady \fIamount\fR
.
@@ -154,6 +165,7 @@ leave on the top and bottom of the content, in screen units.
of two values to specify padding for top and bottom separately.
The \fIamount\fR defaults to 0.
This space is added outside the content border.
+.\" OPTION: -row
.TP
\fB\-row \fIn\fR
.
@@ -162,6 +174,7 @@ Row numbers start with 0. If this option is not supplied, then the
content is arranged on the same row as the previous content specified on this
call to \fBgrid\fR, or the next row after the highest occupied row
if this is the first content.
+.\" OPTION: -rowspan
.TP
\fB\-rowspan \fIn\fR
.
@@ -170,6 +183,7 @@ The default is one row. If the next \fBgrid\fR command contains
\fB^\fR characters instead of \fIcontent\fR that line up with the columns
of this \fIcontent\fR, then the \fBrowspan\fR of this \fIcontent\fR is
extended by one.
+.\" OPTION: -sticky
.TP
\fB\-sticky \fIstyle\fR
.
@@ -193,6 +207,16 @@ If any of the content is already managed by the geometry manager
then any unspecified options for them retain their previous values rather
than receiving default values.
.RE
+.\" METHOD: content
+.TP
+\fBgrid content \fIwindow\fR ?\fI\-option value\fR?
+.
+If no options are supplied, a list of all of the content in \fIwindow\fR
+is returned, most recently managed first.
+\fIOption\fR can be either \fB\-row\fR or \fB\-column\fR which
+causes only the content in the row (or column) specified by \fIvalue\fR
+to be returned.
+.\" METHOD: forget
.TP
\fBgrid forget \fIwindow \fR?\fIwindow ...\fR?
.
@@ -205,11 +229,12 @@ default settings are used.
.RS
.PP
.VS "TIP 518"
-If the last content window of the container becomes unmanaged, this will also send
-the virtual event \fB<<NoManagedChild>>\fR to the container; the container
+If the last content window of the container becomes unmanaged, this will also
+send the virtual event \fB<<NoManagedChild>>\fR to the container; the container
may choose to resize itself (or otherwise respond) to such a change.
.VE "TIP 518"
.RE
+.\" METHOD: info
.TP
\fBgrid info \fIwindow\fR
.
@@ -219,13 +244,15 @@ might be specified to \fBgrid configure\fR.
The first two elements of the list are
.QW "\fB\-in \fIcontainer\fR"
where \fIcontainer\fR is the windows's container window.
+.\" METHOD: location
.TP
\fBgrid location \fIwindow x y\fR
.
-Given \fIx\fR and \fIy\fR values in screen units relative to the container window,
-the column and row number at that \fIx\fR and \fIy\fR location is returned.
-For locations that are above or to the left of the grid, \fB\-1\fR is
-returned.
+Given \fIx\fR and \fIy\fR values in screen units relative to the container
+window, the column and row number at that \fIx\fR and \fIy\fR location is
+returned. For locations that are above or to the left of the grid, \fB\-1\fR
+is returned.
+.\" METHOD: propagate
.TP
\fBgrid propagate \fIwindow\fR ?\fIboolean\fR?
.
@@ -238,7 +265,11 @@ In either of these cases an empty string is returned.
If \fIboolean\fR is omitted then the command returns \fB0\fR or
\fB1\fR to indicate whether propagation is currently enabled
for \fIwindow\fR.
+.RS
+.PP
Propagation is enabled by default.
+.RE
+.\" METHOD: rowconfigure
.TP
\fBgrid rowconfigure \fIwindow index \fR?\fI\-option value...\fR?
.
@@ -249,9 +280,9 @@ and \fB\-pad\fR.
If one or more options are provided, then \fIindex\fR may be given as
a list of row indices to which the configuration options will operate on.
Indices may be integers, window names or the keyword \fIall\fR. For \fIall\fR
-the options apply to all rows currently occupied by content windows. For
-a window name, that window must be a content window of this container and the options
-apply to all rows currently occupied by the container window.
+the options apply to all rows currently occupied by content windows. For a
+window name, that window must be a content window of this container and the
+options apply to all rows currently occupied by the container window.
The \fB\-minsize\fR option sets the minimum size, in screen units,
that will be permitted for this row.
The \fB\-weight\fR option (an integer value)
@@ -276,6 +307,7 @@ If only the container window and index is specified, all the current settings
are returned in a list of
.QW "-option value"
pairs.
+.\" METHOD: remove
.TP
\fBgrid remove \fIwindow \fR?\fIwindow ...\fR?
.
@@ -288,11 +320,12 @@ geometry manager, the previous values are retained.
.RS
.PP
.VS "TIP 518"
-If the last content window of the container becomes unmanaged, this will also send
-the virtual event \fB<<NoManagedChild>>\fR to the container; the container
-may choose to resize itself (or otherwise respond) to such a change.
+If the last content window of the container becomes unmanaged, this will also
+send the virtual event \fB<<NoManagedChild>>\fR to the container; the
+container may choose to resize itself (or otherwise respond) to such a change.
.VE "TIP 518"
.RE
+.\" METHOD: size
.TP
\fBgrid size \fIcontainer\fR
.
@@ -300,14 +333,7 @@ Returns the size of the grid (in columns then rows) for \fIcontainer\fR.
The size is determined either by the \fIcontent\fR occupying the largest
row or column, or the largest column or row with a \fB\-minsize\fR,
\fB\-weight\fR, or \fB\-pad\fR that is non-zero.
-.TP
-\fBgrid content \fIwindow\fR ?\fI\-option value\fR?
-.
-If no options are supplied, a list of all of the content in \fIwindow\fR
-is returned, most recently managed first.
-\fIOption\fR can be either \fB\-row\fR or \fB\-column\fR which
-causes only the content in the row (or column) specified by \fIvalue\fR
-to be returned.
+.\" METHOD: slaves
.TP
\fBgrid slaves \fIwindow\fR ?\fI\-option value\fR?
.
@@ -328,21 +354,15 @@ relative to other \fIcontent\fRs in the same grid command, and the presence
of the characters \fB\-\fR, \fBx\fR, and \fB^\fR in \fBgrid\fR
command where \fIcontent\fR names are normally expected.
.RS
-.TP
-\fB\-\fR
-.
+.IP \fB\-\fR
This increases the \fB\-columnspan\fR of the \fIcontent\fR to the left. Several
-\fB\-\fR's in a row will successively increase the number of columns spanned. A \fB\-\fR
-may not follow a \fB^\fR or a \fBx\fR, nor may it be the first \fIcontent\fR
-argument to \fBgrid configure\fR.
-.TP
-\fBx\fR
-.
+\fB\-\fR's in a row will successively increase the number of columns spanned.
+A \fB\-\fR may not follow a \fB^\fR or a \fBx\fR, nor may it be the first
+\fIcontent\fR argument to \fBgrid configure\fR.
+.IP \fBx\fR
This leaves an empty column between the \fIcontent\fR on the left and
the \fIcontent\fR on the right.
-.TP
-\fB^\fR
-.
+.IP \fB^\fR
This extends the \fB\-rowspan\fR of the \fIcontent\fR above the \fB^\fR's
in the grid. The number of \fB^\fR's in a row must match the number of
columns spanned by the \fIcontent\fR above it.
@@ -359,8 +379,8 @@ away from the layout as needed.
For the final step, each content is positioned in its row(s) and column(s)
based on the setting of its \fIsticky\fR flag.
.PP
-To compute the minimum size of a layout, the grid geometry manager
-first looks at all content whose \fB\-columnspan\fR and \fB\-rowspan\fR values are one,
+To compute the minimum size of a layout, the grid geometry manager first looks
+at all content whose \fB\-columnspan\fR and \fB\-rowspan\fR values are one,
and computes the nominal size of each row or column to be either the
\fIminsize\fR for that row or column, or the sum of the \fIpad\fRding
plus the size of the largest content, whichever is greater. After that
@@ -441,17 +461,17 @@ A toplevel window containing a text widget and two scrollbars:
.CS
# Make the widgets
toplevel .t
-text .t.txt \-wrap none \-xscroll {.t.h set} \-yscroll {.t.v set}
-scrollbar .t.v \-orient vertical \-command {.t.txt yview}
-scrollbar .t.h \-orient horizontal \-command {.t.txt xview}
+text .t.txt -wrap none -xscroll {.t.h set} -yscroll {.t.v set}
+scrollbar .t.v -orient vertical -command {.t.txt yview}
+scrollbar .t.h -orient horizontal -command {.t.txt xview}
# Lay them out
-\fBgrid\fR .t.txt .t.v \-sticky nsew
-\fBgrid\fR .t.h \-sticky nsew
+\fBgrid\fR .t.txt .t.v -sticky nsew
+\fBgrid\fR .t.h -sticky nsew
# Tell the text widget to take all the extra room
-\fBgrid rowconfigure\fR .t .t.txt \-weight 1
-\fBgrid columnconfigure\fR .t .t.txt \-weight 1
+\fBgrid rowconfigure\fR .t .t.txt -weight 1
+\fBgrid columnconfigure\fR .t .t.txt -weight 1
.CE
.PP
Three widgets of equal width, despite their different
@@ -459,12 +479,12 @@ Three widgets of equal width, despite their different
widths:
.PP
.CS
-button .b \-text "Foo"
-entry .e \-textvariable foo ; set foo "Hello World!"
-label .l \-text "This is a fairly long piece of text"
+button .b -text "Foo"
+entry .e -textvariable foo ; set foo "Hello World!"
+label .l -text "This is a fairly long piece of text"
-\fBgrid\fR .b .e .l \-sticky ew
-\fBgrid columnconfigure\fR . "all" \-uniform allTheSame
+\fBgrid\fR .b .e .l -sticky ew
+\fBgrid columnconfigure\fR . "all" -uniform allTheSame
.CE
.SH "SEE ALSO"
pack(n), place(n)
diff --git a/doc/image.n b/doc/image.n
index 24b768a..0d14e02 100644
--- a/doc/image.n
+++ b/doc/image.n
@@ -12,15 +12,17 @@
.SH NAME
image \- Create and manipulate images
.SH SYNOPSIS
-\fBimage\fR \fIoption \fR?\fIarg ...\fR?
+\fBimage\fI option \fR?\fIarg ...\fR?
.BE
.SH DESCRIPTION
.PP
The \fBimage\fR command is used to create, delete, and query images.
It can take several different forms, depending on the
\fIoption\fR argument. The legal forms are:
+.\" METHOD: create
.TP
\fBimage create \fItype \fR?\fIname\fR? ?\fIoption value ...\fR?
+.
Creates a new image and a command with the same name and returns its name.
\fItype\fR specifies the type of the image, which must be one of
the types currently defined (e.g., \fBbitmap\fR).
@@ -38,8 +40,10 @@ It is important to note that the image command will silently overwrite any
procedure that may currently be defined by the given name, so choose the
name wisely. It is recommended to use a separate namespace for image names
(e.g., \fB::img::logo\fR, \fB::img::large\fR).
+.\" METHOD: delete
.TP
\fBimage delete \fR?\fIname name\fR ...?
+.
Deletes each of the named images and returns an empty string.
If there are instances of the images displayed in widgets,
the images will not actually be deleted until all of the instances
@@ -50,28 +54,40 @@ Existing instances will retain their sizes but redisplay as
empty areas.
If a deleted image is recreated with another call to \fBimage create\fR,
the existing instances will use the new image.
+.\" METHOD: height
.TP
\fBimage height \fIname\fR
+.
Returns a decimal string giving the height of image \fIname\fR
in pixels.
+.\" METHOD: inuse
.TP
\fBimage inuse \fIname\fR
+.
Returns a boolean value indicating whether or not the image given by
\fIname\fR is in use by any widgets.
+.\" METHOD: names
.TP
\fBimage names\fR
+.
Returns a list containing the names of all existing images.
+.\" METHOD: type
.TP
\fBimage type \fIname\fR
+.
Returns the type of image \fIname\fR (the value of the \fItype\fR
argument to \fBimage create\fR when the image was created).
+.\" METHOD: types
.TP
\fBimage types\fR
+.
Returns a list whose elements are all of the valid image types
(i.e., all of the values that may be supplied for the \fItype\fR
argument to \fBimage create\fR).
+.\" METHOD: width
.TP
\fBimage width \fIname\fR
+.
Returns a decimal string giving the width of image \fIname\fR
in pixels.
.PP
@@ -83,18 +99,15 @@ page for the particular image type for details.
The following image types are defined by Tk so they will be available
in any Tk application.
Individual applications or extensions may define additional types.
-.TP
-\fBbitmap\fR
+.IP \fBbitmap\fR
Each pixel in the image displays a foreground color, a background
color, or nothing.
See the \fBbitmap\fR manual entry for more information.
-.TP
-\fBphoto\fR
+.IP \fBphoto\fR
Displays a variety of full-color images, using dithering to
approximate colors on displays with limited color capabilities.
See the \fBphoto\fR manual entry for more information.
-.TP
-\fBnsimage\fR
+.IP \fBnsimage\fR
This type is only available in the Aqua platform. It is a full-color
image which may be created from a named system image. It has options
designed to facilitate the use of these images in buttons. An
diff --git a/doc/label.n b/doc/label.n
index 290ac8a..e50f8b1 100644
--- a/doc/label.n
+++ b/doc/label.n
@@ -12,7 +12,7 @@
.SH NAME
label \- Create and manipulate 'label' non-interactive text or image widgets
.SH SYNOPSIS
-\fBlabel\fR \fIpathName \fR?\fIoptions\fR?
+\fBlabel\fI pathName \fR?\fIoptions\fR?
.SO
\-activebackground \-disabledforeground \-padx
\-activeforeground \-font \-pady
@@ -80,14 +80,18 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for label widgets:
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
+.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBlabel\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
@@ -108,18 +112,18 @@ labels are not intended to be interactive.
.PP
.CS
# Make the widgets
-\fBlabel\fR .t \-text "This widget is at the top" \-bg red
-\fBlabel\fR .b \-text "This widget is at the bottom" \-bg green
-\fBlabel\fR .l \-text "Left\enHand\enSide"
-\fBlabel\fR .r \-text "Right\enHand\enSide"
+\fBlabel\fR .t -text "This widget is at the top" -bg red
+\fBlabel\fR .b -text "This widget is at the bottom" -bg green
+\fBlabel\fR .l -text "Left\enHand\enSide"
+\fBlabel\fR .r -text "Right\enHand\enSide"
text .mid
\&.mid insert end "This layout is like Java's BorderLayout"
# Lay them out
-pack .t \-side top \-fill x
-pack .b \-side bottom \-fill x
-pack .l \-side left \-fill y
-pack .r \-side right \-fill y
-pack .mid \-expand 1 \-fill both
+pack .t -side top -fill x
+pack .b -side bottom -fill x
+pack .l -side left -fill y
+pack .r -side right -fill y
+pack .mid -expand 1 -fill both
.CE
.SH "SEE ALSO"
labelframe(n), button(n), ttk::label(n)
diff --git a/doc/labelframe.n b/doc/labelframe.n
index 89f56c4..4d3aacb 100644
--- a/doc/labelframe.n
+++ b/doc/labelframe.n
@@ -12,7 +12,7 @@
.SH NAME
labelframe \- Create and manipulate 'labelframe' labelled container widgets
.SH SYNOPSIS
-\fBlabelframe\fR \fIpathName\fR ?\fIoptions\fR?
+\fBlabelframe\fI pathName\fR ?\fIoptions\fR?
.SO
\-borderwidth \-highlightbackground \-pady
\-cursor \-highlightcolor \-relief
@@ -101,14 +101,18 @@ operations on the widget. It has the following general form:
the labelframe widget's path name. \fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for frame widgets:
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
+.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBlabelframe\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
@@ -132,10 +136,10 @@ 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
- [\fBlabelframe\fR .bun \-text "Bun"] \-sticky news
-grid [\fBlabelframe\fR .cheese \-text "Cheese Option"] \e
- [\fBlabelframe\fR .pickle \-text "Pickle Option"] \-sticky news
+grid [\fBlabelframe\fR .burger -text "Burger"] \e
+ [\fBlabelframe\fR .bun -text "Bun"] -sticky news
+grid [\fBlabelframe\fR .cheese -text "Cheese Option"] \e
+ [\fBlabelframe\fR .pickle -text "Pickle Option"] -sticky news
foreach {type name val} {
burger Beef beef
burger Lamb lamb
@@ -157,9 +161,9 @@ foreach {type name val} {
pickle Onions onion
pickle Chili chili
} {
- set w [radiobutton .$type.$val \-text $name \-anchor w \e
- \-variable $type \-value $val]
- pack $w \-side top \-fill x
+ set w [radiobutton .$type.$val -text $name -anchor w \e
+ -variable $type -value $val]
+ pack $w -side top -fill x
}
set burger beef
set bun white
diff --git a/doc/listbox.n b/doc/listbox.n
index a047be6..e1ac2de 100644
--- a/doc/listbox.n
+++ b/doc/listbox.n
@@ -12,7 +12,7 @@
.SH NAME
listbox \- Create and manipulate 'listbox' item list widgets
.SH SYNOPSIS
-\fBlistbox\fR \fIpathName \fR?\fIoptions\fR?
+\fBlistbox\fI pathName \fR?\fIoptions\fR?
.SO
\-background \-borderwidth \-cursor
\-disabledforeground \-exportselection \-font
@@ -95,37 +95,28 @@ Many of the widget commands for listboxes take one or more indices
as arguments.
An index specifies a particular element of the listbox, in any of
the following ways:
-.TP 12
-\fInumber\fR
-.
+.IP \fInumber\fR 12
Specifies the element as a numerical index, where 0 corresponds
to the first element in the listbox.
-.TP 12
-\fBactive\fR
-.
+.IP \fBactive\fR 12
Indicates the element that has the location cursor. This element
will be displayed as specified by \fB\-activestyle\fR when the listbox
has the keyboard focus, and it is specified with the \fBactivate\fR
widget command.
-.TP 12
-\fBanchor\fR
-.
+.IP \fBanchor\fR 12
Indicates the anchor point for the selection, which is set with the
\fBselection anchor\fR widget command.
-.TP 12
-\fBend\fR
-.
+.IP \fBend\fR 12
Indicates the end of the listbox.
For most commands this refers to the last element in the listbox,
but for a few commands such as \fBindex\fR and \fBinsert\fR
it refers to the element just after the last one.
-.TP 12
-\fB@\fIx\fB,\fIy\fR
+.IP \fB@\fIx\fB,\fIy\fR 12
Indicates the element that covers the point in the listbox window
specified by \fIx\fR and \fIy\fR (in pixel coordinates). If no
element covers that point, then the closest element to that
point is used.
-.LP
+.PP
Indexes support the same simple interpretation as
for the command \fBstring index\fR, with simple integer index
arithmetic and indexing relative to \fBend\fR.
@@ -144,8 +135,9 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for listbox widgets:
+.\" METHOD: activate
.TP
-\fIpathName \fBactivate\fR \fIindex\fR
+\fIpathName \fBactivate\fI index\fR
.
Sets the active element to the one indicated by \fIindex\fR.
If \fIindex\fR is outside the range of elements in the listbox
@@ -153,8 +145,9 @@ then the closest element is activated.
The active element is drawn as specified by \fB\-activestyle\fR when the
widget has the input focus, and its index may be retrieved with the
index \fBactive\fR.
+.\" METHOD: bbox
.TP
-\fIpathName \fBbbox\fR \fIindex\fR
+\fIpathName \fBbbox\fI index\fR
.
Returns a list of four numbers describing the bounding box of
the text in the element given by \fIindex\fR.
@@ -168,13 +161,15 @@ or if \fIindex\fR refers to a non-existent element,
then the result is an empty string; if the element is
partially visible, the result gives the full area of the element,
including any parts that are not visible.
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBlistbox\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -190,6 +185,7 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBlistbox\fR
command.
+.\" METHOD: curselection
.TP
\fIpathName \fBcurselection\fR
.
@@ -197,6 +193,7 @@ Returns a list containing the numerical indices of
all of the elements in the listbox that are currently selected.
If there are no elements selected in the listbox then an empty
string is returned.
+.\" METHOD: delete
.TP
\fIpathName \fBdelete \fIfirst \fR?\fIlast\fR?
.
@@ -204,6 +201,7 @@ Deletes one or more elements of the listbox. \fIFirst\fR and \fIlast\fR
are indices specifying the first and last elements in the range
to delete. If \fIlast\fR is not specified it defaults to
\fIfirst\fR, i.e. a single element is deleted.
+.\" METHOD: get
.TP
\fIpathName \fBget \fIfirst\fR ?\fIlast\fR?
.
@@ -215,12 +213,14 @@ are all of the listbox elements between \fIfirst\fR and \fIlast\fR,
inclusive.
Both \fIfirst\fR and \fIlast\fR may have any of the standard
forms for indices.
+.\" METHOD: index
.TP
\fIpathName \fBindex \fIindex\fR
.
Returns the integer index value that corresponds to \fIindex\fR.
If \fIindex\fR is \fBend\fR the return value is a count of the number
of elements in the listbox (not the index of the last element).
+.\" METHOD: insert
.TP
\fIpathName \fBinsert \fIindex \fR?\fIelement element ...\fR?
.
@@ -228,12 +228,14 @@ Inserts zero or more new elements in the list just before the
element given by \fIindex\fR. If \fIindex\fR is specified as
\fBend\fR then the new elements are added to the end of the
list. Returns an empty string.
+.\" METHOD: itemcget
.TP
\fIpathName \fBitemcget \fIindex option\fR
.
Returns the current value of the item configuration option given
by \fIoption\fR. \fIOption\fR may have any of the values accepted
by the \fBitemconfigure\fR command.
+.\" METHOD: itemconfigure
.TP
\fIpathName \fBitemconfigure \fIindex\fR ?\fIoption\fR? ?\fIvalue\fR? ?\fIoption value ...\fR?
.
@@ -249,22 +251,26 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string. The following options
are currently supported for items:
.RS
+.\" OPTION: -background
.TP
\fB\-background \fIcolor\fR
.
\fIColor\fR specifies the background color to use when displaying the
item. It may have any of the forms accepted by \fBTk_GetColor\fR.
+.\" OPTION: -foreground
.TP
\fB\-foreground \fIcolor\fR
.
\fIColor\fR specifies the foreground color to use when displaying the
item. It may have any of the forms accepted by \fBTk_GetColor\fR.
+.\" OPTION: -selectbackground
.TP
\fB\-selectbackground \fIcolor\fR
.
\fIcolor\fR specifies the background color to use when displaying the
item while it is selected. It may have any of the forms accepted by
\fBTk_GetColor\fR.
+.\" OPTION: -selectforeground
.TP
\fB\-selectforeground \fIcolor\fR
.
@@ -272,13 +278,15 @@ item while it is selected. It may have any of the forms accepted by
item while it is selected. It may have any of the forms accepted by
\fBTk_GetColor\fR.
.RE
+.\" METHOD: nearest
.TP
\fIpathName \fBnearest \fIy\fR
.
Given a y-coordinate within the listbox window, this command returns
the index of the (visible) listbox element nearest to that y-coordinate.
+.\" METHOD: scan
.TP
-\fIpathName \fBscan\fR \fIoption args\fR
+\fIpathName \fBscan\fI option args\fR
.
This command is used to implement scanning on listboxes. It has
two forms, depending on \fIoption\fR:
@@ -302,6 +310,7 @@ with mouse motion events in the widget, to produce the effect of
dragging the list at high speed through the window. The return
value is an empty string.
.RE
+.\" METHOD: see
.TP
\fIpathName \fBsee \fIindex\fR
.
@@ -311,6 +320,7 @@ If the element is already visible then the command has no effect;
if the element is near one edge of the window then the listbox
scrolls to bring the element into view at the edge; otherwise
the listbox scrolls to center the element.
+.\" METHOD: selection
.TP
\fIpathName \fBselection \fIoption arg\fR
.
@@ -346,11 +356,13 @@ Selects all of the elements in the range between
\fIfirst\fR and \fIlast\fR, inclusive, without affecting
the selection state of elements outside that range.
.RE
+.\" METHOD: size
.TP
\fIpathName \fBsize\fR
.
Returns a decimal string indicating the total number of elements
in the listbox.
+.\" METHOD: xview
.TP
\fIpathName \fBxview \fR?\fIargs\fR
.
@@ -399,6 +411,7 @@ If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
\fInumber\fR character units (the width of the \fB0\fR character)
on the display.
.RE
+.\" METHOD: yview
.TP
\fIpathName \fByview \fR?\fIargs\fR?
.
@@ -408,6 +421,7 @@ It can take any of the following forms:
.RS
.TP
\fIpathName \fByview\fR
+.
Returns a list containing two elements, both of which are real fractions
between 0 and 1.
The first element gives the position of the listbox element at the
diff --git a/doc/loadTk.n b/doc/loadTk.n
index e1c93c8..122b2be 100644
--- a/doc/loadTk.n
+++ b/doc/loadTk.n
@@ -11,7 +11,7 @@
.SH NAME
safe::loadTk \- Load Tk into a safe interpreter.
.SH SYNOPSIS
-\fBsafe::loadTk \fIchild\fR ?\fB\-use\fR \fIwindowId\fR? ?\fB\-display\fR \fIdisplayName\fR?
+\fBsafe::loadTk \fIchild\fR ?\fB\-use\fI windowId\fR? ?\fB\-display\fI displayName\fR?
.BE
.SH DESCRIPTION
.PP
@@ -32,7 +32,7 @@ a window belonging to another application. As a convenience, if the window you
plan to use is a Tk Window of the application you can use the window name
(e.g.,
.QW \fB.x.y\fR )
-instead of its window Id (e.g., from \fBwinfo id\fR \fB.x.y\fR).
+instead of its window Id (e.g., from \fBwinfo id\fB .x.y\fR).
When \fB\-use\fR is not specified, a new toplevel window is created for the
.QW .
window of the safe interpreter. On X11 if you want the embedded window to use
@@ -51,7 +51,7 @@ Tk initialization is now safe with respect to not trusting the child's state
for startup. \fBsafe::loadTk\fR registers the child's name so when the Tk
initialization (\fBTk_SafeInit\fR) is called and in turn calls the parent's
\fBsafe::InitTk\fR it will return the desired \fBargv\fR equivalent
-(\fB\-use\fR \fIwindowId\fR, correct \fB\-display\fR, etc.)
+(\fB\-use\fI windowId\fR, correct \fB\-display\fR, etc.)
.PP
When \fB\-use\fR is not used, the new toplevel created is specially decorated
so the user is always aware that the user interface presented comes from a
diff --git a/doc/menu.n b/doc/menu.n
index 3b5485a..9894a6c 100644
--- a/doc/menu.n
+++ b/doc/menu.n
@@ -13,8 +13,9 @@
menu, tk_menuSetFocus \- Create and manipulate 'menu' widgets and menubars
.SH SYNOPSIS
.nf
-\fBmenu\fR \fIpathName \fR?\fIoptions\fR?
-\fBtk_menuSetFocus\fR \fIpathName\fR
+\fBmenu\fI pathName \fR?\fIoptions\fR?
+\fBtk_menuSetFocus\fI pathName\fR
+.fi
.SO
\-activebackground \-borderwidth \-foreground
\-activeborderwidth \-cursor \-relief
@@ -312,57 +313,36 @@ Many of the widget commands for a menu take as one argument an
indicator of which entry of the menu to operate on. These
indicators are called \fIindex\fRes and may be specified in
any of the following forms:
-.TP 12
-\fBactive\fR
-.
+.IP \fBactive\fR 12
Indicates the entry that is currently active. If no entry is
active then this form is equivalent to \fB{}\fR. This form may
not be abbreviated.
-.TP 12
-\fBend\fR
-.
+.IP \fBend\fR 12
Indicates the bottommost entry in the menu. If there are no
entries in the menu then this form is equivalent to \fB{}\fR.
This form may not be abbreviated.
-.TP 12
-\fBlast\fR
-.
+.IP \fBlast\fR 12
Same as \fBend\fR.
-.TP 12
-\fB{}\fR
-.
+.IP \fB{}\fR 12
Indicates
.QW "no entry at all" ;
this is used most commonly with
the \fBactivate\fR option to deactivate all the entries in the
menu. In most cases the specification of \fB{}\fR causes
nothing to happen in the widget command.
-.TP 12
-\fBnone\fR
-.
-Same as \fB{}\fR
-This form is deprecated and may not be abbreviated.
-.TP 12
-\fB@\fIx\fB,\fIy\fR
-.
+.IP \fB@\fIx\fB,\fIy\fR 12
Indicates the entry that covers the point in the menu's window specified
by \fIx\fR and \fIy\fR (in pixel coordinates).
If no entry covers that point, then this form is equivalent to \fB{}\fR.
If only a single number is specified, it is treated as the y-coordinate.
-.TP 12
-\fInumber\fR
-.
+.IP \fInumber\fR 12
Specifies the entry numerically, where 0 corresponds
to the top-most entry of the menu, 1 to the entry below it, and
so on.
-.TP 12
-\fIid\fR
-.
+.IP \fIid\fR 12
If the index does not satisfy one of the above forms then the menu is
searched for an entry with the specified id.
-.TP 12
-\fIpattern\fR
-.
+.IP \fIpattern\fR 12
If all of the above methods for finding an entry fail, this
form is used. \fIPattern\fR is pattern-matched against the label of
each entry in the menu, in order from the top down, until a
@@ -376,15 +356,17 @@ for the command \fBstring index\fR, with simple integer index
arithmetic and indexing relative to \fBend\fR.
.PP
The following widget commands are possible for menu widgets:
+.\" METHOD: activate
.TP
\fIpathName \fBactivate \fIindex\fR
.
Change the state of the entry indicated by \fIindex\fR to \fBactive\fR
and redisplay it using its active colors.
Any previously-active entry is deactivated. If \fIindex\fR
-is specified as \fB{}\fR or \fBnone\fR, or if the specified entry is
+is specified as \fB{}\fR, or if the specified entry is
disabled, then the menu ends up with no active entry.
Returns an empty string.
+.\" METHOD: add
.TP
\fIpathName \fBadd \fItype \fR?\fIid\fR? ?\fIoption value option value ...\fR?
.
@@ -398,6 +380,7 @@ identifier is generated.
If additional arguments are present, they specify the options listed in the
\fBMENU ENTRY OPTIONS\fR section below.
The \fBadd\fR widget command returns the id of the new entry.
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
.
@@ -405,6 +388,7 @@ Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBmenu\fR
command.
+.\" METHOD: clone
.TP
\fIpathName \fBclone \fInewPathname\fR ?\fIcloneType\fR?
.
@@ -414,6 +398,7 @@ propagated to the original menu and vice versa. \fIcloneType\fR can be
\fBnormal\fR, \fBmenubar\fR, or \fBtearoff\fR. Should not normally be
called outside of the Tk library. See the \fBCLONES\fR section for
more information.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -429,6 +414,7 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBmenu\fR
command.
+.\" METHOD: delete
.TP
\fIpathName \fBdelete \fIindex1\fR ?\fIindex2\fR?
.
@@ -437,6 +423,7 @@ Delete all of the menu entries between \fIindex1\fR and
If \fIindex2\fR is omitted then it defaults to \fIindex1\fR.
Attempts to delete a tear-off menu entry are ignored (instead, you
should change the \fB\-tearoff\fR option to remove the tear-off entry).
+.\" METHOD: entrycget
.TP
\fIpathName \fBentrycget \fIindex option\fR
.
@@ -444,6 +431,7 @@ Returns the current value of a configuration option for
the entry given by \fIindex\fR.
\fIOption\fR may have any of the names described in the
\fBMENU ENTRY OPTIONS\fR section below.
+.\" METHOD: entryconfigure
.TP
\fIpathName \fBentryconfigure \fIindex \fR?\fIoptions...\fR?
.
@@ -457,6 +445,7 @@ modified as indicated in the command and the command returns an empty string.
If no \fIoptions\fR are specified, returns a list describing
the current options for entry \fIindex\fR (see \fBTk_ConfigureInfo\fR for
information on the format of this list).
+.\" METHOD: id
.TP
\fIpathName \fBid \fIindex\fR
.
@@ -465,11 +454,13 @@ This is the identifier that was assigned to the entry when it was created
using the \fBadd\fR or \fBinsert\fR widget command.
Returns an empty string for the tear-off entry, or if \fIindex\fR is
equivalent to \fB{}\fR.
+.\" METHOD: index
.TP
\fIpathName \fBindex \fIindex\fR
.
Returns the numerical index corresponding to \fIindex\fR, or
-\fB{}\fR if \fIindex\fR was specified as \fB{}\fR or \fBnone\fR.
+\fB{}\fR if \fIindex\fR was specified as \fB{}\fR.
+.\" METHOD: insert
.TP
\fIpathName \fBinsert \fIindex type \fR?\fIid\fR? ?\fIoption value option value ...\fR?
.
@@ -480,6 +471,7 @@ to the end of the menu. The \fItype\fR, \fIid\fR, \fIoption\fR, and
widget command. It is not possible to insert new menu entries before the
tear-off entry, if the menu has one.
The \fBinsert\fR widget command returns the id of the new entry.
+.\" METHOD: invoke
.TP
\fIpathName \fBinvoke \fIindex\fR
.
@@ -492,6 +484,7 @@ command. Otherwise the result is an empty string. Note: invoking
a menu entry does not automatically unpost the menu; the default
bindings normally take care of this before invoking the \fBinvoke\fR
widget command.
+.\" METHOD: post
.TP
\fIpathName \fBpost \fIx y\fR ?\fIindex\fR?
.
@@ -506,6 +499,7 @@ posting the menu and the result of that script is returned as the
result of the \fBpost\fR widget command. If an error returns while
executing the command, then the error is returned without posting the
menu.
+.\" METHOD: postcascade
.TP
\fIpathName \fBpostcascade \fIindex\fR
.
@@ -515,6 +509,7 @@ If \fIindex\fR does not correspond to a cascade entry,
or if \fIpathName\fR is not posted,
the command has no effect except to unpost any currently posted
submenu.
+.\" METHOD: type
.TP
\fIpathName \fBtype \fIindex\fR
.
@@ -522,6 +517,7 @@ Returns the type of the menu entry given by \fIindex\fR.
This is the \fItype\fR argument passed to the \fBadd\fR or \fBinsert\fR widget
command when the entry was created, such as \fBcommand\fR
or \fBseparator\fR, or \fBtearoff\fR for a tear-off entry.
+.\" METHOD: unpost
.TP
\fIpathName \fBunpost\fR
.
@@ -529,11 +525,13 @@ Unmap the window so that it is no longer displayed. If a
lower-level cascaded menu is posted, unpost that menu. Returns an
empty string. This subcommand does not work on Windows and the
Macintosh, as those platforms have their own way of unposting menus.
+.\" METHOD: xposition
.TP
\fIpathName \fBxposition \fIindex\fR
.
Returns a decimal string giving the x-coordinate within the menu
window of the leftmost pixel in the entry specified by \fIindex\fR.
+.\" METHOD: yposition
.TP
\fIpathName \fByposition \fIindex\fR
.
@@ -542,6 +540,7 @@ window of the topmost pixel in the entry specified by \fIindex\fR.
.SH "MENU ENTRY OPTIONS"
The following options are allowed on menu entries. Most options are not
supported by all entry types.
+.\" OPTION: -activebackground
.TP
\fB\-activebackground \fIvalue\fR
.
@@ -553,6 +552,7 @@ If the \fBtk_strictMotif\fR variable has been set to request strict
Motif compliance, then this option is ignored and the \fB\-background\fR
option is used in its place.
This option is not available for separator or tear-off entries.
+.\" OPTION: -activeforeground
.TP
\fB\-activeforeground \fIvalue\fR
.
@@ -560,7 +560,7 @@ Specifies a foreground color to use for displaying this entry when it
is active. This option is ignored on Aqua/macOS.
If this option is specified as an empty string (the default), then the
\fB\-activeforeground\fR option for the overall menu is used.
-This option is not available for separator or tear-off entries.
+.\" OPTION: -accelerator
.TP
\fB\-accelerator \fIvalue\fR
.
@@ -570,6 +570,7 @@ used to invoke the same function as the menu entry. This is a display
option, it does not actually set the corresponding binding (which can
be achieved using the \fBbind\fR command). This option is not available
for separator or tear-off entries.
+.\" OPTION: -background
.TP
\fB\-background \fIvalue\fR
.
@@ -579,6 +580,7 @@ This option is ignored on Aqua/macOS.
If it is specified as an empty string (the default), then the
\fB\-background\fR option for the overall menu is used.
This option is not available for separator or tear-off entries.
+.\" OPTION: -bitmap
.TP
\fB\-bitmap \fIvalue\fR
.
@@ -591,6 +593,7 @@ to an empty string to enable a textual label to be displayed.
If a \fB\-image\fR option has been specified, it overrides
\fB\-bitmap\fR.
This option is not available for separator or tear-off entries.
+.\" OPTION: -columnbreak
.TP
\fB\-columnbreak \fIvalue\fR
.
@@ -599,11 +602,13 @@ this option is one, the entry appears at the top of a new column in the
menu.
This option is ignored on Aqua/macOS, where menus are always a single
column.
+.\" OPTION: -command
.TP
\fB\-command \fIvalue\fR
.
Specifies a Tcl command to execute when the menu entry is invoked.
Not available for separator or tear-off entries.
+.\" OPTION: -compound
.TP
\fB\-compound \fIvalue\fR
.
@@ -614,6 +619,7 @@ Valid values for this option are \fBbottom\fR, \fBcenter\fR,
is \fBnone\fR, meaning that the button will display either an image or
text, depending on the values of the \fB\-image\fR and \fB\-bitmap\fR
options.
+.\" OPTION: -font
.TP
\fB\-font \fIvalue\fR
.
@@ -622,6 +628,7 @@ string in this entry.
If this option is specified as an empty string (the default) then
the \fB\-font\fR option for the overall menu is used.
This option is not available for separator or tear-off entries.
+.\" OPTION: -foreground
.TP
\fB\-foreground \fIvalue\fR
.
@@ -631,6 +638,7 @@ This option is ignored on Aqua/macOS.
If it is specified as an empty string (the default), then the
\fB\-foreground\fR option for the overall menu is used.
This option is not available for separator or tear-off entries.
+.\" OPTION: -hidemargin
.TP
\fB\-hidemargin \fIvalue\fR
.
@@ -638,6 +646,7 @@ Specifies whether the standard margins should be drawn for this menu
entry. This is useful when creating palette with images in them, i.e.,
color palettes, pattern palettes, etc. 1 indicates that the margin for
the entry is hidden; 0 means that the margin is used.
+.\" OPTION: -image
.TP
\fB\-image \fIvalue\fR
.
@@ -650,34 +659,40 @@ This option overrides the \fB\-label\fR and \fB\-bitmap\fR options
but may be reset to an empty string to enable a textual or
bitmap label to be displayed.
This option is not available for separator or tear-off entries.
+.\" OPTION: -indicatoron
.TP
\fB\-indicatoron \fIvalue\fR
.
Available only for checkbutton and radiobutton entries.
\fIValue\fR is a boolean that determines whether or not the
indicator should be displayed.
+.\" OPTION: -label
.TP
\fB\-label \fIvalue\fR
.
Specifies a string to display as an identifying label in the menu
entry. Not available for separator or tear-off entries.
+.\" OPTION: -menu
.TP
\fB\-menu \fIvalue\fR
.
Available only for cascade entries. Specifies the path name of
the submenu associated with this entry.
The submenu must be a child of the menu.
+.\" OPTION: -offvalue
.TP
\fB\-offvalue \fIvalue\fR
.
Available only for checkbutton entries. Specifies the value to
store in the entry's associated variable when the entry is
deselected.
+.\" OPTION: -onvalue
.TP
\fB\-onvalue \fIvalue\fR
.
Available only for checkbutton entries. Specifies the value to
store in the entry's associated variable when the entry is selected.
+.\" OPTION: -selectcolor
.TP
\fB\-selectcolor \fIvalue\fR
.
@@ -686,6 +701,7 @@ Specifies the color to display in the indicator when the entry is
selected.
If the value is an empty string (the default) then the \fB\-selectcolor\fR
option for the menu determines the indicator color.
+.\" OPTION: -selectimage
.TP
\fB\-selectimage \fIvalue\fR
.
@@ -696,6 +712,7 @@ the \fB\-image\fR option) when it is selected.
by some previous invocation of \fBimage create\fR.
This option is ignored unless the \fB\-image\fR option has
been specified.
+.\" OPTION: -state
.TP
\fB\-state \fIvalue\fR
.
@@ -713,6 +730,7 @@ In this state the entry is displayed according to the
\fB\-disabledforeground\fR option for the menu and the
\fB\-background\fR option from the entry.
This option is not available for separator entries.
+.\" OPTION: -underline
.TP
\fB\-underline \fIvalue\fR
.
@@ -723,6 +741,7 @@ implement keyboard traversal.
1 to the next character, and so on.
If a bitmap or image is displayed in the entry then this option is ignored.
This option is not available for separator or tear-off entries.
+.\" OPTION: -value
.TP
\fB\-value \fIvalue\fR
.
@@ -730,6 +749,7 @@ Available only for radiobutton entries. Specifies the value to
store in the entry's associated variable when the entry is selected.
If an empty string is specified, then the \fB\-label\fR option
for the entry as the value to store in the variable.
+.\" OPTION: -variable
.TP
\fB\-variable \fIvalue\fR
.
diff --git a/doc/menubutton.n b/doc/menubutton.n
index d07a8fe..375b69a 100644
--- a/doc/menubutton.n
+++ b/doc/menubutton.n
@@ -12,7 +12,7 @@
.SH NAME
menubutton \- Create and manipulate 'menubutton' pop-up menu indicator widgets
.SH SYNOPSIS
-\fBmenubutton\fR \fIpathName \fR?\fIoptions\fR?
+\fBmenubutton\fI pathName \fR?\fIoptions\fR?
.SO
\-activebackground \-disabledforeground \-padx
\-activeforeground \-font \-pady
@@ -122,6 +122,7 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for menubutton widgets:
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
.
@@ -129,6 +130,7 @@ Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBmenubutton\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
diff --git a/doc/message.n b/doc/message.n
index eb83d2f..95547c4 100644
--- a/doc/message.n
+++ b/doc/message.n
@@ -12,7 +12,7 @@
.SH NAME
message \- Create and manipulate 'message' non-interactive text widgets
.SH SYNOPSIS
-\fBmessage\fR \fIpathName \fR?\fIoptions\fR?
+\fBmessage\fI pathName \fR?\fIoptions\fR?
.SO
\-anchor \-background \-borderwidth
\-cursor \-font \-foreground
@@ -111,6 +111,7 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for message widgets:
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
.
@@ -118,6 +119,7 @@ Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBmessage\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
diff --git a/doc/messageBox.n b/doc/messageBox.n
index 4350b22..33825dc 100644
--- a/doc/messageBox.n
+++ b/doc/messageBox.n
@@ -23,14 +23,17 @@ popped up, \fBtk_messageBox\fR waits for the user to select one of the
buttons. Then it returns the symbolic name of the selected button.
.PP
The following option-value pairs are supported:
+.\" OPTION: -command
.TP
-\fB\-command\fR \fIstring\fR
+\fB\-command\fI string\fR
+.
Specifies the prefix of a Tcl command to invoke when the user closes the
dialog. The actual command consists of \fIstring\fR followed by a space
and the name of the button clicked by the user to close the dialog. This
is only available on Mac OS X.
+.\" OPTION: -default
.TP
-\fB\-default\fR \fIname\fR
+\fB\-default\fI name\fR
.
\fIName\fR gives the symbolic name of the default button for
this message window (
@@ -39,65 +42,59 @@ this message window (
and so on). See \fB\-type\fR
for a list of the symbolic names. If this option is not specified,
the first button in the dialog will be made the default.
+.\" OPTION: -detail
.TP
-\fB\-detail\fR \fIstring\fR
+\fB\-detail\fI string\fR
.
Specifies an auxiliary message to the main message given by the
\fB\-message\fR option. The message detail will be presented beneath the main
message and, where supported by the OS, in a less emphasized font than the
main message.
+.\" OPTION: -icon
.TP
-\fB\-icon\fR \fIiconImage\fR
+\fB\-icon\fI iconImage\fR
.
Specifies an icon to display. \fIIconImage\fR must be one of the
following: \fBerror\fR, \fBinfo\fR, \fBquestion\fR or
\fBwarning\fR. If this option is not specified, then the info icon will be
displayed.
+.\" OPTION: -message
.TP
-\fB\-message\fR \fIstring\fR
+\fB\-message\fI string\fR
.
Specifies the message to display in this message box. The
default value is an empty string.
+.\" OPTION: -parent
.TP
-\fB\-parent\fR \fIwindow\fR
+\fB\-parent\fI window\fR
.
Makes \fIwindow\fR the logical parent of the message box. The message
box is displayed on top of its parent window.
+.\" OPTION: -title
.TP
-\fB\-title\fR \fItitleString\fR
+\fB\-title\fI titleString\fR
.
Specifies a string to display as the title of the message box. The
default value is an empty string.
+.\" OPTION: -type
.TP
-\fB\-type\fR \fIpredefinedType\fR
+\fB\-type\fI predefinedType\fR
.
Arranges for a predefined set of buttons to be displayed. The
following values are possible for \fIpredefinedType\fR:
.RS
-.TP 18
-\fBabortretryignore\fR
-.
+.IP \fBabortretryignore\fR 18
Displays three buttons whose symbolic names are \fBabort\fR,
\fBretry\fR and \fBignore\fR.
-.TP 18
-\fBok\fR
-.
+.IP \fBok\fR 18
Displays one button whose symbolic name is \fBok\fR.
-.TP 18
-\fBokcancel\fR
-.
+.IP \fBokcancel\fR 18
Displays two buttons whose symbolic names are \fBok\fR and \fBcancel\fR.
-.TP 18
-\fBretrycancel\fR
-.
+.IP \fBretrycancel\fR 18
Displays two buttons whose symbolic names are \fBretry\fR and \fBcancel\fR.
-.TP 18
-\fByesno\fR
-.
+.IP \fByesno\fR 18
Displays two buttons whose symbolic names are \fByes\fR and \fBno\fR.
-.TP 18
-\fByesnocancel\fR
-.
+.IP \fByesnocancel\fR 18
Displays three buttons whose symbolic names are \fByes\fR, \fBno\fR
and \fBcancel\fR.
.RE
@@ -105,13 +102,13 @@ and \fBcancel\fR.
.SH EXAMPLE
.PP
.CS
-set answer [\fBtk_messageBox\fR \-message "Really quit?" \e
- \-icon question \-type yesno \e
- \-detail "Select \e"Yes\e" to make the application exit"]
-switch \-\- $answer {
+set answer [\fBtk_messageBox\fR -message "Really quit?" \e
+ -icon question -type yesno \e
+ -detail "Select \e"Yes\e" to make the application exit"]
+switch -- $answer {
yes exit
- no {\fBtk_messageBox\fR \-message "I know you like this application!" \e
- \-type ok}
+ no {\fBtk_messageBox\fR -message "I know you like this application!" \e
+ -type ok}
}
.CE
.SH KEYWORDS
diff --git a/doc/nsimage.n b/doc/nsimage.n
index 8b401d7..d62416f 100644
--- a/doc/nsimage.n
+++ b/doc/nsimage.n
@@ -26,67 +26,68 @@ name.
.SH OPTIONS
.PP
Valid \fIoptions\fR are:
+.\" OPTION: -source
.TP
-\fB\-source\fR
+\fB\-source\fI string\fR
.PP
The value of the \fB\-source\fR option is a string describing an
NSimage. There are several ways to interpret this string, and the
interpretation is determined by the value of the \fB\-as\fR option.
This option is required.
.PP
+.\" OPTION: -as
.TP
-\fB\-as\fR
+\fB\-as\fI type\fR
.PP
-There are four possible values for the \fB-as\fR option which specify
+There are four possible values for the \fB\-as\fR option which specify
how the source string should be interpreted. The allowed values and
their meanings are:
-.IP
-\fBname\fR
-.IP
+.RS
+.IP \fBname\fR
The source should be interpreted as the name of a named NSImage
-provided by the system. This is the default if the -as option is not specified.
-.IP
-\fBfile\fR
-.IP
+provided by the system.
+This is the default if the \fB\-as\fR option is not specified.
+.IP \fBfile\fR
The source should be interpreted as a path to an image
file in one of the formats understood by the NSImage class.
-.IP
-\fBpath\fR
-.IP
+.IP \fBpath\fR
The source should be interpreted as a path to an arbitrary
file. The type of the file will be examined and the resulting image
will be the system icon for files of that type.
-.IP
-\fBfiletype\fR
-.IP
+.IP \fBfiletype\fR
The source is interpreted as a string identifying a
particular file type. It may be a filename extension, an Apple Uniform Type
Identifier or a 4-character OSType value as used in the HFS filesystem.
+.RE
+.\" OPTION: -width
.TP
-\fB\-width\fR
+\fB\-width\fI pixels\fR
.PP
The value of the \fIwidth\fR option is an integer specifying the width
in pixels of the nsimage. If the width is not specified it will be
computed from the height so as to preserve the aspect ration. If
neither width nor height are specified then the width and height of
the underlying NSImage will be used.
+.\" OPTION: -height
.TP
-\fB\-height\fR
+\fB\-height\fI pixels\fR
.PP
The value of the \fIheight\fR option is an integer specifying the
height in pixels of the nsimage. If the height is not specified it
will be computed from the height so as to preserve the aspect ration.
If neither width nor height are specified then the width and height of
the underlying NSImage will be used.
+.\" OPTION: -radius
.TP
-\fB\-radius\fR
+\fB\-radius\fI pixels\fR
.PP
The value of the \fIradius\fR option is an integer. If non-zero the
image will be clipped to a rounded rectangle with the same width and
height as the image, but with circular arcs of the specified radius
cutting off the corners of the rectangle.
+.\" OPTION: -ring
.TP
-\fB\-ring\fR
+\fB\-ring\fI pixels\fR
.PP
The value of the \fIring\fR option is an integer. If non-zero then it
specifies the thickness of a focus ring which will be drawn around the
@@ -95,15 +96,17 @@ Preferences. The image is resized to reduce its width and height by
twice the thickness of the ring. Note that this may create a small
amount of distortion. The aspect ration of a non-square image will
change slightly.
+.\" OPTION: -alpha
.TP
-\fB\-alpha\fR
+\fB\-alpha\fI float\fR
.PP
The value of the \fIalpha\fR option should be a floating point number
between 0.0 and 1.0. This alpha value will be applied to each pixel
of the nsimage, producing a partially transparent image. The default value
-is 1,0, which makes the image opaque.
+is 1.0, which makes the image opaque.
+.\" OPTION: -pressed
.TP
-\fB\-pressed\fR
+\fB\-pressed\fI boolean\fR
.PP
The \fIpressed\fR option takes a boolean value. If the value is true
or 1 then the image will be algorithmically modified to become darker
@@ -111,8 +114,9 @@ in light mode or lighter in dark mode. The default is false. For an
image button, the primary image should use the value false while the
pressed image should be the same image but with the \fIpressed\fR
option set to true.
+.\" OPTION: -template
.TP
-\fB\-template\fR
+\fB\-template\fI boolean\fR
.PP
The \fItemplate\fR option takes a boolean value. If the value is true
or 1 then the image will be marked as being a template image. This
diff --git a/doc/option.n b/doc/option.n
index 6042010..8411ce4 100644
--- a/doc/option.n
+++ b/doc/option.n
@@ -22,8 +22,9 @@ option \- Add/retrieve window options to/from the option database
.SH DESCRIPTION
.PP
The \fBoption\fR command allows you to add entries to the Tk option
-database or to retrieve options from the database. The \fBadd\fR
-form of the command adds a new option to the database.
+database or to retrieve options from the database.
+.\" METHOD: add
+The \fBadd\fR form of the command adds a new option to the database.
\fIPattern\fR contains
the option being specified, and consists of names and/or classes
separated by asterisks or dots, in the usual X format (see
@@ -35,6 +36,7 @@ is specified, it indicates the priority level for this option (see
below for legal values); it defaults to \fBinteractive\fR.
This command always returns an empty string.
.PP
+.\" METHOD: clear
The \fBoption clear\fR command clears the option database. Default
options (from the
\fBRESOURCE_MANAGER\fR property or the \fB.Xdefaults\fR
@@ -42,6 +44,7 @@ file) will be reloaded automatically the next time an
option is added to the database or removed from it. This command
always returns an empty string.
.PP
+.\" METHOD: get
The \fBoption get\fR command returns the value of the option
specified for \fIwindow\fR
under \fIname\fR and \fIclass\fR. If several entries in the option
@@ -52,6 +55,7 @@ entries at the same priority level, then it returns whichever entry
was most recently entered into the option database. If there are
no matching entries, then the empty string is returned.
.PP
+.\" METHOD: readfile
The \fBreadfile\fR form of the command reads \fIfileName\fR,
which should have the standard format for an
X resource database such as \fB.Xdefaults\fR, and adds all the
@@ -67,20 +71,16 @@ This cannot be changed, setting the [encoding system] has no effect.
.PP
The \fIpriority\fR arguments to the \fBoption\fR command are
normally specified symbolically using one of the following values:
-.TP
-\fBwidgetDefault\fR
+.IP \fBwidgetDefault\fR3
Level 20. Used for default values hard-coded into widgets.
-.TP
-\fBstartupFile\fR
+.IP \fBstartupFile\fR
Level 40. Used for options specified in application-specific
startup files.
-.TP
-\fBuserDefault\fR
+.IP \fBuserDefault\fR
Level 60. Used for options specified in user-specific defaults
files, such as \fB.Xdefaults\fR, resource databases loaded into
the X server, or user-specific startup files.
-.TP
-\fBinteractive\fR
+.IP \fBinteractive\fR
Level 80. Used for options specified interactively after the application
starts running. If \fIpriority\fR is not specified, it defaults to
this level.
diff --git a/doc/options.n b/doc/options.n
index de03ec8..f540c60 100644
--- a/doc/options.n
+++ b/doc/options.n
@@ -60,7 +60,7 @@ Specifies foreground color to use when drawing active elements.
See above for definition of active elements.
.OP \-activerelief activeRelief Relief
Specifies the 3-D effect desired for the active item of the widget.
-See the \fB-relief\fR option for details.
+See the \fB\-relief\fR option for details.
.OP \-anchor anchor Anchor
Specifies how the information in a widget (e.g. text or a bitmap)
is to be displayed in the widget.
@@ -292,7 +292,7 @@ The script must return \fB0\fR, \fB1\fR, or an empty string: a
\fB0\fR or \fB1\fR value specifies whether the window will receive
the input focus, and an empty string results in the default decision
described above.
-Note: this interpretation of the option is defined entirely by
+Note that this interpretation of the option is defined entirely by
the Tcl scripts that implement traversal: the widget implementations
ignore the option entirely, so you can change its meaning if you
redefine the keyboard traversal scripts.
diff --git a/doc/pack.n b/doc/pack.n
index cdcfeb8..3956be0 100644
--- a/doc/pack.n
+++ b/doc/pack.n
@@ -23,12 +23,15 @@ The \fBpack\fR command can have any of several forms, depending
on the \fIoption\fR argument:
.TP
\fBpack \fIwindow \fR?\fIwindow ...\fR? ?\fIoptions\fR?
+.
If the first argument to \fBpack\fR is a window name (any value
starting with
.QW . ),
then the command is processed in the same way as \fBpack configure\fR.
+.\" METHOD: configure
.TP
\fBpack configure \fIwindow \fR?\fIwindow ...\fR? ?\fIoptions\fR?
+.
The arguments consist of the names of one or more content windows
followed by pairs of arguments that specify how
to manage the content.
@@ -36,80 +39,98 @@ See \fBTHE PACKER ALGORITHM\fR below for details on how the options
are used by the packer.
The following options are supported:
.RS
+.\" OPTION: -after
.TP
\fB\-after \fIother\fR
+.
\fIOther\fR must the name of another window.
Use its container as the container for the content, and insert
the content just after \fIother\fR in the packing order.
+.\" OPTION: -anchor
.TP
\fB\-anchor \fIanchor\fR
+.
\fIAnchor\fR must be a valid anchor position such as \fBn\fR
or \fBsw\fR; it specifies where to position each content in its
parcel.
Defaults to \fBcenter\fR.
+.\" OPTION: -before
.TP
\fB\-before \fIother\fR
+.
\fIOther\fR must the name of another window.
Use its container as the container for the content, and insert
the content just before \fIother\fR in the packing order.
+.\" OPTION: -expand
.TP
\fB\-expand \fIboolean\fR
+.
Specifies whether the content should be expanded to consume
extra space in their container.
\fIBoolean\fR may have any proper boolean value, such as \fB1\fR
or \fBno\fR.
Defaults to 0.
+.\" OPTION: -fill
.TP
\fB\-fill \fIstyle\fR
+.
If a content's parcel is larger than its requested dimensions, this
option may be used to stretch the content.
\fIStyle\fR must have one of the following values:
.RS
-.TP
-\fBnone\fR
+.IP \fBnone\fR
Give the content its requested dimensions plus any internal padding
requested with \fB\-ipadx\fR or \fB\-ipady\fR. This is the default.
-.TP
-\fBx\fR
+.IP \fBx\fR
Stretch the content horizontally to fill the entire width of its
parcel (except leave external padding as specified by \fB\-padx\fR).
-.TP
-\fBy\fR
+.IP \fBy\fR
Stretch the content vertically to fill the entire height of its
parcel (except leave external padding as specified by \fB\-pady\fR).
-.TP
-\fBboth\fR
+.IP \fBboth\fR
Stretch the content both horizontally and vertically.
.RE
+.\" OPTION: -in
.TP
\fB\-in \fIcontainer\fR
+.
Insert the window at the end of the packing order for the container
window given by \fIcontainer\fR.
+.\" OPTION: -ipadx
.TP
\fB\-ipadx \fIamount\fR
+.
\fIAmount\fR specifies how much horizontal internal padding to
leave on each side of the content.
\fIAmount\fR must be a valid screen distance, such as \fB2\fR or \fB.5c\fR.
It defaults to 0.
+.\" OPTION: -ipady
.TP
\fB\-ipady \fIamount\fR
+.
\fIAmount\fR specifies how much vertical internal padding to
leave on each side of the content.
\fIAmount\fR defaults to 0.
+.\" OPTION: -padx
.TP
\fB\-padx \fIamount\fR
+.
\fIAmount\fR specifies how much horizontal external padding to
leave on each side of the content. \fIAmount\fR may be a list
of two values to specify padding for left and right separately.
\fIAmount\fR defaults to 0.
+.\" OPTION: -pady
.TP
\fB\-pady \fIamount\fR
+.
\fIAmount\fR specifies how much vertical external padding to
leave on each side of the content. \fIAmount\fR may be a list
of two values to specify padding for top and bottom separately.
\fIAmount\fR defaults to 0.
+.\" OPTION: -side
.TP
\fB\-side \fIside\fR
+.
Specifies which side of the container the content will be packed against.
Must be \fBleft\fR, \fBright\fR, \fBtop\fR, or \fBbottom\fR.
Defaults to \fBtop\fR.
@@ -124,29 +145,43 @@ If any of the content are already managed by the geometry manager
then any unspecified options for them retain their previous values rather
than receiving default values.
.RE
+.\" METHOD: content
+.TP
+\fBpack content \fIwindow\fR
+.
+Returns a list of all of the content windows in the packing order for
+\fIwindow\fR. The order of the content windows in the list is the same as
+their order in the packing order.
+If \fIwindow\fR has no content then an empty string is returned.
+.\" METHOD: forget
.TP
\fBpack forget \fIwindow \fR?\fIwindow ...\fR?
+.
Removes each of the \fIwindow\fRs from the packing order for its
container and unmaps their windows.
The content will no longer be managed by the packer.
.RS
.PP
.VS "TIP 518"
-If the last content window of the container becomes unmanaged, this will also send
-the virtual event \fB<<NoManagedChild>>\fR to the container; the container
-may choose to resize itself (or otherwise respond) to such a change.
+If the last content window of the container becomes unmanaged, this will
+also send the virtual event \fB<<NoManagedChild>>\fR to the container; the
+container may choose to resize itself (or otherwise respond) to such a change.
.VE "TIP 518"
.RE
+.\" METHOD: info
.TP
\fBpack info \fIwindow\fR
+.
Returns a list whose elements are the current configuration state of
the window given by \fIwindow\fR in the same option-value form that
might be specified to \fBpack configure\fR.
The first two elements of the list are
.QW "\fB\-in \fIcontainer\fR"
where \fIcontainer\fR is the window's container.
+.\" METHOD: propagate
.TP
\fBpack propagate \fIcontainer\fR ?\fIboolean\fR?
+.
If \fIboolean\fR has a true boolean value such as \fB1\fR or \fBon\fR
then propagation is enabled for \fIcontainer\fR, which must be a window
name (see \fBGEOMETRY PROPAGATION\fR below).
@@ -157,12 +192,7 @@ If \fIboolean\fR is omitted then the command returns \fB0\fR or
\fB1\fR to indicate whether propagation is currently enabled
for \fIcontainer\fR.
Propagation is enabled by default.
-.TP
-\fBpack content \fIwindow\fR
-Returns a list of all of the content windows in the packing order for \fIwindow\fR.
-The order of the content windows in the list is the same as their order in
-the packing order.
-If \fIwindow\fR has no content then an empty string is returned.
+.\" METHOD: slaves
.TP
\fBpack slaves \fIwindow\fR
.
@@ -273,18 +303,18 @@ the stacking order of either the container or the content.
.PP
.CS
# Make the widgets
-label .t \-text "This widget is at the top" \-bg red
-label .b \-text "This widget is at the bottom" \-bg green
-label .l \-text "Left\enHand\enSide"
-label .r \-text "Right\enHand\enSide"
+label .t -text "This widget is at the top" -bg red
+label .b -text "This widget is at the bottom" -bg green
+label .l -text "Left\enHand\enSide"
+label .r -text "Right\enHand\enSide"
text .mid
\&.mid insert end "This layout is like Java's BorderLayout"
# Lay them out
-\fBpack\fR .t \-side top \-fill x
-\fBpack\fR .b \-side bottom \-fill x
-\fBpack\fR .l \-side left \-fill y
-\fBpack\fR .r \-side right \-fill y
-\fBpack\fR .mid \-expand 1 \-fill both
+\fBpack\fR .t -side top -fill x
+\fBpack\fR .b -side bottom -fill x
+\fBpack\fR .l -side left -fill y
+\fBpack\fR .r -side right -fill y
+\fBpack\fR .mid -expand 1 -fill both
.CE
.SH "SEE ALSO"
grid(n), place(n)
diff --git a/doc/palette.n b/doc/palette.n
index 6a04450..ed0da59 100644
--- a/doc/palette.n
+++ b/doc/palette.n
@@ -11,11 +11,11 @@
.SH NAME
tk_setPalette, tk_bisque \- Modify the Tk color palette
.SH SYNOPSIS
+.nf
\fBtk_setPalette \fIbackground\fR
-.sp
\fBtk_setPalette \fIname value \fR?\fIname value ...\fR?
-.sp
\fBtk_bisque\fR
+.fi
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/panedwindow.n b/doc/panedwindow.n
index cad256a..1d19219 100644
--- a/doc/panedwindow.n
+++ b/doc/panedwindow.n
@@ -12,7 +12,7 @@
.SH NAME
panedwindow \- Create and manipulate 'panedwindow' split container widgets
.SH SYNOPSIS
-\fBpanedwindow\fR \fIpathName \fR?\fIoptions\fR?
+\fBpanedwindow\fI pathName \fR?\fIoptions\fR?
.SO
\-background \-borderwidth \-cursor
\-orient \-relief
@@ -38,17 +38,17 @@ version of the sash is displayed during the resizing to show where the
panes will be resized to when releasing the mouse button. This
.QW ghost
version of the sash is the proxy. It's rendering can be configured
-using the \fB-proxybackground\fR, \fB-proxyborderwidth\fR and
-\fB-proxyrelief\fR options.
+using the \fB\-proxybackground\fR, \fB\-proxyborderwidth\fR and
+\fB\-proxyrelief\fR options.
.OP \-proxybackground proxyBackground ProxyBackground
Background color to use when drawing the proxy. If an empty string, the
-value of the \fB-background\fR option will be used.
+value of the \fB\-background\fR option will be used.
.OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth
Specifies the borderwidth of the proxy. May be any value accepted by
\fBTk_GetPixels\fR.
.OP \-proxyrelief proxyRelief ProxyRelief
Relief to use when drawing the proxy. May be any of the standard Tk
-relief values. If an empty string, the value of the \fB-sashrelief\fR
+relief values. If an empty string, the value of the \fB\-sashrelief\fR
option will be used.
.OP \-sashcursor sashCursor SashCursor
Mouse cursor to use when over a sash. If null,
@@ -98,6 +98,7 @@ following general form:
the panedwindow widget's path name. \fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for panedwindow widgets:
+.\" METHOD: add
.TP
\fIpathName \fBadd \fIwindow \fR?\fIwindow ...\fR? ?\fIoption value ...\fR?
.
@@ -106,12 +107,14 @@ The arguments consist of the names of one or more windows
followed by pairs of arguments that specify how to manage the windows.
\fIOption\fR may have any of the values accepted by the
\fBconfigure\fR subcommand.
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
.
Returns the current value of the configuration option given by
\fIoption\fR. \fIOption\fR may have any of the values accepted by the
\fBpanedwindow\fR command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -126,11 +129,13 @@ one or more \fIoption\-value\fR pairs are specified, then the command
modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string. \fIOption\fR may have
any of the values accepted by the \fBpanedwindow\fR command.
+.\" METHOD: forget
.TP
\fIpathName \fBforget \fIwindow \fR?\fIwindow ...\fR?
.
Remove the pane containing \fIwindow\fR from the panedwindow. All
geometry management options for \fIwindow\fR will be forgotten.
+.\" METHOD: identify
.TP
\fIpathName \fBidentify \fIx y\fR
.
@@ -140,11 +145,13 @@ sash or a sash handle, the result is a two element list containing the
index of the sash or handle, and a word indicating whether it is over
a sash or a handle, such as {0 sash} or {2 handle}. If the point is
over any other part of the panedwindow, the result is an empty list.
+.\" METHOD: panecget
.TP
\fIpathName \fBpanecget \fIwindow option\fR
.
Query a management option for \fIwindow\fR. \fIOption\fR may be any
value allowed by the \fBpaneconfigure\fR subcommand.
+.\" METHOD: paneconfigure
.TP
\fIpathName \fBpaneconfigure \fIwindow \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -160,16 +167,19 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string. The following options
are supported:
.RS
+.\" OPTION: -after
.TP
\fB\-after \fIwindow\fR
.
Insert the window after the window specified. \fIwindow\fR should be the
name of a window already managed by \fIpathName\fR.
+.\" OPTION: -before
.TP
\fB\-before \fIwindow\fR
.
Insert the window before the window specified. \fIwindow\fR should be
the name of a window already managed by \fIpathName\fR.
+.\" OPTION: -height
.TP
\fB\-height \fIsize\fR
.
@@ -179,12 +189,14 @@ is an empty string, or if \fB\-height\fR is not specified, then the
height requested internally by the window will be used initially; the
height may later be adjusted by the movement of sashes in the
panedwindow. \fISize\fR may be any value accepted by \fBTk_GetPixels\fR.
+.\" OPTION: -hide
.TP
\fB\-hide \fIboolean\fR
.
Controls the visibility of a pane. When the \fIboolean\fR is true
(according to \fBTcl_GetBoolean\fR) the pane will not be visible, but
it will still be maintained in the list of panes.
+.\" OPTION: -minsize
.TP
\fB\-minsize \fIn\fR
.
@@ -193,18 +205,21 @@ Specifies that the size of the window cannot be made less than
paned dimension \(em the x dimension for horizontal panedwindows, the y
dimension for vertical panedwindows. May be any value accepted by
\fBTk_GetPixels\fR.
+.\" OPTION: -padx
.TP
\fB\-padx \fIn\fR
.
Specifies a non-negative value indicating how much extra space to
leave on each side of the window in the X-direction. The value may
have any of the forms accepted by \fBTk_GetPixels\fR.
+.\" OPTION: -pady
.TP
\fB\-pady \fIn\fR
.
Specifies a non-negative value indicating how much extra space to
leave on each side of the window in the Y-direction. The value may
have any of the forms accepted by \fBTk_GetPixels\fR.
+.\" OPTION: -sticky
.TP
\fB\-sticky \fIstyle\fR
.
@@ -219,6 +234,7 @@ will
to. If both \fBn\fR and \fBs\fR (or \fBe\fR and \fBw\fR)
are specified, the window will be stretched to fill the entire height
(or width) of its cavity.
+.\" OPTION: -stretch
.TP
\fB\-stretch \fIwhen\fR
.
@@ -231,29 +247,20 @@ for stretching. The space will be distributed based on each panes
current ratio of the whole. The \fIwhen\fR values have the following
definition:
.RS
-.TP
-\fBalways\fR
-.
+.IP \fBalways\fR
This pane will always stretch.
-.TP
-\fBfirst\fR
-.
+.IP \fBfirst\fR
Only if this pane is the first pane (left-most or top-most) will it
stretch.
-.TP
-\fBlast\fR
-.
+.IP \fBlast\fR
Only if this pane is the last pane (right-most or bottom-most) will it
stretch. This is the default value.
-.TP
-\fBmiddle\fR
-.
+.IP \fBmiddle\fR
Only if this pane is not the first or last pane will it stretch.
-.TP
-\fBnever\fR
-.
+.IP \fBnever\fR
This pane will never stretch.
.RE
+.\" OPTION: -width
.TP
\fB\-width \fIsize\fR
.
@@ -264,10 +271,12 @@ width requested internally by the window will be used initially; the
width may later be adjusted by the movement of sashes in the
panedwindow. \fISize\fR may be any value accepted by \fBTk_GetPixels\fR.
.RE
+.\" METHOD: panes
.TP
\fIpathName \fBpanes\fR
.
Returns an ordered list of the widgets managed by \fIpathName\fR.
+.\" METHOD: proxy
.TP
\fIpathName \fBproxy \fR?\fIargs\fR?
.
@@ -289,8 +298,10 @@ Remove the proxy from the display.
.
Place the proxy at the given \fIx\fR and \fIy\fR coordinates.
.RE
+.\" METHOD: sash
.TP
\fIpathName \fBsash \fR?\fIargs\fR?
+.
This command is used to query and change the position of sashes in the
panedwindow. It can take any of the following forms:
.RS
diff --git a/doc/photo.n b/doc/photo.n
index bc97319..2a27d9b 100644
--- a/doc/photo.n
+++ b/doc/photo.n
@@ -43,10 +43,14 @@ procedural interface. At present, only
.VS 8.6
PNG,
.VE 8.6
-GIF and PPM/PGM formats are supported, but an interface exists to
+GIF, PPM/PGM,
+.VS 8.7
+and (read-only) SVG
+.VE 8.7
+formats are supported, but an interface exists to
allow additional image file formats to be added easily. A photo image
is (semi)transparent if the image data it was obtained from had
-transparency informaton. In regions where no image data has been
+transparency information. In regions where no image data has been
supplied, it is fully transparent. Transparency may also be modified
with the \fBtransparency set\fR subcommand.
.SH "CREATING PHOTOS"
@@ -54,6 +58,7 @@ with the \fBtransparency set\fR subcommand.
Like all images, photos are created using the \fBimage create\fR
command.
Photos support the following \fIoptions\fR:
+.\" OPTION: -data
.TP
\fB\-data \fIstring\fR
.
@@ -68,20 +73,23 @@ format of the string must be one of those for which there is an image
file format handler that will accept string data. If both the
\fB\-data\fR and \fB\-file\fR options are specified, the \fB\-file\fR
option takes precedence.
+.\" OPTION: -format
.TP
\fB\-format\fR {\fIformat-name\fR ?\fIoption value ...\fR?}
.
Specifies the name of the file format for the data specified with the
\fB\-data\fR or \fB\-file\fR option and optional arguments passed to
-the format handler. Note: the value of this option must be a Tcl list.
+the format handler. Note that the value of this option must be a Tcl list.
This means that the braces may be omitted if the argument has only one
word. Also, instead of braces, double quotes may be used for quoting.
+.\" OPTION: -file
.TP
\fB\-file \fIname\fR
.
\fIname\fR gives the name of a file that is to be read to supply data
for the photo image. The file format must be one of those for which
there is an image file format handler that can read data.
+.\" OPTION: -gamma
.TP
\fB\-gamma \fIvalue\fR
.
@@ -94,6 +102,7 @@ The value specified must be greater than zero. The default
value is one (no correction). In general, values greater than one
will make the image lighter, and values less than one will make it
darker.
+.\" OPTION: -height
.TP
\fB\-height \fInumber\fR
.
@@ -102,6 +111,7 @@ primarily in situations where the user wishes to build up the contents
of the image piece by piece. A value of zero (the default) allows the
image to expand or shrink vertically to fit the data stored in it.
.VS 8.7
+.\" OPTION: -metadata
.TP
\fB\-metadata \fImetadata\fR
.
@@ -111,6 +121,7 @@ if image data is processed due to a \fB\-file\fR or \fB\-data\fR options
and the driver outputs any metadata keys.
See section \fBMETADATA DICTIONARY\fR below.
.VE 8.7
+.\" OPTION: -palette
.TP
\fB\-palette \fIpalette-spec\fR
.
@@ -123,6 +134,7 @@ numbers separated by slashes (/), specifying the number of shades of
red, green and blue to use, respectively. If the first form (a single
number) is used, the image will be displayed in monochrome (i.e.,
grayscale).
+.\" OPTION: -width
.TP
\fB\-width \fInumber\fR
.
@@ -151,19 +163,23 @@ case the width and/or height, respectively, of the image will not be
changed.
.PP
The following commands are possible for photo images:
+.\" METHOD: blank
.TP
\fIimageName \fBblank\fR
.
Blank the image; that is, set the entire image to have no data, so it
will be displayed as transparent, and the background of whatever
-window it is displayed in will show through. The metadata dict of the image is not changed.
+window it is displayed in will show through. The metadata dict of the
+image is not changed.
+.\" METHOD: cget
.TP
-\fIimageName \fBcget\fR \fIoption\fR
+\fIimageName \fBcget\fI option\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the
\fBimage create\fR \fBphoto\fR command.
+.\" METHOD: configure
.TP
\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -180,11 +196,12 @@ this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the
\fBimage create\fR \fBphoto\fR command.
.VS 8.7
-Note: setting the \fB\-metadata\fR option without any other option
+Note that setting the \fB\-metadata\fR option without any other option
will not invoke the image format driver to recreate the bitmap.
.VE 8.7
+.\" METHOD: copy
.TP
-\fIimageName \fBcopy\fR \fIsourceImage\fR ?\fIoption value(s) ...\fR?
+\fIimageName \fBcopy\fI sourceImage\fR ?\fIoption value(s) ...\fR?
.
Copies a region from the image called \fIsourceImage\fR (which must
be a photo image) to the image called \fIimageName\fR, possibly with
@@ -193,6 +210,7 @@ command copies the whole of \fIsourceImage\fR into \fIimageName\fR,
starting at coordinates (0,0) in \fIimageName\fR. The following
options may be specified:
.RS
+.\" OPTION: -from
.TP
\fB\-from \fIx1 y1 x2 y2\fR
.
@@ -203,6 +221,7 @@ default value is the bottom-right corner of the source image. The
pixels copied will include the left and top edges of the specified
rectangle but not the bottom or right edges. If the \fB\-from\fR
option is not given, the default is the whole source image.
+.\" OPTION: -to
.TP
\fB\-to \fIx1 y1 x2 y2\fR
.
@@ -213,6 +232,7 @@ the default value is (\fIx1,y1\fR) plus the size of the source
region (after subsampling and zooming, if specified). If \fIx2\fR and
\fIy2\fR are specified, the source region will be replicated if
necessary to fill the destination region in a tiled fashion.
+.\" OPTION: -shrink
.TP
\fB\-shrink\fR
.
@@ -221,6 +241,7 @@ necessary, so that the region being copied into is at the bottom-right
corner of the image. This option will not affect the width or height
of the image if the user has specified a non-zero value for the
\fB\-width\fR or \fB\-height\fR configuration option, respectively.
+.\" OPTION: -zoom
.TP
\fB\-zoom \fIx y\fR
.
@@ -230,6 +251,7 @@ is not given, the default value is the same as \fIx\fR. With this
option, each pixel in the source image will be expanded into a block
of \fIx\fR x \fIy\fR pixels in the destination image, all the same
color. \fIx\fR and \fIy\fR must be greater than 0.
+.\" OPTION: -subsample
.TP
\fB\-subsample \fIx y\fR
.
@@ -238,6 +260,7 @@ only every \fIx\fRth pixel in the X direction and \fIy\fRth pixel in
the Y direction. Negative values will cause the image to be flipped
about the Y or X axes, respectively. If \fIy\fR is not given, the
default value is the same as \fIx\fR.
+.\" OPTION: -compositingrule
.TP
\fB\-compositingrule \fIrule\fR
.
@@ -250,6 +273,7 @@ is set, the old contents of the destination image are discarded and
the source image is used as-is. The default compositing rule is
\fIoverlay\fR.
.RE
+.\" METHOD: data
.TP
\fIimageName \fBdata\fR ?\fIoption value(s) ...\fR?
.
@@ -257,17 +281,19 @@ Returns image data in the form of a string.
.VS 8.7
The format of the string depends on the format handler. By default, a
human readable format as a list of lists of pixel data is used, other
-formats can be chosen with the \fB-format\fR option.
+formats can be chosen with the \fB\-format\fR option.
See \fBIMAGE FORMATS\fR below for details.
.VE 8.7
The following options may be specified:
.RS
+.\" OPTION: -background
.TP
\fB\-background\fI color\fR
.
If the color is specified, the data will not contain any transparency
information. In all transparent pixels the color will be replaced by
the specified color.
+.\" OPTION: -format
.TP
\fB\-format\fR {\fIformat-name\fR ?\fIoption value ...\fR?}
.
@@ -283,9 +309,10 @@ per pixel/column) of colors in
.QW \fB#\fIrrggbb\fR
format (see \fBIMAGE FORMATS\fR below).
.VE 8.7
-Note: the value of this option must be a Tcl list.
+Note that the value of this option must be a Tcl list.
This means that the braces may be omitted if the argument has only one
word. Also, instead of braces, double quotes may be used for quoting.
+.\" OPTION: -from
.TP
\fB\-from \fIx1 y1 x2 y2\fR
.
@@ -296,14 +323,16 @@ extends from \fI(x1,y1)\fR to the bottom-right corner of
diagonally opposite corners of the rectangular region, including x1,y1
and excluding x2,y2. The default, if this option is not given, is the
whole image.
+.\" OPTION: -grayscale
.TP
\fB\-grayscale\fR
.
If this options is specified, the data will not contain color
information. All pixel data will be transformed into grayscale.
.VS 8.7
+.\" OPTION: -metadata
.TP
-\fB\-metadata\fR \fImetadata\fR
+\fB\-metadata\fI metadata\fR
.
Image format handler may use metadata to be included in the returned
data string.
@@ -313,17 +342,19 @@ If no \fB\-metadata\fR option is given, the current metadata of the
image is used.
.VE 8.7
.RE
-\fIimageName \fBget\fR \fIx y\fR ?\fB-withalpha\fR?
+.\" METHOD: get
+.TP
+\fIimageName \fBget\fI x y\fR ?\fB\-withalpha\fR?
.
Returns the color of the pixel at coordinates (\fIx\fR,\fIy\fR) in the
image as a list of three integers between 0 and 255, representing the
-red, green and blue components respectively. If the \fB-withalpha\fR
+red, green and blue components respectively. If the \fB\-withalpha\fR
option is specified, the returned list will have a fourth element
representing the alpha value of the pixel as an integer between 0 and
255.
-.VE 8.7
+.\" METHOD: put
.TP
-\fIimageName \fBput\fR \fIdata\fR ?\fIoption value(s) ...\fR?
+\fIimageName \fBput\fI data\fR ?\fIoption value(s) ...\fR?
.
Sets pixels in \fI imageName\fR to the data specified in \fIdata\fR.
.VS 8.7
@@ -334,6 +365,7 @@ See \fBIMAGE FORMATS\fR below for details on formats for image data.
.VE 8.7
The following options may be specified:
.RS
+.\" OPTION: -format
.TP
\fB\-format\fR {\fIformat-name\fR ?\fIoption value ..\fR?}
.
@@ -342,18 +374,20 @@ arguments to be passed to the format handler.
Specifically, only image file format handlers whose names begin with
\fIformat-name\fR will be used while searching for an image data
format handler to read the data.
-Note: the value of this option must be a Tcl list.
+Note that the value of this option must be a Tcl list.
This means that the braces may be omitted if the argument has only one
word. Also, instead of braces, double quotes may be used for quoting.
.VS 8.7
+.\" OPTION: -metadata
.TP
-\fB\-metadata\fR \fImetadata\fR
+\fB\-metadata\fI metadata\fR
.
A specified \fImetadata\fR is passed to the image format driver when interpreting
the data.
-Note: The current metadata of the image is not passed to the format driver
+Note that the current metadata of the image is not passed to the format driver
and is not changed by the command.
.VE 8.7
+.\" OPTION: -to
.TP
\fB\-to \fIx1 y1\fR ?\fIx2 y2\fR?
.
@@ -362,14 +396,15 @@ of the region of \fIimageName\fR into which the image data will be
copied. The default position is (0,0). If \fIx2\fR,\fIy2\fR is given
and \fIdata\fR is not large enough to cover the rectangle specified by
this option, the image data extracted will be tiled so it covers the
-entire destination rectangle. If the region specified with this opion
+entire destination rectangle. If the region specified with this option
is smaller than the supplied \fIdata\fR, the exceeding data is silently
discarded. Note that if \fIdata\fR specifies a
single color value, then a region extending to the bottom-right corner
represented by (\fIx2\fR,\fIy2\fR) will be filled with that color.
.RE
+.\" METHOD: read
.TP
-\fIimageName \fBread\fR \fIfilename\fR ?\fIoption value(s) ...\fR?
+\fIimageName \fBread\fI filename\fR ?\fIoption value(s) ...\fR?
.
Reads image data from the file named \fIfilename\fR into the image.
This command first searches the list of
@@ -378,6 +413,7 @@ in \fIfilename\fR, and then reads the image in \fIfilename\fR into
\fIimageName\fR (the destination image). The following options may be
specified:
.RS
+.\" OPTION: -format
.TP
\fB\-format {\fIformat-name\fR ?\fIoption value ..\fR?}
.
@@ -386,9 +422,10 @@ optionally, additional options to the format handler.
Specifically, only image file format handlers whose names begin with
\fIformat-name\fR will be used while searching for an image data
format handler to read the data.
-Note: the value of this option must be a Tcl list.
+Note that the value of this option must be a Tcl list.
This means that the braces may be omitted if the argument has only one
word. Also, instead of braces, double quotes may be used for quoting.
+.\" OPTION: -from
.TP
\fB\-from \fIx1 y1 x2 y2\fR
.
@@ -400,14 +437,16 @@ specified, they specify diagonally opposite corners or the region.
The default, if this option is not specified, is the whole of the
image in the image file.
.VS 8.7
+.\" OPTION: -metadata
.TP
-\fB\-metadata\fR \fImetadata\fR
+\fB\-metadata\fI metadata\fR
.
A specified \fImetadata\fR is passed to the image format driver when interpreting
the data.
-Note: The current metadata of the image is not passed to the format driver
+Note that the current metadata of the image is not passed to the format driver
and is not changed by the command.
.VE 8.7
+.\" OPTION: -shrink
.TP
\fB\-shrink\fR
.
@@ -417,6 +456,7 @@ is at the bottom-right corner of the \fIimageName\fR. This option
will not affect the width or height of the image if the user has
specified a non-zero value for the \fB\-width\fR or \fB\-height\fR
configuration option, respectively.
+.\" OPTION: -to
.TP
\fB\-to \fIx y\fR
.
@@ -424,6 +464,7 @@ Specifies the coordinates of the top-left corner of the region of
\fIimageName\fR into which data from \fIfilename\fR are to be read.
The default is (0,0).
.RE
+.\" METHOD: redither
.TP
\fIimageName \fBredither\fR
.
@@ -434,45 +475,46 @@ dithered image may not be exactly correct. Normally the difference is
not noticeable, but if it is a problem, this command can be used to
recalculate the dithered image in each window where the image is
displayed.
+.\" METHOD: transparency
.TP
\fIimageName \fBtransparency \fIsubcommand \fR?\fIarg ...\fR?
.
Allows examination and manipulation of the transparency information in
the photo image. Several subcommands are available:
.RS
-.VS 8.7
.TP
-\fIimageName \fBtransparency get \fIx y\fR ?\fB-alpha\fR?
-.
+\fIimageName \fBtransparency get \fIx y\fR ?\fB\-alpha\fR?
+.VS 8.7
Returns true if the pixel at (\fIx\fR,\fIy\fR) is fully transparent,
-false otherwise. If the option \fB-alpha\fR is passed, returns the
+false otherwise. If the option \fB\-alpha\fR is passed, returns the
alpha value of the pixel instead, as an integer in the range 0 to 255.
.VE 8.7
-
-.VS 8.7
.TP
-\fIimageName \fBtransparency set \fIx y\fR \fInewVal\fR ?\fB-alpha\fR?
-.
+\fIimageName \fBtransparency set \fIx y newVal\fR ?\fB\-alpha\fR?
+.VS 8.7
Change the transparency of the pixel at (\fIx\fR,\fIy\fR) to
\fInewVal.\fR If no additional option is passed, \fInewVal\fR is
interpreted as a boolean and the pixel is made fully transparent if
-that value is true, fully opaque otherwise. If the \fB-alpha\fR
+that value is true, fully opaque otherwise. If the \fB\-alpha\fR
option is passed, \fInewVal\fR is interpreted as an integral alpha
value for the pixel, which must be in the range 0 to 255.
.VE 8.7
.RE
+.\" METHOD: write
.TP
\fIimageName \fBwrite \fIfilename\fR ?\fIoption value(s) ...\fR?
.
Writes image data from \fIimageName\fR to a file named \fIfilename\fR.
The following options may be specified:
.RS
+.\" OPTION: -background
.TP
\fB\-background\fI color\fR
.
If the color is specified, the data will not contain any transparency
information. In all transparent pixels the color will be replaced by
the specified color.
+.\" OPTION: -format
.TP
\fB\-format\fR {\fIformat-name\fR ?\fIoption value ...\fR?}
.
@@ -484,9 +526,10 @@ and which has the capability to write an image file. If this option
is not given, the format is guessed from the file extension. If that
cannot be determined, this subcommand uses the first handler that has
the capability to write an image file.
-Note: the value of this option must be a Tcl list.
+Note that the value of this option must be a Tcl list.
This means that the braces may be omitted if the argument has only one
word. Also, instead of braces, double quotes may be used for quoting.
+.\" OPTION: -from
.TP
\fB\-from \fIx1 y1 x2 y2\fR
.
@@ -496,14 +539,16 @@ extends from \fI(x1,y1)\fR to the bottom-right corner of
\fIimageName\fR. If all four coordinates are given, they specify
diagonally opposite corners of the rectangular region. The default,
if this option is not given, is the whole image.
+.\" OPTION: -grayscale
.TP
\fB\-grayscale\fR
.
If this options is specified, the data will not contain color
information. All pixel data will be transformed into grayscale.
.VS 8.7
+.\" OPTION: -metadata
.TP
-\fB\-metadata\fR \fBmetadata\fR
+\fB\-metadata\fI metadata\fR
.
Image format handler may use metadata to be included in the written file.
The specified \fImetadata\fR is passed to the driver for inclusion in the
@@ -518,8 +563,8 @@ The photo image code is structured to allow handlers for additional
image file formats to be added easily. The photo image code maintains
a list of these handlers. Handlers are added to the list by
registering them with a call to \fBTk_CreatePhotoImageFormat\fR. The
-standard Tk distribution comes with handlers for PPM/PGM, PNG and GIF
-formats,
+standard Tk distribution comes with handlers for PPM/PGM, PNG, GIF and
+(read-only) SVG formats,
.VS 8.7
as well as the \fBdefault\fR handler to encode/decode image
data in a human readable form.
@@ -555,7 +600,7 @@ from/to a file. Its sole purpose is to encode and decode image data in
string form in a clear text, human readable, form. The \fIimageName\fR
\fBdata\fR subcommand uses this handler when no other format is
specified. When reading image data from a string with \fIimageName\fR
-\fBput\fR or the \fB-data\fR option, the default handler is treated
+\fBput\fR or the \fB\-data\fR option, the default handler is treated
as the other handlers.
.PP
Image data in the \fBdefault\fR string format is a (top-to-bottom)
@@ -568,24 +613,26 @@ the forms described in the \fBCOLOR FORMATS\fR section below.
.SS "FORMAT SUBOPTIONS"
.PP
.VS 8.6
-Image formats may support sub-options, wich ahre specified using
+Image formats may support sub-options, which are specified using
additional words in the value to the \fB\-format\fR option. These
suboptions can affect how image data is read or written to file or
string. The nature and values of these options is up to the format
handler.
The built-in handlers support these suboptions:
+.\" OPTION -colorformat
.VS 8.7
.TP
\fBdefault \-colorformat\fI formatType\fR
.
The option is allowed when writing image data to a string with
-\fIimageName\fR \fBdata\fR. Specifies the format to use for the color
+\fIimageName \fBdata\fR. Specifies the format to use for the color
string of each pixel. \fIformatType\fR may be one of: \fBrgb\fR to
encode pixel data in the form \fB#\fIRRGGBB\fR, \fBrgba\fR to encode
pixel data in the form \fB#\fIRRGGBBAA\fR or \fBlist\fR to encode
pixel data as a list with four elements. See \fBCOLOR FORMATS\fR
below for details. The default is \fBrgb\fR.
.VE 8.7
+.\" OPTION -index
.TP
\fBgif \-index\fI indexValue\fR
.
@@ -594,6 +641,7 @@ parsing a multi-part GIF image, Tk normally only accesses the first
image. By giving the \fB\-index\fR sub-option, the \fIindexValue\fR'th
value may be used instead. The \fIindexValue\fR must be an integer
from 0 up to the number of image parts in the GIF data.
+.\" OPTION -alpha
.TP
\fBpng \-alpha\fI alphaValue\fR
.
@@ -602,48 +650,73 @@ an additional alpha filtering for the overall image, which allows the
background on which the image is displayed to show through. This
usually also has the effect of desaturating the image. The
\fIalphaValue\fR must be between 0.0 and 1.0.
+.\" OPTION -dpi
+.\" OPTION -scale
+.\" OPTION -scaletowidth
+.\" OPTION -scaletoheight
.TP
-\fBsvg \-dpi\fI dpiValue\fB \-scale\fI scaleValue\fB \-scaletowidth \fI width\fB \-scaletoheight\fI height\fR
+\fBsvg \-dpi\fI dpiValue \fB\-scale\fI scaleValue \fB\-scaletowidth\fI width \fB\-scaletoheight\fI height\fR
.
\fIdpiValue\fR is used in conversion between given coordinates and
screen resolution. The value must be greater than 0 and the default
value is 96.
+.RS
+.PP
\fIscaleValue\fR is used to scale the resulting image. The value must
be greater than 0 and the default value is 1.
\fIwidth\fR and \fIheight\fR are the width or height that the image
will be adjusted to. Only one parameter among \fB\-scale\fR,
\fB\-scaletowidth\fR and \fB\-scaletoheight\fR can be given at a time
and the aspect ratio of the original image is always preserved.
-The svg format supports a wide range of SVG features, but the
+The \fBsvg\fR format supports a wide range of SVG features, but the
full SVG standard is not available, for instance the 'text' feature
is missing and silently ignored when reading the SVG data.
The supported SVG features are:
+.TP
+\fBelements:\fR
.
-.RS
-\fB elements:\fR g, path, rect, circle, ellipse, line, polyline, polygon,
+g, path, rect, circle, ellipse, line, polyline, polygon,
linearGradient, radialGradient, stop, defs, svg, style
-.PP
-\fB attributes:\fR width, height, viewBox,
+.TP
+\fBattributes:\fR
+.
+width, height, viewBox,
preserveAspectRatio with none, xMin, xMid, xMax, yMin, yMid, yMax, slice
-.PP
-\fB gradient attributes:\fR gradientUnits with objectBoundingBox,
+.TP
+\fBgradient attributes:\fR
+.
+gradientUnits with objectBoundingBox,
gradientTransform, cx, cy, r fx, fy x1, y1, x2, y2
spreadMethod with pad, reflect or repeat,
xlink:href
-.PP
-\fB poly attributes: \fR points
-.PP
-\fB line attributes: \fR x1, y1, x2, y2
-.PP
-\fB ellipse attributes: \fR cx, cy, rx, ry
-.PP
-\fB circle attributes: \fR cx, cy, r
-.PP
-\fB rectangle attributes: \fR x, y, width, height, rx, ry
-.PP
-\fB path attributes: \fR d with m, M, l, L, h, H, v, V, c, C, s, S, q, Q, t, T, a, A, z, Z
-.PP
-\fB style attributes: \fR display with none, visibility, hidden, visible,
+.TP
+\fBpoly attributes:\fR
+.
+points
+.TP
+\fBline attributes:\fR
+.
+x1, y1, x2, y2
+.TP
+\fBellipse attributes:\fR
+.
+cx, cy, rx, ry
+.TP
+\fBcircle attributes:\fR
+.
+cx, cy, r
+.TP
+\fBrectangle attributes:\fR
+.
+x, y, width, height, rx, ry
+.TP
+\fBpath attributes:\fR
+.
+d with m, M, l, L, h, H, v, V, c, C, s, S, q, Q, t, T, a, A, z, Z
+.TP
+\fBstyle attributes:\fR
+.
+display with none, visibility, hidden, visible,
fill with nonzero and evenodd, opacity, fill-opacity,
stroke, stroke-width, stroke-dasharray, stroke-dashoffset, stroke-opacity,
stroke-linecap with butt, round and square,
@@ -652,10 +725,11 @@ fill-rule, font-size,
transform with matrix, translate, scale, rotate, skewX and skewY,
stop-color, stop-opacity, offset, id, class
.RE
-.
+.PP
Currently only SVG images reading and conversion into (pixel-based
format) photos is supported: Tk does not (yet) support bundling photo
images in SVG vector graphics.
+.RE
.VE 8.6
.VS 8.7
.SH "COLOR FORMATS"
@@ -746,46 +820,42 @@ parsed, or may use metadata to be included in image files or formats.
.PP
Each image format driver supports an individual set of metadata dictionary
keys. Predefined keys are:
-.TP
-DPI
-.
+.IP \fBDPI\fR
Horizontal image resolution in DPI as a double value.
Supported by format \fBpng\fR.
-.TP
-aspect
-.
+.IP \fBaspect\fR
Aspect ratio horizontal divided by vertical as double value.
Supported by formats \fBgif\fR and \fBpng\fR.
-.TP
-comment
-.
+.IP \fBcomment\fR
Image text comment.
Supported by formats \fBgif\fR and \fBpng\fR.
.PP
It is valid to set any key in the metadata dict.
-A format driver will ignore keys it does not handle.
+A format driver will ignore keys that it does not handle.
.SS "METADATA KEYS FOR ANIMATED GIF INFORMATION"
.PP
The following metadata keys are reported when reading a \fBgif\fR format file.
-They are typically used in conjunction with the \fI-index\fR option of an
+They are typically used in conjunction with the \fB\-index\fR option of an
animated \fBgif\fR file to properly display the subimage sequence.
-The options are linked to each subimage selected by \fI-index\fR.
+The options are linked to each subimage selected by \fB\-index\fR.
.TP
-\fBdelay time\fR \fItime\fR
+\fBdelay time\fI time\fR
.
-Update delay time in 10ms unit. This key is only present, if delay time is not 0.
+Update delay time in 10ms units.
+This key is only present if the delay time is not 0.
.TP
-\fBdisposal method\fR \fImethod\fR
+\fBdisposal method\fI method\fR
.
Disposal method of the preceeding image, if given for the current image.
-Possible values are: \fIdo not dispose\fR, \fIrestore to background color\fR, \fIrestore to previous\fR.
+Possible values are: \fBdo not dispose\fR, \fBrestore to background color\fR,
+\fBrestore to previous\fR.
.TP
-\fBuser interaction\fR \fIbool\fR
+\fBuser interaction\fI bool\fR
.
The key is present with a value of 1, if user interaction is specified.
Otherwise, the key is not present.
.TP
-\fBupdate region\fR \fIX0\fR, \fIY0\fR, \fIwidth\fR, \fIheight\fR
+\fBupdate region\fI X0\fR, \fIY0\fR, \fIwidth\fR, \fIheight\fR
.
Update region of the current subimage, if subimage has not the same size as
the full image. The pixel outside of this box are all fully transparent.
@@ -803,14 +873,14 @@ is useful for producing a tiled background:
.PP
.CS
# These lines should be called once
-\fBimage create photo\fR untiled \-file "theFile.ppm"
+\fBimage create photo\fR untiled -file "theFile.ppm"
\fBimage create photo\fR tiled
# These lines should be called whenever .someWidget changes
# size; a <Configure> binding is useful here
set width [winfo width .someWidget]
set height [winfo height .someWidget]
-tiled \fBcopy\fR untiled \-to 0 0 $width $height \-shrink
+tiled \fBcopy\fR untiled -to 0 0 $width $height -shrink
.CE
.PP
.VS 8.6
@@ -819,10 +889,10 @@ during loading, which is useful for generating images suitable for disabled
buttons:
.PP
.CS
-\fBimage create photo\fR icon \-file "icon.png"
-\fBimage create photo\fR iconDisabled \-file "icon.png" \e
- \-format "png \-alpha 0.5"
-button .b \-image icon \-disabledimage iconDisabled
+\fBimage create photo\fR icon -file "icon.png"
+\fBimage create photo\fR iconDisabled -file "icon.png" \e
+ -format "png -alpha 0.5"
+button .b -image icon -disabledimage iconDisabled
.CE
.VE 8.6
.PP
diff --git a/doc/place.n b/doc/place.n
index b56ad58..22e9699 100644
--- a/doc/place.n
+++ b/doc/place.n
@@ -30,13 +30,16 @@ centered inside the container.
.PP
.TP
\fBplace \fIwindow option value \fR?\fIoption value ...\fR?
+.
Arrange for the placer to manage the geometry of a content whose
pathName is \fIwindow\fR. The remaining arguments consist of one or
more \fIoption\-value\fR pairs that specify the way in which
\fIwindow\fR's geometry is managed. \fIOption\fR may have any of the
values accepted by the \fBplace configure\fR command.
+.\" METHOD: configure
.TP
\fBplace configure \fIwindow \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Query or modify the geometry options of the content given by
\fIwindow\fR. If no \fIoption\fR is specified, this command returns a
list describing the available options (see \fBTk_ConfigureInfo\fR for
@@ -50,8 +53,10 @@ the command returns an empty string.
.RS
.PP
The following \fIoption\-value\fR pairs are supported:
+.\" OPTION: -anchor
.TP
\fB\-anchor \fIwhere\fR
+.
\fIWhere\fR specifies which point of \fIwindow\fR is to be positioned
at the (x,y) location selected by the \fB\-x\fR, \fB\-y\fR,
\fB\-relx\fR, and \fB\-rely\fR options.
@@ -61,8 +66,10 @@ Thus if \fIwhere\fR is \fBse\fR then the lower-right corner of
\fIwindow\fR's border will appear at the given (x,y) location
in the container.
The anchor position defaults to \fBnw\fR.
+.\" OPTION: -bordermode
.TP
\fB\-bordermode \fImode\fR
+.
\fIMode\fR determines the degree to which borders within the
container are used in determining the placement of the content.
The default and most common value is \fBinside\fR.
@@ -84,8 +91,10 @@ to be its official X area, which includes any internal border but
no external border. A bordermode of \fBignore\fR is probably
not very useful.
.RE
+.\" OPTION: -height
.TP
\fB\-height \fIsize\fR
+.
\fISize\fR specifies the height for \fIwindow\fR in screen units
(i.e. any of the forms accepted by \fBTk_GetPixels\fR).
The height will be the outer dimension of \fIwindow\fR including its
@@ -93,8 +102,10 @@ border, if any.
If \fIsize\fR is an empty string, or if no \fB\-height\fR or
\fB\-relheight\fR option is specified, then the height requested
internally by the window will be used.
+.\" OPTION: -in
.TP
\fB\-in \fIcontainer\fR
+.
\fIContainer\fR specifies the path name of the window relative
to which \fIwindow\fR is to be placed.
\fIContainer\fR must either be \fIwindow\fR's parent or a descendant
@@ -105,8 +116,10 @@ These restrictions are necessary to guarantee
that \fIwindow\fR is visible whenever \fIcontainer\fR is visible.
If this option is not specified then the other window defaults to
\fIwindow\fR's parent.
+.\" OPTION: -relheight
.TP
\fB\-relheight \fIsize\fR
+.
\fISize\fR specifies the height for \fIwindow\fR.
In this case the height is specified as a floating-point number
relative to the height of the container: 0.5 means \fIwindow\fR will
@@ -115,8 +128,10 @@ the same height as the container, and so on.
If both \fB\-height\fR and \fB\-relheight\fR are specified for a content,
their values are summed. For example, \fB\-relheight 1.0 \-height \-2\fR
makes the content 2 pixels shorter than the container.
+.\" OPTION: -relwidth
.TP
\fB\-relwidth \fIsize\fR
+.
\fISize\fR specifies the width for \fIwindow\fR.
In this case the width is specified as a floating-point number
relative to the width of the container: 0.5 means \fIwindow\fR will
@@ -125,8 +140,10 @@ the same width as the container, and so on.
If both \fB\-width\fR and \fB\-relwidth\fR are specified for a content,
their values are summed. For example, \fB\-relwidth 1.0 \-width 5\fR
makes the content 5 pixels wider than the container.
+.\" OPTION: -relx
.TP
\fB\-relx \fIlocation\fR
+.
\fILocation\fR specifies the x-coordinate within the container window
of the anchor point for \fIwindow\fR.
In this case the location is specified in a relative fashion
@@ -137,8 +154,10 @@ If both \fB\-x\fR and \fB\-relx\fR are specified for a content
then their values are summed. For example, \fB\-relx 0.5 \-x \-2\fR
positions the left edge of the content 2 pixels to the left of the
center of its container.
+.\" OPTION: -rely
.TP
\fB\-rely \fIlocation\fR
+.
\fILocation\fR specifies the y-coordinate within the container window
of the anchor point for \fIwindow\fR.
In this case the value is specified in a relative fashion
@@ -149,8 +168,10 @@ If both \fB\-y\fR and \fB\-rely\fR are specified for a content
then their values are summed. For example, \fB\-rely 0.5 \-x 3\fR
positions the top edge of the content 3 pixels below the
center of its container.
+.\" OPTION: -width
.TP
\fB\-width \fIsize\fR
+.
\fISize\fR specifies the width for \fIwindow\fR in screen units
(i.e. any of the forms accepted by \fBTk_GetPixels\fR).
The width will be the outer width of \fIwindow\fR including its
@@ -158,15 +179,19 @@ border, if any.
If \fIsize\fR is an empty string, or if no \fB\-width\fR
or \fB\-relwidth\fR option is specified, then the width requested
internally by the window will be used.
+.\" OPTION: -x
.TP
\fB\-x \fIlocation\fR
+.
\fILocation\fR specifies the x-coordinate within the container window
of the anchor point for \fIwindow\fR.
The location is specified in screen units (i.e. any of the forms
accepted by \fBTk_GetPixels\fR) and need not lie within the bounds
of the container window.
+.\" OPTION: -y
.TP
\fB\-y \fIlocation\fR
+.
\fILocation\fR specifies the y-coordinate within the container window
of the anchor point for \fIwindow\fR.
The location is specified in screen units (i.e. any of the forms
@@ -177,23 +202,31 @@ If the same value is specified separately with
two different options, such as \fB\-x\fR and \fB\-relx\fR, then
the most recent option is used and the older one is ignored.
.RE
+.\" METHOD: content
+.TP
+\fBplace content \fIwindow\fR
+.
+Returns a list of all the content windows for which \fIwindow\fR is the
+container. If there is no content for \fIwindow\fR then an empty string
+is returned.
+.\" METHOD: forget
.TP
\fBplace forget \fIwindow\fR
+.
Causes the placer to stop managing the geometry of \fIwindow\fR. As a
side effect of this command \fIwindow\fR will be unmapped so that it
does not appear on the screen. If \fIwindow\fR is not currently managed
by the placer then the command has no effect. This command returns an
empty string.
+.\" METHOD: info
.TP
\fBplace info \fIwindow\fR
+.
Returns a list giving the current configuration of \fIwindow\fR.
The list consists of \fIoption\-value\fR pairs in exactly the
same form as might be specified to the \fBplace configure\fR
command.
-.TP
-\fBplace content \fIwindow\fR
-Returns a list of all the content windows for which \fIwindow\fR is the container.
-If there is no content for \fIwindow\fR then an empty string is returned.
+.\" METHOD: slaves
.TP
\fBplace slaves \fIwindow\fR
.
@@ -247,13 +280,14 @@ frames and canvases that provide configuration options for this purpose.
Make the label occupy the middle bit of the toplevel, no matter how it
is resized:
.CS
-label .l \-text "In the\enMiddle!" \-bg black \-fg white
-\fBplace\fR .l \-relwidth .3 \-relx .35 \-relheight .3 \-rely .35
+label .l -text "In the\enMiddle!" -bg black -fg white
+\fBplace\fR .l -relwidth .3 -relx .35 -relheight .3 -rely .35
.CE
.SH "SEE ALSO"
grid(n), pack(n)
.SH KEYWORDS
-geometry manager, height, location, container, place, rubber sheet, content, width
+geometry manager, height, location, container, place, rubber sheet,
+content, width
'\" Local Variables:
'\" mode: nroff
'\" End:
diff --git a/doc/popup.n b/doc/popup.n
index 9543750..ca9d485 100644
--- a/doc/popup.n
+++ b/doc/popup.n
@@ -31,11 +31,11 @@ How to attach a simple popup menu to a widget.
.CS
# Create a menu
set m [menu .popupMenu]
-$m add command \-label "Example 1" \-command bell
-$m add command \-label "Example 2" \-command bell
+$m add command -label "Example 1" -command bell
+$m add command -label "Example 2" -command bell
# Create something to attach it to
-pack [label .l \-text "Click me!"]
+pack [label .l -text "Click me!"]
# Arrange for the menu to pop up when the label is clicked
bind .l <Button-1> {\fBtk_popup\fR .popupMenu %X %Y}
diff --git a/doc/radiobutton.n b/doc/radiobutton.n
index 2169515..b51a7e6 100644
--- a/doc/radiobutton.n
+++ b/doc/radiobutton.n
@@ -12,7 +12,7 @@
.SH NAME
radiobutton \- Create and manipulate 'radiobutton' pick-one widgets
.SH SYNOPSIS
-\fBradiobutton\fR \fIpathName \fR?\fIoptions\fR?
+\fBradiobutton\fI pathName \fR?\fIoptions\fR?
.SO
\-activebackground \-disabledforeground \-padx
\-activeforeground \-font \-pady
@@ -65,8 +65,8 @@ The empty string is the default value.
Specifies a background color to use when the button is selected.
If \fBindicatorOn\fR is true then the color is used as the background for
the indicator regardless of the select state.
-If \fB\-indicatoron\fR is false, this color is used as the background
-for the entire widget, in place of \fB\-background\fR or \fB\-activeBackground\fR,
+If \fB\-indicatoron\fR is false, this color is used as the background for the
+entire widget, in place of \fB\-background\fR or \fB\-activeBackground\fR,
whenever the widget is selected.
If specified as an empty string then no special color is used for
displaying when the widget is selected.
@@ -181,13 +181,15 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for radiobutton widgets:
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBradiobutton\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -203,6 +205,7 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBradiobutton\fR
command.
+.\" METHOD: deselect
.TP
\fIpathName \fBdeselect\fR
.
@@ -210,6 +213,7 @@ Deselects the radiobutton and sets the associated variable to an
empty string.
If this radiobutton was not currently selected, the command has
no effect.
+.\" METHOD: flash
.TP
\fIpathName \fBflash\fR
.
@@ -218,6 +222,7 @@ several times, alternating between active and normal colors. At
the end of the flash the radiobutton is left in the same normal/active
state as when the command was invoked.
This command is ignored if the radiobutton's state is \fBdisabled\fR.
+.\" METHOD: invoke
.TP
\fIpathName \fBinvoke\fR
.
@@ -227,6 +232,7 @@ its associated Tcl command, if there is one.
The return value is the return value from the Tcl command, or an
empty string if there is no command associated with the radiobutton.
This command is ignored if the radiobutton's state is \fBdisabled\fR.
+.\" METHOD: select
.TP
\fIpathName \fBselect\fR
.
@@ -257,7 +263,8 @@ actions occur: the radiobutton is completely non-responsive.
The behavior of radiobuttons can be changed by defining new bindings for
individual widgets or by redefining the class bindings.
.SH "SEE ALSO"
-checkbutton(n), labelframe(n), listbox(n), options(n), scale(n), ttk::radiobutton(n)
+checkbutton(n), labelframe(n), listbox(n), options(n), scale(n),
+ttk::radiobutton(n)
.SH KEYWORDS
radiobutton, widget
'\" Local Variables:
diff --git a/doc/raise.n b/doc/raise.n
index 7741001..752bcd6 100644
--- a/doc/raise.n
+++ b/doc/raise.n
@@ -41,11 +41,11 @@ it. This is is often necessary when building GUIs in the style where
you create your activity widgets first before laying them out on the
display:
.CS
-button .b \-text "Hi there!"
-pack [frame .f \-background blue]
-pack [label .f.l1 \-text "This is above"]
-pack .b \-in .f
-pack [label .f.l2 \-text "This is below"]
+button .b -text "Hi there!"
+pack [frame .f -background blue]
+pack [label .f.l1 -text "This is above"]
+pack .b -in .f
+pack [label .f.l2 -text "This is below"]
\fBraise\fR .b
.CE
.SH "SEE ALSO"
diff --git a/doc/scale.n b/doc/scale.n
index 0499d0a..9aeb8c0 100644
--- a/doc/scale.n
+++ b/doc/scale.n
@@ -12,7 +12,7 @@
.SH NAME
scale \- Create and manipulate 'scale' value-controlled slider widgets
.SH SYNOPSIS
-\fBscale\fR \fIpathName \fR?\fIoptions\fR?
+\fBscale\fI pathName \fR?\fIoptions\fR?
.SO
\-activebackground \-foreground \-relief
\-background \-highlightbackground \-repeatdelay
@@ -78,7 +78,9 @@ specified by the \fB\-activebackground\fR option.
.OP \-tickinterval tickInterval TickInterval
Must be a real value.
Determines the spacing between numerical
-tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval.
+tick marks displayed below or to the left of the slider. The values will all
+be displayed with the same number of decimal places, which will be enough to
+ensure they are all accurate to within 20% of a tick interval.
If 0, no tick marks will be displayed.
.OP \-to to To
Specifies a real value corresponding
@@ -143,13 +145,15 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for scale widgets:
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBscale\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -165,6 +169,7 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBscale\fR
command.
+.\" METHOD: coords
.TP
\fIpathName \fBcoords \fR?\fIvalue\fR?
.
@@ -172,6 +177,7 @@ Returns a list whose elements are the x and y coordinates of
the point along the centerline of the trough that corresponds
to \fIvalue\fR.
If \fIvalue\fR is omitted then the scale's current value is used.
+.\" METHOD: get
.TP
\fIpathName \fBget\fR ?\fIx y\fR?
.
@@ -181,6 +187,7 @@ pixel coordinates within the widget; the command returns
the scale value corresponding to the given pixel.
Only one of \fIx\fR or \fIy\fR is used: for horizontal scales
\fIy\fR is ignored, and for vertical scales \fIx\fR is ignored.
+.\" METHOD: identify
.TP
\fIpathName \fBidentify \fIx y\fR
.
@@ -193,6 +200,7 @@ and \fBtrough2\fR means that the point is over the portion
of the slider below or to the right of the slider.
If the point is not over one of these elements, an empty string
is returned.
+.\" METHOD: set
.TP
\fIpathName \fBset \fIvalue\fR
.
diff --git a/doc/scrollbar.n b/doc/scrollbar.n
index fee959d..0bbfb70 100644
--- a/doc/scrollbar.n
+++ b/doc/scrollbar.n
@@ -12,7 +12,7 @@
.SH NAME
scrollbar \- Create and manipulate 'scrollbar' scrolling control and indicator widgets
.SH SYNOPSIS
-\fBscrollbar\fR \fIpathName \fR?\fIoptions\fR?
+\fBscrollbar\fI pathName \fR?\fIoptions\fR?
.SO
\-activebackground \-highlightcolor \-repeatdelay
\-background \-highlightthickness \-repeatinterval
@@ -81,20 +81,15 @@ below for details.
.PP
A scrollbar displays five elements, which are referred to in the
widget commands for the scrollbar:
-.TP 10
-\fBarrow1\fR
+.IP \fBarrow1\fR 10
The top or left arrow in the scrollbar.
-.TP 10
-\fBtrough1\fR
+.IP \fBtrough1\fR 10
The region between the slider and \fBarrow1\fR.
-.TP 10
-\fBslider\fR
+.IP \fBslider\fR 10
The rectangle that indicates what is visible in the associated widget.
-.TP 10
-\fBtrough2\fR
+.IP \fBtrough2\fR 10
The region between the slider and \fBarrow2\fR.
-.TP 10
-\fBarrow2\fR
+.IP \fBarrow2\fR 10
The bottom or right arrow in the scrollbar.
.SH "WIDGET COMMAND"
.PP
@@ -108,6 +103,7 @@ operations on the widget. It has the following general form:
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for scrollbar widgets:
+.\" METHOD: activate
.TP
\fIpathName \fBactivate \fR?\fIelement\fR?
.
@@ -121,6 +117,7 @@ will be active.
If \fIelement\fR is not specified, the command returns
the name of the element that is currently active, or an empty string
if no element is active.
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
.
@@ -128,6 +125,7 @@ Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBscrollbar\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -143,6 +141,7 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBscrollbar\fR
command.
+.\" METHOD: delta
.TP
\fIpathName \fBdelta \fIdeltaX deltaY\fR
.
@@ -155,6 +154,7 @@ ignored in this case).
If the scrollbar is vertical, the result indicates how much the
scrollbar setting must change to move the slider \fIdeltaY\fR pixels
down. The arguments and the result may be zero or negative.
+.\" METHOD: fraction
.TP
\fIpathName \fBfraction \fIx y\fR
.
@@ -167,11 +167,13 @@ the middle, and so on.
widget.
If \fIx\fR and \fIy\fR refer to a point outside the trough, the closest
point in the trough is used.
+.\" METHOD: get
.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.
+.\" METHOD: identify
.TP
\fIpathName \fBidentify \fIx y\fR
.
@@ -180,6 +182,7 @@ Returns the name of the element under the point given by \fIx\fR and
not lie in any element of the scrollbar.
\fIX\fR and \fIy\fR must be pixel coordinates relative to the scrollbar
widget.
+.\" METHOD: set
.TP
\fIpathName \fBset \fIfirst last\fR
.
@@ -204,6 +207,7 @@ 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
.QW "\fB.t yview\fR" .
+.\" METHOD: moveto
.TP
\fIprefix \fBmoveto \fIfraction\fR
.
@@ -214,6 +218,7 @@ 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.
+.\" METHOD: scroll
.TP
\fIprefix \fBscroll \fInumber \fBpages\fR
.
@@ -308,11 +313,11 @@ The End key adjusts the view to the bottom (right edge) of the document.
Create a window with a scrollable \fBtext\fR widget:
.CS
toplevel .tl
-text .tl.t \-yscrollcommand {.tl.s set}
-\fBscrollbar\fR .tl.s \-command {.tl.t yview}
-grid .tl.t .tl.s \-sticky nsew
-grid columnconfigure .tl 0 \-weight 1
-grid rowconfigure .tl 0 \-weight 1
+text .tl.t -yscrollcommand {.tl.s set}
+\fBscrollbar\fR .tl.s -command {.tl.t yview}
+grid .tl.t .tl.s -sticky nsew
+grid columnconfigure .tl 0 -weight 1
+grid rowconfigure .tl 0 -weight 1
.CE
.SH "SEE ALSO"
ttk:scrollbar(n)
diff --git a/doc/selection.n b/doc/selection.n
index a26c5d9..2f51d51 100644
--- a/doc/selection.n
+++ b/doc/selection.n
@@ -26,8 +26,9 @@ Note that for management of the \fBCLIPBOARD\fR selection (see below), the
The first argument to \fBselection\fR determines the format of the
rest of the arguments and the behavior of the command. The following
forms are currently supported:
+.\" METHOD: clear
.TP
-\fBselection clear\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-selection\fR \fIselection\fR?
+\fBselection clear\fR ?\fB\-displayof\fI window\fR? ?\fB\-selection\fI selection\fR?
.
If \fIselection\fR exists anywhere on \fIwindow\fR's display, clear it
so that no window owns the selection anymore. \fISelection\fR
@@ -37,8 +38,9 @@ Communication Conventions Manual for complete details.
\fISelection\fR defaults to \fBPRIMARY\fR and \fIwindow\fR defaults to
.QW . .
Returns an empty string.
+.\" METHOD: get
.TP
-\fBselection get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-selection\fR \fIselection\fR? ?\fB\-type\fR \fItype\fR?
+\fBselection get\fR ?\fB\-displayof\fI window\fR? ?\fB\-selection\fI selection\fR? ?\fB\-type\fI type\fR?
.
Retrieves the value of \fIselection\fR from \fIwindow\fR's display and
returns it as a result. \fISelection\fR defaults to \fBPRIMARY\fR and
@@ -61,8 +63,9 @@ collection of fields separated by spaces: atoms are converted to their
textual names, and anything else is converted to hexadecimal integers.
Note that \fBselection get\fR does not retrieve the selection in the
\fBUTF8_STRING\fR format unless told to.
+.\" METHOD: handle
.TP
-\fBselection handle\fR ?\fB\-selection\fR \fIs\fR? ?\fB\-type\fR \fIt\fR? ?\fB\-format\fR \fIf\fR? \fIwindow command\fR
+\fBselection handle\fR ?\fB\-selection\fI s\fR? ?\fB\-type\fI t\fR? ?\fB\-format\fI f\fR? \fIwindow command\fR
.
Creates a handler for selection requests, such that \fIcommand\fR will
be executed whenever selection \fIs\fR is owned by \fIwindow\fR and
@@ -119,10 +122,11 @@ used to retrieve the selection then the value is converted back to
a string at the requesting end, so \fIformat\fR is
irrelevant.
.RE
+.\" METHOD: own
.TP
-\fBselection own\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-selection\fR \fIselection\fR?
+\fBselection own\fR ?\fB\-displayof\fI window\fR? ?\fB\-selection\fI selection\fR?
.TP
-\fBselection own\fR ?\fB\-command\fR \fIcommand\fR? ?\fB\-selection\fR \fIselection\fR? \fIwindow\fR
+\fBselection own\fR ?\fB\-command\fI command\fR? ?\fB\-selection\fI selection\fR? \fIwindow\fR
.
The first form of \fBselection own\fR returns the path name of the
window in this application that owns \fIselection\fR on the display
@@ -142,23 +146,42 @@ some other window claims ownership of the selection away from
.RE
.SH WIDGET FACILITIES
.PP
-The \fBtext\fR, \fBentry\fR, \fBttk::entry\fR, \fBlistbox\fR, \fBspinbox\fR and \fBttk::spinbox\fR widgets have the option \fB\-exportselection\fR. If a widget has this option set to boolean \fBtrue\fR, then (in an unsafe interpreter) a selection made in the widget is automatically written to the \fBPRIMARY\fR selection.
+The \fBtext\fR, \fBentry\fR, \fBttk::entry\fR, \fBlistbox\fR, \fBspinbox\fR
+and \fBttk::spinbox\fR widgets have the option \fB\-exportselection\fR. If a
+widget has this option set to boolean \fBtrue\fR, then (in an unsafe
+interpreter) a selection made in the widget is automatically written to the
+\fBPRIMARY\fR selection.
.PP
-A GUI event, for example \fB<<PasteSelection>>\fR, can copy the \fBPRIMARY\fR selection to certain widgets. This copy is implemented by a widget binding to the event. The binding script makes appropriate calls to the \fBselection\fR command.
+A GUI event, for example \fB<<PasteSelection>>\fR, can copy the \fBPRIMARY\fR
+selection to certain widgets. This copy is implemented by a widget binding to
+the event. The binding script makes appropriate calls to the \fBselection\fR
+command.
.PP
.SH PORTABILITY ISSUES
.PP
-On X11, the \fBPRIMARY\fR selection is a system-wide feature of the X server, allowing communication between different processes that are X11 clients.
+On X11, the \fBPRIMARY\fR selection is a system-wide feature of the X server,
+allowing communication between different processes that are X11 clients.
.PP
-On Windows, the \fBPRIMARY\fR selection is not provided by the system, but only by Tk, and so it is shared only between windows of a parent interpreter and its child interpreters. It is not shared between interpreters in different processes or different threads. Each parent interpreter has a separate \fBPRIMARY\fR selection that is shared only with its child interpreters which are not safe interpreters.
+On Windows, the \fBPRIMARY\fR selection is not provided by the system, but
+only by Tk, and so it is shared only between windows of a parent interpreter
+and its child interpreters. It is not shared between interpreters in
+different processes or different threads. Each parent interpreter has a
+separate \fBPRIMARY\fR selection that is shared only with its child
+interpreters which are not safe interpreters.
.PP
.SH SECURITY
.PP
-A safe interpreter cannot read from the \fBPRIMARY\fR selection because its \fBselection\fR command is hidden. For this reason the \fBPRIMARY\fR selection cannot be written to the Tk widgets of a safe interpreter.
+A safe interpreter cannot read from the \fBPRIMARY\fR selection because its
+\fBselection\fR command is hidden. For this reason the \fBPRIMARY\fR
+selection cannot be written to the Tk widgets of a safe interpreter.
.PP
-A Tk widget can have its option \fB\-exportselection\fR set to boolean \fBtrue\fR, but in a safe interpreter this option has no effect: writing from the widget to the \fBPRIMARY\fR selection is disabled.
+A Tk widget can have its option \fB\-exportselection\fR set to boolean
+\fBtrue\fR, but in a safe interpreter this option has no effect: writing
+from the widget to the \fBPRIMARY\fR selection is disabled.
.PP
-These are security features. A safe interpreter may run untrusted code, and it is a security risk if this untrusted code can read or write the \fBPRIMARY\fR selection used by other interpreters.
+These are security features. A safe interpreter may run untrusted code, and
+it is a security risk if this untrusted code can read or write the
+\fBPRIMARY\fR selection used by other interpreters.
.PP
.SH EXAMPLES
.PP
@@ -167,14 +190,14 @@ On X11 platforms, one of the standard selections available is the
it using Tk:
.PP
.CS
-set selContents [\fBselection get\fR \-selection SECONDARY]
+set selContents [\fBselection get\fR -selection SECONDARY]
.CE
.PP
Many different types of data may be available for a selection; the
special type \fBTARGETS\fR allows you to get a list of available types:
.PP
.CS
-foreach type [\fBselection get\fR \-type TARGETS] {
+foreach type [\fBselection get\fR -type TARGETS] {
puts "Selection PRIMARY supports type $type"
}
.CE
@@ -184,7 +207,7 @@ data for the selection. Then you have to claim the selection...
.CS
# Set up the data handler ready for incoming requests
set foo "This is a string with some data in it... blah blah"
-\fBselection handle\fR \-selection SECONDARY . getData
+\fBselection handle\fR -selection SECONDARY . getData
proc getData {offset maxChars} {
puts "Retrieving selection starting at $offset"
return [string range $::foo $offset [expr {$offset+$maxChars-1}]]
@@ -192,7 +215,7 @@ proc getData {offset maxChars} {
# Now we grab the selection itself
puts "Claiming selection"
-\fBselection own\fR \-command lost \-selection SECONDARY .
+\fBselection own\fR -command lost -selection SECONDARY .
proc lost {} {
puts "Lost selection"
}
diff --git a/doc/send.n b/doc/send.n
index f200128..943c92f 100644
--- a/doc/send.n
+++ b/doc/send.n
@@ -30,21 +30,27 @@ command to be executed, just as for the \fBeval\fR command.
If the initial arguments of the command begin with
.QW \-
they are treated as options. The following options are currently defined:
+.\" OPTION: -async
.TP
\fB\-async\fR
+.
Requests asynchronous invocation. In this case the \fBsend\fR
command will complete immediately without waiting for \fIcmd\fR
to complete in the target application; no result will be available
and errors in the sent command will be ignored.
If the target application is in the same process as the sending
application then the \fB\-async\fR option is ignored.
+.\" OPTION: -displayof
.TP
-\fB\-displayof\fR \fIpathName\fR
+\fB\-displayof\fI pathName\fR
+.
Specifies that the target application's main window is on the display
of the window given by \fIpathName\fR, instead of the display containing
the application's main window.
+.\" OPTION: --
.TP
\fB\-\|\-\fR
+.
Serves no purpose except to terminate the list of options. This
option is needed only if \fIapp\fR could contain a leading
.QW \-
@@ -90,7 +96,7 @@ This script fragment can be used to make an application that only runs
once on a particular display.
.CS
if {[tk appname FoobarApp] ne "FoobarApp"} {
- \fBsend\fR \-async FoobarApp RemoteStart $argv
+ \fBsend\fR -async FoobarApp RemoteStart $argv
exit
}
# The command that will be called remotely, which raises
diff --git a/doc/spinbox.n b/doc/spinbox.n
index 104ef13..e7ed8e0 100644
--- a/doc/spinbox.n
+++ b/doc/spinbox.n
@@ -12,7 +12,7 @@
.SH NAME
spinbox \- Create and manipulate 'spinbox' value spinner widgets
.SH SYNOPSIS
-\fBspinbox\fR \fIpathName \fR?\fIoptions\fR?
+\fBspinbox\fI pathName \fR?\fIoptions\fR?
.SO
\-activebackground \-highlightthickness \-repeatinterval
\-background \-insertbackground \-selectbackground
@@ -168,8 +168,8 @@ The \fB\-validatecommand\fR will be called when the spinbox is edited.
The \fB\-validatecommand\fR will be called for all above conditions.
.PP
It is possible to perform percent substitutions on the \fB\-validatecommand\fR
-and \fB\-invalidcommand\fR scripts, just as you would in a \fBbind\fR script. The
-following substitutions are recognized:
+and \fB\-invalidcommand\fR scripts, just as you would in a \fBbind\fR script.
+The following substitutions are recognized:
.PP
.IP \fB%d\fR 5
Type of action: 1 for \fBinsert\fR, 0 for \fBdelete\fR,
@@ -213,26 +213,26 @@ validated. If you wish to edit the value of the widget
during validation and still have the \fB\-validate\fR option set, you should
include the command
.CS
- \fI%W config \-validate %v\fR
+ \fI%W config -validate %v\fR
.CE
in the \fB\-validatecommand\fR or \fB\-invalidcommand\fR (whichever one you
were editing the spinbox widget from). It is also recommended to not set an
associated \fB\-textvariable\fR during validation, as that can cause the
spinbox widget to become out of sync with the \fB\-textvariable\fR.
.PP
-Also, the \fB-validate\fR option will set itself to \fBnone\fR when the
-spinbox value gets changed because of adjustment of \fB-from\fR or \fB-to\fR
-and the \fB-validatecommand\fR returns false. For instance
+Also, the \fB\-validate\fR option will set itself to \fBnone\fR when the
+spinbox value gets changed because of adjustment of \fB\-from\fR or \fB\-to\fR
+and the \fB\-validatecommand\fR returns false. For instance
.CS
- \fIspinbox pathName \-from 1 \-to 10 \-validate all \-validatecommand {return 0}\fR
+ \fIspinbox pathName -from 1 -to 10 -validate all -validatecommand {return 0}\fR
.CE
-will in fact set the \fB-validate\fR option to \fBnone\fR because the default
-value for the spinbox gets changed (due to the \fB-from\fR and \fB-to\fR
+will in fact set the \fB\-validate\fR option to \fBnone\fR because the default
+value for the spinbox gets changed (due to the \fB\-from\fR and \fB\-to\fR
options) to a value not accepted by the validation script.
.PP
Moreover, forced validation is performed when invoking any spinbutton of
the spinbox. If the validation script returns false in this situation,
-then the \fB-validate\fR option will be automatically set to \fBnone\fR.
+then the \fB\-validate\fR option will be automatically set to \fBnone\fR.
.SH "WIDGET COMMAND"
.PP
The \fBspinbox\fR command creates a new Tcl command whose
@@ -250,32 +250,39 @@ arguments. An index specifies a particular character in the spinbox's
string, in any of the following ways:
.TP 12
\fInumber\fR
+.
Specifies the character as a numerical index, where 0 corresponds
to the first character in the string.
.TP 12
\fBanchor\fR
+.
Indicates the anchor point for the selection, which is set with the
\fBselect from\fR and \fBselect adjust\fR widget commands.
.TP 12
\fBend\fR
+.
Indicates the character just after the last one in the spinbox's string.
This is equivalent to specifying a numerical index equal to the length
of the spinbox's string.
.TP 12
\fBinsert\fR
+.
Indicates the character adjacent to and immediately following the
insertion cursor.
.TP 12
\fBsel.first\fR
+.
Indicates the first character in the selection. It is an error to
use this form if the selection is not in the spinbox window.
.TP 12
\fBsel.last\fR
+.
Indicates the character just after the last one in the selection.
It is an error to use this form if the selection is not in the
spinbox window.
.TP 12
\fB@\fInumber\fR
+.
In this form, \fInumber\fR is treated as an x-coordinate in the
spinbox's window; the character spanning that x-coordinate is used.
For example,
@@ -294,8 +301,10 @@ arithmetic and indexing relative to \fBend\fR.
.SS SUBCOMMANDS
.PP
The following commands are possible for spinbox widgets:
+.\" METHOD: bbox
.TP
\fIpathName \fBbbox \fIindex\fR
+.
Returns a list of four numbers describing the bounding box of the
character given by \fIindex\fR.
The first two elements of the list give the x and y coordinates of
@@ -304,14 +313,18 @@ the upper-left corner of the screen area covered by the character
the width and height of the character, in pixels.
The bounding box may refer to a region outside the visible area
of the window.
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
+.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBspinbox\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
@@ -324,8 +337,10 @@ modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBspinbox\fR
command.
+.\" METHOD: delete
.TP
\fIpathName \fBdelete \fIfirst \fR?\fIlast\fR?
+.
Delete one or more elements of the spinbox.
\fIFirst\fR is the index of the first character to delete, and
\fIlast\fR is the index of the character just after the last
@@ -333,42 +348,58 @@ one to delete.
If \fIlast\fR is not specified it defaults to \fIfirst\fR+1,
i.e. a single character is deleted.
This command returns an empty string.
+.\" METHOD: get
.TP
\fIpathName \fBget\fR
+.
Returns the spinbox's string.
+.\" METHOD: icursor
.TP
\fIpathName \fBicursor \fIindex\fR
+.
Arrange for the insertion cursor to be displayed just before the character
given by \fIindex\fR. Returns an empty string.
+.\" METHOD: identify
.TP
\fIpathName \fBidentify\fI x y\fR
+.
Returns the name of the window element corresponding to coordinates
\fIx\fR and \fIy\fR in the spinbox. Return value is one of:
\fBnone\fR, \fBbuttondown\fR, \fBbuttonup\fR, \fBentry\fR.
+.\" METHOD: index
.TP
\fIpathName \fBindex\fI index\fR
+.
Returns the numerical index corresponding to \fIindex\fR.
+.\" METHOD: insert
.TP
\fIpathName \fBinsert \fIindex string\fR
+.
Insert the characters of \fIstring\fR just before the character
indicated by \fIindex\fR. Returns an empty string.
+.\" METHOD: invoke
.TP
\fIpathName \fBinvoke\fI element\fR
+.
Causes the specified element, either \fBbuttondown\fR or \fBbuttonup\fR,
to be invoked, triggering the action associated with it.
+.\" METHOD: scan
.TP
-\fIpathName \fBscan\fR \fIoption args\fR
+\fIpathName \fBscan\fI option args\fR
+.
This command is used to implement scanning on spinboxes. It has
two forms, depending on \fIoption\fR:
.RS
.TP
\fIpathName \fBscan mark \fIx\fR
+.
Records \fIx\fR and the current view in the spinbox window; used in
conjunction with later \fBscan dragto\fR commands. Typically this
command is associated with a mouse button press in the widget. It
returns an empty string.
.TP
\fIpathName \fBscan dragto \fIx\fR
+.
This command computes the difference between its \fIx\fR argument
and the \fIx\fR argument to the last \fBscan mark\fR command for
the widget. It then adjusts the view left or right by 10 times the
@@ -377,13 +408,16 @@ with mouse motion events in the widget, to produce the effect of
dragging the spinbox at high speed through the window. The return
value is an empty string.
.RE
+.\" METHOD: selection
.TP
\fIpathName \fBselection \fIoption arg\fR
+.
This command is used to adjust the selection within a spinbox. It
has several forms, depending on \fIoption\fR:
.RS
.TP
\fIpathName \fBselection adjust \fIindex\fR
+.
Locate the end of the selection nearest to the character given by
\fIindex\fR, and adjust that end of the selection to be at \fIindex\fR
(i.e. including but not going beyond \fIindex\fR). The other
@@ -395,24 +429,29 @@ selection anchor point, inclusive.
Returns an empty string.
.TP
\fIpathName \fBselection clear\fR
+.
Clear the selection if it is currently in this widget. If the
selection is not in this widget then the command has no effect.
Returns an empty string.
.TP
\fIpathName \fBselection element\fR ?\fIelement\fR?
+.
Sets or gets the currently selected element. If a spinbutton element
is specified, it will be displayed depressed.
.TP
\fIpathName \fBselection from \fIindex\fR
+.
Set the selection anchor point to just before the character
given by \fIindex\fR. Does not change the selection.
Returns an empty string.
.TP
\fIpathName \fBselection present\fR
+.
Returns 1 if there is are characters selected in the spinbox,
0 if nothing is selected.
.TP
\fIpathName \fBselection range \fIstart end\fR
+.
Sets the selection to include the characters starting with
the one indexed by \fIstart\fR and ending with the one just
before \fIend\fR.
@@ -420,6 +459,7 @@ If \fIend\fR refers to the same character as \fIstart\fR or an
earlier one, then the spinbox's selection is cleared.
.TP
\fIpathName \fBselection to \fIindex\fR
+.
If \fIindex\fR is before the anchor point, set the selection
to the characters from \fIindex\fR up to but not including
the anchor point.
@@ -433,25 +473,32 @@ If the selection is not in this widget then a new selection is
created using the most recent anchor point specified for the widget.
Returns an empty string.
.RE
+.\" METHOD: set
.TP
\fIpathName \fBset\fR ?\fIstring\fR?
+.
If \fIstring\fR is specified, the spinbox will try and set it to this
value, otherwise it just returns the spinbox's string.
If validation is on, it will occur when setting the string.
+.\" METHOD: validate
.TP
\fIpathName \fBvalidate\fR
+.
This command is used to force an evaluation of the \fB\-validatecommand\fR
independent of the conditions specified by the \fB\-validate\fR option.
This is done by temporarily setting the \fB\-validate\fR option to \fBall\fR.
It returns 0 or 1.
+.\" METHOD: xview
.TP
\fIpathName \fBxview \fIargs\fR
+.
This command is used to query and change the horizontal position of the
text in the widget's window. It can take any of the following
forms:
.RS
.TP
\fIpathName \fBxview\fR
+.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the horizontal span that is visible in the window.
@@ -462,15 +509,18 @@ These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
option.
.TP
\fIpathName \fBxview \fIindex\fR
+.
Adjusts the view in the window so that the character given by \fIindex\fR
is displayed at the left edge of the window.
.TP
\fIpathName \fBxview moveto\fI fraction\fR
+.
Adjusts the view in the window so that the character \fIfraction\fR of the
way through the text appears at the left edge of the window.
\fIFraction\fR must be a fraction between 0 and 1.
.TP
\fIpathName \fBxview scroll \fInumber what\fR
+.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer or a float, but if it is a float then
diff --git a/doc/sysnotify.n b/doc/sysnotify.n
index ea1ab89..a80f316 100644
--- a/doc/sysnotify.n
+++ b/doc/sysnotify.n
@@ -7,14 +7,17 @@
'\"
.TH tk sysnotify n "" Tk "Tk Built-In Commands"
.so man.macros
+.BS
.SH NAME
sysnotify \- Creates a notification window with a title and message.
.SH SYNOPSIS
-\fBtk sysnotify\fR \fItitle\fR \fImessage\fR
+\fBtk sysnotify\fI title message\fR
.BE
.SH DESCRIPTION
.PP
-The \fBtk sysnotify\fR command creates a platform-specific system notification alert. Its intent is to provide a brief, unobtrusive notification to the user by popping up a window that briefly appears in a corner of the screen.
+The \fBtk sysnotify\fR command creates a platform-specific system notification
+alert. Its intent is to provide a brief, unobtrusive notification to the user
+by popping up a window that briefly appears in a corner of the screen.
.SH EXAMPLE
.PP
Here is an example of the \fBtk sysnotify\fR code:
diff --git a/doc/systray.n b/doc/systray.n
index c215c29..44f5fda 100644
--- a/doc/systray.n
+++ b/doc/systray.n
@@ -7,17 +7,16 @@
'\"
.TH tk systray n "" Tk "Tk Built-In Commands"
.so man.macros
+.BS
.SH NAME
systray \- Creates an icon display in the platform-specific system tray.
.SH SYNOPSIS
-\fBtk systray create \fI\-image image\fR \fI?\-text text\fR? \fI?\-button1 callback?\fR \fI?\-button3 callback?\fR
-.sp
+.nf
+\fBtk systray create \fB\-image \fIimage\fR ?\fB\-text \fItext\fR? ?\fB\-button1 \fIcallback\fR? ?\fB\-button3 \fIcallback\fR?
\fBtk systray configure \fI?option? ?value option value ...?\fR
-.sp
\fBtk systray exists\fR
-.sp
\fBtk systray destroy\fR
-.BE
+.fi
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/text.n b/doc/text.n
index 7498cb5..088b524 100644
--- a/doc/text.n
+++ b/doc/text.n
@@ -13,10 +13,11 @@
text, tk_textCopy, tk_textCut, tk_textPaste \- Create and manipulate 'text' hypertext editing widgets
.SH SYNOPSIS
.nf
-\fBtext\fR \fIpathName \fR?\fIoptions\fR?
-\fBtk_textCopy\fR \fIpathName\fR
-\fBtk_textCut\fR \fIpathName\fR
-\fBtk_textPaste\fR \fIpathName\fR
+\fBtext\fI pathName \fR?\fIoptions\fR?
+\fBtk_textCopy\fI pathName\fR
+\fBtk_textCut\fI pathName\fR
+\fBtk_textPaste\fI pathName\fR
+.fi
.SO
\-background \-highlightthickness \-relief
\-borderwidth \-insertbackground \-selectbackground
@@ -415,11 +416,13 @@ individual tags using the
widget command. If a character has been tagged, then the display options
associated with the tag override the default display style. The following
options are currently supported for tags:
+.\" OPTION: -background
.TP
\fB\-background \fIcolor\fR
.
\fIColor\fR specifies the background color to use for characters associated
with the tag. It may have any of the forms accepted by \fBTk_GetColor\fR.
+.\" OPTION: -bgstipple
.TP
\fB\-bgstipple \fIbitmap\fR
.
@@ -427,18 +430,21 @@ with the tag. It may have any of the forms accepted by \fBTk_GetColor\fR.
background. It may have any of the forms accepted by \fBTk_GetBitmap\fR. If
\fIbitmap\fR has not been specified, or if it is specified as an empty string,
then a solid fill will be used for the background.
+.\" OPTION: -borderwidth
.TP
\fB\-borderwidth \fIpixels\fR
.
\fIPixels\fR specifies the width of a border to draw around the tag using any
of the forms accepted by \fBTk_GetPixels\fR. This option should be used in
conjunction with the \fB\-relief\fR option to provide the desired border.
+.\" OPTION: -elide
.TP
\fB\-elide \fIboolean\fR
.
\fIElide\fR specifies whether the data should be elided. Elided data
(characters, images, embedded windows, etc.) is not displayed and takes no
space on screen, but further on behaves just as normal data.
+.\" OPTION: -fgstipple
.TP
\fB\-fgstipple \fIbitmap\fR
.
@@ -447,17 +453,20 @@ text and other foreground information such as underlines. It may have any of
the forms accepted by \fBTk_GetBitmap\fR. If \fIbitmap\fR has not been
specified, or if it is specified as an empty string, then a solid fill will be
used.
+.\" OPTION: -font
.TP
\fB\-font \fIfontName\fR
.
\fIFontName\fR is the name of a font to use for drawing characters. It may
have any of the forms accepted by \fBTk_GetFont\fR.
+.\" OPTION: -foreground
.TP
\fB\-foreground \fIcolor\fR
.
\fIColor\fR specifies the color to use when drawing text and other foreground
information such as underlines. It may have any of the forms accepted by
\fBTk_GetColor\fR.
+.\" OPTION: -justify
.TP
\fB\-justify \fIjustify\fR
.
@@ -466,6 +475,7 @@ option has been specified, then \fIjustify\fR determines how to justify the
line. It must be one of \fBleft\fR, \fBright\fR, or \fBcenter\fR. If a line
wraps, then the justification for each line on the display is determined by
the first non-elided character of that display line.
+.\" OPTION: -lmargin1
.TP
\fB\-lmargin1 \fIpixels\fR
.
@@ -475,6 +485,7 @@ should be indented from the left edge of the window. \fIPixels\fR may have any
of the standard forms for screen distances. If a line of text wraps, this
option only applies to the first line on the display; the \fB\-lmargin2\fR
option controls the indentation for subsequent lines.
+.\" OPTION: -lmargin2
.TP
\fB\-lmargin2 \fIpixels\fR
.
@@ -485,6 +496,7 @@ much the line should be indented from the left edge of the window.
\fIPixels\fR may have any of the standard forms for screen distances. This
option is only used when wrapping is enabled, and it only applies to the
second and later display lines for a text line.
+.\" OPTION: -lmargincolor
.TP
\fB\-lmargincolor \fIcolor\fR
.
@@ -493,8 +505,9 @@ contain characters because they are indented by \fB\-lmargin1\fR or
\fB\-lmargin2\fR. It may have any of the forms accepted by
\fBTk_GetColor\fR. If \fIcolor\fR has not been specified, or if it is
specified as an empty string, then the color used is specified by the
-\fB-background\fR tag option (or, if this is also unspecified, by the
-\fB-background\fR widget option).
+\fB\-background\fR tag option (or, if this is also unspecified, by the
+\fB\-background\fR widget option).
+.\" OPTION: -offset
.TP
\fB\-offset \fIpixels\fR
.
@@ -503,12 +516,14 @@ vertically from the baseline of the overall line, in pixels. For example, a
positive offset can be used for superscripts and a negative offset can be used
for subscripts. \fIPixels\fR may have any of the standard forms for screen
distances.
+.\" OPTION: -overstrike
.TP
\fB\-overstrike \fIboolean\fR
.
Specifies whether or not to draw a horizontal rule through the middle of
characters. \fIBoolean\fR may have any of the forms accepted by
\fBTcl_GetBoolean\fR.
+.\" OPTION: -overstrikefg
.TP
\fB\-overstrikefg \fIcolor\fR
.
@@ -516,6 +531,7 @@ characters. \fIBoolean\fR may have any of the forms accepted by
have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
been specified, or if it is specified as an empty string, then the color
specified by the \fB\-foreground\fR tag option is used.
+.\" OPTION: -relief
.TP
\fB\-relief \fIrelief\fR
.
@@ -523,6 +539,7 @@ specified by the \fB\-foreground\fR tag option is used.
of the forms accepted by \fBTk_GetRelief\fR. This option is used in
conjunction with the \fB\-borderwidth\fR option to enable to the desired
border appearance.
+.\" OPTION: -rmargin
.TP
\fB\-rmargin \fIpixels\fR
.
@@ -533,6 +550,7 @@ leave between the end of the line and the right edge of the window.
option is only used when wrapping is enabled. If a text line wraps, the right
margin for each line on the display is determined by the first non-elided
character of that display line.
+.\" OPTION: -rmargincolor
.TP
\fB\-rmargincolor \fIcolor\fR
.
@@ -540,40 +558,48 @@ character of that display line.
contain characters because they are indented by \fB\-rmargin\fR. It may
have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
been specified, or if it is specified as an empty string, then the color
-used is specified by the \fB-background\fR tag option (or, if this is also
-unspecified, by the \fB-background\fR widget option).
+used is specified by the \fB\-background\fR tag option (or, if this is also
+unspecified, by the \fB\-background\fR widget option).
+.\" OPTION: -selectbackground
.TP
\fB\-selectbackground \fIcolor\fR
+.
\fIColor\fR specifies the background color to use when displaying selected
items. It may have any of the forms accepted by \fBTk_GetColor\fR. If
\fIcolor\fR has not been specified, or if it is specified as an empty
string, then the color specified by the \fB\-background\fR tag option is
used.
+.\" OPTION: -selectforeground
.TP
\fB\-selectforeground \fIcolor\fR
+.
\fIColor\fR specifies the foreground color to use when displaying selected
items. It may have any of the forms accepted by \fBTk_GetColor\fR. If
\fIcolor\fR has not been specified, or if it is specified as an empty
string, then the color specified by the \fB\-foreground\fR tag option is
used.
+.\" OPTION: -spacing1
.TP
\fB\-spacing1 \fIpixels\fR
.
\fIPixels\fR specifies how much additional space should be left above each
text line, using any of the standard forms for screen distances. If a line
wraps, this option only applies to the first line on the display.
+.\" OPTION: -spacing2
.TP
\fB\-spacing2 \fIpixels\fR
.
For lines that wrap, this option specifies how much additional space to leave
between the display lines for a single text line. \fIPixels\fR may have any of
the standard forms for screen distances.
+.\" OPTION: -spacing3
.TP
\fB\-spacing3 \fIpixels\fR
.
\fIPixels\fR specifies how much additional space should be left below each
text line, using any of the standard forms for screen distances. If a line
wraps, this option only applies to the last line on the display.
+.\" OPTION: -tabs
.TP
\fB\-tabs \fItabList\fR
.
@@ -585,6 +611,7 @@ unspecified for the tag (the default). If the option is specified as a
non-empty string that is an empty list, such as \fB\-tags\0{\0}\fR, then it
requests default 8-character tabs as described for the \fB\-tags\fR widget
option.
+.\" OPTION: -tabstyle
.TP
\fB\-tabstyle \fIstyle\fR
.
@@ -593,11 +620,13 @@ tabbing to use for the text widget. This option only applies to a display line
if it applies to the first non-elided character on that display line. If this
option is specified as an empty string, it cancels the option, leaving it
unspecified for the tag (the default).
+.\" OPTION: -underline
.TP
\fB\-underline \fIboolean\fR
.
\fIBoolean\fR specifies whether or not to draw an underline underneath
characters. It may have any of the forms accepted by \fBTcl_GetBoolean\fR.
+.\" OPTION: -underlinefg
.TP
\fB\-underlinefg \fIcolor\fR
.
@@ -605,6 +634,7 @@ characters. It may have any of the forms accepted by \fBTcl_GetBoolean\fR.
have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
been specified, or if it is specified as an empty string, then the color
specified by the \fB\-foreground\fR tag option is used.
+.\" OPTION: -wrap
.TP
\fB\-wrap \fImode\fR
.
@@ -695,9 +725,9 @@ then the window is destroyed. Similarly if the text widget as a whole is
deleted, then the window is destroyed.
.PP
Eliding an embedded window immediately after scheduling it for creation via
-\fIpathName \fBwindow create \fIindex \fB-create\fR will prevent it from being
+\fIpathName \fBwindow create \fIindex \fB\-create\fR will prevent it from being
effectively created. Uneliding an elided embedded window scheduled for creation
-via \fIpathName \fBwindow create \fIindex \fB-create\fR will automatically
+via \fIpathName \fBwindow create \fIindex \fB\-create\fR will automatically
trigger the associated creation script. After destroying an elided embedded
window, the latter won't get automatically recreated.
.PP
@@ -706,6 +736,7 @@ When an embedded window is added to a text widget with the \fIpathName
associated with it. These options may be modified later with the \fIpathName
\fBwindow configure\fR widget command. The following options are currently
supported:
+.\" OPTION: -align
.TP
\fB\-align \fIwhere\fR
.
@@ -716,6 +747,7 @@ line), \fBcenter\fR (center the window within the range of the line),
\fBbottom\fR (align the bottom of the window with the bottom of the line's
area), or \fBbaseline\fR (align the bottom of the window with the baseline of
the line).
+.\" OPTION: -create
.TP
\fB\-create \fIscript\fR
.
@@ -728,18 +760,21 @@ the name of that window as its result. Two substitutions will be performed in
the parent text widget, and \fI%%\fR will be substituted by a single \fI%\fR.
If the annotation's window should ever be deleted, \fIscript\fR will be
evaluated again the next time the annotation is displayed.
+.\" OPTION: -padx
.TP
\fB\-padx \fIpixels\fR
.
\fIPixels\fR specifies the amount of extra space to leave on each side of the
embedded window. It may have any of the usual forms defined for a screen
distance.
+.\" OPTION: -pady
.TP
\fB\-pady \fIpixels\fR
.
\fIPixels\fR specifies the amount of extra space to leave on the top and on
the bottom of the embedded window. It may have any of the usual forms defined
for a screen distance.
+.\" OPTION: -stretch
.TP
\fB\-stretch \fIboolean\fR
.
@@ -748,6 +783,7 @@ line in which it is displayed, this option can be used to specify whether the
window should be stretched vertically to fill its line. If the \fB\-pady\fR
option has been specified as well, then the requested padding will be retained
even if the window is stretched.
+.\" OPTION: -window
.TP
\fB\-window \fIpathName\fR
.
@@ -774,9 +810,9 @@ containing the embedded image is deleted then that copy of the image is removed
from the screen.
.PP
Eliding an embedded image immediately after scheduling it for creation via
-\fIpathName \fBimage create \fIindex \fB-create\fR will prevent it from being
+\fIpathName \fBimage create \fIindex \fB\-create\fR will prevent it from being
effectively created. Uneliding an elided embedded image scheduled for creation
-via \fIpathName \fBimage create \fIindex \fB-create\fR will automatically
+via \fIpathName \fBimage create \fIindex \fB\-create\fR will automatically
trigger the associated creation script. After destroying an elided embedded
image, the latter won't get automatically recreated.
.PP
@@ -796,6 +832,7 @@ When an embedded image is added to a text widget with the \fIpathName \fBimage
create\fR widget command, several configuration options may be associated with
it. These options may be modified later with the \fIpathName \fBimage
configure\fR widget command. The following options are currently supported:
+.\" OPTION: -align
.TP
\fB\-align \fIwhere\fR
.
@@ -805,11 +842,13 @@ of the values \fBtop\fR (align the top of the image with the top of the line),
\fBcenter\fR (center the image within the range of the line), \fBbottom\fR
(align the bottom of the image with the bottom of the line's area), or
\fBbaseline\fR (align the bottom of the image with the baseline of the line).
+.\" OPTION: -image
.TP
\fB\-image \fIimage\fR
.
Specifies the name of the Tk image to display in the annotation. If
\fIimage\fR is not a valid Tk image, then an error is returned.
+.\" OPTION: -name
.TP
\fB\-name \fIImageName\fR
.
@@ -817,12 +856,14 @@ Specifies the name by which this image instance may be referenced in the text
widget. If \fIImageName\fR is not supplied, then the name of the Tk image is
used instead. If the \fIimageName\fR is already in use, \fI#nn\fR is appended
to the end of the name as described above.
+.\" OPTION: -padx
.TP
\fB\-padx \fIpixels\fR
.
\fIPixels\fR specifies the amount of extra space to leave on each side of the
embedded image. It may have any of the usual forms defined for a screen
distance.
+.\" OPTION: -pady
.TP
\fB\-pady \fIpixels\fR
.
@@ -978,7 +1019,7 @@ In order to maintain a responsive user-experience, the text widget calculates
lines metrics (line heights in pixels) asynchronously. Because of this, some
commands of the text widget may return wrong results if the asynchronous
calculations are not finished at the time of calling. This applies to
-\fIpathName \fBcount -ypixels\fR and \fIpathName \fByview\fR.
+\fIpathName \fBcount \-ypixels\fR and \fIpathName \fByview\fR.
.PP
Again for performance reasons, it would not be appropriate to let these
commands always wait for the end of the update calculation each time they are
@@ -1060,6 +1101,7 @@ operations on the widget. It has the following general form:
\fIPathName\fR is the name of the command, which is the same as the text
widget's path name. \fIOption\fR and the \fIarg\fRs determine the exact
behavior of the command. The following commands are possible for text widgets:
+.\" METHOD: bbox
.TP
\fIpathName \fBbbox \fIindex\fR
.
@@ -1070,13 +1112,15 @@ and the last two elements give the width and height of the area. If the
character is only partially visible on the screen, then the return value
reflects just the visible part. If the character is not visible on the screen
then the return value is an empty list.
+.\" METHOD: cget
.TP
-\fIpathName \fBcget\fR \fIoption\fR
+\fIpathName \fBcget\fI option\fR
.
Returns the current value of the configuration option given by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBtext\fR command.
+.\" METHOD: compare
.TP
-\fIpathName \fBcompare\fR \fIindex1 op index2\fR
+\fIpathName \fBcompare\fI index1 op index2\fR
.
Compares the indices given by \fIindex1\fR and \fIindex2\fR according to the
relational operator given by \fIop\fR, and returns 1 if the relationship is
@@ -1084,6 +1128,7 @@ satisfied and 0 if it is not. \fIOp\fR must be one of the operators <, <=, ==,
>=, >, or !=. If \fIop\fR is == then 1 is returned if the two indices refer to
the same character, if \fIop\fR is < then 1 is returned if \fIindex1\fR refers
to an earlier character in the text than \fIindex2\fR, and so on.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -1097,6 +1142,7 @@ specified). If one or more \fIoption\-value\fR pairs are specified, then the
command modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string. \fIOption\fR may have any of
the values accepted by the \fBtext\fR command.
+.\" METHOD: count
.TP
\fIpathName \fBcount\fR ?\fIoptions\fR? \fIindex1 index2\fR
.
@@ -1160,6 +1206,7 @@ supplied. For example
.QW ".text count \-xpixels \-ypixels 1.3 4.5"
is perfectly valid and will return a list of two elements.
.RE
+.\" METHOD: debug
.TP
\fIpathName \fBdebug \fR?\fIboolean\fR?
.
@@ -1180,6 +1227,7 @@ global variables \fBtk_textRedraw\fR and \fBtk_textRelayout\fR to the lists of
indices that are redrawn. The values of these variables are tested by Tk's
test suite.
.RE
+.\" METHOD: delete
.TP
\fIpathName \fBdelete \fIindex1 \fR?\fIindex2 ...\fR?
.
@@ -1207,6 +1255,7 @@ side-effects. If multiple ranges with the same start index are given,
then the longest range is used. If overlapping ranges are given, then
they will be merged into spans that do not cause deletion of text
outside the given ranges due to text shifted during deletion.
+.\" METHOD: dlineinfo
.TP
\fIpathName \fBdlineinfo \fIindex\fR
.
@@ -1223,6 +1272,7 @@ width of the window then the area returned reflects just the portion of the
line that is occupied by characters and embedded windows. If the display line
containing \fIindex\fR is not visible on the screen then the return value is
an empty list.
+.\" METHOD: dump
.TP
\fIpathName \fBdump \fR?\fIswitches\fR? \fIindex1 \fR?\fIindex2\fR?
.
@@ -1241,11 +1291,13 @@ the text, mark name, tag name, image name, or window name. The \fIindex\fR
information is the index of the start of the text, mark, tag transition, image
or window. One or more of the following switches (or abbreviations thereof)
may be specified to control the dump:
+.\" OPTION: -all
.TP
\fB\-all\fR
.
Return information about all elements: text, marks, tags, images and windows.
This is the default.
+.\" OPTION: -command
.TP
\fB\-command \fIcommand\fR
.
@@ -1253,20 +1305,24 @@ Instead of returning the information as the result of the dump operation,
invoke the \fIcommand\fR on each element of the text widget within the range.
The command has three arguments appended to it before it is evaluated: the
\fIkey\fR, \fIvalue\fR, and \fIindex\fR.
+.\" OPTION: -image
.TP
\fB\-image\fR
.
Include information about images in the dump results.
+.\" OPTION: -mark
.TP
\fB\-mark\fR
.
Include information about marks in the dump results.
+.\" OPTION: -tag
.TP
\fB\-tag\fR
.
Include information about tag transitions in the dump results. Tag information
is returned as \fBtagon\fR and \fBtagoff\fR elements that indicate the begin
and end of each range of each tag, respectively.
+.\" OPTION: -text
.TP
\fB\-text\fR
.
@@ -1275,6 +1331,7 @@ to the next element or the end of range indicated by \fIindex2\fR. A text
element does not span newlines. A multi-line block of text that contains no
marks or tag transitions will still be dumped as a set of text segments that
each end with a newline. The newline is part of the value.
+.\" OPTION: -window
.TP
\fB\-window\fR
.
@@ -1283,6 +1340,7 @@ window is its Tk pathname, unless the window has not been created yet. (It
must have a create script.) In this case an empty string is returned, and you
must query the window by its index position to get more information.
.RE
+.\" METHOD: edit
.TP
\fIpathName \fBedit \fIoption \fR?\fIarg ...\fR?
.
@@ -1333,6 +1391,7 @@ edit action is defined as all the insert and delete commands that are recorded
on the undo stack in between two separators. Generates an error when the undo
stack is empty. Does nothing when the \fB\-undo\fR option is false.
.RE
+.\" METHOD: get
.TP
\fIpathName \fBget\fR ?\fB\-displaychars\fR? ?\fB\-\-\fR? \fIindex1\fR ?\fIindex2 ...\fR?
.
@@ -1351,6 +1410,7 @@ order passed to \fIpathName \fBget\fR. If the \fB\-displaychars\fR option is
given, then, within each range, only those characters which are not elided
will be returned. This may have the effect that some of the returned ranges
are empty strings.
+.\" METHOD: image
.TP
\fIpathName \fBimage \fIoption \fR?\fIarg ...\fR?
.
@@ -1393,12 +1453,14 @@ identifier returned.
Returns a list whose elements are the names of all image instances currently
embedded in \fIwindow\fR.
.RE
+.\" METHOD: index
.TP
\fIpathName \fBindex \fIindex\fR
.
Returns the position corresponding to \fIindex\fR in the form \fIline.char\fR
where \fIline\fR is the line number and \fIchar\fR is the character number.
\fIIndex\fR may have any of the forms described under \fBINDICES\fR above.
+.\" METHOD: insert
.TP
\fIpathName \fBinsert \fIindex chars \fR?\fItagList chars tagList ...\fR?
.
@@ -1416,6 +1478,7 @@ of the tags present around the insertion point. If multiple
effect as if a separate \fIpathName \fBinsert\fR widget command had been
issued for each pair, in order. The last \fItagList\fR argument may be
omitted.
+.\" METHOD: mark
.TP
\fIpathName \fBmark \fIoption \fR?\fIarg ...\fR?
.
@@ -1446,7 +1509,7 @@ position if there are multiple marks at the same index. These semantics mean
that the \fBmark next\fR operation can be used to step through all the marks
in a text widget in the same order as the mark information returned by the
\fIpathName \fBdump\fR operation. If a mark has been set to the special
-\fBend\fR index, then it appears to be \fIafter\fR \fBend\fR with respect to
+\fBend\fR index, then it appears to be \fIafter \fBend\fR with respect to
the \fIpathName \fBmark next\fR operation. An empty string is returned if
there are no marks after \fIindex\fR.
.TP
@@ -1478,6 +1541,7 @@ calls to
.QW "\fIpathName \fBmark names\fR" .
This command returns an empty string.
.RE
+.\" METHOD: peer
.TP
\fIpathName \fBpeer \fIoption args\fR
.
@@ -1497,11 +1561,15 @@ be overridden with the standard configuration options.
Returns a list of peers of this widget (this does not include the widget
itself). The order within this list is undefined.
.RE
+.\" METHOD: pendingsync
.TP
\fIpathName \fBpendingsync\fR
+.
Returns 1 if the line heights calculations are not up-to-date, 0 otherwise.
+.\" METHOD: replace
.TP
-\fIpathName \fBreplace\fR \fIindex1 index2 chars\fR ?\fItagList chars tagList ...\fR?
+\fIpathName \fBreplace\fI index1 index2 chars\fR ?\fItagList chars tagList ...\fR?
+.
Replaces the range of characters between \fIindex1\fR and \fIindex2\fR
with the given characters and tags. See the section on \fIpathName
\fBinsert\fR for an explanation of the handling of the \fItagList...\fR
@@ -1516,6 +1584,7 @@ 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
+.\" METHOD: scan
.TP
\fIpathName \fBscan \fIoption args\fR
.
@@ -1539,6 +1608,7 @@ coordinates. This command is typically associated with mouse motion events in
the widget, to produce the effect of dragging the text at high speed through
the window. The return value is an empty string.
.RE
+.\" METHOD: search
.TP
\fIpathName \fBsearch \fR?\fIswitches\fR? \fIpattern index \fR?\fIstopIndex\fR?
.
@@ -1548,12 +1618,14 @@ first character in the match is returned as result; otherwise an empty string
is returned. One or more of the following switches (or abbreviations thereof)
may be specified to control the search:
.RS
+.\" OPTION: -forwards
.TP
\fB\-forwards\fR
.
The search will proceed forward through the text, finding the first matching
range starting at or after the position given by \fIindex\fR. This is the
default.
+.\" OPTION: -backwards
.TP
\fB\-backwards\fR
.
@@ -1563,11 +1635,13 @@ allowed to be at \fIindex\fR). Note that, for a variety of reasons, backwards
searches can be substantially slower than forwards searches (particularly when
using \fB\-regexp\fR), so it is recommended that performance-critical code use
forward searches.
+.\" OPTION: -exact
.TP
\fB\-exact\fR
.
Use exact matching: the characters in the matching range must be identical to
those in \fIpattern\fR. This is the default.
+.\" OPTION: -regexp
.TP
\fB\-regexp\fR
.
@@ -1579,6 +1653,7 @@ details). The default matching automatically passes both the
\fB\-nolinestop\fR is used), so that \fI^$\fR match beginning and end of line,
and \fI.\fR, \fI[^\fR sequences will never match the newline character
\fI\en\fR.
+.\" OPTION: -nolinestop
.TP
\fB\-nolinestop\fR
.
@@ -1587,10 +1662,12 @@ This allows \fI.\fR and \fI[^\fR sequences to match the newline character
details). This option is only meaningful if \fB\-regexp\fR is also given, and
an error will be thrown otherwise. For example, to match the entire text, use
.QW "\fIpathName \fBsearch \-nolinestop \-regexp\fR \N'34'.*\N'34' 1.0" .
+.\" OPTION: -nocase
.TP
\fB\-nocase\fR
.
Ignore case differences between the pattern and the text.
+.\" OPTION: -count
.TP
\fB\-count\fI varName\fR
.
@@ -1601,6 +1678,7 @@ or windows in the matching range (and there are no elided characters if
\fB\-elide\fR is not given), this is equivalent to the number of characters
matched. In either case, the range \fImatchIdx\fR to \fImatchIdx + $count
chars\fR will return the entire matched text.
+.\" OPTION: -all
.TP
\fB\-all\fR
.
@@ -1620,6 +1698,7 @@ will just match twice, once for each word, and matching
against
.QW ZooZooZoo
will just match once.
+.\" OPTION: -overlap
.TP
\fB\-overlap\fR
.
@@ -1637,6 +1716,7 @@ against
.QW ZooZooZoo
will now match twice. An error will be thrown if this switch is used without
\fB\-all\fR.
+.\" OPTION: -strictlimits
.TP
\fB\-strictlimits\fR
.
@@ -1644,10 +1724,12 @@ When performing any search, the normal behaviour is that the start and stop
limits are checked with respect to the start of the matching text. With the
\fB\-strictlimits\fR flag, the entire matching range must lie inside the start
and stop limits specified for the match to be valid.
+.\" OPTION: -elide
.TP
\fB\-elide\fR
.
Find elided (hidden) text as well. By default only displayed text is searched.
+.\" OPTION: --
.TP
\fB\-\|\-\fR
.
@@ -1670,6 +1752,7 @@ no wrap-around will occur. This means that, for example, if the search is
\fIstartIndex\fR, nothing will ever be found. See \fBKNOWN BUGS\fR below for a
number of minor limitations of the \fIpathName \fBsearch\fR command.
.RE
+.\" METHOD: see
.TP
\fIpathName \fBsee \fIindex\fR
.
@@ -1679,23 +1762,28 @@ nothing. If \fIindex\fR is a short distance out of view, the command adjusts
the view just enough to make \fIindex\fR visible at the edge of the window.
If \fIindex\fR is far out of view, then the command centers \fIindex\fR in the
window.
+.\" METHOD: sync
.TP
-\fIpathName \fBsync\fR ?\fB-command \fIcommand\fR?
+\fIpathName \fBsync\fR ?\fB\-command \fIcommand\fR?
+.
Controls the synchronization of the view of the text widget.
.RS
.TP
\fIpathName \fBsync\fR
+.
Immediately brings the line metrics up-to-date by forcing computation of any
outdated line heights. The command returns immediately if there is no such
outdated line heights, otherwise it returns only at the end of the computation.
The command returns an empty string.
.TP
-\fIpathName \fBsync -command \fIcommand\fR
+\fIpathName \fBsync \-command \fIcommand\fR
+.
Schedules \fIcommand\fR to be executed (by the event loop) exactly once as soon
as all line heights are up-to-date. If there are no pending line metrics
calculations, the scheduling is immediate. The command returns the empty
string. \fBbgerror\fR is called on \fIcommand\fR failure.
.RE
+.\" METHOD: tag
.TP
\fIpathName \fBtag \fIoption \fR?\fIarg ...\fR?
.
@@ -1837,7 +1925,7 @@ of the range and the index of the character just after the last one in the
range. If no matching range is found then the return value is an empty string.
If \fIindex2\fR is not given then it defaults to the beginning of the text.
.TP
-\fIpathName\fB tag raise \fItagName \fR?\fIaboveThis\fR?
+\fIpathName \fBtag raise \fItagName \fR?\fIaboveThis\fR?
.
Changes the priority of tag \fItagName\fR so that it is just higher in
priority than the tag whose name is \fIaboveThis\fR. If \fIaboveThis\fR is
@@ -1865,6 +1953,7 @@ characters in the specified range (e.g. \fIindex1\fR is past the end of the
file or \fIindex2\fR is less than or equal to \fIindex1\fR) then the command
has no effect. This command returns an empty string.
.RE
+.\" METHOD: window
.TP
\fIpathName \fBwindow \fIoption \fR?\fIarg ...\fR?
.
@@ -1905,6 +1994,7 @@ information on the options that are supported. Returns an empty string.
Returns a list whose elements are the names of all windows currently embedded
in \fIwindow\fR.
.RE
+.\" METHOD: xview
.TP
\fIpathName \fBxview \fIoption args\fR
.
@@ -1950,6 +2040,7 @@ right by \fInumber\fR average-width characters on the display. If \fInumber\fR i
negative then characters farther to the left become visible; if it is positive
then characters farther to the right become visible.
.RE
+.\" METHOD: yview
.TP
\fIpathName \fByview \fR?\fIargs\fR?
.
@@ -2254,7 +2345,7 @@ practice this is a rare problem, but it can occur, for example:
.CS
pack [\fBtext\fR .t]
\&.t insert 1.0 "aaaa\enbbbb\encccc\enbbbb\enaaaa\en"
-\&.t search \-regexp \-\- {(a+|b+\enc+\enb+)+\ena+} 1.0
+\&.t search -regexp -- {(a+|b+\enc+\enb+)+\ena+} 1.0
.CE
will not find a match when one exists of 19 characters starting from the first
.QW b .
@@ -2270,7 +2361,7 @@ portions of the widget. For example:
.CS
pack [\fBtext\fR .t]
\&.t insert 1.0 "aaaa\enbbbb\enbbbb\enbbbb\enbbbb\\n"
-\&.t search \-regexp \-backward \-\- {b+\en|a+\en(b+\en)+} end
+\&.t search -regexp -backward -- {b+\en|a+\en(b+\en)+} end
.CE
matches at
.QW 5.0
diff --git a/doc/tk.n b/doc/tk.n
index 27a2d58..e2a81c4 100644
--- a/doc/tk.n
+++ b/doc/tk.n
@@ -12,7 +12,7 @@
.SH NAME
tk \- Manipulate Tk internal state
.SH SYNOPSIS
-\fBtk\fR \fIoption \fR?\fIarg ...\fR?
+\fBtk\fI option \fR?\fIarg ...\fR?
.BE
.SH DESCRIPTION
.PP
@@ -23,6 +23,7 @@ application as a whole, or to a screen or display, rather than to a
particular window.
The command can take any of a number of different forms
depending on the \fIoption\fR argument. The legal forms are:
+.\" METHOD: appname
.TP
\fBtk appname \fR?\fInewName\fR?
.
@@ -44,6 +45,7 @@ be able to find some options for the application.
If sends have been disabled by deleting the \fBsend\fR command,
this command will reenable them and recreate the \fBsend\fR
command.
+.\" METHOD: busy
.TP
\fBtk busy \fIsubcommand\fR ...
.
@@ -51,6 +53,7 @@ This command controls the marking of window hierarchies as
.QW busy ,
rendering them non-interactive while some other operation is proceeding. For
more details see the \fBbusy\fR manual page.
+.\" METHOD: caret
.TP
\fBtk caret \fIwindow \fR?\fB\-x \fIx\fR? ?\fB\-y \fIy\fR? ?\fB\-height \fIheight\fR?
.
@@ -63,6 +66,7 @@ the last values used for setting the caret are return in option-value pair
format. \fB\-x\fR and \fB\-y\fR represent window-relative coordinates, and
\fB\-height\fR is the height of the current cursor location, or the height
of the specified \fIwindow\fR if none is given.
+.\" METHOD: inactive
.TP
\fBtk inactive \fR?\fB\-displayof \fIwindow\fR? ?\fBreset\fR?
.
@@ -81,10 +85,13 @@ the timer is reset and an empty string is returned. Resetting the
inactivity time is forbidden in safe interpreters and will throw an
error if tried.
.RE
+.\" METHOD: fontchooser
.TP
\fBtk fontchooser \fIsubcommand\fR ...
+.
Controls the Tk font selection dialog. For more details see the
\fBfontchooser\fR manual page.
+.\" METHOD: print
.TP
\fBtk print \fIwindow\fR
.
@@ -92,6 +99,7 @@ The \fBtk print\fR command posts a dialog that allows users to print output
from the \fBcanvas\fR and \fBtext\fR widgets. The printing will be done using
platform-native APIs and dialogs where available. For more details see the
\fBprint\fR manual page.
+.\" METHOD: scaling
.TP
\fBtk scaling \fR?\fB\-displayof \fIwindow\fR? ?\fInumber\fR?
.
@@ -117,6 +125,7 @@ after the scaling factor is changed will use the new scaling factor, but it
is undefined whether existing widgets will resize themselves dynamically to
accommodate the new scaling factor.
.RE
+.\" METHOD: sysnotify
.TP
\fBtk sysnotify \fP \fItitle\fP? \fImessage\fP?
.
@@ -124,11 +133,13 @@ The \fBtk sysnotify\fP command creates a platform-specific system
notification alert. Its intent is to provide a brief, unobtrusive
notification to the user by popping up a window that briefly appears in a
corner of the screen. For more details see the \fBsysnotify\fR manual page.
+.\" METHOD: systray
.TP
\fBtk systray create\fP \fIsubcommand...\fP
.
The \fBtk systray\fP command creates an icon in the platform-specific
tray. For more details see the \fBsystray\fR manual page.
+.\" METHOD: useinputmethods
.TP
\fBtk useinputmethods \fR?\fB\-displayof \fIwindow\fR? ?\fIboolean\fR?
.
@@ -139,6 +150,7 @@ feature is only significant on X. If XIM support is not available, this
will always return 0. If the \fIwindow\fR argument is omitted, it defaults
to the main window. If the \fIboolean\fR argument is omitted, the current
state is returned. This is turned on by default for the main display.
+.\" METHOD: windowingsystem
.TP
\fBtk windowingsystem\fR
.
diff --git a/doc/tk_mac.n b/doc/tk_mac.n
index 2ce1374..39be09c 100644
--- a/doc/tk_mac.n
+++ b/doc/tk_mac.n
@@ -35,7 +35,6 @@ tk::mac \- Access Mac-Specific Functionality on OS X from Tk
\fB::tk::mac::antialiasedtext \fInumber\fR
\fB::tk::mac::useThemedToplevel \fIboolean\fR
-
\fB::tk::mac::iconBitmap \fIname width height \-kind value\fR
.fi
.BE
@@ -45,6 +44,7 @@ The Aqua/Mac OS X application environment defines a number of additional
events that applications should respond to. These events are mapped by Tk to
calls to commands in the \fB::tk::mac\fR namespace; unless otherwise noted, if
the command is absent, no action will be taken.
+.\" COMMAND: DoScriptFile
.TP
\fB::tk::mac::DoScriptFile\fR
.
@@ -52,6 +52,7 @@ The default Apple Event handler for AEDoScriptHandler. This command
executes a Tcl file when an AppleScript sends a
.QW "do script"
command to Wish with a file path as a parameter.
+.\" COMMAND: DoScriptText
.TP
\fB::tk::mac::DoScriptText\fR
.
@@ -59,6 +60,7 @@ The default Apple Event handler for AEDoScriptHandler. This command
executes Tcl code when an AppleScript sends a
.QW "do script"
command to Wish with Tcl code or a Tcl procedure as a parameter.
+.\" COMMAND: ShowPreferences
.TP
\fB::tk::mac::ShowPreferences\fR
.
@@ -77,6 +79,7 @@ proc ::tk::mac::ShowPreferences {} {
}
.CE
.RE
+.\" COMMAND: OpenApplication
.TP
\fB::tk::mac::OpenApplication\fR
.
@@ -84,6 +87,7 @@ If a proc of this name is defined, this proc fill fire when your application
is initially opened. It is the default Apple Event handler for
kAEOpenApplication,
.QW oapp .
+.\" COMMAND: ReopenApplication
.TP
\fB::tk::mac::ReopenApplication\fR
.
@@ -106,6 +110,7 @@ proc ::tk::mac::ReopenApplication {} {
}
.CE
.RE
+.\" COMMAND: OpenDocument
.TP
\fB::tk::mac::OpenDocument \fIfile...\fR
.
@@ -124,6 +129,7 @@ proc ::tk::mac::OpenDocument {args} {
}
.CE
.RE
+.\" COMMAND: PrintDocument
.TP
\fB::tk::mac::PrintDocument \fIfile...\fR
.
@@ -132,6 +138,7 @@ kAEPrintDocuments,
.QW pdoc ,
the Apple Event sent when your application is asked to print a
document. It takes a single absolute file path as an argument.
+.\" COMMAND: Quit
.TP
\fB::tk::mac::Quit\fR
.
@@ -142,17 +149,20 @@ the Apple Event sent when your application is asked to be quit, e.g. via the
quit menu item in the application menu, the quit menu item in the Dock menu,
or during a logout/restart/shutdown etc. If this is not defined, \fBexit\fR is
called instead.
+.\" COMMAND: OnHide
.TP
\fB::tk::mac::OnHide\fR
.
If defined, this is called when your application receives a kEventAppHidden
event, e.g. via the hide menu item in the application or Dock menus.
+.\" COMMAND: OnShow
.TP
\fB::tk::mac::OnShow\fR
.
If defined, this is called when your application receives a kEventAppShown
event, e.g. via the show all menu item in the application menu, or by clicking
the Dock icon of a hidden application.
+.\" COMMAND: ShowHelp
.TP
\fB::tk::mac::ShowHelp\fR
.
@@ -162,6 +172,7 @@ platform-specific standard Help menu item
performs the default Cocoa action of showing the Help Book configured in the
application's Info.plist (or displaying an alert if no Help Book is
set).
+.\" COMMAND: PerformService
.TP
\fB::tk::mac::PerformService\fR
.
@@ -193,6 +204,7 @@ key in Wish's Info.plist file is currently set as
.QW "Wish"
; if a developer changes the name of the Wish executable to something
else, this key should be modified with the same name.
+.\" COMMAND: LaunchURL
.TP
\fB::tk::mac::LaunchURL \fIURL...\fR
.
@@ -202,19 +214,18 @@ an RSS feed, rather than launching a default application to handle the
URL, although it can defined as such. Wish includes a stub URL scheme
of
.QW foo://
-in the CFBundleURLSchemes key of its Info.plist file; this should be customized for the specific URL
-scheme the developer wants to support.
+in the CFBundleURLSchemes key of its Info.plist file; this should be
+customized for the specific URL scheme the developer wants to support.
.TP
\fB::tk::mac::GetAppPath\fR
.
Returns the current applications's file path.
.TP
-
-
.SH "ADDITIONAL DIALOGS"
.PP
The Aqua/Mac OS X defines additional dialogs that applications should
support.
+.\" COMMAND: standardAboutPanel
.TP
\fB::tk::mac::standardAboutPanel\fR
.
@@ -233,22 +244,26 @@ procedure will be called instead of opening the standardAboutPanel.
.PP
There are a number of additional global configuration options that control the
details of how Tk renders by default.
+.\" COMMAND: useCompatibilityMetrics
.TP
\fB::tk::mac::useCompatibilityMetrics \fIboolean\fR
.
Preserves compatibility with older Tk/Aqua metrics; set to \fBfalse\fR for
more native spacing.
+.\" COMMAND: CGAntialiasLimit
.TP
\fB::tk::mac::CGAntialiasLimit \fIlimit\fR
.
Sets the antialiasing limit; lines thinner that \fIlimit\fR pixels will not be
antialiased. Integer, set to 0 by default, making all lines be antialiased.
+.\" COMMAND: antialiasedtext
.TP
\fB::tk::mac::antialiasedtext \fInumber\fR
.
Sets anti-aliased text. Controls text antialiasing, possible values for
\fInumber\fR are -1 (default, use system default for text AA), 0 (no text AA),
1 (use text AA).
+.\" COMMAND: useThemedToplevel
.TP
\fB::tk::mac::useThemedToplevel \fIboolean\fR
.
@@ -257,6 +272,7 @@ background. Equivalent to configuring the toplevel with
.QW "\fB\-background systemWindowHeaderBackground\fR" ,
or to using a \fBttk::frame\fR.
.SH "SUPPORT COMMANDS"
+.\" COMMAND: iconBitmap
.TP
\fB::tk::mac::iconBitmap \fIname width height \-kind value\fR
.
@@ -278,26 +294,32 @@ NSImage url string
.PP
The \fIwidth\fR and \fIheight\fR arguments to \fBtk::mac::iconBitmap\fR define
the dimensions of the image to create, and \fI\-kind\fR must be one of:
+.\" OPTION: -file
.TP
\fB\-file\fR
.
icon of file at given path
+.\" OPTION: -fileType
.TP
\fB\-fileType\fR
.
icon of given file type
+.\" OPTION: -osType
.TP
\fB\-osType\fR
.
icon of given 4-char OSType file type
+.\" OPTION: -systemType
.TP
\fB\-systemType\fR
.
icon for given IconServices 4-char OSType
+.\" OPTION: -namedImage
.TP
\fB\-namedImage\fR
.
named NSImage for given name
+.\" OPTION: -imageFile
.TP
\fB\-imageFile\fR
.
diff --git a/doc/tkerror.n b/doc/tkerror.n
index 53cb0d1..b1e4b81 100644
--- a/doc/tkerror.n
+++ b/doc/tkerror.n
@@ -18,13 +18,15 @@ tkerror \- Command invoked to process background errors
.PP
Note: as of Tk 4.1 the \fBtkerror\fR command has been renamed to
\fBbgerror\fR because the event loop (which is what usually invokes
-it) is now part of Tcl. For backward compatibility
+it) is now part of Tcl. Using the \fBtkerror\fR name is deprecated.
+.PP
+For backward compatibility
the \fBbgerror\fR provided by the current Tk version still
tries to call \fBtkerror\fR if there is one (or an auto loadable one),
so old script defining that error handler should still work, but you
should anyhow modify your scripts to use \fBbgerror\fR instead
of \fBtkerror\fR because that support for the old name might vanish
-in the near future. If that call fails, \fBbgerror\fR
+in the future. If that call fails, \fBbgerror\fR
posts a dialog showing the error and offering to see the stack trace
to the user. If you want your own error management you should
directly override \fBbgerror\fR instead of \fBtkerror\fR.
diff --git a/doc/tkvars.n b/doc/tkvars.n
index e211575..cd69906 100644
--- a/doc/tkvars.n
+++ b/doc/tkvars.n
@@ -16,6 +16,7 @@ geometry, tk_library, tk_patchLevel, tk::scalingPct, tk_strictMotif, tk::svgFmt,
.PP
The following Tcl variables are either set or used by Tk at various times
in its execution:
+.\" VARIABLE: tk_library
.TP 15
\fBtk_library\fR
.
@@ -40,6 +41,7 @@ working directory.
The variable can be modified by an application to switch to a different
library.
.RE
+.\" VARIABLE: tk_patchLevel
.TP
\fBtk_patchLevel\fR
.
@@ -52,6 +54,7 @@ it uniquely identifies an official version of Tk.
This value is normally the same as the result of
.QW "\fBpackage require\fR \fBtk\fR" .
.RE
+.\" VARIABLE: scalingPct
.TP
\fBtk::scalingPct\fR
.
@@ -87,6 +90,7 @@ additional step, Tk synchronizes the scaling factor used to convert
between physical units and pixels with the scaling percentage, with the
aid of the \fBtk scaling\fR command.
.RE
+.\" VARIABLE: tk_strictMotif
.TP
\fBtk_strictMotif\fR
.
@@ -96,6 +100,7 @@ closely as possible to Motif look-and-feel standards.
For example, active elements such as buttons and scrollbar
sliders will not change color when the pointer passes over them.
Modern applications should not normally set this variable.
+.\" VARIABLE: svgFmt
.TP
\fBtk::svgFmt\fR
.
@@ -119,6 +124,7 @@ read-only! Note also that whenever the scaling factor used to convert
between physical units and pixels is changed via \fBtk scaling\fR, the
value of the variable \fBtk::svgFmt\fR is automatically updated.
.RE
+.\" VARIABLE: tk_version
.TP
\fBtk_version\fR
.
@@ -134,6 +140,7 @@ major version number changes.
.SS "INTERNAL AND DEBUGGING VARIABLES"
.PP
These variables should not normally be set by user code.
+.\" VARIABLE: Priv
.TP
\fBtk::Priv\fR
.
@@ -141,6 +148,8 @@ This variable is an array containing several pieces of information
that are private to Tk. The elements of \fBtk::Priv\fR are used by
Tk library procedures and default bindings.
They should not be accessed by any code outside Tk.
+.\" VARIABLE: tk_textRedraw
+.\" VARIABLE: tk_textRelayout
.TP
\fBtk_textRedraw\fR
.TP
@@ -154,6 +163,7 @@ used by Tk's test suite.
The following variables are only guaranteed to exist in \fBwish\fR
executables; the Tk library does not define them itself but many Tk
environments do.
+.\" VARIABLE: geometry
.TP
\fBgeometry\fR
.
diff --git a/doc/tkwait.n b/doc/tkwait.n
index 82d51ba..958d4f3 100644
--- a/doc/tkwait.n
+++ b/doc/tkwait.n
@@ -12,26 +12,29 @@
.SH NAME
tkwait \- Wait for variable to change or window to be destroyed
.SH SYNOPSIS
+.nf
\fBtkwait variable \fIname\fR
-.sp
\fBtkwait visibility \fIname\fR
-.sp
\fBtkwait window \fIname\fR
+.fi
.BE
.SH DESCRIPTION
.PP
The \fBtkwait\fR command waits for one of several things to happen,
then it returns without taking any other actions.
The return value is always an empty string.
+.\" METHOD: variable
If the first argument is \fBvariable\fR (or any abbreviation of
it) then the second argument is the name of a global variable and the
command waits for that variable to be modified.
+.\" METHOD: visibility
If the first argument is \fBvisibility\fR (or any abbreviation
of it) then the second argument is the name of a window and the
\fBtkwait\fR command waits for a change in its
visibility state (as indicated by the arrival of a VisibilityNotify
event). This form is typically used to wait for a newly-created
window to appear on the screen before taking some action.
+.\" METHOD: window
If the first argument is \fBwindow\fR (or any abbreviation
of it) then the second argument is the name of a window and the
\fBtkwait\fR command waits for that window to be destroyed.
diff --git a/doc/toplevel.n b/doc/toplevel.n
index e946248..d37faa2 100644
--- a/doc/toplevel.n
+++ b/doc/toplevel.n
@@ -12,7 +12,7 @@
.SH NAME
toplevel \- Create and manipulate 'toplevel' main and popup window widgets
.SH SYNOPSIS
-\fBtoplevel\fR \fIpathName \fR?\fIoptions\fR?
+\fBtoplevel\fI pathName \fR?\fIoptions\fR?
.SO
\-borderwidth \-highlightcolor \-pady
\-cursor \-highlightthickness \-relief
@@ -148,6 +148,7 @@ operations on the widget. It has the following general form:
the toplevel widget's path name. \fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
commands are possible for toplevel widgets:
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
.
@@ -155,6 +156,7 @@ Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBtoplevel\fR
command.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
diff --git a/doc/ttk_Geometry.3 b/doc/ttk_Geometry.3
index 0f8a171..20295d1 100644
--- a/doc/ttk_Geometry.3
+++ b/doc/ttk_Geometry.3
@@ -100,7 +100,8 @@ A bitmask containing one or more of the bits
\fBTTK_STICK_E\fR (east, or right),
\fBTTK_STICK_N\fR (north, or top), and
\fBTTK_STICK_S\fR (south, or bottom).
-\fBTTK_FILL_X\fR is defined as a synonym for (\fBTTK_STICK_W\fR|\fBTTK_STICK_E\fR),
+\fBTTK_FILL_X\fR is defined as a synonym for
+(\fBTTK_STICK_W\fR|\fBTTK_STICK_E\fR),
\fBTTK_FILL_Y\fR is a synonym for (\fBTTK_STICK_N\fR|\fBTTK_STICK_S\fR),
and \fBTTK_FILL_BOTH\fR
is a synonym for (\fBTTK_FILL_X\fR|\fBTTK_FILL_Y\fR).
diff --git a/doc/ttk_button.n b/doc/ttk_button.n
index 896432f..4c24a45 100644
--- a/doc/ttk_button.n
+++ b/doc/ttk_button.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::button \- Widget that issues a command when pressed
.SH SYNOPSIS
-\fBttk::button\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::button\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
A \fBttk::button\fR widget displays a textual label and/or image,
@@ -52,8 +52,10 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
button widgets support the following additional commands:
+.\" METHOD: invoke
.TP
\fIpathName \fBinvoke\fR
+.
Invokes the command associated with the button.
.SH "STANDARD STYLES"
.PP
@@ -103,7 +105,7 @@ are:
.RS
\fB\-shiftrelief\fP specifies how far the button contents are
shifted down and right in the \fIpressed\fP state.
-This action provides additional skeumorphic feedback.
+This action provides additional skeuomorphic feedback.
.RE
\fB\-width\fP \fIamount\fP
.PP
diff --git a/doc/ttk_checkbutton.n b/doc/ttk_checkbutton.n
index d78b7fc..e49b414 100644
--- a/doc/ttk_checkbutton.n
+++ b/doc/ttk_checkbutton.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::checkbutton \- On/off widget
.SH SYNOPSIS
-\fBttk::checkbutton\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::checkbutton\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
A \fBttk::checkbutton\fR widget is used to show or change a setting.
@@ -41,8 +41,10 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
checkbutton widgets support the following additional commands:
+.\" METHOD: invoke
.TP
\fIpathname\fB invoke\fR
+.
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
diff --git a/doc/ttk_combobox.n b/doc/ttk_combobox.n
index fdc51af..3c88f84 100644
--- a/doc/ttk_combobox.n
+++ b/doc/ttk_combobox.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::combobox \- text field with popdown selection list
.SH SYNOPSIS
-\fBttk::combobox\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::combobox\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -60,8 +60,10 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
combobox widgets support the following additional commands:
+.\" METHOD: current
.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
(in addition to integers, the \fBend\fR index is supported and indicates
@@ -69,12 +71,16 @@ the last element of the list, moreover the same simple interpretation as
for the command \fBstring index\fR is supported, with simple integer index
arithmetic and indexing relative to \fBend\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.
+\fB\-values\fR or \fB{}\fR if the current value does not appear in the list.
+.\" METHOD: get
.TP
\fIpathName \fBget\fR
+.
Returns the current value of the combobox.
+.\" METHOD: set
.TP
-\fIpathName \fBset\fR \fIvalue\fR
+\fIpathName \fBset\fI value\fR
+.
Sets the value of the combobox to \fIvalue\fR.
.PP
The combobox widget also supports the following \fBttk::entry\fR
diff --git a/doc/ttk_entry.n b/doc/ttk_entry.n
index e71bd01..c4176ec 100644
--- a/doc/ttk_entry.n
+++ b/doc/ttk_entry.n
@@ -12,7 +12,7 @@
.SH NAME
ttk::entry \- Editable text field widget
.SH SYNOPSIS
-\fBttk::entry\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::entry\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -147,8 +147,10 @@ In addition to the standard
\fBstate\fR, \fBstyle\fR and \fBxview\fR
commands (see \fBttk::widget\fR),
entry widgets support the following additional commands:
+.\" METHOD: bbox
.TP
\fIpathName \fBbbox \fIindex\fR
+.
Returns a list of four numbers describing the bounding box of the
character given by \fIindex\fR.
The first two elements of the list give the x and y coordinates of
@@ -157,8 +159,10 @@ the upper-left corner of the screen area covered by the character
the width and height of the character, in pixels.
The bounding box may refer to a region outside the visible area
of the window.
+.\" METHOD: delete
.TP
\fIpathName \fBdelete \fIfirst \fR?\fIlast\fR?
+.
Delete one or more elements of the entry.
\fIFirst\fR is the index of the first character to delete, and
\fIlast\fR is the index of the character just after the last
@@ -166,44 +170,59 @@ one to delete.
If \fIlast\fR is not specified it defaults to \fIfirst\fR+1,
i.e. a single character is deleted.
This command returns the empty string.
+.\" METHOD: get
.TP
\fIpathName \fBget\fR
+.
Returns the entry's string.
+.\" METHOD: icursor
.TP
\fIpathName \fBicursor \fIindex\fR
+.
Arrange for the insert cursor to be displayed just before the character
given by \fIindex\fR. Returns the empty string.
+.\" METHOD: index
.TP
\fIpathName \fBindex\fI index\fR
+.
Returns the numerical index corresponding to \fIindex\fR.
+.\" METHOD: insert
.TP
\fIpathName \fBinsert \fIindex string\fR
+.
Insert \fIstring\fR just before the character
indicated by \fIindex\fR. Returns the empty string.
+.\" METHOD: selection
.TP
\fIpathName \fBselection \fIoption arg\fR
+.
This command is used to adjust the selection within an entry. It
has several forms, depending on \fIoption\fR:
.RS
.TP
\fIpathName \fBselection clear\fR
+.
Clear the selection if it is currently in this widget.
If the selection is not in this widget then the command has no effect.
Returns the empty string.
.TP
\fIpathName \fBselection present\fR
+.
Returns 1 if there is are characters selected in the entry,
0 if nothing is selected.
.TP
-\fIpathName \fBselection range \fIstart\fR \fIend\fR
+\fIpathName \fBselection range \fIstart end\fR
+.
Sets the selection to include the characters starting with
the one indexed by \fIstart\fR and ending with the one just
before \fIend\fR.
If \fIend\fR refers to the same character as \fIstart\fR or an
earlier one, then the entry's selection is cleared.
.RE
+.\" METHOD: validate
.TP
\fIpathName \fBvalidate\fR
+.
Force revalidation, independent of the conditions specified
by the \fB\-validate\fR option.
Returns 0 if validation fails, 1 if it succeeds.
@@ -423,7 +442,8 @@ value is specified for \fB\-fieldbackground\fP. Otherwise it is ignored.
.br
\fB\-fieldbackground\fP \fIcolor\fP
.RS
-Some themes use a graphical background and their field background colors cannot be changed.
+Some themes use a graphical background and their field background colors
+cannot be changed.
.RE
\fB\-foreground\fP \fIcolor\fP
.br
diff --git a/doc/ttk_frame.n b/doc/ttk_frame.n
index 413bb09..20f642b 100644
--- a/doc/ttk_frame.n
+++ b/doc/ttk_frame.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::frame \- Simple container widget
.SH SYNOPSIS
-\fBttk::frame\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::frame\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/ttk_image.n b/doc/ttk_image.n
index 34dbabb..09cf1f8 100644
--- a/doc/ttk_image.n
+++ b/doc/ttk_image.n
@@ -10,7 +10,7 @@
.SH NAME
ttk_image \- Define an element based on an image
.SH SYNOPSIS
-\fBttk::style element create \fIname\fR \fBimage\fR \fIimageSpec\fR ?\fIoptions\fR?
+\fBttk::style element create \fIname \fBimage\fI imageSpec\fR ?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -25,24 +25,30 @@ in a particular state or combination of states.
.SH OPTIONS
.PP
Valid \fIoptions\fR are:
+.\" OPTION: -border
.TP
-\fB\-border\fR \fIpadding\fR
+\fB\-border\fI padding\fR
+.
\fIpadding\fR is a list of up to four integers, specifying
the left, top, right, and bottom borders, respectively.
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.
-In other words, a list of three numbers specify the left, vertical, and right border;
-a list of two numbers specify the horizontal and the vertical border;
+In other words, a list of three numbers specify the left, vertical, and right
+border; a list of two numbers specify the horizontal and the vertical border;
a single number specifies the same border all the way around the element.
See \fBIMAGE STRETCHING\fR, below.
+.\" OPTION: -height
.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.
+.\" OPTION: -padding
.TP
-\fB\-padding\fR \fIpadding\fR
+\fB\-padding\fI padding\fR
+.
Specifies the element's interior padding.
The padding is a list of up to four length specifications
\fIleft top right bottom\fR.
@@ -50,12 +56,14 @@ 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.
-In other words, a list of three numbers specify the left, vertical, and right padding;
-a list of two numbers specify the horizontal and the vertical padding;
+In other words, a list of three numbers specify the left, vertical, and right
+padding; a list of two numbers specify the horizontal and the vertical padding;
a single number specifies the same padding all the way around the widget.
Defaults to \fB\-border\fR if not specified.
+.\" OPTION: -sticky
.TP
-\fB\-sticky\fR \fIspec\fR
+\fB\-sticky\fI spec\fR
+.
Specifies how the image is placed within the final parcel.
\fIspec\fR contains zero or more characters
.QW n ,
@@ -63,8 +71,10 @@ Specifies how the image is placed within the final parcel.
.QW w ,
or
.QW e .
+.\" OPTION: -width
.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.
.SH "IMAGE STRETCHING"
@@ -85,12 +95,12 @@ as a background image) should use \fB\-width 0\fR and \fB\-height 0\fR.
.SH "EXAMPLE"
.PP
.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]
+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]
ttk::style element create Button.button image \e
[list $img1 pressed $img2 active $img3] \e
- \-border {2 4} \-sticky we
+ -border {2 4} -sticky we
.CE
.SH "SEE ALSO"
ttk::intro(n), ttk::style(n), ttk_vsapi(n), image(n), photo(n)
diff --git a/doc/ttk_intro.n b/doc/ttk_intro.n
index c146dd1..783ebb6 100644
--- a/doc/ttk_intro.n
+++ b/doc/ttk_intro.n
@@ -83,10 +83,10 @@ For example, the layout for a horizontal scrollbar is:
.PP
.CS
ttk::\fBstyle layout\fR Horizontal.TScrollbar {
- Scrollbar.trough \-children {
- Scrollbar.leftarrow \-side left \-sticky w
- Scrollbar.rightarrow \-side right \-sticky e
- Scrollbar.thumb \-sticky ew
+ Scrollbar.trough -children {
+ Scrollbar.leftarrow -side left -sticky w
+ Scrollbar.rightarrow -side right -sticky e
+ Scrollbar.thumb -sticky ew
}
}
.CE
@@ -151,9 +151,9 @@ For example:
.PP
.CS
ttk::\fBstyle configure\fR TButton \e
- \-background #d9d9d9 \e
- \-foreground black \e
- \-relief raised \e
+ -background #d9d9d9 \e
+ -foreground black \e
+ -relief raised \e
;
.CE
.PP
@@ -165,9 +165,9 @@ for a particular style:
.PP
.CS
ttk::\fBstyle map\fR 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"
diff --git a/doc/ttk_label.n b/doc/ttk_label.n
index 54c0f47..0d7d766 100644
--- a/doc/ttk_label.n
+++ b/doc/ttk_label.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::label \- Display a text string and/or image
.SH SYNOPSIS
-\fBttk::label\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::label\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/ttk_labelframe.n b/doc/ttk_labelframe.n
index 593d96c..8649dae 100644
--- a/doc/ttk_labelframe.n
+++ b/doc/ttk_labelframe.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::labelframe \- Container widget with optional label
.SH SYNOPSIS
-\fBttk::labelframe\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::labelframe\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/ttk_menubutton.n b/doc/ttk_menubutton.n
index b9b716f..5578835 100644
--- a/doc/ttk_menubutton.n
+++ b/doc/ttk_menubutton.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::menubutton \- Widget that pops down a menu when pressed
.SH SYNOPSIS
-\fBttk::menubutton\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::menubutton\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n
index 84b6495..b7844a7 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.n
@@ -11,10 +11,10 @@
ttk::notebook \- Multi-paned container widget
.SH SYNOPSIS
.nf
-\fBttk::notebook\fR \fIpathname \fR?\fIoptions...\fR?
+\fBttk::notebook\fI pathname \fR?\fIoptions...\fR?
.br
-\fIpathname \fBadd\fR \fIwindow\fR ?\fIoptions...\fR?
-\fIpathname \fBinsert\fR \fIindex\fR \fIwindow\fR ?\fIoptions...\fR?
+\fIpathname \fBadd\fI window\fR ?\fIoptions...\fR?
+\fIpathname \fBinsert\fI index window\fR ?\fIoptions...\fR?
.fi
.BE
.SH DESCRIPTION
@@ -41,8 +41,8 @@ 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.
-In other words, a list of three numbers specify the left, vertical, and right padding;
-a list of two numbers specify the horizontal and the vertical padding;
+In other words, a list of three numbers specify the left, vertical, and right
+padding; a list of two numbers specify the horizontal and the vertical padding;
a single number specifies the same padding all the way around the widget.
.OP \-width width Width
If present and greater than zero,
@@ -112,57 +112,75 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
notebook widgets support the following additional commands:
+.\" METHOD: add
.TP
\fIpathname \fBadd \fIwindow\fR ?\fIoptions...\fR?
+.
Adds a new tab to the notebook.
See \fBTAB OPTIONS\fR for the list of available \fIoptions\fR.
If \fIwindow\fR is currently managed by the notebook but hidden,
it is restored to its previous position.
+.\" METHOD: forget
.TP
\fIpathname \fBforget \fItabid\fR
+.
Removes the tab specified by \fItabid\fR,
unmaps and unmanages the associated window.
+.\" METHOD: hide
.TP
\fIpathname \fBhide \fItabid\fR
+.
Hides the tab specified by \fItabid\fR.
The tab will not be displayed, but the associated window
remains managed by the notebook and its configuration remembered.
Hidden tabs may be restored with the \fBadd\fR command.
+.\" METHOD: identify
.TP
\fIpathname \fBidentify\fI component x y\fR
+.
Returns the name of the element under the point given by \fIx\fR and \fIy\fR,
or the empty string if no component is present at that location.
The following subcommands are supported:
.RS
.TP
-\fIpathname \fBidentify element\fR \fIx y\fR
+\fIpathname \fBidentify element\fI x y\fR
+.
Returns the name of the element at the specified location.
.TP
-\fIpathname \fBidentify tab\fR \fIx y\fR
+\fIpathname \fBidentify tab\fI x y\fR
+.
Returns the index of the tab at the specified location.
.RE
+.\" METHOD: index
.TP
\fIpathname \fBindex \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
.QW \fBend\fR .
+.\" METHOD: insert
.TP
\fIpathname \fBinsert \fIpos subwindow options...\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.
+.\" METHOD: select
.TP
\fIpathname \fBselect\fR ?\fItabid\fR?
+.
Selects the specified tab.
The associated content window will be displayed,
and the previously-selected window (if different) is unmapped.
If \fItabid\fR is omitted, returns the widget name of the
currently selected pane.
+.\" METHOD: tab
.TP
\fIpathname \fBtab \fItabid\fR ?\fI\-option \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.
@@ -170,8 +188,10 @@ 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.
+.\" METHOD: tabs
.TP
\fIpathname \fBtabs\fR
+.
Returns the list of windows managed by the notebook, in the index order of
their associated tabs.
.SH "KEYBOARD TRAVERSAL"
@@ -201,8 +221,8 @@ virtual event after a new tab is selected.
.SH "EXAMPLE"
.CS
pack [\fBttk::notebook\fR .nb]
-\&.nb add [frame .nb.f1] \-text "First tab"
-\&.nb add [frame .nb.f2] \-text "Second tab"
+\&.nb add [frame .nb.f1] -text "First tab"
+\&.nb add [frame .nb.f2] -text "Second tab"
\&.nb select .nb.f2
ttk::notebook::enableTraversal .nb
.CE
diff --git a/doc/ttk_panedwindow.n b/doc/ttk_panedwindow.n
index beab063..695f668 100644
--- a/doc/ttk_panedwindow.n
+++ b/doc/ttk_panedwindow.n
@@ -11,10 +11,10 @@
ttk::panedwindow \- Multi-pane container window
.SH SYNOPSIS
.nf
-\fBttk::panedwindow\fR \fIpathname \fR?\fIoptions\fR?
+\fBttk::panedwindow\fI pathname \fR?\fIoptions\fR?
.br
-\fIpathname \fBadd\fR \fIwindow\fR ?\fIoptions...\fR?
-\fIpathname \fBinsert\fR \fIindex\fR \fIwindow\fR ?\fIoptions...\fR?
+\fIpathname \fBadd\fI window\fR ?\fIoptions...\fR?
+\fIpathname \fBinsert\fI index window\fR ?\fIoptions...\fR?
.fi
.BE
.SH DESCRIPTION
@@ -54,16 +54,22 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
panedwindow widgets support the following additional commands:
+.\" METHOD: add
.TP
\fIpathname \fBadd \fIsubwindow options...\fR
+.
Adds a new pane to the window.
See \fBPANE OPTIONS\fR for the list of available options.
+.\" METHOD: forget
.TP
\fIpathname \fBforget \fIpane\fR
+.
Removes the specified subpane from the widget.
\fIpane\fR is either an integer index or the name of a managed subwindow.
+.\" METHOD: identify
.TP
\fIpathname \fBidentify \fIcomponent x y\fR
+.
Returns the name of the element under the point given by \fIx\fR and \fIy\fR,
or the empty string if no component is present at that location.
If \fIcomponent\fR is omitted, it defaults to \fBsash\fR.
@@ -71,33 +77,43 @@ The following subcommands are supported:
.RS
.TP
\fIpathname \fBidentify element \fIx y\fR
+.
Returns the name of the element at the specified location.
.TP
\fIpathname \fBidentify sash \fIx y\fR
+.
Returns the index of the sash at the specified location.
.RE
+.\" METHOD: insert
.TP
\fIpathname \fBinsert \fIpos subwindow options...\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.
+.\" METHOD: pane
.TP
\fIpathname \fBpane \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.
+.\" METHOD: panes
.TP
\fIpathname \fBpanes\fR
+.
Returns the list of all windows managed by the widget, in the index order of
their associated panes.
+.\" METHOD: sashpos
.TP
\fIpathname \fBsashpos \fIindex\fR ?\fInewpos\fR?
+.
If \fInewpos\fR is specified, sets the position
of sash number \fIindex\fR.
May adjust the positions of adjacent sashes
@@ -132,7 +148,7 @@ are:
.br
\fB\-bordercolor\fP \fIcolor\fP
.br
-\fB\-gripcount\fP \fIcount\fP
+\fB\-gripsize\fP \fIsize\fP (number of screen units)
.br
\fB\-handlepad\fP \fIamount\fP
.br
diff --git a/doc/ttk_progressbar.n b/doc/ttk_progressbar.n
index 0673ca6..aae3f46 100644
--- a/doc/ttk_progressbar.n
+++ b/doc/ttk_progressbar.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::progressbar \- Provide progress feedback
.SH SYNOPSIS
-\fBttk::progressbar\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::progressbar\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -20,10 +20,10 @@ 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.
.PP
-If the value of \fB-orient\fR is \fBhorizontal\fR a text string can be
+If the value of \fB\-orient\fR is \fBhorizontal\fR a text string can be
displayed inside the progressbar. This string can be configured using
-the \fB-anchor\fR, \fB-font\fR, \fB-foreground\fR, \fB-justify\fR,
-\fB-text\fR and \fB-wraplength\fR options. If the value of \fB-orient\fR
+the \fB\-anchor\fR, \fB\-font\fR, \fB\-foreground\fR, \fB\-justify\fR,
+\fB\-text\fR and \fB\-wraplength\fR options. If the value of \fB\-orient\fR
is \fBvertical\fR then these options are ignored.
.SO ttk_widget
\-anchor \-class \-cursor
@@ -71,18 +71,24 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
progressbar widgets support the following additional commands:
+.\" METHOD: start
.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).
+.\" METHOD: step
.TP
\fIpathName \fBstep\fR ?\fIamount\fR?
+.
Increments the \fB\-value\fR by \fIamount\fR.
\fIamount\fR defaults to 1.0 if omitted.
+.\" METHOD: stop
.TP
\fIpathName \fBstop\fR
+.
Stop autoincrement mode:
cancels any recurring timer event initiated by \fIpathName \fBstart\fR.
.SH "STYLING OPTIONS"
diff --git a/doc/ttk_radiobutton.n b/doc/ttk_radiobutton.n
index 45be7df..74777dc 100644
--- a/doc/ttk_radiobutton.n
+++ b/doc/ttk_radiobutton.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::radiobutton \- Mutually exclusive option widget
.SH SYNOPSIS
-\fBttk::radiobutton\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::radiobutton\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -41,8 +41,10 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
radiobutton widgets support the following additional commands:
+.\" METHOD: invoke
.TP
\fIpathname\fB invoke\fR
+.
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
diff --git a/doc/ttk_scale.n b/doc/ttk_scale.n
index c0c351b..c9f0298 100644
--- a/doc/ttk_scale.n
+++ b/doc/ttk_scale.n
@@ -56,21 +56,27 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
scale widgets support the following additional commands:
+.\" METHOD: get
.TP
\fIpathName \fBget \fR?\fIx y\fR?
+.
Get the current value of the \fB\-value\fR option, or the value corresponding
to the coordinates \fIx,y\fR if they are specified. \fIX\fR and \fIy\fR are
pixel coordinates relative to the scale widget origin.
+.\" METHOD: see
.TP
\fIpathName \fBset \fIvalue\fR
+.
Set the value of the widget (i.e. the \fB\-value\fR option) to \fIvalue\fR.
The value will be clipped to the range given by the \fB\-from\fR and
\fB\-to\fR options. Note that setting the linked variable (i.e. the variable
named in the \fB\-variable\fR option) does not cause such clipping.
.SH "INTERNAL COMMANDS"
.PP
+.\" METHOD: coords
.TP
\fIpathName \fBcoords \fR?\fIvalue\fR?
+.
Get the coordinates corresponding to \fIvalue\fR, or the coordinates
corresponding to the current value of the \fB\-value\fR option if \fIvalue\fR
is omitted.
diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n
index 948c6eb..321d101 100644
--- a/doc/ttk_scrollbar.n
+++ b/doc/ttk_scrollbar.n
@@ -11,7 +11,7 @@
.SH NAME
ttk::scrollbar \- Control the viewport of a scrollable widget
.SH SYNOPSIS
-\fBttk::scrollbar\fR \fIpathName \fR?\fIoptions...\fR?
+\fBttk::scrollbar\fI pathName \fR?\fIoptions...\fR?
.BE
.SH DESCRIPTION
.PP
@@ -52,12 +52,16 @@ In addition to the standard
\fBstate\fR and \fBstyle\fR
commands (see \fBttk::widget\fR),
scrollbar widgets support the following additional commands:
+.\" METHOD: get
.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.
+.\" METHOD: set
.TP
\fIpathName \fBset \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.
@@ -66,8 +70,10 @@ Specifies the visible range to be displayed.
.PP
The following widget commands are used internally
by the \fBTScrollbar\fP widget class bindings.
+.\" METHOD: delta
.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,
@@ -77,8 +83,10 @@ 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.
+.\" METHOD: fraction
.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
@@ -99,6 +107,7 @@ 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.
@@ -108,6 +117,7 @@ refers to a point one-third of the way through the document,
and so on.
.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
@@ -117,6 +127,7 @@ become visible, or \-1, which means that the previous page should
become visible.
.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.
@@ -134,14 +145,14 @@ of individual elements, based on the position and state of the mouse pointer.
.PP
.CS
set f [frame .f]
-ttk::scrollbar $f.hsb \-orient horizontal \-command [list $f.t xview]
-ttk::scrollbar $f.vsb \-orient vertical \-command [list $f.t yview]
-text $f.t \-xscrollcommand [list $f.hsb set] \-yscrollcommand [list $f.vsb set]
-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
+\fBttk::scrollbar\fR $f.hsb -orient horizontal -command [list $f.t xview]
+\fBttk::scrollbar\fR $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
pack $f
.CE
.SH "STYLING OPTIONS"
@@ -166,7 +177,7 @@ Dynamic states: \fBactive\fP, \fBdisabled\fP.
.br
\fB\-foreground\fP \fIcolor\fP
.br
-\fB\-gripcount\fP \fIcount\fP (number of lines on the thumb)
+\fB\-gripsize\fP \fIsize\fP (number of screen units)
.br
\fB\-lightcolor\fP \fIcolor\fP (color of the light part of the 3D relief)
.br
diff --git a/doc/ttk_separator.n b/doc/ttk_separator.n
index 5331f3e..dacd10e 100644
--- a/doc/ttk_separator.n
+++ b/doc/ttk_separator.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::separator \- Separator bar
.SH SYNOPSIS
-\fBttk::separator\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::separator\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/ttk_sizegrip.n b/doc/ttk_sizegrip.n
index fda8d07..050d0bf 100644
--- a/doc/ttk_sizegrip.n
+++ b/doc/ttk_sizegrip.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::sizegrip \- Bottom-right corner resize widget
.SH SYNOPSIS
-\fBttk::sizegrip\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::sizegrip\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -37,14 +37,14 @@ the built-in grip will just mask the widget.
.PP
Using pack:
.CS
-pack [ttk::frame $top.statusbar] \-side bottom \-fill x
-pack [\fBttk::sizegrip\fR $top.statusbar.grip] \-side right \-anchor se
+pack [ttk::frame $top.statusbar] -side bottom -fill x
+pack [\fBttk::sizegrip\fR $top.statusbar.grip] -side right -anchor se
.CE
.PP
Using grid:
.CS
grid [\fBttk::sizegrip\fR $top.statusbar.grip] \e
- \-row $lastRow \-column $lastColumn \-sticky se
+ -row $lastRow -column $lastColumn -sticky se
# ... optional: add vertical scrollbar in $lastColumn,
# ... optional: add horizontal scrollbar in $lastRow
.CE
diff --git a/doc/ttk_spinbox.n b/doc/ttk_spinbox.n
index 49dc8ff..c976095 100644
--- a/doc/ttk_spinbox.n
+++ b/doc/ttk_spinbox.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::spinbox \- Selecting text field widget
.SH SYNOPSIS
-\fBttk::spinbox\fR \fIpathName \fR?\fIoptions\fR?
+\fBttk::spinbox\fI pathName \fR?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -36,15 +36,15 @@ when using the \fB\-from\fR and \fB\-to\fR range.
This must be a format specifier of the form \fB%<pad>.<pad>f\fR,
as it will format a floating-point number.
.OP \-from from From
-A floating\-point value specifying the lowest value for the spinbox. This is
+A floating-point value specifying the lowest value for the spinbox. This is
used in conjunction with \fB\-to\fR and \fB\-increment\fR to set a numerical
range.
.OP \-increment increment Increment
-A floating\-point value specifying the change in value to be applied each
+A floating-point value specifying the change in value to be applied each
time one of the widget spin buttons is pressed. The up button applies a
positive increment, the down button applies a negative increment.
.OP \-to to To
-A floating\-point value specifying the highest permissible value for the
+A floating-point value specifying the highest permissible value for the
widget. See also \fB\-from\fR and \fB\-increment\fR.
range.
.OP \-values values Values
@@ -66,11 +66,15 @@ See the \fBttk::entry\fR manual for information about using the
.PP
The following subcommands are possible for spinbox widgets in addition to
the commands described for the \fBttk::entry\fR widget:
+.\" METHOD: get
.TP
\fIpathName \fBget\fR
+.
Returns the spinbox's current value.
+.\" METHOD: set
.TP
\fIpathName \fBset \fIvalue\fR
+.
Set the spinbox string to \fIvalue\fR. If a \fB\-format\fR option has
been configured then this format will be applied. If formatting fails
or is not set or the \fB\-values\fR option has been used then the value
diff --git a/doc/ttk_style.n b/doc/ttk_style.n
index 7763336..85d6a06 100644
--- a/doc/ttk_style.n
+++ b/doc/ttk_style.n
@@ -10,7 +10,7 @@
.SH NAME
ttk::style \- Manipulate style database
.SH SYNOPSIS
-\fBttk::style\fR \fIoption\fR ?\fIargs\fR?
+\fBttk::style\fI option\fR ?\fIargs\fR?
.BE
.SH NOTES
.PP
@@ -33,19 +33,23 @@ style is the theme root style on which derived styles are based.
.SH DESCRIPTION
.PP
The \fBttk::style\fR command takes the following arguments:
+.\" METHOD: configure
.TP
\fBttk::style configure \fIstyle\fR ?\fI\-option\fR ?\fIvalue option value...\fR? ?
+.
Sets the default value of the specified option(s) in \fIstyle\fR.
If \fIstyle\fR does not exist, it is created.
-If only \fIstyle\fR and \fI-option\fR are specified, get the default value
-for option \fI-option\fR of style \fIstyle\fR.
+If only \fIstyle\fR and \fI\-option\fR are specified, get the default value
+for option \fI\-option\fR of style \fIstyle\fR.
If only \fIstyle\fR is specified, get the default value for all options
of style \fIstyle\fR.
+.\" METHOD: element
.TP
-\fBttk::style element\fR \fIargs\fR
+\fBttk::style element\fI args\fR
.RS
.TP
-\fBttk::style element create\fR \fIelementName\fR \fItype\fR ?\fIargs...\fR?
+\fBttk::style element create\fI elementName type\fR ?\fIargs...\fR?
+.
Creates a new element in the current theme of type \fItype\fR.
The only cross-platform built-in element type is \fIimage\fR
(see \fBttk_image\fR(n)) but themes may define other element types
@@ -54,19 +58,25 @@ an element factory is registered to create Windows theme elements
(see \fBttk_vsapi\fR(n)).
.TP
\fBttk::style element names\fR
+.
Returns the list of elements defined in the current theme.
.TP
\fBttk::style element options \fIelement\fR
+.
Returns the list of \fIelement\fR's options.
.RE
+.\" METHOD: layout
.TP
\fBttk::style layout \fIstyle\fR ?\fIlayoutSpec\fR?
+.
Define the widget layout for style \fIstyle\fR.
See \fBLAYOUTS\fR below for the format of \fIlayoutSpec\fR.
If \fIlayoutSpec\fR is omitted, return the layout specification
for style \fIstyle\fR.
+.\" METHOD: lookup
.TP
-\fBttk::style lookup \fIstyle\fR \fI\-option \fR?\fIstate \fR?\fIdefault\fR??
+\fBttk::style lookup \fIstyle \-option \fR?\fIstate \fR?\fIdefault\fR??
+.
Returns the value specified for \fI\-option\fR in style \fIstyle\fR
in state \fIstate\fR, using the standard lookup rules for element options.
\fIstate\fR is a list of state names; if omitted,
@@ -77,22 +87,26 @@ If the \fIdefault\fR argument is present, it is used as a fallback
value in case no specification for \fI\-option\fR is found.
.\" Otherwise -- signal error? return empty string? Leave unspecified for now.
If \fIstyle\fR does not exist, it is created.
+.\" METHOD: map
.TP
\fBttk::style map \fIstyle\fR ?\fI\-option\fB { \fIstatespec value...\fB }\fR?
+.
Sets dynamic (state dependent) values of the specified option(s) in \fIstyle\fR.
Each \fIstatespec / value\fR pair is examined in order;
the value corresponding to the first matching \fIstatespec\fR
is used.
If \fIstyle\fR does not exist, it is created.
-If only \fIstyle\fR and \fI-option\fR are specified, get the dynamic values
-for option \fI-option\fR of style \fIstyle\fR.
+If only \fIstyle\fR and \fI\-option\fR are specified, get the dynamic values
+for option \fI\-option\fR of style \fIstyle\fR.
If only \fIstyle\fR is specified, get the dynamic values for all options
of style \fIstyle\fR.
+.\" METHOD: theme
.TP
-\fBttk::style theme\fR \fIargs\fR
+\fBttk::style theme\fI args\fR
.RS
.TP
-\fBttk::style theme create\fR \fIthemeName\fR ?\fB\-parent \fIbasedon\fR? ?\fB\-settings \fIscript...\fR ?
+\fBttk::style theme create\fI themeName\fR ?\fB\-parent \fIbasedon\fR? ?\fB\-settings \fIscript...\fR ?
+.
Creates a new theme. It is an error if \fIthemeName\fR already exists.
If \fB\-parent\fR is specified, the new theme will inherit
styles, elements, and layouts from the parent theme \fIbasedon\fR.
@@ -100,19 +114,23 @@ If \fB\-settings\fR is present, \fIscript\fR is evaluated in the
context of the new theme as per \fBttk::style theme settings\fR.
.TP
\fBttk::style theme names\fR
+.
Returns a list of all known themes.
.TP
-\fBttk::style theme settings \fIthemeName\fR \fIscript\fR
+\fBttk::style theme settings \fIthemeName script\fR
+.
Temporarily sets the current theme to \fIthemeName\fR,
evaluate \fIscript\fR, then restore the previous theme.
Typically \fIscript\fR simply defines styles and elements,
though arbitrary Tcl code may appear.
.TP
\fBttk::style theme styles\fR ?\fIthemeName\fR?
+.
Returns a list of all styles in \fIthemeName\fR. If \fIthemeName\fR
is omitted, the current theme is used.
.TP
\fBttk::style theme use\fR ?\fIthemeName\fR?
+.
Without an argument the result is the name of the current theme.
Otherwise this command sets the current theme to \fIthemeName\fR,
and refreshes all widgets.
@@ -129,18 +147,25 @@ the allocated parcel.
Valid options are:
.\" -border should remain undocumented for now (dubious usefulness)
.\" .TP
-.\" \fB\-border\fR \fIboolean\fR
+.\" \fB\-border\fI boolean\fR
+.\" .
.\" Specifies whether the element is drawn after its children. Defaults to 0.
+.\" OPTION: -children
.TP
\fB\-children { \fIsublayout...\fB }\fR
+.
Specifies a list of elements to place inside the element.
+.\" OPTION: -expand
.TP
-\fB\-expand\fR \fIboolean\fR
+\fB\-expand\fI boolean\fR
+.
Specifies whether the allocated parcel is the entire cavity. If so,
simultaneous specification of \fB\-side\fR is ignored.
Defaults to 0.
+.\" OPTION: -side
.TP
\fB\-side \fIside\fR
+.
Specifies which side of the cavity to place the element;
one of \fBleft\fR, \fBright\fR, \fBtop\fR, or \fBbottom\fR.
For instance, \fB\-side top\fR allocates the parcel along the top of
@@ -148,24 +173,27 @@ the cavity having width and height respectively the width of the cavity
and the height of the element.
If omitted, the allocated parcel is the entire cavity (same effect
as \fB\-expand\fR 1).
+.\" OPTION: -sticky
.TP
\fB\-sticky\fR \fB[\fInswe\fB]\fR
+.
Specifies the actual parcel position and size inside the allocated parcel.
If specified as an empty string then the actual parcel is centered in
the allocated parcel. Default is \fBnswe\fR.
.\" -unit should remain undocumented for now (dubious usefulness)
.\" .TP
-.\" \fB\-unit\fR \fIboolean\fR
+.\" \fB\-unit\fI boolean\fR
+.\" .
.\" Specifies whether the element propagates its state to its children.
.\" Defaults to 0.
.PP
For example:
.CS
ttk::style layout Horizontal.TScrollbar {
- Scrollbar.trough \-children {
- Scrollbar.leftarrow \-side left
- Scrollbar.rightarrow \-side right
- Horizontal.Scrollbar.thumb \-side left \-sticky ew
+ Scrollbar.trough -children {
+ Scrollbar.leftarrow -side left
+ Scrollbar.rightarrow -side right
+ Horizontal.Scrollbar.thumb -side left -sticky ew
}
}
.CE
diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n
index 757be86..8ff0091 100644
--- a/doc/ttk_treeview.n
+++ b/doc/ttk_treeview.n
@@ -62,7 +62,7 @@ If set to \fB#all\fP (the default),
all columns are shown in the order given.
.OP \-height height Height
Specifies the number of rows which should be visible.
-Note:
+Note that
the requested width is determined from the sum of the column widths.
.OP \-selectmode selectMode SelectMode
Controls how the built-in class bindings manage the selection.
@@ -95,13 +95,13 @@ even if \fB\-show tree\fR is not specified.
.RE
.OP \-striped striped Striped
Boolean specifying zebra striped item coloring.
-Note:
-Striped items uses the \fB\-stripedbackground\fR option if set by the theme or a tag.
-If not supported by the current theme, it will not show.
+Note that
+striped items uses the \fB\-stripedbackground\fR option if set by the theme or
+a tag. If not supported by the current theme, it will not show.
.OP \-titlecolumns titleColumns TitleColumns
-Number of display columns at the left that should not be scrolled. The tree column counts, even
-if \fB\-show tree\fR is not specified. Thus for value N of this option, column #N is
-the first one that is scrollable. Default is 0.
+Number of display columns at the left that should not be scrolled. The tree
+column counts, even if \fB\-show tree\fR is not specified. Thus for value N of
+this option, column #N is the first one that is scrollable. Default is 0.
.OP \-titleitems titleItems TitleItems
Number of items at the top that should not be vertically scrolled. Default is 0.
.SH "WIDGET COMMAND"
@@ -111,19 +111,22 @@ In addition to the standard
\fBstate\fR, \fBstyle\fR, \fBxview\fR and \fByview\fR
commands (see \fBttk::widget\fR),
treeview widgets support the following additional commands:
+.\" METHOD: bbox
.TP
\fIpathname \fBbbox \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.
+of the specified \fIitem\fR in the form \fIx y width height\fR.
If the \fIitem\fR is not visible
-(i.e., if it is a descendant of a closed item or is vertically scrolled offscreen),
-returns the empty list.
-If \fIcolumn\fR is specified and is not hidden (by the \fB\-displaycolumns\fR option),
-returns the bounding box of that cell within \fIitem\fR (even if the cell
-is horizontally scrolled offscreen).
+(i.e., if it is a descendant of a closed item or is vertically scrolled
+offscreen), returns the empty list.
+If \fIcolumn\fR is specified and is not hidden (by the \fB\-displaycolumns\fR
+option), returns the bounding box of that cell within \fIitem\fR
+(even if the cell is horizontally scrolled offscreen).
+.\" METHOD: cellselection
.TP
\fIpathname \fBcellselection\fR ?\fIselop arg ...\fR?
+.
Manages cell selection. Cell selection is independent from item selection
handled by the \fBselection\fR command. A cell is given by a list of two
elements, item and column.
@@ -135,31 +138,41 @@ Otherwise, \fIselop\fR is one of the following:
.RS
.TP
\fIpathname \fBcellselection set \fIcellList\fR
+.
\fIcellList\fR becomes the new cell selection.
.TP
-\fIpathname \fBcellselection set \fIfirstCell\fR \fIlastCell\fR
+\fIpathname \fBcellselection set \fIfirstCell lastCell\fR
+.
The rectangle defined becomes the new cell selection.
.TP
\fIpathname \fBcellselection add \fIcellList\fR
-Add \fIcellList\fR to the cell selection
+.
+Add \fIcellList\fR to the cell selection.
.TP
-\fIpathname \fBcellselection add \fIfirstCell\fR \fIlastCell\fR
+\fIpathname \fBcellselection add \fIfirstCell lastCell\fR
+.
The rectangle defined is added to the cell selection.
.TP
\fIpathname \fBcellselection remove \fIcellList\fR
-Remove \fIcellList\fR from the cell selection
+.
+Remove \fIcellList\fR from the cell selection.
.TP
-\fIpathname \fBcellselection remove \fIfirstCell\fR \fIlastCell\fR
+\fIpathname \fBcellselection remove \fIfirstCell lastCell\fR
+.
The rectangle defined is removed from the cell selection.
.TP
\fIpathname \fBcellselection toggle \fIcellList\fR
+.
Toggle the cell selection state of each cell in \fIcellList\fR.
.TP
-\fIpathname \fBcellselection toggle \fIfirstCell\fR \fIlastCell\fR
+\fIpathname \fBcellselection toggle \fIfirstCell lastCell\fR
+.
Toggle the cell selection state of each cell in the rectangle defined.
.RE
+.\" METHOD: children
.TP
\fIpathname \fBchildren \fIitem\fR ?\fInewchildren\fR?
+.
If \fInewchildren\fR is not specified,
returns the list of children belonging to \fIitem\fR.
.RS
@@ -171,8 +184,10 @@ are detached from the tree.
None of the items in \fInewchildren\fR may be an ancestor
of \fIitem\fR.
.RE
+.\" METHOD: column
.TP
\fIpathname \fBcolumn \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.
@@ -181,50 +196,66 @@ 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
+.\" OPTION: -id
.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 display column #\fIn\fR.
-The tree column has -id \fB#0\fR.
+returns the data column associated with display column \fIn\fR.
+The tree column has \fB\-id #0\fR.
+.\" OPTION: -anchor
.TP
\fB\-anchor \fIanchor\fR
+.
Specifies how the text in this column should be aligned
with respect to the cell. \fIAnchor\fR is one of
\fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
\fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR.
+.\" OPTION: -minwidth
.TP
\fB\-minwidth \fIminwidth\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
heading column separator. Default is 20 pixels.
+.\" OPTION: -separator
.TP
\fB\-separator \fIboolean\fR
+.
Specifies whether or not a column separator should be drawn to the right
of the column. Default is false.
+.\" OPTION: -stretch
.TP
\fB\-stretch \fIboolean\fR
+.
Specifies whether or not the column width should be adjusted
when the widget is resized or the user drags a heading column separator.
\fIBoolean\fR may have any of the forms accepted by \fBTcl_GetBoolean\fR.
By default columns are stretchable.
+.\" OPTION: -width
.TP
\fB\-width \fIwidth\fR
+.
The width of the column in pixels. Default is 200 pixels. The specified
column width may be changed by Tk in order to honor \fB\-stretch\fR
and/or \fB\-minwidth\fR, or when the widget is resized or the user drags a
heading column separator.
.PP
-Use \fIpathname column #0\fR to configure the tree column.
+Use \fIpathname fBcolumn #0\fR to configure the tree column.
.RE
+.\" METHOD: delete
.TP
\fIpathname \fBdelete \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.
+.\" METHOD: detach
.TP
\fIpathname \fBdetach \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
@@ -232,38 +263,63 @@ with the \fBmove\fR operation,
but will not be displayed until that is done.
The root item may not be detached.
See also: \fBdelete\fR.
+.\" METHOD: detached
+.TP
+\fIpathname \fBdetached \fR?\fIitem\fR?
+.
+If \fIitem\fR is provided, returns a boolean value indicating whether it is
+the name of a detached item (see \fBdetach\fR). Otherwise, returns a list of
+all the detached items (in an arbitrary order). The root item is never
+detached.
+.\" METHOD: exists
.TP
\fIpathname \fBexists \fIitem\fR
+.
Returns 1 if the specified \fIitem\fR is present in the tree,
0 otherwise.
+.\" METHOD: focus
.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.
.\" Need: way to clear the focus item. {} works for this...
+.\"
+.\" METHOD: heading
.TP
\fIpathname \fBheading \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
+.
Query or modify the heading options for the specified \fIcolumn\fR.
Valid options are:
.RS
+.\" OPTION: -text
.TP
\fB\-text \fItext\fR
+.
The text to display in the column heading.
+.\" OPTION: -image
.TP
\fB\-image \fIimageName\fR
+.
Specifies an image to display to the right of the column heading.
+.\" OPTION: -anchor
.TP
\fB\-anchor \fIanchor\fR
+.
Specifies how the heading text should be aligned.
One of the standard Tk anchor values.
+.\" OPTION: -command
.TP
\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
+.\" METHOD: identify
.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.
@@ -289,30 +345,39 @@ A data cell.
.RE
.TP
\fIpathname \fBidentify item \fIx y\fR
+.
Returns the item ID of the item at position \fIy\fR.
.TP
\fIpathname \fBidentify column \fIx y\fR
+.
Returns the display column identifier of the cell at position \fIx\fR.
The tree column has ID \fB#0\fR.
.TP
\fIpathname \fBidentify cell \fIx y\fR
+.
Returns the cell identifier of the cell at position \fIx y\fR.
A cell identifier is a list of item ID and column ID.
.TP
\fIpathname \fBidentify element \fIx y\fR
+.
The element at position \fIx,y\fR.
.TP
\fIpathname \fBidentify row \fIx y\fR
+.
Obsolescent synonym for \fIpathname \fBidentify item\fR.
.PP
See \fBCOLUMN IDENTIFIERS\fR for a discussion of display columns
and data columns.
.RE
+.\" METHOD: index
.TP
\fIpathname \fBindex \fIitem\fR
+.
Returns the integer index of \fIitem\fR within its parent's list of children.
+.\" METHOD: insert
.TP
\fIpathname \fBinsert \fIparent index\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
@@ -332,8 +397,10 @@ Otherwise, a new unique identifier is generated.
newly created item.
See \fBITEM OPTIONS\fR for the list of available options.
.RE
+.\" METHOD: item
.TP
\fIpathname \fBitem \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.
@@ -341,8 +408,10 @@ 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.
+.\" METHOD: move
.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
@@ -351,26 +420,36 @@ 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 is moved to the end.
.RE
+.\" METHOD: next
.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.
+.\" METHOD: 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.
+.\" METHOD: prev
.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.
+.\" METHOD: see
.TP
\fIpathname \fBsee \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
within the visible portion of the tree.
+.\" METHOD: selection
.TP
\fIpathname \fBselection\fR ?\fIselop itemList\fR?
+.
Manages item selection. Item selection is independent from cell selection
handled by the \fBcellselection\fR command.
If \fIselop\fR is not specified, returns the list of selected items.
@@ -378,27 +457,35 @@ 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
+.
+Add \fIitemList\fR to the selection.
.TP
\fIpathname \fBselection remove \fIitemList\fR
-Remove \fIitemList\fR from the selection
+.
+Remove \fIitemList\fR from the selection.
.TP
\fIpathname \fBselection toggle \fIitemList\fR
+.
Toggle the selection state of each item in \fIitemList\fR.
.RE
+.\" METHOD: set
.TP
\fIpathname \fBset \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.
+.\" METHOD: tag
.TP
\fIpathName \fBtag \fIargs...\fR
+.
Manages tags. Tags can be set on items as well as on cells.
The set of tags is shared between items and cells. However item tagging is
independent from cell tagging (for instance adding a tag on an item does
@@ -408,11 +495,13 @@ The following subcommands are supported:
.RS
.TP
\fIpathName \fBtag add \fItag items\fR
+.
Adds the specified \fItag\fR to each of the listed \fIitems\fR.
If \fItag\fR is already present for a particular item,
then the \fB\-tags\fR for that item are unchanged.
.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
@@ -428,31 +517,36 @@ 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.
+evaluation; see \fBbind\fR(n) for details.
.RE
.TP
-\fIpathName \fBtag cell \fIsubcmd...\fR
+\fIpathName \fBtag cell \fIsubcommand...\fR
+.
Manages tags on individual cells.
A \fIcellList\fR argument may be a single cell or a list of cells.
.RS
.TP
\fIpathName \fBtag cell add \fItag cellList\fR
+.
Adds the specified \fItag\fR to each of the listed \fIcellList\fR.
If \fItag\fR is already present for a particular cell,
then the tag list for that cell is unchanged.
.TP
\fIpathName \fBtag cell has \fItagName\fR ?\fIcell\fR?
+.
If \fIcell\fR is specified, returns 1 or 0
depending on whether the specified cell has the named tag.
Otherwise, returns a list of all cells which have
the specified tag.
.TP
\fIpathName \fBtag cell remove \fItag\fR ?\fIcellList\fR?
+.
Removes the specified \fItag\fR from each of the listed \fIcellList\fR.
If \fIcellList\fR is omitted, removes \fItag\fR from each cell in the tree.
.RE
.TP
\fIpathName \fBtag configure \fItagName\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.
@@ -464,21 +558,25 @@ returns a dictionary of the option settings for \fItagName\fR.
See \fBTAG OPTIONS\fR for the list of available options.
.TP
\fIpathName \fBtag delete \fItagName\fR
-Deletes all tag information for the \fItagName\fR argument. The
-command removes the tag from all items and cells in the widget and also deletes any
+.
+Deletes all tag information for the \fItagName\fR argument. The command
+removes the tag from all items and cells in the widget and also deletes any
other information associated with the tag, such as bindings and display
information. The command returns an empty string.
.TP
\fIpathName \fBtag has \fItagName\fR ?\fIitem\fR?
+.
If \fIitem\fR is specified, returns 1 or 0
depending on whether the specified item has the named tag.
Otherwise, returns a list of all items which have
the specified tag.
.TP
\fIpathName \fBtag names\fR
+.
Returns a list of all tags used by the widget.
.TP
\fIpathName \fBtag remove \fItag\fR ?\fIitems\fR?
+.
Removes the specified \fItag\fR from each of the listed \fIitems\fR.
If \fIitems\fR is omitted, removes \fItag\fR from each item in the tree.
If \fItag\fR is not present for a particular item,
@@ -493,10 +591,11 @@ The textual label to display for the item in the tree column.
.IP \fB\-height\fR
The height for the item, in integer multiples of \fB\-rowheight\fP. Default is 1.
.IP \fB\-image\fR
-A Tk image, displayed next to the label in the tree column, placed according to \fB-imageanchor\fR.
+A Tk image, displayed next to the label in the tree column, placed according
+to \fB\-imageanchor\fR.
.IP \fB\-imageanchor\fR
-Specifies how the \fB-image\fR is displayed relative to the text. Default is \fBw\fR.
-One of the standard Tk anchor values.
+Specifies how the \fB\-image\fR is displayed relative to the text.
+Default is \fBw\fR. One of the standard Tk anchor values.
.IP \fB\-values\fR
The list of values associated with the item.
.RS
@@ -533,17 +632,19 @@ Specifies the cell or item image anchor.
.IP \fB\-padding\fR
Specifies the cell padding. A data cell will have a default padding of {4 0}
.IP \fB\-stripedbackground\fR
-Specifies the cell or item background color for alternate lines, if \fB\-striped\fR is true.
+Specifies the cell or item background color for alternate lines,
+if \fB\-striped\fR is true.
.PP
.\" .PP
.\" \fI(@@@ TODO: sort out order of precedence for options)\fR
.PP
Tags on cells have precedence over tags on items. Then, tag priority is
decided by the creation order: tags created first receive higher priority.
-An item's options, like \fB\-image\fR and \fB\-imageanchor\fR, have priority over tags.
+An item's options, like \fB\-image\fR and \fB\-imageanchor\fR, have priority
+over tags.
.SH "IMAGES"
-The -image option on an item, and on an item tag, controls the image next to the label
-in the tree column.
+The -image option on an item, and on an item tag, controls the image next to
+the label in the tree column.
Other cells can have images through the cell tag -image option.
.SH "COLUMN IDENTIFIERS"
.PP
@@ -635,7 +736,7 @@ way to how the default value is set:
.PP
.CS
ttk::style configure Treeview \\
- \-rowheight [expr {[font metrics \fIfont\fP \-linespace] + 2}]
+ -rowheight [expr {[font metrics \fIfont\fP -linespace] + 2}]
.CE
.br
\fB\-stripedbackground\fP \fIcolor\fP
diff --git a/doc/ttk_vsapi.n b/doc/ttk_vsapi.n
index af63c39..4b7e3cc 100644
--- a/doc/ttk_vsapi.n
+++ b/doc/ttk_vsapi.n
@@ -10,7 +10,7 @@
.SH NAME
ttk_vsapi \- Define a Microsoft Visual Styles element
.SH SYNOPSIS
-\fBttk::style element create \fIname\fR \fBvsapi\fR \fIclassName\fR \fIpartId\fR ?\fIstateMap\fR? ?\fIoptions\fR?
+\fBttk::style element create \fIname \fBvsapi\fI className partId\fR ?\fIstateMap\fR? ?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
@@ -21,13 +21,14 @@ on Windows XP and Vista. This factory permits any of the Visual
Styles parts to be declared as Ttk elements that can then be
included in a style layout to modify the appearance of Ttk widgets.
.PP
-\fIclassName\fR and \fIpartId\fR are required parameters and specify
+The \fIclassName\fR and \fIpartId\fR are required parameters and specify
the Visual Styles class and part as given in the Microsoft
documentation. The \fIstateMap\fR may be provided to map Ttk states to
Visual Styles API states (see \fBSTATE MAP\fR).
.SH "OPTIONS"
.PP
Valid \fIoptions\fR are:
+.\" OPTION: -padding
.TP
\fB\-padding \fIpadding\fR
.
@@ -38,10 +39,11 @@ 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.
-In other words, a list of three numbers specify the left, vertical, and right padding;
-a list of two numbers specify the horizontal and the vertical padding;
+In other words, a list of three numbers specify the left, vertical, and right
+padding; a list of two numbers specify the horizontal and the vertical padding;
a single number specifies the same padding all the way around the widget.
This option may not be mixed with any other options.
+.\" OPTION: -margins
.TP
\fB\-margins \fIpadding\fR
.
@@ -49,6 +51,7 @@ Specifies the elements exterior padding.
\fIpadding\fR is a list of up to four integers specifying
the left, top, right and bottom padding quantities respectively.
This option may not be mixed with any other options.
+.\" OPTION: -width
.TP
\fB\-width \fIwidth\fR
.
@@ -57,6 +60,7 @@ the Visual Styles API will not be queried for the recommended
size or the part. If this option is set then \fB\-height\fR should
also be set. The \fB\-width\fR and \fB\-height\fR options cannot
be mixed with the \fB\-padding\fR or \fB\-margins\fR options.
+.\" OPTION: -height
.TP
\fB\-height \fIheight\fR
.
diff --git a/doc/ttk_widget.n b/doc/ttk_widget.n
index 7605260..03d45c1 100644
--- a/doc/ttk_widget.n
+++ b/doc/ttk_widget.n
@@ -125,12 +125,12 @@ 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.
-In other words, a list of three numbers specify the left, vertical, and right padding;
-a list of two numbers specify the horizontal and the vertical padding;
+In other words, a list of three numbers specify the left, vertical, and right
+padding; a list of two numbers specify the horizontal and the vertical padding;
a single number specifies the same padding all the way around the widget.
.OP \-text text Text
-Specifies a text string to be displayed inside the widget
-(unless overridden by \fB\-textvariable\fR for the widgets supporting this option).
+Specifies a text string to be displayed inside the widget (unless overridden
+by \fB\-textvariable\fR for the widgets supporting this option).
.OP \-textvariable textVariable Variable
Specifies the name of a global variable whose value will be used
in place of the \fB\-text\fR resource.
@@ -173,12 +173,16 @@ setting it changes the widget state,
but the \fBstate\fR widget command
does not affect the \fB\-state\fR option.
.SH COMMANDS
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
+.
Returns the current value of the configuration option given
by \fIoption\fR.
+.\" METHOD: configure
.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)
@@ -192,16 +196,20 @@ 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.
+.\" METHOD: identify
.TP
\fIpathName \fBidentify element \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 within any element.
\fIx\fR and \fIy\fR are pixel coordinates relative to the widget.
Some widgets accept other \fBidentify\fR subcommands described
in these widgets documentation.
+.\" METHOD: instate
.TP
\fIpathName \fBinstate \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.
@@ -209,8 +217,10 @@ If \fIscript\fR is specified, equivalent to
.CS
if {[\fIpathName\fR instate \fIstateSpec\fR]} \fIscript\fR
.CE
+.\" METHOD: state
.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
@@ -225,17 +235,22 @@ will restore \fIpathName\fR to the original state.
If \fIstateSpec\fR is not specified,
returns a list of the currently-enabled state flags.
.RE
+.\" METHOD: style
.TP
\fIpathName \fBstyle\fR
+.
Return the style used by the widget.
+.\" METHOD: xview
.TP
\fIpathName \fBxview \fIargs\fR
+.
This command is used to query and change the horizontal position of the
content in the widget's window. It can take any of the following
forms:
.RS
.TP
\fIpathName \fBxview\fR
+.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the horizontal span that is visible in the window.
@@ -245,16 +260,19 @@ in the window, and 40% of the content is off-screen to the right.
These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
option.
.TP
-\fIpathName \fBxview\fR \fIindex\fR
+\fIpathName \fBxview\fI index\fR
+.
Adjusts the view in the window so that the content given by \fIindex\fR
is displayed at the left edge of the window.
.TP
\fIpathName \fBxview moveto\fI fraction\fR
+.
Adjusts the view in the window so that the character \fIfraction\fR of the
way through the content appears at the left edge of the window.
\fIFraction\fR must be a fraction between 0 and 1.
.TP
\fIpathName \fBxview scroll \fInumber what\fR
+.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer or a float, but if it is a float then
@@ -269,14 +287,17 @@ become visible.
If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
\fInumber\fR average-width characters on the display.
.RE
+.\" METHOD: yview
.TP
\fIpathName \fByview \fIargs\fR
+.
This command is used to query and change the vertical position of the
content in the widget's window. It can take any of the following
forms:
.RS
.TP
\fIpathName \fByview\fR
+.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the vertical span that is visible in the window.
@@ -286,16 +307,19 @@ in the window, and 40% of the content is off-screen to the bottom.
These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR
option.
.TP
-\fIpathName \fByview\fR \fIindex\fR
+\fIpathName \fByview\fI index\fR
+.
Adjusts the view in the window so that the content given by \fIindex\fR
is displayed at the top edge of the window.
.TP
\fIpathName \fByview moveto\fI fraction\fR
+.
Adjusts the view in the window so that the item \fIfraction\fR of the
way through the content appears at the top edge of the window.
\fIFraction\fR must be a fraction between 0 and 1.
.TP
\fIpathName \fByview scroll \fInumber what\fR
+.
This command shifts the view in the window up or down according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer or a float, but if it is a float then
@@ -313,9 +337,7 @@ If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
.SH "WIDGET STATES"
The widget state is a bitmap of independent state flags.
Widget state flags include:
-.TP
-\fBactive\fR
-.
+.IP \fBactive\fR
The mouse cursor is over the widget
and pressing a mouse button will cause some action to occur. (aka
.QW prelight
@@ -323,60 +345,42 @@ and pressing a mouse button will cause some action to occur. (aka
.QW hot
(Windows),
.QW hover ).
-.TP
-\fBdisabled\fR
-.
+.IP \fBdisabled\fR
Widget is disabled under program control (aka
.QW unavailable ,
.QW inactive ).
-.TP
-\fBfocus\fR
-.
+.IP \fBfocus\fR
Widget has keyboard focus.
-.TP
-\fBpressed\fR
-.
+.IP \fBpressed\fR
Widget is being pressed (aka
.QW armed
in Motif).
-.TP
-\fBselected\fR
-.
+.IP \fBselected\fR
.QW On ,
.QW true ,
or
.QW current
for things like checkbuttons and radiobuttons.
-.TP
-\fBbackground\fR
-.
+.IP \fBbackground\fR
Windows and the Mac have a notion of an
.QW 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
-.
+.IP \fBreadonly\fR
Widget should not allow user modification.
-.TP
-\fBalternate\fR
-.
+.IP \fBalternate\fR
A widget-specific alternate display format.
For example, used for checkbuttons and radiobuttons in the
.QW tristate
or
.QW mixed
state, and for buttons with \fB\-default active\fR.
-.TP
-\fBinvalid\fR
-.
+.IP \fBinvalid\fR
The widget's value is invalid.
(Potential uses: scale widget value out of bounds,
entry widget value failed validation.)
-.TP
-\fBhover\fR
-.
+.IP \fBhover\fR
The mouse cursor is within the widget.
This is similar to the \fBactive\fP state;
it is used in some themes for widgets that
diff --git a/doc/winfo.n b/doc/winfo.n
index 5651f2c..e37e0a7 100644
--- a/doc/winfo.n
+++ b/doc/winfo.n
@@ -12,23 +12,27 @@
.SH NAME
winfo \- Return window-related information
.SH SYNOPSIS
-\fBwinfo\fR \fIoption \fR?\fIarg ...\fR?
+\fBwinfo\fI option \fR?\fIarg ...\fR?
.BE
.SH DESCRIPTION
.PP
The \fBwinfo\fR command is used to retrieve information about windows
managed by Tk. It can take any of a number of different forms,
depending on the \fIoption\fR argument. The legal forms are:
+.\" METHOD: atom
.TP
\fBwinfo atom \fR?\fB\-displayof \fIwindow\fR? \fIname\fR
+.
Returns a decimal string giving the integer identifier for the
atom whose name is \fIname\fR. If no atom exists with the name
\fIname\fR then a new one is created.
If the \fB\-displayof\fR option is given then the atom is looked
up on the display of \fIwindow\fR; otherwise it is looked up on
the display of the application's main window.
+.\" METHOD: atomname
.TP
\fBwinfo atomname \fR?\fB\-displayof \fIwindow\fR? \fIid\fR
+.
Returns the textual name for the atom whose integer identifier is
\fIid\fR.
If the \fB\-displayof\fR option is given then the identifier is looked
@@ -36,23 +40,31 @@ up on the display of \fIwindow\fR; otherwise it is looked up on
the display of the application's main window.
This command is the inverse of the \fBwinfo atom\fR command.
It generates an error if no such atom exists.
+.\" METHOD: cells
.TP
\fBwinfo cells \fIwindow\fR
+.
Returns a decimal string giving the number of cells in the
color map for \fIwindow\fR.
+.\" METHOD: children
.TP
\fBwinfo children \fIwindow\fR
+.
Returns a list containing the path names of all the children
of \fIwindow\fR. Top-level windows are returned as children
of their logical parents. The list is in stacking order, with
the lowest window first, except for Top-level windows which
are not returned in stacking order. Use the \fBwm stackorder\fR
command to query the stacking order of Top-level windows.
+.\" METHOD: class
.TP
\fBwinfo class \fIwindow\fR
+.
Returns the class name for \fIwindow\fR.
+.\" METHOD: colormapfull
.TP
\fBwinfo colormapfull \fIwindow\fR
+.
Returns 1 if the colormap for \fIwindow\fR is known to be full, 0
otherwise. The colormap for a window is
.QW known
@@ -60,8 +72,10 @@ to be full if the last
attempt to allocate a new color on that window failed and this
application has not freed any colors in the colormap since the
failed allocation.
+.\" METHOD: containing
.TP
\fBwinfo containing \fR?\fB\-displayof \fIwindow\fR? \fIrootX rootY\fR
+.
Returns the path name for the window containing the point given
by \fIrootX\fR and \fIrootY\fR.
\fIRootX\fR and \fIrootY\fR are specified in screen units (i.e.
@@ -79,16 +93,22 @@ or border of its highest containing toplevel in this application.
In selecting the containing window, children are given higher priority
than parents and among siblings the highest one in the stacking order is
chosen.
+.\" METHOD: depth
.TP
\fBwinfo depth \fIwindow\fR
+.
Returns a decimal string giving the depth of \fIwindow\fR (number
of bits per pixel).
+.\" METHOD: exists
.TP
\fBwinfo exists \fIwindow\fR
+.
Returns 1 if there exists a window named \fIwindow\fR, 0 if no such
window exists.
+.\" METHOD: fpixels
.TP
-\fBwinfo fpixels \fIwindow\fR \fInumber\fR
+\fBwinfo fpixels \fIwindow number\fR
+.
Returns a floating-point value giving the number of pixels
in \fIwindow\fR corresponding to the distance given by \fInumber\fR.
\fINumber\fR may be specified in any of the forms acceptable
@@ -98,13 +118,17 @@ or
.QW 1i .
The return value may be fractional; for an integer value, use
\fBwinfo pixels\fR.
+.\" METHOD: geometry
.TP
\fBwinfo geometry \fIwindow\fR
+.
Returns the geometry for \fIwindow\fR, in the form
\fIwidth\fBx\fIheight\fB+\fIx\fB+\fIy\fR. All dimensions are
in pixels.
+.\" METHOD: height
.TP
\fBwinfo height \fIwindow\fR
+.
Returns a decimal string giving \fIwindow\fR's height in pixels.
When a window is first created its height will be 1 pixel; the
height will eventually be changed by a geometry manager to fulfil
@@ -113,24 +137,32 @@ If you need the true height immediately after creating a widget,
invoke \fBupdate\fR to force the geometry manager to arrange it,
or use \fBwinfo reqheight\fR to get the window's requested height
instead of its actual height.
+.\" METHOD: id
.TP
\fBwinfo id \fIwindow\fR
+.
Returns a hexadecimal string giving a low-level platform-specific
identifier for \fIwindow\fR. On Unix platforms, this is the X
window identifier. Under Windows, this is the Windows
HWND. On the Macintosh the value has no meaning outside Tk.
+.\" METHOD: interps
.TP
\fBwinfo interps \fR?\fB\-displayof \fIwindow\fR?
+.
Returns a list whose members are the names of all Tcl interpreters
(e.g. all Tk-based applications) currently registered for a particular display.
If the \fB\-displayof\fR option is given then the return value refers
to the display of \fIwindow\fR; otherwise it refers to
the display of the application's main window.
+.\" METHOD: ismapped
.TP
\fBwinfo ismapped \fIwindow\fR
+.
Returns \fB1\fR if \fIwindow\fR is currently mapped, \fB0\fR otherwise.
+.\" METHOD: manager
.TP
\fBwinfo manager \fIwindow\fR
+.
Returns the name of the geometry manager currently
responsible for \fIwindow\fR, or an empty string if \fIwindow\fR
is not managed by any geometry manager.
@@ -138,25 +170,33 @@ The name is usually the name of the Tcl command for the geometry
manager, such as \fBpack\fR or \fBplace\fR.
If the geometry manager is a widget, such as canvases or text, the
name is the widget's class command, such as \fBcanvas\fR.
+.\" METHOD: name
.TP
\fBwinfo name \fIwindow\fR
+.
Returns \fIwindow\fR's name (i.e. its name within its parent, as opposed
to its full path name).
The command \fBwinfo name .\fR will return the name of the application.
+.\" METHOD: parent
.TP
\fBwinfo parent \fIwindow\fR
+.
Returns the path name of \fIwindow\fR's parent, or an empty string
if \fIwindow\fR is the main window of the application.
+.\" METHOD: pathname
.TP
\fBwinfo pathname \fR?\fB\-displayof \fIwindow\fR? \fIid\fR
+.
Returns the path name of the window whose X identifier is \fIid\fR.
\fIId\fR must be a decimal, hexadecimal, or octal integer and must
correspond to a window in the invoking application.
If the \fB\-displayof\fR option is given then the identifier is looked
up on the display of \fIwindow\fR; otherwise it is looked up on
the display of the application's main window.
+.\" METHOD: pixels
.TP
-\fBwinfo pixels \fIwindow\fR \fInumber\fR
+\fBwinfo pixels \fIwindow number\fR
+.
Returns the number of pixels in \fIwindow\fR corresponding
to the distance given by \fInumber\fR.
\fINumber\fR may be specified in any of the forms acceptable
@@ -166,16 +206,20 @@ or
.QW 1i .
The result is rounded to the nearest integer value; for a
fractional result, use \fBwinfo fpixels\fR.
+.\" METHOD: pointerx
.TP
\fBwinfo pointerx \fIwindow\fR
+.
If the mouse pointer is on the same screen as \fIwindow\fR, returns the
pointer's x coordinate, measured in pixels in the screen's root window.
If a virtual root window is in use on the screen, the position is
measured in the virtual root.
If the mouse pointer is not on the same screen as \fIwindow\fR then
-1 is returned.
+.\" METHOD: pointerxy
.TP
\fBwinfo pointerxy \fIwindow\fR
+.
If the mouse pointer is on the same screen as \fIwindow\fR, returns a list
with two elements, which are the pointer's x and y coordinates measured
in pixels in the screen's root window.
@@ -183,80 +227,110 @@ If a virtual root window is in use on the screen, the position
is computed in the virtual root.
If the mouse pointer is not on the same screen as \fIwindow\fR then
both of the returned coordinates are \-1.
+.\" METHOD: pointery
.TP
\fBwinfo pointery \fIwindow\fR
+.
If the mouse pointer is on the same screen as \fIwindow\fR, returns the
pointer's y coordinate, measured in pixels in the screen's root window.
If a virtual root window is in use on the screen, the position
is computed in the virtual root.
If the mouse pointer is not on the same screen as \fIwindow\fR then
-1 is returned.
+.\" METHOD: reqheight
.TP
\fBwinfo reqheight \fIwindow\fR
+.
Returns a decimal string giving \fIwindow\fR's requested height,
in pixels. This is the value used by \fIwindow\fR's geometry
manager to compute its geometry.
+.\" METHOD: reqwidth
.TP
\fBwinfo reqwidth \fIwindow\fR
+.
Returns a decimal string giving \fIwindow\fR's requested width,
in pixels. This is the value used by \fIwindow\fR's geometry
manager to compute its geometry.
+.\" METHOD: rgb
.TP
\fBwinfo rgb \fIwindow color\fR
+.
Returns a list containing three decimal values in the range 0 to
65535, which are the
red, green, and blue intensities that correspond to \fIcolor\fR in
the window given by \fIwindow\fR. \fIColor\fR
may be specified in any of the forms acceptable for a color
option.
+.\" METHOD: rootx
.TP
\fBwinfo rootx \fIwindow\fR
+.
Returns a decimal string giving the x-coordinate, in the root
window of the screen, of the
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
has no border).
+.\" METHOD: rooty
.TP
\fBwinfo rooty \fIwindow\fR
+.
Returns a decimal string giving the y-coordinate, in the root
window of the screen, of the
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
has no border).
+.\" METHOD: screen
.TP
\fBwinfo screen \fIwindow\fR
+.
Returns the name of the screen associated with \fIwindow\fR, in
the form \fIdisplayName\fR.\fIscreenIndex\fR.
+.\" METHOD: screencells
.TP
\fBwinfo screencells \fIwindow\fR
+.
Returns a decimal string giving the number of cells in the default
color map for \fIwindow\fR's screen.
+.\" METHOD: screendepth
.TP
\fBwinfo screendepth \fIwindow\fR
+.
Returns a decimal string giving the depth of the root window
of \fIwindow\fR's screen (number of bits per pixel).
+.\" METHOD: screenheight
.TP
\fBwinfo screenheight \fIwindow\fR
+.
Returns a decimal string giving the height of \fIwindow\fR's screen,
in pixels.
+.\" METHOD: screenmmheight
.TP
\fBwinfo screenmmheight \fIwindow\fR
+.
Returns a decimal string giving the height of \fIwindow\fR's screen,
in millimeters.
+.\" METHOD: screenmmwidth
.TP
\fBwinfo screenmmwidth \fIwindow\fR
+.
Returns a decimal string giving the width of \fIwindow\fR's screen,
in millimeters.
+.\" METHOD: screenvisual
.TP
\fBwinfo screenvisual \fIwindow\fR
+.
Returns one of the following strings to indicate the default visual
class for \fIwindow\fR's screen: \fBdirectcolor\fR, \fBgrayscale\fR,
\fBpseudocolor\fR, \fBstaticcolor\fR, \fBstaticgray\fR, or
\fBtruecolor\fR.
+.\" METHOD: screenwidth
.TP
\fBwinfo screenwidth \fIwindow\fR
+.
Returns a decimal string giving the width of \fIwindow\fR's screen,
in pixels.
+.\" METHOD: server
.TP
\fBwinfo server \fIwindow\fR
+.
Returns a string containing information about the server for
\fIwindow\fR's display. The exact format of this string may vary
from platform to platform. For X servers the string
@@ -266,27 +340,37 @@ where \fImajor\fR and \fIminor\fR are the version and revision
numbers provided by the server (e.g., \fBX11R5\fR), \fIvendor\fR
is the name of the vendor for the server, and \fIvendorRelease\fR
is an integer release number provided by the server.
+.\" METHOD: toplevel
.TP
\fBwinfo toplevel \fIwindow\fR
+.
Returns the path name of the top-of-hierarchy window containing \fIwindow\fR.
In standard Tk this will always be a \fBtoplevel\fR widget, but extensions may
create other kinds of top-of-hierarchy widgets.
+.\" METHOD: viewable
.TP
\fBwinfo viewable \fIwindow\fR
+.
Returns 1 if \fIwindow\fR and all of its ancestors up through the
nearest toplevel window are mapped. Returns 0 if any of these
windows are not mapped.
+.\" METHOD: visual
.TP
\fBwinfo visual \fIwindow\fR
+.
Returns one of the following strings to indicate the visual
class for \fIwindow\fR: \fBdirectcolor\fR, \fBgrayscale\fR,
\fBpseudocolor\fR, \fBstaticcolor\fR, \fBstaticgray\fR, or
\fBtruecolor\fR.
+.\" METHOD: visualid
.TP
\fBwinfo visualid \fIwindow\fR
+.
Returns the X identifier for the visual for \fIwindow\fR.
+.\" METHOD: visualsavailable
.TP
\fBwinfo visualsavailable \fIwindow\fR ?\fBincludeids\fR?
+.
Returns a list whose elements describe the visuals available for
\fIwindow\fR's screen.
Each element consists of a visual class followed by an integer depth.
@@ -294,28 +378,38 @@ The class has the same form as returned by \fBwinfo visual\fR.
The depth gives the number of bits per pixel in the visual.
In addition, if the \fBincludeids\fR argument is provided, then the
depth is followed by the X identifier for the visual.
+.\" METHOD: vrootheight
.TP
\fBwinfo vrootheight \fIwindow\fR
+.
Returns the height of the virtual root window associated with \fIwindow\fR
if there is one; otherwise returns the height of \fIwindow\fR's screen.
+.\" METHOD: vrootwidth
.TP
\fBwinfo vrootwidth \fIwindow\fR
+.
Returns the width of the virtual root window associated with \fIwindow\fR
if there is one; otherwise returns the width of \fIwindow\fR's screen.
+.\" METHOD: vrootx
.TP
\fBwinfo vrootx \fIwindow\fR
+.
Returns the x-offset of the virtual root window associated with \fIwindow\fR,
relative to the root window of its screen.
This is normally either zero or negative.
Returns 0 if there is no virtual root window for \fIwindow\fR.
+.\" METHOD: vrooty
.TP
\fBwinfo vrooty \fIwindow\fR
+.
Returns the y-offset of the virtual root window associated with \fIwindow\fR,
relative to the root window of its screen.
This is normally either zero or negative.
Returns 0 if there is no virtual root window for \fIwindow\fR.
+.\" METHOD: width
.TP
\fBwinfo width \fIwindow\fR
+.
Returns a decimal string giving \fIwindow\fR's width in pixels.
When a window is first created its width will be 1 pixel; the
width will eventually be changed by a geometry manager to fulfil
@@ -324,14 +418,18 @@ If you need the true width immediately after creating a widget,
invoke \fBupdate\fR to force the geometry manager to arrange it,
or use \fBwinfo reqwidth\fR to get the window's requested width
instead of its actual width.
+.\" METHOD: x
.TP
\fBwinfo x \fIwindow\fR
+.
Returns a decimal string giving the x-coordinate, in \fIwindow\fR's
parent, of the
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
has no border).
+.\" METHOD: y
.TP
\fBwinfo y \fIwindow\fR
+.
Returns a decimal string giving the y-coordinate, in \fIwindow\fR's
parent, of the
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
@@ -341,7 +439,7 @@ has no border).
Print where the mouse pointer is and what window it is currently over:
.CS
lassign [\fBwinfo pointerxy\fR .] x y
-puts \-nonewline "Mouse pointer at ($x,$y) which is "
+puts -nonewline "Mouse pointer at ($x,$y) which is "
set win [\fBwinfo containing\fR $x $y]
if {$win eq ""} {
puts "over no window"
diff --git a/doc/wish.1 b/doc/wish.1
index 115911e..920c1f3 100644
--- a/doc/wish.1
+++ b/doc/wish.1
@@ -14,25 +14,32 @@ wish \- Simple windowing shell
.SH SYNOPSIS
\fBwish\fR ?\fB\-encoding \fIname\fR? ?\fIfileName arg ...\fR?
.SH OPTIONS
+.\" OPTION: -encoding
.IP "\fB\-encoding \fIname\fR" 20
Specifies the encoding of the text stored in \fIfileName\fR.
This option is only recognized prior to the \fIfileName\fR argument.
+.\" OPTION: -colormap
.IP "\fB\-colormap \fInew\fR" 20
Specifies that the window should have a new private colormap instead of
using the default colormap for the screen.
+.\" OPTION: -display
.IP "\fB\-display \fIdisplay\fR" 20
Display (and screen) on which to display window.
+.\" OPTION: -geometry
.IP "\fB\-geometry \fIgeometry\fR" 20
Initial geometry to use for window. If this option is specified, its
value is stored in the \fBgeometry\fR global variable of the application's
Tcl interpreter.
+.\" OPTION: -name
.IP "\fB\-name \fIname\fR" 20
Use \fIname\fR as the title to be displayed in the window, and
as the name of the interpreter for \fBsend\fR commands.
+.\" OPTION: -sync
.IP "\fB\-sync\fR" 20
Execute all X server commands synchronously, so that errors
are reported immediately. This will result in much slower
execution, but it is useful for debugging.
+.\" OPTION: -use
.IP "\fB\-use\fR \fIid\fR" 20
Specifies that the main window for the application is to be embedded in
the window whose identifier is \fIid\fR, instead of being created as an
@@ -44,10 +51,12 @@ Note that on some platforms this will only work correctly if \fIid\fR
refers to a Tk \fBframe\fR or \fBtoplevel\fR that has its
\fB\-container\fR option enabled.
.RE
+.\" OPTION: -visual
.IP "\fB\-visual \fIvisual\fR" 20
Specifies the visual to use for the window.
\fIVisual\fR may have any of the forms supported by the \fBTk_GetVisual\fR
procedure.
+.\" OPTION: --
.IP "\fB\-\|\-\fR" 20
Pass all remaining arguments through to the script's \fBargv\fR
variable without interpreting them.
@@ -117,30 +126,40 @@ file, is the same as its name except that the first letter is
capitalized.
.SH "VARIABLES"
.PP
-\fBWish\fR sets the following Tcl variables:
+\fBWish\fR sets the following global Tcl variables:
+.\" VARIABLE: argc
.TP 15
\fBargc\fR
+.
Contains a count of the number of \fIarg\fR arguments (0 if none),
not including the options described above.
+.\" VARIABLE: argv
.TP 15
\fBargv\fR
+.
Contains a Tcl list whose elements are the \fIarg\fR arguments
that follow a \fB\-\|\-\fR option or do not match any of the
options described in \fBOPTIONS\fR above, in order, or an empty string
if there are no such arguments.
+.\" VARIABLE: argv0
.TP 15
\fBargv0\fR
+.
Contains \fIfileName\fR if it was specified.
Otherwise, contains the name by which \fBwish\fR was invoked.
+.\" VARIABLE: geometry
.TP 15
\fBgeometry\fR
+.
If the \fB\-geometry\fR option is specified, \fBwish\fR copies its
value into this variable. If the variable still exists after
\fIfileName\fR has been evaluated, \fBwish\fR uses the value of
the variable in a \fBwm geometry\fR command to set the main
window's geometry.
+.\" VARIABLE: tcl_interactive
.TP 15
\fBtcl_interactive\fR
+.
Contains 1 if \fBwish\fR is reading commands interactively (\fIfileName\fR
was not specified and standard input is a terminal-like
device), 0 otherwise.
diff --git a/doc/wm.n b/doc/wm.n
index e53529c..5f76384 100644
--- a/doc/wm.n
+++ b/doc/wm.n
@@ -12,7 +12,7 @@
.SH NAME
wm \- Communicate with window manager
.SH SYNOPSIS
-\fBwm\fR \fIoption window \fR?\fIargs\fR?
+\fBwm\fI option window \fR?\fIargs\fR?
.BE
.SH DESCRIPTION
.PP
@@ -25,6 +25,7 @@ additional argument, \fIwindow\fR, which must be the path name of a
top-level window.
.PP
The legal forms for the \fBwm\fR command are:
+.\" METHOD: aspect
.TP
\fBwm aspect \fIwindow\fR ?\fIminNumer minDenom maxNumer maxDenom\fR?
.
@@ -42,6 +43,7 @@ a Tcl list containing four elements, which are the current values
of \fIminNumer\fR, \fIminDenom\fR, \fImaxNumer\fR, and \fImaxDenom\fR
(if no aspect restrictions are in effect, then an empty string is
returned).
+.\" METHOD: attributes
.TP
\fBwm attributes \fIwindow\fR
.TP
@@ -58,6 +60,7 @@ values are as follows:
.PP
All platforms support the following attributes (though X11 users
should see the notes below):
+.\" OPTION: -alpha
.TP
\fB\-alpha\fR
.
@@ -65,26 +68,31 @@ Specifies the alpha transparency level of the toplevel. It accepts a value
from \fB0.0\fR (fully transparent) to \fB1.0\fR (opaque). Values outside that
range will be constrained. Where not supported, the \fB\-alpha\fR value
remains at \fB1.0\fR.
+.\" OPTION: -fullscreen
.TP
\fB\-fullscreen\fR
.
Places the window in a mode that takes up the entire screen, has no
borders, and covers the general use area (i.e. Start menu and taskbar on
Windows, dock and menubar on OSX, general window decorations on X11).
+.\" OPTION: -topmost
.TP
\fB\-topmost\fR
.
Specifies whether this is a topmost window (displays above all other windows).
.PP
On Windows, the following attributes may be set.
+.\" OPTION: -disabled
.TP
\fB\-disabled\fR
.
Specifies whether the window is in a disabled state.
+.\" OPTION: -toolwindow
.TP
\fB\-toolwindow\fR
.
Specifies a toolwindow style window (as defined in the MSDN).
+.\" OPTION: -transparentcolor
.TP
\fB\-transparentcolor\fR
.
@@ -95,6 +103,7 @@ value accepted by \fBTk_GetColor\fR. If the empty string is specified
at \fB{}\fR.
.PP
On MacOS, the following attributes may be set.
+.\" OPTION: -appearance
.TP
\fB\-appearance\fR
.
@@ -102,6 +111,7 @@ Specifies whether the window is rendered in "dark mode". Allowed
values are \fBauto\fR, \fBaqua\fR and \fBdarkaqua\fR. If the setting
is auto then the appearance of the window is controlled by the
System Settings.
+.\" OPTION: -class
.TP
\fB\-class\fR
.
@@ -115,21 +125,25 @@ does not correspond to an existing window. Doing that causes the
class name to be cached for later use. When a toplevel with that
pathname is eventually created, the cached class name will determine which
class is used for the underlying Aqua window.
+.\" OPTION: -isdark
.TP
\fB\-isdark\fR
.
Returns a boolean value which is true if the window is currently in
dark mode.
+.\" OPTION: -modified
.TP
\fB\-modified\fR
.
Specifies the modification state of the window (determines whether the
window close widget contains the modification indicator and whether the
proxy icon is draggable).
+.\" OPTION: -notify
.TP
\fB\-notify\fR
.
Specifies process notification state (bouncing of the application dock icon).
+.\" OPTION: -stylemask
.TP
\fB\-stylemask\fR
.
@@ -143,6 +157,7 @@ bits will be set to 0. The allowed bitnames are: \fBtitled\fR,
\fBnonactivatingpanel\fR, and \fBHUDwindow\fR. Note that a side
effect of setting the fullsizecontentview bit is that the window title
bar becomes transparent.
+.\" OPTION: -tabbingid
.TP
\fB\-tabbingid\fR
.
@@ -156,6 +171,7 @@ a normal non-tabbed toplevel. It is allowed to set the tabbingid before the
toplevel is created. If the pathname provided in the command does not
correspond to a toplevel, the value will be cached and used later when
the toplevel is actually created.
+.\" OPTION: -tabbingmode
.TP
\fB\-tabbingmode\fR
.
@@ -169,11 +185,13 @@ Settings application. It is allowed to set the tabbingmode before the
toplevel is created. If the pathname provided in the command does not
correspond to a toplevel, the value will be cached and used later when
the toplevel is actually created.
+.\" OPTION: -titlepath
.TP
\fB\-titlepath\fR
.
Specifies the path of the file referenced as the window proxy icon
(which can be dragged and dropped in lieu of the file's finder icon).
+.\" OPTION: -transparent
.TP
\fB\-transparent\fR
.
@@ -185,6 +203,7 @@ color with some alpha, e.g.
On X11, the following attributes may be set. These are not supported by all
window managers, and will have no effect under older WMs.
.\" See https://www.freedesktop.org/wiki/Specifications/wm-spec/
+.\" OPTION: -type
.TP
\fB\-type\fR
.VS 8.6
@@ -195,76 +214,49 @@ entirely up to the window manager. A list of types may be used, in order of
preference. The following values are mapped to constants defined in the EWMH
specification (using others is possible, but not advised):
.RS
-.TP
-\fBdesktop\fR
-.
+.IP \fBdesktop\fR
indicates a desktop feature,
-.TP
-\fBdock\fR
-.
+.IP \fBdock\fR
indicates a dock/panel feature,
-.TP
-\fBtoolbar\fR
-.
+.IP \fBtoolbar\fR
indicates a toolbar window that should be acting on behalf of another window,
as indicated with \fBwm transient\fR,
-.TP
-\fBmenu\fR
-.
+.IP \fBmenu\fR
indicates a torn-off menu that should be acting on behalf of another window,
as indicated with \fBwm transient\fR,
-.TP
-\fButility\fR
-.
+.IP \fButility\fR
indicates a utility window (e.g., palette or toolbox) that should be acting on
behalf of another window, as indicated with \fBwm transient\fR,
-.TP
-\fBsplash\fR
-.
+.IP \fBsplash\fR
indicates a splash screen, displayed during application start up,
-.TP
-\fBdialog\fR
-.
+.IP \fBdialog\fR
indicates a general dialog window, that should be acting on behalf of another
window, as indicated with \fBwm transient\fR,
-.TP
-\fBdropdown_menu\fR
-.
+.IP \fBdropdown_menu\fR
indicates a menu summoned from a menu bar, which should usually also be set to
be override-redirected (with \fBwm overrideredirect\fR),
-.TP
-\fBpopup_menu\fR
-.
+.IP \fBpopup_menu\fR
indicates a popup menu, which should usually also be set to be
override-redirected (with \fBwm overrideredirect\fR),
-.TP
-\fBtooltip\fR
-.
+.IP \fBtooltip\fR
indicates a tooltip window, which should usually also be set to be
override-redirected (with \fBwm overrideredirect\fR),
-.TP
-\fBnotification\fR
-.
+.IP \fBnotification\fR
indicates a window that provides a background notification of some event,
which should usually also be set to be override-redirected (with \fBwm
overrideredirect\fR),
-.TP
-\fBcombo\fR
-.
+.IP \fBcombo\fR
indicates the drop-down list of a combobox widget, which should usually also
be set to be override-redirected (with \fBwm overrideredirect\fR),
-.TP
-\fBdnd\fR
-.
+.IP \fBdnd\fR
indicates a window that represents something being dragged, which should
usually also be set to be override-redirected (with
\fBwm overrideredirect\fR),
-.TP
-\fBnormal\fR
-.
+.IP \fBnormal\fR
indicates a window that has no special interpretation.
.RE
.VE 8.6
+.\" OPTION: -zoomed
.TP
\fB\-zoomed\fR
.
@@ -276,6 +268,7 @@ the value of an attribute returns the current state, which will not be the
same as the value most recently set if the window manager has not yet
processed the request or if it does not support the attribute.
.RE
+.\" METHOD: client
.TP
\fBwm client \fIwindow\fR ?\fIname\fR?
.
@@ -289,6 +282,7 @@ If \fIname\fR is not specified, the command returns the last name
set in a \fBwm client\fR command for \fIwindow\fR.
If \fIname\fR is specified as an empty string, the command deletes the
\fBWM_CLIENT_MACHINE\fR property from \fIwindow\fR.
+.\" METHOD: colormapwindows
.TP
\fBwm colormapwindows \fIwindow\fR ?\fIwindowList\fR?
.
@@ -320,6 +314,7 @@ itself; the order of the internal windows is undefined.
See the ICCCM documentation for more information on the
\fBWM_COLORMAP_WINDOWS\fR property.
.RE
+.\" METHOD: command
.TP
\fBwm command \fIwindow\fR ?\fIvalue\fR?
.
@@ -332,6 +327,7 @@ If \fIvalue\fR is not specified then the command returns the last value
set in a \fBwm command\fR command for \fIwindow\fR.
If \fIvalue\fR is specified as an empty string, the command
deletes the \fBWM_COMMAND\fR property from \fIwindow\fR.
+.\" METHOD: deiconify
.TP
\fBwm deiconify \fIwindow\fR
.
@@ -342,6 +338,7 @@ that when the window is first mapped it will be displayed
in de-iconified form. On Windows, a deiconified window will also be
raised and be given the focus (made the active window).
Returns an empty string.
+.\" METHOD: focusmodel
.TP
\fBwm focusmodel \fIwindow\fR ?\fBactive\fR|\fBpassive\fR?
.
@@ -362,6 +359,7 @@ the application may re-assign the focus among \fIwindow\fR's descendants.
The focus model defaults to \fBpassive\fR, and Tk's \fBfocus\fR command
assumes a passive model of focusing.
.RE
+.\" METHOD: forget
.TP
\fBwm forget \fIwindow\fR
.
@@ -370,6 +368,7 @@ 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 \fB\-menu\fR configuration will be
remembered and the menus will return once the widget is managed again.
+.\" METHOD: frame
.TP
\fBwm frame \fIwindow\fR
.
@@ -379,6 +378,7 @@ identifier for the outermost frame that contains \fIwindow\fR (the
window whose parent is the root or virtual root). If \fIwindow\fR
has not been reparented by the window manager then the command returns
the platform specific window identifier for \fIwindow\fR.
+.\" METHOD: geometry
.TP
\fBwm geometry \fIwindow\fR ?\fInewGeometry\fR?
.
@@ -423,6 +423,7 @@ reflect the addition of decorative elements to \fIwindow\fR such as title
bars, and window managers are not required to precisely follow the requests
made through this command.
.RE
+.\" METHOD: grid
.TP
\fBwm grid \fIwindow\fR ?\fIbaseWidth baseHeight widthInc heightInc\fR?
.
@@ -455,10 +456,11 @@ four elements corresponding to the current \fIbaseWidth\fR,
\fIwindow\fR is not currently gridded, then an empty string
is returned.
.PP
-Note: this command should not be needed very often, since the
+Note that this command should not be needed very often, since the
\fBTk_SetGrid\fR library procedure and the \fBsetGrid\fR option
provide easier access to the same functionality.
.RE
+.\" METHOD: group
.TP
\fBwm group \fIwindow\fR ?\fIpathName\fR?
.
@@ -470,8 +472,9 @@ remove \fIwindow\fR from any group association. If \fIpathName\fR is
specified then the command returns an empty string; otherwise it
returns the path name of \fIwindow\fR's current group leader, or an empty
string if \fIwindow\fR is not part of any group.
+.\" METHOD: iconbadge
.TP
-\fBwm iconbadge \fIwindow\fR \fIbadge\fR
+\fBwm iconbadge \fIwindow badge\fR
.
Sets a badge for the icon of the \fIwindow\fR. The badge can be a positive
integer number, for instance the number of new or unread messages, or
@@ -482,9 +485,9 @@ of the developer.
.RS
.PP
On X11, for this command to work,
-the variable \fB::tk::icons::base_icon($window)\fR must be set to the image that is
-being used for the window icon of $window. On Windows and X11, the iconphoto
-images work best at 32x32 or a similar dimension, as
+the variable \fB::tk::icons::base_icon($window)\fR must be set to the image
+that is being used for the window icon of $window. On Windows and X11, the
+iconphoto images work best at 32x32 or a similar dimension, as
the badge images are provided by Tk and drawn to overlay the icon images
using native (Windows) API's or Tk rendering. On macOS, the icon badge is
rendered by a system API and is not provided by Tk. The icon image itself
@@ -495,12 +498,13 @@ The icon badge is intended for display in the Dock (macOS), taskbar
displayed in the Dock, regardless of how many different icon badges may be
assigned to different windows. On Windows, the taskbar display depends on
whether the taskbar buttons are combined or not (this is an OS setting
-available to the user): if combined the behavior is the same as on macOS,
+available to the user): if combined, the behavior is the same as on macOS,
otherwise each button in the taskbar shows the badge it was assigned.
Badge display on macOS is configured in the system preferences. App
panel display behavior on X11 will depend on the window manager and/or
desktop environment.
.RE
+.\" METHOD: iconbitmap
.TP
\fBwm iconbitmap \fIwindow\fR ?\fIbitmap\fR?
.
@@ -530,12 +534,14 @@ first test if the file contains an icon, then if it has an assigned
icon, and finally, if that fails, test for
a bitmap.
.RE
+.\" METHOD: iconify
.TP
\fBwm iconify \fIwindow\fR
.
Arrange for \fIwindow\fR to be iconified. It \fIwindow\fR has not
yet been mapped for the first time, this command will arrange for
it to appear in the iconified state when it is eventually mapped.
+.\" METHOD: iconmask
.TP
\fBwm iconmask \fIwindow\fR ?\fIbitmap\fR?
.
@@ -551,6 +557,7 @@ a bitmap of all ones). If \fIbitmap\fR is specified
then the command returns an empty string. Otherwise it
returns the name of the current icon mask associated with
\fIwindow\fR, or an empty string if no mask is in effect.
+.\" METHOD: iconname
.TP
\fBwm iconname \fIwindow\fR ?\fInewName\fR?
.
@@ -562,6 +569,7 @@ then the command returns the current icon name for \fIwindow\fR,
or an empty string if no icon name has been specified (in this
case the window manager will normally display the window's title,
as specified with the \fBwm title\fR command).
+.\" METHOD: iconphoto
.TP
\fBwm iconphoto \fIwindow\fR ?\fB\-default\fR? \fIimage1\fR ?\fIimage2 ...\fR?
.
@@ -592,6 +600,7 @@ parameters as support for multiple sizes/resolutions on macOS is outside Tk's
scope. Developers should use the largest icon they can support
(preferably 512 pixels) to ensure smooth rendering on the Mac.
.RE
+.\" METHOD: iconposition
.TP
\fBwm iconposition \fIwindow\fR ?\fIx y\fR?
.
@@ -602,6 +611,7 @@ specified as empty strings then any existing icon position hint is cancelled.
If neither \fIx\fR nor \fIy\fR is specified, then the command returns
a Tcl list containing two values, which are the current icon position
hints (if no hints are in effect then an empty string is returned).
+.\" METHOD: iconwindow
.TP
\fBwm iconwindow \fIwindow\fR ?\fIpathName\fR?
.
@@ -619,7 +629,9 @@ 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
.QW own
those events.
-Note: not all window managers support the notion of an icon window.
+Note that not all window managers support the notion of an icon window, and
+the concept is entirely meaningless on non-X11 platforms.
+.\" METHOD: manage
.TP
\fBwm manage \fIwidget\fR
.
@@ -629,6 +641,7 @@ window will be decorated with the window managers title bar, etc. Only
with this command. Attempting to pass any other widget type will raise
an error. Attempting to manage a \fItoplevel\fR widget is benign and
achieves nothing. See also \fBGEOMETRY MANAGEMENT\fR.
+.\" METHOD: maxsize
.TP
\fBwm maxsize \fIwindow\fR ?\fIwidth height\fR?
.
@@ -644,6 +657,7 @@ it returns a Tcl list with two elements, which are the
maximum width and height currently in effect.
The maximum size defaults to the size of the screen.
See the sections on geometry management below for more information.
+.\" METHOD: minsize
.TP
\fBwm minsize \fIwindow\fR ?\fIwidth height\fR?
.
@@ -659,6 +673,7 @@ it returns a Tcl list with two elements, which are the
minimum width and height currently in effect.
The minimum size defaults to one pixel in each dimension.
See the sections on geometry management below for more information.
+.\" METHOD: overrideredirect
.TP
\fBwm overrideredirect \fIwindow\fR ?\fIboolean\fR?
.
@@ -679,6 +694,7 @@ when the window is first mapped or when mapped after the state is changed from
withdrawn to normal. Some, but not all, platforms will take notice at
additional times.
.RE
+.\" METHOD: positionfrom
.TP
\fBwm positionfrom \fIwindow\fR ?\fIwho\fR?
.
@@ -700,6 +716,7 @@ as equivalent to \fBprogram\fR.
Tk will automatically set the position source to \fBuser\fR
when a \fBwm geometry\fR command is invoked, unless the source has
been set explicitly to \fBprogram\fR.
+.\" METHOD: protocol
.TP
\fBwm protocol \fIwindow\fR ?\fIname\fR? ?\fIcommand\fR?
.
@@ -747,6 +764,7 @@ Lastly, if neither \fIname\fR nor \fIcommand\fR is specified, the
\fBwm protocol\fR command returns a list of all of the protocols for which
handlers are currently defined for \fIwindow\fR.
.RE
+.\" METHOD: resizable
.TP
\fBwm resizable \fIwindow\fR ?\fIwidth height\fR?
.
@@ -763,6 +781,7 @@ If resizing is disabled, then the window's size will be the size
from the most recent interactive resize or \fBwm geometry\fR
command. If there has been no such operation then
the window's natural size will be used.
+.\" METHOD: sizefrom
.TP
\fBwm sizefrom \fIwindow\fR ?\fIwho\fR?
.
@@ -781,6 +800,7 @@ source of the window's current size, or an empty string if
no source has been specified yet. Most window managers interpret
.QW "no source"
as equivalent to \fBprogram\fR.
+.\" METHOD: stackorder
.TP
\fBwm stackorder \fIwindow\fR ?\fBisabove\fR|\fBisbelow \fIwindow\fR?
.
@@ -795,6 +815,7 @@ When two window arguments separated by either \fBisabove\fR or
\fBisbelow\fR are passed, a boolean result indicates whether
or not the first window is currently above or below the second
window in the stacking order.
+.\" METHOD: state
.TP
\fBwm state \fIwindow\fR ?newstate?
.
@@ -807,6 +828,7 @@ The difference between \fBiconic\fR and \fBicon\fR is that
\fBwm iconify\fR command) while \fBicon\fR refers to a window whose only
purpose is to serve as the icon for some other window (via the \fBwm
iconwindow\fR command). The \fBicon\fR state cannot be set.
+.\" METHOD: title
.TP
\fBwm title \fIwindow\fR ?\fIstring\fR?
.
@@ -816,6 +838,7 @@ should display this string in \fIwindow\fR's title bar). In this
case the command returns an empty string. If \fIstring\fR is not
specified then the command returns the current title for the
\fIwindow\fR. The title for a window defaults to its name.
+.\" METHOD: transient
.TP
\fBwm transient \fIwindow\fR ?\fIcontainer\fR?
.
@@ -834,6 +857,7 @@ transient of itself. The window manager may also decorate a transient
window differently, removing some features normally present (e.g.,
minimize and maximize buttons) though this is entirely at the
discretion of the window manager.
+.\" METHOD: widthdraw
.TP
\fBwm withdraw \fIwindow\fR
.
@@ -844,7 +868,7 @@ has never been mapped, then this command
causes the window to be mapped in the withdrawn state. Not all
window managers appear to know how to handle windows that are
mapped in the withdrawn state.
-Note: it sometimes seems to be necessary to withdraw a
+Note that it sometimes seems to be necessary to withdraw a
window and then re-map it (e.g. with \fBwm deiconify\fR) to get some
window managers to pay attention to changes in window attributes
such as group.
@@ -942,10 +966,10 @@ A simple dialog-like window, centred on the screen:
.CS
# Create and arrange the dialog contents.
toplevel .msg
-label .msg.l \-text "This is a very simple dialog demo."
-button .msg.ok \-text OK \-default active \-command {destroy .msg}
-pack .msg.ok \-side bottom \-fill x
-pack .msg.l \-expand 1 \-fill both
+label .msg.l -text "This is a very simple dialog demo."
+button .msg.ok -text OK -default active -command {destroy .msg}
+pack .msg.ok -side bottom -fill x
+pack .msg.l -expand 1 -fill both
# Now set the widget up as a centred dialog.
@@ -954,8 +978,8 @@ pack .msg.l \-expand 1 \-fill both
# event loop with the widget hidden completely...
\fBwm withdraw\fR .msg
update
-set x [expr {([winfo screenwidth .]\-[winfo width .msg])/2}]
-set y [expr {([winfo screenheight .]\-[winfo height .msg])/2}]
+set x [expr {([winfo screenwidth .] - [winfo width .msg]) / 2}]
+set y [expr {([winfo screenheight .] - [winfo height .msg]) / 2}]
\fBwm geometry\fR .msg +$x+$y
\fBwm transient\fR .msg .
\fBwm title\fR .msg "Dialog demo"
@@ -964,7 +988,8 @@ set y [expr {([winfo screenheight .]\-[winfo height .msg])/2}]
.SH "SEE ALSO"
toplevel(n), winfo(n)
.SH KEYWORDS
-aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager
+aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify,
+increments, position, size, title, top-level window, units, window manager
'\" Local Variables:
'\" mode: nroff
'\" End:
diff --git a/generic/tk.decls b/generic/tk.decls
index d3aaa6d..d1b5ffb 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -146,7 +146,7 @@ declare 28 {
declare 29 {
int Tk_ConfigureWidget(Tcl_Interp *interp,
Tk_Window tkwin, const Tk_ConfigSpec *specs,
- Tcl_Size argc, const char **argv, void *widgRec,
+ Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec,
int flags)
}
declare 30 {
@@ -326,9 +326,6 @@ declare 75 {
declare 76 {
void Tk_FreeTextLayout(Tk_TextLayout textLayout)
}
-declare 77 {deprecated {function does nothing, call can be removed}} {
- void Tk_FreeXId(Display *display, XID xid)
-}
declare 78 {
GC Tk_GCForColor(XColor *colorPtr, Drawable drawable)
}
@@ -475,9 +472,6 @@ declare 117 {
void Tk_ImageChanged(Tk_ImageModel model, int x, int y,
int width, int height, int imageWidth, int imageHeight)
}
-declare 118 {
- int Tk_Init(Tcl_Interp *interp)
-}
declare 119 {
Atom Tk_InternAtom(Tk_Window tkwin, const char *name)
}
@@ -564,32 +558,15 @@ declare 143 {
Tk_Window tkwin, int *argcPtr, const char **argv,
const Tk_ArgvInfo *argTable, int flags)
}
-declare 144 {deprecated {function signature changed}} {
- void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height)
-}
-declare 145 {deprecated {function signature changed}} {
- void Tk_PhotoPutZoomedBlock_NoComposite(Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height, int zoomX, int zoomY,
- int subsampleX, int subsampleY)
-}
declare 146 {
int Tk_PhotoGetImage(Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr)
}
declare 147 {
void Tk_PhotoBlank(Tk_PhotoHandle handle)
}
-declare 148 {deprecated {function signature changed}} {
- void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle, int width, int height )
-}
declare 149 {
void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr, int *heightPtr)
}
-declare 150 {deprecated {function signature changed}} {
- void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle, int width, int height)
-}
declare 151 {
int Tk_PointToChar(Tk_TextLayout layout, int x, int y)
}
@@ -617,9 +594,6 @@ declare 158 {
Tk_RestrictProc *Tk_RestrictEvents(Tk_RestrictProc *proc,
void *arg, void **prevArgPtr)
}
-declare 159 {
- int Tk_SafeInit(Tcl_Interp *interp)
-}
declare 160 {
const char *Tk_SetAppName(Tk_Window tkwin, const char *name)
}
@@ -805,10 +779,6 @@ declare 211 {
int Tk_InitOptions(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionToken, Tk_Window tkwin)
}
-declare 212 {nostub {Don't use this function in a stub-enabled extension}} {
- void Tk_MainEx(Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc,
- Tcl_Interp *interp)
-}
declare 213 {
void Tk_RestoreSavedOptions(Tk_SavedOptions *savePtr)
}
@@ -821,9 +791,6 @@ declare 214 {
declare 215 {
void Tk_InitConsoleChannels(Tcl_Interp *interp)
}
-declare 216 {
- int Tk_CreateConsoleWindow(Tcl_Interp *interp)
-}
declare 217 {
void Tk_CreateSmoothMethod(Tcl_Interp *interp, const Tk_SmoothMethod *method)
}
@@ -943,17 +910,6 @@ declare 244 {
declare 245 {
void Tk_SetCaretPos(Tk_Window tkwin, int x, int y, int height)
}
-declare 246 {deprecated {function signature changed}} {
- void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height, int compRule)
-}
-declare 247 {deprecated {function signature changed}} {
- void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height, int zoomX, int zoomY,
- int subsampleX, int subsampleY, int compRule)
-}
declare 248 {
int Tk_CollapseMotionEvents(Display *display, int collapse)
}
@@ -989,12 +945,6 @@ declare 256 {
declare 257 {
Tk_Style Tk_AllocStyleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
}
-declare 258 {
- Tk_Style Tk_GetStyleFromObj(Tcl_Obj *objPtr)
-}
-declare 259 {
- void Tk_FreeStyleFromObj(Tcl_Obj *objPtr)
-}
declare 260 {
Tk_StyledElement Tk_GetStyledElement(Tk_Style style, Tcl_Size elementId,
Tk_OptionTable optionTable)
@@ -1052,23 +1002,6 @@ declare 271 {
Tcl_Interp *Tk_Interp(Tk_Window tkwin)
}
-# Now that the Tk 8.2 -> 8.3 transition is long past, use more conventional
-# means to continue support for extensions using the USE_OLD_IMAGE to
-# continue use of their string-based Tcl_ImageTypes and Tcl_PhotoImageFormats.
-#
-# Note that this restores the usual rules for stub compatibility. Stub-enabled
-# extensions compiled against 8.5 headers and linked to the 8.5 stub library
-# will produce a file [load]able into an interp with Tk 8.X, for X >= 5.
-# It will *not* be [load]able into interps with Tk 8.4 (or Tk 8.2!).
-# Developers who need to produce a file [load]able into legacy interps must
-# build against legacy sources.
-declare 272 {
- void Tk_CreateOldImageType(const Tk_ImageType *typePtr)
-}
-declare 273 {
- void Tk_CreateOldPhotoImageFormat(const Tk_PhotoImageFormat *formatPtr)
-}
-
# TIP#580
declare 274 {
int Tk_AlwaysShowSelection(Tk_Window tkwin)
@@ -1155,27 +1088,12 @@ declare 2 win {
declare 3 win {
Tk_Window Tk_HWNDToWindow(HWND hwnd)
}
-declare 4 win {
- void Tk_PointerEvent(HWND hwnd, int x, int y)
-}
-declare 5 win {
- int Tk_TranslateWinEvent(HWND hwnd,
- UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result)
-}
################################
# Aqua specific functions
-# Stub removed because the function no longer exists.
-#declare 3 aqua {
-# void TkMacOSXInitMenus(Tcl_Interp *interp)
-#}
declare 4 aqua {
void TkMacOSXInitAppleEvents(Tcl_Interp *interp)
}
-declare 5 aqua {
- void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, int width,
- int height, int flags)
-}
declare 6 aqua {
void TkMacOSXInvalClipRgns(Tk_Window tkwin)
}
diff --git a/generic/tk.h b/generic/tk.h
index d0b224b..49563ff 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,8 +17,8 @@
#define _TK
#include <tcl.h>
-#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
-# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better
+#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7)
+# error Tk 9.0 must be compiled with tcl.h from Tcl 8.7 or better
#endif
#ifndef EXTERN
@@ -66,17 +66,16 @@ extern "C" {
*/
#ifndef TK_MAJOR_VERSION
-# define TK_MAJOR_VERSION 8
+# define TK_MAJOR_VERSION 9
#endif
-#if TK_MAJOR_VERSION != 8
-# error "This header-file is for Tk 8 only"
-#endif
-#define TK_MINOR_VERSION 7
-#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE
-#define TK_RELEASE_SERIAL 6
-
-#define TK_VERSION "8.7"
-#define TK_PATCH_LEVEL "8.7a6"
+#if TK_MAJOR_VERSION == 9
+# define TK_MINOR_VERSION 0
+# define TK_RELEASE_LEVEL TCL_BETA_RELEASE
+# define TK_RELEASE_SERIAL 1
+
+# define TK_VERSION "9.0"
+# define TK_PATCH_LEVEL "9.0b1"
+#endif /* TK_MAJOR_VERSION */
/*
* A special definition used to allow this header file to be included from
@@ -146,15 +145,6 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement;
*/
typedef const char *Tk_Uid;
-
-#if (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7)
-# ifndef Tcl_Size
-# define Tcl_Size int
-# endif
-# define TCL_SIZE_MAX INT_MAX
-# define TCL_SIZE_MODIFIER ""
-# define TCL_ENCODING_PROFILE_TCL8 0x01000000
-#endif
/*
*----------------------------------------------------------------------
@@ -278,15 +268,6 @@ typedef struct Tk_ObjCustomOption {
} Tk_ObjCustomOption;
/*
- * Macro to use to fill in "offset" fields of the Tk_OptionSpec structure.
- * Computes number of bytes from beginning of structure to a given field.
- */
-
-#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9) && !defined(BUILD_tk)
-# define Tk_Offset(type, field) ((int) offsetof(type, field))
-#endif
-
-/*
* The following two structures are used for error handling. When config
* options are being modified, the old values are saved in a Tk_SavedOptions
* structure. If an error occurs, then the contents of the structure can be
@@ -301,8 +282,8 @@ typedef struct Tk_SavedOption {
Tcl_Obj *valuePtr; /* The old value of the option, in the form of
* a Tcl object; may be NULL if the value was
* not saved as an object. */
-#if TCL_MAJOR_VERSION < 9
- double internalForm; /* The old value of the option, in some
+#if TCL_MAJOR_VERSION > 8
+ long double internalForm; /* The old value of the option, in some
* internal representation such as an int or
* (XColor *). Valid only if the field
* optionPtr->specPtr->objOffset is -1. The
@@ -313,7 +294,7 @@ typedef struct Tk_SavedOption {
* guarantees that the field is properly aligned
* for storing large values. */
#else
- long double internalForm;
+ double internalForm;
#endif
} Tk_SavedOption;
@@ -432,9 +413,6 @@ typedef enum {
#define TK_CONFIG_COLOR_ONLY (1 << 1)
#define TK_CONFIG_MONO_ONLY (1 << 2)
#define TK_CONFIG_DONT_SET_DEFAULT (1 << 3)
-#ifndef TK_NO_DEPRECATED
-# define TK_CONFIG_OPTION_SPECIFIED (1 << 4)
-#endif /* !TK_NO_DEPRECATED */
#define TK_CONFIG_USER_BIT 0x100
#endif /* __NO_OLD_CONFIG */
@@ -771,10 +749,6 @@ typedef XActivateDeactivateEvent XDeactivateEvent;
(((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE)
#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth)
#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight)
-#ifndef TK_NO_DEPRECATED
-#define Tk_InternalBorderWidth(tkwin) \
- (((Tk_FakeWin *) (tkwin))->internalBorderLeft)
-#endif /* !TK_NO_DEPRECATED */
#define Tk_InternalBorderLeft(tkwin) \
(((Tk_FakeWin *) (tkwin))->internalBorderLeft)
#define Tk_InternalBorderRight(tkwin) \
@@ -1027,18 +1001,6 @@ typedef struct Tk_Item {
* lines, circles, etc.) that can form part of a canvas widget.
*/
-#if defined(USE_OLD_CANVAS) && TCL_MAJOR_VERSION < 9
-typedef int (Tk_ItemCreateProc)(Tcl_Interp *interp, Tk_Canvas canvas,
- Tk_Item *itemPtr, Tcl_Size argc, char **argv);
-typedef int (Tk_ItemConfigureProc)(Tcl_Interp *interp, Tk_Canvas canvas,
- Tk_Item *itemPtr, Tcl_Size argc, char **argv, int flags);
-typedef int (Tk_ItemCoordProc)(Tcl_Interp *interp, Tk_Canvas canvas,
- Tk_Item *itemPtr, Tcl_Size argc, char **argv);
-typedef void (Tk_ItemInsertProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
- int beforeThis, char *string);
-typedef int (Tk_ItemIndexProc)(Tcl_Interp *interp, Tk_Canvas canvas,
- Tk_Item *itemPtr, char *indexString, int *indexPtr);
-#else
typedef int (Tk_ItemCreateProc)(Tcl_Interp *interp, Tk_Canvas canvas,
Tk_Item *itemPtr, Tcl_Size objc, Tcl_Obj *const objv[]);
typedef int (Tk_ItemConfigureProc)(Tcl_Interp *interp, Tk_Canvas canvas,
@@ -1050,7 +1012,6 @@ typedef void (Tk_ItemInsertProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
Tcl_Size beforeThis, Tcl_Obj *string);
typedef int (Tk_ItemIndexProc)(Tcl_Interp *interp, Tk_Canvas canvas,
Tk_Item *itemPtr, Tcl_Obj *indexString, Tcl_Size *indexPtr);
-#endif /* USE_OLD_CANVAS */
typedef void (Tk_ItemDeleteProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
Display *display);
typedef void (Tk_ItemDisplayProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
@@ -1099,9 +1060,7 @@ typedef struct Tk_ItemType {
* type. */
Tk_ItemDisplayProc *displayProc;
/* Procedure to display items of this type. */
- int alwaysRedraw; /* Non-zero means displayProc should be called
- * even when the item has been moved
- * off-screen. */
+ int flags; /* Combination of TK_ALWAYS_REDRAW/TK_MOVABLE_POINTS */
Tk_ItemPointProc *pointProc;/* Computes distance from item to a given
* point. */
Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, outside,
@@ -1138,8 +1097,7 @@ typedef struct Tk_ItemType {
} Tk_ItemType;
/*
- * Flag (used in the alwaysRedraw field) to say whether an item supports
- * point-level manipulation like the line and polygon items.
+ * Possible flags for 'flags' field.
*/
#define TK_ALWAYS_REDRAW 1 /* item should be redrawn always*/
@@ -1254,15 +1212,9 @@ typedef struct Tk_Outline {
*/
typedef struct Tk_ImageType Tk_ImageType;
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 && defined(USE_OLD_IMAGE)
-typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, char *name, Tcl_Size argc,
- char **argv, Tk_ImageType *typePtr, Tk_ImageModel model,
- void **clientDataPtr);
-#else
typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, const char *name, Tcl_Size objc,
Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageModel model,
void **clientDataPtr);
-#endif /* USE_OLD_IMAGE */
typedef void *(Tk_ImageGetProc) (Tk_Window tkwin, void *clientData);
typedef void (Tk_ImageDisplayProc) (void *clientData, Display *display,
Drawable drawable, int imageX, int imageY, int width, int height,
@@ -1357,22 +1309,6 @@ typedef struct Tk_PhotoImageBlock {
*/
typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;
-#ifdef USE_OLD_IMAGE
-typedef int (Tk_ImageFileMatchProc) (Tcl_Channel chan, char *fileName,
- char *formatString, int *widthPtr, int *heightPtr);
-typedef int (Tk_ImageStringMatchProc) (char *string, char *formatString,
- int *widthPtr, int *heightPtr);
-typedef int (Tk_ImageFileReadProc) (Tcl_Interp *interp, Tcl_Channel chan,
- char *fileName, char *formatString, Tk_PhotoHandle imageHandle,
- int destX, int destY, int width, int height, int srcX, int srcY);
-typedef int (Tk_ImageStringReadProc) (Tcl_Interp *interp, char *string,
- char *formatString, Tk_PhotoHandle imageHandle, int destX, int destY,
- int width, int height, int srcX, int srcY);
-typedef int (Tk_ImageFileWriteProc) (Tcl_Interp *interp, char *fileName,
- char *formatString, Tk_PhotoImageBlock *blockPtr);
-typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp,
- Tcl_DString *dataPtr, char *formatString, Tk_PhotoImageBlock *blockPtr);
-#else
typedef int (Tk_ImageFileMatchProc) (Tcl_Channel chan, const char *fileName,
Tcl_Obj *format, int *widthPtr, int *heightPtr, Tcl_Interp *interp);
typedef int (Tk_ImageStringMatchProc) (Tcl_Obj *dataObj, Tcl_Obj *format,
@@ -1387,7 +1323,6 @@ typedef int (Tk_ImageFileWriteProc) (Tcl_Interp *interp, const char *fileName,
Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr);
typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format,
Tk_PhotoImageBlock *blockPtr);
-#endif /* USE_OLD_IMAGE */
/*
* The following alternate definitions are used with the Tk8.7 file format
@@ -1561,46 +1496,6 @@ typedef struct Tk_ElementSpec {
*----------------------------------------------------------------------
*/
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
-#define TK_READABLE TCL_READABLE
-#define TK_WRITABLE TCL_WRITABLE
-#define TK_EXCEPTION TCL_EXCEPTION
-
-#define TK_DONT_WAIT TCL_DONT_WAIT
-#define TK_X_EVENTS TCL_WINDOW_EVENTS
-#define TK_WINDOW_EVENTS TCL_WINDOW_EVENTS
-#define TK_FILE_EVENTS TCL_FILE_EVENTS
-#define TK_TIMER_EVENTS TCL_TIMER_EVENTS
-#define TK_IDLE_EVENTS TCL_IDLE_EVENTS
-#define TK_ALL_EVENTS TCL_ALL_EVENTS
-
-#define Tk_IdleProc Tcl_IdleProc
-#define Tk_FileProc Tcl_FileProc
-#define Tk_TimerProc Tcl_TimerProc
-#define Tk_TimerToken Tcl_TimerToken
-
-#define Tk_BackgroundError Tcl_BackgroundError
-#define Tk_CancelIdleCall Tcl_CancelIdleCall
-#define Tk_CreateFileHandler Tcl_CreateFileHandler
-#define Tk_CreateTimerHandler Tcl_CreateTimerHandler
-#define Tk_DeleteFileHandler Tcl_DeleteFileHandler
-#define Tk_DeleteTimerHandler Tcl_DeleteTimerHandler
-#define Tk_DoOneEvent Tcl_DoOneEvent
-#define Tk_DoWhenIdle Tcl_DoWhenIdle
-#define Tk_Sleep Tcl_Sleep
-
-/* Additional stuff that has moved to Tcl: */
-
-#define Tk_EventuallyFree Tcl_EventuallyFree
-#define Tk_FreeProc Tcl_FreeProc
-#define Tk_Preserve Tcl_Preserve
-#define Tk_Release Tcl_Release
-
-/* Related to USE_OLD_IMAGE: */
-
-#define Tk_InitImageArgs(interp, argc, argv) /**/
-#endif
-
/* Removed Tk_Main, use macro instead */
#if defined(_WIN32) || defined(__CYGWIN__)
#define Tk_Main(argc, argv, proc) Tk_MainEx(argc, argv, proc, \
@@ -1649,58 +1544,6 @@ typedef Tcl_Size (Tk_SelectionProc) (void *clientData, Tcl_Size offset,
#include "tkDecls.h"
-#ifdef USE_OLD_IMAGE
-#undef Tk_CreateImageType
-#define Tk_CreateImageType Tk_CreateOldImageType
-#undef Tk_CreatePhotoImageFormat
-#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat
-#endif /* USE_OLD_IMAGE */
-
-/*
- *----------------------------------------------------------------------
- *
- * Allow users to say that they don't want to alter their source to add extra
- * arguments to Tk_PhotoPutBlock() et al.
- *
- * This goes after the inclusion of the stubbed-decls so that the declarations
- * of what is actually there can be correct.
- */
-
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
-#ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK
-# ifdef Tk_PhotoPutBlock
-# undef Tk_PhotoPutBlock
-# endif
-# define Tk_PhotoPutBlock Tk_PhotoPutBlock_NoComposite
-# ifdef Tk_PhotoPutZoomedBlock
-# undef Tk_PhotoPutZoomedBlock
-# endif
-# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_NoComposite
-# define USE_PANIC_ON_PHOTO_ALLOC_FAILURE
-#else /* !USE_COMPOSITELESS_PHOTO_PUT_BLOCK */
-# ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE
-# ifdef Tk_PhotoPutBlock
-# undef Tk_PhotoPutBlock
-# endif
-# define Tk_PhotoPutBlock Tk_PhotoPutBlock_Panic
-# ifdef Tk_PhotoPutZoomedBlock
-# undef Tk_PhotoPutZoomedBlock
-# endif
-# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_Panic
-# endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */
-#endif /* USE_COMPOSITELESS_PHOTO_PUT_BLOCK */
-#ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE
-# ifdef Tk_PhotoExpand
-# undef Tk_PhotoExpand
-# endif
-# define Tk_PhotoExpand Tk_PhotoExpand_Panic
-# ifdef Tk_PhotoSetSize
-# undef Tk_PhotoSetSize
-# endif
-# define Tk_PhotoSetSize Tk_PhotoSetSize_Panic
-#endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */
-#endif /* !TK_NO_DEPRECATED */
-
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 6c83dd0..2b1caff 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -5300,7 +5300,7 @@ TkStringToKeysym(
#endif /* REDO_KEYSYM_LOOKUP */
int keysym;
- size_t len = TkUtfToUniChar(name, &keysym);
+ size_t len = Tcl_UtfToUniChar(name, &keysym);
if (name[len] == '\0') {
if (!Tcl_UniCharIsPrint(keysym)) {
/* This form not supported */
@@ -5384,7 +5384,7 @@ TkKeysymToString(
&& ((unsigned)(keysym - 0x100007F) > 0x20)) {
char buf[10];
if (Tcl_UniCharIsPrint(keysym-0x1000000)) {
- buf[TkUniCharToUtf(keysym - 0x1000000, buf)] = '\0';
+ buf[Tcl_UniCharToUtf(keysym - 0x1000000, buf)] = '\0';
} else if (keysym >= 0x1010000) {
snprintf(buf, sizeof(buf), "U%08X", (int)(keysym - 0x1000000));
} else {
diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c
index 5238be2..d40c876 100644
--- a/generic/tkCanvArc.c
+++ b/generic/tkCanvArc.c
@@ -234,7 +234,7 @@ Tk_ItemType tkArcType = {
ArcCoords, /* coordProc */
DeleteArc, /* deleteProc */
DisplayArc, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
ArcToPoint, /* pointProc */
ArcToArea, /* areaProc */
ArcToPostscript, /* postscriptProc */
@@ -452,7 +452,7 @@ ConfigureArc(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) arcPtr, flags|TK_CONFIG_OBJS)) {
+ objv, arcPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c
index 9de234d..9139e2a 100644
--- a/generic/tkCanvBmap.c
+++ b/generic/tkCanvBmap.c
@@ -128,7 +128,7 @@ Tk_ItemType tkBitmapType = {
BitmapCoords, /* coordProc */
DeleteBitmap, /* deleteProc */
DisplayBitmap, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
BitmapToPoint, /* pointProc */
BitmapToArea, /* areaProc */
BitmapToPostscript, /* postscriptProc */
@@ -324,7 +324,7 @@ ConfigureBitmap(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) bmapPtr, flags|TK_CONFIG_OBJS)) {
+ objv, bmapPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index 120ae6f..cfb0694 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -116,7 +116,7 @@ Tk_ItemType tkImageType = {
ImageCoords, /* coordProc */
DeleteImage, /* deleteProc */
DisplayImage, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
ImageToPoint, /* pointProc */
ImageToArea, /* areaProc */
ImageToPostscript, /* postscriptProc */
@@ -302,7 +302,7 @@ ConfigureImage(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) imgPtr, flags|TK_CONFIG_OBJS)) {
+ objv, imgPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 6200c87..85353b9 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -33,7 +33,7 @@ typedef struct LineItem {
Tk_Outline outline; /* Outline structure */
Tk_Canvas canvas; /* Canvas containing item. Needed for parsing
* arrow shapes. */
- int numPoints; /* Number of points in line (always >= 0). */
+ Tcl_Size numPoints; /* Number of points in line (always >= 0). */
double *coordPtr; /* Pointer to malloc-ed array containing x-
* and y-coords of all points in line.
* X-coords are even-valued indices, y-coords
@@ -234,7 +234,7 @@ Tk_ItemType tkLineType = {
LineCoords, /* coordProc */
DeleteLine, /* deleteProc */
DisplayLine, /* displayProc */
- TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */
+ TK_MOVABLE_POINTS, /* flags */
LineToPoint, /* pointProc */
LineToArea, /* areaProc */
LineToPostscript, /* postscriptProc */
@@ -366,8 +366,7 @@ LineCoords(
Tcl_Obj *const objv[]) /* Array of coordinates: x1, y1, x2, y2, ... */
{
LineItem *linePtr = (LineItem *) itemPtr;
- Tcl_Size i;
- int numPoints;
+ Tcl_Size i, numPoints;
double *coordPtr;
if (objc == 0) {
@@ -486,7 +485,7 @@ ConfigureLine(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) linePtr, flags|TK_CONFIG_OBJS)) {
+ objv, linePtr, flags)) {
return TCL_ERROR;
}
@@ -654,7 +653,8 @@ ComputeLineBbox(
LineItem *linePtr) /* Item whose bbos is to be recomputed. */
{
double *coordPtr;
- int i, intWidth;
+ Tcl_Size i;
+ int intWidth;
double width;
Tk_State state = linePtr->header.state;
Tk_TSOffset *tsoffset;
@@ -1002,7 +1002,7 @@ LineInsert(
linePtr->coordPtr[length-1] = linePtr->lastArrowPtr[1];
}
newCoordPtr = (double *)ckalloc(sizeof(double) * (length + objc));
- for (i=0; i<(int)beforeThis; i++) {
+ for (i=0; i<beforeThis; i++) {
newCoordPtr[i] = linePtr->coordPtr[i];
}
for (i=0; i<objc; i++) {
@@ -1061,10 +1061,10 @@ LineInsert(
* of the line, include a third point.
*/
- if ((int)beforeThis == -4) {
+ if (beforeThis == (Tcl_Size)-4) {
objc += 2;
}
- if ((int)beforeThis + 4 == length - (objc - 8)) {
+ if (beforeThis + 4 == length - (objc - 8)) {
beforeThis -= 2;
objc += 2;
}
@@ -1811,7 +1811,7 @@ ScaleLine(
{
LineItem *linePtr = (LineItem *) itemPtr;
double *coordPtr;
- int i;
+ Tcl_Size i;
/*
* Delete any arrowheads before scaling all the points (so that the
@@ -1890,7 +1890,7 @@ GetLineIndex(
string = Tcl_GetStringFromObj(obj, &length);
if (string[0] == '@') {
- int i;
+ Tcl_Size i;
double x, y, bestDist, dist, *coordPtr;
char savechar;
char *p, *sep;
@@ -1958,7 +1958,7 @@ TranslateLine(
{
LineItem *linePtr = (LineItem *) itemPtr;
double *coordPtr;
- int i;
+ Tcl_Size i;
for (i = 0, coordPtr = linePtr->coordPtr; i < linePtr->numPoints;
i++, coordPtr += 2) {
@@ -2010,7 +2010,7 @@ RotateLine(
{
LineItem *linePtr = (LineItem *) itemPtr;
double *coordPtr;
- int i;
+ Tcl_Size i;
double s = sin(angleRad), c = cos(angleRad);
for (i = 0, coordPtr = linePtr->coordPtr; i < linePtr->numPoints;
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 97ac202..d7b164a 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -199,7 +199,7 @@ Tk_ItemType tkPolygonType = {
PolygonCoords, /* coordProc */
DeletePolygon, /* deleteProc */
DisplayPolygon, /* displayProc */
- TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */
+ TK_MOVABLE_POINTS, /* flags */
PolygonToPoint, /* pointProc */
PolygonToArea, /* areaProc */
PolygonToPostscript, /* postscriptProc */
@@ -446,7 +446,7 @@ ConfigurePolygon(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) polyPtr, flags|TK_CONFIG_OBJS)) {
+ objv, polyPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index d9759d7..f5b9a8b 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -236,8 +236,8 @@ TkCanvPostscriptObjCmd(
psInfo.prolog = 1;
psInfo.tkwin = tkwin;
Tcl_InitHashTable(&psInfo.fontTable, TCL_STRING_KEYS);
- result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, (const char **)objv+2,
- (char *) &psInfo, TK_CONFIG_ARGV_ONLY|TK_CONFIG_OBJS);
+ result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, objv+2,
+ &psInfo, TK_CONFIG_ARGV_ONLY);
if (result != TCL_OK) {
goto cleanup;
}
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 8e85946..2407918 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -150,11 +150,7 @@ UnderlinePrintProc(
char *p;
if (underline == INT_MIN) {
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- p = (char *)"-1";
-#else
p = (char *)"";
-#endif
*freeProcPtr = TCL_STATIC;
return p;
} else if (underline == INT_MAX) {
@@ -276,7 +272,7 @@ Tk_ItemType tkTextType = {
TextCoords, /* coordProc */
DeleteText, /* deleteProc */
DisplayCanvText, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
TextToPoint, /* pointProc */
TextToArea, /* areaProc */
TextToPostscript, /* postscriptProc */
@@ -498,7 +494,7 @@ ConfigureText(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **) objv, (char *) textPtr, flags|TK_CONFIG_OBJS)) {
+ objv, textPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index e54032f..e1148e3 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -120,7 +120,7 @@ Tk_ItemType tkWindowType = {
WinItemCoords, /* coordProc */
DeleteWinItem, /* deleteProc */
DisplayWinItem, /* displayProc */
- TK_ALWAYS_REDRAW|TK_CONFIG_OBJS, /* flags */
+ TK_ALWAYS_REDRAW, /* flags */
WinItemToPoint, /* pointProc */
WinItemToArea, /* areaProc */
WinItemToPostscript, /* postscriptProc */
@@ -316,7 +316,7 @@ ConfigureWinItem(
oldWindow = winItemPtr->tkwin;
canvasTkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, canvasTkwin, configSpecs, objc,
- (const char **) objv, (char *) winItemPtr, flags|TK_CONFIG_OBJS)) {
+ objv, winItemPtr, flags)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index c93baa7..5b93136 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -241,7 +241,7 @@ static int CanvasWidgetCmd(void *clientData,
Tcl_Obj *const *objv);
static void CanvasWorldChanged(void *instanceData);
static int ConfigureCanvas(Tcl_Interp *interp,
- TkCanvas *canvasPtr, int objc,
+ TkCanvas *canvasPtr, Tcl_Size objc,
Tcl_Obj *const *objv, int flags);
static void DefaultRotateImplementation(TkCanvas *canvasPtr,
Tk_Item *itemPtr, double x, double y,
@@ -254,15 +254,12 @@ static void DoItem(Tcl_Obj *accumObj,
static void EventuallyRedrawItem(TkCanvas *canvasPtr,
Tk_Item *itemPtr);
static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr,
- int objc, Tcl_Obj *const *objv,
- Tcl_Obj *newTagObj, int first,
+ Tcl_Size objc, Tcl_Obj *const *objv,
+ Tcl_Obj *newTagObj, Tcl_Size first,
TagSearch **searchPtrPtr);
static int FindArea(Tcl_Interp *interp, TkCanvas *canvasPtr,
Tcl_Obj *const *objv, Tk_Uid uid, int enclosed);
static double GridAlign(double coord, double spacing);
-#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9)
-static const char** TkGetStringsFromObjs(Tcl_Size objc, Tcl_Obj *const *objv);
-#endif
static void InitCanvas(void);
static void PickCurrentItem(TkCanvas *canvasPtr, XEvent *eventPtr);
static Tcl_Obj * ScrollFractions(int screen1,
@@ -328,36 +325,20 @@ static inline int
AlwaysRedraw(
Tk_Item *itemPtr)
{
- return itemPtr->typePtr->alwaysRedraw & 1;
+ return itemPtr->typePtr->flags & TK_ALWAYS_REDRAW;
}
static inline int
ItemConfigure(
TkCanvas *canvasPtr,
Tk_Item *itemPtr,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Interp *interp = canvasPtr->interp;
- int result;
-
- if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- const char **args = TkGetStringsFromObjs(objc, objv);
- result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, (Tcl_Obj **) args, TK_CONFIG_ARGV_ONLY);
- if (args != NULL) {
- ckfree(args);
- }
-#endif
- }
- return result;
+ return itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr,
+ itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY);
}
static inline int
@@ -386,7 +367,7 @@ static inline int
ItemCoords(
TkCanvas *canvasPtr,
Tk_Item *itemPtr,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Interp *interp = canvasPtr->interp;
@@ -394,21 +375,9 @@ ItemCoords(
if (itemPtr->typePtr->coordProc == NULL) {
result = TCL_OK;
- } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, objv);
} else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- const char **args = TkGetStringsFromObjs(objc, objv);
-
result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc, (Tcl_Obj **) args);
- if (args != NULL) {
- ckfree(args);
- }
-#endif
+ itemPtr, objc, objv);
}
return result;
}
@@ -418,29 +387,13 @@ ItemCreate(
TkCanvas *canvasPtr,
Tk_Item *itemPtr, /* Warning: incomplete! typePtr field must be
* set by this point. */
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Interp *interp = canvasPtr->interp;
- int result;
- if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr,
+ return itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr,
itemPtr, objc-3, objv+3);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- const char **args = TkGetStringsFromObjs(objc-3, objv+3);
-
- result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objc-3, (Tcl_Obj **) args);
- if (args != NULL) {
- ckfree(args);
- }
-#endif
- }
- return result;
}
static inline void
@@ -494,18 +447,9 @@ ItemIndex(
if (itemPtr->typePtr->indexProc == NULL) {
return TCL_OK;
- } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, objPtr, indexPtr);
- } else {
-#if defined(TK_NO_DEPRECATED)
- Tcl_AppendResult(interp, "Flag TK_CONFIG_OBJS is mandatory", (void *)NULL);
- return TCL_ERROR;
-#else
- return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
- itemPtr, (Tcl_Obj *) Tcl_GetString(objPtr), indexPtr);
-#endif
}
+ return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
+ itemPtr, objPtr, indexPtr);
}
static inline void
@@ -515,17 +459,8 @@ ItemInsert(
int beforeThis,
Tcl_Obj *toInsert)
{
- if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) {
- itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr,
- beforeThis, toInsert);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr,
- beforeThis, (Tcl_Obj *) Tcl_GetString(toInsert));
-#endif
- }
+ itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr,
+ beforeThis, toInsert);
}
static inline int
@@ -913,7 +848,8 @@ CanvasWidgetCmd(
break;
case CANV_BBOX: {
- int i, gotAny;
+ int gotAny;
+ Tcl_Size i;
int x1 = 0, y1 = 0, x2 = 0, y2 = 0; /* Initializations needed only
* to prevent overcautious
* compiler warnings. */
@@ -1231,7 +1167,7 @@ CanvasWidgetCmd(
*/
if (itemPtr == NULL ||
- !(itemPtr->typePtr->alwaysRedraw & TK_MOVABLE_POINTS)) {
+ !(itemPtr->typePtr->flags & TK_MOVABLE_POINTS)) {
continue;
}
@@ -1412,7 +1348,7 @@ CanvasWidgetCmd(
break;
}
case CANV_DELETE: {
- int i;
+ Tcl_Size i;
Tcl_HashEntry *entryPtr;
for (i = 2; i < objc; i++) {
@@ -2316,7 +2252,7 @@ ConfigureCanvas(
Tcl_Interp *interp, /* Used for error reporting. */
TkCanvas *canvasPtr, /* Information about widget; may or may not
* already have values for some fields. */
- int objc, /* Number of valid entries in objv. */
+ Tcl_Size objc, /* Number of valid entries in objv. */
Tcl_Obj *const objv[], /* Argument objects. */
int flags) /* Flags to pass to Tk_ConfigureWidget. */
{
@@ -2325,8 +2261,8 @@ ConfigureCanvas(
Tk_State old_canvas_state=canvasPtr->canvas_state;
if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs,
- objc, (const char **) objv, (char *) canvasPtr,
- flags|TK_CONFIG_OBJS) != TCL_OK) {
+ objc, objv, canvasPtr,
+ flags) != TCL_OK) {
return TCL_ERROR;
}
@@ -3364,8 +3300,8 @@ CanvasEventProc(
/*
* Special hack: if the canvas is unmapped, then must notify all items
- * with "alwaysRedraw" set, so that they know that they are no longer
- * displayed.
+ * with flag TK_ALWAYS_REDRAW set, so that they know that they are no
+ * longer displayed.
*/
for (itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL;
@@ -4695,7 +4631,7 @@ static int
FindItems(
Tcl_Interp *interp, /* Interpreter for error reporting. */
TkCanvas *canvasPtr, /* Canvas whose items are to be searched. */
- int objc, /* Number of entries in argv. Must be greater
+ Tcl_Size objc, /* Number of entries in argv. Must be greater
* than zero. */
Tcl_Obj *const *objv, /* Arguments that describe what items to
* search for (see user doc on "find" and
@@ -4704,7 +4640,7 @@ FindItems(
* found items; if NULL, then ids of found
* items are returned in the interp's
* result. */
- int first /* For error messages: gives number of
+ Tcl_Size first /* For error messages: gives number of
* elements of objv which are already
* handled. */
,TagSearch **searchPtrPtr /* From CanvasWidgetCmd local vars*/
@@ -5494,7 +5430,7 @@ CanvasDoEvent(
Tcl_Size numObjects, i;
Tk_Item *itemPtr;
TagSearchExpr *expr;
- int numExprs;
+ Tcl_Size numExprs;
SearchUids *searchUids = GetStaticUids();
if (canvasPtr->bindingTable == NULL) {
@@ -6094,43 +6030,7 @@ CanvasSetOrigin(
canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin),
canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin));
}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkGetStringsFromObjs --
- *
- * Results:
- * Converts object list into string list.
- *
- * Side effects:
- * Memory is allocated for the objv array, which must be freed using
- * ckfree() when no longer needed.
- *
- *----------------------------------------------------------------------
- */
-
-#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9)
-static const char **
-TkGetStringsFromObjs(
- Tcl_Size objc,
- Tcl_Obj *const objv[])
-{
- Tcl_Size i;
- const char **argv;
- if (objc <= 0) {
- return NULL;
- }
- argv = (const char **)ckalloc((objc+1) * sizeof(char *));
- for (i = 0; i < objc; i++) {
- argv[i] = Tcl_GetString(objv[i]);
- }
- argv[objc] = 0;
- return argv;
-}
-#endif
-
/*
*--------------------------------------------------------------
*
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 1bf7b03..ddf4a59 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -100,7 +100,7 @@ Tk_BellObjCmd(
};
enum options { TK_BELL_DISPLAYOF, TK_BELL_NICE };
Tk_Window tkwin = (Tk_Window)clientData;
- int i;
+ Tcl_Size i;
int index, nice = 0;
Tk_ErrorHandler handler;
@@ -490,7 +490,7 @@ Tk_DestroyObjCmd(
{
Tk_Window window;
Tk_Window tkwin = (Tk_Window)clientData;
- int i;
+ Tcl_Size i;
for (i = 1; i < objc; i++) {
window = Tk_NameToWindow(interp, Tcl_GetString(objv[i]), tkwin);
@@ -1302,7 +1302,7 @@ Tk_WinfoObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int index, x, y, width, height, useX, useY, c_class;
- int skip;
+ Tcl_Size skip;
const char *string;
TkWindow *winPtr;
Tk_Window tkwin = (Tk_Window)clientData;
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 734a5ee..ff73d5c 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -224,7 +224,7 @@ Tk_InitConsoleChannels(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return;
}
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 22d1fd7..5a6b81a 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -142,7 +142,7 @@ EXTERN int Tk_ConfigureValue(Tcl_Interp *interp,
/* 29 */
EXTERN int Tk_ConfigureWidget(Tcl_Interp *interp,
Tk_Window tkwin, const Tk_ConfigSpec *specs,
- Tcl_Size argc, const char **argv,
+ Tcl_Size objc, Tcl_Obj *const *objv,
void *widgRec, int flags);
/* 30 */
EXTERN void Tk_ConfigureWindow(Tk_Window tkwin,
@@ -288,9 +288,7 @@ EXTERN void Tk_FreeOptions(const Tk_ConfigSpec *specs,
EXTERN void Tk_FreePixmap(Display *display, Pixmap pixmap);
/* 76 */
EXTERN void Tk_FreeTextLayout(Tk_TextLayout textLayout);
-/* 77 */
-TK_DEPRECATED("function does nothing, call can be removed")
-void Tk_FreeXId(Display *display, XID xid);
+/* Slot 77 is reserved */
/* 78 */
EXTERN GC Tk_GCForColor(XColor *colorPtr, Drawable drawable);
/* 79 */
@@ -413,8 +411,7 @@ EXTERN Tk_Window Tk_IdToWindow(Display *display, Window window);
EXTERN void Tk_ImageChanged(Tk_ImageModel model, int x, int y,
int width, int height, int imageWidth,
int imageHeight);
-/* 118 */
-EXTERN int Tk_Init(Tcl_Interp *interp);
+/* Slot 118 is reserved */
/* 119 */
EXTERN Atom Tk_InternAtom(Tk_Window tkwin, const char *name);
/* 120 */
@@ -476,34 +473,18 @@ EXTERN void Tk_OwnSelection(Tk_Window tkwin, Atom selection,
EXTERN int Tk_ParseArgv(Tcl_Interp *interp, Tk_Window tkwin,
int *argcPtr, const char **argv,
const Tk_ArgvInfo *argTable, int flags);
-/* 144 */
-TK_DEPRECATED("function signature changed")
-void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height);
-/* 145 */
-TK_DEPRECATED("function signature changed")
-void Tk_PhotoPutZoomedBlock_NoComposite(
- Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height, int zoomX, int zoomY,
- int subsampleX, int subsampleY);
+/* Slot 144 is reserved */
+/* Slot 145 is reserved */
/* 146 */
EXTERN int Tk_PhotoGetImage(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr);
/* 147 */
EXTERN void Tk_PhotoBlank(Tk_PhotoHandle handle);
-/* 148 */
-TK_DEPRECATED("function signature changed")
-void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle,
- int width, int height);
+/* Slot 148 is reserved */
/* 149 */
EXTERN void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr,
int *heightPtr);
-/* 150 */
-TK_DEPRECATED("function signature changed")
-void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle,
- int width, int height);
+/* Slot 150 is reserved */
/* 151 */
EXTERN int Tk_PointToChar(Tk_TextLayout layout, int x, int y);
/* 152 */
@@ -529,8 +510,7 @@ EXTERN int Tk_RestackWindow(Tk_Window tkwin, int aboveBelow,
/* 158 */
EXTERN Tk_RestrictProc * Tk_RestrictEvents(Tk_RestrictProc *proc, void *arg,
void **prevArgPtr);
-/* 159 */
-EXTERN int Tk_SafeInit(Tcl_Interp *interp);
+/* Slot 159 is reserved */
/* 160 */
EXTERN const char * Tk_SetAppName(Tk_Window tkwin, const char *name);
/* 161 */
@@ -679,10 +659,7 @@ EXTERN int Tk_GetScrollInfoObj(Tcl_Interp *interp,
/* 211 */
EXTERN int Tk_InitOptions(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionToken, Tk_Window tkwin);
-/* 212 */
-EXTERN void Tk_MainEx(Tcl_Size argc, char **argv,
- Tcl_AppInitProc *appInitProc,
- Tcl_Interp *interp);
+/* Slot 212 is reserved */
/* 213 */
EXTERN void Tk_RestoreSavedOptions(Tk_SavedOptions *savePtr);
/* 214 */
@@ -692,8 +669,7 @@ EXTERN int Tk_SetOptions(Tcl_Interp *interp, void *recordPtr,
Tk_SavedOptions *savePtr, int *maskPtr);
/* 215 */
EXTERN void Tk_InitConsoleChannels(Tcl_Interp *interp);
-/* 216 */
-EXTERN int Tk_CreateConsoleWindow(Tcl_Interp *interp);
+/* Slot 216 is reserved */
/* 217 */
EXTERN void Tk_CreateSmoothMethod(Tcl_Interp *interp,
const Tk_SmoothMethod *method);
@@ -785,17 +761,8 @@ EXTERN void Tk_SetMinimumRequestSize(Tk_Window tkwin,
/* 245 */
EXTERN void Tk_SetCaretPos(Tk_Window tkwin, int x, int y,
int height);
-/* 246 */
-TK_DEPRECATED("function signature changed")
-void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height, int compRule);
-/* 247 */
-TK_DEPRECATED("function signature changed")
-void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr, int x, int y,
- int width, int height, int zoomX, int zoomY,
- int subsampleX, int subsampleY, int compRule);
+/* Slot 246 is reserved */
+/* Slot 247 is reserved */
/* 248 */
EXTERN int Tk_CollapseMotionEvents(Display *display,
int collapse);
@@ -821,10 +788,8 @@ EXTERN const char * Tk_NameOfStyle(Tk_Style style);
/* 257 */
EXTERN Tk_Style Tk_AllocStyleFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr);
-/* 258 */
-EXTERN Tk_Style Tk_GetStyleFromObj(Tcl_Obj *objPtr);
-/* 259 */
-EXTERN void Tk_FreeStyleFromObj(Tcl_Obj *objPtr);
+/* Slot 258 is reserved */
+/* Slot 259 is reserved */
/* 260 */
EXTERN Tk_StyledElement Tk_GetStyledElement(Tk_Style style,
Tcl_Size elementId,
@@ -872,11 +837,8 @@ EXTERN long Tk_GetUserInactiveTime(Display *dpy);
EXTERN void Tk_ResetUserInactiveTime(Display *dpy);
/* 271 */
EXTERN Tcl_Interp * Tk_Interp(Tk_Window tkwin);
-/* 272 */
-EXTERN void Tk_CreateOldImageType(const Tk_ImageType *typePtr);
-/* 273 */
-EXTERN void Tk_CreateOldPhotoImageFormat(
- const Tk_PhotoImageFormat *formatPtr);
+/* Slot 272 is reserved */
+/* Slot 273 is reserved */
/* 274 */
EXTERN int Tk_AlwaysShowSelection(Tk_Window tkwin);
/* 275 */
@@ -966,7 +928,7 @@ typedef struct TkStubs {
int (*tk_ClipboardClear) (Tcl_Interp *interp, Tk_Window tkwin); /* 26 */
int (*tk_ConfigureInfo) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, void *widgRec, const char *argvName, int flags); /* 27 */
int (*tk_ConfigureValue) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, void *widgRec, const char *argvName, int flags); /* 28 */
- int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size argc, const char **argv, void *widgRec, int flags); /* 29 */
+ int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec, int flags); /* 29 */
void (*tk_ConfigureWindow) (Tk_Window tkwin, unsigned int valueMask, XWindowChanges *valuePtr); /* 30 */
Tk_TextLayout (*tk_ComputeTextLayout) (Tk_Font font, const char *str, Tcl_Size numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr, int *heightPtr); /* 31 */
Tk_Window (*tk_CoordsToWindow) (int rootX, int rootY, Tk_Window tkwin); /* 32 */
@@ -1014,7 +976,7 @@ typedef struct TkStubs {
void (*tk_FreeOptions) (const Tk_ConfigSpec *specs, void *widgRec, Display *display, int needFlags); /* 74 */
void (*tk_FreePixmap) (Display *display, Pixmap pixmap); /* 75 */
void (*tk_FreeTextLayout) (Tk_TextLayout textLayout); /* 76 */
- TCL_DEPRECATED_API("function does nothing, call can be removed") void (*tk_FreeXId) (Display *display, XID xid); /* 77 */
+ void (*reserved77)(void);
GC (*tk_GCForColor) (XColor *colorPtr, Drawable drawable); /* 78 */
void (*tk_GeometryRequest) (Tk_Window tkwin, int reqWidth, int reqHeight); /* 79 */
Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid colorName); /* 80 */
@@ -1055,7 +1017,7 @@ typedef struct TkStubs {
void (*tk_HandleEvent) (XEvent *eventPtr); /* 115 */
Tk_Window (*tk_IdToWindow) (Display *display, Window window); /* 116 */
void (*tk_ImageChanged) (Tk_ImageModel model, int x, int y, int width, int height, int imageWidth, int imageHeight); /* 117 */
- int (*tk_Init) (Tcl_Interp *interp); /* 118 */
+ void (*reserved118)(void);
Atom (*tk_InternAtom) (Tk_Window tkwin, const char *name); /* 119 */
int (*tk_IntersectTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height); /* 120 */
void (*tk_MaintainGeometry) (Tk_Window window, Tk_Window container, int x, int y, int width, int height); /* 121 */
@@ -1081,13 +1043,13 @@ typedef struct TkStubs {
Tk_Window (*tk_NameToWindow) (Tcl_Interp *interp, const char *pathName, Tk_Window tkwin); /* 141 */
void (*tk_OwnSelection) (Tk_Window tkwin, Atom selection, Tk_LostSelProc *proc, void *clientData); /* 142 */
int (*tk_ParseArgv) (Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags); /* 143 */
- TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height); /* 144 */
- TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY); /* 145 */
+ void (*reserved144)(void);
+ void (*reserved145)(void);
int (*tk_PhotoGetImage) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr); /* 146 */
void (*tk_PhotoBlank) (Tk_PhotoHandle handle); /* 147 */
- TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoExpand_Panic) (Tk_PhotoHandle handle, int width, int height); /* 148 */
+ void (*reserved148)(void);
void (*tk_PhotoGetSize) (Tk_PhotoHandle handle, int *widthPtr, int *heightPtr); /* 149 */
- TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoSetSize_Panic) (Tk_PhotoHandle handle, int width, int height); /* 150 */
+ void (*reserved150)(void);
int (*tk_PointToChar) (Tk_TextLayout layout, int x, int y); /* 151 */
int (*tk_PostscriptFontName) (Tk_Font tkfont, Tcl_DString *dsPtr); /* 152 */
void (*tk_PreserveColormap) (Display *display, Colormap colormap); /* 153 */
@@ -1096,7 +1058,7 @@ typedef struct TkStubs {
void (*tk_ResizeWindow) (Tk_Window tkwin, int width, int height); /* 156 */
int (*tk_RestackWindow) (Tk_Window tkwin, int aboveBelow, Tk_Window other); /* 157 */
Tk_RestrictProc * (*tk_RestrictEvents) (Tk_RestrictProc *proc, void *arg, void **prevArgPtr); /* 158 */
- int (*tk_SafeInit) (Tcl_Interp *interp); /* 159 */
+ void (*reserved159)(void);
const char * (*tk_SetAppName) (Tk_Window tkwin, const char *name); /* 160 */
void (*tk_SetBackgroundFromBorder) (Tk_Window tkwin, Tk_3DBorder border); /* 161 */
void (*tk_SetClass) (Tk_Window tkwin, const char *className); /* 162 */
@@ -1149,11 +1111,11 @@ typedef struct TkStubs {
int (*tk_GetReliefFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *resultPtr); /* 209 */
int (*tk_GetScrollInfoObj) (Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], double *dblPtr, int *intPtr); /* 210 */
int (*tk_InitOptions) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 211 */
- TCL_DEPRECATED_API("Don't use this function in a stub-enabled extension") void (*tk_MainEx) (Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); /* 212 */
+ void (*reserved212)(void);
void (*tk_RestoreSavedOptions) (Tk_SavedOptions *savePtr); /* 213 */
int (*tk_SetOptions) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionTable, Tcl_Size objc, Tcl_Obj *const objv[], Tk_Window tkwin, Tk_SavedOptions *savePtr, int *maskPtr); /* 214 */
void (*tk_InitConsoleChannels) (Tcl_Interp *interp); /* 215 */
- int (*tk_CreateConsoleWindow) (Tcl_Interp *interp); /* 216 */
+ void (*reserved216)(void);
void (*tk_CreateSmoothMethod) (Tcl_Interp *interp, const Tk_SmoothMethod *method); /* 217 */
void (*reserved218)(void);
void (*reserved219)(void);
@@ -1183,8 +1145,8 @@ typedef struct TkStubs {
void (*tk_SetInternalBorderEx) (Tk_Window tkwin, int left, int right, int top, int bottom); /* 243 */
void (*tk_SetMinimumRequestSize) (Tk_Window tkwin, int minWidth, int minHeight); /* 244 */
void (*tk_SetCaretPos) (Tk_Window tkwin, int x, int y, int height); /* 245 */
- TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int compRule); /* 246 */
- TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 247 */
+ void (*reserved246)(void);
+ void (*reserved247)(void);
int (*tk_CollapseMotionEvents) (Display *display, int collapse); /* 248 */
Tk_StyleEngine (*tk_RegisterStyleEngine) (const char *name, Tk_StyleEngine parent); /* 249 */
Tk_StyleEngine (*tk_GetStyleEngine) (const char *name); /* 250 */
@@ -1195,8 +1157,8 @@ typedef struct TkStubs {
void (*tk_FreeStyle) (Tk_Style style); /* 255 */
const char * (*tk_NameOfStyle) (Tk_Style style); /* 256 */
Tk_Style (*tk_AllocStyleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 257 */
- Tk_Style (*tk_GetStyleFromObj) (Tcl_Obj *objPtr); /* 258 */
- void (*tk_FreeStyleFromObj) (Tcl_Obj *objPtr); /* 259 */
+ void (*reserved258)(void);
+ void (*reserved259)(void);
Tk_StyledElement (*tk_GetStyledElement) (Tk_Style style, Tcl_Size elementId, Tk_OptionTable optionTable); /* 260 */
void (*tk_GetElementSize) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int width, int height, int inner, int *widthPtr, int *heightPtr); /* 261 */
void (*tk_GetElementBox) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int x, int y, int width, int height, int inner, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr); /* 262 */
@@ -1209,8 +1171,8 @@ typedef struct TkStubs {
long (*tk_GetUserInactiveTime) (Display *dpy); /* 269 */
void (*tk_ResetUserInactiveTime) (Display *dpy); /* 270 */
Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */
- void (*tk_CreateOldImageType) (const Tk_ImageType *typePtr); /* 272 */
- void (*tk_CreateOldPhotoImageFormat) (const Tk_PhotoImageFormat *formatPtr); /* 273 */
+ void (*reserved272)(void);
+ void (*reserved273)(void);
int (*tk_AlwaysShowSelection) (Tk_Window tkwin); /* 274 */
unsigned (*tk_GetButtonMask) (unsigned button); /* 275 */
int (*tk_GetDoublePixelsFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, double *doublePtr); /* 276 */
@@ -1396,8 +1358,7 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_FreePixmap) /* 75 */
#define Tk_FreeTextLayout \
(tkStubsPtr->tk_FreeTextLayout) /* 76 */
-#define Tk_FreeXId \
- (tkStubsPtr->tk_FreeXId) /* 77 */
+/* Slot 77 is reserved */
#define Tk_GCForColor \
(tkStubsPtr->tk_GCForColor) /* 78 */
#define Tk_GeometryRequest \
@@ -1478,8 +1439,7 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_IdToWindow) /* 116 */
#define Tk_ImageChanged \
(tkStubsPtr->tk_ImageChanged) /* 117 */
-#define Tk_Init \
- (tkStubsPtr->tk_Init) /* 118 */
+/* Slot 118 is reserved */
#define Tk_InternAtom \
(tkStubsPtr->tk_InternAtom) /* 119 */
#define Tk_IntersectTextLayout \
@@ -1530,20 +1490,16 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_OwnSelection) /* 142 */
#define Tk_ParseArgv \
(tkStubsPtr->tk_ParseArgv) /* 143 */
-#define Tk_PhotoPutBlock_NoComposite \
- (tkStubsPtr->tk_PhotoPutBlock_NoComposite) /* 144 */
-#define Tk_PhotoPutZoomedBlock_NoComposite \
- (tkStubsPtr->tk_PhotoPutZoomedBlock_NoComposite) /* 145 */
+/* Slot 144 is reserved */
+/* Slot 145 is reserved */
#define Tk_PhotoGetImage \
(tkStubsPtr->tk_PhotoGetImage) /* 146 */
#define Tk_PhotoBlank \
(tkStubsPtr->tk_PhotoBlank) /* 147 */
-#define Tk_PhotoExpand_Panic \
- (tkStubsPtr->tk_PhotoExpand_Panic) /* 148 */
+/* Slot 148 is reserved */
#define Tk_PhotoGetSize \
(tkStubsPtr->tk_PhotoGetSize) /* 149 */
-#define Tk_PhotoSetSize_Panic \
- (tkStubsPtr->tk_PhotoSetSize_Panic) /* 150 */
+/* Slot 150 is reserved */
#define Tk_PointToChar \
(tkStubsPtr->tk_PointToChar) /* 151 */
#define Tk_PostscriptFontName \
@@ -1560,8 +1516,7 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_RestackWindow) /* 157 */
#define Tk_RestrictEvents \
(tkStubsPtr->tk_RestrictEvents) /* 158 */
-#define Tk_SafeInit \
- (tkStubsPtr->tk_SafeInit) /* 159 */
+/* Slot 159 is reserved */
#define Tk_SetAppName \
(tkStubsPtr->tk_SetAppName) /* 160 */
#define Tk_SetBackgroundFromBorder \
@@ -1666,16 +1621,14 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_GetScrollInfoObj) /* 210 */
#define Tk_InitOptions \
(tkStubsPtr->tk_InitOptions) /* 211 */
-#define Tk_MainEx \
- (tkStubsPtr->tk_MainEx) /* 212 */
+/* Slot 212 is reserved */
#define Tk_RestoreSavedOptions \
(tkStubsPtr->tk_RestoreSavedOptions) /* 213 */
#define Tk_SetOptions \
(tkStubsPtr->tk_SetOptions) /* 214 */
#define Tk_InitConsoleChannels \
(tkStubsPtr->tk_InitConsoleChannels) /* 215 */
-#define Tk_CreateConsoleWindow \
- (tkStubsPtr->tk_CreateConsoleWindow) /* 216 */
+/* Slot 216 is reserved */
#define Tk_CreateSmoothMethod \
(tkStubsPtr->tk_CreateSmoothMethod) /* 217 */
/* Slot 218 is reserved */
@@ -1732,10 +1685,8 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_SetMinimumRequestSize) /* 244 */
#define Tk_SetCaretPos \
(tkStubsPtr->tk_SetCaretPos) /* 245 */
-#define Tk_PhotoPutBlock_Panic \
- (tkStubsPtr->tk_PhotoPutBlock_Panic) /* 246 */
-#define Tk_PhotoPutZoomedBlock_Panic \
- (tkStubsPtr->tk_PhotoPutZoomedBlock_Panic) /* 247 */
+/* Slot 246 is reserved */
+/* Slot 247 is reserved */
#define Tk_CollapseMotionEvents \
(tkStubsPtr->tk_CollapseMotionEvents) /* 248 */
#define Tk_RegisterStyleEngine \
@@ -1756,10 +1707,8 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_NameOfStyle) /* 256 */
#define Tk_AllocStyleFromObj \
(tkStubsPtr->tk_AllocStyleFromObj) /* 257 */
-#define Tk_GetStyleFromObj \
- (tkStubsPtr->tk_GetStyleFromObj) /* 258 */
-#define Tk_FreeStyleFromObj \
- (tkStubsPtr->tk_FreeStyleFromObj) /* 259 */
+/* Slot 258 is reserved */
+/* Slot 259 is reserved */
#define Tk_GetStyledElement \
(tkStubsPtr->tk_GetStyledElement) /* 260 */
#define Tk_GetElementSize \
@@ -1784,10 +1733,8 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_ResetUserInactiveTime) /* 270 */
#define Tk_Interp \
(tkStubsPtr->tk_Interp) /* 271 */
-#define Tk_CreateOldImageType \
- (tkStubsPtr->tk_CreateOldImageType) /* 272 */
-#define Tk_CreateOldPhotoImageFormat \
- (tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */
+/* Slot 272 is reserved */
+/* Slot 273 is reserved */
#define Tk_AlwaysShowSelection \
(tkStubsPtr->tk_AlwaysShowSelection) /* 274 */
#define Tk_GetButtonMask \
@@ -1827,44 +1774,34 @@ extern const TkStubs *tkStubsPtr;
/* !END!: Do not edit above this line. */
-/* Functions that don't belong in the stub table */
-#undef Tk_MainEx
-#undef Tk_Init
-#undef Tk_SafeInit
-#undef Tk_CreateConsoleWindow
-
-#undef Tk_FreeXId
-#define Tk_FreeXId(display,xid)
-#undef Tk_GetStyleFromObj
-#undef Tk_FreeStyleFromObj
-#define Tk_GetStyleFromObj(obj) Tk_AllocStyleFromObj(NULL, obj)
-#define Tk_FreeStyleFromObj(obj) /* no-op */
#define Tk_GetImageMasterData Tk_GetImageModelData
#ifndef MAC_OSX_TK
# undef Tk_ClipDrawableToRect
#endif
+EXTERN void Tk_MainEx(Tcl_Size argc, char **argv,
+ Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
#if defined(_WIN32) && defined(UNICODE)
# define Tk_MainEx Tk_MainExW
EXTERN void Tk_MainExW(Tcl_Size argc, wchar_t **argv,
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
#endif
+EXTERN int Tk_Init(Tcl_Interp *interp);
+EXTERN int Tk_SafeInit(Tcl_Interp *interp);
+EXTERN int Tk_CreateConsoleWindow(Tcl_Interp *interp);
-
-#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8
-#undef Tk_PhotoPutBlock_NoComposite
-#undef Tk_PhotoPutZoomedBlock_NoComposite
-#undef Tk_PhotoExpand_Panic
-#undef Tk_PhotoPutBlock_Panic
-#undef Tk_PhotoPutZoomedBlock_Panic
-#undef Tk_PhotoSetSize_Panic
-#undef Tk_CreateOldPhotoImageFormat
-#endif /* TK_NO_DEPRECATED */
+#if TK_MAJOR_VERSION < 9
+/* Restore 8.x signature of Tk_ConfigureWidget, but panic if TK_CONFIG_OBJS flag is not set */
+#undef Tk_ConfigureWidget
+#define Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags) \
+ ((int (*)(Tcl_Interp *, Tk_Window, const Tk_ConfigSpec *, \
+ int, const char **, char *, int))(void *)(tkStubsPtr->tk_ConfigureWidget)) \
+ (((flags & TK_CONFIG_OBJS) ? interp : (Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory in Tk_ConfigureWidget"), \
+ NULL)), tkwin, specs, argc, argv, widgRec, flags)
+#endif
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
-#undef TkUnusedStubEntry
-
#endif /* _TKDECLS */
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 04162e3..5f71862 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -2002,8 +2002,8 @@ EntryComputeGeometry(
* resulting string.
*/
- TkUtfToUniChar(entryPtr->showChar, &ch);
- size = TkUniCharToUtf(ch, buf);
+ Tcl_UtfToUniChar(entryPtr->showChar, &ch);
+ size = Tcl_UniCharToUtf(ch, buf);
entryPtr->numDisplayBytes = entryPtr->numChars * size;
p = (char *)ckalloc(entryPtr->numDisplayBytes + 1);
@@ -3584,7 +3584,7 @@ ExpandPercents(
before++; /* skip over % */
if (*before != '\0') {
- before += TkUtfToUniChar(before, &ch);
+ before += Tcl_UtfToUniChar(before, &ch);
} else {
ch = '%';
}
@@ -3604,7 +3604,7 @@ ExpandPercents(
string = Tk_PathName(entryPtr->tkwin);
break;
default:
- length = TkUniCharToUtf(ch, numStorage);
+ length = Tcl_UniCharToUtf(ch, numStorage);
numStorage[length] = '\0';
string = numStorage;
break;
@@ -3664,7 +3664,7 @@ ExpandPercents(
string = Tk_PathName(entryPtr->tkwin);
break;
default:
- length = TkUniCharToUtf(ch, numStorage);
+ length = Tcl_UniCharToUtf(ch, numStorage);
numStorage[length] = '\0';
string = numStorage;
break;
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 0f77a91..6c1b63c 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -576,7 +576,7 @@ Tk_FontObjCmd(
if (charPtr != NULL) {
const char *string = Tcl_GetString(charPtr);
- size_t len = TkUtfToUniChar(string, &uniChar);
+ size_t len = Tcl_UtfToUniChar(string, &uniChar);
if (len != (size_t)charPtr->length) {
resultPtr = Tcl_NewStringObj(
@@ -1745,14 +1745,14 @@ Tk_PostscriptFontName(
src++;
upper = 1;
}
- src += TkUtfToUniChar(src, &ch);
+ src += Tcl_UtfToUniChar(src, &ch);
if (upper) {
ch = Tcl_UniCharToUpper(ch);
upper = 0;
} else {
ch = Tcl_UniCharToLower(ch);
}
- dest += TkUniCharToUtf(ch, dest);
+ dest += Tcl_UniCharToUtf(ch, dest);
}
*dest = '\0';
Tcl_DStringSetLength(dsPtr, dest - Tcl_DStringValue(dsPtr));
@@ -2792,7 +2792,7 @@ Tk_CharBbox(
}
if (widthPtr != NULL) {
int ch;
- Tk_MeasureChars(tkfont, end, TkUtfToUniChar(end, &ch), -1, 0, &w);
+ Tk_MeasureChars(tkfont, end, Tcl_UtfToUniChar(end, &ch), -1, 0, &w);
}
goto check;
}
@@ -3338,7 +3338,7 @@ Tk_TextLayoutToPostscript(
* international postscript fonts.
*/
- p += TkUtfToUniChar(p, &ch);
+ p += Tcl_UtfToUniChar(p, &ch);
if ((ch == '(') || (ch == ')') || (ch == '\\') || (ch < 0x20)) {
/*
* Tricky point: the "03" is necessary in the snprintf below,
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 82e33c4..6ea82ae 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -43,7 +43,7 @@ typedef struct {
* available for this widget. */
char *className; /* Class name for widget (from configuration
* option). Malloc-ed. */
- enum FrameType type; /* Type of widget, such as TYPE_FRAME. */
+ int type; /* Type of widget, such as TYPE_FRAME. */
char *screenName; /* Screen on which widget is created. Non-null
* only for top-levels. Malloc-ed, may be
* NULL. */
@@ -329,9 +329,6 @@ static const Tk_OptionSpec *const optionSpecs[] = {
static void ComputeFrameGeometry(Frame *framePtr);
static int ConfigureFrame(Tcl_Interp *interp, Frame *framePtr,
int objc, Tcl_Obj *const objv[]);
-static int CreateFrame(void *clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[],
- enum FrameType type, const char *appName);
static Tcl_FreeProc DestroyFrame;
static void DestroyFramePartly(Frame *framePtr);
static void DisplayFrame(void *clientData);
@@ -405,7 +402,7 @@ Tk_FrameObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return CreateFrame(clientData, interp, objc, objv, TYPE_FRAME, NULL);
+ return TkCreateFrame(clientData, interp, objc, objv, TYPE_FRAME, NULL);
}
int
@@ -415,7 +412,7 @@ Tk_ToplevelObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return CreateFrame(clientData, interp, objc, objv, TYPE_TOPLEVEL, NULL);
+ return TkCreateFrame(clientData, interp, objc, objv, TYPE_TOPLEVEL, NULL);
}
int
@@ -425,7 +422,7 @@ Tk_LabelframeObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return CreateFrame(clientData, interp, objc, objv, TYPE_LABELFRAME, NULL);
+ return TkCreateFrame(clientData, interp, objc, objv, TYPE_LABELFRAME, NULL);
}
/*
@@ -446,67 +443,13 @@ Tk_LabelframeObjCmd(
*
*--------------------------------------------------------------
*/
-
int
TkCreateFrame(
- void *clientData, /* Either NULL or pointer to option table. */
- Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- const char *const *argv, /* Argument strings. */
- int toplevel, /* Non-zero means create a toplevel window,
- * zero means create a frame. */
- const char *appName) /* Should only be non-NULL if there is no main
- * window associated with the interpreter.
- * Gives the base name to use for the new
- * application. */
-{
- int result, i;
- Tcl_Obj **objv = (Tcl_Obj **)ckalloc((argc+1) * sizeof(Tcl_Obj **));
-
- for (i=0; i<argc; i++) {
- objv[i] = Tcl_NewStringObj(argv[i], TCL_INDEX_NONE);
- Tcl_IncrRefCount(objv[i]);
- }
- objv[argc] = NULL;
- result = CreateFrame(clientData, interp, argc, objv,
- toplevel ? TYPE_TOPLEVEL : TYPE_FRAME, appName);
- for (i=0; i<argc; i++) {
- Tcl_DecrRefCount(objv[i]);
- }
- ckfree(objv);
- return result;
-}
-
-int
-TkListCreateFrame(
- void *clientData, /* Either NULL or pointer to option table. */
- Tcl_Interp *interp, /* Current interpreter. */
- Tcl_Obj *listObj, /* List of arguments. */
- int toplevel, /* Non-zero means create a toplevel window,
- * zero means create a frame. */
- Tcl_Obj *nameObj) /* Should only be non-NULL if there is no main
- * window associated with the interpreter.
- * Gives the base name to use for the new
- * application. */
-{
- Tcl_Size objc;
- Tcl_Obj **objv;
-
- if (TCL_OK != Tcl_ListObjGetElements(interp, listObj, &objc, &objv)) {
- return TCL_ERROR;
- }
- return CreateFrame(clientData, interp, objc, objv,
- toplevel ? TYPE_TOPLEVEL : TYPE_FRAME,
- nameObj ? Tcl_GetString(nameObj) : NULL);
-}
-
-static int
-CreateFrame(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument objects. */
- enum FrameType type, /* What widget type to create. */
+ int type, /* What widget type to create. */
const char *appName) /* Should only be non-NULL if there are no
* Main window associated with the
* interpreter. Gives the base name to use for
@@ -518,8 +461,8 @@ CreateFrame(
Tk_Window newWin;
const char *className, *screenName, *visualName, *colormapName;
const char *arg, *useOption;
- int i, depth;
- Tcl_Size length;
+ int depth;
+ Tcl_Size i, length;
unsigned int mask;
Colormap colormap;
Visual *visual;
diff --git a/generic/tkGet.c b/generic/tkGet.c
index dea28bf..53dbe62 100644
--- a/generic/tkGet.c
+++ b/generic/tkGet.c
@@ -729,7 +729,7 @@ TkGetDoublePixels(
error:
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "expected screen distance but got \"%s\"", string));
+ "expected screen distance but got \"%.50s\"", string));
Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
}
return TCL_ERROR;
diff --git a/generic/tkIcu.c b/generic/tkIcu.c
index 9696868..c11f78a 100644
--- a/generic/tkIcu.c
+++ b/generic/tkIcu.c
@@ -92,7 +92,8 @@ startEndOfCmd(
str = Tcl_GetStringFromObj(objv[1], &len);
Tcl_UtfToChar16DString(str, len, &ds);
len = Tcl_DStringLength(&ds)/2;
- if (TkGetIntForIndex(objv[2], len-1, 0, &idx) != TCL_OK) {
+ Tcl_Size ulen = Tcl_GetCharLength(objv[1]);
+ if (TkGetIntForIndex(objv[2], ulen-1, 0, &idx) != TCL_OK) {
Tcl_DStringFree(&ds);
Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad index \"%s\": must be integer?[+-]integer?, end?[+-]integer?, or \"\"", Tcl_GetString(objv[2])));
Tcl_SetErrorCode(interp, "TK", "ICU", "INDEX", NULL);
@@ -111,6 +112,14 @@ startEndOfCmd(
Tcl_SetErrorCode(interp, "TK", "ICU", "CANNOTOPEN", NULL);
return TCL_ERROR;
}
+ if (idx > 0 && len != ulen) {
+ /* The string contains codepoints > \uFFFF. Determine UTF-16 index */
+ Tcl_Size newIdx = 0;
+ for (Tcl_Size i = 0; i < idx; i++) {
+ newIdx += 1 + (((newIdx < (Tcl_Size)len-1) && (ustr[newIdx]&0xFC00) == 0xD800) && ((ustr[newIdx+1]&0xFC00) == 0xDC00));
+ }
+ idx = newIdx;
+ }
if (flags & FLAG_FOLLOWING) {
if ((idx < 0) && (flags & FLAG_WORD)) {
idx = 0;
@@ -145,6 +154,14 @@ startEndOfCmd(
icu_close(it);
Tcl_DStringFree(&ds);
if (idx != TCL_INDEX_NONE) {
+ if (idx > 0 && len != ulen) {
+ /* The string contains codepoints > \uFFFF. Determine UTF-32 index */
+ Tcl_Size newIdx = 1;
+ for (Tcl_Size i = 1; i < idx; i++) {
+ if (((ustr[i-1]&0xFC00) != 0xD800) || ((ustr[i]&0xFC00) != 0xDC00)) newIdx++;
+ }
+ idx = newIdx;
+ }
Tcl_SetObjResult(interp, TkNewIndexObj(idx));
}
return TCL_OK;
diff --git a/generic/tkImage.c b/generic/tkImage.c
index fc469d7..b462a3d 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -131,7 +131,7 @@ ImageTypeThreadExitProc(
/*
*----------------------------------------------------------------------
*
- * Tk_CreateOldImageType, Tk_CreateImageType --
+ * Tk_CreateImageType --
*
* This function is invoked by an image manager to tell Tk about a new
* kind of image and the functions that manage the new type. The function
@@ -148,27 +148,6 @@ ImageTypeThreadExitProc(
*/
void
-Tk_CreateOldImageType(
- const Tk_ImageType *typePtr)
- /* Structure describing the type. All of the
- * fields except "nextPtr" must be filled in
- * by caller. */
-{
- Tk_ImageType *copyPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
- Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
-
- if (!tsdPtr->initialized) {
- tsdPtr->initialized = 1;
- Tcl_CreateThreadExitHandler(ImageTypeThreadExitProc, NULL);
- }
- copyPtr = (Tk_ImageType *)ckalloc(sizeof(Tk_ImageType));
- *copyPtr = *typePtr;
- copyPtr->nextPtr = tsdPtr->oldImageTypeList;
- tsdPtr->oldImageTypeList = copyPtr;
-}
-
-void
Tk_CreateImageType(
const Tk_ImageType *typePtr)
/* Structure describing the type. All of the
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index a7da3d9..2fad264 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -240,7 +240,7 @@ ImgBmapConfigureModel(
int maskWidth, maskHeight, dummy1, dummy2;
if (Tk_ConfigureWidget(modelPtr->interp, Tk_MainWindow(modelPtr->interp),
- configSpecs, objc, (const char **) objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ configSpecs, objc, objv, modelPtr, flags) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index b8b3dd7..4a7d4ed 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -139,11 +139,6 @@ typedef struct {
Tk_PhotoImageFormat *formatList;
/* Pointer to the first in the list of known
* photo image formats.*/
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- Tk_PhotoImageFormat *oldFormatList;
- /* Pointer to the first in the list of known
- * photo image formats.*/
-#endif
Tk_PhotoImageFormatVersion3 *formatListVersion3;
/* Pointer to the first in the list of known
* photo image formats in Version3 format.*/
@@ -247,13 +242,6 @@ PhotoFormatThreadExitProc(
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- while (tsdPtr->oldFormatList != NULL) {
- freePtr = tsdPtr->oldFormatList;
- tsdPtr->oldFormatList = tsdPtr->oldFormatList->nextPtr;
- ckfree(freePtr);
- }
-#endif
while (tsdPtr->formatList != NULL) {
freePtr = tsdPtr->formatList;
tsdPtr->formatList = tsdPtr->formatList->nextPtr;
@@ -271,7 +259,7 @@ PhotoFormatThreadExitProc(
/*
*----------------------------------------------------------------------
*
- * Tk_CreateOldPhotoImageFormat, Tk_CreatePhotoImageFormat,
+ * Tk_CreatePhotoImageFormat,
* Tk_CreatePhotoImageFormatVersion3 --
*
* This function is invoked by an image file handler to register a new
@@ -288,29 +276,6 @@ PhotoFormatThreadExitProc(
*----------------------------------------------------------------------
*/
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
-void
-Tk_CreateOldPhotoImageFormat(
- const Tk_PhotoImageFormat *formatPtr)
- /* Structure describing the format. All of the
- * fields except "nextPtr" must be filled in
- * by caller. */
-{
- Tk_PhotoImageFormat *copyPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
- Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
-
- if (!tsdPtr->initialized) {
- tsdPtr->initialized = 1;
- Tcl_CreateThreadExitHandler(PhotoFormatThreadExitProc, NULL);
- }
- copyPtr = (Tk_PhotoImageFormat *)ckalloc(sizeof(Tk_PhotoImageFormat));
- *copyPtr = *formatPtr;
- copyPtr->nextPtr = tsdPtr->oldFormatList;
- tsdPtr->oldFormatList = copyPtr;
-}
-#endif
-
void
Tk_CreatePhotoImageFormat(
const Tk_PhotoImageFormat *formatPtr)
@@ -328,12 +293,6 @@ Tk_CreatePhotoImageFormat(
}
copyPtr = (Tk_PhotoImageFormat *)ckalloc(sizeof(Tk_PhotoImageFormat));
*copyPtr = *formatPtr;
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- if (isupper((unsigned char) *formatPtr->name)) {
- copyPtr->nextPtr = tsdPtr->oldFormatList;
- tsdPtr->oldFormatList = copyPtr;
- } else
-#endif
{
/* for compatibility with aMSN: make a copy of formatPtr->name */
char *name = (char *)ckalloc(strlen(formatPtr->name) + 1);
@@ -835,23 +794,6 @@ ImgPhotoCmd(
}
}
}
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- if (stringWriteProc == NULL) {
- oldformat = 1;
- for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL;
- imageFormat = imageFormat->nextPtr) {
- if ((strncasecmp(Tcl_GetString(options.format),
- imageFormat->name,
- strlen(imageFormat->name)) == 0)) {
- matched = 1;
- if (imageFormat->stringWriteProc != NULL) {
- stringWriteProc = imageFormat->stringWriteProc;
- break;
- }
- }
- }
- }
-#endif
if (stringWriteProc == NULL) {
oldformat = 0;
for (imageFormatVersion3 = tsdPtr->formatListVersion3;
@@ -1512,22 +1454,6 @@ readCleanup:
}
}
}
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- if (imageFormat == NULL) {
- oldformat = 1;
- for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL;
- imageFormat = imageFormat->nextPtr) {
- if ((fmtString == NULL)
- || (strncasecmp(fmtString, imageFormat->name,
- strlen(imageFormat->name)) == 0)) {
- matched = 1;
- if (imageFormat->fileWriteProc != NULL) {
- break;
- }
- }
- }
- }
-#endif
if (imageFormat == NULL) {
oldformat = 0;
for (imageFormatVersion3 = tsdPtr->formatListVersion3;
@@ -2047,7 +1973,7 @@ ImgPhotoConfigureModel(
*/
if (Tk_ConfigureWidget(interp, Tk_MainWindow(interp), configSpecs,
- objc, (const char **)objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ objc, objv, modelPtr, flags) != TCL_OK) {
goto errorExit;
}
@@ -2778,42 +2704,6 @@ MatchFileFormat(
}
}
}
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
-if (formatPtr == NULL) {
- useoldformat = 1;
- for (formatPtr = tsdPtr->oldFormatList; formatPtr != NULL;
- formatPtr = formatPtr->nextPtr) {
- if (formatString != NULL) {
- if (strncasecmp(formatString,
- formatPtr->name, strlen(formatPtr->name)) != 0) {
- continue;
- }
- matched = 1;
- if (formatPtr->fileMatchProc == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "-file option isn't supported for %s images",
- formatString));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
- "NOT_FILE_FORMAT", NULL);
- return TCL_ERROR;
- }
- }
- if (formatPtr->fileMatchProc != NULL) {
- (void) Tcl_Seek(chan, Tcl_LongAsWide(0L), SEEK_SET);
- if (formatPtr->fileMatchProc(chan, fileName, (Tcl_Obj *)
- formatString, widthPtr, heightPtr, interp)) {
- if (*widthPtr < 1) {
- *widthPtr = 1;
- }
- if (*heightPtr < 1) {
- *heightPtr = 1;
- }
- break;
- }
- }
- }
- }
-#endif
/*
* For old and not version 3 format, exit now with success
@@ -3011,38 +2901,6 @@ MatchStringFormat(
}
}
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- if (formatPtr == NULL) {
- useoldformat = 1;
- for (formatPtr = tsdPtr->oldFormatList; formatPtr != NULL;
- formatPtr = formatPtr->nextPtr) {
- if (formatObj != NULL) {
- if (strncasecmp(formatString,
- formatPtr->name, strlen(formatPtr->name)) != 0) {
- continue;
- }
- matched = 1;
- if (formatPtr->stringMatchProc == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "-data option isn't supported for %s images",
- formatString));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
- "NOT_DATA_FORMAT", NULL);
- return TCL_ERROR;
- }
- }
- if ((formatPtr->stringMatchProc != NULL)
- && (formatPtr->stringReadProc != NULL)
- && formatPtr->stringMatchProc(
- (Tcl_Obj *) Tcl_GetString(data),
- (Tcl_Obj *) formatString,
- widthPtr, heightPtr, interp)) {
- break;
- }
- }
- }
-#endif
-
if (formatPtr == NULL) {
useoldformat = 0;
for (formatVersion3Ptr = tsdPtr->formatListVersion3;
@@ -4531,107 +4389,6 @@ ImgPhotoPostscript(
}
/*
- *----------------------------------------------------------------------
- *
- * Tk_PhotoPutBlock_NoComposite, Tk_PhotoPutZoomedBlock_NoComposite --
- *
- * These backward-compatibility functions just exist to fill slots in stubs
- * table. For the behaviour of *_NoComposite, refer to the corresponding
- * function without the extra suffix, except that the compositing rule is
- * always "overlay" and the function always panics on memory-allocation
- * failure.
- *
- *----------------------------------------------------------------------
- */
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
-void
-Tk_PhotoPutBlock_NoComposite(
- Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr,
- int x, int y, int width, int height)
-{
- if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height,
- TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) {
- Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE);
- }
-}
-
-void
-Tk_PhotoPutZoomedBlock_NoComposite(
- Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr,
- int x, int y, int width, int height,
- int zoomX, int zoomY, int subsampleX, int subsampleY)
-{
- if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height,
- zoomX, zoomY, subsampleX, subsampleY,
- TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) {
- Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE);
- }
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * Tk_PhotoExpand_Panic, Tk_PhotoPutBlock_Panic,
- * Tk_PhotoPutZoomedBlock_Panic, Tk_PhotoSetSize_Panic
- *
- * Backward compatibility functions for preserving the old behaviour (i.e.
- * panic on memory allocation failure) so that extensions do not need to be
- * significantly updated to take account of TIP #116. These call the new
- * interface (i.e. the interface without the extra suffix), but panic if an
- * error condition is returned.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_PhotoExpand_Panic(
- Tk_PhotoHandle handle,
- int width, int height)
-{
- if (Tk_PhotoExpand(NULL, handle, width, height) != TCL_OK) {
- Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE);
- }
-}
-
-void
-Tk_PhotoPutBlock_Panic(
- Tk_PhotoHandle handle,
- Tk_PhotoImageBlock *blockPtr,
- int x, int y, int width, int height, int compRule)
-{
- if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height,
- compRule) != TCL_OK) {
- Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE);
- }
-}
-
-void
-Tk_PhotoPutZoomedBlock_Panic(
- Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr,
- int x, int y, int width, int height,
- int zoomX, int zoomY, int subsampleX, int subsampleY,
- int compRule)
-{
- if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height,
- zoomX, zoomY, subsampleX, subsampleY, compRule) != TCL_OK) {
- Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE);
- }
-}
-
-void
-Tk_PhotoSetSize_Panic(
- Tk_PhotoHandle handle,
- int width, int height)
-{
- if (Tk_PhotoSetSize(NULL, handle, width, height) != TCL_OK) {
- Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE);
- }
-}
-#endif /* TK_NO_DEPRECATED */
-
-/*
* Local Variables:
* mode: c
* c-basic-offset: 4
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 8b1aab3..e6db14e 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -68,7 +68,7 @@ declare 12 {
}
declare 13 {
int TkCreateFrame(void *clientData, Tcl_Interp *interp,
- int argc, const char *const *argv, int toplevel, const char *appName)
+ Tcl_Size objc, Tcl_Obj *const objv[], int type, const char *appName)
}
declare 14 {
Tk_Window TkCreateMainWindow(Tcl_Interp *interp,
@@ -226,9 +226,6 @@ declare 58 {
declare 59 {
void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name)
}
-declare 60 {deprecated {renamed to Tk_GetOtherWindow}} {
- TkWindow *TkpGetOtherWindow(TkWindow *winPtr)
-}
declare 61 {
TkWindow *TkpGetWrapperWindow(TkWindow *winPtr)
}
@@ -239,15 +236,9 @@ declare 63 {
void TkpInitializeMenuBindings(Tcl_Interp *interp,
Tk_BindingTable bindingTable)
}
-declare 64 {deprecated {renamed to Tk_MakeContainer}} {
- void TkpMakeContainer(Tk_Window tkwin)
-}
declare 65 {
void TkpMakeMenuWindow(Tk_Window tkwin, int transient)
}
-declare 66 {deprecated {renamed to Tk_MakeWindow}} {
- Window TkpMakeWindow(TkWindow *winPtr, Window parent)
-}
declare 67 {
void TkpMenuNotifyToplevelCreate(Tcl_Interp *interp, const char *menuName)
}
@@ -269,15 +260,6 @@ declare 72 {
declare 73 {
void TkpRedirectKeyEvent(TkWindow *winPtr, XEvent *eventPtr)
}
-declare 74 {deprecated {renamed to Tk_SetMainMenubar}} {
- void TkpSetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *menuName)
-}
-declare 75 {deprecated {renamed to Tk_UseWindow}} {
- int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, const char *string)
-}
-#
-# Slot 76 unused (WAS: TkpWindowWasRecentlyDeleted)
-#
declare 77 {
void TkQueueEventForAllChildren(TkWindow *winPtr, XEvent *eventPtr)
}
@@ -302,16 +284,6 @@ declare 82 {
declare 83 {
void TkSelPropProc(XEvent *eventPtr)
}
-
-# Exported publically as Tk_SetClassProcs in 8.4a2
-#declare 84 {
-# void TkSetClassProcs(Tk_Window tkwin,
-# TkClassProcs *procs, void *instanceData)
-#}
-declare 85 {deprecated {renamed to Tk_SetWindowMenubar}} {
- void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin,
- const char *oldMenuName, const char *menuName)
-}
declare 86 {
KeySym TkStringToKeysym(const char *name)
}
@@ -394,10 +366,6 @@ declare 109 {
declare 110 {
void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont)
}
-declare 111 {deprecated {renamed to Tk_GetSystemDefault}} {
- Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin,
- const char *dbName, const char *className)
-}
declare 112 {
void TkpMenuThreadInit(void)
}
@@ -424,20 +392,16 @@ declare 119 {
int XUnionRectWithRegion(XRectangle *rect,
Region src, Region dr_return)
}
-declare 121 aqua {
+declare 121 {
Pixmap TkpCreateNativeBitmap(Display *display, const void *source)
}
-declare 122 aqua {
+declare 122 {
void TkpDefineNativeBitmaps(void)
}
-declare 124 aqua {
+declare 124 {
Pixmap TkpGetNativeAppBitmap(Display *display,
const char *name, int *width, int *height)
}
-declare 135 {deprecated {renamed to Tk_DrawHighlightBorder}} {
- void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC,
- int highlightWidth, Drawable drawable)
-}
declare 136 {
void TkSetFocusWin(TkWindow *winPtr, int force)
}
@@ -666,58 +630,33 @@ declare 0 x11 {
declare 2 x11 {
void TkGenerateActivateEvents(TkWindow *winPtr, int active)
}
-declare 3 x11 {
- int TkpCmapStressed(Tk_Window tkwin, Colormap colormap)
-}
-declare 4 x11 {
- void TkpSync(Display *display)
-}
-declare 5 x11 {
- Window TkUnixContainerId(TkWindow *winPtr)
-}
declare 6 x11 {
- int TkUnixDoOneXEvent(Tcl_Time *timePtr)
-}
-declare 7 x11 {
- void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar)
-}
-declare 8 x11 {
int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr)
}
declare 9 x11 {
- void TkWmCleanup(TkDisplay *dispPtr)
-}
-declare 10 x11 {
- void TkSendCleanup(TkDisplay *dispPtr)
-}
-declare 12 x11 {
int TkpWmSetState(TkWindow *winPtr, int state)
}
# only needed by tktest:
-declare 13 x11 {
- int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp, Tcl_Size objc,
- Tcl_Obj *const objv[])
-}
declare 38 x11 {
- int TkpCmapStressed_(Tk_Window tkwin, Colormap colormap)
+ int TkpCmapStressed(Tk_Window tkwin, Colormap colormap)
}
declare 39 x11 {
- void TkpSync_(Display *display)
+ void TkpSync(Display *display)
}
declare 40 x11 {
- Window TkUnixContainerId_(TkWindow *winPtr)
+ Window TkUnixContainerId(TkWindow *winPtr)
}
declare 41 x11 {
- int TkUnixDoOneXEvent_(Tcl_Time *timePtr)
+ int TkUnixDoOneXEvent(Tcl_Time *timePtr)
}
declare 42 x11 {
- void TkUnixSetMenubar_(Tk_Window tkwin, Tk_Window menubar)
+ void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar)
}
declare 43 x11 {
- void TkWmCleanup_(TkDisplay *dispPtr)
+ void TkWmCleanup(TkDisplay *dispPtr)
}
declare 44 x11 {
- void TkSendCleanup_(TkDisplay *dispPtr)
+ void TkSendCleanup(TkDisplay *dispPtr)
}
# only needed by tktest:
declare 45 x11 {
@@ -729,7 +668,7 @@ declare 45 x11 {
# Windows specific functions
declare 0 win {
- char *TkAlignImageData(XImage *image, int alignment, int bitOrder)
+ void TkCreateXEventSource(void)
}
declare 2 win {
void TkGenerateActivateEvents(TkWindow *winPtr, int active)
@@ -832,7 +771,7 @@ declare 32 win {
const char *dbName, const char *className)
}
declare 33 win {
- int TkWinGetPlatformId(void)
+ char *TkAlignImageData(XImage *image, int alignment, int bitOrder)
}
# new for 8.4.1
@@ -851,10 +790,6 @@ declare 36 win {
UINT message, WPARAM wParam, LPARAM lParam)
}
-# new for 8.4.20+/8.5.12+, Cygwin only
-declare 37 win {
- void TkCreateXEventSource(void)
-}
declare 38 win {
int TkpCmapStressed(Tk_Window tkwin, Colormap colormap)
}
@@ -888,26 +823,26 @@ declare 47 win {
################################
# Aqua specific functions
-declare 0 aqua {
- void TkGenerateActivateEvents(TkWindow *winPtr, int active)
+declare 1 aqua {
+ void TkAboutDlg(void)
}
declare 2 aqua {
- void TkGenerateActivateEvents_(TkWindow *winPtr, int active)
+ void TkGenerateActivateEvents(TkWindow *winPtr, int active)
}
declare 3 aqua {
- void TkPointerDeadWindow(TkWindow *winPtr)
+ unsigned long TkpGetMS(void)
}
declare 4 aqua {
- void TkpSetCapture(TkWindow *winPtr)
+ void TkPointerDeadWindow(TkWindow *winPtr)
}
declare 5 aqua {
void TkpSetCursor(TkpCursor cursor)
}
declare 6 aqua {
- void TkpWmSetState(TkWindow *winPtr, int state)
+ int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr)
}
declare 7 aqua {
- void TkAboutDlg(void)
+ int TkpWmSetState(TkWindow *winPtr, int state)
}
declare 8 aqua {
unsigned int TkMacOSXButtonKeyState(void)
@@ -918,10 +853,9 @@ declare 9 aqua {
declare 10 aqua {
int TkMacOSXDispatchMenuEvent(int menuID, int index)
}
-# Now a static function
-# declare 11 aqua {
-# void TkMacOSXInstallCursor(int resizeOverride)
-# }
+declare 11 aqua {
+ void TkpSetCapture(TkWindow *winPtr)
+}
declare 12 aqua {
void TkMacOSXHandleTearoffMenu(void)
}
@@ -938,22 +872,9 @@ declare 18 aqua {
void TkMacOSXHandleMenuSelect(short theMenu, unsigned short theItem,
int optionKeyPressed)
}
-
-# removed duplicates from tkPlat table(tk.decls)
-#declare 19 aqua {
-# void TkMacOSXInitAppleEvents(Tcl_Interp *interp)
-#}
-#
-#declare 20 aqua {
-# void TkMacOSXInitMenus(Tcl_Interp *interp)
-#}
-
declare 21 aqua {
void TkMacOSXInvalidateWindow(MacDrawable *macWin, int flag)
}
-declare 22 aqua {
- int TkMacOSXIsCharacterMissing(Tk_Font tkfont, unsigned int searchChar)
-}
declare 23 aqua {
void TkMacOSXMakeRealWindowExist(TkWindow *winPtr)
}
@@ -963,10 +884,6 @@ declare 24 aqua {
declare 25 aqua {
void TkMacOSXMenuClick(void)
}
-# The corresponding Unregister was not a stub, and this should be static.
-#declare 26 aqua {
-# void TkMacOSXRegisterOffScreenWindow(Window window, void *portPtr)
-#}
declare 27 aqua {
int TkMacOSXResizable(TkWindow *winPtr)
}
@@ -976,19 +893,12 @@ declare 28 aqua {
declare 29 aqua {
void TkMacOSXSetScrollbarGrow(TkWindow *winPtr, int flag)
}
-declare 30 aqua {
- void TkMacOSXSetUpClippingRgn(Drawable drawable)
-}
declare 31 aqua {
void TkMacOSXSetUpGraphicsPort(GC gc, void *destPort)
}
declare 32 aqua {
void TkMacOSXUpdateClipRgn(TkWindow *winPtr)
}
-# This was not implemented. Perhaps meant to be OffScreen ?
-#declare 33 aqua {
-# void TkMacOSXUnregisterMacWindow(void *portPtr)
-#}
declare 34 aqua {
int TkMacOSXUseMenuID(short macID)
}
@@ -1041,16 +951,10 @@ declare 51 aqua {
declare 52 aqua {
void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag)
}
-declare 53 aqua {
- unsigned long TkpGetMS(void)
-}
-# For Canvas3d, requested by Sean Woods
-declare 54 aqua {
- void *TkMacOSXDrawable(Drawable drawable)
-}
-declare 55 aqua {
- int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr)
-}
+# Made public as Tk_MacOSXGetNSWindowForDrawable
+#declare 54 aqua {
+# void *TkMacOSXDrawable(Drawable drawable)
+#}
##############################################################################
@@ -1594,348 +1498,350 @@ declare 6 macosx {
Colormap XCreateColormap(Display *d, Window w, Visual *v, int i)
}
declare 7 macosx {
- GContext XGContextFromGC(GC g)
+ Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,
+ XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2)
}
-# second parameter was of type KeyCode
declare 8 macosx {
- KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i)
+ Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2,
+ unsigned int ui1, unsigned int ui2, XColor _Xconst *x1,
+ XColor _Xconst *x2)
}
declare 9 macosx {
- KeySym XStringToKeysym(_Xconst char *c)
+ GContext XGContextFromGC(GC g)
}
declare 10 macosx {
- Window XRootWindow(Display *d, int i)
+ XHostAddress *XListHosts(Display *d, int *i, Bool *b)
}
+# second parameter was of type KeyCode
declare 11 macosx {
- XErrorHandler XSetErrorHandler(XErrorHandler x)
+ KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i)
}
declare 12 macosx {
- Status XAllocColor(Display *d, Colormap c, XColor *xp)
+ KeySym XStringToKeysym(_Xconst char *c)
}
declare 13 macosx {
- int XBell(Display *d, int i)
+ Window XRootWindow(Display *d, int i)
}
declare 14 macosx {
- int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1,
- int i2, _Xconst unsigned char *c, int i3)
+ XErrorHandler XSetErrorHandler(XErrorHandler x)
}
declare 15 macosx {
- int XChangeWindowAttributes(Display *d, Window w, unsigned long ul,
- XSetWindowAttributes *x)
+ Status XIconifyWindow(Display *d, Window w, int i)
}
declare 16 macosx {
- int XConfigureWindow(Display *d, Window w, unsigned int i,
- XWindowChanges *x)
+ Status XWithdrawWindow(Display *d, Window w, int i)
}
declare 17 macosx {
- int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
- int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)
+ Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip)
}
declare 18 macosx {
- int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
- int i2, unsigned int ui1,
- unsigned int ui2, int i3, int i4, unsigned long ul)
+ Status XAllocColor(Display *d, Colormap c, XColor *xp)
}
declare 19 macosx {
- Pixmap XCreateBitmapFromData(Display *display, Drawable d,
- _Xconst char *data, unsigned int width, unsigned int height)
+ int XBell(Display *d, int i)
}
declare 20 macosx {
- int XDefineCursor(Display *d, Window w, Cursor c)
+ int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1,
+ int i2, _Xconst unsigned char *c, int i3)
}
declare 21 macosx {
- int XDestroyWindow(Display *d, Window w)
+ int XChangeWindowAttributes(Display *d, Window w, unsigned long ul,
+ XSetWindowAttributes *x)
}
declare 22 macosx {
- int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2,
- unsigned int ui1, unsigned int ui2, int i3, int i4)
+ int XClearWindow(Display *d, Window w)
}
declare 23 macosx {
- int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2)
+ int XConfigureWindow(Display *d, Window w, unsigned int i,
+ XWindowChanges *x)
}
declare 24 macosx {
- int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2,
- unsigned int ui1, unsigned int ui2)
+ int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
+ int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)
}
declare 25 macosx {
- int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2,
- unsigned int ui1, unsigned int ui2, int i3, int i4)
+ int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
+ int i2, unsigned int ui1, unsigned int ui2,
+ int i3, int i4, unsigned long ul)
}
declare 26 macosx {
- int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x,
- int i1, int i2, int i3)
+ Pixmap XCreateBitmapFromData(Display *display, Drawable d,
+ _Xconst char *data, unsigned int width, unsigned int height)
}
declare 27 macosx {
- int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i)
+ int XDefineCursor(Display *d, Window w, Cursor c)
}
declare 28 macosx {
- int XFreeColormap(Display *d, Colormap c)
+ int XDeleteProperty(Display *d, Window w, Atom a)
}
declare 29 macosx {
- int XFreeColors(Display *d, Colormap c,
- unsigned long *ulp, int i, unsigned long ul)
+ int XDestroyWindow(Display *d, Window w)
}
declare 30 macosx {
- int XFreeModifiermap(XModifierKeymap *x)
+ int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3, int i4)
}
declare 31 macosx {
- Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1,
- int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3,
- unsigned int *ui4)
+ int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2)
}
declare 32 macosx {
- int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2,
- Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1,
- unsigned long *ulp2, unsigned char **cpp)
+ int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2)
}
declare 33 macosx {
- int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t)
+ int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3, int i4)
}
declare 34 macosx {
- int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui,
- int i1, int i2, Window w2, Cursor c, Time t)
+ int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x,
+ int i1, int i2, int i3)
}
declare 35 macosx {
- KeyCode XKeysymToKeycode(Display *d, KeySym k)
+ int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i)
}
declare 36 macosx {
- int XMapWindow(Display *d, Window w)
+ int XForceScreenSaver(Display *d, int i)
}
declare 37 macosx {
- int XMoveResizeWindow(Display *d, Window w, int i1, int i2,
- unsigned int ui1, unsigned int ui2)
+ int XFreeColormap(Display *d, Colormap c)
}
declare 38 macosx {
- int XMoveWindow(Display *d, Window w, int i1, int i2)
+ int XFreeColors(Display *d, Colormap c,
+ unsigned long *ulp, int i, unsigned long ul)
}
declare 39 macosx {
- Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3,
- int *i1, int *i2, int *i3, int *i4, unsigned int *ui)
+ int XFreeCursor(Display *d, Cursor c)
}
declare 40 macosx {
- int XRaiseWindow(Display *d, Window w)
+ int XFreeModifiermap(XModifierKeymap *x)
}
declare 41 macosx {
- int XRefreshKeyboardMapping(XMappingEvent *x)
+ Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1,
+ int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3,
+ unsigned int *ui4)
}
declare 42 macosx {
- int XResizeWindow(Display *d, Window w, unsigned int ui1,
- unsigned int ui2)
+ int XGetInputFocus(Display *d, Window *w, int *i)
}
declare 43 macosx {
- int XSelectInput(Display *d, Window w, long l)
+ int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2,
+ Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1,
+ unsigned long *ulp2, unsigned char **cpp)
}
declare 44 macosx {
- Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x)
+ Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x)
}
declare 45 macosx {
- int XSetIconName(Display *d, Window w, _Xconst char *c)
+ int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t)
}
declare 46 macosx {
- int XSetInputFocus(Display *d, Window w, int i, Time t)
+ int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui,
+ int i1, int i2, Window w2, Cursor c, Time t)
}
declare 47 macosx {
- int XSetSelectionOwner(Display *d, Atom a, Window w, Time t)
+ KeyCode XKeysymToKeycode(Display *d, KeySym k)
}
declare 48 macosx {
- int XSetWindowBackground(Display *d, Window w, unsigned long ul)
+ Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2,
+ XColor *x1, XColor *x2)
}
declare 49 macosx {
- int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p)
+ int XMapWindow(Display *d, Window w)
}
declare 50 macosx {
- int XSetWindowBorder(Display *d, Window w, unsigned long ul)
+ int XMoveResizeWindow(Display *d, Window w, int i1, int i2,
+ unsigned int ui1, unsigned int ui2)
}
declare 51 macosx {
- int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p)
+ int XMoveWindow(Display *d, Window w, int i1, int i2)
}
declare 52 macosx {
- int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui)
+ int XNextEvent(Display *d, XEvent *x)
}
declare 53 macosx {
- int XSetWindowColormap(Display *d, Window w, Colormap c)
+ int XPutBackEvent(Display *d, XEvent *x)
}
declare 54 macosx {
- int XUngrabKeyboard(Display *d, Time t)
+ int XQueryColors(Display *d, Colormap c, XColor *x, int i)
}
declare 55 macosx {
- int XUngrabPointer(Display *d, Time t)
+ Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3,
+ int *i1, int *i2, int *i3, int *i4, unsigned int *ui)
}
declare 56 macosx {
- int XUnmapWindow(Display *d, Window w)
+ Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3,
+ Window **w4, unsigned int *ui)
}
declare 57 macosx {
- int TkPutImage(unsigned long *colors, int ncolors, Display *display,
- Drawable d, GC gc, XImage *image, int src_x, int src_y,
- int dest_x, int dest_y, unsigned int width, unsigned int height)
+ int XRaiseWindow(Display *d, Window w)
}
declare 58 macosx {
- Status XParseColor(Display *display, Colormap map,
- _Xconst char *spec, XColor *colorPtr)
+ int XRefreshKeyboardMapping(XMappingEvent *x)
}
declare 59 macosx {
- GC XCreateGC(Display *display, Drawable d,
- unsigned long valuemask, XGCValues *values)
+ int XResizeWindow(Display *d, Window w, unsigned int ui1,
+ unsigned int ui2)
}
declare 60 macosx {
- int XFreeGC(Display *display, GC gc)
+ int XSelectInput(Display *d, Window w, long l)
}
declare 61 macosx {
- Atom XInternAtom(Display *display, _Xconst char *atom_name,
- Bool only_if_exists)
+ Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x)
}
declare 62 macosx {
- int XSetBackground(Display *display, GC gc, unsigned long foreground)
+ int XSetCommand(Display *d, Window w, char **c, int i)
}
declare 63 macosx {
- int XSetForeground(Display *display, GC gc, unsigned long foreground)
+ int XSetIconName(Display *d, Window w, _Xconst char *c)
}
declare 64 macosx {
- int XSetClipMask(Display *display, GC gc, Pixmap pixmap)
+ int XSetInputFocus(Display *d, Window w, int i, Time t)
}
declare 65 macosx {
- int XSetClipOrigin(Display *display, GC gc,
- int clip_x_origin, int clip_y_origin)
+ int XSetSelectionOwner(Display *d, Atom a, Window w, Time t)
}
declare 66 macosx {
- int XSetTSOrigin(Display *display, GC gc,
- int ts_x_origin, int ts_y_origin)
+ int XSetWindowBackground(Display *d, Window w, unsigned long ul)
}
declare 67 macosx {
- int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values)
+ int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p)
}
declare 68 macosx {
- int XSetFont(Display *display, GC gc, Font font)
+ int XSetWindowBorder(Display *d, Window w, unsigned long ul)
}
declare 69 macosx {
- int XSetArcMode(Display *display, GC gc, int arc_mode)
+ int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p)
}
declare 70 macosx {
- int XSetStipple(Display *display, GC gc, Pixmap stipple)
+ int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui)
}
declare 71 macosx {
- int XSetFillRule(Display *display, GC gc, int fill_rule)
+ int XSetWindowColormap(Display *d, Window w, Colormap c)
}
declare 72 macosx {
- int XSetFillStyle(Display *display, GC gc, int fill_style)
+ Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1,
+ int i2, int *i3, int *i4, Window *w3)
}
declare 73 macosx {
- int XSetFunction(Display *display, GC gc, int function)
+ int XUngrabKeyboard(Display *d, Time t)
}
declare 74 macosx {
- int XSetLineAttributes(Display *display, GC gc, unsigned int line_width,
- int line_style, int cap_style, int join_style)
+ int XUngrabPointer(Display *d, Time t)
}
declare 75 macosx {
- int _XInitImageFuncPtrs(XImage *image)
+ int XUnmapWindow(Display *d, Window w)
}
declare 76 macosx {
- XIC XCreateIC(XIM xim, ...)
+ int XWindowEvent(Display *d, Window w, long l, XEvent *x)
}
declare 77 macosx {
- XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask,
- XVisualInfo *vinfo_template, int *nitems_return)
+ void XDestroyIC(XIC x)
}
declare 78 macosx {
- void XSetWMClientMachine(Display *display, Window w,
- XTextProperty *text_prop)
+ Bool XFilterEvent(XEvent *x, Window w)
}
declare 79 macosx {
- Status XStringListToTextProperty(char **list, int count,
- XTextProperty *text_prop_return)
+ int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i,
+ KeySym *k, Status *s)
}
declare 80 macosx {
- int XDrawSegments(Display *display, Drawable d, GC gc,
- XSegment *segments, int nsegments)
+ int TkPutImage(unsigned long *colors, int ncolors, Display *display,
+ Drawable d, GC gc, XImage *image, int src_x, int src_y,
+ int dest_x, int dest_y, unsigned int width, unsigned int height)
}
declare 81 macosx {
- int XForceScreenSaver(Display *display, int mode)
+ int XSetClipRectangles(Display *display, GC gc, int clip_x_origin,
+ int clip_y_origin, XRectangle rectangles[], int n, int ordering)
}
declare 82 macosx {
- int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1,
- int x2, int y2)
+ Status XParseColor(Display *display, Colormap map,
+ _Xconst char *spec, XColor *colorPtr)
}
declare 83 macosx {
- int XFillRectangle(Display *display, Drawable d, GC gc,
- int x, int y, unsigned int width, unsigned int height)
+ GC XCreateGC(Display *display, Drawable d,
+ unsigned long valuemask, XGCValues *values)
}
declare 84 macosx {
- int XClearWindow(Display *d, Window w)
+ int XFreeGC(Display *display, GC gc)
}
declare 85 macosx {
- int XDrawPoint(Display *display, Drawable d, GC gc, int x, int y)
+ Atom XInternAtom(Display *display, _Xconst char *atom_name,
+ Bool only_if_exists)
}
declare 86 macosx {
- int XDrawPoints(Display *display, Drawable d, GC gc, XPoint *points,
- int npoints, int mode)
+ int XSetBackground(Display *display, GC gc, unsigned long foreground)
}
declare 87 macosx {
- int XWarpPointer(Display *display, Window src_w, Window dest_w,
- int src_x, int src_y, unsigned int src_width,
- unsigned int src_height, int dest_x, int dest_y)
+ int XSetForeground(Display *display, GC gc, unsigned long foreground)
}
declare 88 macosx {
- int XQueryColor(Display *display, Colormap colormap, XColor *def_in_out)
+ int XSetClipMask(Display *display, GC gc, Pixmap pixmap)
}
declare 89 macosx {
- int XQueryColors(Display *display, Colormap colormap,
- XColor *defs_in_out, int ncolors)
+ int XSetClipOrigin(Display *display, GC gc,
+ int clip_x_origin, int clip_y_origin)
}
declare 90 macosx {
- Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3,
- Window **w4, unsigned int *ui)
+ int XSetTSOrigin(Display *display, GC gc,
+ int ts_x_origin, int ts_y_origin)
}
declare 91 macosx {
- int XSync(Display *display, Bool discard)
+ int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values)
}
declare 92 macosx {
- Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1,
- int i2, int *i3, int *i4, Window *w3)
+ int XSetFont(Display *display, GC gc, Font font)
}
declare 93 macosx {
- int XDeleteProperty(Display *d, Window w, Atom a)
+ int XSetArcMode(Display *display, GC gc, int arc_mode)
}
declare 94 macosx {
- int XFreeCursor(Display *d, Cursor c)
+ int XSetStipple(Display *display, GC gc, Pixmap stipple)
}
declare 95 macosx {
- int XGetInputFocus(Display *d, Window *w, int *i)
+ int XSetFillRule(Display *display, GC gc, int fill_rule)
}
declare 96 macosx {
- int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i,
- KeySym *k, Status *s)
+ int XSetFillStyle(Display *display, GC gc, int fill_style)
}
declare 97 macosx {
- int XNextEvent(Display *d, XEvent *x)
+ int XSetFunction(Display *display, GC gc, int function)
}
declare 98 macosx {
- int XPutBackEvent(Display *d, XEvent *x)
+ int XSetLineAttributes(Display *display, GC gc, unsigned int line_width,
+ int line_style, int cap_style, int join_style)
}
declare 99 macosx {
- int XSetCommand(Display *d, Window w, char **c, int i)
+ int _XInitImageFuncPtrs(XImage *image)
}
declare 100 macosx {
- int XWindowEvent(Display *d, Window w, long l, XEvent *x)
+ XIC XCreateIC(XIM xim, ...)
}
declare 101 macosx {
- Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x)
+ XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask,
+ XVisualInfo *vinfo_template, int *nitems_return)
}
declare 102 macosx {
- Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip)
+ void XSetWMClientMachine(Display *display, Window w,
+ XTextProperty *text_prop)
}
declare 103 macosx {
- Status XIconifyWindow(Display *d, Window w, int i)
+ Status XStringListToTextProperty(char **list, int count,
+ XTextProperty *text_prop_return)
}
declare 104 macosx {
- Status XWithdrawWindow(Display *d, Window w, int i)
+ int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1,
+ int x2, int y2)
}
declare 105 macosx {
- XHostAddress *XListHosts(Display *d, int *i, Bool *b)
+ int XWarpPointer(Display *d, Window s, Window dw, int sx, int sy,
+ unsigned int sw, unsigned int sh, int dx, int dy)
}
declare 106 macosx {
- int XSetClipRectangles(Display *display, GC gc, int clip_x_origin,
- int clip_y_origin, XRectangle rectangles[], int n, int ordering)
+ int XFillRectangle(Display *display, Drawable d, GC gc,
+ int x, int y, unsigned int width, unsigned int height)
}
+
+# New in Tk 8.6
declare 107 macosx {
int XFlush(Display *display)
}
@@ -1955,18 +1861,21 @@ declare 112 macosx {
XAfterFunction XSynchronize(Display *display, Bool onoff)
}
declare 113 macosx {
- Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2,
- XColor *x1, XColor *x2)
+ int XSync(Display *display, Bool discard)
}
declare 114 macosx {
VisualID XVisualIDFromVisual(Visual *visual)
}
+
+# For tktreectrl
declare 120 macosx {
int XOffsetRegion(Region rgn, int dx, int dy)
}
declare 121 macosx {
int XUnionRegion(Region srca, Region srcb, Region dr_return)
}
+
+# For 3dcanvas
declare 122 macosx {
Window XCreateWindow(Display *display, Window parent, int x, int y,
unsigned int width, unsigned int height,
@@ -1974,6 +1883,8 @@ declare 122 macosx {
Visual *visual, unsigned long value_mask,
XSetWindowAttributes *attributes)
}
+
+# Various, e.g. for stub-enabled BLT
declare 129 macosx {
int XLowerWindow(Display *d, Window w)
}
@@ -1986,6 +1897,15 @@ declare 131 macosx {
declare 132 macosx {
int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n)
}
+declare 133 macosx {
+ int XDrawSegments(Display *d, Drawable dr, GC gc, XSegment *s, int n)
+}
+declare 134 macosx {
+ int XDrawPoint(Display *d, Drawable dr, GC gc, int x, int y)
+}
+declare 135 macosx {
+ int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m)
+}
declare 136 macosx {
int XReparentWindow(Display *d, Window w, Window p, int x, int y)
}
@@ -2000,6 +1920,7 @@ declare 138 macosx {
declare 139 macosx {
int XPointInRegion(Region rgn, int x, int y)
}
+# For XIM
declare 140 macosx {
XVaNestedList XVaCreateNestedList(int dummy, ...)
}
@@ -2012,18 +1933,6 @@ declare 142 macosx {
declare 143 macosx {
void XSetICFocus(XIC xic)
}
-declare 144 macosx {
- void XDestroyIC(XIC xic)
-}
-declare 145 macosx {
- Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,
- XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2)
-}
-declare 146 macosx {
- Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2,
- unsigned int ui1, unsigned int ui2, XColor _Xconst *x1,
- XColor _Xconst *x2)
-}
declare 147 macosx {
void XFreeFontSet(Display *display, XFontSet fontset)
}
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 30361d9..83e754e 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -75,14 +75,6 @@
# endif
#endif
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7)
-# define Tcl_WCharToUtfDString ((char * (*)(const WCHAR *, int len, Tcl_DString *))Tcl_UniCharToUtfDString)
-# define Tcl_UtfToWCharDString ((WCHAR * (*)(const char *, int len, Tcl_DString *))Tcl_UtfToUniCharDString)
-# define Tcl_Char16ToUtfDString Tcl_UniCharToUtfDString
-# define Tcl_UtfToChar16DString Tcl_UtfToUniCharDString
-# define TCL_COMBINE 0
-#endif
-
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
# define TKFLEXARRAY
#elif defined(__GNUC__) && (__GNUC__ > 2)
@@ -91,10 +83,6 @@
# define TKFLEXARRAY 1
#endif
-#if !defined(Tcl_GetParent) && (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7)
-# define Tcl_GetParent Tcl_GetMaster
-#endif
-
/*
* Macros used to cast between pointers and integers (e.g. when storing an int
* in ClientData), on 64-bit architectures they avoid gcc warning about "cast
@@ -557,21 +545,6 @@ typedef struct TkDisplay {
* the display when we no longer have any Tk
* applications using it. */
- /*
- * The following field were all added for Tk8.3
- */
-
-#if TCL_MAJOR_VERSION < 9
-#if !defined(TK_NO_DEPRECATED)
- int mouseButtonState; /* Current mouse button state for this
- * display. NOT USED as of 8.6.10 */
- Window mouseButtonWindow; /* Window the button state was set in, added
- * in Tk 8.4. */
-#else
- int notused1;
- XID notused2;
-#endif /* !TK_NO_DEPRECATED */
-#endif
Tk_Window warpWindow;
Tk_Window warpMainwin; /* For finding the root window for warping
* purposes. */
@@ -966,18 +939,6 @@ typedef struct {
#define TK_MAKE_MENU_POPUP 1
#define TK_MAKE_MENU_DROPDOWN 2
-/* See TIP #494 */
-#ifndef TCL_IO_FAILURE
-# define TCL_IO_FAILURE (-1)
-#endif
-/* See TIP #537 */
-#ifndef TCL_INDEX_NONE
-# define TCL_INDEX_NONE (-1)
-#endif
-#ifndef TCL_INDEX_END
-# define TCL_INDEX_END ((Tcl_Size)-2)
-#endif
-
/*
* The following structure is used with TkMakeEnsemble to create ensemble
* commands and optionally to create sub-ensembles.
@@ -1200,11 +1161,7 @@ MODULE_SCOPE void Ttk_TkDestroyedHandler(Tcl_Interp *interp);
MODULE_SCOPE Tcl_ObjCmdProc Tk_BellObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc Tk_BindObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc Tk_BindtagsObjCmd;
-#if TCL_MAJOR_VERSION > 8
- MODULE_SCOPE Tcl_ObjCmdProc2 Tk_BusyObjCmd;
-#else
- MODULE_SCOPE Tcl_ObjCmdProc Tk_BusyObjCmd;
-#endif
+MODULE_SCOPE Tcl_ObjCmdProc2 Tk_BusyObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc Tk_ButtonObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc Tk_CanvasObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc Tk_CheckbuttonObjCmd;
@@ -1325,21 +1282,13 @@ MODULE_SCOPE void TkInitEmbeddedConfigurationInformation(
Tcl_Interp *interp);
MODULE_SCOPE void TkDoWarpWrtWin(TkDisplay *dispPtr);
MODULE_SCOPE void TkpWarpPointer(TkDisplay *dispPtr);
-MODULE_SCOPE int TkListCreateFrame(void *clientData,
- Tcl_Interp *interp, Tcl_Obj *listObj,
- int toplevel, Tcl_Obj *nameObj);
MODULE_SCOPE void TkRotatePoint(double originX, double originY,
double sine, double cosine, double *xPtr,
double *yPtr);
MODULE_SCOPE int TkGetIntForIndex(Tcl_Obj *, Tcl_Size, int lastOK, Tcl_Size*);
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
-# define TkNewIndexObj(value) Tcl_NewWideIntObj((Tcl_WideInt)(value + 1) - 1)
-# define TK_OPTION_UNDERLINE_DEF(type, field) "-1", TCL_INDEX_NONE, offsetof(type, field), 0, NULL
-#else
-# define TkNewIndexObj(value) (((Tcl_Size)(value) == TCL_INDEX_NONE) ? Tcl_NewObj() : Tcl_NewWideIntObj((Tcl_WideInt)(value)))
-# define TK_OPTION_UNDERLINE_DEF(type, field) NULL, TCL_INDEX_NONE, offsetof(type, field), TK_OPTION_NULL_OK, NULL
-#endif
+#define TkNewIndexObj(value) (((Tcl_Size)(value) == TCL_INDEX_NONE) ? Tcl_NewObj() : Tcl_NewWideIntObj((Tcl_WideInt)(value)))
+#define TK_OPTION_UNDERLINE_DEF(type, field) NULL, TCL_INDEX_NONE, offsetof(type, field), TK_OPTION_NULL_OK, NULL
#ifdef _WIN32
@@ -1381,15 +1330,6 @@ MODULE_SCOPE void TkpCopyRegion(TkRegion dst, TkRegion src);
# define c_class class
#endif
-/* Tcl 8.6 has a different definition of Tcl_UniChar than other Tcl versions for TCL_UTF_MAX > 3 */
-#if TCL_UTF_MAX > (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6))
-# define TkUtfToUniChar(src, ch) (size_t)(((int (*)(const char *, int *))Tcl_UtfToUniChar)(src, ch))
-# define TkUniCharToUtf(ch, src) (size_t)(((int (*)(int, char *))Tcl_UniCharToUtf)(ch, src))
-#else
- MODULE_SCOPE size_t TkUtfToUniChar(const char *, int *);
- MODULE_SCOPE size_t TkUniCharToUtf(int, char *);
-#endif
-
#if defined(_WIN32) && !defined(STATIC_BUILD) && TCL_MAJOR_VERSION < 9
# define tcl_CreateFileHandler reserved9
#endif
@@ -1406,7 +1346,6 @@ MODULE_SCOPE Tcl_ObjCmdProc TkUnsupported1ObjCmd;
* For Tktest.
*/
MODULE_SCOPE Tcl_ObjCmdProc SquareObjCmd;
-MODULE_SCOPE int TkOldTestInit(Tcl_Interp *interp);
#if !(defined(_WIN32) || defined(MAC_OSX_TK))
#define TkplatformtestInit(x) TCL_OK
#else
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index b4eea9e..42c679f 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -80,8 +80,8 @@ EXTERN TkCursor * TkCreateCursorFromData(Tk_Window tkwin,
XColor fg, XColor bg);
/* 13 */
EXTERN int TkCreateFrame(void *clientData, Tcl_Interp *interp,
- int argc, const char *const *argv,
- int toplevel, const char *appName);
+ Tcl_Size objc, Tcl_Obj *const objv[],
+ int type, const char *appName);
/* 14 */
EXTERN Tk_Window TkCreateMainWindow(Tcl_Interp *interp,
const char *screenName, const char *baseName);
@@ -202,9 +202,7 @@ EXTERN void TkpClaimFocus(TkWindow *topLevelPtr, int force);
EXTERN void TkpDisplayWarning(const char *msg, const char *title);
/* 59 */
EXTERN void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name);
-/* 60 */
-TK_DEPRECATED("renamed to Tk_GetOtherWindow")
-TkWindow * TkpGetOtherWindow(TkWindow *winPtr);
+/* Slot 60 is reserved */
/* 61 */
EXTERN TkWindow * TkpGetWrapperWindow(TkWindow *winPtr);
/* 62 */
@@ -212,14 +210,10 @@ EXTERN int TkpInit(Tcl_Interp *interp);
/* 63 */
EXTERN void TkpInitializeMenuBindings(Tcl_Interp *interp,
Tk_BindingTable bindingTable);
-/* 64 */
-TK_DEPRECATED("renamed to Tk_MakeContainer")
-void TkpMakeContainer(Tk_Window tkwin);
+/* Slot 64 is reserved */
/* 65 */
EXTERN void TkpMakeMenuWindow(Tk_Window tkwin, int transient);
-/* 66 */
-TK_DEPRECATED("renamed to Tk_MakeWindow")
-Window TkpMakeWindow(TkWindow *winPtr, Window parent);
+/* Slot 66 is reserved */
/* 67 */
EXTERN void TkpMenuNotifyToplevelCreate(Tcl_Interp *interp,
const char *menuName);
@@ -238,14 +232,8 @@ EXTERN int TkPositionInTree(TkWindow *winPtr, TkWindow *treePtr);
/* 73 */
EXTERN void TkpRedirectKeyEvent(TkWindow *winPtr,
XEvent *eventPtr);
-/* 74 */
-TK_DEPRECATED("renamed to Tk_SetMainMenubar")
-void TkpSetMainMenubar(Tcl_Interp *interp,
- Tk_Window tkwin, const char *menuName);
-/* 75 */
-TK_DEPRECATED("renamed to Tk_UseWindow")
-int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin,
- const char *string);
+/* Slot 74 is reserved */
+/* Slot 75 is reserved */
/* Slot 76 is reserved */
/* 77 */
EXTERN void TkQueueEventForAllChildren(TkWindow *winPtr,
@@ -270,11 +258,7 @@ EXTERN void TkSelInit(Tk_Window tkwin);
/* 83 */
EXTERN void TkSelPropProc(XEvent *eventPtr);
/* Slot 84 is reserved */
-/* 85 */
-TK_DEPRECATED("renamed to Tk_SetWindowMenubar")
-void TkSetWindowMenuBar(Tcl_Interp *interp,
- Tk_Window tkwin, const char *oldMenuName,
- const char *menuName);
+/* Slot 85 is reserved */
/* 86 */
EXTERN KeySym TkStringToKeysym(const char *name);
/* 87 */
@@ -335,10 +319,7 @@ EXTERN const char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr,
Tcl_DString *dsPtr);
/* 110 */
EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont);
-/* 111 */
-TK_DEPRECATED("renamed to Tk_GetSystemDefault")
-Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin,
- const char *dbName, const char *className);
+/* Slot 111 is reserved */
/* 112 */
EXTERN void TkpMenuThreadInit(void);
/* 113 */
@@ -359,21 +340,15 @@ EXTERN int XSetRegion(Display *display, GC gc, Region rgn);
EXTERN int XUnionRectWithRegion(XRectangle *rect, Region src,
Region dr_return);
/* Slot 120 is reserved */
-#ifdef MAC_OSX_TK /* AQUA */
/* 121 */
EXTERN Pixmap TkpCreateNativeBitmap(Display *display,
const void *source);
-#endif /* AQUA */
-#ifdef MAC_OSX_TK /* AQUA */
/* 122 */
EXTERN void TkpDefineNativeBitmaps(void);
-#endif /* AQUA */
/* Slot 123 is reserved */
-#ifdef MAC_OSX_TK /* AQUA */
/* 124 */
EXTERN Pixmap TkpGetNativeAppBitmap(Display *display,
const char *name, int *width, int *height);
-#endif /* AQUA */
/* Slot 125 is reserved */
/* Slot 126 is reserved */
/* Slot 127 is reserved */
@@ -384,11 +359,7 @@ EXTERN Pixmap TkpGetNativeAppBitmap(Display *display,
/* Slot 132 is reserved */
/* Slot 133 is reserved */
/* Slot 134 is reserved */
-/* 135 */
-TK_DEPRECATED("renamed to Tk_DrawHighlightBorder")
-void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC,
- GC bgGC, int highlightWidth,
- Drawable drawable);
+/* Slot 135 is reserved */
/* 136 */
EXTERN void TkSetFocusWin(TkWindow *winPtr, int force);
/* 137 */
@@ -591,7 +562,7 @@ typedef struct TkIntStubs {
void (*reserved10)(void);
void (*reserved11)(void);
TkCursor * (*tkCreateCursorFromData) (Tk_Window tkwin, const char *source, const char *mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg); /* 12 */
- int (*tkCreateFrame) (void *clientData, Tcl_Interp *interp, int argc, const char *const *argv, int toplevel, const char *appName); /* 13 */
+ int (*tkCreateFrame) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], int type, const char *appName); /* 13 */
Tk_Window (*tkCreateMainWindow) (Tcl_Interp *interp, const char *screenName, const char *baseName); /* 14 */
Time (*tkCurrentTime) (TkDisplay *dispPtr); /* 15 */
void (*tkDeleteAllImages) (TkMainInfo *mainPtr); /* 16 */
@@ -638,13 +609,13 @@ typedef struct TkIntStubs {
void (*tkpClaimFocus) (TkWindow *topLevelPtr, int force); /* 57 */
void (*tkpDisplayWarning) (const char *msg, const char *title); /* 58 */
void (*tkpGetAppName) (Tcl_Interp *interp, Tcl_DString *name); /* 59 */
- TCL_DEPRECATED_API("renamed to Tk_GetOtherWindow") TkWindow * (*tkpGetOtherWindow) (TkWindow *winPtr); /* 60 */
+ void (*reserved60)(void);
TkWindow * (*tkpGetWrapperWindow) (TkWindow *winPtr); /* 61 */
int (*tkpInit) (Tcl_Interp *interp); /* 62 */
void (*tkpInitializeMenuBindings) (Tcl_Interp *interp, Tk_BindingTable bindingTable); /* 63 */
- TCL_DEPRECATED_API("renamed to Tk_MakeContainer") void (*tkpMakeContainer) (Tk_Window tkwin); /* 64 */
+ void (*reserved64)(void);
void (*tkpMakeMenuWindow) (Tk_Window tkwin, int transient); /* 65 */
- TCL_DEPRECATED_API("renamed to Tk_MakeWindow") Window (*tkpMakeWindow) (TkWindow *winPtr, Window parent); /* 66 */
+ void (*reserved66)(void);
void (*tkpMenuNotifyToplevelCreate) (Tcl_Interp *interp, const char *menuName); /* 67 */
TkDisplay * (*tkpOpenDisplay) (const char *display_name); /* 68 */
int (*tkPointerEvent) (XEvent *eventPtr, TkWindow *winPtr); /* 69 */
@@ -652,8 +623,8 @@ typedef struct TkIntStubs {
double (*tkPolygonToPoint) (double *polyPtr, int numPoints, double *pointPtr); /* 71 */
int (*tkPositionInTree) (TkWindow *winPtr, TkWindow *treePtr); /* 72 */
void (*tkpRedirectKeyEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 73 */
- TCL_DEPRECATED_API("renamed to Tk_SetMainMenubar") void (*tkpSetMainMenubar) (Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 74 */
- TCL_DEPRECATED_API("renamed to Tk_UseWindow") int (*tkpUseWindow) (Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* 75 */
+ void (*reserved74)(void);
+ void (*reserved75)(void);
void (*reserved76)(void);
void (*tkQueueEventForAllChildren) (TkWindow *winPtr, XEvent *eventPtr); /* 77 */
int (*tkReadBitmapFile) (Display *display, Drawable d, const char *filename, unsigned int *width_return, unsigned int *height_return, Pixmap *bitmap_return, int *x_hot_return, int *y_hot_return); /* 78 */
@@ -663,7 +634,7 @@ typedef struct TkIntStubs {
void (*tkSelInit) (Tk_Window tkwin); /* 82 */
void (*tkSelPropProc) (XEvent *eventPtr); /* 83 */
void (*reserved84)(void);
- TCL_DEPRECATED_API("renamed to Tk_SetWindowMenubar") void (*tkSetWindowMenuBar) (Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 85 */
+ void (*reserved85)(void);
KeySym (*tkStringToKeysym) (const char *name); /* 86 */
int (*tkThickPolyLineToArea) (double *coordPtr, int numPoints, double width, int capStyle, int joinStyle, double *rectPtr); /* 87 */
void (*tkWmAddToColormapWindows) (TkWindow *winPtr); /* 88 */
@@ -689,7 +660,7 @@ typedef struct TkIntStubs {
int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */
const char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */
void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */
- TCL_DEPRECATED_API("renamed to Tk_GetSystemDefault") Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */
+ void (*reserved111)(void);
void (*tkpMenuThreadInit) (void); /* 112 */
int (*xClipBox) (Region rgn, XRectangle *rect_return); /* 113 */
Region (*xCreateRegion) (void); /* 114 */
@@ -699,37 +670,10 @@ typedef struct TkIntStubs {
int (*xSetRegion) (Display *display, GC gc, Region rgn); /* 118 */
int (*xUnionRectWithRegion) (XRectangle *rect, Region src, Region dr_return); /* 119 */
void (*reserved120)(void);
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
- void (*reserved121)(void);
-#endif /* X11 */
-#if defined(_WIN32) /* WIN */
- void (*reserved121)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- void (*reserved121)(void); /* Dummy entry for stubs table backwards compatibility */
Pixmap (*tkpCreateNativeBitmap) (Display *display, const void *source); /* 121 */
-#endif /* AQUA */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
- void (*reserved122)(void);
-#endif /* X11 */
-#if defined(_WIN32) /* WIN */
- void (*reserved122)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- void (*reserved122)(void); /* Dummy entry for stubs table backwards compatibility */
void (*tkpDefineNativeBitmaps) (void); /* 122 */
-#endif /* AQUA */
void (*reserved123)(void);
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
- void (*reserved124)(void);
-#endif /* X11 */
-#if defined(_WIN32) /* WIN */
- void (*reserved124)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- void (*reserved124)(void); /* Dummy entry for stubs table backwards compatibility */
Pixmap (*tkpGetNativeAppBitmap) (Display *display, const char *name, int *width, int *height); /* 124 */
-#endif /* AQUA */
void (*reserved125)(void);
void (*reserved126)(void);
void (*reserved127)(void);
@@ -740,7 +684,7 @@ typedef struct TkIntStubs {
void (*reserved132)(void);
void (*reserved133)(void);
void (*reserved134)(void);
- TCL_DEPRECATED_API("renamed to Tk_DrawHighlightBorder") void (*tkpDrawHighlightBorder) (Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable); /* 135 */
+ void (*reserved135)(void);
void (*tkSetFocusWin) (TkWindow *winPtr, int force); /* 136 */
void (*tkpSetKeycodeAndState) (Tk_Window tkwin, KeySym keySym, XEvent *eventPtr); /* 137 */
KeySym (*tkpGetKeySym) (TkDisplay *dispPtr, XEvent *eventPtr); /* 138 */
@@ -924,20 +868,17 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkpDisplayWarning) /* 58 */
#define TkpGetAppName \
(tkIntStubsPtr->tkpGetAppName) /* 59 */
-#define TkpGetOtherWindow \
- (tkIntStubsPtr->tkpGetOtherWindow) /* 60 */
+/* Slot 60 is reserved */
#define TkpGetWrapperWindow \
(tkIntStubsPtr->tkpGetWrapperWindow) /* 61 */
#define TkpInit \
(tkIntStubsPtr->tkpInit) /* 62 */
#define TkpInitializeMenuBindings \
(tkIntStubsPtr->tkpInitializeMenuBindings) /* 63 */
-#define TkpMakeContainer \
- (tkIntStubsPtr->tkpMakeContainer) /* 64 */
+/* Slot 64 is reserved */
#define TkpMakeMenuWindow \
(tkIntStubsPtr->tkpMakeMenuWindow) /* 65 */
-#define TkpMakeWindow \
- (tkIntStubsPtr->tkpMakeWindow) /* 66 */
+/* Slot 66 is reserved */
#define TkpMenuNotifyToplevelCreate \
(tkIntStubsPtr->tkpMenuNotifyToplevelCreate) /* 67 */
#define TkpOpenDisplay \
@@ -952,10 +893,8 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkPositionInTree) /* 72 */
#define TkpRedirectKeyEvent \
(tkIntStubsPtr->tkpRedirectKeyEvent) /* 73 */
-#define TkpSetMainMenubar \
- (tkIntStubsPtr->tkpSetMainMenubar) /* 74 */
-#define TkpUseWindow \
- (tkIntStubsPtr->tkpUseWindow) /* 75 */
+/* Slot 74 is reserved */
+/* Slot 75 is reserved */
/* Slot 76 is reserved */
#define TkQueueEventForAllChildren \
(tkIntStubsPtr->tkQueueEventForAllChildren) /* 77 */
@@ -972,8 +911,7 @@ extern const TkIntStubs *tkIntStubsPtr;
#define TkSelPropProc \
(tkIntStubsPtr->tkSelPropProc) /* 83 */
/* Slot 84 is reserved */
-#define TkSetWindowMenuBar \
- (tkIntStubsPtr->tkSetWindowMenuBar) /* 85 */
+/* Slot 85 is reserved */
#define TkStringToKeysym \
(tkIntStubsPtr->tkStringToKeysym) /* 86 */
#define TkThickPolyLineToArea \
@@ -1024,8 +962,7 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkpGetString) /* 109 */
#define TkpGetSubFonts \
(tkIntStubsPtr->tkpGetSubFonts) /* 110 */
-#define TkpGetSystemDefault \
- (tkIntStubsPtr->tkpGetSystemDefault) /* 111 */
+/* Slot 111 is reserved */
#define TkpMenuThreadInit \
(tkIntStubsPtr->tkpMenuThreadInit) /* 112 */
#define XClipBox \
@@ -1043,19 +980,13 @@ extern const TkIntStubs *tkIntStubsPtr;
#define XUnionRectWithRegion \
(tkIntStubsPtr->xUnionRectWithRegion) /* 119 */
/* Slot 120 is reserved */
-#ifdef MAC_OSX_TK /* AQUA */
#define TkpCreateNativeBitmap \
(tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */
-#endif /* AQUA */
-#ifdef MAC_OSX_TK /* AQUA */
#define TkpDefineNativeBitmaps \
(tkIntStubsPtr->tkpDefineNativeBitmaps) /* 122 */
-#endif /* AQUA */
/* Slot 123 is reserved */
-#ifdef MAC_OSX_TK /* AQUA */
#define TkpGetNativeAppBitmap \
(tkIntStubsPtr->tkpGetNativeAppBitmap) /* 124 */
-#endif /* AQUA */
/* Slot 125 is reserved */
/* Slot 126 is reserved */
/* Slot 127 is reserved */
@@ -1066,8 +997,7 @@ extern const TkIntStubs *tkIntStubsPtr;
/* Slot 132 is reserved */
/* Slot 133 is reserved */
/* Slot 134 is reserved */
-#define TkpDrawHighlightBorder \
- (tkIntStubsPtr->tkpDrawHighlightBorder) /* 135 */
+/* Slot 135 is reserved */
#define TkSetFocusWin \
(tkIntStubsPtr->tkSetFocusWin) /* 136 */
#define TkpSetKeycodeAndState \
@@ -1179,39 +1109,17 @@ extern const TkIntStubs *tkIntStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
-#undef TkpCmapStressed_
-#undef TkpSync_
-#undef TkUnixContainerId_
-#undef TkUnixDoOneXEvent_
-#undef TkUnixSetMenubar_
-#undef TkWmCleanup_
-#undef TkSendCleanup_
-#undef TkpTestsendCmd_
-#undef TkSetWindowMenuBar
-#undef TkpDrawHighlightBorder
-#undef TkpUseWindow
-#undef TkpSetMainMenubar
-#undef TkpGetOtherWindow
-#undef TkpGetSystemDefault
-#undef TkpMakeContainer
-#undef TkpMakeWindow
-
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION == 8)
-# define TkSetWindowMenuBar Tk_SetWindowMenubar
-# define TkpDrawHighlightBorder Tk_DrawHighlightBorder
-# define TkpUseWindow Tk_UseWindow
-# define TkpSetMainMenubar Tk_SetMainMenubar
-# define TkpGetOtherWindow ((TkWindow *(*)(TkWindow *))(void *)Tk_GetOtherWindow)
-# define TkpGetSystemDefault Tk_GetSystemDefault
-# define TkpMakeContainer Tk_MakeContainer
-# define TkpMakeWindow ((Window (*)(TkWindow *, Window))(void *)Tk_MakeWindow)
-#endif
-
#if !defined(MAC_OSX_TK) && !defined(USE_TK_STUBS)
# undef TkpWillDrawWidget
# undef TkpRedrawWidget
+# undef TkpDefineNativeBitmaps
+# undef TkpCreateNativeBitmap
+# undef TkpGetNativeAppBitmap
# define TkpWillDrawWidget(w) 0
# define TkpRedrawWidget(w)
+# define TkpDefineNativeBitmaps()
+# define TkpCreateNativeBitmap(display, source) None
+# define TkpGetNativeAppBitmap(display, name, w, h) None
#endif
#endif /* _TKINTDECLS */
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index c3164da..a684b21 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -36,8 +36,7 @@ extern "C" {
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
/* 0 */
-EXTERN char * TkAlignImageData(XImage *image, int alignment,
- int bitOrder);
+EXTERN void TkCreateXEventSource(void);
/* Slot 1 is reserved */
/* 2 */
EXTERN void TkGenerateActivateEvents(TkWindow *winPtr,
@@ -114,7 +113,8 @@ EXTERN void TkWinDialogDebug(int debug);
EXTERN Tcl_Obj * TkWinGetMenuSystemDefault(Tk_Window tkwin,
const char *dbName, const char *className);
/* 33 */
-EXTERN int TkWinGetPlatformId(void);
+EXTERN char * TkAlignImageData(XImage *image, int alignment,
+ int bitOrder);
/* 34 */
EXTERN void TkWinSetHINSTANCE(HINSTANCE hInstance);
/* 35 */
@@ -122,8 +122,7 @@ EXTERN int TkWinGetPlatformTheme(void);
/* 36 */
EXTERN LRESULT __stdcall TkWinChildProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam);
-/* 37 */
-EXTERN void TkCreateXEventSource(void);
+/* Slot 37 is reserved */
/* 38 */
EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap);
/* 39 */
@@ -146,30 +145,31 @@ EXTERN int TkpTestsendCmd(void *clientData, Tcl_Interp *interp,
EXTERN Tk_Window TkpGetCapture(void);
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
-/* 0 */
-EXTERN void TkGenerateActivateEvents(TkWindow *winPtr,
- int active);
-/* Slot 1 is reserved */
+/* Slot 0 is reserved */
+/* 1 */
+EXTERN void TkAboutDlg(void);
/* 2 */
-EXTERN void TkGenerateActivateEvents_(TkWindow *winPtr,
+EXTERN void TkGenerateActivateEvents(TkWindow *winPtr,
int active);
/* 3 */
-EXTERN void TkPointerDeadWindow(TkWindow *winPtr);
+EXTERN unsigned long TkpGetMS(void);
/* 4 */
-EXTERN void TkpSetCapture(TkWindow *winPtr);
+EXTERN void TkPointerDeadWindow(TkWindow *winPtr);
/* 5 */
EXTERN void TkpSetCursor(TkpCursor cursor);
/* 6 */
-EXTERN void TkpWmSetState(TkWindow *winPtr, int state);
+EXTERN int TkpScanWindowId(Tcl_Interp *interp,
+ const char *string, Window *idPtr);
/* 7 */
-EXTERN void TkAboutDlg(void);
+EXTERN int TkpWmSetState(TkWindow *winPtr, int state);
/* 8 */
EXTERN unsigned int TkMacOSXButtonKeyState(void);
/* 9 */
EXTERN void TkMacOSXClearMenubarActive(void);
/* 10 */
EXTERN int TkMacOSXDispatchMenuEvent(int menuID, int index);
-/* Slot 11 is reserved */
+/* 11 */
+EXTERN void TkpSetCapture(TkWindow *winPtr);
/* 12 */
EXTERN void TkMacOSXHandleTearoffMenu(void);
/* Slot 13 is reserved */
@@ -188,9 +188,7 @@ EXTERN void TkMacOSXHandleMenuSelect(short theMenu,
/* 21 */
EXTERN void TkMacOSXInvalidateWindow(MacDrawable *macWin,
int flag);
-/* 22 */
-EXTERN int TkMacOSXIsCharacterMissing(Tk_Font tkfont,
- unsigned int searchChar);
+/* Slot 22 is reserved */
/* 23 */
EXTERN void TkMacOSXMakeRealWindowExist(TkWindow *winPtr);
/* 24 */
@@ -204,8 +202,7 @@ EXTERN int TkMacOSXResizable(TkWindow *winPtr);
EXTERN void TkMacOSXSetHelpMenuItemCount(void);
/* 29 */
EXTERN void TkMacOSXSetScrollbarGrow(TkWindow *winPtr, int flag);
-/* 30 */
-EXTERN void TkMacOSXSetUpClippingRgn(Drawable drawable);
+/* Slot 30 is reserved */
/* 31 */
EXTERN void TkMacOSXSetUpGraphicsPort(GC gc, void *destPort);
/* 32 */
@@ -251,13 +248,6 @@ EXTERN int TkGenerateButtonEvent(int x, int y, Window window,
EXTERN void TkGenWMDestroyEvent(Tk_Window tkwin);
/* 52 */
EXTERN void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag);
-/* 53 */
-EXTERN unsigned long TkpGetMS(void);
-/* 54 */
-EXTERN void * TkMacOSXDrawable(Drawable drawable);
-/* 55 */
-EXTERN int TkpScanWindowId(Tcl_Interp *interp,
- const char *string, Window *idPtr);
#endif /* AQUA */
#if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
/* 0 */
@@ -266,29 +256,20 @@ EXTERN void TkCreateXEventSource(void);
/* 2 */
EXTERN void TkGenerateActivateEvents(TkWindow *winPtr,
int active);
-/* 3 */
-EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap);
-/* 4 */
-EXTERN void TkpSync(Display *display);
-/* 5 */
-EXTERN Window TkUnixContainerId(TkWindow *winPtr);
+/* Slot 3 is reserved */
+/* Slot 4 is reserved */
+/* Slot 5 is reserved */
/* 6 */
-EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr);
-/* 7 */
-EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar);
-/* 8 */
EXTERN int TkpScanWindowId(Tcl_Interp *interp,
const char *string, Window *idPtr);
+/* Slot 7 is reserved */
+/* Slot 8 is reserved */
/* 9 */
-EXTERN void TkWmCleanup(TkDisplay *dispPtr);
-/* 10 */
-EXTERN void TkSendCleanup(TkDisplay *dispPtr);
-/* Slot 11 is reserved */
-/* 12 */
EXTERN int TkpWmSetState(TkWindow *winPtr, int state);
-/* 13 */
-EXTERN int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp,
- Tcl_Size objc, Tcl_Obj *const objv[]);
+/* Slot 10 is reserved */
+/* Slot 11 is reserved */
+/* Slot 12 is reserved */
+/* Slot 13 is reserved */
/* Slot 14 is reserved */
/* Slot 15 is reserved */
/* Slot 16 is reserved */
@@ -314,19 +295,19 @@ EXTERN int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp,
/* Slot 36 is reserved */
/* Slot 37 is reserved */
/* 38 */
-EXTERN int TkpCmapStressed_(Tk_Window tkwin, Colormap colormap);
+EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap);
/* 39 */
-EXTERN void TkpSync_(Display *display);
+EXTERN void TkpSync(Display *display);
/* 40 */
-EXTERN Window TkUnixContainerId_(TkWindow *winPtr);
+EXTERN Window TkUnixContainerId(TkWindow *winPtr);
/* 41 */
-EXTERN int TkUnixDoOneXEvent_(Tcl_Time *timePtr);
+EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr);
/* 42 */
-EXTERN void TkUnixSetMenubar_(Tk_Window tkwin, Tk_Window menubar);
+EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar);
/* 43 */
-EXTERN void TkWmCleanup_(TkDisplay *dispPtr);
+EXTERN void TkWmCleanup(TkDisplay *dispPtr);
/* 44 */
-EXTERN void TkSendCleanup_(TkDisplay *dispPtr);
+EXTERN void TkSendCleanup(TkDisplay *dispPtr);
/* 45 */
EXTERN int TkpTestsendCmd(void *clientData, Tcl_Interp *interp,
Tcl_Size objc, Tcl_Obj *const objv[]);
@@ -337,7 +318,7 @@ typedef struct TkIntPlatStubs {
void *hooks;
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
- char * (*tkAlignImageData) (XImage *image, int alignment, int bitOrder); /* 0 */
+ void (*tkCreateXEventSource) (void); /* 0 */
void (*reserved1)(void);
void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */
unsigned long (*tkpGetMS) (void); /* 3 */
@@ -370,11 +351,11 @@ typedef struct TkIntPlatStubs {
void (*tkWinSetForegroundWindow) (TkWindow *winPtr); /* 30 */
void (*tkWinDialogDebug) (int debug); /* 31 */
Tcl_Obj * (*tkWinGetMenuSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 32 */
- int (*tkWinGetPlatformId) (void); /* 33 */
+ char * (*tkAlignImageData) (XImage *image, int alignment, int bitOrder); /* 33 */
void (*tkWinSetHINSTANCE) (HINSTANCE hInstance); /* 34 */
int (*tkWinGetPlatformTheme) (void); /* 35 */
LRESULT (__stdcall *tkWinChildProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* 36 */
- void (*tkCreateXEventSource) (void); /* 37 */
+ void (*reserved37)(void);
int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */
void (*tkpSync) (Display *display); /* 39 */
Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */
@@ -387,18 +368,18 @@ typedef struct TkIntPlatStubs {
Tk_Window (*tkpGetCapture) (void); /* 47 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
- void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 0 */
- void (*reserved1)(void);
- void (*tkGenerateActivateEvents_) (TkWindow *winPtr, int active); /* 2 */
- void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 3 */
- void (*tkpSetCapture) (TkWindow *winPtr); /* 4 */
+ void (*reserved0)(void);
+ void (*tkAboutDlg) (void); /* 1 */
+ void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */
+ unsigned long (*tkpGetMS) (void); /* 3 */
+ void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 4 */
void (*tkpSetCursor) (TkpCursor cursor); /* 5 */
- void (*tkpWmSetState) (TkWindow *winPtr, int state); /* 6 */
- void (*tkAboutDlg) (void); /* 7 */
+ int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */
+ int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */
unsigned int (*tkMacOSXButtonKeyState) (void); /* 8 */
void (*tkMacOSXClearMenubarActive) (void); /* 9 */
int (*tkMacOSXDispatchMenuEvent) (int menuID, int index); /* 10 */
- void (*reserved11)(void);
+ void (*tkpSetCapture) (TkWindow *winPtr); /* 11 */
void (*tkMacOSXHandleTearoffMenu) (void); /* 12 */
void (*reserved13)(void);
int (*tkMacOSXDoHLEvent) (void *theEvent); /* 14 */
@@ -409,7 +390,7 @@ typedef struct TkIntPlatStubs {
void (*reserved19)(void);
void (*reserved20)(void);
void (*tkMacOSXInvalidateWindow) (MacDrawable *macWin, int flag); /* 21 */
- int (*tkMacOSXIsCharacterMissing) (Tk_Font tkfont, unsigned int searchChar); /* 22 */
+ void (*reserved22)(void);
void (*tkMacOSXMakeRealWindowExist) (TkWindow *winPtr); /* 23 */
void * (*tkMacOSXMakeStippleMap) (Drawable d1, Drawable d2); /* 24 */
void (*tkMacOSXMenuClick) (void); /* 25 */
@@ -417,7 +398,7 @@ typedef struct TkIntPlatStubs {
int (*tkMacOSXResizable) (TkWindow *winPtr); /* 27 */
void (*tkMacOSXSetHelpMenuItemCount) (void); /* 28 */
void (*tkMacOSXSetScrollbarGrow) (TkWindow *winPtr, int flag); /* 29 */
- void (*tkMacOSXSetUpClippingRgn) (Drawable drawable); /* 30 */
+ void (*reserved30)(void);
void (*tkMacOSXSetUpGraphicsPort) (GC gc, void *destPort); /* 31 */
void (*tkMacOSXUpdateClipRgn) (TkWindow *winPtr); /* 32 */
void (*reserved33)(void);
@@ -440,25 +421,22 @@ typedef struct TkIntPlatStubs {
int (*tkGenerateButtonEvent) (int x, int y, Window window, unsigned int state); /* 50 */
void (*tkGenWMDestroyEvent) (Tk_Window tkwin); /* 51 */
void (*tkMacOSXSetDrawingEnabled) (TkWindow *winPtr, int flag); /* 52 */
- unsigned long (*tkpGetMS) (void); /* 53 */
- void * (*tkMacOSXDrawable) (Drawable drawable); /* 54 */
- int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 55 */
#endif /* AQUA */
#if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
void (*tkCreateXEventSource) (void); /* 0 */
void (*reserved1)(void);
void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */
- int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 3 */
- void (*tkpSync) (Display *display); /* 4 */
- Window (*tkUnixContainerId) (TkWindow *winPtr); /* 5 */
- int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 6 */
- void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 7 */
- int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 8 */
- void (*tkWmCleanup) (TkDisplay *dispPtr); /* 9 */
- void (*tkSendCleanup) (TkDisplay *dispPtr); /* 10 */
+ void (*reserved3)(void);
+ void (*reserved4)(void);
+ void (*reserved5)(void);
+ int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */
+ void (*reserved7)(void);
+ void (*reserved8)(void);
+ int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 9 */
+ void (*reserved10)(void);
void (*reserved11)(void);
- int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 12 */
- int (*tkpTestsendCmd_) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 13 */
+ void (*reserved12)(void);
+ void (*reserved13)(void);
void (*reserved14)(void);
void (*reserved15)(void);
void (*reserved16)(void);
@@ -483,13 +461,13 @@ typedef struct TkIntPlatStubs {
void (*reserved35)(void);
void (*reserved36)(void);
void (*reserved37)(void);
- int (*tkpCmapStressed_) (Tk_Window tkwin, Colormap colormap); /* 38 */
- void (*tkpSync_) (Display *display); /* 39 */
- Window (*tkUnixContainerId_) (TkWindow *winPtr); /* 40 */
- int (*tkUnixDoOneXEvent_) (Tcl_Time *timePtr); /* 41 */
- void (*tkUnixSetMenubar_) (Tk_Window tkwin, Tk_Window menubar); /* 42 */
- void (*tkWmCleanup_) (TkDisplay *dispPtr); /* 43 */
- void (*tkSendCleanup_) (TkDisplay *dispPtr); /* 44 */
+ int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */
+ void (*tkpSync) (Display *display); /* 39 */
+ Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */
+ int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 41 */
+ void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 42 */
+ void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */
+ void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */
int (*tkpTestsendCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 45 */
#endif /* X11 */
} TkIntPlatStubs;
@@ -507,8 +485,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
*/
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
-#define TkAlignImageData \
- (tkIntPlatStubsPtr->tkAlignImageData) /* 0 */
+#define TkCreateXEventSource \
+ (tkIntPlatStubsPtr->tkCreateXEventSource) /* 0 */
/* Slot 1 is reserved */
#define TkGenerateActivateEvents \
(tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */
@@ -572,16 +550,15 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
(tkIntPlatStubsPtr->tkWinDialogDebug) /* 31 */
#define TkWinGetMenuSystemDefault \
(tkIntPlatStubsPtr->tkWinGetMenuSystemDefault) /* 32 */
-#define TkWinGetPlatformId \
- (tkIntPlatStubsPtr->tkWinGetPlatformId) /* 33 */
+#define TkAlignImageData \
+ (tkIntPlatStubsPtr->tkAlignImageData) /* 33 */
#define TkWinSetHINSTANCE \
(tkIntPlatStubsPtr->tkWinSetHINSTANCE) /* 34 */
#define TkWinGetPlatformTheme \
(tkIntPlatStubsPtr->tkWinGetPlatformTheme) /* 35 */
#define TkWinChildProc \
(tkIntPlatStubsPtr->tkWinChildProc) /* 36 */
-#define TkCreateXEventSource \
- (tkIntPlatStubsPtr->tkCreateXEventSource) /* 37 */
+/* Slot 37 is reserved */
#define TkpCmapStressed \
(tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */
#define TkpSync \
@@ -603,28 +580,29 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
(tkIntPlatStubsPtr->tkpGetCapture) /* 47 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
+/* Slot 0 is reserved */
+#define TkAboutDlg \
+ (tkIntPlatStubsPtr->tkAboutDlg) /* 1 */
#define TkGenerateActivateEvents \
- (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */
-/* Slot 1 is reserved */
-#define TkGenerateActivateEvents_ \
- (tkIntPlatStubsPtr->tkGenerateActivateEvents_) /* 2 */
+ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */
+#define TkpGetMS \
+ (tkIntPlatStubsPtr->tkpGetMS) /* 3 */
#define TkPointerDeadWindow \
- (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 3 */
-#define TkpSetCapture \
- (tkIntPlatStubsPtr->tkpSetCapture) /* 4 */
+ (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 4 */
#define TkpSetCursor \
(tkIntPlatStubsPtr->tkpSetCursor) /* 5 */
+#define TkpScanWindowId \
+ (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */
#define TkpWmSetState \
- (tkIntPlatStubsPtr->tkpWmSetState) /* 6 */
-#define TkAboutDlg \
- (tkIntPlatStubsPtr->tkAboutDlg) /* 7 */
+ (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */
#define TkMacOSXButtonKeyState \
(tkIntPlatStubsPtr->tkMacOSXButtonKeyState) /* 8 */
#define TkMacOSXClearMenubarActive \
(tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 9 */
#define TkMacOSXDispatchMenuEvent \
(tkIntPlatStubsPtr->tkMacOSXDispatchMenuEvent) /* 10 */
-/* Slot 11 is reserved */
+#define TkpSetCapture \
+ (tkIntPlatStubsPtr->tkpSetCapture) /* 11 */
#define TkMacOSXHandleTearoffMenu \
(tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */
/* Slot 13 is reserved */
@@ -641,8 +619,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
/* Slot 20 is reserved */
#define TkMacOSXInvalidateWindow \
(tkIntPlatStubsPtr->tkMacOSXInvalidateWindow) /* 21 */
-#define TkMacOSXIsCharacterMissing \
- (tkIntPlatStubsPtr->tkMacOSXIsCharacterMissing) /* 22 */
+/* Slot 22 is reserved */
#define TkMacOSXMakeRealWindowExist \
(tkIntPlatStubsPtr->tkMacOSXMakeRealWindowExist) /* 23 */
#define TkMacOSXMakeStippleMap \
@@ -656,8 +633,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
(tkIntPlatStubsPtr->tkMacOSXSetHelpMenuItemCount) /* 28 */
#define TkMacOSXSetScrollbarGrow \
(tkIntPlatStubsPtr->tkMacOSXSetScrollbarGrow) /* 29 */
-#define TkMacOSXSetUpClippingRgn \
- (tkIntPlatStubsPtr->tkMacOSXSetUpClippingRgn) /* 30 */
+/* Slot 30 is reserved */
#define TkMacOSXSetUpGraphicsPort \
(tkIntPlatStubsPtr->tkMacOSXSetUpGraphicsPort) /* 31 */
#define TkMacOSXUpdateClipRgn \
@@ -699,12 +675,6 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
(tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */
#define TkMacOSXSetDrawingEnabled \
(tkIntPlatStubsPtr->tkMacOSXSetDrawingEnabled) /* 52 */
-#define TkpGetMS \
- (tkIntPlatStubsPtr->tkpGetMS) /* 53 */
-#define TkMacOSXDrawable \
- (tkIntPlatStubsPtr->tkMacOSXDrawable) /* 54 */
-#define TkpScanWindowId \
- (tkIntPlatStubsPtr->tkpScanWindowId) /* 55 */
#endif /* AQUA */
#if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
#define TkCreateXEventSource \
@@ -712,27 +682,19 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
/* Slot 1 is reserved */
#define TkGenerateActivateEvents \
(tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */
-#define TkpCmapStressed \
- (tkIntPlatStubsPtr->tkpCmapStressed) /* 3 */
-#define TkpSync \
- (tkIntPlatStubsPtr->tkpSync) /* 4 */
-#define TkUnixContainerId \
- (tkIntPlatStubsPtr->tkUnixContainerId) /* 5 */
-#define TkUnixDoOneXEvent \
- (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 6 */
-#define TkUnixSetMenubar \
- (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 7 */
+/* Slot 3 is reserved */
+/* Slot 4 is reserved */
+/* Slot 5 is reserved */
#define TkpScanWindowId \
- (tkIntPlatStubsPtr->tkpScanWindowId) /* 8 */
-#define TkWmCleanup \
- (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */
-#define TkSendCleanup \
- (tkIntPlatStubsPtr->tkSendCleanup) /* 10 */
-/* Slot 11 is reserved */
+ (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */
+/* Slot 7 is reserved */
+/* Slot 8 is reserved */
#define TkpWmSetState \
- (tkIntPlatStubsPtr->tkpWmSetState) /* 12 */
-#define TkpTestsendCmd_ \
- (tkIntPlatStubsPtr->tkpTestsendCmd_) /* 13 */
+ (tkIntPlatStubsPtr->tkpWmSetState) /* 9 */
+/* Slot 10 is reserved */
+/* Slot 11 is reserved */
+/* Slot 12 is reserved */
+/* Slot 13 is reserved */
/* Slot 14 is reserved */
/* Slot 15 is reserved */
/* Slot 16 is reserved */
@@ -757,20 +719,20 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
/* Slot 35 is reserved */
/* Slot 36 is reserved */
/* Slot 37 is reserved */
-#define TkpCmapStressed_ \
- (tkIntPlatStubsPtr->tkpCmapStressed_) /* 38 */
-#define TkpSync_ \
- (tkIntPlatStubsPtr->tkpSync_) /* 39 */
-#define TkUnixContainerId_ \
- (tkIntPlatStubsPtr->tkUnixContainerId_) /* 40 */
-#define TkUnixDoOneXEvent_ \
- (tkIntPlatStubsPtr->tkUnixDoOneXEvent_) /* 41 */
-#define TkUnixSetMenubar_ \
- (tkIntPlatStubsPtr->tkUnixSetMenubar_) /* 42 */
-#define TkWmCleanup_ \
- (tkIntPlatStubsPtr->tkWmCleanup_) /* 43 */
-#define TkSendCleanup_ \
- (tkIntPlatStubsPtr->tkSendCleanup_) /* 44 */
+#define TkpCmapStressed \
+ (tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */
+#define TkpSync \
+ (tkIntPlatStubsPtr->tkpSync) /* 39 */
+#define TkUnixContainerId \
+ (tkIntPlatStubsPtr->tkUnixContainerId) /* 40 */
+#define TkUnixDoOneXEvent \
+ (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 41 */
+#define TkUnixSetMenubar \
+ (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 42 */
+#define TkWmCleanup \
+ (tkIntPlatStubsPtr->tkWmCleanup) /* 43 */
+#define TkSendCleanup \
+ (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */
#define TkpTestsendCmd \
(tkIntPlatStubsPtr->tkpTestsendCmd) /* 45 */
#endif /* X11 */
@@ -779,23 +741,11 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
/* !END!: Do not edit above this line. */
-#undef TkpCmapStressed_
-#undef TkpSync_
-#undef TkUnixContainerId_
-#undef TkUnixDoOneXEvent_
-#undef TkUnixSetMenubar_
-#undef TkWmCleanup_
-#undef TkSendCleanup_
-#undef TkpTestsendCmd_
-#undef TkGenerateActivateEvents_
-#undef TkMacOSXSetUpClippingRgn
-#undef TkMacOSXIsCharacterMissing
-#define TkMacOSXIsCharacterMissing(tkfont) ((void)tkfont, 0)
+#ifndef TK_NO_DEPRECATED
+# define TkMacOSXDrawable Tk_MacOSXGetNSWindowForDrawable
+#endif
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
-#undef TkWinGetPlatformId
-#define TkWinGetPlatformId() (2) /* VER_PLATFORM_WIN32_NT */
-
#endif /* _TKINTPLATDECLS */
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index 360594a..2f56d80 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -498,284 +498,283 @@ EXTERN char * XKeysymToString(KeySym k);
EXTERN Colormap XCreateColormap(Display *d, Window w, Visual *v,
int i);
/* 7 */
-EXTERN GContext XGContextFromGC(GC g);
+EXTERN Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,
+ XColor *x1, XColor *x2, unsigned int ui1,
+ unsigned int ui2);
/* 8 */
-EXTERN KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i);
+EXTERN Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2,
+ unsigned int ui1, unsigned int ui2,
+ XColor _Xconst *x1, XColor _Xconst *x2);
/* 9 */
-EXTERN KeySym XStringToKeysym(_Xconst char *c);
+EXTERN GContext XGContextFromGC(GC g);
/* 10 */
-EXTERN Window XRootWindow(Display *d, int i);
+EXTERN XHostAddress * XListHosts(Display *d, int *i, Bool *b);
/* 11 */
-EXTERN XErrorHandler XSetErrorHandler(XErrorHandler x);
+EXTERN KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i);
/* 12 */
-EXTERN Status XAllocColor(Display *d, Colormap c, XColor *xp);
+EXTERN KeySym XStringToKeysym(_Xconst char *c);
/* 13 */
-EXTERN int XBell(Display *d, int i);
+EXTERN Window XRootWindow(Display *d, int i);
/* 14 */
+EXTERN XErrorHandler XSetErrorHandler(XErrorHandler x);
+/* 15 */
+EXTERN Status XIconifyWindow(Display *d, Window w, int i);
+/* 16 */
+EXTERN Status XWithdrawWindow(Display *d, Window w, int i);
+/* 17 */
+EXTERN Status XGetWMColormapWindows(Display *d, Window w,
+ Window **wpp, int *ip);
+/* 18 */
+EXTERN Status XAllocColor(Display *d, Colormap c, XColor *xp);
+/* 19 */
+EXTERN int XBell(Display *d, int i);
+/* 20 */
EXTERN int XChangeProperty(Display *d, Window w, Atom a1,
Atom a2, int i1, int i2,
_Xconst unsigned char *c, int i3);
-/* 15 */
+/* 21 */
EXTERN int XChangeWindowAttributes(Display *d, Window w,
unsigned long ul, XSetWindowAttributes *x);
-/* 16 */
+/* 22 */
+EXTERN int XClearWindow(Display *d, Window w);
+/* 23 */
EXTERN int XConfigureWindow(Display *d, Window w,
unsigned int i, XWindowChanges *x);
-/* 17 */
+/* 24 */
EXTERN int XCopyArea(Display *d, Drawable dr1, Drawable dr2,
GC g, int i1, int i2, unsigned int ui1,
unsigned int ui2, int i3, int i4);
-/* 18 */
+/* 25 */
EXTERN int XCopyPlane(Display *d, Drawable dr1, Drawable dr2,
GC g, int i1, int i2, unsigned int ui1,
unsigned int ui2, int i3, int i4,
unsigned long ul);
-/* 19 */
+/* 26 */
EXTERN Pixmap XCreateBitmapFromData(Display *display, Drawable d,
_Xconst char *data, unsigned int width,
unsigned int height);
-/* 20 */
+/* 27 */
EXTERN int XDefineCursor(Display *d, Window w, Cursor c);
-/* 21 */
+/* 28 */
+EXTERN int XDeleteProperty(Display *d, Window w, Atom a);
+/* 29 */
EXTERN int XDestroyWindow(Display *d, Window w);
-/* 22 */
+/* 30 */
EXTERN int XDrawArc(Display *d, Drawable dr, GC g, int i1,
int i2, unsigned int ui1, unsigned int ui2,
int i3, int i4);
-/* 23 */
+/* 31 */
EXTERN int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x,
int i1, int i2);
-/* 24 */
+/* 32 */
EXTERN int XDrawRectangle(Display *d, Drawable dr, GC g, int i1,
int i2, unsigned int ui1, unsigned int ui2);
-/* 25 */
+/* 33 */
EXTERN int XFillArc(Display *d, Drawable dr, GC g, int i1,
int i2, unsigned int ui1, unsigned int ui2,
int i3, int i4);
-/* 26 */
+/* 34 */
EXTERN int XFillPolygon(Display *d, Drawable dr, GC g,
XPoint *x, int i1, int i2, int i3);
-/* 27 */
+/* 35 */
EXTERN int XFillRectangles(Display *d, Drawable dr, GC g,
XRectangle *x, int i);
-/* 28 */
+/* 36 */
+EXTERN int XForceScreenSaver(Display *d, int i);
+/* 37 */
EXTERN int XFreeColormap(Display *d, Colormap c);
-/* 29 */
+/* 38 */
EXTERN int XFreeColors(Display *d, Colormap c,
unsigned long *ulp, int i, unsigned long ul);
-/* 30 */
+/* 39 */
+EXTERN int XFreeCursor(Display *d, Cursor c);
+/* 40 */
EXTERN int XFreeModifiermap(XModifierKeymap *x);
-/* 31 */
+/* 41 */
EXTERN Status XGetGeometry(Display *d, Drawable dr, Window *w,
int *i1, int *i2, unsigned int *ui1,
unsigned int *ui2, unsigned int *ui3,
unsigned int *ui4);
-/* 32 */
+/* 42 */
+EXTERN int XGetInputFocus(Display *d, Window *w, int *i);
+/* 43 */
EXTERN int XGetWindowProperty(Display *d, Window w, Atom a1,
long l1, long l2, Bool b, Atom a2, Atom *ap,
int *ip, unsigned long *ulp1,
unsigned long *ulp2, unsigned char **cpp);
-/* 33 */
+/* 44 */
+EXTERN Status XGetWindowAttributes(Display *d, Window w,
+ XWindowAttributes *x);
+/* 45 */
EXTERN int XGrabKeyboard(Display *d, Window w, Bool b, int i1,
int i2, Time t);
-/* 34 */
+/* 46 */
EXTERN int XGrabPointer(Display *d, Window w1, Bool b,
unsigned int ui, int i1, int i2, Window w2,
Cursor c, Time t);
-/* 35 */
+/* 47 */
EXTERN KeyCode XKeysymToKeycode(Display *d, KeySym k);
-/* 36 */
+/* 48 */
+EXTERN Status XLookupColor(Display *d, Colormap c1,
+ _Xconst char *c2, XColor *x1, XColor *x2);
+/* 49 */
EXTERN int XMapWindow(Display *d, Window w);
-/* 37 */
+/* 50 */
EXTERN int XMoveResizeWindow(Display *d, Window w, int i1,
int i2, unsigned int ui1, unsigned int ui2);
-/* 38 */
+/* 51 */
EXTERN int XMoveWindow(Display *d, Window w, int i1, int i2);
-/* 39 */
+/* 52 */
+EXTERN int XNextEvent(Display *d, XEvent *x);
+/* 53 */
+EXTERN int XPutBackEvent(Display *d, XEvent *x);
+/* 54 */
+EXTERN int XQueryColors(Display *d, Colormap c, XColor *x,
+ int i);
+/* 55 */
EXTERN Bool XQueryPointer(Display *d, Window w1, Window *w2,
Window *w3, int *i1, int *i2, int *i3,
int *i4, unsigned int *ui);
-/* 40 */
+/* 56 */
+EXTERN Status XQueryTree(Display *d, Window w1, Window *w2,
+ Window *w3, Window **w4, unsigned int *ui);
+/* 57 */
EXTERN int XRaiseWindow(Display *d, Window w);
-/* 41 */
+/* 58 */
EXTERN int XRefreshKeyboardMapping(XMappingEvent *x);
-/* 42 */
+/* 59 */
EXTERN int XResizeWindow(Display *d, Window w, unsigned int ui1,
unsigned int ui2);
-/* 43 */
+/* 60 */
EXTERN int XSelectInput(Display *d, Window w, long l);
-/* 44 */
+/* 61 */
EXTERN Status XSendEvent(Display *d, Window w, Bool b, long l,
XEvent *x);
-/* 45 */
+/* 62 */
+EXTERN int XSetCommand(Display *d, Window w, char **c, int i);
+/* 63 */
EXTERN int XSetIconName(Display *d, Window w, _Xconst char *c);
-/* 46 */
+/* 64 */
EXTERN int XSetInputFocus(Display *d, Window w, int i, Time t);
-/* 47 */
+/* 65 */
EXTERN int XSetSelectionOwner(Display *d, Atom a, Window w,
Time t);
-/* 48 */
+/* 66 */
EXTERN int XSetWindowBackground(Display *d, Window w,
unsigned long ul);
-/* 49 */
+/* 67 */
EXTERN int XSetWindowBackgroundPixmap(Display *d, Window w,
Pixmap p);
-/* 50 */
+/* 68 */
EXTERN int XSetWindowBorder(Display *d, Window w,
unsigned long ul);
-/* 51 */
+/* 69 */
EXTERN int XSetWindowBorderPixmap(Display *d, Window w,
Pixmap p);
-/* 52 */
+/* 70 */
EXTERN int XSetWindowBorderWidth(Display *d, Window w,
unsigned int ui);
-/* 53 */
+/* 71 */
EXTERN int XSetWindowColormap(Display *d, Window w, Colormap c);
-/* 54 */
+/* 72 */
+EXTERN Bool XTranslateCoordinates(Display *d, Window w1,
+ Window w2, int i1, int i2, int *i3, int *i4,
+ Window *w3);
+/* 73 */
EXTERN int XUngrabKeyboard(Display *d, Time t);
-/* 55 */
+/* 74 */
EXTERN int XUngrabPointer(Display *d, Time t);
-/* 56 */
+/* 75 */
EXTERN int XUnmapWindow(Display *d, Window w);
-/* 57 */
+/* 76 */
+EXTERN int XWindowEvent(Display *d, Window w, long l, XEvent *x);
+/* 77 */
+EXTERN void XDestroyIC(XIC x);
+/* 78 */
+EXTERN Bool XFilterEvent(XEvent *x, Window w);
+/* 79 */
+EXTERN int XmbLookupString(XIC xi, XKeyPressedEvent *xk,
+ char *c, int i, KeySym *k, Status *s);
+/* 80 */
EXTERN int TkPutImage(unsigned long *colors, int ncolors,
Display *display, Drawable d, GC gc,
XImage *image, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width,
unsigned int height);
-/* 58 */
+/* 81 */
+EXTERN int XSetClipRectangles(Display *display, GC gc,
+ int clip_x_origin, int clip_y_origin,
+ XRectangle rectangles[], int n, int ordering);
+/* 82 */
EXTERN Status XParseColor(Display *display, Colormap map,
_Xconst char *spec, XColor *colorPtr);
-/* 59 */
+/* 83 */
EXTERN GC XCreateGC(Display *display, Drawable d,
unsigned long valuemask, XGCValues *values);
-/* 60 */
+/* 84 */
EXTERN int XFreeGC(Display *display, GC gc);
-/* 61 */
+/* 85 */
EXTERN Atom XInternAtom(Display *display,
_Xconst char *atom_name, Bool only_if_exists);
-/* 62 */
+/* 86 */
EXTERN int XSetBackground(Display *display, GC gc,
unsigned long foreground);
-/* 63 */
+/* 87 */
EXTERN int XSetForeground(Display *display, GC gc,
unsigned long foreground);
-/* 64 */
+/* 88 */
EXTERN int XSetClipMask(Display *display, GC gc, Pixmap pixmap);
-/* 65 */
+/* 89 */
EXTERN int XSetClipOrigin(Display *display, GC gc,
int clip_x_origin, int clip_y_origin);
-/* 66 */
+/* 90 */
EXTERN int XSetTSOrigin(Display *display, GC gc,
int ts_x_origin, int ts_y_origin);
-/* 67 */
+/* 91 */
EXTERN int XChangeGC(Display *d, GC gc, unsigned long mask,
XGCValues *values);
-/* 68 */
+/* 92 */
EXTERN int XSetFont(Display *display, GC gc, Font font);
-/* 69 */
+/* 93 */
EXTERN int XSetArcMode(Display *display, GC gc, int arc_mode);
-/* 70 */
+/* 94 */
EXTERN int XSetStipple(Display *display, GC gc, Pixmap stipple);
-/* 71 */
+/* 95 */
EXTERN int XSetFillRule(Display *display, GC gc, int fill_rule);
-/* 72 */
+/* 96 */
EXTERN int XSetFillStyle(Display *display, GC gc,
int fill_style);
-/* 73 */
+/* 97 */
EXTERN int XSetFunction(Display *display, GC gc, int function);
-/* 74 */
+/* 98 */
EXTERN int XSetLineAttributes(Display *display, GC gc,
unsigned int line_width, int line_style,
int cap_style, int join_style);
-/* 75 */
+/* 99 */
EXTERN int _XInitImageFuncPtrs(XImage *image);
-/* 76 */
+/* 100 */
EXTERN XIC XCreateIC(XIM xim, ...);
-/* 77 */
+/* 101 */
EXTERN XVisualInfo * XGetVisualInfo(Display *display, long vinfo_mask,
XVisualInfo *vinfo_template,
int *nitems_return);
-/* 78 */
+/* 102 */
EXTERN void XSetWMClientMachine(Display *display, Window w,
XTextProperty *text_prop);
-/* 79 */
+/* 103 */
EXTERN Status XStringListToTextProperty(char **list, int count,
XTextProperty *text_prop_return);
-/* 80 */
-EXTERN int XDrawSegments(Display *display, Drawable d, GC gc,
- XSegment *segments, int nsegments);
-/* 81 */
-EXTERN int XForceScreenSaver(Display *display, int mode);
-/* 82 */
+/* 104 */
EXTERN int XDrawLine(Display *d, Drawable dr, GC g, int x1,
int y1, int x2, int y2);
-/* 83 */
+/* 105 */
+EXTERN int XWarpPointer(Display *d, Window s, Window dw, int sx,
+ int sy, unsigned int sw, unsigned int sh,
+ int dx, int dy);
+/* 106 */
EXTERN int XFillRectangle(Display *display, Drawable d, GC gc,
int x, int y, unsigned int width,
unsigned int height);
-/* 84 */
-EXTERN int XClearWindow(Display *d, Window w);
-/* 85 */
-EXTERN int XDrawPoint(Display *display, Drawable d, GC gc,
- int x, int y);
-/* 86 */
-EXTERN int XDrawPoints(Display *display, Drawable d, GC gc,
- XPoint *points, int npoints, int mode);
-/* 87 */
-EXTERN int XWarpPointer(Display *display, Window src_w,
- Window dest_w, int src_x, int src_y,
- unsigned int src_width,
- unsigned int src_height, int dest_x,
- int dest_y);
-/* 88 */
-EXTERN int XQueryColor(Display *display, Colormap colormap,
- XColor *def_in_out);
-/* 89 */
-EXTERN int XQueryColors(Display *display, Colormap colormap,
- XColor *defs_in_out, int ncolors);
-/* 90 */
-EXTERN Status XQueryTree(Display *d, Window w1, Window *w2,
- Window *w3, Window **w4, unsigned int *ui);
-/* 91 */
-EXTERN int XSync(Display *display, Bool discard);
-/* 92 */
-EXTERN Bool XTranslateCoordinates(Display *d, Window w1,
- Window w2, int i1, int i2, int *i3, int *i4,
- Window *w3);
-/* 93 */
-EXTERN int XDeleteProperty(Display *d, Window w, Atom a);
-/* 94 */
-EXTERN int XFreeCursor(Display *d, Cursor c);
-/* 95 */
-EXTERN int XGetInputFocus(Display *d, Window *w, int *i);
-/* 96 */
-EXTERN int XmbLookupString(XIC xi, XKeyPressedEvent *xk,
- char *c, int i, KeySym *k, Status *s);
-/* 97 */
-EXTERN int XNextEvent(Display *d, XEvent *x);
-/* 98 */
-EXTERN int XPutBackEvent(Display *d, XEvent *x);
-/* 99 */
-EXTERN int XSetCommand(Display *d, Window w, char **c, int i);
-/* 100 */
-EXTERN int XWindowEvent(Display *d, Window w, long l, XEvent *x);
-/* 101 */
-EXTERN Status XGetWindowAttributes(Display *d, Window w,
- XWindowAttributes *x);
-/* 102 */
-EXTERN Status XGetWMColormapWindows(Display *d, Window w,
- Window **wpp, int *ip);
-/* 103 */
-EXTERN Status XIconifyWindow(Display *d, Window w, int i);
-/* 104 */
-EXTERN Status XWithdrawWindow(Display *d, Window w, int i);
-/* 105 */
-EXTERN XHostAddress * XListHosts(Display *d, int *i, Bool *b);
-/* 106 */
-EXTERN int XSetClipRectangles(Display *display, GC gc,
- int clip_x_origin, int clip_y_origin,
- XRectangle rectangles[], int n, int ordering);
/* 107 */
EXTERN int XFlush(Display *display);
/* 108 */
@@ -789,8 +788,7 @@ EXTERN int XNoOp(Display *display);
/* 112 */
EXTERN XAfterFunction XSynchronize(Display *display, Bool onoff);
/* 113 */
-EXTERN Status XLookupColor(Display *d, Colormap c1,
- _Xconst char *c2, XColor *x1, XColor *x2);
+EXTERN int XSync(Display *display, Bool discard);
/* 114 */
EXTERN VisualID XVisualIDFromVisual(Visual *visual);
/* Slot 115 is reserved */
@@ -828,9 +826,15 @@ EXTERN int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a,
/* 132 */
EXTERN int XDrawRectangles(Display *d, Drawable dr, GC gc,
XRectangle *r, int n);
-/* Slot 133 is reserved */
-/* Slot 134 is reserved */
-/* Slot 135 is reserved */
+/* 133 */
+EXTERN int XDrawSegments(Display *d, Drawable dr, GC gc,
+ XSegment *s, int n);
+/* 134 */
+EXTERN int XDrawPoint(Display *d, Drawable dr, GC gc, int x,
+ int y);
+/* 135 */
+EXTERN int XDrawPoints(Display *d, Drawable dr, GC gc,
+ XPoint *p, int n, int m);
/* 136 */
EXTERN int XReparentWindow(Display *d, Window w, Window p,
int x, int y);
@@ -850,16 +854,9 @@ EXTERN char * XSetICValues(XIC xic, ...);
EXTERN char * XGetICValues(XIC xic, ...);
/* 143 */
EXTERN void XSetICFocus(XIC xic);
-/* 144 */
-EXTERN void XDestroyIC(XIC xic);
-/* 145 */
-EXTERN Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,
- XColor *x1, XColor *x2, unsigned int ui1,
- unsigned int ui2);
-/* 146 */
-EXTERN Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2,
- unsigned int ui1, unsigned int ui2,
- XColor _Xconst *x1, XColor _Xconst *x2);
+/* Slot 144 is reserved */
+/* Slot 145 is reserved */
+/* Slot 146 is reserved */
/* 147 */
EXTERN void XFreeFontSet(Display *display, XFontSet fontset);
/* 148 */
@@ -1073,113 +1070,113 @@ typedef struct TkIntXlibStubs {
char * (*xGetAtomName) (Display *d, Atom a); /* 4 */
char * (*xKeysymToString) (KeySym k); /* 5 */
Colormap (*xCreateColormap) (Display *d, Window w, Visual *v, int i); /* 6 */
- GContext (*xGContextFromGC) (GC g); /* 7 */
- KeySym (*xKeycodeToKeysym) (Display *d, unsigned int k, int i); /* 8 */
- KeySym (*xStringToKeysym) (_Xconst char *c); /* 9 */
- Window (*xRootWindow) (Display *d, int i); /* 10 */
- XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 11 */
- Status (*xAllocColor) (Display *d, Colormap c, XColor *xp); /* 12 */
- int (*xBell) (Display *d, int i); /* 13 */
- int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 14 */
- int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 15 */
- int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 16 */
- int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */
- int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */
- Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 19 */
- int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 20 */
- int (*xDestroyWindow) (Display *d, Window w); /* 21 */
- int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */
- int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 23 */
- int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 24 */
- int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 25 */
- int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 26 */
- int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 27 */
- int (*xFreeColormap) (Display *d, Colormap c); /* 28 */
- int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 29 */
- int (*xFreeModifiermap) (XModifierKeymap *x); /* 30 */
- Status (*xGetGeometry) (Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4); /* 31 */
- int (*xGetWindowProperty) (Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp); /* 32 */
- int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 33 */
- int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 34 */
- KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 35 */
- int (*xMapWindow) (Display *d, Window w); /* 36 */
- int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 37 */
- int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 38 */
- Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 39 */
- int (*xRaiseWindow) (Display *d, Window w); /* 40 */
- int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 41 */
- int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */
- int (*xSelectInput) (Display *d, Window w, long l); /* 43 */
- Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 44 */
- int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 45 */
- int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 46 */
- int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 47 */
- int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 48 */
- int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 49 */
- int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 50 */
- int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 51 */
- int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 52 */
- int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 53 */
- int (*xUngrabKeyboard) (Display *d, Time t); /* 54 */
- int (*xUngrabPointer) (Display *d, Time t); /* 55 */
- int (*xUnmapWindow) (Display *d, Window w); /* 56 */
- int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 57 */
- Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 58 */
- GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 59 */
- int (*xFreeGC) (Display *display, GC gc); /* 60 */
- Atom (*xInternAtom) (Display *display, _Xconst char *atom_name, Bool only_if_exists); /* 61 */
- int (*xSetBackground) (Display *display, GC gc, unsigned long foreground); /* 62 */
- int (*xSetForeground) (Display *display, GC gc, unsigned long foreground); /* 63 */
- int (*xSetClipMask) (Display *display, GC gc, Pixmap pixmap); /* 64 */
- int (*xSetClipOrigin) (Display *display, GC gc, int clip_x_origin, int clip_y_origin); /* 65 */
- int (*xSetTSOrigin) (Display *display, GC gc, int ts_x_origin, int ts_y_origin); /* 66 */
- int (*xChangeGC) (Display *d, GC gc, unsigned long mask, XGCValues *values); /* 67 */
- int (*xSetFont) (Display *display, GC gc, Font font); /* 68 */
- int (*xSetArcMode) (Display *display, GC gc, int arc_mode); /* 69 */
- int (*xSetStipple) (Display *display, GC gc, Pixmap stipple); /* 70 */
- int (*xSetFillRule) (Display *display, GC gc, int fill_rule); /* 71 */
- int (*xSetFillStyle) (Display *display, GC gc, int fill_style); /* 72 */
- int (*xSetFunction) (Display *display, GC gc, int function); /* 73 */
- int (*xSetLineAttributes) (Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 74 */
- int (*_XInitImageFuncPtrs) (XImage *image); /* 75 */
- XIC (*xCreateIC) (XIM xim, ...); /* 76 */
- XVisualInfo * (*xGetVisualInfo) (Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); /* 77 */
- void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 78 */
- Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 79 */
- int (*xDrawSegments) (Display *display, Drawable d, GC gc, XSegment *segments, int nsegments); /* 80 */
- int (*xForceScreenSaver) (Display *display, int mode); /* 81 */
- int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 82 */
- int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 83 */
- int (*xClearWindow) (Display *d, Window w); /* 84 */
- int (*xDrawPoint) (Display *display, Drawable d, GC gc, int x, int y); /* 85 */
- int (*xDrawPoints) (Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode); /* 86 */
- int (*xWarpPointer) (Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y); /* 87 */
- int (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */
- int (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */
- Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */
- int (*xSync) (Display *display, Bool discard); /* 91 */
- Bool (*xTranslateCoordinates) (Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3); /* 92 */
- int (*xDeleteProperty) (Display *d, Window w, Atom a); /* 93 */
- int (*xFreeCursor) (Display *d, Cursor c); /* 94 */
- int (*xGetInputFocus) (Display *d, Window *w, int *i); /* 95 */
- int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 96 */
- int (*xNextEvent) (Display *d, XEvent *x); /* 97 */
- int (*xPutBackEvent) (Display *d, XEvent *x); /* 98 */
- int (*xSetCommand) (Display *d, Window w, char **c, int i); /* 99 */
- int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 100 */
- Status (*xGetWindowAttributes) (Display *d, Window w, XWindowAttributes *x); /* 101 */
- Status (*xGetWMColormapWindows) (Display *d, Window w, Window **wpp, int *ip); /* 102 */
- Status (*xIconifyWindow) (Display *d, Window w, int i); /* 103 */
- Status (*xWithdrawWindow) (Display *d, Window w, int i); /* 104 */
- XHostAddress * (*xListHosts) (Display *d, int *i, Bool *b); /* 105 */
- int (*xSetClipRectangles) (Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering); /* 106 */
+ Cursor (*xCreatePixmapCursor) (Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2); /* 7 */
+ Cursor (*xCreateGlyphCursor) (Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2); /* 8 */
+ GContext (*xGContextFromGC) (GC g); /* 9 */
+ XHostAddress * (*xListHosts) (Display *d, int *i, Bool *b); /* 10 */
+ KeySym (*xKeycodeToKeysym) (Display *d, unsigned int k, int i); /* 11 */
+ KeySym (*xStringToKeysym) (_Xconst char *c); /* 12 */
+ Window (*xRootWindow) (Display *d, int i); /* 13 */
+ XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 14 */
+ Status (*xIconifyWindow) (Display *d, Window w, int i); /* 15 */
+ Status (*xWithdrawWindow) (Display *d, Window w, int i); /* 16 */
+ Status (*xGetWMColormapWindows) (Display *d, Window w, Window **wpp, int *ip); /* 17 */
+ Status (*xAllocColor) (Display *d, Colormap c, XColor *xp); /* 18 */
+ int (*xBell) (Display *d, int i); /* 19 */
+ int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 20 */
+ int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 21 */
+ int (*xClearWindow) (Display *d, Window w); /* 22 */
+ int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 23 */
+ int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 24 */
+ int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 25 */
+ Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 26 */
+ int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 27 */
+ int (*xDeleteProperty) (Display *d, Window w, Atom a); /* 28 */
+ int (*xDestroyWindow) (Display *d, Window w); /* 29 */
+ int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 30 */
+ int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 31 */
+ int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 32 */
+ int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 33 */
+ int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 34 */
+ int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 35 */
+ int (*xForceScreenSaver) (Display *d, int i); /* 36 */
+ int (*xFreeColormap) (Display *d, Colormap c); /* 37 */
+ int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 38 */
+ int (*xFreeCursor) (Display *d, Cursor c); /* 39 */
+ int (*xFreeModifiermap) (XModifierKeymap *x); /* 40 */
+ Status (*xGetGeometry) (Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4); /* 41 */
+ int (*xGetInputFocus) (Display *d, Window *w, int *i); /* 42 */
+ int (*xGetWindowProperty) (Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp); /* 43 */
+ Status (*xGetWindowAttributes) (Display *d, Window w, XWindowAttributes *x); /* 44 */
+ int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 45 */
+ int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 46 */
+ KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 47 */
+ Status (*xLookupColor) (Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2); /* 48 */
+ int (*xMapWindow) (Display *d, Window w); /* 49 */
+ int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 50 */
+ int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 51 */
+ int (*xNextEvent) (Display *d, XEvent *x); /* 52 */
+ int (*xPutBackEvent) (Display *d, XEvent *x); /* 53 */
+ int (*xQueryColors) (Display *d, Colormap c, XColor *x, int i); /* 54 */
+ Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 55 */
+ Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 56 */
+ int (*xRaiseWindow) (Display *d, Window w); /* 57 */
+ int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 58 */
+ int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 59 */
+ int (*xSelectInput) (Display *d, Window w, long l); /* 60 */
+ Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 61 */
+ int (*xSetCommand) (Display *d, Window w, char **c, int i); /* 62 */
+ int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 63 */
+ int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 64 */
+ int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 65 */
+ int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 66 */
+ int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 67 */
+ int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 68 */
+ int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 69 */
+ int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 70 */
+ int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 71 */
+ Bool (*xTranslateCoordinates) (Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3); /* 72 */
+ int (*xUngrabKeyboard) (Display *d, Time t); /* 73 */
+ int (*xUngrabPointer) (Display *d, Time t); /* 74 */
+ int (*xUnmapWindow) (Display *d, Window w); /* 75 */
+ int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 76 */
+ void (*xDestroyIC) (XIC x); /* 77 */
+ Bool (*xFilterEvent) (XEvent *x, Window w); /* 78 */
+ int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 79 */
+ int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 80 */
+ int (*xSetClipRectangles) (Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering); /* 81 */
+ Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 82 */
+ GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 83 */
+ int (*xFreeGC) (Display *display, GC gc); /* 84 */
+ Atom (*xInternAtom) (Display *display, _Xconst char *atom_name, Bool only_if_exists); /* 85 */
+ int (*xSetBackground) (Display *display, GC gc, unsigned long foreground); /* 86 */
+ int (*xSetForeground) (Display *display, GC gc, unsigned long foreground); /* 87 */
+ int (*xSetClipMask) (Display *display, GC gc, Pixmap pixmap); /* 88 */
+ int (*xSetClipOrigin) (Display *display, GC gc, int clip_x_origin, int clip_y_origin); /* 89 */
+ int (*xSetTSOrigin) (Display *display, GC gc, int ts_x_origin, int ts_y_origin); /* 90 */
+ int (*xChangeGC) (Display *d, GC gc, unsigned long mask, XGCValues *values); /* 91 */
+ int (*xSetFont) (Display *display, GC gc, Font font); /* 92 */
+ int (*xSetArcMode) (Display *display, GC gc, int arc_mode); /* 93 */
+ int (*xSetStipple) (Display *display, GC gc, Pixmap stipple); /* 94 */
+ int (*xSetFillRule) (Display *display, GC gc, int fill_rule); /* 95 */
+ int (*xSetFillStyle) (Display *display, GC gc, int fill_style); /* 96 */
+ int (*xSetFunction) (Display *display, GC gc, int function); /* 97 */
+ int (*xSetLineAttributes) (Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 98 */
+ int (*_XInitImageFuncPtrs) (XImage *image); /* 99 */
+ XIC (*xCreateIC) (XIM xim, ...); /* 100 */
+ XVisualInfo * (*xGetVisualInfo) (Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); /* 101 */
+ void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 102 */
+ Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 103 */
+ int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 104 */
+ int (*xWarpPointer) (Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy); /* 105 */
+ int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 106 */
int (*xFlush) (Display *display); /* 107 */
int (*xGrabServer) (Display *display); /* 108 */
int (*xUngrabServer) (Display *display); /* 109 */
int (*xFree) (void *data); /* 110 */
int (*xNoOp) (Display *display); /* 111 */
XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */
- Status (*xLookupColor) (Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2); /* 113 */
+ int (*xSync) (Display *display, Bool discard); /* 113 */
VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */
void (*reserved115)(void);
void (*reserved116)(void);
@@ -1199,9 +1196,9 @@ typedef struct TkIntXlibStubs {
int (*xFillArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 130 */
int (*xDrawArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 131 */
int (*xDrawRectangles) (Display *d, Drawable dr, GC gc, XRectangle *r, int n); /* 132 */
- void (*reserved133)(void);
- void (*reserved134)(void);
- void (*reserved135)(void);
+ int (*xDrawSegments) (Display *d, Drawable dr, GC gc, XSegment *s, int n); /* 133 */
+ int (*xDrawPoint) (Display *d, Drawable dr, GC gc, int x, int y); /* 134 */
+ int (*xDrawPoints) (Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); /* 135 */
int (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */
int (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); /* 137 */
Region (*xPolygonRegion) (XPoint *pts, int n, int rule); /* 138 */
@@ -1210,9 +1207,9 @@ typedef struct TkIntXlibStubs {
char * (*xSetICValues) (XIC xic, ...); /* 141 */
char * (*xGetICValues) (XIC xic, ...); /* 142 */
void (*xSetICFocus) (XIC xic); /* 143 */
- void (*xDestroyIC) (XIC xic); /* 144 */
- Cursor (*xCreatePixmapCursor) (Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2); /* 145 */
- Cursor (*xCreateGlyphCursor) (Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2); /* 146 */
+ void (*reserved144)(void);
+ void (*reserved145)(void);
+ void (*reserved146)(void);
void (*xFreeFontSet) (Display *display, XFontSet fontset); /* 147 */
int (*xCloseIM) (XIM im); /* 148 */
Bool (*xRegisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 149 */
@@ -1561,206 +1558,206 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xKeysymToString) /* 5 */
#define XCreateColormap \
(tkIntXlibStubsPtr->xCreateColormap) /* 6 */
+#define XCreatePixmapCursor \
+ (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 7 */
+#define XCreateGlyphCursor \
+ (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 8 */
#define XGContextFromGC \
- (tkIntXlibStubsPtr->xGContextFromGC) /* 7 */
+ (tkIntXlibStubsPtr->xGContextFromGC) /* 9 */
+#define XListHosts \
+ (tkIntXlibStubsPtr->xListHosts) /* 10 */
#define XKeycodeToKeysym \
- (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 8 */
+ (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 11 */
#define XStringToKeysym \
- (tkIntXlibStubsPtr->xStringToKeysym) /* 9 */
+ (tkIntXlibStubsPtr->xStringToKeysym) /* 12 */
#define XRootWindow \
- (tkIntXlibStubsPtr->xRootWindow) /* 10 */
+ (tkIntXlibStubsPtr->xRootWindow) /* 13 */
#define XSetErrorHandler \
- (tkIntXlibStubsPtr->xSetErrorHandler) /* 11 */
+ (tkIntXlibStubsPtr->xSetErrorHandler) /* 14 */
+#define XIconifyWindow \
+ (tkIntXlibStubsPtr->xIconifyWindow) /* 15 */
+#define XWithdrawWindow \
+ (tkIntXlibStubsPtr->xWithdrawWindow) /* 16 */
+#define XGetWMColormapWindows \
+ (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 17 */
#define XAllocColor \
- (tkIntXlibStubsPtr->xAllocColor) /* 12 */
+ (tkIntXlibStubsPtr->xAllocColor) /* 18 */
#define XBell \
- (tkIntXlibStubsPtr->xBell) /* 13 */
+ (tkIntXlibStubsPtr->xBell) /* 19 */
#define XChangeProperty \
- (tkIntXlibStubsPtr->xChangeProperty) /* 14 */
+ (tkIntXlibStubsPtr->xChangeProperty) /* 20 */
#define XChangeWindowAttributes \
- (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 15 */
+ (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 21 */
+#define XClearWindow \
+ (tkIntXlibStubsPtr->xClearWindow) /* 22 */
#define XConfigureWindow \
- (tkIntXlibStubsPtr->xConfigureWindow) /* 16 */
+ (tkIntXlibStubsPtr->xConfigureWindow) /* 23 */
#define XCopyArea \
- (tkIntXlibStubsPtr->xCopyArea) /* 17 */
+ (tkIntXlibStubsPtr->xCopyArea) /* 24 */
#define XCopyPlane \
- (tkIntXlibStubsPtr->xCopyPlane) /* 18 */
+ (tkIntXlibStubsPtr->xCopyPlane) /* 25 */
#define XCreateBitmapFromData \
- (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 19 */
+ (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 26 */
#define XDefineCursor \
- (tkIntXlibStubsPtr->xDefineCursor) /* 20 */
+ (tkIntXlibStubsPtr->xDefineCursor) /* 27 */
+#define XDeleteProperty \
+ (tkIntXlibStubsPtr->xDeleteProperty) /* 28 */
#define XDestroyWindow \
- (tkIntXlibStubsPtr->xDestroyWindow) /* 21 */
+ (tkIntXlibStubsPtr->xDestroyWindow) /* 29 */
#define XDrawArc \
- (tkIntXlibStubsPtr->xDrawArc) /* 22 */
+ (tkIntXlibStubsPtr->xDrawArc) /* 30 */
#define XDrawLines \
- (tkIntXlibStubsPtr->xDrawLines) /* 23 */
+ (tkIntXlibStubsPtr->xDrawLines) /* 31 */
#define XDrawRectangle \
- (tkIntXlibStubsPtr->xDrawRectangle) /* 24 */
+ (tkIntXlibStubsPtr->xDrawRectangle) /* 32 */
#define XFillArc \
- (tkIntXlibStubsPtr->xFillArc) /* 25 */
+ (tkIntXlibStubsPtr->xFillArc) /* 33 */
#define XFillPolygon \
- (tkIntXlibStubsPtr->xFillPolygon) /* 26 */
+ (tkIntXlibStubsPtr->xFillPolygon) /* 34 */
#define XFillRectangles \
- (tkIntXlibStubsPtr->xFillRectangles) /* 27 */
+ (tkIntXlibStubsPtr->xFillRectangles) /* 35 */
+#define XForceScreenSaver \
+ (tkIntXlibStubsPtr->xForceScreenSaver) /* 36 */
#define XFreeColormap \
- (tkIntXlibStubsPtr->xFreeColormap) /* 28 */
+ (tkIntXlibStubsPtr->xFreeColormap) /* 37 */
#define XFreeColors \
- (tkIntXlibStubsPtr->xFreeColors) /* 29 */
+ (tkIntXlibStubsPtr->xFreeColors) /* 38 */
+#define XFreeCursor \
+ (tkIntXlibStubsPtr->xFreeCursor) /* 39 */
#define XFreeModifiermap \
- (tkIntXlibStubsPtr->xFreeModifiermap) /* 30 */
+ (tkIntXlibStubsPtr->xFreeModifiermap) /* 40 */
#define XGetGeometry \
- (tkIntXlibStubsPtr->xGetGeometry) /* 31 */
+ (tkIntXlibStubsPtr->xGetGeometry) /* 41 */
+#define XGetInputFocus \
+ (tkIntXlibStubsPtr->xGetInputFocus) /* 42 */
#define XGetWindowProperty \
- (tkIntXlibStubsPtr->xGetWindowProperty) /* 32 */
+ (tkIntXlibStubsPtr->xGetWindowProperty) /* 43 */
+#define XGetWindowAttributes \
+ (tkIntXlibStubsPtr->xGetWindowAttributes) /* 44 */
#define XGrabKeyboard \
- (tkIntXlibStubsPtr->xGrabKeyboard) /* 33 */
+ (tkIntXlibStubsPtr->xGrabKeyboard) /* 45 */
#define XGrabPointer \
- (tkIntXlibStubsPtr->xGrabPointer) /* 34 */
+ (tkIntXlibStubsPtr->xGrabPointer) /* 46 */
#define XKeysymToKeycode \
- (tkIntXlibStubsPtr->xKeysymToKeycode) /* 35 */
+ (tkIntXlibStubsPtr->xKeysymToKeycode) /* 47 */
+#define XLookupColor \
+ (tkIntXlibStubsPtr->xLookupColor) /* 48 */
#define XMapWindow \
- (tkIntXlibStubsPtr->xMapWindow) /* 36 */
+ (tkIntXlibStubsPtr->xMapWindow) /* 49 */
#define XMoveResizeWindow \
- (tkIntXlibStubsPtr->xMoveResizeWindow) /* 37 */
+ (tkIntXlibStubsPtr->xMoveResizeWindow) /* 50 */
#define XMoveWindow \
- (tkIntXlibStubsPtr->xMoveWindow) /* 38 */
+ (tkIntXlibStubsPtr->xMoveWindow) /* 51 */
+#define XNextEvent \
+ (tkIntXlibStubsPtr->xNextEvent) /* 52 */
+#define XPutBackEvent \
+ (tkIntXlibStubsPtr->xPutBackEvent) /* 53 */
+#define XQueryColors \
+ (tkIntXlibStubsPtr->xQueryColors) /* 54 */
#define XQueryPointer \
- (tkIntXlibStubsPtr->xQueryPointer) /* 39 */
+ (tkIntXlibStubsPtr->xQueryPointer) /* 55 */
+#define XQueryTree \
+ (tkIntXlibStubsPtr->xQueryTree) /* 56 */
#define XRaiseWindow \
- (tkIntXlibStubsPtr->xRaiseWindow) /* 40 */
+ (tkIntXlibStubsPtr->xRaiseWindow) /* 57 */
#define XRefreshKeyboardMapping \
- (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 41 */
+ (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 58 */
#define XResizeWindow \
- (tkIntXlibStubsPtr->xResizeWindow) /* 42 */
+ (tkIntXlibStubsPtr->xResizeWindow) /* 59 */
#define XSelectInput \
- (tkIntXlibStubsPtr->xSelectInput) /* 43 */
+ (tkIntXlibStubsPtr->xSelectInput) /* 60 */
#define XSendEvent \
- (tkIntXlibStubsPtr->xSendEvent) /* 44 */
+ (tkIntXlibStubsPtr->xSendEvent) /* 61 */
+#define XSetCommand \
+ (tkIntXlibStubsPtr->xSetCommand) /* 62 */
#define XSetIconName \
- (tkIntXlibStubsPtr->xSetIconName) /* 45 */
+ (tkIntXlibStubsPtr->xSetIconName) /* 63 */
#define XSetInputFocus \
- (tkIntXlibStubsPtr->xSetInputFocus) /* 46 */
+ (tkIntXlibStubsPtr->xSetInputFocus) /* 64 */
#define XSetSelectionOwner \
- (tkIntXlibStubsPtr->xSetSelectionOwner) /* 47 */
+ (tkIntXlibStubsPtr->xSetSelectionOwner) /* 65 */
#define XSetWindowBackground \
- (tkIntXlibStubsPtr->xSetWindowBackground) /* 48 */
+ (tkIntXlibStubsPtr->xSetWindowBackground) /* 66 */
#define XSetWindowBackgroundPixmap \
- (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 49 */
+ (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 67 */
#define XSetWindowBorder \
- (tkIntXlibStubsPtr->xSetWindowBorder) /* 50 */
+ (tkIntXlibStubsPtr->xSetWindowBorder) /* 68 */
#define XSetWindowBorderPixmap \
- (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 51 */
+ (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 69 */
#define XSetWindowBorderWidth \
- (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 52 */
+ (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 70 */
#define XSetWindowColormap \
- (tkIntXlibStubsPtr->xSetWindowColormap) /* 53 */
+ (tkIntXlibStubsPtr->xSetWindowColormap) /* 71 */
+#define XTranslateCoordinates \
+ (tkIntXlibStubsPtr->xTranslateCoordinates) /* 72 */
#define XUngrabKeyboard \
- (tkIntXlibStubsPtr->xUngrabKeyboard) /* 54 */
+ (tkIntXlibStubsPtr->xUngrabKeyboard) /* 73 */
#define XUngrabPointer \
- (tkIntXlibStubsPtr->xUngrabPointer) /* 55 */
+ (tkIntXlibStubsPtr->xUngrabPointer) /* 74 */
#define XUnmapWindow \
- (tkIntXlibStubsPtr->xUnmapWindow) /* 56 */
+ (tkIntXlibStubsPtr->xUnmapWindow) /* 75 */
+#define XWindowEvent \
+ (tkIntXlibStubsPtr->xWindowEvent) /* 76 */
+#define XDestroyIC \
+ (tkIntXlibStubsPtr->xDestroyIC) /* 77 */
+#define XFilterEvent \
+ (tkIntXlibStubsPtr->xFilterEvent) /* 78 */
+#define XmbLookupString \
+ (tkIntXlibStubsPtr->xmbLookupString) /* 79 */
#define TkPutImage \
- (tkIntXlibStubsPtr->tkPutImage) /* 57 */
+ (tkIntXlibStubsPtr->tkPutImage) /* 80 */
+#define XSetClipRectangles \
+ (tkIntXlibStubsPtr->xSetClipRectangles) /* 81 */
#define XParseColor \
- (tkIntXlibStubsPtr->xParseColor) /* 58 */
+ (tkIntXlibStubsPtr->xParseColor) /* 82 */
#define XCreateGC \
- (tkIntXlibStubsPtr->xCreateGC) /* 59 */
+ (tkIntXlibStubsPtr->xCreateGC) /* 83 */
#define XFreeGC \
- (tkIntXlibStubsPtr->xFreeGC) /* 60 */
+ (tkIntXlibStubsPtr->xFreeGC) /* 84 */
#define XInternAtom \
- (tkIntXlibStubsPtr->xInternAtom) /* 61 */
+ (tkIntXlibStubsPtr->xInternAtom) /* 85 */
#define XSetBackground \
- (tkIntXlibStubsPtr->xSetBackground) /* 62 */
+ (tkIntXlibStubsPtr->xSetBackground) /* 86 */
#define XSetForeground \
- (tkIntXlibStubsPtr->xSetForeground) /* 63 */
+ (tkIntXlibStubsPtr->xSetForeground) /* 87 */
#define XSetClipMask \
- (tkIntXlibStubsPtr->xSetClipMask) /* 64 */
+ (tkIntXlibStubsPtr->xSetClipMask) /* 88 */
#define XSetClipOrigin \
- (tkIntXlibStubsPtr->xSetClipOrigin) /* 65 */
+ (tkIntXlibStubsPtr->xSetClipOrigin) /* 89 */
#define XSetTSOrigin \
- (tkIntXlibStubsPtr->xSetTSOrigin) /* 66 */
+ (tkIntXlibStubsPtr->xSetTSOrigin) /* 90 */
#define XChangeGC \
- (tkIntXlibStubsPtr->xChangeGC) /* 67 */
+ (tkIntXlibStubsPtr->xChangeGC) /* 91 */
#define XSetFont \
- (tkIntXlibStubsPtr->xSetFont) /* 68 */
+ (tkIntXlibStubsPtr->xSetFont) /* 92 */
#define XSetArcMode \
- (tkIntXlibStubsPtr->xSetArcMode) /* 69 */
+ (tkIntXlibStubsPtr->xSetArcMode) /* 93 */
#define XSetStipple \
- (tkIntXlibStubsPtr->xSetStipple) /* 70 */
+ (tkIntXlibStubsPtr->xSetStipple) /* 94 */
#define XSetFillRule \
- (tkIntXlibStubsPtr->xSetFillRule) /* 71 */
+ (tkIntXlibStubsPtr->xSetFillRule) /* 95 */
#define XSetFillStyle \
- (tkIntXlibStubsPtr->xSetFillStyle) /* 72 */
+ (tkIntXlibStubsPtr->xSetFillStyle) /* 96 */
#define XSetFunction \
- (tkIntXlibStubsPtr->xSetFunction) /* 73 */
+ (tkIntXlibStubsPtr->xSetFunction) /* 97 */
#define XSetLineAttributes \
- (tkIntXlibStubsPtr->xSetLineAttributes) /* 74 */
+ (tkIntXlibStubsPtr->xSetLineAttributes) /* 98 */
#define _XInitImageFuncPtrs \
- (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 75 */
+ (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 99 */
#define XCreateIC \
- (tkIntXlibStubsPtr->xCreateIC) /* 76 */
+ (tkIntXlibStubsPtr->xCreateIC) /* 100 */
#define XGetVisualInfo \
- (tkIntXlibStubsPtr->xGetVisualInfo) /* 77 */
+ (tkIntXlibStubsPtr->xGetVisualInfo) /* 101 */
#define XSetWMClientMachine \
- (tkIntXlibStubsPtr->xSetWMClientMachine) /* 78 */
+ (tkIntXlibStubsPtr->xSetWMClientMachine) /* 102 */
#define XStringListToTextProperty \
- (tkIntXlibStubsPtr->xStringListToTextProperty) /* 79 */
-#define XDrawSegments \
- (tkIntXlibStubsPtr->xDrawSegments) /* 80 */
-#define XForceScreenSaver \
- (tkIntXlibStubsPtr->xForceScreenSaver) /* 81 */
+ (tkIntXlibStubsPtr->xStringListToTextProperty) /* 103 */
#define XDrawLine \
- (tkIntXlibStubsPtr->xDrawLine) /* 82 */
-#define XFillRectangle \
- (tkIntXlibStubsPtr->xFillRectangle) /* 83 */
-#define XClearWindow \
- (tkIntXlibStubsPtr->xClearWindow) /* 84 */
-#define XDrawPoint \
- (tkIntXlibStubsPtr->xDrawPoint) /* 85 */
-#define XDrawPoints \
- (tkIntXlibStubsPtr->xDrawPoints) /* 86 */
+ (tkIntXlibStubsPtr->xDrawLine) /* 104 */
#define XWarpPointer \
- (tkIntXlibStubsPtr->xWarpPointer) /* 87 */
-#define XQueryColor \
- (tkIntXlibStubsPtr->xQueryColor) /* 88 */
-#define XQueryColors \
- (tkIntXlibStubsPtr->xQueryColors) /* 89 */
-#define XQueryTree \
- (tkIntXlibStubsPtr->xQueryTree) /* 90 */
-#define XSync \
- (tkIntXlibStubsPtr->xSync) /* 91 */
-#define XTranslateCoordinates \
- (tkIntXlibStubsPtr->xTranslateCoordinates) /* 92 */
-#define XDeleteProperty \
- (tkIntXlibStubsPtr->xDeleteProperty) /* 93 */
-#define XFreeCursor \
- (tkIntXlibStubsPtr->xFreeCursor) /* 94 */
-#define XGetInputFocus \
- (tkIntXlibStubsPtr->xGetInputFocus) /* 95 */
-#define XmbLookupString \
- (tkIntXlibStubsPtr->xmbLookupString) /* 96 */
-#define XNextEvent \
- (tkIntXlibStubsPtr->xNextEvent) /* 97 */
-#define XPutBackEvent \
- (tkIntXlibStubsPtr->xPutBackEvent) /* 98 */
-#define XSetCommand \
- (tkIntXlibStubsPtr->xSetCommand) /* 99 */
-#define XWindowEvent \
- (tkIntXlibStubsPtr->xWindowEvent) /* 100 */
-#define XGetWindowAttributes \
- (tkIntXlibStubsPtr->xGetWindowAttributes) /* 101 */
-#define XGetWMColormapWindows \
- (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 102 */
-#define XIconifyWindow \
- (tkIntXlibStubsPtr->xIconifyWindow) /* 103 */
-#define XWithdrawWindow \
- (tkIntXlibStubsPtr->xWithdrawWindow) /* 104 */
-#define XListHosts \
- (tkIntXlibStubsPtr->xListHosts) /* 105 */
-#define XSetClipRectangles \
- (tkIntXlibStubsPtr->xSetClipRectangles) /* 106 */
+ (tkIntXlibStubsPtr->xWarpPointer) /* 105 */
+#define XFillRectangle \
+ (tkIntXlibStubsPtr->xFillRectangle) /* 106 */
#define XFlush \
(tkIntXlibStubsPtr->xFlush) /* 107 */
#define XGrabServer \
@@ -1773,8 +1770,8 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xNoOp) /* 111 */
#define XSynchronize \
(tkIntXlibStubsPtr->xSynchronize) /* 112 */
-#define XLookupColor \
- (tkIntXlibStubsPtr->xLookupColor) /* 113 */
+#define XSync \
+ (tkIntXlibStubsPtr->xSync) /* 113 */
#define XVisualIDFromVisual \
(tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */
/* Slot 115 is reserved */
@@ -1802,9 +1799,12 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xDrawArcs) /* 131 */
#define XDrawRectangles \
(tkIntXlibStubsPtr->xDrawRectangles) /* 132 */
-/* Slot 133 is reserved */
-/* Slot 134 is reserved */
-/* Slot 135 is reserved */
+#define XDrawSegments \
+ (tkIntXlibStubsPtr->xDrawSegments) /* 133 */
+#define XDrawPoint \
+ (tkIntXlibStubsPtr->xDrawPoint) /* 134 */
+#define XDrawPoints \
+ (tkIntXlibStubsPtr->xDrawPoints) /* 135 */
#define XReparentWindow \
(tkIntXlibStubsPtr->xReparentWindow) /* 136 */
#define XPutImage \
@@ -1821,12 +1821,9 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xGetICValues) /* 142 */
#define XSetICFocus \
(tkIntXlibStubsPtr->xSetICFocus) /* 143 */
-#define XDestroyIC \
- (tkIntXlibStubsPtr->xDestroyIC) /* 144 */
-#define XCreatePixmapCursor \
- (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 145 */
-#define XCreateGlyphCursor \
- (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 146 */
+/* Slot 144 is reserved */
+/* Slot 145 is reserved */
+/* Slot 146 is reserved */
#define XFreeFontSet \
(tkIntXlibStubsPtr->xFreeFontSet) /* 147 */
#define XCloseIM \
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 351bd0c..ddb0fa2 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -383,9 +383,9 @@ enum indices {
static void ChangeListboxOffset(Listbox *listPtr, int offset);
static void ChangeListboxView(Listbox *listPtr, int index);
static int ConfigureListbox(Tcl_Interp *interp, Listbox *listPtr,
- int objc, Tcl_Obj *const objv[]);
+ Tcl_Size objc, Tcl_Obj *const objv[]);
static int ConfigureListboxItem(Tcl_Interp *interp,
- Listbox *listPtr, ItemAttr *attrs, int objc,
+ Listbox *listPtr, ItemAttr *attrs, Tcl_Size objc,
Tcl_Obj *const objv[], int index);
static int ListboxDeleteSubCmd(Listbox *listPtr,
int first, int last);
@@ -396,7 +396,7 @@ static void DisplayListbox(void *clientData);
static int GetListboxIndex(Tcl_Interp *interp, Listbox *listPtr,
Tcl_Obj *index, int endIsSize, int *indexPtr);
static int ListboxInsertSubCmd(Listbox *listPtr,
- int index, int objc, Tcl_Obj *const objv[]);
+ int index, Tcl_Size objc, Tcl_Obj *const objv[]);
static void ListboxCmdDeletedProc(void *clientData);
static void ListboxComputeGeometry(Listbox *listPtr,
int fontChanged, int maxIsStale, int updateGrid);
@@ -419,11 +419,11 @@ static int ListboxWidgetObjCmd(void *clientData,
static int ListboxBboxSubCmd(Tcl_Interp *interp,
Listbox *listPtr, int index);
static int ListboxSelectionSubCmd(Tcl_Interp *interp,
- Listbox *listPtr, int objc, Tcl_Obj *const objv[]);
+ Listbox *listPtr, Tcl_Size objc, Tcl_Obj *const objv[]);
static int ListboxXviewSubCmd(Tcl_Interp *interp,
- Listbox *listPtr, int objc, Tcl_Obj *const objv[]);
+ Listbox *listPtr, Tcl_Size objc, Tcl_Obj *const objv[]);
static int ListboxYviewSubCmd(Tcl_Interp *interp,
- Listbox *listPtr, int objc, Tcl_Obj *const objv[]);
+ Listbox *listPtr, Tcl_Size objc, Tcl_Obj *const objv[]);
static ItemAttr * ListboxGetItemAttributes(Tcl_Interp *interp,
Listbox *listPtr, int index);
static void ListboxWorldChanged(void *instanceData);
@@ -1154,7 +1154,7 @@ static int
ListboxSelectionSubCmd(
Tcl_Interp *interp, /* Pointer to the calling Tcl interpreter */
Listbox *listPtr, /* Information about the listbox */
- int objc, /* Number of arguments in the objv array */
+ Tcl_Size objc, /* Number of arguments in the objv array */
Tcl_Obj *const objv[]) /* Array of arguments to the procedure */
{
int selCmdIndex, first, last;
@@ -1244,7 +1244,7 @@ static int
ListboxXviewSubCmd(
Tcl_Interp *interp, /* Pointer to the calling Tcl interpreter */
Listbox *listPtr, /* Information about the listbox */
- int objc, /* Number of arguments in the objv array */
+ Tcl_Size objc, /* Number of arguments in the objv array */
Tcl_Obj *const objv[]) /* Array of arguments to the procedure */
{
int index, count, windowWidth, windowUnits;
@@ -1322,7 +1322,7 @@ static int
ListboxYviewSubCmd(
Tcl_Interp *interp, /* Pointer to the calling Tcl interpreter */
Listbox *listPtr, /* Information about the listbox */
- int objc, /* Number of arguments in the objv array */
+ Tcl_Size objc, /* Number of arguments in the objv array */
Tcl_Obj *const objv[]) /* Array of arguments to the procedure */
{
int index, count;
@@ -1555,7 +1555,7 @@ ConfigureListbox(
Tcl_Interp *interp, /* Used for error reporting. */
Listbox *listPtr, /* Information about widget; may or may not
* already have values for some fields. */
- int objc, /* Number of valid entries in argv. */
+ Tcl_Size objc, /* Number of valid entries in argv. */
Tcl_Obj *const objv[]) /* Arguments. */
{
Tk_SavedOptions savedOptions;
@@ -1716,7 +1716,7 @@ ConfigureListboxItem(
Listbox *listPtr, /* Information about widget; may or may not
* already have values for some fields. */
ItemAttr *attrs, /* Information about the item to configure */
- int objc, /* Number of valid entries in argv. */
+ Tcl_Size objc, /* Number of valid entries in argv. */
Tcl_Obj *const objv[], /* Arguments. */
int index) /* Index of the listbox item being configure */
{
@@ -2320,11 +2320,11 @@ ListboxInsertSubCmd(
Listbox *listPtr, /* Listbox that is to get the new elements. */
int index, /* Add the new elements before this
* element. */
- int objc, /* Number of new elements to add. */
+ Tcl_Size objc, /* Number of new elements to add. */
Tcl_Obj *const objv[]) /* New elements (one per entry). */
{
- int i, oldMaxWidth, pixelWidth, result;
- Tcl_Size length;
+ int oldMaxWidth, pixelWidth, result;
+ Tcl_Size i, length;
Tcl_Obj *newListObj;
const char *stringRep;
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 949afca..c41715b 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -187,7 +187,7 @@ Tk_MainEx(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
abort();
} else {
@@ -247,9 +247,6 @@ Tk_MainEx(
*/
if (NULL == Tcl_GetStartupScript(NULL)) {
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- size_t length;
-#endif
/*
* Check whether first 3 args (argv[1] - argv[3]) look like
@@ -273,14 +270,6 @@ Tk_MainEx(
Tcl_SetStartupScript(NewNativeObj(argv[1]), NULL);
argc--;
i++;
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- } else if ((argc >= 2) && (length = _tcslen(argv[1]))
- && (length > 1) && (0 == _tcsncmp(TEXT("-file"), argv[1], length))
- && ('-' != argv[2][0])) {
- Tcl_SetStartupScript(NewNativeObj(argv[2]), NULL);
- argc -= 2;
- i += 2;
-#endif
}
}
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index eacdffb..44ff3b3 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -278,7 +278,7 @@ static const Tk_OptionSpec tkMenuConfigSpecs[] = {
DEF_MENU_POST_COMMAND,
offsetof(TkMenu, postCommandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MENU_RELIEF, offsetof(TkMenu, reliefPtr), TCL_INDEX_NONE, 0, NULL, 0},
+ DEF_MENU_RELIEF, TCL_INDEX_NONE, offsetof(TkMenu, relief), 0, NULL, 0},
{TK_OPTION_COLOR, "-selectcolor", "selectColor", "Background",
DEF_MENU_SELECT_COLOR, offsetof(TkMenu, indicatorFgPtr), TCL_INDEX_NONE, 0,
DEF_MENU_SELECT_MONO, 0},
@@ -857,11 +857,7 @@ MenuWidgetObjCmd(
goto error;
}
if (index < 0) {
-#if defined(TK_NO_DEPRECATED)
Tcl_SetObjResult(interp, Tcl_NewObj());
-#else
- Tcl_SetObjResult(interp, Tcl_NewStringObj("none", TCL_INDEX_NONE));
-#endif
} else {
Tcl_SetObjResult(interp, TkNewIndexObj(index));
}
diff --git a/generic/tkMenu.h b/generic/tkMenu.h
index ffe6770..fdb9ae9 100644
--- a/generic/tkMenu.h
+++ b/generic/tkMenu.h
@@ -284,7 +284,7 @@ typedef struct TkMenu {
* active element (if any). */
Tcl_Obj *activeBorderWidthPtr;
/* Width of border around active element. */
- Tcl_Obj *reliefPtr; /* 3-d effect: TK_RELIEF_RAISED, etc. */
+ int relief; /* 3-d effect: TK_RELIEF_RAISED, etc. */
Tcl_Obj *fontPtr; /* Text font for menu entries. */
Tcl_Obj *fgPtr; /* Foreground color for entries. */
Tcl_Obj *disabledFgPtr; /* Foreground color when disabled. NULL means
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c
index 62ab105..275b9f5 100644
--- a/generic/tkMenuDraw.c
+++ b/generic/tkMenuDraw.c
@@ -626,7 +626,6 @@ DisplayMenu(
int width;
int borderWidth;
Tk_3DBorder border;
- int relief;
menuPtr->menuFlags &= ~REDRAW_PENDING;
@@ -732,10 +731,9 @@ DisplayMenu(
width, height, 0, TK_RELIEF_FLAT);
}
- Tk_GetReliefFromObj(NULL, menuPtr->reliefPtr, &relief);
Tk_Draw3DRectangle(menuPtr->tkwin, Tk_WindowId(tkwin),
border, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), borderWidth,
- relief);
+ menuPtr->relief);
}
/*
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index cb37082..213f92d 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -21,13 +21,6 @@
* managed by this file:
*/
-#ifdef TK_NO_DEPRECATED
-# undef DEF_MESSAGE_PADX
-# undef DEF_MESSAGE_PADY
-# define DEF_MESSAGE_PADX NULL
-# define DEF_MESSAGE_PADY NULL
-#endif
-
typedef struct {
Tk_Window tkwin; /* Window that embodies the message. NULL
* means that the window has been destroyed
@@ -556,21 +549,17 @@ MessageWorldChanged(
Tk_GetFontMetrics(msgPtr->tkfont, &fm);
if (msgPtr->padX < 0) {
msgPtr->padX = fm.ascent / 2;
-#ifndef TK_NO_DEPRECATED
if (msgPtr->padXPtr) {
Tcl_DecrRefCount(msgPtr->padXPtr);
msgPtr->padXPtr = NULL;
}
-#endif
}
if (msgPtr->padY == -1) {
msgPtr->padY = fm.ascent / 4;
-#ifndef TK_NO_DEPRECATED
if (msgPtr->padYPtr) {
Tcl_DecrRefCount(msgPtr->padYPtr);
msgPtr->padYPtr = NULL;
}
-#endif
}
/*
diff --git a/generic/tkObj.c b/generic/tkObj.c
index 0b1e104..afcf7c8 100644
--- a/generic/tkObj.c
+++ b/generic/tkObj.c
@@ -96,35 +96,6 @@ static int SetMMFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
static int SetPixelFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
static int SetWindowFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
-#if TCL_MAJOR_VERSION < 9
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if defined(USE_TCL_STUBS)
-/* Little hack to eliminate the need for "tclInt.h" here:
- Just copy a small portion of TclIntStubs, just
- enough to make it work */
-typedef struct TclIntStubs {
- int magic;
- void *hooks;
- void (*dummy[34]) (void); /* dummy entries 0-33, not used */
- int (*tclGetIntForIndex) (Tcl_Interp *interp, Tcl_Obj *objPtr, int endValue, int *indexPtr); /* 34 */
-} TclIntStubs;
-extern const TclIntStubs *tclIntStubsPtr;
-
-# undef Tcl_GetIntForIndex
-# define Tcl_GetIntForIndex(interp, obj, max, ptr) ((tclIntStubsPtr->tclGetIntForIndex == NULL)? \
- ((int (*)(Tcl_Interp*, Tcl_Obj *, int, int*))(void *)((&(tclStubsPtr->tcl_PkgProvideEx))[645]))((interp), (obj), (max), (ptr)): \
- tclIntStubsPtr->tclGetIntForIndex((interp), (obj), (max), (ptr)))
-#elif TCL_MINOR_VERSION < 7
-extern int TclGetIntForIndex(Tcl_Interp*, Tcl_Obj *, int, int*);
-# define Tcl_GetIntForIndex(interp, obj, max, ptr) TclGetIntForIndex(interp, obj, max, ptr)
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-
/*
* The following structure defines the implementation of the "pixel" Tcl
* object, used for measuring distances. The pixel object remembers its
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index a25861d..7e902db 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -61,7 +61,7 @@ static void DeleteSpecCacheTable(void *clientData,
* will hold an error message.
*
* Side effects:
- * The fields of widgRec get filled in with information from argc/argv
+ * The fields of widgRec get filled in with information from objc/objv
* and the option database. Old information in widgRec's fields gets
* recycled. A copy of the spec-table is taken with (some of) the char*
* fields converted into Tk_Uid fields; this copy will be released when
@@ -76,8 +76,8 @@ Tk_ConfigureWidget(
Tk_Window tkwin, /* Window containing widget (needed to set up
* X resources). */
const Tk_ConfigSpec *specs, /* Describes legal options. */
- Tcl_Size argc, /* Number of elements in argv. */
- const char **argv, /* Command-line options. */
+ Tcl_Size objc, /* Number of elements in objv. */
+ Tcl_Obj *const *objv, /* Command-line options. */
void *widgRec, /* Record whose fields are to be modified.
* Values must be properly initialized. */
int flags) /* Used to specify additional flags that must
@@ -125,18 +125,10 @@ Tk_ConfigureWidget(
* match entries in the specs.
*/
- for ( ; argc > 0; argc -= 2, argv += 2) {
+ for ( ; objc > 0; objc -= 2, objv += 2) {
const char *arg;
- if (flags & TK_CONFIG_OBJS) {
- arg = Tcl_GetString((Tcl_Obj *) *argv);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- arg = *argv;
-#endif
- }
+ arg = Tcl_GetString(*objv);
specPtr = FindConfigSpec(interp, staticSpecs, arg, needFlags, hateFlags);
if (specPtr == NULL) {
return TCL_ERROR;
@@ -146,21 +138,13 @@ Tk_ConfigureWidget(
* Process the entry.
*/
- if (argc < 2) {
+ if (objc < 2) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"value for \"%s\" missing", arg));
Tcl_SetErrorCode(interp, "TK", "VALUE_MISSING", NULL);
return TCL_ERROR;
}
- if (flags & TK_CONFIG_OBJS) {
- arg = Tcl_GetString((Tcl_Obj *) argv[1]);
- } else {
-#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
- Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
-#else
- arg = argv[1];
-#endif
- }
+ arg = Tcl_GetString(objv[1]);
if (DoConfig(interp, tkwin, specPtr, arg, 0, widgRec) != TCL_OK) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (processing \"%.40s\" option)",specPtr->argvName));
diff --git a/generic/tkOldTest.c b/generic/tkOldTest.c
deleted file mode 100644
index d135958..0000000
--- a/generic/tkOldTest.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * tkOldTest.c --
- *
- * This file contains C command functions for additional Tcl
- * commands that are used to test Tk's support for legacy
- * interfaces. These commands are not normally included in Tcl/Tk
- * applications; they're only used for testing.
- *
- * Copyright © 1993-1994 The Regents of the University of California.
- * Copyright © 1994-1997 Sun Microsystems, Inc.
- * Copyright © 1998-1999 Scriptics Corporation.
- * Contributions by Don Porter, NIST, 2007. (not subject to US copyright)
- *
- * See the file "license.terms" for information on usage and redistribution of
- * this file, and for a DISCLAIMER OF ALL WARRANTIES.
- */
-
-#define USE_OLD_IMAGE
-#ifndef USE_TCL_STUBS
-# define USE_TCL_STUBS
-#endif
-#ifndef USE_TK_STUBS
-# define USE_TK_STUBS
-#endif
-#include "tkInt.h"
-
-#ifdef _WIN32
-#include "tkWinInt.h"
-#endif
-
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
-/*
- * The following data structure represents the model for a test image:
- */
-
-typedef struct TImageModel {
- Tk_ImageModel model; /* Tk's token for image model. */
- Tcl_Interp *interp; /* Interpreter for application. */
- int width, height; /* Dimensions of image. */
- char *imageName; /* Name of image (malloc-ed). */
- char *varName; /* Name of variable in which to log events for
- * image (malloc-ed). */
-} TImageModel;
-
-/*
- * The following data structure represents a particular use of a particular
- * test image.
- */
-
-typedef struct TImageInstance {
- TImageModel *modelPtr; /* Pointer to model for image. */
- XColor *fg; /* Foreground color for drawing in image. */
- GC gc; /* Graphics context for drawing in image. */
-} TImageInstance;
-
-/*
- * The type record for test images:
- */
-
-static int ImageCreate(Tcl_Interp *interp,
- char *name, Tcl_Size argc, char **argv,
- Tk_ImageType *typePtr, Tk_ImageModel model,
- ClientData *clientDataPtr);
-static ClientData ImageGet(Tk_Window tkwin, ClientData clientData);
-static void ImageDisplay(ClientData clientData,
- Display *display, Drawable drawable,
- int imageX, int imageY, int width,
- int height, int drawableX,
- int drawableY);
-static void ImageFree(ClientData clientData, Display *display);
-static void ImageDelete(ClientData clientData);
-
-static Tk_ImageType imageType = {
- "oldtest", /* name */
- (Tk_ImageCreateProc *) ImageCreate, /* createProc */
- ImageGet, /* getProc */
- ImageDisplay, /* displayProc */
- ImageFree, /* freeProc */
- ImageDelete, /* deleteProc */
- NULL, /* postscriptPtr */
- NULL, /* nextPtr */
- NULL
-};
-
-/*
- * Forward declarations for functions defined later in this file:
- */
-
-static int ImageObjCmd(ClientData dummy,
- Tcl_Interp *interp, int objc,
- Tcl_Obj * const objv[]);
-#endif
-
-/*
- *----------------------------------------------------------------------
- *
- * TkOldTestInit --
- *
- * This function performs initialization for the Tk test suite
- * extensions for testing support for legacy interfaces.
- *
- * Results:
- * Returns a standard Tcl completion code, and leaves an error message in
- * the interp's result if an error occurs.
- *
- * Side effects:
- * Creates several test commands.
- *
- *----------------------------------------------------------------------
- */
-
-int
-TkOldTestInit(
- Tcl_Interp *dummy)
-{
- static int initialized = 0;
- (void)dummy;
-
- if (!initialized) {
- initialized = 1;
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
- Tk_CreateImageType(&imageType);
-#endif
- }
- return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ImageCreate --
- *
- * This function is called by the Tk image code to create "oldtest" images.
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * The data structure for a new image is allocated.
- *
- *----------------------------------------------------------------------
- */
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
-static int
-ImageCreate(
- Tcl_Interp *interp, /* Interpreter for application containing
- * image. */
- char *name, /* Name to use for image. */
- Tcl_Size argc, /* Number of arguments. */
- char **argv, /* Argument strings for options (doesn't
- * include image name or type). */
- Tk_ImageType *typePtr, /* Pointer to our type record (not used). */
- Tk_ImageModel model, /* Token for image, to be used by us in later
- * callbacks. */
- ClientData *clientDataPtr) /* Store manager's token for image here; it
- * will be returned in later callbacks. */
-{
- TImageModel *timPtr;
- const char *varName;
- Tcl_Size i;
- (void)typePtr;
-
- varName = "log";
- for (i = 0; i < argc; i += 2) {
- if (strcmp(argv[i], "-variable") != 0) {
- Tcl_AppendResult(interp, "bad option name \"",
- argv[i], "\"", NULL);
- return TCL_ERROR;
- }
- if ((i+1) == argc) {
- Tcl_AppendResult(interp, "no value given for \"",
- argv[i], "\" option", NULL);
- return TCL_ERROR;
- }
- varName = argv[i+1];
- }
-
- timPtr = (TImageModel *)ckalloc(sizeof(TImageModel));
- timPtr->model = model;
- timPtr->interp = interp;
- timPtr->width = 30;
- timPtr->height = 15;
- timPtr->imageName = (char *)ckalloc(strlen(name) + 1);
- strcpy(timPtr->imageName, name);
- timPtr->varName = (char *)ckalloc(strlen(varName) + 1);
- strcpy(timPtr->varName, varName);
- Tcl_CreateObjCommand(interp, name, ImageObjCmd, timPtr, NULL);
- *clientDataPtr = timPtr;
- Tk_ImageChanged(model, 0, 0, 30, 15, 30, 15);
- return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ImageObjCmd --
- *
- * This function implements the commands corresponding to individual
- * images.
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * Forces windows to be created.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ImageObjCmd(
- ClientData clientData, /* Main window for application. */
- Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument strings. */
-{
- TImageModel *timPtr = (TImageModel *)clientData;
- int x, y, width, height;
-
- if (objc < 2) {
- Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
- return TCL_ERROR;
- }
- if (strcmp(Tcl_GetString(objv[1]), "changed") == 0) {
- if (objc != 8) {
- Tcl_WrongNumArgs(interp, 1, objv, "changed x y width height"
- " imageWidth imageHeight");
- return TCL_ERROR;
- }
- if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[4], &width) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[5], &height) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[6], &timPtr->width) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[7], &timPtr->height) != TCL_OK)) {
- return TCL_ERROR;
- }
- Tk_ImageChanged(timPtr->model, x, y, width, height, timPtr->width,
- timPtr->height);
- } else {
- Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
- "\": must be changed", NULL);
- return TCL_ERROR;
- }
- return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ImageGet --
- *
- * This function is called by Tk to set things up for using a test image
- * in a particular widget.
- *
- * Results:
- * The return value is a token for the image instance, which is used in
- * future callbacks to ImageDisplay and ImageFree.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-static ClientData
-ImageGet(
- Tk_Window tkwin, /* Token for window in which image will be
- * used. */
- ClientData clientData) /* Pointer to TImageModel for image. */
-{
- TImageModel *timPtr = (TImageModel *)clientData;
- TImageInstance *instPtr;
- char buffer[100];
- XGCValues gcValues;
-
- snprintf(buffer, sizeof(buffer), "%s get", timPtr->imageName);
- Tcl_SetVar2(timPtr->interp, timPtr->varName, NULL, buffer,
- TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
-
- instPtr = (TImageInstance *)ckalloc(sizeof(TImageInstance));
- instPtr->modelPtr = timPtr;
- instPtr->fg = Tk_GetColor(timPtr->interp, tkwin, "#ff0000");
- gcValues.foreground = instPtr->fg->pixel;
- instPtr->gc = Tk_GetGC(tkwin, GCForeground, &gcValues);
- return instPtr;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ImageDisplay --
- *
- * This function is invoked to redisplay part or all of an image in a
- * given drawable.
- *
- * Results:
- * None.
- *
- * Side effects:
- * The image gets partially redrawn, as an "X" that shows the exact
- * redraw area.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-ImageDisplay(
- ClientData clientData, /* Pointer to TImageInstance for image. */
- Display *display, /* Display to use for drawing. */
- Drawable drawable, /* Where to redraw image. */
- int imageX, int imageY, /* Origin of area to redraw, relative to
- * origin of image. */
- int width, int height, /* Dimensions of area to redraw. */
- int drawableX, int drawableY)
- /* Coordinates in drawable corresponding to
- * imageX and imageY. */
-{
- TImageInstance *instPtr = (TImageInstance *)clientData;
- char buffer[200 + TCL_INTEGER_SPACE * 6];
-
- snprintf(buffer, sizeof(buffer), "%s display %d %d %d %d %d %d",
- instPtr->modelPtr->imageName, imageX, imageY, width, height,
- drawableX, drawableY);
- Tcl_SetVar2(instPtr->modelPtr->interp, instPtr->modelPtr->varName, NULL,
- buffer, TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
- if (width > (instPtr->modelPtr->width - imageX)) {
- width = instPtr->modelPtr->width - imageX;
- }
- if (height > (instPtr->modelPtr->height - imageY)) {
- height = instPtr->modelPtr->height - imageY;
- }
- XDrawRectangle(display, drawable, instPtr->gc, drawableX, drawableY,
- (unsigned) (width-1), (unsigned) (height-1));
- XDrawLine(display, drawable, instPtr->gc, drawableX, drawableY,
- (int) (drawableX + width - 1), (int) (drawableY + height - 1));
- XDrawLine(display, drawable, instPtr->gc, drawableX,
- (int) (drawableY + height - 1),
- (int) (drawableX + width - 1), drawableY);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ImageFree --
- *
- * This function is called when an instance of an image is no longer
- * used.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Information related to the instance is freed.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-ImageFree(
- ClientData clientData, /* Pointer to TImageInstance for instance. */
- Display *display) /* Display where image was to be drawn. */
-{
- TImageInstance *instPtr = (TImageInstance *)clientData;
- char buffer[200];
-
- snprintf(buffer, sizeof(buffer), "%s free", instPtr->modelPtr->imageName);
- Tcl_SetVar2(instPtr->modelPtr->interp, instPtr->modelPtr->varName, NULL,
- buffer, TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
- Tk_FreeColor(instPtr->fg);
- Tk_FreeGC(display, instPtr->gc);
- ckfree(instPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ImageDelete --
- *
- * This function is called to clean up a test image when an application
- * goes away.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Information about the image is deleted.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-ImageDelete(
- ClientData clientData) /* Pointer to TImageModel for image. When
- * this function is called, no more instances
- * exist. */
-{
- TImageModel *timPtr = (TImageModel *)clientData;
- char buffer[100];
-
- snprintf(buffer, sizeof(buffer), "%s delete", timPtr->imageName);
- Tcl_SetVar2(timPtr->interp, timPtr->varName, NULL, buffer,
- TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
-
- Tcl_DeleteCommand(timPtr->interp, timPtr->imageName);
- ckfree(timPtr->imageName);
- ckfree(timPtr->varName);
- ckfree(timPtr);
-}
-#endif
-
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 4
- * fill-column: 78
- * End:
- */
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 8dc6284..baf2a70 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -122,10 +122,6 @@ static int ConfigureContent(Tcl_Interp *interp, Tk_Window tkwin,
int objc, Tcl_Obj *const objv[]);
static Tcl_FreeProc DestroyPacker;
static Packer * GetPacker(Tk_Window tkwin);
-#ifndef TK_NO_DEPRECATED
-static int PackAfter(Tcl_Interp *interp, Packer *prevPtr,
- Packer *containerPtr, int objc,Tcl_Obj *const objv[]);
-#endif /* !TK_NO_DEPRECATED */
static void PackStructureProc(void *clientData,
XEvent *eventPtr);
static void Unlink(Packer *packPtr);
@@ -199,16 +195,10 @@ Tk_PackObjCmd(
Tk_Window tkwin = (Tk_Window)clientData;
const char *argv2;
static const char *const optionStrings[] = {
-#ifndef TK_NO_DEPRECATED
- "after", "append", "before", "unpack",
-#endif /* !TK_NO_DEPRECATED */
"configure", "content", "forget", "info", "propagate", "slaves", NULL };
static const char *const optionStringsNoDep[] = {
"configure", "content", "forget", "info", "propagate", NULL };
enum options {
-#ifndef TK_NO_DEPRECATED
- PACK_AFTER, PACK_APPEND, PACK_BEFORE, PACK_UNPACK,
-#endif /* !TK_NO_DEPRECATED */
PACK_CONFIGURE, PACK_CONTENT, PACK_FORGET, PACK_INFO, PACK_PROPAGATE, PACK_SLAVES };
int index;
@@ -239,72 +229,6 @@ Tk_PackObjCmd(
argv2 = Tcl_GetString(objv[2]);
switch ((enum options) index) {
-#ifndef TK_NO_DEPRECATED
- case PACK_AFTER: {
- Packer *prevPtr;
- Tk_Window tkwin2;
-
- if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) {
- return TCL_ERROR;
- }
- prevPtr = GetPacker(tkwin2);
- if (prevPtr->containerPtr == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "window \"%s\" isn't packed", argv2));
- Tcl_SetErrorCode(interp, "TK", "PACK", "NOT_PACKED", NULL);
- return TCL_ERROR;
- }
- return PackAfter(interp, prevPtr, prevPtr->containerPtr, objc-3, objv+3);
- }
- case PACK_APPEND: {
- Packer *containerPtr;
- Packer *prevPtr;
- Tk_Window tkwin2;
-
- if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) {
- return TCL_ERROR;
- }
- containerPtr = GetPacker(tkwin2);
- prevPtr = containerPtr->contentPtr;
- if (prevPtr != NULL) {
- while (prevPtr->nextPtr != NULL) {
- prevPtr = prevPtr->nextPtr;
- }
- }
- return PackAfter(interp, prevPtr, containerPtr, objc-3, objv+3);
- }
- case PACK_BEFORE: {
- Packer *packPtr, *containerPtr;
- Packer *prevPtr;
- Tk_Window tkwin2;
-
- if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) {
- return TCL_ERROR;
- }
- packPtr = GetPacker(tkwin2);
- if (packPtr->containerPtr == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "window \"%s\" isn't packed", argv2));
- Tcl_SetErrorCode(interp, "TK", "PACK", "NOT_PACKED", NULL);
- return TCL_ERROR;
- }
- containerPtr = packPtr->containerPtr;
- prevPtr = containerPtr->contentPtr;
- if (prevPtr == packPtr) {
- prevPtr = NULL;
- } else {
- for ( ; ; prevPtr = prevPtr->nextPtr) {
- if (prevPtr == NULL) {
- Tcl_Panic("\"pack before\" couldn't find predecessor");
- }
- if (prevPtr->nextPtr == packPtr) {
- break;
- }
- }
- }
- return PackAfter(interp, prevPtr, containerPtr, objc-3, objv+3);
- }
-#endif /* !TK_NO_DEPRECATED */
case PACK_CONFIGURE:
if (argv2[0] != '.') {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -467,31 +391,6 @@ Tk_PackObjCmd(
Tcl_SetObjResult(interp, resultObj);
break;
}
-#ifndef TK_NO_DEPRECATED
- case PACK_UNPACK: {
- Tk_Window tkwin2;
- Packer *packPtr;
-
- if (objc != 3) {
- Tcl_WrongNumArgs(interp, 2, objv, "window");
- return TCL_ERROR;
- }
- if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) {
- return TCL_ERROR;
- }
- packPtr = GetPacker(tkwin2);
- if ((packPtr != NULL) && (packPtr->containerPtr != NULL)) {
- Tk_ManageGeometry(tkwin2, NULL, NULL);
- if (packPtr->containerPtr->tkwin != Tk_Parent(packPtr->tkwin)) {
- Tk_UnmaintainGeometry(packPtr->tkwin,
- packPtr->containerPtr->tkwin);
- }
- Unlink(packPtr);
- Tk_UnmapWindow(packPtr->tkwin);
- }
- break;
- }
-#endif /* !TK_NO_DEPRECATED */
}
return TCL_OK;
@@ -1078,248 +977,6 @@ GetPacker(
}
/*
- *------------------------------------------------------------------------
- *
- * PackAfter --
- *
- * This function does most of the real work of adding one or more windows
- * into the packing order for its container.
- *
- * Results:
- * A standard Tcl return value.
- *
- * Side effects:
- * The geometry of the specified windows may change, both now and again
- * in the future.
- *
- *------------------------------------------------------------------------
- */
-
-#ifndef TK_NO_DEPRECATED
-static int
-PackAfter(
- Tcl_Interp *interp, /* Interpreter for error reporting. */
- Packer *prevPtr, /* Pack windows in argv just after this
- * window; NULL means pack as first child of
- * containerPtr. */
- Packer *containerPtr, /* Container in which to pack windows. */
- int objc, /* Number of elements in objv. */
- Tcl_Obj *const objv[]) /* Array of lists, each containing 2 elements:
- * window name and side against which to
- * pack. */
-{
- Packer *packPtr;
- Tk_Window tkwin, ancestor, parent;
- Tcl_Obj **options;
- int c;
- Tcl_Size index, optionCount;
-
- /*
- * Iterate over all of the window specifiers, each consisting of two
- * arguments. The first argument contains the window name and the
- * additional arguments contain options such as "top" or "padx 20".
- */
-
- for ( ; objc > 0; objc -= 2, objv += 2, prevPtr = packPtr) {
- if (objc < 2) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "wrong # args: window \"%s\" should be followed by options",
- Tcl_GetString(objv[0])));
- Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL);
- return TCL_ERROR;
- }
-
- /*
- * Find the packer for the window to be packed, and make sure that the
- * window in which it will be packed is either its or a descendant of
- * its parent.
- */
-
- if (TkGetWindowFromObj(interp, containerPtr->tkwin, objv[0], &tkwin)
- != TCL_OK) {
- return TCL_ERROR;
- }
-
- parent = Tk_Parent(tkwin);
- for (ancestor = containerPtr->tkwin; ; ancestor = Tk_Parent(ancestor)) {
- if (ancestor == parent) {
- break;
- }
- if (((Tk_FakeWin *) (ancestor))->flags & TK_TOP_HIERARCHY) {
- badWindow:
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't pack \"%s\" inside \"%s\"", Tcl_GetString(objv[0]),
- Tk_PathName(containerPtr->tkwin)));
- Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "HIERARCHY", NULL);
- return TCL_ERROR;
- }
- }
- if (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY) {
- goto badWindow;
- }
- if (tkwin == containerPtr->tkwin) {
- goto badWindow;
- }
- packPtr = GetPacker(tkwin);
-
- /*
- * Process options for this window.
- */
-
- if (Tcl_ListObjGetElements(interp, objv[1], &optionCount, &options)
- != TCL_OK) {
- return TCL_ERROR;
- }
- packPtr->side = TOP;
- packPtr->anchor = TK_ANCHOR_CENTER;
- packPtr->padX = packPtr->padY = 0;
- packPtr->padLeft = packPtr->padTop = 0;
- packPtr->iPadX = packPtr->iPadY = 0;
- packPtr->flags &= ~(FILLX|FILLY|EXPAND);
- packPtr->flags |= OLD_STYLE;
- for (index = 0 ; index < optionCount; index++) {
- Tcl_Obj *curOptPtr = options[index];
- Tcl_Size length;
- const char *curOpt = Tcl_GetStringFromObj(curOptPtr, &length);
-
- c = curOpt[0];
-
- if ((c == 't')
- && (strncmp(curOpt, "top", length)) == 0) {
- packPtr->side = TOP;
- } else if ((c == 'b')
- && (strncmp(curOpt, "bottom", length)) == 0) {
- packPtr->side = BOTTOM;
- } else if ((c == 'l')
- && (strncmp(curOpt, "left", length)) == 0) {
- packPtr->side = LEFT;
- } else if ((c == 'r')
- && (strncmp(curOpt, "right", length)) == 0) {
- packPtr->side = RIGHT;
- } else if ((c == 'e')
- && (strncmp(curOpt, "expand", length)) == 0) {
- packPtr->flags |= EXPAND;
- } else if ((c == 'f')
- && (strcmp(curOpt, "fill")) == 0) {
- packPtr->flags |= FILLX|FILLY;
- } else if ((length == 5) && (strcmp(curOpt, "fillx")) == 0) {
- packPtr->flags |= FILLX;
- } else if ((length == 5) && (strcmp(curOpt, "filly")) == 0) {
- packPtr->flags |= FILLY;
- } else if ((c == 'p') && (strcmp(curOpt, "padx")) == 0) {
- if (optionCount <= (index+1)) {
- missingPad:
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "wrong # args: \"%s\" option must be"
- " followed by screen distance", curOpt));
- Tcl_SetErrorCode(interp, "TK", "OLDPACK", "BAD_PARAMETER",
- NULL);
- return TCL_ERROR;
- }
- if (TkParsePadAmount(interp, tkwin, options[index+1],
- &packPtr->padLeft, &packPtr->padX) != TCL_OK) {
- return TCL_ERROR;
- }
- packPtr->padX /= 2;
- packPtr->padLeft /= 2;
- packPtr->iPadX = 0;
- index++;
- } else if ((c == 'p') && (strcmp(curOpt, "pady")) == 0) {
- if (optionCount <= (index+1)) {
- goto missingPad;
- }
- if (TkParsePadAmount(interp, tkwin, options[index+1],
- &packPtr->padTop, &packPtr->padY) != TCL_OK) {
- return TCL_ERROR;
- }
- packPtr->padY /= 2;
- packPtr->padTop /= 2;
- packPtr->iPadY = 0;
- index++;
- } else if ((c == 'f') && (length > 1)
- && (strncmp(curOpt, "frame", length) == 0)) {
- if (optionCount <= (index+1)) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "wrong # args: \"frame\""
- " option must be followed by anchor point", TCL_INDEX_NONE));
- Tcl_SetErrorCode(interp, "TK", "OLDPACK", "BAD_PARAMETER",
- NULL);
- return TCL_ERROR;
- }
- if (Tk_GetAnchorFromObj(interp, options[index+1],
- &packPtr->anchor) != TCL_OK) {
- return TCL_ERROR;
- }
- index++;
- } else {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad option \"%s\": should be top, bottom, left,"
- " right, expand, fill, fillx, filly, padx, pady, or"
- " frame", curOpt));
- Tcl_SetErrorCode(interp, "TK", "OLDPACK", "BAD_PARAMETER",
- NULL);
- return TCL_ERROR;
- }
- }
-
- if (packPtr != prevPtr) {
- /*
- * Unpack this window if it's currently packed.
- */
-
- if (packPtr->containerPtr != NULL) {
- if ((packPtr->containerPtr != containerPtr) &&
- (packPtr->containerPtr->tkwin
- != Tk_Parent(packPtr->tkwin))) {
- Tk_UnmaintainGeometry(packPtr->tkwin,
- packPtr->containerPtr->tkwin);
- }
- Unlink(packPtr);
- }
-
- /*
- * Add the window in the correct place in its container's packing
- * order, then make sure that the window is managed by us.
- */
-
- packPtr->containerPtr = containerPtr;
- if (prevPtr == NULL) {
- packPtr->nextPtr = containerPtr->contentPtr;
- containerPtr->contentPtr = packPtr;
- } else {
- packPtr->nextPtr = prevPtr->nextPtr;
- prevPtr->nextPtr = packPtr;
- }
- Tk_ManageGeometry(tkwin, &packerType, packPtr);
-
- if (!(containerPtr->flags & DONT_PROPAGATE)) {
- if (TkSetGeometryContainer(interp, containerPtr->tkwin, "pack")
- != TCL_OK) {
- Tk_ManageGeometry(tkwin, NULL, NULL);
- Unlink(packPtr);
- return TCL_ERROR;
- }
- containerPtr->flags |= ALLOCED_CONTAINER;
- }
- }
- }
-
- /*
- * Arrange for the container to be re-packed at the first idle moment.
- */
-
- if (containerPtr->abortPtr != NULL) {
- *containerPtr->abortPtr = 1;
- }
- if (!(containerPtr->flags & REQUESTED_REPACK)) {
- containerPtr->flags |= REQUESTED_REPACK;
- Tcl_DoWhenIdle(ArrangePacking, containerPtr);
- }
- return TCL_OK;
-}
-#endif /* !TK_NO_DEPRECATED */
-
-/*
*----------------------------------------------------------------------
*
* Unlink --
diff --git a/generic/tkPkgConfig.c b/generic/tkPkgConfig.c
index 5050f8a..2c32a18 100644
--- a/generic/tkPkgConfig.c
+++ b/generic/tkPkgConfig.c
@@ -95,14 +95,6 @@
#endif
static const Tcl_Config cfg[] = {
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
- {"debug", CFG_DEBUG},
- {"threaded", CFG_THREADED},
- {"profiled", CFG_PROFILED},
- {"64bit", CFG_64},
- {"optimized", CFG_OPTIMIZED},
- {"mem_debug", CFG_MEMDEBUG},
-#endif
{"fontsystem", CFG_FONTSYSTEM},
/* Runtime paths to various stuff */
diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h
index 422407f..c546167 100644
--- a/generic/tkPlatDecls.h
+++ b/generic/tkPlatDecls.h
@@ -46,12 +46,6 @@ EXTERN HINSTANCE Tk_GetHINSTANCE(void);
EXTERN HWND Tk_GetHWND(Window window);
/* 3 */
EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd);
-/* 4 */
-EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y);
-/* 5 */
-EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message,
- WPARAM wParam, LPARAM lParam,
- LRESULT *result);
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
/* Slot 0 is reserved */
@@ -60,9 +54,7 @@ EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message,
/* Slot 3 is reserved */
/* 4 */
EXTERN void TkMacOSXInitAppleEvents(Tcl_Interp *interp);
-/* 5 */
-EXTERN void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y,
- int width, int height, int flags);
+/* Slot 5 is reserved */
/* 6 */
EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin);
/* Slot 7 is reserved */
@@ -94,8 +86,6 @@ typedef struct TkPlatStubs {
HINSTANCE (*tk_GetHINSTANCE) (void); /* 1 */
HWND (*tk_GetHWND) (Window window); /* 2 */
Tk_Window (*tk_HWNDToWindow) (HWND hwnd); /* 3 */
- void (*tk_PointerEvent) (HWND hwnd, int x, int y); /* 4 */
- int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
void (*reserved0)(void);
@@ -103,7 +93,7 @@ typedef struct TkPlatStubs {
void (*reserved2)(void);
void (*reserved3)(void);
void (*tkMacOSXInitAppleEvents) (Tcl_Interp *interp); /* 4 */
- void (*tkGenWMConfigureEvent_) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 5 */
+ void (*reserved5)(void);
void (*tkMacOSXInvalClipRgns) (Tk_Window tkwin); /* 6 */
void (*reserved7)(void);
void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */
@@ -139,10 +129,6 @@ extern const TkPlatStubs *tkPlatStubsPtr;
(tkPlatStubsPtr->tk_GetHWND) /* 2 */
#define Tk_HWNDToWindow \
(tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */
-#define Tk_PointerEvent \
- (tkPlatStubsPtr->tk_PointerEvent) /* 4 */
-#define Tk_TranslateWinEvent \
- (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
/* Slot 0 is reserved */
@@ -151,8 +137,7 @@ extern const TkPlatStubs *tkPlatStubsPtr;
/* Slot 3 is reserved */
#define TkMacOSXInitAppleEvents \
(tkPlatStubsPtr->tkMacOSXInitAppleEvents) /* 4 */
-#define TkGenWMConfigureEvent_ \
- (tkPlatStubsPtr->tkGenWMConfigureEvent_) /* 5 */
+/* Slot 5 is reserved */
#define TkMacOSXInvalClipRgns \
(tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */
/* Slot 7 is reserved */
@@ -185,7 +170,6 @@ extern const TkPlatStubs *tkPlatStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
-#undef TkGenWMConfigureEvent_
#define Tk_MacOSXGetNSViewForDrawable TkMacOSXGetRootControl
#endif /* _TKPLATDECLS */
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index 2162591..2bbfce8 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -171,7 +171,7 @@ Tk_ItemType tkRectangleType = {
RectOvalCoords, /* coordProc */
DeleteRectOval, /* deleteProc */
DisplayRectOval, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
RectToPoint, /* pointProc */
RectToArea, /* areaProc */
RectOvalToPostscript, /* postscriptProc */
@@ -196,7 +196,7 @@ Tk_ItemType tkOvalType = {
RectOvalCoords, /* coordProc */
DeleteRectOval, /* deleteProc */
DisplayRectOval, /* displayProc */
- TK_CONFIG_OBJS, /* flags */
+ 0, /* flags */
OvalToPoint, /* pointProc */
OvalToArea, /* areaProc */
RectOvalToPostscript, /* postscriptProc */
@@ -416,7 +416,7 @@ ConfigureRectOval(
tkwin = Tk_CanvasTkwin(canvas);
if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
- (const char **)objv, (char *) rectOvalPtr, flags|TK_CONFIG_OBJS)) {
+ objv, rectOvalPtr, flags)) {
return TCL_ERROR;
}
state = itemPtr->state;
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c
index a776488..f21af6e 100644
--- a/generic/tkScrollbar.c
+++ b/generic/tkScrollbar.c
@@ -179,12 +179,6 @@ Tk_ScrollbarObjCmd(
scrollPtr->sliderLast = 0;
scrollPtr->activeField = 0;
scrollPtr->activeRelief = TK_RELIEF_RAISED;
-#ifndef TK_NO_DEPRECATED
- scrollPtr->totalUnits = 0;
- scrollPtr->windowUnits = 0;
- scrollPtr->firstUnit = 0;
- scrollPtr->lastUnit = 0;
-#endif /* TK_NO_DEPRECATED */
scrollPtr->firstFraction = 0.0;
scrollPtr->lastFraction = 0.0;
scrollPtr->cursor = NULL;
@@ -379,16 +373,6 @@ ScrollbarWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "get");
goto error;
}
-#ifndef TK_NO_DEPRECATED
- if (scrollPtr->flags & OLD_STYLE_COMMANDS) {
- resObjs[0] = Tcl_NewWideIntObj(scrollPtr->totalUnits);
- resObjs[1] = Tcl_NewWideIntObj(scrollPtr->windowUnits);
- resObjs[2] = Tcl_NewWideIntObj(scrollPtr->firstUnit);
- resObjs[3] = Tcl_NewWideIntObj(scrollPtr->lastUnit);
- Tcl_SetObjResult(interp, Tcl_NewListObj(4, resObjs));
- break;
- }
-#endif /* TK_NO_DEPRECATED */
resObjs[0] = Tcl_NewDoubleObj(scrollPtr->firstFraction);
resObjs[1] = Tcl_NewDoubleObj(scrollPtr->lastFraction);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, resObjs));
@@ -440,48 +424,6 @@ ScrollbarWidgetObjCmd(
} else {
scrollPtr->lastFraction = last;
}
-#ifndef TK_NO_DEPRECATED
- scrollPtr->flags &= ~OLD_STYLE_COMMANDS;
- } else if (objc == 6) {
- int totalUnits, windowUnits, firstUnit, lastUnit;
- if (Tcl_GetIntFromObj(interp, objv[2], &totalUnits) != TCL_OK) {
- goto error;
- }
- if (totalUnits < 0) {
- totalUnits = 0;
- }
- if (Tcl_GetIntFromObj(interp, objv[3], &windowUnits) != TCL_OK) {
- goto error;
- }
- if (windowUnits < 0) {
- windowUnits = 0;
- }
- if (Tcl_GetIntFromObj(interp, objv[4], &firstUnit) != TCL_OK) {
- goto error;
- }
- if (Tcl_GetIntFromObj(interp, objv[5], &lastUnit) != TCL_OK) {
- goto error;
- }
- if (totalUnits > 0) {
- if (lastUnit < firstUnit) {
- lastUnit = firstUnit;
- }
- } else {
- firstUnit = lastUnit = 0;
- }
- scrollPtr->totalUnits = totalUnits;
- scrollPtr->windowUnits = windowUnits;
- scrollPtr->firstUnit = firstUnit;
- scrollPtr->lastUnit = lastUnit;
- if (scrollPtr->totalUnits == 0) {
- scrollPtr->firstFraction = 0.0;
- scrollPtr->lastFraction = 1.0;
- } else {
- scrollPtr->firstFraction = ((double) firstUnit)/totalUnits;
- scrollPtr->lastFraction = ((double) (lastUnit+1))/totalUnits;
- }
- scrollPtr->flags |= OLD_STYLE_COMMANDS;
-#endif /* !TK_NO_DEPRECATED */
} else {
Tcl_WrongNumArgs(interp, 1, objv, "set firstFraction lastFraction");
goto error;
@@ -532,7 +474,7 @@ ConfigureScrollbar(
int flags) /* Flags to pass to Tk_ConfigureWidget. */
{
if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, configSpecs, objc,
- (const char **)objv, (char *) scrollPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ objv, scrollPtr, flags) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index 6912e71..3543d4f 100644
--- a/generic/tkScrollbar.h
+++ b/generic/tkScrollbar.h
@@ -96,22 +96,6 @@ typedef struct TkScrollbar {
* the OLD_STYLE_COMMANDS flag is 1.
*/
-#ifndef TK_NO_DEPRECATED
- int totalUnits; /* Total dimension of application, in units.
- * Valid only if the OLD_STYLE_COMMANDS flag
- * is set. */
- int windowUnits; /* Maximum number of units that can be
- * displayed in the window at once. Valid only
- * if the OLD_STYLE_COMMANDS flag is set. */
- int firstUnit; /* Number of last unit visible in
- * application's window. Valid only if the
- * OLD_STYLE_COMMANDS flag is set. */
- int lastUnit; /* Index of last unit visible in window.
- * Valid only if the OLD_STYLE_COMMANDS flag
- * isn't set. */
-#else
- int dummy1,dummy2,dummy3,dummy4; /* sizeof(TkScrollbar) should not depend on TK_NO_DEPRECATED */
-#endif /* TK_NO_DEPRECATED */
double firstFraction; /* Position of first visible thing in window,
* specified as a fraction between 0 and
* 1.0. */
@@ -157,9 +141,6 @@ typedef struct TkScrollbar {
*/
#define REDRAW_PENDING 1
-#ifndef TK_NO_DEPRECATED
-# define OLD_STYLE_COMMANDS 2
-#endif /* TK_NO_DEPRECATED */
#define GOT_FOCUS 4
/*
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index b459148..8491aab 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -23,6 +23,7 @@
# define USE_TK_STUBS
#endif
#include "tkInt.h"
+#include <stdbool.h>
/*
* A data structure of the following type is kept for each square widget
@@ -53,10 +54,10 @@ typedef struct {
Tcl_Obj *reliefPtr;
GC gc; /* Graphics context for copying from
* off-screen pixmap onto screen. */
- Tcl_Obj *doubleBufferPtr; /* Non-zero means double-buffer redisplay with
- * pixmap; zero means draw straight onto the
+ bool doubleBuffer; /* true means double-buffer redisplay with
+ * pixmap; false means draw straight onto the
* display. */
- int updatePending; /* Non-zero means a call to SquareDisplay has
+ bool updatePending; /* true means a call to SquareDisplay has
* already been scheduled. */
} Square;
@@ -75,7 +76,7 @@ static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
"2", offsetof(Square, borderWidthPtr), TCL_INDEX_NONE, 0, NULL, 0},
{TK_OPTION_BOOLEAN, "-dbl", "doubleBuffer", "DoubleBuffer",
- "1", offsetof(Square, doubleBufferPtr), TCL_INDEX_NONE, 0 , NULL, 0},
+ "1", TCL_INDEX_NONE, offsetof(Square, doubleBuffer), TK_OPTION_VAR(bool) , NULL, 0},
{TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0,
"-foreground", 0},
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
@@ -280,7 +281,7 @@ SquareWidgetObjCmd(
}
if (!squarePtr->updatePending) {
Tcl_DoWhenIdle(SquareDisplay, squarePtr);
- squarePtr->updatePending = 1;
+ squarePtr->updatePending = true;
}
}
if (resultObjPtr != NULL) {
@@ -322,7 +323,6 @@ SquareConfigure(
{
int borderWidth;
Tk_3DBorder bgBorder;
- int doubleBuffer;
/*
* Set the background for the window and create a graphics context for use
@@ -333,8 +333,7 @@ SquareConfigure(
squarePtr->bgBorderPtr);
Tk_SetWindowBackground(squarePtr->tkwin,
Tk_3DBorderColor(bgBorder)->pixel);
- Tcl_GetBooleanFromObj(NULL, squarePtr->doubleBufferPtr, &doubleBuffer);
- if ((squarePtr->gc == NULL) && doubleBuffer) {
+ if ((squarePtr->gc == NULL) && squarePtr->doubleBuffer) {
XGCValues gcValues;
gcValues.function = GXcopy;
gcValues.graphics_exposures = False;
@@ -353,7 +352,7 @@ SquareConfigure(
Tk_SetInternalBorder(squarePtr->tkwin, borderWidth);
if (!squarePtr->updatePending) {
Tcl_DoWhenIdle(SquareDisplay, squarePtr);
- squarePtr->updatePending = 1;
+ squarePtr->updatePending = true;
}
KeepInWindow(squarePtr);
return TCL_OK;
@@ -387,13 +386,13 @@ SquareObjEventProc(
if (eventPtr->type == Expose) {
if (!squarePtr->updatePending) {
Tcl_DoWhenIdle(SquareDisplay, squarePtr);
- squarePtr->updatePending = 1;
+ squarePtr->updatePending = true;
}
} else if (eventPtr->type == ConfigureNotify) {
KeepInWindow(squarePtr);
if (!squarePtr->updatePending) {
Tcl_DoWhenIdle(SquareDisplay, squarePtr);
- squarePtr->updatePending = 1;
+ squarePtr->updatePending = true;
}
} else if (eventPtr->type == DestroyNotify) {
if (squarePtr->tkwin != NULL) {
@@ -478,9 +477,8 @@ SquareDisplay(
Drawable d;
int borderWidth, size, relief;
Tk_3DBorder bgBorder, fgBorder;
- int doubleBuffer;
- squarePtr->updatePending = 0;
+ squarePtr->updatePending = false;
if (!Tk_IsMapped(tkwin)) {
return;
}
@@ -489,8 +487,7 @@ SquareDisplay(
* Create a pixmap for double-buffering, if necessary.
*/
- Tcl_GetBooleanFromObj(NULL, squarePtr->doubleBufferPtr, &doubleBuffer);
- if (doubleBuffer) {
+ if (squarePtr->doubleBuffer) {
pm = Tk_GetPixmap(Tk_Display(tkwin), Tk_WindowId(tkwin),
Tk_Width(tkwin), Tk_Height(tkwin),
DefaultDepthOfScreen(Tk_Screen(tkwin)));
@@ -525,7 +522,7 @@ SquareDisplay(
* If double-buffered, copy to the screen and release the pixmap.
*/
- if (doubleBuffer) {
+ if (squarePtr->doubleBuffer) {
XCopyArea(Tk_Display(tkwin), pm, Tk_WindowId(tkwin), squarePtr->gc,
0, 0, (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin),
0, 0);
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 4e7d270..a5c6460 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -39,88 +39,26 @@ MODULE_SCOPE const TkStubs tkStubs;
* Remove macro that might interfere with the definition below.
*/
-#undef Tk_MainEx
-#undef Tk_FreeXId
-#undef Tk_FreeStyleFromObj
-#undef Tk_GetStyleFromObj
-#undef TkWinGetPlatformId
#undef TkPutImage
#undef XPutImage
-#define TkMacOSXSetUpClippingRgn (void (*)(Drawable))(void *)doNothing
-#undef TkMacOSXIsCharacterMissing
-#define TkMacOSXIsCharacterMissing (int (*)(Tk_Font, unsigned int))(void *)doNothing
-
-#if defined(_WIN32) && !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
-# define Tk_TranslateWinEvent TkTranslateWinEvent
-# define Tk_PointerEvent TkWinPointerEvent
-#define TkWinGetPlatformId winGetPlatformId
-static int TkWinGetPlatformId(void) {
- return 2;
-}
-#else
-# define Tk_TranslateWinEvent 0
-# define Tk_PointerEvent 0
-# define TkWinGetPlatformId 0
-#endif
-
-#if defined(TK_NO_DEPRECATED) || (TCL_MAJOR_VERSION > 8)
-# define TkSetWindowMenuBar 0
-# define TkpDrawHighlightBorder 0
-# define TkpUseWindow 0
-# define TkpSetMainMenubar 0
-# define TkpGetOtherWindow 0
-# define TkpGetSystemDefault 0
-# define TkpMakeContainer 0
-# define TkpMakeWindow 0
-#endif
+#if !defined(MAC_OSX_TK)
static int
doNothing(void)
{
/* dummy implementation, no need to do anything */
return 0;
}
-
-#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8
-#define Tk_MainEx 0
-#define Tk_FreeXId 0
-#define Tk_FreeStyleFromObj 0
-#define Tk_GetStyleFromObj 0
-#define TkWinGetPlatformId 0
-#define Tk_PhotoPutBlock_NoComposite 0
-#define Tk_PhotoPutZoomedBlock_NoComposite 0
-#define Tk_PhotoExpand_Panic 0
-#define Tk_PhotoPutBlock_Panic 0
-#define Tk_PhotoPutZoomedBlock_Panic 0
-#define Tk_PhotoSetSize_Panic 0
-#define Tk_CreateOldPhotoImageFormat 0
-#else
-#define Tk_FreeXId ((void (*)(Display *, XID))(void *)doNothing)
-#define Tk_FreeStyleFromObj ((void (*)(Tcl_Obj *))(void *)doNothing)
-#define Tk_GetStyleFromObj getStyleFromObj
-static Tk_Style Tk_GetStyleFromObj(Tcl_Obj *obj)
-{
- return Tk_AllocStyleFromObj(NULL, obj);
-}
-#endif /* !TK_NO_DEPRECATED */
-
-#define TkpCmapStressed_ TkpCmapStressed
-#define TkpSync_ TkpSync
-#define TkUnixContainerId_ TkUnixContainerId
-#define TkUnixDoOneXEvent_ TkUnixDoOneXEvent
-#define TkUnixSetMenubar_ TkUnixSetMenubar
-#define TkWmCleanup_ TkWmCleanup
-#define TkSendCleanup_ TkSendCleanup
-#define TkpTestsendCmd_ TkpTestsendCmd
-#define TkGenWMConfigureEvent_ TkGenWMConfigureEvent
-#define TkGenerateActivateEvents_ TkGenerateActivateEvents
-#define TkMacOSXDrawable Tk_MacOSXGetNSWindowForDrawable
-
-#if !defined(MAC_OSX_TK)
# undef TkpWillDrawWidget
# undef TkpRedrawWidget
+# undef TkpDefineNativeBitmaps
+# undef TkpCreateNativeBitmap
+# undef TkpGetNativeAppBitmap
# define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing)
# define TkpRedrawWidget ((void (*)(Tk_Window))(void *)doNothing)
+# define TkpDefineNativeBitmaps ((void (*)(void))(void *)doNothing)
+# define TkpCreateNativeBitmap ((Pixmap (*)(Display *, const void *))(void *)doNothing)
+# define TkpGetNativeAppBitmap ((Pixmap (*)(Display *, const char*, int *, int *))(void *)doNothing)
#endif
#ifdef _WIN32
@@ -358,13 +296,13 @@ static const TkIntStubs tkIntStubs = {
TkpClaimFocus, /* 57 */
TkpDisplayWarning, /* 58 */
TkpGetAppName, /* 59 */
- TkpGetOtherWindow, /* 60 */
+ 0, /* 60 */
TkpGetWrapperWindow, /* 61 */
TkpInit, /* 62 */
TkpInitializeMenuBindings, /* 63 */
- TkpMakeContainer, /* 64 */
+ 0, /* 64 */
TkpMakeMenuWindow, /* 65 */
- TkpMakeWindow, /* 66 */
+ 0, /* 66 */
TkpMenuNotifyToplevelCreate, /* 67 */
TkpOpenDisplay, /* 68 */
TkPointerEvent, /* 69 */
@@ -372,8 +310,8 @@ static const TkIntStubs tkIntStubs = {
TkPolygonToPoint, /* 71 */
TkPositionInTree, /* 72 */
TkpRedirectKeyEvent, /* 73 */
- TkpSetMainMenubar, /* 74 */
- TkpUseWindow, /* 75 */
+ 0, /* 74 */
+ 0, /* 75 */
0, /* 76 */
TkQueueEventForAllChildren, /* 77 */
TkReadBitmapFile, /* 78 */
@@ -383,7 +321,7 @@ static const TkIntStubs tkIntStubs = {
TkSelInit, /* 82 */
TkSelPropProc, /* 83 */
0, /* 84 */
- TkSetWindowMenuBar, /* 85 */
+ 0, /* 85 */
TkStringToKeysym, /* 86 */
TkThickPolyLineToArea, /* 87 */
TkWmAddToColormapWindows, /* 88 */
@@ -409,7 +347,7 @@ static const TkIntStubs tkIntStubs = {
TkGetWindowFromObj, /* 108 */
TkpGetString, /* 109 */
TkpGetSubFonts, /* 110 */
- TkpGetSystemDefault, /* 111 */
+ 0, /* 111 */
TkpMenuThreadInit, /* 112 */
XClipBox, /* 113 */
XCreateRegion, /* 114 */
@@ -419,37 +357,10 @@ static const TkIntStubs tkIntStubs = {
XSetRegion, /* 118 */
XUnionRectWithRegion, /* 119 */
0, /* 120 */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
- 0, /* 121 */
-#endif /* X11 */
-#if defined(_WIN32) /* WIN */
- 0, /* 121 */
-#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- 0, /* 121 */ /* Dummy entry for stubs table backwards compatibility */
TkpCreateNativeBitmap, /* 121 */
-#endif /* AQUA */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
- 0, /* 122 */
-#endif /* X11 */
-#if defined(_WIN32) /* WIN */
- 0, /* 122 */
-#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- 0, /* 122 */ /* Dummy entry for stubs table backwards compatibility */
TkpDefineNativeBitmaps, /* 122 */
-#endif /* AQUA */
0, /* 123 */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
- 0, /* 124 */
-#endif /* X11 */
-#if defined(_WIN32) /* WIN */
- 0, /* 124 */
-#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- 0, /* 124 */ /* Dummy entry for stubs table backwards compatibility */
TkpGetNativeAppBitmap, /* 124 */
-#endif /* AQUA */
0, /* 125 */
0, /* 126 */
0, /* 127 */
@@ -460,7 +371,7 @@ static const TkIntStubs tkIntStubs = {
0, /* 132 */
0, /* 133 */
0, /* 134 */
- TkpDrawHighlightBorder, /* 135 */
+ 0, /* 135 */
TkSetFocusWin, /* 136 */
TkpSetKeycodeAndState, /* 137 */
TkpGetKeySym, /* 138 */
@@ -519,7 +430,7 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TCL_STUB_MAGIC,
0,
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
- TkAlignImageData, /* 0 */
+ TkCreateXEventSource, /* 0 */
0, /* 1 */
TkGenerateActivateEvents, /* 2 */
TkpGetMS, /* 3 */
@@ -552,11 +463,11 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TkWinSetForegroundWindow, /* 30 */
TkWinDialogDebug, /* 31 */
TkWinGetMenuSystemDefault, /* 32 */
- TkWinGetPlatformId, /* 33 */
+ TkAlignImageData, /* 33 */
TkWinSetHINSTANCE, /* 34 */
TkWinGetPlatformTheme, /* 35 */
TkWinChildProc, /* 36 */
- TkCreateXEventSource, /* 37 */
+ 0, /* 37 */
TkpCmapStressed, /* 38 */
TkpSync, /* 39 */
TkUnixContainerId, /* 40 */
@@ -569,18 +480,18 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TkpGetCapture, /* 47 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
- TkGenerateActivateEvents, /* 0 */
- 0, /* 1 */
- TkGenerateActivateEvents_, /* 2 */
- TkPointerDeadWindow, /* 3 */
- TkpSetCapture, /* 4 */
+ 0, /* 0 */
+ TkAboutDlg, /* 1 */
+ TkGenerateActivateEvents, /* 2 */
+ TkpGetMS, /* 3 */
+ TkPointerDeadWindow, /* 4 */
TkpSetCursor, /* 5 */
- TkpWmSetState, /* 6 */
- TkAboutDlg, /* 7 */
+ TkpScanWindowId, /* 6 */
+ TkpWmSetState, /* 7 */
TkMacOSXButtonKeyState, /* 8 */
TkMacOSXClearMenubarActive, /* 9 */
TkMacOSXDispatchMenuEvent, /* 10 */
- 0, /* 11 */
+ TkpSetCapture, /* 11 */
TkMacOSXHandleTearoffMenu, /* 12 */
0, /* 13 */
TkMacOSXDoHLEvent, /* 14 */
@@ -591,7 +502,7 @@ static const TkIntPlatStubs tkIntPlatStubs = {
0, /* 19 */
0, /* 20 */
TkMacOSXInvalidateWindow, /* 21 */
- TkMacOSXIsCharacterMissing, /* 22 */
+ 0, /* 22 */
TkMacOSXMakeRealWindowExist, /* 23 */
TkMacOSXMakeStippleMap, /* 24 */
TkMacOSXMenuClick, /* 25 */
@@ -599,7 +510,7 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TkMacOSXResizable, /* 27 */
TkMacOSXSetHelpMenuItemCount, /* 28 */
TkMacOSXSetScrollbarGrow, /* 29 */
- TkMacOSXSetUpClippingRgn, /* 30 */
+ 0, /* 30 */
TkMacOSXSetUpGraphicsPort, /* 31 */
TkMacOSXUpdateClipRgn, /* 32 */
0, /* 33 */
@@ -622,25 +533,22 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TkGenerateButtonEvent, /* 50 */
TkGenWMDestroyEvent, /* 51 */
TkMacOSXSetDrawingEnabled, /* 52 */
- TkpGetMS, /* 53 */
- TkMacOSXDrawable, /* 54 */
- TkpScanWindowId, /* 55 */
#endif /* AQUA */
#if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
TkCreateXEventSource, /* 0 */
0, /* 1 */
TkGenerateActivateEvents, /* 2 */
- TkpCmapStressed, /* 3 */
- TkpSync, /* 4 */
- TkUnixContainerId, /* 5 */
- TkUnixDoOneXEvent, /* 6 */
- TkUnixSetMenubar, /* 7 */
- TkpScanWindowId, /* 8 */
- TkWmCleanup, /* 9 */
- TkSendCleanup, /* 10 */
+ 0, /* 3 */
+ 0, /* 4 */
+ 0, /* 5 */
+ TkpScanWindowId, /* 6 */
+ 0, /* 7 */
+ 0, /* 8 */
+ TkpWmSetState, /* 9 */
+ 0, /* 10 */
0, /* 11 */
- TkpWmSetState, /* 12 */
- TkpTestsendCmd_, /* 13 */
+ 0, /* 12 */
+ 0, /* 13 */
0, /* 14 */
0, /* 15 */
0, /* 16 */
@@ -665,13 +573,13 @@ static const TkIntPlatStubs tkIntPlatStubs = {
0, /* 35 */
0, /* 36 */
0, /* 37 */
- TkpCmapStressed_, /* 38 */
- TkpSync_, /* 39 */
- TkUnixContainerId_, /* 40 */
- TkUnixDoOneXEvent_, /* 41 */
- TkUnixSetMenubar_, /* 42 */
- TkWmCleanup_, /* 43 */
- TkSendCleanup_, /* 44 */
+ TkpCmapStressed, /* 38 */
+ TkpSync, /* 39 */
+ TkUnixContainerId, /* 40 */
+ TkUnixDoOneXEvent, /* 41 */
+ TkUnixSetMenubar, /* 42 */
+ TkWmCleanup, /* 43 */
+ TkSendCleanup, /* 44 */
TkpTestsendCmd, /* 45 */
#endif /* X11 */
};
@@ -848,113 +756,113 @@ static const TkIntXlibStubs tkIntXlibStubs = {
XGetAtomName, /* 4 */
XKeysymToString, /* 5 */
XCreateColormap, /* 6 */
- XGContextFromGC, /* 7 */
- XKeycodeToKeysym, /* 8 */
- XStringToKeysym, /* 9 */
- XRootWindow, /* 10 */
- XSetErrorHandler, /* 11 */
- XAllocColor, /* 12 */
- XBell, /* 13 */
- XChangeProperty, /* 14 */
- XChangeWindowAttributes, /* 15 */
- XConfigureWindow, /* 16 */
- XCopyArea, /* 17 */
- XCopyPlane, /* 18 */
- XCreateBitmapFromData, /* 19 */
- XDefineCursor, /* 20 */
- XDestroyWindow, /* 21 */
- XDrawArc, /* 22 */
- XDrawLines, /* 23 */
- XDrawRectangle, /* 24 */
- XFillArc, /* 25 */
- XFillPolygon, /* 26 */
- XFillRectangles, /* 27 */
- XFreeColormap, /* 28 */
- XFreeColors, /* 29 */
- XFreeModifiermap, /* 30 */
- XGetGeometry, /* 31 */
- XGetWindowProperty, /* 32 */
- XGrabKeyboard, /* 33 */
- XGrabPointer, /* 34 */
- XKeysymToKeycode, /* 35 */
- XMapWindow, /* 36 */
- XMoveResizeWindow, /* 37 */
- XMoveWindow, /* 38 */
- XQueryPointer, /* 39 */
- XRaiseWindow, /* 40 */
- XRefreshKeyboardMapping, /* 41 */
- XResizeWindow, /* 42 */
- XSelectInput, /* 43 */
- XSendEvent, /* 44 */
- XSetIconName, /* 45 */
- XSetInputFocus, /* 46 */
- XSetSelectionOwner, /* 47 */
- XSetWindowBackground, /* 48 */
- XSetWindowBackgroundPixmap, /* 49 */
- XSetWindowBorder, /* 50 */
- XSetWindowBorderPixmap, /* 51 */
- XSetWindowBorderWidth, /* 52 */
- XSetWindowColormap, /* 53 */
- XUngrabKeyboard, /* 54 */
- XUngrabPointer, /* 55 */
- XUnmapWindow, /* 56 */
- TkPutImage, /* 57 */
- XParseColor, /* 58 */
- XCreateGC, /* 59 */
- XFreeGC, /* 60 */
- XInternAtom, /* 61 */
- XSetBackground, /* 62 */
- XSetForeground, /* 63 */
- XSetClipMask, /* 64 */
- XSetClipOrigin, /* 65 */
- XSetTSOrigin, /* 66 */
- XChangeGC, /* 67 */
- XSetFont, /* 68 */
- XSetArcMode, /* 69 */
- XSetStipple, /* 70 */
- XSetFillRule, /* 71 */
- XSetFillStyle, /* 72 */
- XSetFunction, /* 73 */
- XSetLineAttributes, /* 74 */
- _XInitImageFuncPtrs, /* 75 */
- XCreateIC, /* 76 */
- XGetVisualInfo, /* 77 */
- XSetWMClientMachine, /* 78 */
- XStringListToTextProperty, /* 79 */
- XDrawSegments, /* 80 */
- XForceScreenSaver, /* 81 */
- XDrawLine, /* 82 */
- XFillRectangle, /* 83 */
- XClearWindow, /* 84 */
- XDrawPoint, /* 85 */
- XDrawPoints, /* 86 */
- XWarpPointer, /* 87 */
- XQueryColor, /* 88 */
- XQueryColors, /* 89 */
- XQueryTree, /* 90 */
- XSync, /* 91 */
- XTranslateCoordinates, /* 92 */
- XDeleteProperty, /* 93 */
- XFreeCursor, /* 94 */
- XGetInputFocus, /* 95 */
- XmbLookupString, /* 96 */
- XNextEvent, /* 97 */
- XPutBackEvent, /* 98 */
- XSetCommand, /* 99 */
- XWindowEvent, /* 100 */
- XGetWindowAttributes, /* 101 */
- XGetWMColormapWindows, /* 102 */
- XIconifyWindow, /* 103 */
- XWithdrawWindow, /* 104 */
- XListHosts, /* 105 */
- XSetClipRectangles, /* 106 */
+ XCreatePixmapCursor, /* 7 */
+ XCreateGlyphCursor, /* 8 */
+ XGContextFromGC, /* 9 */
+ XListHosts, /* 10 */
+ XKeycodeToKeysym, /* 11 */
+ XStringToKeysym, /* 12 */
+ XRootWindow, /* 13 */
+ XSetErrorHandler, /* 14 */
+ XIconifyWindow, /* 15 */
+ XWithdrawWindow, /* 16 */
+ XGetWMColormapWindows, /* 17 */
+ XAllocColor, /* 18 */
+ XBell, /* 19 */
+ XChangeProperty, /* 20 */
+ XChangeWindowAttributes, /* 21 */
+ XClearWindow, /* 22 */
+ XConfigureWindow, /* 23 */
+ XCopyArea, /* 24 */
+ XCopyPlane, /* 25 */
+ XCreateBitmapFromData, /* 26 */
+ XDefineCursor, /* 27 */
+ XDeleteProperty, /* 28 */
+ XDestroyWindow, /* 29 */
+ XDrawArc, /* 30 */
+ XDrawLines, /* 31 */
+ XDrawRectangle, /* 32 */
+ XFillArc, /* 33 */
+ XFillPolygon, /* 34 */
+ XFillRectangles, /* 35 */
+ XForceScreenSaver, /* 36 */
+ XFreeColormap, /* 37 */
+ XFreeColors, /* 38 */
+ XFreeCursor, /* 39 */
+ XFreeModifiermap, /* 40 */
+ XGetGeometry, /* 41 */
+ XGetInputFocus, /* 42 */
+ XGetWindowProperty, /* 43 */
+ XGetWindowAttributes, /* 44 */
+ XGrabKeyboard, /* 45 */
+ XGrabPointer, /* 46 */
+ XKeysymToKeycode, /* 47 */
+ XLookupColor, /* 48 */
+ XMapWindow, /* 49 */
+ XMoveResizeWindow, /* 50 */
+ XMoveWindow, /* 51 */
+ XNextEvent, /* 52 */
+ XPutBackEvent, /* 53 */
+ XQueryColors, /* 54 */
+ XQueryPointer, /* 55 */
+ XQueryTree, /* 56 */
+ XRaiseWindow, /* 57 */
+ XRefreshKeyboardMapping, /* 58 */
+ XResizeWindow, /* 59 */
+ XSelectInput, /* 60 */
+ XSendEvent, /* 61 */
+ XSetCommand, /* 62 */
+ XSetIconName, /* 63 */
+ XSetInputFocus, /* 64 */
+ XSetSelectionOwner, /* 65 */
+ XSetWindowBackground, /* 66 */
+ XSetWindowBackgroundPixmap, /* 67 */
+ XSetWindowBorder, /* 68 */
+ XSetWindowBorderPixmap, /* 69 */
+ XSetWindowBorderWidth, /* 70 */
+ XSetWindowColormap, /* 71 */
+ XTranslateCoordinates, /* 72 */
+ XUngrabKeyboard, /* 73 */
+ XUngrabPointer, /* 74 */
+ XUnmapWindow, /* 75 */
+ XWindowEvent, /* 76 */
+ XDestroyIC, /* 77 */
+ XFilterEvent, /* 78 */
+ XmbLookupString, /* 79 */
+ TkPutImage, /* 80 */
+ XSetClipRectangles, /* 81 */
+ XParseColor, /* 82 */
+ XCreateGC, /* 83 */
+ XFreeGC, /* 84 */
+ XInternAtom, /* 85 */
+ XSetBackground, /* 86 */
+ XSetForeground, /* 87 */
+ XSetClipMask, /* 88 */
+ XSetClipOrigin, /* 89 */
+ XSetTSOrigin, /* 90 */
+ XChangeGC, /* 91 */
+ XSetFont, /* 92 */
+ XSetArcMode, /* 93 */
+ XSetStipple, /* 94 */
+ XSetFillRule, /* 95 */
+ XSetFillStyle, /* 96 */
+ XSetFunction, /* 97 */
+ XSetLineAttributes, /* 98 */
+ _XInitImageFuncPtrs, /* 99 */
+ XCreateIC, /* 100 */
+ XGetVisualInfo, /* 101 */
+ XSetWMClientMachine, /* 102 */
+ XStringListToTextProperty, /* 103 */
+ XDrawLine, /* 104 */
+ XWarpPointer, /* 105 */
+ XFillRectangle, /* 106 */
XFlush, /* 107 */
XGrabServer, /* 108 */
XUngrabServer, /* 109 */
XFree, /* 110 */
XNoOp, /* 111 */
XSynchronize, /* 112 */
- XLookupColor, /* 113 */
+ XSync, /* 113 */
XVisualIDFromVisual, /* 114 */
0, /* 115 */
0, /* 116 */
@@ -974,9 +882,9 @@ static const TkIntXlibStubs tkIntXlibStubs = {
XFillArcs, /* 130 */
XDrawArcs, /* 131 */
XDrawRectangles, /* 132 */
- 0, /* 133 */
- 0, /* 134 */
- 0, /* 135 */
+ XDrawSegments, /* 133 */
+ XDrawPoint, /* 134 */
+ XDrawPoints, /* 135 */
XReparentWindow, /* 136 */
XPutImage, /* 137 */
XPolygonRegion, /* 138 */
@@ -985,9 +893,9 @@ static const TkIntXlibStubs tkIntXlibStubs = {
XSetICValues, /* 141 */
XGetICValues, /* 142 */
XSetICFocus, /* 143 */
- XDestroyIC, /* 144 */
- XCreatePixmapCursor, /* 145 */
- XCreateGlyphCursor, /* 146 */
+ 0, /* 144 */
+ 0, /* 145 */
+ 0, /* 146 */
XFreeFontSet, /* 147 */
XCloseIM, /* 148 */
XRegisterIMInstantiateCallback, /* 149 */
@@ -1011,8 +919,6 @@ static const TkPlatStubs tkPlatStubs = {
Tk_GetHINSTANCE, /* 1 */
Tk_GetHWND, /* 2 */
Tk_HWNDToWindow, /* 3 */
- Tk_PointerEvent, /* 4 */
- Tk_TranslateWinEvent, /* 5 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
0, /* 0 */
@@ -1020,7 +926,7 @@ static const TkPlatStubs tkPlatStubs = {
0, /* 2 */
0, /* 3 */
TkMacOSXInitAppleEvents, /* 4 */
- TkGenWMConfigureEvent_, /* 5 */
+ 0, /* 5 */
TkMacOSXInvalClipRgns, /* 6 */
0, /* 7 */
TkMacOSXGetRootControl, /* 8 */
@@ -1122,7 +1028,7 @@ const TkStubs tkStubs = {
Tk_FreeOptions, /* 74 */
Tk_FreePixmap, /* 75 */
Tk_FreeTextLayout, /* 76 */
- Tk_FreeXId, /* 77 */
+ 0, /* 77 */
Tk_GCForColor, /* 78 */
Tk_GeometryRequest, /* 79 */
Tk_Get3DBorder, /* 80 */
@@ -1163,7 +1069,7 @@ const TkStubs tkStubs = {
Tk_HandleEvent, /* 115 */
Tk_IdToWindow, /* 116 */
Tk_ImageChanged, /* 117 */
- Tk_Init, /* 118 */
+ 0, /* 118 */
Tk_InternAtom, /* 119 */
Tk_IntersectTextLayout, /* 120 */
Tk_MaintainGeometry, /* 121 */
@@ -1189,13 +1095,13 @@ const TkStubs tkStubs = {
Tk_NameToWindow, /* 141 */
Tk_OwnSelection, /* 142 */
Tk_ParseArgv, /* 143 */
- Tk_PhotoPutBlock_NoComposite, /* 144 */
- Tk_PhotoPutZoomedBlock_NoComposite, /* 145 */
+ 0, /* 144 */
+ 0, /* 145 */
Tk_PhotoGetImage, /* 146 */
Tk_PhotoBlank, /* 147 */
- Tk_PhotoExpand_Panic, /* 148 */
+ 0, /* 148 */
Tk_PhotoGetSize, /* 149 */
- Tk_PhotoSetSize_Panic, /* 150 */
+ 0, /* 150 */
Tk_PointToChar, /* 151 */
Tk_PostscriptFontName, /* 152 */
Tk_PreserveColormap, /* 153 */
@@ -1204,7 +1110,7 @@ const TkStubs tkStubs = {
Tk_ResizeWindow, /* 156 */
Tk_RestackWindow, /* 157 */
Tk_RestrictEvents, /* 158 */
- Tk_SafeInit, /* 159 */
+ 0, /* 159 */
Tk_SetAppName, /* 160 */
Tk_SetBackgroundFromBorder, /* 161 */
Tk_SetClass, /* 162 */
@@ -1257,11 +1163,11 @@ const TkStubs tkStubs = {
Tk_GetReliefFromObj, /* 209 */
Tk_GetScrollInfoObj, /* 210 */
Tk_InitOptions, /* 211 */
- Tk_MainEx, /* 212 */
+ 0, /* 212 */
Tk_RestoreSavedOptions, /* 213 */
Tk_SetOptions, /* 214 */
Tk_InitConsoleChannels, /* 215 */
- Tk_CreateConsoleWindow, /* 216 */
+ 0, /* 216 */
Tk_CreateSmoothMethod, /* 217 */
0, /* 218 */
0, /* 219 */
@@ -1291,8 +1197,8 @@ const TkStubs tkStubs = {
Tk_SetInternalBorderEx, /* 243 */
Tk_SetMinimumRequestSize, /* 244 */
Tk_SetCaretPos, /* 245 */
- Tk_PhotoPutBlock_Panic, /* 246 */
- Tk_PhotoPutZoomedBlock_Panic, /* 247 */
+ 0, /* 246 */
+ 0, /* 247 */
Tk_CollapseMotionEvents, /* 248 */
Tk_RegisterStyleEngine, /* 249 */
Tk_GetStyleEngine, /* 250 */
@@ -1303,8 +1209,8 @@ const TkStubs tkStubs = {
Tk_FreeStyle, /* 255 */
Tk_NameOfStyle, /* 256 */
Tk_AllocStyleFromObj, /* 257 */
- Tk_GetStyleFromObj, /* 258 */
- Tk_FreeStyleFromObj, /* 259 */
+ 0, /* 258 */
+ 0, /* 259 */
Tk_GetStyledElement, /* 260 */
Tk_GetElementSize, /* 261 */
Tk_GetElementBox, /* 262 */
@@ -1317,8 +1223,8 @@ const TkStubs tkStubs = {
Tk_GetUserInactiveTime, /* 269 */
Tk_ResetUserInactiveTime, /* 270 */
Tk_Interp, /* 271 */
- Tk_CreateOldImageType, /* 272 */
- Tk_CreateOldPhotoImageFormat, /* 273 */
+ 0, /* 272 */
+ 0, /* 273 */
Tk_AlwaysShowSelection, /* 274 */
Tk_GetButtonMask, /* 275 */
Tk_GetDoublePixelsFromObj, /* 276 */
diff --git a/generic/tkTest.c b/generic/tkTest.c
index b3b7146..bcafadd 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -240,7 +240,7 @@ Tktest_Init(
{
static int initialized = 0;
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return TCL_ERROR;
}
if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {
@@ -305,14 +305,6 @@ Tktest_Init(
}
/*
- * Enable testing of legacy interfaces.
- */
-
- if (TkOldTestInit(interp) != TCL_OK) {
- return TCL_ERROR;
- }
-
- /*
* And finally add any platform specific test commands.
*/
diff --git a/generic/tkText.c b/generic/tkText.c
index ddb24de..852646b 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -27,16 +27,6 @@
#include "tkWinInt.h"
#endif
-/*
- * For compatibility with Tk 4.0 through 8.4.x, we allow tabs to be
- * mis-specified with non-increasing values. These are converted into tabs
- * which are the equivalent of at least a character width apart.
- */
-
-#if (TK_MAJOR_VERSION < 9)
-#define _TK_ALLOW_DECREASING_TABS
-#endif
-
#include "tkText.h"
/*
@@ -627,9 +617,6 @@ CreateWidget(
*/
textPtr->selTagPtr = TkTextCreateTag(textPtr, "sel", NULL);
- textPtr->selTagPtr->reliefString = (char *)
- ckalloc(sizeof(DEF_TEXT_SELECT_RELIEF));
- strcpy(textPtr->selTagPtr->reliefString, DEF_TEXT_SELECT_RELIEF);
Tk_GetRelief(interp, DEF_TEXT_SELECT_RELIEF, &textPtr->selTagPtr->relief);
textPtr->currentMarkPtr = TkTextSetMark(textPtr, "current", &startIndex);
textPtr->insertMarkPtr = TkTextSetMark(textPtr, "insert", &startIndex);
@@ -2282,9 +2269,7 @@ ConfigureText(
|| (textPtr->selTagPtr->tabStringPtr != NULL)
|| (textPtr->selTagPtr->tabStyle == TK_TEXT_TABSTYLE_TABULAR)
|| (textPtr->selTagPtr->tabStyle == TK_TEXT_TABSTYLE_WORDPROCESSOR)
- || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_CHAR)
- || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_NONE)
- || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_WORD)) {
+ || (textPtr->selTagPtr->wrapMode != TEXT_WRAPMODE_NULL)) {
textPtr->selTagPtr->affectsDisplay = 1;
textPtr->selTagPtr->affectsDisplayGeometry = 1;
}
@@ -4570,27 +4555,12 @@ TkTextGetTabs(
* illegal.
*/
-#ifdef _TK_ALLOW_DECREASING_TABS
- /*
- * Force the tab to be a typical character width to the right of
- * the previous one, and update the 'lastStop' with the changed
- * position.
- */
-
- if (textPtr->charWidth > 0) {
- tabPtr->location = (tabPtr-1)->location + textPtr->charWidth;
- } else {
- tabPtr->location = (tabPtr-1)->location + 8;
- }
- lastStop = tabPtr->location;
-#else
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"tabs must be monotonically increasing, but \"%s\" is "
"smaller than or equal to the previous tab",
Tcl_GetString(objv[i])));
Tcl_SetErrorCode(interp, "TK", "VALUE", "TAB_STOP", NULL);
goto error;
-#endif /* _TK_ALLOW_DECREASING_TABS */
}
tabArrayPtr->numTabs++;
@@ -4609,7 +4579,7 @@ TkTextGetTabs(
* There may be a more efficient way of getting this.
*/
- TkUtfToUniChar(Tcl_GetString(objv[i+1]), &ch);
+ Tcl_UtfToUniChar(Tcl_GetString(objv[i+1]), &ch);
if (!Tcl_UniCharIsAlpha(ch)) {
continue;
}
@@ -6188,7 +6158,7 @@ SearchCore(
}
} else {
firstOffset = p - startOfLine +
- TkUtfToUniChar(startOfLine+matchOffset,&ch);
+ Tcl_UtfToUniChar(startOfLine+matchOffset,&ch);
}
}
} while (searchSpecPtr->all);
diff --git a/generic/tkText.h b/generic/tkText.h
index 6cdc640..bbaf6c5 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -172,7 +172,7 @@ typedef struct TkTextSegment {
Tcl_Size size; /* Size of this segment (# of bytes of index
* space it occupies). */
union {
- char chars[TCL_UTF_MAX]; /* Characters that make up character info.
+ char chars[4]; /* Characters that make up character info.
* Actual length varies to hold as many
* characters as needed.*/
TkTextToggle toggle; /* Information about tag toggle. */
@@ -342,8 +342,10 @@ typedef struct TkTextTag {
* value specified here. */
int borderWidth; /* Width of 3-D border for background. */
Tcl_Obj *borderWidthPtr; /* Width of 3-D border for background. */
+#if TK_MAJOR_VERSION < 9
char *reliefString; /* -relief option string (malloc-ed). NULL
* means option not specified. */
+#endif
int relief; /* 3-D relief for background. */
Pixmap bgStipple; /* Stipple bitmap for background. None means
* no value specified here. */
@@ -354,35 +356,57 @@ typedef struct TkTextTag {
Pixmap fgStipple; /* Stipple bitmap for text and other
* foreground stuff. None means no value
* specified here.*/
+#if TK_MAJOR_VERSION < 9
char *justifyString; /* -justify option string (malloc-ed). NULL
* means option not specified. */
+#endif
Tk_Justify justify; /* How to justify text: TK_JUSTIFY_CENTER,
- * TK_JUSTIFY_LEFT, or TK_JUSTIFY_RIGHT.
- * Only valid if justifyString is non-NULL. */
+ * TK_JUSTIFY_LEFT, or TK_JUSTIFY_RIGHT. */
+#if TK_MAJOR_VERSION > 8
+ Tcl_Obj *lMargin1Obj; /* -lmargin1 option object. NULL
+ * means option not specified. */
+#else
char *lMargin1String; /* -lmargin1 option string (malloc-ed). NULL
* means option not specified. */
+#endif
int lMargin1; /* Left margin for first display line of each
* text line, in pixels. INT_MIN means option not specified. */
+#if TK_MAJOR_VERSION > 8
+ Tcl_Obj *lMargin2Obj; /* -lmargin2 option object. NULL
+ * means option not specified. */
+#else
char *lMargin2String; /* -lmargin2 option string (malloc-ed). NULL
* means option not specified. */
+#endif
int lMargin2; /* Left margin for second and later display lines
* of each text line, in pixels. INT_MIN means option not specified. */
Tk_3DBorder lMarginColor; /* Used for drawing background in left margins.
* This is used for both lmargin1 and lmargin2.
* NULL means no value specified here. */
+#if TK_MAJOR_VERSION > 8
+ Tcl_Obj *offsetObj; /* -offset option. NULL means option not specified. */
+#else
char *offsetString; /* -offset option string (malloc-ed). NULL
* means option not specified. */
+#endif
int offset; /* Vertical offset of text's baseline from
* baseline of line. Used for superscripts and
* subscripts. INT_MIN means option not specified. */
+#if TK_MAJOR_VERSION < 9
char *overstrikeString; /* -overstrike option string (malloc-ed). NULL
* means option not specified. */
+#endif
int overstrike; /* > 0 means draw horizontal line through
* middle of text. -1 means not specified. */
XColor *overstrikeColor; /* Color for the overstrike. NULL means same
* color as foreground. */
+#if TK_MAJOR_VERSION > 8
+ Tcl_Obj *rMarginObj; /* -rmargin option object. NULL
+ * means option not specified. */
+#else
char *rMarginString; /* -rmargin option string (malloc-ed). NULL
* means option not specified. */
+#endif
int rMargin; /* Right margin for text, in pixels. INT_MIN means option not specified. */
Tk_3DBorder rMarginColor; /* Used for drawing background in right margin.
* NULL means no value specified here. */
@@ -390,16 +414,31 @@ typedef struct TkTextTag {
* NULL means no value specified here. */
XColor *selFgColor; /* Foreground color for selected text. NULL means
* no value specified here. */
+#if TK_MAJOR_VERSION > 8
+ Tcl_Obj *spacing1Obj; /* -spacing1 option object. NULL
+ * means option not specified. */
+#else
char *spacing1String; /* -spacing1 option string (malloc-ed). NULL
* means option not specified. */
+#endif
int spacing1; /* Extra spacing above first display line for
* text line. INT_MIN means option not specified. */
+#if TK_MAJOR_VERSION > 8
+ Tcl_Obj *spacing2Obj; /* -spacing2 option object. NULL
+ * means option not specified. */
+#else
char *spacing2String; /* -spacing2 option string (malloc-ed). NULL
* means option not specified. */
+#endif
int spacing2; /* Extra spacing between display lines for the
* same text line. INT_MIN means option not specified. */
+#if TK_MAJOR_VERSION > 8
+ Tcl_Obj *spacing3Obj; /* -spacing3 option object. NULL
+ * means option not specified. */
+#else
char *spacing3String; /* -spacing3 option string (malloc-ed). NULL
* means option not specified. */
+#endif
int spacing3; /* Extra spacing below last display line for
* text line. INT_MIN means option not specified. */
Tcl_Obj *tabStringPtr; /* -tabs option string. NULL means option not
@@ -407,10 +446,15 @@ typedef struct TkTextTag {
struct TkTextTabArray *tabArrayPtr;
/* Info about tabs for tag (malloc-ed) or
* NULL. Corresponds to tabString. */
- TkTextTabStyle tabStyle; /* One of TK_TEXT_TABSTYLE_TABULAR, TK_TEXT_TABSTYLE_WORDPROCESSOR
- * or TK_TEXT_TABSTYLE_NONE. (if not specified)*/
+#if TK_MAJOR_VERSION > 8
+ TkTextTabStyle tabStyle; /* One of TK_TEXT_TABSTYLE_TABULAR or TK_TEXT_TABSTYLE_WORDPROCESSOR
+ * or TK_TEXT_TABSTYLE_NULL (if not specified). */
+#else
+ int tabStyle; /* One of TABULAR or WORDPROCESSOR or NONE (if
+ * not specified). */
char *underlineString; /* -underline option string (malloc-ed). NULL
* means option not specified. */
+#endif
int underline; /* > 0 means draw underline underneath
* text. -1 means not specified. */
XColor *underlineColor; /* Color for the underline. NULL means same
@@ -419,8 +463,10 @@ typedef struct TkTextTag {
* Must be TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_WORD,
* TEXT_WRAPMODE_NONE, or TEXT_WRAPMODE_NULL to
* use wrapmode for whole widget. */
+#if TK_MAJOR_VERSION < 9
char *elideString; /* -elide option string (malloc-ed). NULL
* means option not specified. */
+#endif
int elide; /* > 0 means that data under this tag
* should not be displayed. -1 means not specified. */
int affectsDisplay; /* Non-zero means that this tag affects the
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 99f897b..9a827fc 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -615,7 +615,7 @@ static void DlineIndexOfX(TkText *textPtr,
static int DlineXOfIndex(TkText *textPtr,
DLine *dlPtr, int byteIndex);
static int TextGetScrollInfoObj(Tcl_Interp *interp,
- TkText *textPtr, int objc,
+ TkText *textPtr, Tcl_Size objc,
Tcl_Obj *const objv[], double *dblPtr,
int *intPtr);
static void AsyncUpdateLineMetrics(void *clientData);
@@ -985,9 +985,7 @@ GetStyle(
styleValues.elide = tagPtr->elide > 0;
elidePrio = tagPtr->priority;
}
- if (((tagPtr->wrapMode == TEXT_WRAPMODE_CHAR)
- || (tagPtr->wrapMode == TEXT_WRAPMODE_NONE)
- || (tagPtr->wrapMode == TEXT_WRAPMODE_WORD))
+ if ((tagPtr->wrapMode != TEXT_WRAPMODE_NULL)
&& (tagPtr->priority > wrapPrio)) {
styleValues.wrapMode = tagPtr->wrapMode;
wrapPrio = tagPtr->priority;
@@ -7705,7 +7703,7 @@ TkTextCharLayoutProc(
if (bytesThatFit + 1 <= maxBytes) {
if ((bytesThatFit == 0) && noCharsYet) {
int ch;
- int chLen = TkUtfToUniChar(p, &ch);
+ int chLen = Tcl_UtfToUniChar(p, &ch);
#ifdef TK_LAYOUT_WITH_BASE_CHUNKS
bytesThatFit = CharChunkMeasureChars(chunkPtr, line,
@@ -8785,7 +8783,7 @@ static int
TextGetScrollInfoObj(
Tcl_Interp *interp, /* Used for error reporting. */
TkText *textPtr, /* Information about the text widget. */
- int objc, /* # arguments for command. */
+ Tcl_Size objc, /* # arguments for command. */
Tcl_Obj *const objv[], /* Arguments for command. */
double *dblPtr, /* Filled in with argument "moveto" option, if
* any. */
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index c6d83d1..c05a9b7 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -48,14 +48,6 @@ static int IndexCountBytesOrdered(const TkText *textPtr,
const TkTextIndex *indexPtr1,
const TkTextIndex *indexPtr2);
-#if defined(USE_TCL_STUBS) && (TCL_MAJOR_VERSION < 9)
-# undef Tcl_UtfPrev
-# define Tcl_UtfPrev (((&tclStubsPtr->tcl_PkgProvideEx)[631]) ? \
- ((const char * (*)(const char *, const char *))(void *)((&tclStubsPtr->tcl_PkgProvideEx)[656])) \
- : ((const char * (*)(const char *, const char *))(void *)((&tclStubsPtr->tcl_PkgProvideEx)[331])))
-#endif
-
-
/*
* The "textindex" Tcl_Obj definition:
*/
@@ -451,7 +443,7 @@ TkTextMakeByteIndex(
start = segPtr->body.chars + (byteIndex - index);
p = Tcl_UtfPrev(start, segPtr->body.chars);
- p += TkUtfToUniChar(p, &ch);
+ p += Tcl_UtfToUniChar(p, &ch);
indexPtr->byteIndex += p - start;
}
break;
@@ -1665,7 +1657,7 @@ TkTextIndexForwChars(
if (segPtr->typePtr == &tkTextCharType) {
start = segPtr->body.chars + byteOffset;
end = segPtr->body.chars + segPtr->size;
- for (p = start; p < end; p += TkUtfToUniChar(p, &ch)) {
+ for (p = start; p < end; p += Tcl_UtfToUniChar(p, &ch)) {
if (charCount == 0) {
dstPtr->byteIndex += (p - start);
goto forwardCharDone;
@@ -2397,7 +2389,7 @@ StartEnd(
if (segPtr->typePtr == &tkTextCharType) {
int ch;
- chSize = TkUtfToUniChar(segPtr->body.chars + offset, &ch);
+ chSize = Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch);
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}
@@ -2442,7 +2434,7 @@ StartEnd(
if (segPtr->typePtr == &tkTextCharType) {
int ch;
- TkUtfToUniChar(segPtr->body.chars + offset, &ch);
+ Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch);
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index e00f7c4..b53dfd6 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -16,228 +16,6 @@
#include "tkText.h"
#include "default.h"
-/* This struct can be used for booleans, relief and pixels */
-typedef struct {
- char *string;
- int value;
-} IntStruct;
-
-typedef struct {
- char *string;
- Tk_Justify value;
-} JustifyStruct;
-
-static int
-ObjectIsEmpty(
- Tcl_Obj *objPtr) /* Object to test. May be NULL. */
-{
- if (objPtr == NULL) {
- return 1;
- }
- if (objPtr->bytes == NULL) {
- Tcl_GetString(objPtr);
- }
- return (objPtr->length == 0);
-}
-
-#define OPTION_NONNEG (1 << 10)
-
-static int
-SetPixels(
- TCL_UNUSED(void *),
- Tcl_Interp *interp,
- Tk_Window tkwin,
- Tcl_Obj **value,
- char *recordPtr,
- Tcl_Size internalOffset,
- char *oldInternalPtr,
- int flags)
-{
- IntStruct pixel = {NULL, INT_MIN};
- IntStruct *internalPtr = (IntStruct *)(recordPtr + internalOffset);
- int nullOK = (flags & TK_OPTION_NULL_OK);
-
- if (!nullOK || !ObjectIsEmpty(*value)) {
- if (Tk_GetPixelsFromObj(nullOK ? NULL : interp, tkwin, *value, &pixel.value) != TCL_OK) {
- if (nullOK) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "expected screen distance or \"\" but got \"%.50s\"", Tcl_GetString(*value)));
- Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
- }
- return TCL_ERROR;
- }
- if ((flags & OPTION_NONNEG) && pixel.value < 0) {
- pixel.value = 0;
- }
- pixel.string = ckalloc((*value)->length + 1);
- strcpy(pixel.string, (*value)->bytes);
- }
-
- *((char **)oldInternalPtr) = NULL;
- *internalPtr = pixel;
- return TCL_OK;
-};
-
-static int
-SetBoolean(
- TCL_UNUSED(void *),
- Tcl_Interp *interp,
- TCL_UNUSED(Tk_Window),
- Tcl_Obj **value,
- char *recordPtr,
- Tcl_Size internalOffset,
- char *oldInternalPtr,
- int flags)
-{
- IntStruct booleanVal = {NULL, -1};
- IntStruct *internalPtr = (IntStruct *)(recordPtr + internalOffset);
- int nullOK = (flags & TK_OPTION_NULL_OK);
-
- if (!nullOK || !ObjectIsEmpty(*value)) {
- if (Tcl_GetBooleanFromObj(nullOK ? NULL : interp, *value, &booleanVal.value) != TCL_OK) {
- if (nullOK) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "expected boolean value or \"\" but got \"%s\"", Tcl_GetString(*value)));
- }
- return TCL_ERROR;
- }
- booleanVal.string = ckalloc((*value)->length + 1);
- strcpy(booleanVal.string, (*value)->bytes);
- }
-
- *((char **)oldInternalPtr) = NULL;
- *internalPtr = booleanVal;
- return TCL_OK;
-};
-
-static int
-SetRelief(
- TCL_UNUSED(void *),
- Tcl_Interp *interp,
- TCL_UNUSED(Tk_Window),
- Tcl_Obj **value,
- char *recordPtr,
- Tcl_Size internalOffset,
- char *oldInternalPtr,
- int flags)
-{
- IntStruct relief = {NULL, TK_RELIEF_NULL};
- IntStruct *internalPtr = (IntStruct *)(recordPtr + internalOffset);
- int nullOK = (flags & TK_OPTION_NULL_OK);
-
- if (!nullOK || !ObjectIsEmpty(*value)) {
- if (Tk_GetReliefFromObj(nullOK ? NULL : interp, *value, &relief.value) != TCL_OK) {
- if (nullOK) {
- Tcl_AppendResult(interp, "bad relief \"",
- Tcl_GetString(*value), "\": must be flat, groove, raised, ridge, solid, sunken, or \"\"", NULL);
- }
- return TCL_ERROR;
- }
- relief.string = ckalloc((*value)->length + 1);
- strcpy(relief.string, (*value)->bytes);
- }
-
- *((char **)oldInternalPtr) = NULL;
- *internalPtr = relief;
- return TCL_OK;
-};
-
-static int
-SetJustify(
- TCL_UNUSED(void *),
- Tcl_Interp *interp,
- TCL_UNUSED(Tk_Window),
- Tcl_Obj **value,
- char *recordPtr,
- Tcl_Size internalOffset,
- char *oldInternalPtr,
- int flags)
-{
- JustifyStruct justify = {NULL, TK_JUSTIFY_NULL};
- JustifyStruct *internalPtr = (JustifyStruct *)(recordPtr + internalOffset);
- int nullOK = (flags & TK_OPTION_NULL_OK);
-
- if (!nullOK || !ObjectIsEmpty(*value)) {
- if (Tk_GetJustifyFromObj(nullOK ? NULL : interp, *value, &justify.value) != TCL_OK) {
- if (nullOK) {
- Tcl_AppendResult(interp, "bad justification \"",
- Tcl_GetString(*value), "\": must be left, right, center, or \"\"", NULL);
- }
- return TCL_ERROR;
- }
- justify.string = ckalloc((*value)->length + 1);
- strcpy(justify.string, (*value)->bytes);
- }
-
- *((char **)oldInternalPtr) = NULL;
- *internalPtr = justify;
- return TCL_OK;
-};
-
-static Tcl_Obj *GetStruct(
- TCL_UNUSED(void *),
- TCL_UNUSED(Tk_Window),
- char *recordPtr,
- Tcl_Size internalOffset)
-{
- char **structPtr = (char **)(recordPtr + internalOffset);
-
- if (*structPtr == NULL || **structPtr == '\0') {
- return Tcl_NewObj();
- }
- return Tcl_NewStringObj(*structPtr, TCL_INDEX_NONE);
-};
-
-
-static void
-FreeStruct(
- TCL_UNUSED(void *),
- TCL_UNUSED(Tk_Window),
- char *internalPtr)
-{
- char **structPtr = (char **)internalPtr;
- if (*structPtr) {
- ckfree(*structPtr);
- *structPtr = NULL;
- }
-};
-
-static const Tk_ObjCustomOption pixelsOption = {
- "pixels", /* name */
- SetPixels, /* setProc */
- GetStruct, /* getProc */
- NULL, /* restoreProc */
- FreeStruct, /* freeProc */
- 0
-};
-
-static const Tk_ObjCustomOption booleanOption = {
- "boolean", /* name */
- SetBoolean, /* setProc */
- GetStruct, /* getProc */
- NULL, /* restoreProc */
- FreeStruct, /* freeProc */
- 0
-};
-
-static const Tk_ObjCustomOption justifyOption = {
- "justify", /* name */
- SetJustify, /* setProc */
- GetStruct, /* getProc */
- NULL, /* restoreProc */
- FreeStruct, /* freeProc */
- 0
-};
-
-static const Tk_ObjCustomOption reliefOption = {
- "relief", /* name */
- SetRelief, /* setProc */
- GetStruct, /* getProc */
- NULL, /* restoreProc */
- FreeStruct, /* freeProc */
- 0
-};
-
static const Tk_OptionSpec tagOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, border), TK_OPTION_NULL_OK, 0, 0},
@@ -246,55 +24,55 @@ static const Tk_OptionSpec tagOptionSpecs[] = {
{TK_OPTION_PIXELS, "-borderwidth", NULL, NULL,
NULL, offsetof(TkTextTag, borderWidthPtr), offsetof(TkTextTag, borderWidth),
TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_CUSTOM, "-elide", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, elideString),
- TK_OPTION_NULL_OK, &booleanOption, 0},
+ {TK_OPTION_BOOLEAN, "-elide", NULL, NULL,
+ NULL, TCL_INDEX_NONE, offsetof(TkTextTag, elide),
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BITMAP, "-fgstipple", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, fgStipple), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_FONT, "-font", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, tkfont), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-foreground", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, fgColor), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_CUSTOM, "-justify", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, justifyString), TK_OPTION_NULL_OK, &justifyOption,0},
- {TK_OPTION_CUSTOM, "-lmargin1", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, lMargin1String), TK_OPTION_NULL_OK,&pixelsOption,0},
- {TK_OPTION_CUSTOM, "-lmargin2", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, lMargin2String), TK_OPTION_NULL_OK,&pixelsOption,0},
+ {TK_OPTION_JUSTIFY, "-justify", NULL, NULL,
+ NULL, TCL_INDEX_NONE, offsetof(TkTextTag, justify), TK_OPTION_NULL_OK, 0,0},
+ {TK_OPTION_PIXELS, "-lmargin1", NULL, NULL,
+ NULL, offsetof(TkTextTag, lMargin1Obj), offsetof(TkTextTag, lMargin1), TK_OPTION_NULL_OK,0,0},
+ {TK_OPTION_PIXELS, "-lmargin2", NULL, NULL,
+ NULL, offsetof(TkTextTag, lMargin2Obj), offsetof(TkTextTag, lMargin2), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_BORDER, "-lmargincolor", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, lMarginColor), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_CUSTOM, "-offset", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, offsetString), TK_OPTION_NULL_OK, &pixelsOption, 0},
- {TK_OPTION_CUSTOM, "-overstrike", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, overstrikeString),
- TK_OPTION_NULL_OK, &booleanOption, 0},
+ {TK_OPTION_PIXELS, "-offset", NULL, NULL,
+ NULL, offsetof(TkTextTag, offsetObj), offsetof(TkTextTag, offset), TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_BOOLEAN, "-overstrike", NULL, NULL,
+ NULL, TCL_INDEX_NONE, offsetof(TkTextTag, overstrike),
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-overstrikefg", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, overstrikeColor),
TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_CUSTOM, "-relief", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, reliefString), TK_OPTION_NULL_OK, &reliefOption, 0},
- {TK_OPTION_CUSTOM, "-rmargin", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, rMarginString), TK_OPTION_NULL_OK, &pixelsOption,0},
+ {TK_OPTION_RELIEF, "-relief", NULL, NULL,
+ NULL, TCL_INDEX_NONE, offsetof(TkTextTag, relief), TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_PIXELS, "-rmargin", NULL, NULL,
+ NULL, offsetof(TkTextTag, rMarginObj), offsetof(TkTextTag, rMargin), TK_OPTION_NULL_OK, 0,0},
{TK_OPTION_BORDER, "-rmargincolor", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, rMarginColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, selBorder), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-selectforeground", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, selFgColor), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_CUSTOM, "-spacing1", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, spacing1String), TK_OPTION_NULL_OK|OPTION_NONNEG, &pixelsOption,0},
- {TK_OPTION_CUSTOM, "-spacing2", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, spacing2String), TK_OPTION_NULL_OK|OPTION_NONNEG, &pixelsOption,0},
- {TK_OPTION_CUSTOM, "-spacing3", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, spacing3String), TK_OPTION_NULL_OK|OPTION_NONNEG, &pixelsOption,0},
+ {TK_OPTION_PIXELS, "-spacing1", NULL, NULL,
+ NULL, offsetof(TkTextTag, spacing1Obj), offsetof(TkTextTag, spacing1), TK_OPTION_NULL_OK,0,0},
+ {TK_OPTION_PIXELS, "-spacing2", NULL, NULL,
+ NULL, offsetof(TkTextTag, spacing2Obj), offsetof(TkTextTag, spacing2), TK_OPTION_NULL_OK,0,0},
+ {TK_OPTION_PIXELS, "-spacing3", NULL, NULL,
+ NULL, offsetof(TkTextTag, spacing3Obj), offsetof(TkTextTag, spacing3), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-tabs", NULL, NULL,
NULL, offsetof(TkTextTag, tabStringPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-tabstyle", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, tabStyle),
TK_OPTION_NULL_OK|TK_OPTION_ENUM_VAR, tkTextTabStyleStrings, 0},
- {TK_OPTION_CUSTOM, "-underline", NULL, NULL,
- NULL, TCL_INDEX_NONE, offsetof(TkTextTag, underlineString),
- TK_OPTION_NULL_OK, &booleanOption, 0},
+ {TK_OPTION_BOOLEAN, "-underline", NULL, NULL,
+ NULL, TCL_INDEX_NONE, offsetof(TkTextTag, underline),
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-underlinefg", NULL, NULL,
NULL, TCL_INDEX_NONE, offsetof(TkTextTag, underlineColor),
TK_OPTION_NULL_OK, 0, 0},
@@ -392,12 +170,12 @@ TkTextTagCmd(
*/
textPtr->sharedTextPtr->stateEpoch++;
}
- for (i = 4; i < objc; i += 2) {
+ for (i = 4; i < (Tcl_Size)objc; i += 2) {
if (TkTextGetObjIndex(interp, textPtr, objv[i],
&index1) != TCL_OK) {
return TCL_ERROR;
}
- if (objc > (i+1)) {
+ if ((Tcl_Size)objc > (i+1)) {
if (TkTextGetObjIndex(interp, textPtr, objv[i+1],
&index2) != TCL_OK) {
return TCL_ERROR;
@@ -573,6 +351,8 @@ TkTextTagCmd(
Tcl_SetObjResult(interp, objPtr);
return TCL_OK;
} else {
+ int result = TCL_OK;
+
if (Tk_SetOptions(interp, tagPtr, tagPtr->optionTable,
objc-4, objv+4, textPtr->tkwin, NULL, NULL) != TCL_OK) {
return TCL_ERROR;
@@ -588,6 +368,21 @@ TkTextTagCmd(
if (tagPtr->borderWidth < 0) {
tagPtr->borderWidth = 0;
}
+ if (tagPtr->spacing1 != INT_MIN) {
+ if (tagPtr->spacing1 < 0) {
+ tagPtr->spacing1 = 0;
+ }
+ }
+ if (tagPtr->spacing2 != INT_MIN) {
+ if (tagPtr->spacing2 < 0) {
+ tagPtr->spacing2 = 0;
+ }
+ }
+ if (tagPtr->spacing3 != INT_MIN) {
+ if (tagPtr->spacing3 < 0) {
+ tagPtr->spacing3 = 0;
+ }
+ }
if (tagPtr->tabArrayPtr != NULL) {
ckfree(tagPtr->tabArrayPtr);
tagPtr->tabArrayPtr = NULL;
@@ -647,9 +442,7 @@ TkTextTagCmd(
|| (tagPtr->tabStringPtr != NULL)
|| (tagPtr->tabStyle == TK_TEXT_TABSTYLE_TABULAR)
|| (tagPtr->tabStyle == TK_TEXT_TABSTYLE_WORDPROCESSOR)
- || (tagPtr->wrapMode == TEXT_WRAPMODE_CHAR)
- || (tagPtr->wrapMode == TEXT_WRAPMODE_NONE)
- || (tagPtr->wrapMode == TEXT_WRAPMODE_WORD)) {
+ || (tagPtr->wrapMode != TEXT_WRAPMODE_NULL)) {
tagPtr->affectsDisplay = 1;
tagPtr->affectsDisplayGeometry = 1;
}
@@ -683,7 +476,7 @@ TkTextTagCmd(
TkTextRedrawTag(textPtr->sharedTextPtr, NULL,
NULL, NULL, tagPtr, 1);
}
- return TCL_OK;
+ return result;
}
break;
}
@@ -694,7 +487,7 @@ TkTextTagCmd(
Tcl_WrongNumArgs(interp, 3, objv, "tagName ?tagName ...?");
return TCL_ERROR;
}
- for (i = 3; i < objc; i++) {
+ for (i = 3; i < (Tcl_Size)objc; i++) {
hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->tagTable,
Tcl_GetString(objv[i]));
if (hPtr == NULL) {
@@ -798,7 +591,7 @@ TkTextTagCmd(
for (i = 0; i < arraySize; i++) {
tagPtr = arrayPtr[i];
Tcl_ListObjAppendElement(interp, listObj,
- Tcl_NewStringObj(tagPtr->name, TCL_INDEX_NONE));
+ Tcl_NewStringObj(tagPtr->name,-1));
}
Tcl_SetObjResult(interp, listObj);
ckfree(arrayPtr);
@@ -1150,42 +943,37 @@ TkTextCreateTag(
tagPtr->border = NULL;
tagPtr->borderWidth = 0;
tagPtr->borderWidthPtr = NULL;
- tagPtr->reliefString = NULL;
tagPtr->relief = TK_RELIEF_NULL;
tagPtr->bgStipple = None;
tagPtr->fgColor = NULL;
tagPtr->tkfont = NULL;
tagPtr->fgStipple = None;
- tagPtr->justifyString = NULL;
tagPtr->justify = TK_JUSTIFY_NULL;
- tagPtr->lMargin1String = NULL;
+ tagPtr->lMargin1Obj = NULL;
tagPtr->lMargin1 = INT_MIN;
- tagPtr->lMargin2String = NULL;
+ tagPtr->lMargin2Obj = NULL;
tagPtr->lMargin2 = INT_MIN;
tagPtr->lMarginColor = NULL;
- tagPtr->offsetString = NULL;
+ tagPtr->offsetObj = NULL;
tagPtr->offset = INT_MIN;
- tagPtr->overstrikeString = NULL;
tagPtr->overstrike = -1;
tagPtr->overstrikeColor = NULL;
- tagPtr->rMarginString = NULL;
+ tagPtr->rMarginObj = NULL;
tagPtr->rMargin = INT_MIN;
tagPtr->rMarginColor = NULL;
tagPtr->selBorder = NULL;
tagPtr->selFgColor = NULL;
- tagPtr->spacing1String = NULL;
+ tagPtr->spacing1Obj = NULL;
tagPtr->spacing1 = INT_MIN;
- tagPtr->spacing2String = NULL;
+ tagPtr->spacing2Obj = NULL;
tagPtr->spacing2 = INT_MIN;
- tagPtr->spacing3String = NULL;
+ tagPtr->spacing3Obj = NULL;
tagPtr->spacing3 = INT_MIN;
tagPtr->tabStringPtr = NULL;
tagPtr->tabArrayPtr = NULL;
tagPtr->tabStyle = TK_TEXT_TABSTYLE_NULL;
- tagPtr->underlineString = NULL;
tagPtr->underline = -1;
tagPtr->underlineColor = NULL;
- tagPtr->elideString = NULL;
tagPtr->elide = -1;
tagPtr->wrapMode = TEXT_WRAPMODE_NULL;
tagPtr->affectsDisplay = 0;
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 13b91d3..b52bfe7 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -1246,80 +1246,6 @@ Tk_SendVirtualEvent(
Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL);
}
-/* Tcl 8.6 has a different definition of Tcl_UniChar than other Tcl versions for TCL_UTF_MAX > 3 */
-#if TCL_UTF_MAX <= (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6))
-/*
- *---------------------------------------------------------------------------
- *
- * TkUtfToUniChar --
- *
- * Almost the same as Tcl_UtfToUniChar but using int instead of Tcl_UniChar.
- * This function is capable of collapsing a upper/lower surrogate pair to a
- * single unicode character. So, up to 6 bytes might be consumed.
- *
- * Results:
- * *chPtr is filled with the Tcl_UniChar, and the return value is the
- * number of bytes from the UTF-8 string that were consumed.
- *
- * Side effects:
- * None.
- *
- *---------------------------------------------------------------------------
- */
-
-size_t
-TkUtfToUniChar(
- const char *src, /* The UTF-8 string. */
- int *chPtr) /* Filled with the Unicode value represented by
- * the UTF-8 string. */
-{
- Tcl_UniChar uniChar = 0;
-
- size_t len = Tcl_UtfToUniChar(src, &uniChar);
- if ((uniChar & 0xFC00) == 0xD800) {
- Tcl_UniChar low = uniChar;
- /* This can only happen if sizeof(Tcl_UniChar)== 2 and src points
- * to a character > U+FFFF */
- size_t len2 = Tcl_UtfToUniChar(src+len, &low);
- if ((low & 0xFC00) == 0xDC00) {
- *chPtr = (((uniChar & 0x3FF) << 10) | (low & 0x3FF)) + 0x10000;
- return len + len2;
- }
- }
- *chPtr = uniChar;
- return len;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkUniCharToUtf --
- *
- * Almost the same as Tcl_UniCharToUtf but producing 2 x 3-byte UTF-8
- * sequences for out-of-bmp characters when TCL_UTF_MAX==3.
- * So, up to 6 bytes might be produced.
- *
- * Results:
- * *buf is filled with the UTF-8 string, and the return value is the
- * number of bytes produced.
- *
- * Side effects:
- * None.
- *
- *---------------------------------------------------------------------------
- */
-
-size_t TkUniCharToUtf(int ch, char *buf)
-{
- if ((unsigned)(ch - 0x10000) <= 0xFFFFF) {
- /* Spit out a 4-byte UTF-8 character or 2 x 3-byte UTF-8 characters, depending on Tcl
- * version and/or TCL_UTF_MAX build value */
- int len = Tcl_UniCharToUtf(0xD800 | ((ch - 0x10000) >> 10), buf);
- return len + Tcl_UniCharToUtf(0xDC00 | (ch & 0x7FF), buf + len);
- }
- return Tcl_UniCharToUtf(ch, buf);
-}
-#endif
/*
* Local Variables:
* mode: c
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 37cda60..258ef3a 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -1028,7 +1028,7 @@ TkCreateMainWindow(
#ifdef STATIC_BUILD
".static"
#endif
-#if TCL_UTF_MAX <= (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6))
+#if TCL_UTF_MAX < 4
".utf-16"
#endif
#if defined(_WIN32)
@@ -3181,7 +3181,7 @@ Initialize(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return TCL_ERROR;
}
@@ -3381,7 +3381,14 @@ Initialize(
visualObj = NULL;
}
- code = TkListCreateFrame(NULL, interp, cmd, 1, nameObj);
+ Tcl_Size objc;
+ Tcl_Obj **objv;
+
+ if (TCL_OK != Tcl_ListObjGetElements(interp, cmd, &objc, &objv)) {
+ return TCL_ERROR;
+ }
+ code = TkCreateFrame(NULL, interp, objc, objv,
+ 1, nameObj ? Tcl_GetString(nameObj) : NULL);
Tcl_DecrRefCount(cmd);
diff --git a/generic/ttk/ttk.decls b/generic/ttk/ttk.decls
index 1c98b23..7826c99 100644
--- a/generic/ttk/ttk.decls
+++ b/generic/ttk/ttk.decls
@@ -143,8 +143,8 @@ declare 35 {
#
# Utilities.
#
-declare 40 {deprecated {}} {
- int Ttk_GetOrientFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient)
+declare 40 {
+ int Ttk_GetOrientFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *orient)
}
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index e541001..fca1065 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -549,7 +549,7 @@ static const Ttk_ElementSpec IndicatorElementSpec = {
typedef struct {
Tcl_Obj *lightColorObj;
Tcl_Obj *borderColorObj;
- Tcl_Obj *gripCountObj;
+ Tcl_Obj *gripSizeObj;
} GripElement;
static const Ttk_ElementOptionSpec GripElementOptions[] = {
@@ -557,8 +557,8 @@ static const Ttk_ElementOptionSpec GripElementOptions[] = {
offsetof(GripElement,lightColorObj), LIGHT_COLOR },
{ "-bordercolor", TK_OPTION_COLOR,
offsetof(GripElement,borderColorObj), DARKEST_COLOR },
- { "-gripcount", TK_OPTION_PIXELS,
- offsetof(GripElement,gripCountObj), "5" },
+ { "-gripsize", TK_OPTION_PIXELS,
+ offsetof(GripElement,gripSizeObj), "7.5p" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
};
@@ -571,8 +571,7 @@ static void GripElementSize(
GripElement *grip = (GripElement *)elementRecord;
int gripSize = 0;
- Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
- gripSize *= 2;
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
if (orient == TTK_ORIENT_HORIZONTAL) {
*widthPtr = gripSize;
} else {
@@ -593,8 +592,7 @@ static void GripElementDraw(
int gripPad = 1, gripSize = 0;
int i;
- Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
- gripSize *= 2;
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
if (orient == TTK_ORIENT_HORIZONTAL) {
int x = b.x + (b.width - gripSize) / 2;
@@ -637,7 +635,7 @@ typedef struct { /* Common element record for scrollbar elements */
Tcl_Obj *darkColorObj;
Tcl_Obj *arrowColorObj;
Tcl_Obj *arrowSizeObj;
- Tcl_Obj *gripCountObj;
+ Tcl_Obj *gripSizeObj;
Tcl_Obj *sliderlengthObj;
} ScrollbarElement;
@@ -658,8 +656,8 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
offsetof(ScrollbarElement,arrowColorObj), "#000000" },
{ "-arrowsize", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) },
- { "-gripcount", TK_OPTION_PIXELS,
- offsetof(ScrollbarElement,gripCountObj), "5" },
+ { "-gripsize", TK_OPTION_PIXELS,
+ offsetof(ScrollbarElement,gripSizeObj), "7.5p" },
{ "-sliderlength", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,sliderlengthObj), "30" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
@@ -728,9 +726,8 @@ static void ThumbElementDraw(
/*
* Draw grip:
*/
- TtkGetOrientFromObj(NULL, sb->orientObj, &orient);
- Tk_GetPixelsFromObj(NULL, tkwin, sb->gripCountObj, &gripSize);
- gripSize *= 2;
+ Ttk_GetOrientFromObj(NULL, sb->orientObj, &orient);
+ Tk_GetPixelsFromObj(NULL, tkwin, sb->gripSizeObj, &gripSize);
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
@@ -777,7 +774,7 @@ static void SliderElementSize(
Ttk_Orient orient;
length = thickness = SCROLLBAR_THICKNESS;
- TtkGetOrientFromObj(NULL, sb->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, sb->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &thickness);
Tk_GetPixelsFromObj(NULL, tkwin, sb->sliderlengthObj, &length);
if (orient == TTK_ORIENT_VERTICAL) {
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index 1caa475..4d42448 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -223,7 +223,7 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = {
offsetof(IndicatorElement,colorObj), DEFAULT_BACKGROUND },
{ "-indicatorrelief", TK_OPTION_RELIEF,
offsetof(IndicatorElement,reliefObj), "raised" },
- { "-indicatordiameter", TK_OPTION_PIXELS,
+ { "-indicatorsize", TK_OPTION_PIXELS,
offsetof(IndicatorElement,sizeObj), "9p" },
{ "-indicatormargin", TK_OPTION_STRING,
offsetof(IndicatorElement,marginObj), "0 2 4 2" },
@@ -583,7 +583,7 @@ static void SliderElementSize(
Ttk_Orient orient;
int length, thickness;
- TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, slider->lengthObj, &length);
Tk_GetPixelsFromObj(NULL, tkwin, slider->thicknessObj, &thickness);
@@ -614,7 +614,7 @@ static void SliderElementDraw(
Ttk_Orient orient;
border = Tk_Get3DBorderFromObj(tkwin, slider->borderObj);
- TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth);
Tk_GetReliefFromObj(NULL, slider->reliefObj, &relief);
diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h
index 2b074ac..9c40904 100644
--- a/generic/ttk/ttkDecls.h
+++ b/generic/ttk/ttkDecls.h
@@ -13,11 +13,7 @@ extern const char *TtkInitializeStubs(
interp, TTK_VERSION, TTK_STUBS_EPOCH, TTK_STUBS_REVISION)
#else
-#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
-# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "Ttk", TTK_VERSION, 0, NULL)
-#else
-# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "ttk", TTK_VERSION, 0, NULL)
-#endif
+#define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "ttk", TTK_VERSION, 0, NULL)
#endif
@@ -143,9 +139,8 @@ TTKAPI Tcl_Obj * Ttk_NewBoxObj(Ttk_Box box);
/* Slot 38 is reserved */
/* Slot 39 is reserved */
/* 40 */
-TTK_DEPRECATED("")
-int Ttk_GetOrientFromObj(Tcl_Interp *interp,
- Tcl_Obj *objPtr, int *orient);
+TTKAPI int Ttk_GetOrientFromObj(Tcl_Interp *interp,
+ Tcl_Obj *objPtr, Ttk_Orient *orient);
typedef struct TtkStubs {
int magic;
@@ -193,7 +188,7 @@ typedef struct TtkStubs {
void (*reserved37)(void);
void (*reserved38)(void);
void (*reserved39)(void);
- TCL_DEPRECATED_API("") int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient); /* 40 */
+ int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *orient); /* 40 */
} TtkStubs;
extern const TtkStubs *ttkStubsPtr;
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index cfbe1f1..c774d43 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -1063,7 +1063,7 @@ static void ThumbElementSize(
int size;
Tk_GetPixelsFromObj(NULL, tkwin, thumb->sizeObj, &size);
- TtkGetOrientFromObj(NULL, thumb->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, thumb->orientObj, &orient);
if (orient == TTK_ORIENT_VERTICAL) {
*widthPtr = size;
@@ -1158,7 +1158,7 @@ static void SliderElementSize(
Ttk_Orient orient;
int thickness, borderWidth;
- TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth);
Tk_GetPixelsFromObj(NULL, tkwin, slider->thicknessObj, &thickness);
@@ -1220,7 +1220,7 @@ typedef struct {
static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = {
{ "-foreground", TK_OPTION_COLOR,
offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND },
- { "-diameter", TK_OPTION_PIXELS,
+ { "-size", TK_OPTION_PIXELS,
offsetof(TreeitemIndicator,sizeObj), "6.75p" },
{ "-indicatormargins", TK_OPTION_STRING,
offsetof(TreeitemIndicator,marginObj), "2 2 4 2" },
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index 24be5e7..3791f87 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -505,7 +505,7 @@ static void GeneralSeparatorElementDraw(
SeparatorElement *separator = (SeparatorElement *)elementRecord;
Ttk_Orient orient;
- TtkGetOrientFromObj(NULL, separator->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, separator->orientObj, &orient);
switch (orient) {
case TTK_ORIENT_HORIZONTAL:
HorizontalSeparatorElementDraw(
@@ -1216,7 +1216,7 @@ static void TroughElementDraw(
Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->borderWidthObj, &borderWidth);
Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->grooveWidthObj, &grooveWidth);
Tk_GetReliefFromObj(NULL, troughPtr->reliefObj, &relief);
- TtkGetOrientFromObj(NULL, troughPtr->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, troughPtr->orientObj, &orient);
if (grooveWidth > 0 && grooveWidth < b.height && grooveWidth < b.width) {
if (orient == TTK_ORIENT_HORIZONTAL) {
@@ -1285,7 +1285,7 @@ static void ThumbElementSize(
int thickness;
Tk_GetPixelsFromObj(NULL, tkwin, thumb->thicknessObj, &thickness);
- TtkGetOrientFromObj(NULL, thumb->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, thumb->orientObj, &orient);
if (orient == TTK_ORIENT_VERTICAL) {
*widthPtr = thickness;
@@ -1414,7 +1414,7 @@ static void SliderElementDraw(
* Fill the thin trough area preceding the
* slider's center with the inner color
*/
- TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient);
switch (orient) {
case TTK_ORIENT_HORIZONTAL:
XFillRectangle(disp, d, gc, troughInnerBox.x, troughInnerBox.y,
@@ -1550,7 +1550,7 @@ static void PbarElementSize(
Ttk_Orient orient;
int thickness = 15, length = 30, borderWidth = 2;
- TtkGetOrientFromObj(NULL, pbar->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, pbar->thicknessObj, &thickness);
Tk_GetPixelsFromObj(NULL, tkwin, pbar->lengthObj, &length);
Tk_GetPixelsFromObj(NULL, tkwin, pbar->borderWidthObj, &borderWidth);
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 8f26432..36baffe 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -300,8 +300,8 @@ static char *EntryDisplayString(const char *showChar, int numChars)
int ch;
char buf[6];
- TkUtfToUniChar(showChar, &ch);
- size = TkUniCharToUtf(ch, buf);
+ Tcl_UtfToUniChar(showChar, &ch);
+ size = Tcl_UniCharToUtf(ch, buf);
p = displayString = (char *)ckalloc(numChars * size + 1);
while (numChars--) {
@@ -458,7 +458,7 @@ ExpandPercents(
*/
++templ; /* skip over % */
if (*templ != '\0') {
- templ += TkUtfToUniChar(templ, &ch);
+ templ += Tcl_UtfToUniChar(templ, &ch);
} else {
ch = '%';
}
@@ -508,7 +508,7 @@ ExpandPercents(
string = Tk_PathName(entryPtr->core.tkwin);
break;
default:
- length = TkUniCharToUtf(ch, numStorage);
+ length = Tcl_UniCharToUtf(ch, numStorage);
numStorage[length] = '\0';
string = numStorage;
break;
diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c
index 716c477..fcc069b 100644
--- a/generic/ttk/ttkInit.c
+++ b/generic/ttk/ttkInit.c
@@ -55,17 +55,7 @@ const char *const ttkOrientStrings[] = {
"horizontal", "vertical", NULL
};
-#if !defined(TK_NO_DEPRECATED) && TK_MAJOR_VERSION < 9
int Ttk_GetOrientFromObj(
- Tcl_Interp *interp, Tcl_Obj *objPtr, int *resultPtr)
-{
- *resultPtr = TTK_ORIENT_HORIZONTAL;
- return Tcl_GetIndexFromObj(interp, objPtr, ttkOrientStrings,
- "orientation", 0, resultPtr);
-}
-#endif
-
-int TtkGetOrientFromObj(
Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *resultPtr)
{
int orient = (int)TTK_ORIENT_HORIZONTAL;
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index f038829..1903367 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -54,11 +54,7 @@ static const Ttk_ElementOptionSpec TextElementOptions[] = {
{ "-foreground", TK_OPTION_COLOR,
offsetof(TextElement,foregroundObj), "black" },
{ "-underline", TK_OPTION_INDEX,
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
- offsetof(TextElement,underlineObj), "-1"},
-#else
offsetof(TextElement,underlineObj), NULL},
-#endif
{ "-width", TK_OPTION_INT,
offsetof(TextElement,widthObj), "-1"},
{ "-anchor", TK_OPTION_ANCHOR,
@@ -529,11 +525,7 @@ static const Ttk_ElementOptionSpec LabelElementOptions[] = {
{ "-foreground", TK_OPTION_COLOR,
offsetof(LabelElement,text.foregroundObj), "black" },
{ "-underline", TK_OPTION_INDEX,
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
offsetof(LabelElement,text.underlineObj), "-1"},
-#else
- offsetof(LabelElement,text.underlineObj), NULL},
-#endif
{ "-width", TK_OPTION_INT,
offsetof(LabelElement,text.widthObj), ""},
{ "-anchor", TK_OPTION_ANCHOR,
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 4b75e19..c08179f 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -1123,10 +1123,9 @@ static int NotebookIdentifyCommand(
}
break;
case IDENTIFY_TAB:
-#if !defined TK_NO_DEPRECATED && (TCL_MAJOR_VERSION < 9)
- if (tabIndex >= 0)
-#endif
- Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex));
+ if (tabIndex >= 0) {
+ Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex));
+ }
break;
}
return TCL_OK;
@@ -1151,10 +1150,9 @@ static int NotebookIndexCommand(
status = FindTabIndex(interp, nb, objv[2], &index);
if (status == TCL_OK) {
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
- if (index >= 0)
-#endif
- Tcl_SetObjResult(interp, TkNewIndexObj(index));
+ if (index >= 0) {
+ Tcl_SetObjResult(interp, TkNewIndexObj(index));
+ }
}
return status;
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index 62b11a4..4e268d9 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -850,7 +850,7 @@ static int PanedSashposCommand(
}
if (sashIndex < 0 || sashIndex >= Ttk_NumberContent(pw->paned.mgr) - 1) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "sash index %" TCL_LL_MODIFIER "d out of range", sashIndex));
+ "sash index %" TCL_SIZE_MODIFIER "d out of range", sashIndex));
Tcl_SetErrorCode(interp, "TTK", "PANE", "SASH_INDEX", NULL);
return TCL_ERROR;
}
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index cfffc42..50f786a 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -303,7 +303,7 @@ static int ProgressbarSize(void *recordPtr, int *widthPtr, int *heightPtr)
/* Override requested width (height) based on -length and -orient
*/
Tk_GetPixelsFromObj(NULL, pb->core.tkwin, pb->progress.lengthObj, &length);
- TtkGetOrientFromObj(NULL, pb->progress.orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, pb->progress.orientObj, &orient);
if (orient == TTK_ORIENT_HORIZONTAL) {
*widthPtr = length;
@@ -376,7 +376,7 @@ static void ProgressbarDoLayout(void *recordPtr)
Tcl_GetDoubleFromObj(NULL, pb->progress.valueObj, &value);
Tcl_GetDoubleFromObj(NULL, pb->progress.maximumObj, &maximum);
- TtkGetOrientFromObj(NULL, pb->progress.orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, pb->progress.orientObj, &orient);
if (pbar) {
double fraction = value / maximum;
diff --git a/generic/ttk/ttkStubInit.c b/generic/ttk/ttkStubInit.c
index 51acf3a..9d7d4fc 100644
--- a/generic/ttk/ttkStubInit.c
+++ b/generic/ttk/ttkStubInit.c
@@ -8,10 +8,6 @@
MODULE_SCOPE const TtkStubs ttkStubs;
-#if defined(TK_NO_DEPRECATED) || TK_MAJOR_VERSION > 8
-#define Ttk_GetOrientFromObj 0
-#endif
-
#ifdef __GNUC__
/*
* The rest of this file shouldn't warn about deprecated functions; they're
diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h
index a0a27cd..6fe7cb0 100644
--- a/generic/ttk/ttkTheme.h
+++ b/generic/ttk/ttkTheme.h
@@ -367,9 +367,6 @@ typedef enum { /* -orient option values */
TTK_ORIENT_VERTICAL
} Ttk_Orient;
-MODULE_SCOPE int TtkGetOrientFromObj(Tcl_Interp *interp,
- Tcl_Obj *objPtr, Ttk_Orient *orient);
-
/*------------------------------------------------------------------------
* +++ Utilities.
*/
diff --git a/generic/ttk/ttkThemeInt.h b/generic/ttk/ttkThemeInt.h
index 23bbcd6..8758f85 100644
--- a/generic/ttk/ttkThemeInt.h
+++ b/generic/ttk/ttkThemeInt.h
@@ -43,10 +43,6 @@ MODULE_SCOPE void TtkSetBlinkCursorTimes(Tcl_Interp* interp);
MODULE_SCOPE int TtkBoxEqual(Ttk_Box, Ttk_Box);
-#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
-# define TTK_OPTION_UNDERLINE_DEF(type, field) "-1", offsetof(type, field), TCL_INDEX_NONE, 0, NULL
-#else
-# define TTK_OPTION_UNDERLINE_DEF(type, field) NULL, offsetof(type, field), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL
-#endif
+#define TTK_OPTION_UNDERLINE_DEF(type, field) NULL, offsetof(type, field), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL
#endif /* _TTKTHEMEINT */
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 5cb34f1..3af1094 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -3256,6 +3256,50 @@ static int TreeviewDetachCommand(
return TCL_OK;
}
+/* Is an item detached? The root is never detached. */
+static int IsDetached(Treeview *tv, TreeItem *item)
+{
+ return item->next == NULL && item->prev == NULL &&
+ item->parent == NULL && item != tv->tree.root;
+}
+
+/* + $tv detached ?$item? --
+ * List detached items (in arbitrary order) or query the detached state of
+ * $item.
+ */
+static int TreeviewDetachedCommand(
+ void *recordPtr, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+{
+ Treeview *tv = (Treeview *)recordPtr;
+ TreeItem *item;
+
+ if (objc == 2) {
+ /* List detached items */
+ Tcl_HashSearch search;
+ Tcl_HashEntry *entryPtr = Tcl_FirstHashEntry(&tv->tree.items, &search);
+ Tcl_Obj *objPtr = Tcl_NewObj();
+
+ while (entryPtr != NULL) {
+ item = (TreeItem *)Tcl_GetHashValue(entryPtr);
+ entryPtr = Tcl_NextHashEntry(&search);
+ if (IsDetached(tv, item)) {
+ Tcl_ListObjAppendElement(NULL, objPtr, ItemID(tv, item));
+ }
+ }
+ Tcl_SetObjResult(interp, objPtr);
+ return TCL_OK;
+ } else if (objc == 3) {
+ /* Query; the root is never reported as detached */
+ if (!(item = FindItem(interp, tv, objv[2]))) {
+ return TCL_ERROR;
+ }
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(IsDetached(tv, item)));
+ return TCL_OK;
+ } else {
+ Tcl_WrongNumArgs(interp, 2, objv, "?item?");
+ return TCL_ERROR;
+ }
+}
/* + $tv delete $items --
* Delete each item in $items.
*
@@ -4366,6 +4410,7 @@ static const Ttk_Ensemble TreeviewCommands[] = {
{ "configure", TtkWidgetConfigureCommand,0 },
{ "delete", TreeviewDeleteCommand,0 },
{ "detach", TreeviewDetachCommand,0 },
+ { "detached", TreeviewDetachedCommand,0 },
{ "drag", TreeviewDragCommand,0 },
{ "drop", TreeviewDropCommand,0 },
{ "exists", TreeviewExistsCommand,0 },
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index 21315be..8fcde07 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -484,7 +484,7 @@ Ttk_Layout TtkWidgetGetOrientedLayout(
/* Prefix:
*/
- TtkGetOrientFromObj(NULL, orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, orientObj, &orient);
if (orient == TTK_ORIENT_HORIZONTAL)
Tcl_DStringAppend(&styleName, "Horizontal.", TCL_INDEX_NONE);
else
diff --git a/library/demos/anilabel.tcl b/library/demos/anilabel.tcl
index be1b402..6662f9a 100644
--- a/library/demos/anilabel.tcl
+++ b/library/demos/anilabel.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .anilabel
catch {destroy $w}
diff --git a/library/demos/aniwave.tcl b/library/demos/aniwave.tcl
index 1f7e8f3..50de429 100644
--- a/library/demos/aniwave.tcl
+++ b/library/demos/aniwave.tcl
@@ -8,7 +8,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .aniwave
catch {destroy $w}
diff --git a/library/demos/arrow.tcl b/library/demos/arrow.tcl
index 5674be9..e30406b 100644
--- a/library/demos/arrow.tcl
+++ b/library/demos/arrow.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# scl --
# Scales an integer according to the display's current scaling percentage.
diff --git a/library/demos/bind.tcl b/library/demos/bind.tcl
index 8b56639..179310a 100644
--- a/library/demos/bind.tcl
+++ b/library/demos/bind.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .bind
catch {destroy $w}
diff --git a/library/demos/bitmap.tcl b/library/demos/bitmap.tcl
index 453987d..2787efa 100644
--- a/library/demos/bitmap.tcl
+++ b/library/demos/bitmap.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# bitmapRow --
# Create a row of bitmap items in a window.
diff --git a/library/demos/browse b/library/demos/browse
index d107f28..e401034 100644
--- a/library/demos/browse
+++ b/library/demos/browse
@@ -7,7 +7,7 @@ exec wish "$0" ${1+"$@"}
# directory and allows you to open files or subdirectories by
# double-clicking.
-package require Tk
+package require tk
# Create a scrollbar on the right side of the main window and a listbox
# on the left side.
diff --git a/library/demos/button.tcl b/library/demos/button.tcl
index 0169c2a..d7cd4ce 100644
--- a/library/demos/button.tcl
+++ b/library/demos/button.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .button
catch {destroy $w}
diff --git a/library/demos/check.tcl b/library/demos/check.tcl
index 96ff251..2623618 100644
--- a/library/demos/check.tcl
+++ b/library/demos/check.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .check
catch {destroy $w}
diff --git a/library/demos/clrpick.tcl b/library/demos/clrpick.tcl
index ba50b75..7322bcf 100644
--- a/library/demos/clrpick.tcl
+++ b/library/demos/clrpick.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .clrpick
catch {destroy $w}
diff --git a/library/demos/colors.tcl b/library/demos/colors.tcl
index f1f931d..3a79cb1 100644
--- a/library/demos/colors.tcl
+++ b/library/demos/colors.tcl
@@ -8,7 +8,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .colors
catch {destroy $w}
diff --git a/library/demos/combo.tcl b/library/demos/combo.tcl
index 53e5a27..7f33fa9 100644
--- a/library/demos/combo.tcl
+++ b/library/demos/combo.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .combo
catch {destroy $w}
diff --git a/library/demos/cscroll.tcl b/library/demos/cscroll.tcl
index ed21310..3d14146 100644
--- a/library/demos/cscroll.tcl
+++ b/library/demos/cscroll.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .cscroll
catch {destroy $w}
@@ -56,7 +56,7 @@ for {set i 0} {$i < 20} {incr i} {
$c bind all <Enter> "scrollEnter $c"
$c bind all <Leave> "scrollLeave $c"
$c bind all <Button-1> "scrollButton $c"
-if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide Tk] 8.7-]} {
+if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide tk] 8.7-]} {
bind $c <Button-3> "$c scan mark %x %y"
bind $c <B3-Motion> "$c scan dragto %x %y"
bind $c <MouseWheel> {
@@ -116,7 +116,7 @@ if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide Tk
}
}
-if {[tk windowingsystem] eq "x11" && ![package vsatisfies [package provide Tk] 8.7-]} {
+if {[tk windowingsystem] eq "x11" && ![package vsatisfies [package provide tk] 8.7-]} {
# Support for mousewheels on Linux/Unix commonly comes through mapping
# the wheel to the extended buttons. If you have a mousewheel, find
# Linux configuration info at:
diff --git a/library/demos/ctext.tcl b/library/demos/ctext.tcl
index 6874226..db78a20 100644
--- a/library/demos/ctext.tcl
+++ b/library/demos/ctext.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .ctext
catch {destroy $w}
@@ -50,7 +50,7 @@ $c bind text <Return> "textInsert $c \\n"
$c bind text <Control-h> "textBs $c"
$c bind text <BackSpace> "textBs $c"
$c bind text <Delete> "textDel $c"
-if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide Tk] 8.7-]} {
+if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide tk] 8.7-]} {
$c bind text <Button-3> "textPaste $c @%x,%y"
} else {
$c bind text <Button-2> "textPaste $c @%x,%y"
diff --git a/library/demos/entry1.tcl b/library/demos/entry1.tcl
index f41c2ab..f6b087e 100644
--- a/library/demos/entry1.tcl
+++ b/library/demos/entry1.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .entry1
catch {destroy $w}
diff --git a/library/demos/entry2.tcl b/library/demos/entry2.tcl
index ac82c6a..7f15ee1 100644
--- a/library/demos/entry2.tcl
+++ b/library/demos/entry2.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .entry2
catch {destroy $w}
diff --git a/library/demos/entry3.tcl b/library/demos/entry3.tcl
index f229de6..f6c2e8c 100644
--- a/library/demos/entry3.tcl
+++ b/library/demos/entry3.tcl
@@ -8,7 +8,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .entry3
catch {destroy $w}
diff --git a/library/demos/filebox.tcl b/library/demos/filebox.tcl
index a8f5c32..06dacc8 100644
--- a/library/demos/filebox.tcl
+++ b/library/demos/filebox.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .filebox
catch {destroy $w}
diff --git a/library/demos/floor.tcl b/library/demos/floor.tcl
index 81920ed..3cec5de 100644
--- a/library/demos/floor.tcl
+++ b/library/demos/floor.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# floorDisplay --
# Recreate the floorplan display in the canvas given by "w". The
@@ -1372,7 +1372,7 @@ $c bind floor2 <Button-1> "floorDisplay $c 2"
$c bind floor3 <Button-1> "floorDisplay $c 3"
$c bind room <Enter> "newRoom $c"
$c bind room <Leave> {set currentRoom ""}
-if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide Tk] 8.7-]} {
+if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide tk] 8.7-]} {
bind $c <Button-3> "$c scan mark %x %y"
bind $c <B3-Motion> "$c scan dragto %x %y"
} else {
diff --git a/library/demos/fontchoose.tcl b/library/demos/fontchoose.tcl
index 4353a4d..de9e854 100644
--- a/library/demos/fontchoose.tcl
+++ b/library/demos/fontchoose.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .fontchoose
catch {destroy $w}
diff --git a/library/demos/form.tcl b/library/demos/form.tcl
index 4d80437..f0f3109 100644
--- a/library/demos/form.tcl
+++ b/library/demos/form.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .form
catch {destroy $w}
diff --git a/library/demos/goldberg.tcl b/library/demos/goldberg.tcl
index 860d03c..5a5b462 100644
--- a/library/demos/goldberg.tcl
+++ b/library/demos/goldberg.tcl
@@ -40,7 +40,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .goldberg
catch {destroy $w}
diff --git a/library/demos/hello b/library/demos/hello
index d10b8d5..d5e733d 100644
--- a/library/demos/hello
+++ b/library/demos/hello
@@ -6,7 +6,7 @@ exec wish "$0" ${1+"$@"}
# Simple Tk script to create a button that prints "Hello, world".
# Click on the button to terminate the program.
-package require Tk
+package require tk
# The first line below creates the button, and the second line
# asks the packer to shrink-wrap the application's main window
diff --git a/library/demos/hscale.tcl b/library/demos/hscale.tcl
index 26745bc..777b195 100644
--- a/library/demos/hscale.tcl
+++ b/library/demos/hscale.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .hscale
catch {destroy $w}
diff --git a/library/demos/icon.tcl b/library/demos/icon.tcl
index c8c1e18..14e1c0b 100644
--- a/library/demos/icon.tcl
+++ b/library/demos/icon.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .icon
catch {destroy $w}
diff --git a/library/demos/image1.tcl b/library/demos/image1.tcl
index c174a92..1e67e24 100644
--- a/library/demos/image1.tcl
+++ b/library/demos/image1.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .image1
catch {destroy $w}
diff --git a/library/demos/image2.tcl b/library/demos/image2.tcl
index 9691b87..f3aab60 100644
--- a/library/demos/image2.tcl
+++ b/library/demos/image2.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# loadDir --
# This procedure reloads the directory listbox from the directory
diff --git a/library/demos/items.tcl b/library/demos/items.tcl
index 335971b..56080fd 100644
--- a/library/demos/items.tcl
+++ b/library/demos/items.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .items
catch {destroy $w}
@@ -185,7 +185,7 @@ $c create text 28.5c 17.4c -text Scale: -anchor s
$c bind item <Enter> "itemEnter $c"
$c bind item <Leave> "itemLeave $c"
-if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide Tk] 8.7-]} {
+if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide tk] 8.7-]} {
bind $c <Button-2> "itemMark $c %x %y"
bind $c <B2-Motion> "itemStroke $c %x %y"
bind $c <Button-3> "$c scan mark %x %y"
diff --git a/library/demos/ixset b/library/demos/ixset
index 80dba4a..c934668 100644
--- a/library/demos/ixset
+++ b/library/demos/ixset
@@ -9,7 +9,7 @@ exec wish "$0" ${1+"$@"}
# 91/11/23 : pda@masi.ibp.fr, jt@ratp.fr : design
# 92/08/01 : pda@masi.ibp.fr : cleaning
-package require Tk
+package require tk
#
# Button actions
diff --git a/library/demos/knightstour.tcl b/library/demos/knightstour.tcl
index 8367477..76b6a4f 100644
--- a/library/demos/knightstour.tcl
+++ b/library/demos/knightstour.tcl
@@ -21,7 +21,7 @@
# If you let it repeat then it will choose random start positions
# for each new tour.
-package require Tk
+package require tk
# Return a list of accessible squares from a given square
proc ValidMoves {square} {
diff --git a/library/demos/label.tcl b/library/demos/label.tcl
index d2823e1..0644de8 100644
--- a/library/demos/label.tcl
+++ b/library/demos/label.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .label
catch {destroy $w}
diff --git a/library/demos/labelframe.tcl b/library/demos/labelframe.tcl
index b40bd54..08e8a23 100644
--- a/library/demos/labelframe.tcl
+++ b/library/demos/labelframe.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .labelframe
catch {destroy $w}
diff --git a/library/demos/mac_styles.tcl b/library/demos/mac_styles.tcl
index 33fa888..3fff03c 100644
--- a/library/demos/mac_styles.tcl
+++ b/library/demos/mac_styles.tcl
@@ -8,12 +8,10 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
-
set w .mac_styles
catch {destroy $w}
toplevel $w
-package require Tk
+package require tk
wm title $w "Tk Aqua Widgets"
wm iconname $w "mac_styles"
positionWindow $w
diff --git a/library/demos/mac_tabs.tcl b/library/demos/mac_tabs.tcl
index 16771a8..fea9b03 100644
--- a/library/demos/mac_tabs.tcl
+++ b/library/demos/mac_tabs.tcl
@@ -8,12 +8,11 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
catch {font create giant -family {Times New Roman} -size 64}
set w .mac_tabs
catch {destroy $w}
toplevel $w
-package require Tk
wm title $w "Tabbed Windows in Aqua"
wm iconname $w "mac_tabs"
positionWindow $w
diff --git a/library/demos/mac_wm.tcl b/library/demos/mac_wm.tcl
index 3272623..105c12c 100644
--- a/library/demos/mac_wm.tcl
+++ b/library/demos/mac_wm.tcl
@@ -8,12 +8,11 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .mac_wm
catch {destroy $w}
toplevel $w
-package require Tk
wm title $w "Tk Aqua Window Styles"
wm iconname $w "mac_wm"
positionWindow $w
diff --git a/library/demos/mclist.tcl b/library/demos/mclist.tcl
index 086fbf5..a60a00f 100644
--- a/library/demos/mclist.tcl
+++ b/library/demos/mclist.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .mclist
catch {destroy $w}
diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl
index d43a374..2a8ad1c 100644
--- a/library/demos/menu.tcl
+++ b/library/demos/menu.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .menu
catch {destroy $w}
diff --git a/library/demos/menubu.tcl b/library/demos/menubu.tcl
index cb52f43..a45fe84 100644
--- a/library/demos/menubu.tcl
+++ b/library/demos/menubu.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .menubu
catch {destroy $w}
diff --git a/library/demos/msgbox.tcl b/library/demos/msgbox.tcl
index 6f34e16..1c9a319 100644
--- a/library/demos/msgbox.tcl
+++ b/library/demos/msgbox.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .msgbox
catch {destroy $w}
diff --git a/library/demos/paned1.tcl b/library/demos/paned1.tcl
index 829988a..8e2568b 100644
--- a/library/demos/paned1.tcl
+++ b/library/demos/paned1.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .paned1
catch {destroy $w}
diff --git a/library/demos/paned2.tcl b/library/demos/paned2.tcl
index 73af21d..feb0254 100644
--- a/library/demos/paned2.tcl
+++ b/library/demos/paned2.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .paned2
catch {destroy $w}
diff --git a/library/demos/pendulum.tcl b/library/demos/pendulum.tcl
index d76a1ec..060c070 100644
--- a/library/demos/pendulum.tcl
+++ b/library/demos/pendulum.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .pendulum
catch {destroy $w}
diff --git a/library/demos/plot.tcl b/library/demos/plot.tcl
index 5df318b..32bc2d5 100644
--- a/library/demos/plot.tcl
+++ b/library/demos/plot.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .plot
catch {destroy $w}
diff --git a/library/demos/puzzle.tcl b/library/demos/puzzle.tcl
index 30c0562..aab5744 100644
--- a/library/demos/puzzle.tcl
+++ b/library/demos/puzzle.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# puzzleSwitch --
# This procedure is invoked when the user clicks on a particular button;
diff --git a/library/demos/radio.tcl b/library/demos/radio.tcl
index 41f8db2..c6f5135 100644
--- a/library/demos/radio.tcl
+++ b/library/demos/radio.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .radio
catch {destroy $w}
diff --git a/library/demos/rmt b/library/demos/rmt
index 00bdc9d..21c6ca0 100644
--- a/library/demos/rmt
+++ b/library/demos/rmt
@@ -7,7 +7,7 @@ exec wish "$0" ${1+"$@"}
# Tk applications. It allows you to select an application and
# then type commands to that application.
-package require Tk
+package require tk
wm title . "Tk Remote Controller"
wm iconname . "Tk Remote"
diff --git a/library/demos/rolodex b/library/demos/rolodex
index f4c72ec..3f09238 100644
--- a/library/demos/rolodex
+++ b/library/demos/rolodex
@@ -8,7 +8,7 @@ exec wish "$0" ${1+"$@"}
# feel of a rolodex program, although it's lifeless and doesn't
# actually do the rolodex application.
-package require Tk
+package require tk
foreach i [winfo child .] {
catch {destroy $i}
diff --git a/library/demos/ruler.tcl b/library/demos/ruler.tcl
index 0b78370..761892e 100644
--- a/library/demos/ruler.tcl
+++ b/library/demos/ruler.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# rulerMkTab --
# This procedure creates a new triangular polygon in a canvas to
diff --git a/library/demos/sayings.tcl b/library/demos/sayings.tcl
index 3458016..b7be791 100644
--- a/library/demos/sayings.tcl
+++ b/library/demos/sayings.tcl
@@ -8,7 +8,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .sayings
catch {destroy $w}
diff --git a/library/demos/search.tcl b/library/demos/search.tcl
index b4beb28..f4913f8 100644
--- a/library/demos/search.tcl
+++ b/library/demos/search.tcl
@@ -8,7 +8,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# textLoadFile --
# This procedure below loads a file into a text widget, discarding
diff --git a/library/demos/spin.tcl b/library/demos/spin.tcl
index b08ed16..203850d 100644
--- a/library/demos/spin.tcl
+++ b/library/demos/spin.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .spin
catch {destroy $w}
diff --git a/library/demos/states.tcl b/library/demos/states.tcl
index e2acd80..4e14fd5 100644
--- a/library/demos/states.tcl
+++ b/library/demos/states.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .states
catch {destroy $w}
diff --git a/library/demos/style.tcl b/library/demos/style.tcl
index 80b78f3..be0d365 100644
--- a/library/demos/style.tcl
+++ b/library/demos/style.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .style
catch {destroy $w}
diff --git a/library/demos/tcolor b/library/demos/tcolor
index 0aa133b..b349c5b 100644
--- a/library/demos/tcolor
+++ b/library/demos/tcolor
@@ -7,7 +7,7 @@ exec wish "$0" ${1+"$@"}
# create colors using either the RGB, HSB, or CYM color spaces
# and apply the color to existing applications.
-package require Tk
+package require tk
wm title . "Color Editor"
# Global variables that control the program:
diff --git a/library/demos/text.tcl b/library/demos/text.tcl
index 2736b88..130a4a5 100644
--- a/library/demos/text.tcl
+++ b/library/demos/text.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .text
catch {destroy $w}
diff --git a/library/demos/textpeer.tcl b/library/demos/textpeer.tcl
index 83e8e14..7dd55a7 100644
--- a/library/demos/textpeer.tcl
+++ b/library/demos/textpeer.tcl
@@ -8,7 +8,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .textpeer
catch {destroy $w}
diff --git a/library/demos/timer b/library/demos/timer
index 6b61ca4..2d96ec4 100644
--- a/library/demos/timer
+++ b/library/demos/timer
@@ -5,7 +5,7 @@ exec wish "$0" ${1+"$@"}
# timer --
# This script generates a counter with start and stop buttons.
-package require Tk
+package require tk
label .counter -text 0.00 -relief raised -width 10 -padx 2m -pady 1m
button .start -text Start -command {
diff --git a/library/demos/toolbar.tcl b/library/demos/toolbar.tcl
index c8248e3..50d4e49 100644
--- a/library/demos/toolbar.tcl
+++ b/library/demos/toolbar.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .toolbar
destroy $w
diff --git a/library/demos/tree.tcl b/library/demos/tree.tcl
index 1cc70f8..fe06ce1 100644
--- a/library/demos/tree.tcl
+++ b/library/demos/tree.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .tree
catch {destroy $w}
diff --git a/library/demos/ttkbut.tcl b/library/demos/ttkbut.tcl
index 86e4382..f567790 100644
--- a/library/demos/ttkbut.tcl
+++ b/library/demos/ttkbut.tcl
@@ -8,7 +8,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .ttkbut
catch {destroy $w}
diff --git a/library/demos/ttkmenu.tcl b/library/demos/ttkmenu.tcl
index aad5aa0..35cf935 100644
--- a/library/demos/ttkmenu.tcl
+++ b/library/demos/ttkmenu.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .ttkmenu
catch {destroy $w}
diff --git a/library/demos/ttknote.tcl b/library/demos/ttknote.tcl
index 5e5551d..d1d15f9 100644
--- a/library/demos/ttknote.tcl
+++ b/library/demos/ttknote.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .ttknote
catch {destroy $w}
diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl
index bae8716..749f940 100644
--- a/library/demos/ttkpane.tcl
+++ b/library/demos/ttkpane.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .ttkpane
catch {destroy $w}
diff --git a/library/demos/ttkprogress.tcl b/library/demos/ttkprogress.tcl
index e5d0e22..6e5068e 100644
--- a/library/demos/ttkprogress.tcl
+++ b/library/demos/ttkprogress.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .ttkprogress
catch {destroy $w}
diff --git a/library/demos/ttkscale.tcl b/library/demos/ttkscale.tcl
index e08d9b2..6aeb11c 100644
--- a/library/demos/ttkscale.tcl
+++ b/library/demos/ttkscale.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .ttkscale
catch {destroy $w}
diff --git a/library/demos/twind.tcl b/library/demos/twind.tcl
index 5268fdf..b974456 100644
--- a/library/demos/twind.tcl
+++ b/library/demos/twind.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
# Make an Aqua button's fill color match its parent's background
proc blend {bt} {
diff --git a/library/demos/unicodeout.tcl b/library/demos/unicodeout.tcl
index 1ecc064..0f3dc2d 100644
--- a/library/demos/unicodeout.tcl
+++ b/library/demos/unicodeout.tcl
@@ -7,7 +7,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .unicodeout
catch {destroy $w}
diff --git a/library/demos/vscale.tcl b/library/demos/vscale.tcl
index 3a041a6..f1529c0 100644
--- a/library/demos/vscale.tcl
+++ b/library/demos/vscale.tcl
@@ -6,7 +6,7 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
-package require Tk
+package require tk
set w .vscale
catch {destroy $w}
diff --git a/library/demos/widget b/library/demos/widget
index d931b89..b6811d8 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -10,7 +10,7 @@ exec wish "$0" ${1+"$@"}
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.
-package require Tk 8.6-
+package require tk
package require msgcat
eval destroy [winfo child .]
diff --git a/library/menu.tcl b/library/menu.tcl
index cffa0e2..d74c9d2 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -487,7 +487,6 @@ proc ::tk::MenuMotion {menu x y state} {
}
set index [$menu index @$x,$y]
if {[info exists Priv(menuActivated)] \
- && $index ne "none" \
&& $index >= 0 \
&& $index ne $activeindex} {
set mode [option get $menu clickToFocus ClickToFocus]
@@ -530,8 +529,7 @@ proc ::tk::MenuButtonDown menu {
if {![winfo viewable $menu]} {
return
}
- set activeindex [$menu index active]
- if {($activeindex eq "none") || ($activeindex < 0)} {
+ if {[$menu index active] < 0} {
if {[$menu cget -type] ne "menubar" } {
set Priv(window) {}
}
@@ -589,8 +587,7 @@ proc ::tk::MenuButtonDown menu {
proc ::tk::MenuLeave {menu rootx rooty state} {
variable ::tk::Priv
set Priv(window) {}
- set activeindex [$menu index active]
- if {($activeindex eq "none") || ($activeindex < 0)} {
+ if {[$menu index active] < 0} {
return
}
if {[$menu type active] eq "cascade" \
@@ -657,8 +654,7 @@ proc ::tk::MenuInvoke {w buttonRelease} {
uplevel #0 [list $w invoke $activeindex]
}
} else {
- set activeindex [$w index active]
- if {($Priv(popup) eq "") || (($activeindex ne "none") && ($activeindex >= 0))} {
+ if {$Priv(popup) eq "" || [$w index active] >= 0} {
MenuUnpost $w
}
uplevel #0 [list $w invoke active]
@@ -802,7 +798,6 @@ proc ::tk::MenuNextMenu {menu direction} {
if {[winfo class $mb] eq "Menubutton" \
&& [$mb cget -state] ne "disabled" \
&& [$mb cget -menu] ne "" \
- && [[$mb cget -menu] index last] ne "none" \
&& [[$mb cget -menu] index last] >= 0} {
break
}
@@ -826,13 +821,13 @@ proc ::tk::MenuNextMenu {menu direction} {
proc ::tk::MenuNextEntry {menu count} {
set last [$menu index last]
- if {($last eq "none") || ($last < 0)} {
+ if {$last < 0} {
return
}
set length [expr {$last+1}]
set quitAfter $length
set activeindex [$menu index active]
- if {($activeindex eq "none") || ($activeindex < 0)} {
+ if {$actactiveindexive < 0} {
set i 0
} else {
set i [expr {$activeindex + $count}]
@@ -1032,9 +1027,6 @@ proc ::tk::TraverseWithinMenu {w char} {
}
set char [string tolower $char]
set last [$w index last]
- if {$last eq "none"} {
- return
- }
for {set i 0} {$i <= $last} {incr i} {
if {[catch {set char2 [string index \
[$w entrycget $i -label] [$w entrycget $i -underline]]}]} {
@@ -1074,14 +1066,10 @@ proc ::tk::MenuFirstEntry menu {
return
}
tk_menuSetFocus $menu
- set activeindex [$menu index active]
- if {($activeindex ne "none") && ($activeindex >= 0)} {
+ if {[$menu index active] >= 0} {
return
}
set last [$menu index last]
- if {$last eq "none"} {
- return
- }
for {set i 0} {$i <= $last} {incr i} {
if {([catch {set state [$menu entrycget $i -state]}] == 0) \
&& $state ne "disabled" && [$menu type $i] ne "tearoff"} {
@@ -1121,9 +1109,6 @@ proc ::tk::MenuFindName {menu s} {
return $i
}
set last [$menu index last]
- if {$last eq "none"} {
- return ""
- }
for {set i 0} {$i <= $last} {incr i} {
if {![catch {$menu entrycget $i -label} label]} {
if {$label eq $s} {
diff --git a/library/obsolete.tcl b/library/obsolete.tcl
deleted file mode 100644
index a31884d..0000000
--- a/library/obsolete.tcl
+++ /dev/null
@@ -1,178 +0,0 @@
-# obsolete.tcl --
-#
-# This file contains obsolete procedures that people really shouldn't
-# be using anymore, but which are kept around for backward compatibility.
-#
-# Copyright © 1994 The Regents of the University of California.
-# Copyright © 1994 Sun Microsystems, Inc.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-
-# The procedures below are here strictly for backward compatibility with
-# Tk version 3.6 and earlier. The procedures are no longer needed, so
-# they are no-ops. You should not use these procedures anymore, since
-# they may be removed in some future release.
-
-proc tk_menuBar args {}
-proc tk_bindForTraversal args {}
-
-# ::tk::classic::restore --
-#
-# Restore the pre-8.5 (Tk classic) look as the widget defaults for classic
-# Tk widgets.
-#
-# The value following an 'option add' call is the new 8.5 value.
-#
-namespace eval ::tk::classic {
- # This may need to be adjusted for some window managers that are
- # more aggressive with their own Xdefaults (like KDE and CDE)
- variable prio "widgetDefault"
-}
-
-proc ::tk::classic::restore {args} {
- # Restore classic (8.4) look to classic Tk widgets
- variable prio
-
- if {[llength $args]} {
- foreach what $args {
- ::tk::classic::restore_$what
- }
- } else {
- foreach cmd [info procs restore_*] {
- $cmd
- }
- }
-}
-
-proc ::tk::classic::restore_font {args} {
- # Many widgets were adjusted from hard-coded defaults to using the
- # TIP#145 fonts defined in fonts.tcl (eg TkDefaultFont, TkFixedFont, ...)
- # For restoring compatibility, we only correct size and weighting changes,
- # as the fonts themselves remained mostly the same.
- if {[tk windowingsystem] eq "x11"} {
- font configure TkDefaultFont -weight bold ; # normal
- font configure TkFixedFont -size -12 ; # -10
- }
- # Add these with prio 21 to override value in dialog/msgbox.tcl
- if {[tk windowingsystem] eq "aqua"} {
- option add *Dialog.msg.font system 21; # TkCaptionFont
- option add *Dialog.dtl.font system 21; # TkCaptionFont
- option add *ErrorDialog*Label.font system 21; # TkCaptionFont
- } else {
- option add *Dialog.msg.font {Times 12} 21; # TkCaptionFont
- option add *Dialog.dtl.font {Times 10} 21; # TkCaptionFont
- option add *ErrorDialog*Label.font {Times -18} 21; # TkCaptionFont
- }
-}
-
-proc ::tk::classic::restore_button {args} {
- variable prio
- if {[tk windowingsystem] eq "x11"} {
- foreach cls {Button Radiobutton Checkbutton} {
- option add *$cls.borderWidth 2 $prio; # 1
- }
- }
-}
-
-proc ::tk::classic::restore_entry {args} {
- variable prio
- # Entry and Spinbox share core defaults
- foreach cls {Entry Spinbox} {
- if {[tk windowingsystem] ne "aqua"} {
- option add *$cls.borderWidth 2 $prio; # 1
- }
- if {[tk windowingsystem] eq "x11"} {
- option add *$cls.background "#d9d9d9" $prio; # "white"
- option add *$cls.selectBorderWidth 1 $prio; # 0
- }
- }
-}
-
-proc ::tk::classic::restore_listbox {args} {
- variable prio
- if {[tk windowingsystem] ne "win32"} {
- option add *Listbox.background "#d9d9d9" $prio; # "white"
- option add *Listbox.activeStyle "underline" $prio; # "dotbox"
- }
- if {[tk windowingsystem] ne "aqua"} {
- option add *Listbox.borderWidth 2 $prio; # 1
- }
- if {[tk windowingsystem] eq "x11"} {
- option add *Listbox.selectBorderWidth 1 $prio; # 0
- }
- # Remove focus into Listbox added for 8.5
- bind Listbox <Button-1> {
- if {[winfo exists %W]} {
- tk::ListboxBeginSelect %W [%W index @%x,%y]
- }
- }
-}
-
-proc ::tk::classic::restore_menu {args} {
- variable prio
- if {[tk windowingsystem] eq "x11"} {
- option add *Menu.activeBorderWidth 2 $prio; # 1
- option add *Menu.borderWidth 2 $prio; # 1
- option add *Menu.clickToFocus true $prio
- option add *Menu.useMotifHelp true $prio
- }
- if {[tk windowingsystem] ne "aqua"} {
- option add *Menu.font "TkDefaultFont" $prio; # "TkMenuFont"
- }
-}
-
-proc ::tk::classic::restore_menubutton {args} {
- variable prio
- option add *Menubutton.borderWidth 2 $prio; # 1
-}
-
-proc ::tk::classic::restore_message {args} {
- variable prio
- option add *Message.borderWidth 2 $prio; # 1
-}
-
-proc ::tk::classic::restore_panedwindow {args} {
- variable prio
- option add *Panedwindow.borderWidth 2 $prio; # 1
- option add *Panedwindow.sashWidth 2 $prio; # 3
- option add *Panedwindow.sashPad 2 $prio; # 0
- option add *Panedwindow.sashRelief raised $prio; # flat
- option add *Panedwindow.opaqueResize 0 $prio; # 1
- if {[tk windowingsystem] ne "win32"} {
- option add *Panedwindow.showHandle 1 $prio; # 0
- }
-}
-
-proc ::tk::classic::restore_scale {args} {
- variable prio
- option add *Scale.borderWidth 2 $prio; # 1
- if {[tk windowingsystem] eq "x11"} {
- option add *Scale.troughColor "#c3c3c3" $prio; # "#b3b3b3"
- }
-}
-
-proc ::tk::classic::restore_scrollbar {args} {
- variable prio
- if {[tk windowingsystem] eq "x11"} {
- option add *Scrollbar.borderWidth 2 $prio; # 1
- option add *Scrollbar.highlightThickness 1 $prio; # 0
- option add *Scrollbar.width 15 $prio; # 11
- option add *Scrollbar.troughColor "#c3c3c3" $prio; # "#b3b3b3"
- }
-}
-
-proc ::tk::classic::restore_text {args} {
- variable prio
- if {[tk windowingsystem] ne "aqua"} {
- option add *Text.borderWidth 2 $prio; # 1
- }
- if {[tk windowingsystem] eq "win32"} {
- option add *Text.font "TkDefaultFont" $prio; # "TkFixedFont"
- }
- if {[tk windowingsystem] eq "x11"} {
- option add *Text.background "#d9d9d9" $prio; # white
- option add *Text.selectBorderWidth 1 $prio; # 0
- }
-}
diff --git a/library/tclIndex b/library/tclIndex
index 06f31b2..9b5f889 100644
--- a/library/tclIndex
+++ b/library/tclIndex
@@ -122,9 +122,6 @@ set auto_index(::tk::GenerateMenuSelect) [list source [file join $dir menu.tcl]]
set auto_index(tk_popup) [list source [file join $dir menu.tcl]]
set auto_index(::tk::ensure_psenc_is_loaded) [list source [file join $dir mkpsenc.tcl]]
set auto_index(::tk::MessageBox) [list source [file join $dir msgbox.tcl]]
-set auto_index(tk_menuBar) [list source [file join $dir obsolete.tcl]]
-set auto_index(tk_bindForTraversal) [list source [file join $dir obsolete.tcl]]
-set auto_index(::tk::classic::restore) [list source [file join $dir obsolete.tcl]]
set auto_index(tk_optionMenu) [list source [file join $dir optMenu.tcl]]
set auto_index(tk_setPalette) [list source [file join $dir palette.tcl]]
set auto_index(::tk::RecolorTree) [list source [file join $dir palette.tcl]]
@@ -252,6 +249,4 @@ set auto_index(::tk::ListBoxKeyAccel_Unset) [list source [file join $dir xmfbox.
set auto_index(::tk::ListBoxKeyAccel_Key) [list source [file join $dir xmfbox.tcl]]
set auto_index(::tk::ListBoxKeyAccel_Goto) [list source [file join $dir xmfbox.tcl]]
set auto_index(::tk::ListBoxKeyAccel_Reset) [list source [file join $dir xmfbox.tcl]]
-set auto_index(::tk::unsupported::ExposePrivateCommand) [list source [file join $dir unsupported.tcl]]
-set auto_index(::tk::unsupported::ExposePrivateVariable) [list source [file join $dir unsupported.tcl]]
set auto_index(::tk::fontchooser) [list source [file join $dir fontchooser.tcl]]
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 1591942..7b2ed66 100644
--- a/library/tearoff.tcl
+++ b/library/tearoff.tcl
@@ -138,14 +138,12 @@ proc ::tk::MenuDup {src dst type} {
# Copy the meny entries, if any
set last [$src index last]
- if {$last ne "none"} {
- for {set i [$src cget -tearoff]} {$i <= $last} {incr i} {
- set cmd [list $dst add [$src type $i] [$src id $i]]
- foreach option [$src entryconfigure $i] {
- lappend cmd [lindex $option 0] [lindex $option 4]
- }
- eval $cmd
+ for {set i [$src cget -tearoff]} {$i <= $last} {incr i} {
+ set cmd [list $dst add [$src type $i] [$src id $i]]
+ foreach option [$src entryconfigure $i] {
+ lappend cmd [lindex $option 0] [lindex $option 4]
}
+ eval $cmd
}
# Duplicate the binding tags from the source menu, replacing src with dst
diff --git a/library/tk.tcl b/library/tk.tcl
index a9db88c..1f7e787 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -11,7 +11,7 @@
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
# Verify that we have Tk binary and script components from the same release
-package require -exact tk 8.7a6
+package require -exact tk 9.0b1
# Create a ::tk namespace
namespace eval ::tk {
diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl
index abd0bc3..f4644ee 100644
--- a/library/ttk/clamTheme.tcl
+++ b/library/ttk/clamTheme.tcl
@@ -145,15 +145,15 @@ namespace eval ttk::theme::clam {
-labeloutside true -labelmargins {0 0 0 3p} \
-borderwidth 2 -relief raised
- ttk::style configure TScrollbar -gripcount 3.75p \
+ ttk::style configure TScrollbar -gripsize 7.5p \
-arrowsize 10.5p -width 10.5p
- ttk::style configure TScale -gripcount 3.75p \
+ ttk::style configure TScale -gripsize 7.5p \
-arrowsize 10.5p -sliderlength 22.5p
ttk::style configure TProgressbar -background $colors(-frame) \
-arrowsize 10.5p -sliderlength 22.5p
- ttk::style configure Sash -sashthickness 4.5p -gripcount 7.5p
+ ttk::style configure Sash -sashthickness 4.5p -gripsize 15p
}
}
diff --git a/library/unsupported.tcl b/library/unsupported.tcl
deleted file mode 100644
index b5f404a..0000000
--- a/library/unsupported.tcl
+++ /dev/null
@@ -1,269 +0,0 @@
-# unsupported.tcl --
-#
-# Commands provided by Tk without official support. Use them at your
-# own risk. They may change or go away without notice.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-# ----------------------------------------------------------------------
-# Unsupported compatibility interface for folks accessing Tk's private
-# commands and variable against recommended usage.
-# ----------------------------------------------------------------------
-
-namespace eval ::tk::unsupported {
-
- # Map from the old global names of Tk private commands to their
- # new namespace-encapsulated names.
-
- variable PrivateCommands
- array set PrivateCommands {
- tkButtonAutoInvoke ::tk::ButtonAutoInvoke
- tkButtonDown ::tk::ButtonDown
- tkButtonEnter ::tk::ButtonEnter
- tkButtonInvoke ::tk::ButtonInvoke
- tkButtonLeave ::tk::ButtonLeave
- tkButtonUp ::tk::ButtonUp
- tkCancelRepeat ::tk::CancelRepeat
- tkCheckRadioDown ::tk::CheckRadioDown
- tkCheckRadioEnter ::tk::CheckRadioEnter
- tkCheckRadioInvoke ::tk::CheckRadioInvoke
- tkColorDialog ::tk::dialog::color::
- tkColorDialog_BuildDialog ::tk::dialog::color::BuildDialog
- tkColorDialog_CancelCmd ::tk::dialog::color::CancelCmd
- tkColorDialog_Config ::tk::dialog::color::Config
- tkColorDialog_CreateSelector ::tk::dialog::color::CreateSelector
- tkColorDialog_DrawColorScale ::tk::dialog::color::DrawColorScale
- tkColorDialog_EnterColorBar ::tk::dialog::color::EnterColorBar
- tkColorDialog_InitValues ::tk::dialog::color::InitValues
- tkColorDialog_HandleRGBEntry ::tk::dialog::color::HandleRGBEntry
- tkColorDialog_HandleSelEntry ::tk::dialog::color::HandleSelEntry
- tkColorDialog_LeaveColorBar ::tk::dialog::color::LeaveColorBar
- tkColorDialog_MoveSelector ::tk::dialog::color::MoveSelector
- tkColorDialog_OkCmd ::tk::dialog::color::OkCmd
- tkColorDialog_RedrawColorBars ::tk::dialog::color::RedrawColorBars
- tkColorDialog_RedrawFinalColor ::tk::dialog::color::RedrawFinalColor
- tkColorDialog_ReleaseMouse ::tk::dialog::color::ReleaseMouse
- tkColorDialog_ResizeColorBars ::tk::dialog::color::ResizeColorBars
- tkColorDialog_RgbToX ::tk::dialog::color::RgbToX
- tkColorDialog_SetRGBValue ::tk::dialog::color::SetRGBValue
- tkColorDialog_StartMove ::tk::dialog::color::StartMove
- tkColorDialog_XToRgb ::tk::dialog::color::XToRGB
- tkConsoleAbout ::tk::ConsoleAbout
- tkConsoleBind ::tk::ConsoleBind
- tkConsoleExit ::tk::ConsoleExit
- tkConsoleHistory ::tk::ConsoleHistory
- tkConsoleInit ::tk::ConsoleInit
- tkConsoleInsert ::tk::ConsoleInsert
- tkConsoleInvoke ::tk::ConsoleInvoke
- tkConsoleOutput ::tk::ConsoleOutput
- tkConsolePrompt ::tk::ConsolePrompt
- tkConsoleSource ::tk::ConsoleSource
- tkDarken ::tk::Darken
- tkEntryAutoScan ::tk::EntryAutoScan
- tkEntryBackspace ::tk::EntryBackspace
- tkEntryButton1 ::tk::EntryButton1
- tkEntryClosestGap ::tk::EntryClosestGap
- tkEntryGetSelection ::tk::EntryGetSelection
- tkEntryInsert ::tk::EntryInsert
- tkEntryKeySelect ::tk::EntryKeySelect
- tkEntryMouseSelect ::tk::EntryMouseSelect
- tkEntryNextWord ::tk::EntryNextWord
- tkEntryPaste ::tk::EntryPaste
- tkEntryPreviousWord ::tk::EntryPreviousWord
- tkEntrySeeInsert ::tk::EntrySeeInsert
- tkEntrySetCursor ::tk::EntrySetCursor
- tkEntryTranspose ::tk::EntryTranspose
- tkEventMotifBindings ::tk::EventMotifBindings
- tkFDGetFileTypes ::tk::FDGetFileTypes
- tkFirstMenu ::tk::FirstMenu
- tkFocusGroup_BindIn ::tk::FocusGroup_BindIn
- tkFocusGroup_BindOut ::tk::FocusGroup_BindOut
- tkFocusGroup_Create ::tk::FocusGroup_Create
- tkFocusGroup_Destroy ::tk::FocusGroup_Destroy
- tkFocusGroup_In ::tk::FocusGroup_In
- tkFocusGroup_Out ::tk::FocusGroup_Out
- tkFocusOK ::tk::FocusOK
- tkGenerateMenuSelect ::tk::GenerateMenuSelect
- tkIconList ::tk::IconList
- tkListbox ::tk::Listbox
- tkListboxAutoScan ::tk::ListboxAutoScan
- tkListboxBeginExtend ::tk::ListboxBeginExtend
- tkListboxBeginSelect ::tk::ListboxBeginSelect
- tkListboxBeginToggle ::tk::ListboxBeginToggle
- tkListboxCancel ::tk::ListboxCancel
- tkListboxDataExtend ::tk::ListboxDataExtend
- tkListboxExtendUpDown ::tk::ListboxExtendUpDown
- tkListboxKeyAccel_Goto ::tk::ListboxKeyAccel_Goto
- tkListboxKeyAccel_Key ::tk::ListboxKeyAccel_Key
- tkListboxKeyAccel_Reset ::tk::ListboxKeyAccel_Reset
- tkListboxKeyAccel_Set ::tk::ListboxKeyAccel_Set
- tkListboxKeyAccel_Unset ::tk::ListboxKeyAccel_Unxet
- tkListboxMotion ::tk::ListboxMotion
- tkListboxSelectAll ::tk::ListboxSelectAll
- tkListboxUpDown ::tk::ListboxUpDown
- tkListboxBeginToggle ::tk::ListboxBeginToggle
- tkMbButtonUp ::tk::MbButtonUp
- tkMbEnter ::tk::MbEnter
- tkMbLeave ::tk::MbLeave
- tkMbMotion ::tk::MbMotion
- tkMbPost ::tk::MbPost
- tkMenuButtonDown ::tk::MenuButtonDown
- tkMenuDownArrow ::tk::MenuDownArrow
- tkMenuDup ::tk::MenuDup
- tkMenuEscape ::tk::MenuEscape
- tkMenuFind ::tk::MenuFind
- tkMenuFindName ::tk::MenuFindName
- tkMenuFirstEntry ::tk::MenuFirstEntry
- tkMenuInvoke ::tk::MenuInvoke
- tkMenuLeave ::tk::MenuLeave
- tkMenuLeftArrow ::tk::MenuLeftArrow
- tkMenuMotion ::tk::MenuMotion
- tkMenuNextEntry ::tk::MenuNextEntry
- tkMenuNextMenu ::tk::MenuNextMenu
- tkMenuRightArrow ::tk::MenuRightArrow
- tkMenuUnpost ::tk::MenuUnpost
- tkMenuUpArrow ::tk::MenuUpArrow
- tkMessageBox ::tk::MessageBox
- tkMotifFDialog ::tk::MotifFDialog
- tkMotifFDialog_ActivateDList ::tk::MotifFDialog_ActivateDList
- tkMotifFDialog_ActivateFList ::tk::MotifFDialog_ActivateFList
- tkMotifFDialog_ActivateFEnt ::tk::MotifFDialog_ActivateFEnt
- tkMotifFDialog_ActivateSEnt ::tk::MotifFDialog_ActivateSEnt
- tkMotifFDialog ::tk::MotifFDialog
- tkMotifFDialog_BrowseDList ::tk::MotifFDialog_BrowseDList
- tkMotifFDialog_BrowseFList ::tk::MotifFDialog_BrowseFList
- tkMotifFDialog_BuildUI ::tk::MotifFDialog_BuildUI
- tkMotifFDialog_CancelCmd ::tk::MotifFDialog_CancelCmd
- tkMotifFDialog_Config ::tk::MotifFDialog_Config
- tkMotifFDialog_Create ::tk::MotifFDialog_Create
- tkMotifFDialog_FileTypes ::tk::MotifFDialog_FileTypes
- tkMotifFDialog_FilterCmd ::tk::MotifFDialog_FilterCmd
- tkMotifFDialog_InterpFilter ::tk::MotifFDialog_InterpFilter
- tkMotifFDialog_LoadFiles ::tk::MotifFDialog_LoadFiles
- tkMotifFDialog_MakeSList ::tk::MotifFDialog_MakeSList
- tkMotifFDialog_OkCmd ::tk::MotifFDialog_OkCmd
- tkMotifFDialog_SetFilter ::tk::MotifFDialog_SetFilter
- tkMotifFDialog_SetListMode ::tk::MotifFDialog_SetListMode
- tkMotifFDialog_Update ::tk::MotifFDialog_Update
- tkPostOverPoint ::tk::PostOverPoint
- tkRecolorTree ::tk::RecolorTree
- tkRestoreOldGrab ::tk::RestoreOldGrab
- tkSaveGrabInfo ::tk::SaveGrabInfo
- tkScaleActivate ::tk::ScaleActivate
- tkScaleButtonDown ::tk::ScaleButtonDown
- tkScaleButton2Down ::tk::ScaleButton2Down
- tkScaleControlPress ::tk::ScaleControlPress
- tkScaleDrag ::tk::ScaleDrag
- tkScaleEndDrag ::tk::ScaleEndDrag
- tkScaleIncrement ::tk::ScaleIncrement
- tkScreenChanged ::tk::ScreenChanged
- tkScrollButtonDown ::tk::ScrollButtonDown
- tkScrollButton2Down ::tk::ScrollButton2Down
- tkScrollButtonDrag ::tk::ScrollButtonDrag
- tkScrollButtonUp ::tk::ScrollButtonUp
- tkScrollByPages ::tk::ScrollByPages
- tkScrollByUnits ::tk::ScrollByUnits
- tkScrollEndDrag ::tk::ScrollEndDrag
- tkScrollSelect ::tk::ScrollSelect
- tkScrollStartDrag ::tk::ScrollStartDrag
- tkScrollTopBottom ::tk::ScrollTopBottom
- tkScrollToPos ::tk::ScrollToPos
- tkTabToWindow ::tk::TabToWindow
- tkTearOffMenu ::tk::TearOffMenu
- tkTextAutoScan ::tk::TextAutoScan
- tkTextButton1 ::tk::TextButton1
- tkTextClosestGap ::tk::TextClosestGap
- tkTextInsert ::tk::TextInsert
- tkTextKeyExtend ::tk::TextKeyExtend
- tkTextKeySelect ::tk::TextKeySelect
- tkTextNextPara ::tk::TextNextPara
- tkTextNextPos ::tk::TextNextPos
- tkTextNextWord ::tk::TextNextWord
- tkTextPaste ::tk::TextPaste
- tkTextPrevPara ::tk::TextPrevPara
- tkTextPrevPos ::tk::TextPrevPos
- tkTextPrevWord ::tk::TextPrevWord
- tkTextResetAnchor ::tk::TextResetAnchor
- tkTextScrollPages ::tk::TextScrollPages
- tkTextSelectTo ::tk::TextSelectTo
- tkTextSetCursor ::tk::TextSetCursor
- tkTextTranspose ::tk::TextTranspose
- tkTextUpDownLine ::tk::TextUpDownLine
- tkTraverseToMenu ::tk::TraverseToMenu
- tkTraverseWithinMenu ::tk::TraverseWithinMenu
- unsupported1 ::tk::unsupported::MacWindowStyle
- }
-
- # Map from the old global names of Tk private variable to their
- # new namespace-encapsulated names.
-
- variable PrivateVariables
- array set PrivateVariables {
- droped_to_start ::tk::mac::Droped_to_start
- histNum ::tk::HistNum
- stub_location ::tk::mac::Stub_location
- tkFocusIn ::tk::FocusIn
- tkFocusOut ::tk::FocusOut
- tkPalette ::tk::Palette
- tkPriv ::tk::Priv
- tkPrivMsgBox ::tk::PrivMsgBox
- }
-}
-
-# ::tk::unsupported::ExposePrivateCommand --
-#
-# Expose one of Tk's private commands to be visible under its
-# old global name
-#
-# Arguments:
-# cmd Global name by which the command was once known,
-# or a glob-style pattern.
-#
-# Results:
-# None.
-#
-# Side effects:
-# The old command name in the global namespace is aliased to the
-# new private name.
-
-proc ::tk::unsupported::ExposePrivateCommand {cmd} {
- variable PrivateCommands
- set cmds [array get PrivateCommands $cmd]
- if {[llength $cmds] == 0} {
- return -code error -errorcode {TK EXPOSE_PRIVATE_COMMAND} \
- "No compatibility support for \[$cmd]"
- }
- foreach {old new} $cmds {
- namespace eval :: [list interp alias {} $old {}] $new
- }
-}
-
-# ::tk::unsupported::ExposePrivateVariable --
-#
-# Expose one of Tk's private variables to be visible under its
-# old global name
-#
-# Arguments:
-# var Global name by which the variable was once known,
-# or a glob-style pattern.
-#
-# Results:
-# None.
-#
-# Side effects:
-# The old variable name in the global namespace is aliased to the
-# new private name.
-
-proc ::tk::unsupported::ExposePrivateVariable {var} {
- variable PrivateVariables
- set vars [array get PrivateVariables $var]
- if {[llength $vars] == 0} {
- return -code error -errorcode {TK EXPOSE_PRIVATE_VARIABLE} \
- "No compatibility support for \$$var"
- }
- namespace eval ::tk::mac {}
- foreach {old new} $vars {
- namespace eval :: [list upvar "#0" $new $old]
- }
-}
diff --git a/macosx/Tk.xcodeproj/project.pbxproj b/macosx/Tk.xcodeproj/project.pbxproj
index f7cff46..1e5c756 100644
--- a/macosx/Tk.xcodeproj/project.pbxproj
+++ b/macosx/Tk.xcodeproj/project.pbxproj
@@ -1000,7 +1000,6 @@
F966BB7408F27A3A005CB29B /* menu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menu.tcl; sourceTree = "<group>"; };
F966BB7508F27A3A005CB29B /* mkpsenc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = mkpsenc.tcl; sourceTree = "<group>"; };
F966BB7608F27A3A005CB29B /* msgbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = msgbox.tcl; sourceTree = "<group>"; };
- F966BB8608F27A3A005CB29B /* obsolete.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = obsolete.tcl; sourceTree = "<group>"; };
F966BB8708F27A3A005CB29B /* optMenu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = optMenu.tcl; sourceTree = "<group>"; };
F966BB8808F27A3A005CB29B /* palette.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = palette.tcl; sourceTree = "<group>"; };
F966BB8908F27A3B005CB29B /* panedwindow.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = panedwindow.tcl; sourceTree = "<group>"; };
@@ -1013,7 +1012,6 @@
F966BB9108F27A3B005CB29B /* text.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = text.tcl; sourceTree = "<group>"; };
F966BB9208F27A3B005CB29B /* tk.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tk.tcl; sourceTree = "<group>"; };
F966BB9308F27A3B005CB29B /* tkfbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tkfbox.tcl; sourceTree = "<group>"; };
- F966BB9408F27A3B005CB29B /* unsupported.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unsupported.tcl; sourceTree = "<group>"; };
F966BB9508F27A3B005CB29B /* xmfbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.tcl; sourceTree = "<group>"; };
F966BB9608F27A3B005CB29B /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; };
F966BBBA08F27A3B005CB29B /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure.ac; sourceTree = "<group>"; };
@@ -2451,7 +2449,6 @@
F966BB7408F27A3A005CB29B /* menu.tcl */,
F966BB7508F27A3A005CB29B /* mkpsenc.tcl */,
F966BB7608F27A3A005CB29B /* msgbox.tcl */,
- F966BB8608F27A3A005CB29B /* obsolete.tcl */,
F966BB8708F27A3A005CB29B /* optMenu.tcl */,
F966BB8808F27A3A005CB29B /* palette.tcl */,
F966BB8908F27A3B005CB29B /* panedwindow.tcl */,
@@ -2465,7 +2462,6 @@
F966BB9208F27A3B005CB29B /* tk.tcl */,
F966BB9308F27A3B005CB29B /* tkfbox.tcl */,
F96888360AF787B3000797B5 /* ttk */,
- F966BB9408F27A3B005CB29B /* unsupported.tcl */,
F966BB9508F27A3B005CB29B /* xmfbox.tcl */,
);
path = library;
diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index e0f26cd..ac75ce4 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -379,8 +379,8 @@
#define DEF_MESSAGE_HIGHLIGHT NORMAL_FG
#define DEF_MESSAGE_HIGHLIGHT_WIDTH "0"
#define DEF_MESSAGE_JUSTIFY "left"
-#define DEF_MESSAGE_PADX "-1"
-#define DEF_MESSAGE_PADY "-1"
+#define DEF_MESSAGE_PADX NULL
+#define DEF_MESSAGE_PADY NULL
#define DEF_MESSAGE_RELIEF "flat"
#define DEF_MESSAGE_TAKE_FOCUS "0"
#define DEF_MESSAGE_TEXT ""
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index fb1e403..e48263f 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -27,6 +27,26 @@
*/
/*
+ * TclNumUtfChars() is the same as Tcl_NumUtfChars(), but counting
+ * in UTF-16 in stead of UTF-32. For Tcl 8.7 it's a little bit
+ * tricky to get this function, because we are compiling with
+ * TCL_UTF_MAX=4. Same for TclUtfAtIndex()
+ */
+#if TCL_MAJOR_VERSION < 9
+# undef TclNumUtfChars
+# undef TclUtfAtIndex
+# ifdef USE_TCL_STUBS
+# define TclNumUtfChars \
+ (tclStubsPtr->tcl_NumUtfChars) /* 312 */
+# define TclUtfAtIndex \
+ (tclStubsPtr->tcl_UtfAtIndex) /* 325 */
+# else
+# define TclNumUtfChars Tcl_NumUtfChars
+# define TclUtfAtIndex Tcl_UtfAtIndex
+# endif
+#endif
+
+/*
* The following structure represents our Macintosh-specific implementation
* of a font object.
*/
@@ -460,21 +480,38 @@ startOfClusterObjCmd(
if (stringArg == NULL) {
return TCL_ERROR;
}
+ Tcl_Size ulen = Tcl_GetCharLength(objv[1]);
S = [[TKNSString alloc] initWithTclUtfBytes:stringArg length:numBytes];
- if (TkGetIntForIndex(objv[2], [S length] - 1, 0, &index) != TCL_OK) {
+ if (TkGetIntForIndex(objv[2], ulen - 1, 0, &index) != TCL_OK) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad index \"%s\": must be integer?[+-]integer?, end?[+-]integer?, or \"\"",
Tcl_GetString(objv[2])));
Tcl_SetErrorCode(interp, "TK", "VALUE", "INDEX", NULL);
return TCL_ERROR;
}
+ if (index > 0 && (Tcl_Size)[S length] != ulen) {
+ /* The string contains codepoints > \uFFFF. Determine UTF-16 index */
+ Tcl_Size newIdx = 0;
+ for (Tcl_Size i = 0; i < index; i++) {
+ newIdx += 1 + (((newIdx < (Tcl_Size)[S length]-1) && ([S characterAtIndex:newIdx]&0xFC00) == 0xD800) && (([S characterAtIndex:newIdx+1]&0xFC00) == 0xDC00));
+ }
+ index = newIdx;
+ }
if (index >= 0) {
- if ((size_t)index >= [S length]) {
+ if (index >= (Tcl_Size)[S length]) {
index = (Tcl_Size)[S length];
} else {
NSRange range = [S rangeOfComposedCharacterSequenceAtIndex:index];
index = range.location;
}
+ if (index > 0 && (Tcl_Size)[S length] != ulen) {
+ /* The string contains codepoints > \uFFFF. Determine UTF-32 index */
+ Tcl_Size newIdx = 1;
+ for (Tcl_Size i = 1; i < index; i++) {
+ if ((([S characterAtIndex:i-1]&0xFC00) != 0xD800) || (([S characterAtIndex:i]&0xFC00) != 0xDC00)) newIdx++;
+ }
+ index = newIdx;
+ }
Tcl_SetObjResult(interp, TkNewIndexObj(index));
}
return TCL_OK;
@@ -499,14 +536,23 @@ endOfClusterObjCmd(
if (stringArg == NULL) {
return TCL_ERROR;
}
+ Tcl_Size ulen = Tcl_GetCharLength(objv[1]);
S = [[TKNSString alloc] initWithTclUtfBytes:stringArg length:numBytes];
- if (TkGetIntForIndex(objv[2], [S length] - 1, 0, &index) != TCL_OK) {
+ if (TkGetIntForIndex(objv[2], ulen - 1, 0, &index) != TCL_OK) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad index \"%s\": must be integer?[+-]integer?, end?[+-]integer?, or \"\"",
Tcl_GetString(objv[2])));
Tcl_SetErrorCode(interp, "TK", "VALUE", "INDEX", NULL);
return TCL_ERROR;
}
+ if (index > 0 && (Tcl_Size)[S length] != ulen) {
+ /* The string contains codepoints > \uFFFF. Determine UTF-16 index */
+ Tcl_Size newIdx = 0;
+ for (Tcl_Size i = 0; i < index; i++) {
+ newIdx += 1 + (((newIdx < (Tcl_Size)[S length]-1) && ([S characterAtIndex:newIdx]&0xFC00) == 0xD800) && (([S characterAtIndex:newIdx+1]&0xFC00) == 0xDC00));
+ }
+ index = newIdx;
+ }
if ((size_t)index + 1 <= [S length]) {
if (index < 0) {
index = 0;
@@ -514,6 +560,14 @@ endOfClusterObjCmd(
NSRange range = [S rangeOfComposedCharacterSequenceAtIndex:index];
index = range.location + range.length;
}
+ if (index > 0 && (Tcl_Size)[S length] != ulen) {
+ /* The string contains codepoints > \uFFFF. Determine UTF-32 index */
+ Tcl_Size newIdx = 1;
+ for (Tcl_Size i = 1; i < index; i++) {
+ if ((([S characterAtIndex:i-1]&0xFC00) != 0xD800) || (([S characterAtIndex:i]&0xFC00) != 0xDC00)) newIdx++;
+ }
+ index = newIdx;
+ }
Tcl_SetObjResult(interp, TkNewIndexObj(index));
}
return TCL_OK;
@@ -1030,8 +1084,8 @@ TkpMeasureCharsInContext(
attributes:fontPtr->nsAttributes];
typesetter = CTTypesetterCreateWithAttributedString(
(CFAttributedStringRef)attributedString);
- start = Tcl_NumUtfChars(source, rangeStart);
- len = Tcl_NumUtfChars(source + rangeStart, rangeLength);
+ start = TclNumUtfChars(source, rangeStart);
+ len = TclNumUtfChars(source + rangeStart, rangeLength);
if (start > 0) {
range.length = start;
line = CTTypesetterCreateLine(typesetter, range);
@@ -1132,7 +1186,7 @@ TkpMeasureCharsInContext(
[attributedString release];
[string release];
length = ceil(width - offset);
- fit = (Tcl_UtfAtIndex(source, index) - source) - rangeStart;
+ fit = (TclUtfAtIndex(source, index) - source) - rangeStart;
done:
#ifdef TK_MAC_DEBUG_FONTS
TkMacOSXDbgMsg("measure: source=\"%s\" range=\"%.*s\" maxLength=%d "
@@ -1331,8 +1385,8 @@ TkpDrawAngledCharsInContext(
-textX, -textY);
}
CGContextConcatCTM(context, t);
- start = Tcl_NumUtfChars(source, rangeStart);
- length = Tcl_NumUtfChars(source, rangeStart + rangeLength) - start;
+ start = TclNumUtfChars(source, rangeStart);
+ length = TclNumUtfChars(source, rangeStart + rangeLength) - start;
line = CTTypesetterCreateLine(typesetter, CFRangeMake(start, length));
if (start > 0) {
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 10e8116..adf5d39 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -1096,12 +1096,12 @@ struct TkMacOSXNSImageModel {
int radius; /* Radius for rounded corners. */
int ring; /* Thickness of the focus ring. */
double alpha; /* Transparency, between 0.0 and 1.0*/
- bool pressed; /* Image is for use in a pressed button.*/
- bool templ; /* Image is for use as a template.*/
char *imageName ; /* Malloc'ed image name. */
char *source; /* Malloc'ed string describing the image. */
char *as; /* Malloc'ed interpretation of source */
int flags; /* Sundry flags, defined below. */
+ bool pressed; /* Image is for use in a pressed button.*/
+ bool templ; /* Image is for use as a template.*/
TkMacOSXNSImageInstance *instancePtr; /* Start of list of instances associated
* with this model. */
NSImage *image; /* The underlying NSImage object. */
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index ef0d678..c7127ef 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -501,7 +501,7 @@ TkpGetString(
macKC.uint = eventPtr->xkey.keycode;
if (IS_PRINTABLE(macKC.v.keychar)) {
- length = TkUniCharToUtf(macKC.v.keychar, utfChars);
+ length = Tcl_UniCharToUtf(macKC.v.keychar, utfChars);
}
utfChars[length] = 0;
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index c127d21..34e0e0e 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -16,34 +16,6 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXInt.h"
#include "tkMacOSXConstants.h"
-#if TCL_MAJOR_VERSION < 9
-#undef Tcl_MacOSXNotifierAddRunLoopMode
-#ifdef USE_TCL_STUBS
-#ifdef __cplusplus
-extern "C" {
-#endif
-/* Little hack to eliminate the need for "tclInt.h" here:
- Just copy a small portion of TclIntPlatStubs, just
- enough to make it work. See [600b72bfbc] */
-typedef struct TclIntPlatStubs {
- int magic;
- void *hooks;
- void (*dummy[19]) (void); /* dummy entries 0-18, not used */
- void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
-} TclIntPlatStubs;
-extern const TclIntPlatStubs *tclIntPlatStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-#define Tcl_MacOSXNotifierAddRunLoopMode \
- (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
-#elif TCL_MINOR_VERSION < 7
- extern void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode);
-# define Tcl_MacOSXNotifierAddRunLoopMode TclMacOSXNotifierAddRunLoopMode
-#else
- extern void Tcl_MacOSXNotifierAddRunLoopMode(const void *runLoopMode);
-#endif
-#endif
#import <objc/objc-auto.h>
/* This is not used for anything at the moment. */
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index dafd94f..a74b701 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -6980,7 +6980,7 @@ TkpGetWrapperWindow(
*----------------------------------------------------------------------
*/
-void
+int
TkpWmSetState(
TkWindow *winPtr, /* Toplevel window to operate on. */
int state) /* One of IconicState, ZoomState, NormalState,
@@ -6991,7 +6991,7 @@ TkpWmSetState(
wmPtr->hints.initial_state = state;
if (wmPtr->flags & WM_NEVER_MAPPED) {
- return;
+ goto setStateEnd;
}
macWin = TkMacOSXGetNSWindowForDrawable(winPtr->window);
@@ -7035,6 +7035,8 @@ TkpWmSetState(
*/
while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){}
+setStateEnd:
+ return 1;
}
/*
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 76b8b33..0a9a39d 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -865,6 +865,14 @@ XSetIconName(
return Success;
}
+Bool
+XFilterEvent(
+ TCL_UNUSED(XEvent *),
+ TCL_UNUSED(Window))
+{
+ return 0;
+}
+
int
XForceScreenSaver(
Display* display,
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index f651c06..9fbef79 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -2480,7 +2480,7 @@ static void TrackElementDraw(
double from = 0, to = 100, value = 0, fraction, max;
CGRect bounds = BoxToRect(d, b);
- TtkGetOrientFromObj(NULL, elem->orientObj, &orientation);
+ Ttk_GetOrientFromObj(NULL, elem->orientObj, &orientation);
Tcl_GetDoubleFromObj(NULL, elem->fromObj, &from);
Tcl_GetDoubleFromObj(NULL, elem->toObj, &to);
Tcl_GetDoubleFromObj(NULL, elem->valueObj, &value);
@@ -2622,7 +2622,7 @@ static void PbarElementDraw(
int isIndeterminate = !strcmp("indeterminate",
Tcl_GetString(pbar->modeObj));
- TtkGetOrientFromObj(NULL, pbar->orientObj, &orientation);
+ Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orientation);
Tcl_GetDoubleFromObj(NULL, pbar->valueObj, &value);
Tcl_GetDoubleFromObj(NULL, pbar->maximumObj, &maximum);
Tcl_GetIntFromObj(NULL, pbar->phaseObj, &phase);
@@ -2697,7 +2697,7 @@ static void TroughElementSize(
Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
SInt32 thickness = 15;
- TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
ChkErr(GetThemeMetric, kThemeMetricScrollBarWidth, &thickness);
if (orientation == TTK_ORIENT_HORIZONTAL) {
*minHeight = thickness;
@@ -2725,7 +2725,7 @@ static void TroughElementDraw(
CGRect bounds = BoxToRect(d, b);
GrayColor bgGray;
- TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
if (orientation == TTK_ORIENT_HORIZONTAL) {
bounds = CGRectInset(bounds, 0, 1);
} else {
@@ -2761,7 +2761,7 @@ static void ThumbElementSize(
ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord;
Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
- TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
if (orientation == TTK_ORIENT_VERTICAL) {
*minHeight = 18;
*minWidth = 8;
@@ -2782,7 +2782,7 @@ static void ThumbElementDraw(
ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord;
Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
- TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
/*
* In order to make ttk scrollbars work correctly it is necessary to be
diff --git a/tests/bind.test b/tests/bind.test
index b899097..c3b3456 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -2225,7 +2225,7 @@ test bind-16.46 {ExpandPercents procedure} -setup {
bind all <Key> $savedBind(All)
unset savedBind
} -result {0 1 2}
-test bind-16.47 {ExpandPercents procedure} -constraints {aquaOrWin32 needsTcl87} -setup {
+test bind-16.47 {ExpandPercents procedure} -constraints aquaOrWin32 -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
@@ -6038,7 +6038,7 @@ test bind-28.11 {keysym names, gcedilla} -body {
} -cleanup {
destroy .t.f
} -result <Key-gcedilla>
-test bind-28.12 {keysym names, Greek_IOTAdiaeresis -> Greek_IOTAdieresis} -constraints {deprecated needsTcl87} -body {
+test bind-28.12 {keysym names, Greek_IOTAdiaeresis -> Greek_IOTAdieresis} -constraints deprecated -body {
frame .t.f -class Test -width 150 -height 100
bind .t.f <Greek_IOTAdiaeresis> foo
bind .t.f
@@ -6059,7 +6059,7 @@ test bind-28.14 {keysym names, Emoji} -body {
} -cleanup {
destroy .t.f
} -result "<Key-\U1F44D>"
-test bind-28.15 {keysym names, Emoji} -constraints needsTcl87 -body {
+test bind-28.15 {keysym names, Emoji} -body {
frame .t.f -class Test -width 150 -height 100
bind .t.f <👍> foo
bind .t.f
diff --git a/tests/button.test b/tests/button.test
index b30780d..00ef076 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -1744,7 +1744,7 @@ test button-1.177 {configuration option: "overrelief" for button} -setup {
} -cleanup {
destroy .b
} -result {}
-test button-1.178 {configuration option: "overrelief" for button} -constraints needsTcl87 -setup {
+test button-1.178 {configuration option: "overrelief" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
update
@@ -1763,7 +1763,7 @@ test button-1.179 {configuration option: "overrelief" for checkbutton} -setup {
} -cleanup {
destroy .c
} -result {}
-test button-1.180 {configuration option: "overrelief" for checkbutton} -constraints needsTcl87 -setup {
+test button-1.180 {configuration option: "overrelief" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
update
@@ -1782,7 +1782,7 @@ test button-1.181 {configuration option: "overrelief" for radiobutton} -setup {
} -cleanup {
destroy .r
} -result {}
-test button-1.182 {configuration option: "overrelief" for radiobutton} -constraints needsTcl87 -setup {
+test button-1.182 {configuration option: "overrelief" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
update
diff --git a/tests/cluster.test b/tests/cluster.test
index 998759e..1ef9424 100644
--- a/tests/cluster.test
+++ b/tests/cluster.test
@@ -15,53 +15,53 @@ testConstraint needsICU [expr {[catch {info body ::tk::startOfCluster}]}]
test cluster-1.0 {::tk::startOfCluster} -body {
- ::tk::startOfCluster 🤡 -1
+ ::tk::startOfCluster é -1
} -result {}
test cluster-1.1 {::tk::startOfCluster} -body {
- ::tk::startOfCluster 🤡 0
+ ::tk::startOfCluster é 0
} -result 0
test cluster-1.2 {::tk::startOfCluster} -constraints needsICU -body {
- ::tk::startOfCluster 🤡 1
+ ::tk::startOfCluster é 1
} -result 0
test cluster-1.3 {::tk::startOfCluster} -constraints needsICU -body {
- ::tk::startOfCluster 🤡 2
+ ::tk::startOfCluster é 2
} -result 2
test cluster-1.4 {::tk::startOfCluster} -constraints needsICU -body {
- ::tk::startOfCluster 🤡 3
+ ::tk::startOfCluster é 3
} -result 2
test cluster-1.5 {::tk::startOfCluster} -constraints needsICU -body {
- ::tk::startOfCluster 🤡 end
+ ::tk::startOfCluster é end
} -result 0
test cluster-1.6 {::tk::startOfCluster} -body {
- ::tk::startOfCluster 🤡 {}
+ ::tk::startOfCluster é {}
} -result {}
test cluster-1.7 {::tk::startOfCluster} -constraints needsICU -body {
- ::tk::startOfCluster 🤡 end-1
+ ::tk::startOfCluster é end-1
} -result 0
test cluster-2.0 {::tk::endOfCluster} -body {
- ::tk::endOfCluster 🤡 -1
+ ::tk::endOfCluster é -1
} -result 0
test cluster-2.1 {::tk::endOfCluster} -constraints needsICU -body {
- ::tk::endOfCluster 🤡 0
+ ::tk::endOfCluster é 0
} -result 2
test cluster-2.2 {::tk::endOfCluster} -constraints needsICU -body {
- ::tk::endOfCluster 🤡 1
+ ::tk::endOfCluster é 1
} -result 2
test cluster-2.3 {::tk::endOfCluster} -body {
- ::tk::endOfCluster 🤡 2
+ ::tk::endOfCluster é 2
} -result {}
test cluster-2.4 {::tk::endOfCluster} -body {
- ::tk::endOfCluster 🤡 3
+ ::tk::endOfCluster é 3
} -result {}
test cluster-2.5 {::tk::endOfCluster} -constraints needsICU -body {
- ::tk::endOfCluster 🤡 end
+ ::tk::endOfCluster é end
} -result 2
test cluster-2.6 {::tk::endOfCluster} -body {
- ::tk::endOfCluster 🤡 {}
+ ::tk::endOfCluster é {}
} -result 0
test cluster-2.7 {::tk::endOfCluster} -constraints needsICU -body {
- ::tk::endOfCluster 🤡 end-1
+ ::tk::endOfCluster é end-1
} -result 2
test cluster-3.0 {::tk::endOfWord} -body {
@@ -122,7 +122,7 @@ test cluster-4.7 {::tk::startOfPreviousWord} -body {
test cluster-4.8 {::tk::startOfPreviousWord} -body {
::tk::startOfPreviousWord "ab cd" {}
} -result {}
-test cluster-4.9 {::tk::startOfPreviousWord} -constraints needsTcl87 -body {
+test cluster-4.9 {::tk::startOfPreviousWord} -body {
::tk::startOfPreviousWord "ab cd" end-1
} -result 0
diff --git a/tests/config.test b/tests/config.test
index 50f95e3..5621e92 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -458,14 +458,14 @@ test config-4.28 {DoObjConfig - string table} -constraints testobjconfig -body {
killTables
} -returnCodes ok
test config-4.29 {DoObjConfig - invalid string table} -constraints {
- testobjconfig needsTcl87
+ testobjconfig
} -body {
testobjconfig alltypes .foo -stringtable foo
} -cleanup {
killTables
} -returnCodes error -result {bad stringtable "foo": must be one, two, three, four, or ""}
test config-4.29a {DoObjConfig - invalid string table} -constraints {
- testobjconfig needsTcl87
+ testobjconfig
} -body {
testobjconfig alltypes .foo -stringtable2 foo
} -cleanup {
@@ -780,7 +780,7 @@ test config-4.70 {DoObjConfig - relief} -constraints testobjconfig -body {
killTables
} -returnCodes ok -result flat
test config-4.71 {DoObjConfig - invalid relief} -constraints {
- testobjconfig needsTcl87
+ testobjconfig
} -body {
testobjconfig alltypes .foo -relief foo
} -cleanup {
@@ -874,7 +874,7 @@ test config-4.84 {DoObjConfig - justify} -constraints testobjconfig -body {
} -cleanup {
killTables
} -returnCodes ok -result center
-test config-4.85 {DoObjConfig - invalid justify} -constraints {testobjconfig needsTcl87} -body {
+test config-4.85 {DoObjConfig - invalid justify} -constraints testobjconfig -body {
testobjconfig alltypes .foo -justify foo
} -cleanup {
killTables
@@ -916,7 +916,7 @@ test config-4.90 {DoObjConfig - anchor} -constraints testobjconfig -body {
} -returnCodes ok -result center
test config-4.91 {DoObjConfig - invalid anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor foo
-} -constraints needsTcl87 -cleanup {
+} -cleanup {
killTables
} -returnCodes error -result {bad anchor "foo": must be n, ne, e, se, s, sw, w, nw, center, or ""}
test config-4.92 {DoObjConfig - new anchor} -constraints testobjconfig -body {
diff --git a/tests/constraints.tcl b/tests/constraints.tcl
index 91256a8..8cc1a18 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -189,13 +189,8 @@ namespace eval tk {
# It takes care of the following timing details of pointer warping:
#
# a. Allow pointer warping to happen if it was scheduled for execution at
- # idle time.
- # - In Tk releases 8.6 and older, pointer warping is scheduled for
- # execution at idle time
- # - In release 8.7 and newer this happens synchronously if $w refers to the
- # whole screen or if the -when option to [event generate] is "now".
- # The namespace variable idle_pointer_warping records which of these is
- # the case.
+ # idle time. This happens synchronously if $w refers to the
+ # whole screen or if the -when option to [event generate] is "now".
#
# b. Work around a race condition associated with OS notification of
# mouse motion on Windows.
@@ -238,12 +233,8 @@ namespace eval tk {
# to [event generate $w] is not "now", and $w refers to a Tk window, i.e. not
# the whole screen.
#
- variable idle_pointer_warping [expr {[package provide tk] != ""}]
proc controlPointerWarpTiming {{duration 50}} {
- variable idle_pointer_warping
- if {$idle_pointer_warping} {
- update idletasks ;# see a. above
- }
+ update idletasks ;# see a. above
if {[tk windowingsystem] eq "win32"} {
after $duration ;# see b. above
}
@@ -273,8 +264,7 @@ testConstraint altDisplay [info exists env(TK_ALT_DISPLAY)]
testConstraint noExceed [expr {
![testConstraint unix] || [catch {font actual "\{xyz"}]
}]
-testConstraint deprecated [expr {![package vsatisfies [package provide Tcl] 8.7-] || ![::tk::build-info no-deprecate]}]
-testConstraint needsTcl87 [package vsatisfies [package provide Tcl] 8.7-]
+testConstraint deprecated [expr {![::tk::build-info no-deprecate]}]
# constraint for running a test on all windowing system except aqua
# where the test fails due to a known bug
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index 5a88a29..6ca3bc6 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -51,12 +51,6 @@
# ImgGetPhoto: no tests
# Tk_PhotoGetImage no tests
# ImgPostscriptPhoto no tests
-# Tk_PhotoPutBlock_NoComposite no tests, probably none needed
-# Tk_PhotoPutZoomedBlock_NoComposite no tests, probably none needed
-# Tk_PhotoExpand_Panic no tests, probably none needed
-# Tk_PhotoPutBlock_Panic no tests, probably none needed
-# Tk_PhotoPutZoomedBlock_Panic no tests, probably none needed
-# Tk_PhotoSetSize_Panic no tests, probably none needed
# Tk_PhotoGetMetadata: imgPhoto-21.*
# Tk_PhotoSetMetadata: imgPhoto-22.*
#--------------------------------------------------------------------------
diff --git a/tests/menu.test b/tests/menu.test
index 4041235..827f560 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -1864,10 +1864,10 @@ test menu-3.71 {MenuWidgetCmd procedure, "index end" option, bug [f3cd942e9e]} -
destroy .m1
} -body {
menu .m1
- expr {[.m1 index "end"] in [list {} none]}
+ .m1 index "end"
} -cleanup {
destroy .m1
-} -result 1
+} -result {}
test menu-4.1 {TkInvokeMenu: disabled} -setup {
@@ -4128,7 +4128,40 @@ test menu-39.2 {use-after-free fix - bug 1797555fff} -setup {
destroy .t
} -result {}
-test menu-40.1 {identifiers - auto generated} -setup {
+test menu-40.1 {Use-after-free if menu destroyed while posted - bug 09a11fb1228f} -setup {
+} -constraints {pressbutton} -body {
+ set done false
+ event generate {} <Motion> -x 100 -y 100
+ toplevel .t
+ menu .t.m
+ .t.m add command -command {puts Marco} -label Marco
+ .t.m add command -command {puts Polo} -label Polo
+ after 1000 {.t.m post 500 500}
+ after 2000 {destroy .t}
+ after 2500 {pressbutton 530 510}
+ after 3000 {set done true}
+ tkwait variable done
+}
+
+test menu-40.2 {Use-after-free if menu destroyed while posted - bug 09a11fb1228f} -setup {
+} -constraints {movemouse} -body {
+ set done false
+ event generate {} <Motion> -x 100 -y 100
+ toplevel .t
+ menu .t.m
+ .t.m add command -command {puts Marco} -label Marco
+ .t.m add command -command {puts Polo} -label Polo
+ after 1000 {.t.m post 500 500}
+ after 2000 {movemouse 530 510}
+ after 3000 {destroy .t}
+ after 3500 {movemouse 530 530}
+ after 4000 pressbutton 530 530
+ after 4500 {set done true}
+ tkwait variable done
+ pressbutton 530 510
+}
+
+test menu-41.1 {identifiers - auto generated} -setup {
destroy .m
} -body {
menu .m
@@ -4136,7 +4169,7 @@ test menu-40.1 {identifiers - auto generated} -setup {
} -cleanup {
destroy .m
} -result {e001 e002 e003}
-test menu-40.2 {identifiers - out of sequence} -setup {
+test menu-41.2 {identifiers - out of sequence} -setup {
destroy .m
} -body {
menu .m -tearoff 0
@@ -4147,7 +4180,7 @@ test menu-40.2 {identifiers - out of sequence} -setup {
} -cleanup {
destroy .m
} -result {1 0 2}
-test menu-40.3 {identifiers - out of sequence with tearoff} -setup {
+test menu-41.3 {identifiers - out of sequence with tearoff} -setup {
destroy .m
} -body {
menu .m -tearoff 1
@@ -4158,7 +4191,7 @@ test menu-40.3 {identifiers - out of sequence with tearoff} -setup {
} -cleanup {
destroy .m
} -result {2 1 3}
-test menu-40.4 {identifiers - entry id} -setup {
+test menu-41.4 {identifiers - entry id} -setup {
destroy .m
} -body {
menu .m -tearoff 1
@@ -4169,7 +4202,7 @@ test menu-40.4 {identifiers - entry id} -setup {
} -cleanup {
destroy .m
} -result {{} e002 e001 e003}
-test menu-40.5 {identifiers - assigned} -setup {
+test menu-41.5 {identifiers - assigned} -setup {
destroy .m
} -body {
menu .m
@@ -4177,7 +4210,7 @@ test menu-40.5 {identifiers - assigned} -setup {
} -cleanup {
destroy .m
} -result {cmd1 cmd2 cmd3}
-test menu-40.6 {identifiers - mixed} -setup {
+test menu-41.6 {identifiers - mixed} -setup {
destroy .m
} -body {
menu .m
@@ -4185,7 +4218,7 @@ test menu-40.6 {identifiers - mixed} -setup {
} -cleanup {
destroy .m
} -result {e001 cmd2 e002}
-test menu-40.7 {identifiers - conflict} -setup {
+test menu-41.7 {identifiers - conflict} -setup {
destroy .m
} -body {
menu .m
@@ -4193,7 +4226,7 @@ test menu-40.7 {identifiers - conflict} -setup {
} -cleanup {
destroy .m
} -result {e002 e001 e003}
-test menu-40.8 {identifiers - clone of complete menu} -setup {
+test menu-41.8 {identifiers - clone of complete menu} -setup {
destroy .m1 .m2
} -body {
menu .m1 -tearoff 0
@@ -4205,7 +4238,7 @@ test menu-40.8 {identifiers - clone of complete menu} -setup {
} -cleanup {
destroy .m1 .m2
} -result {1 0 2}
-test menu-40.9 {identifiers - modify after cloning} -setup {
+test menu-41.9 {identifiers - modify after cloning} -setup {
destroy .m1 .m2
} -body {
menu .m1 -tearoff 0
@@ -4217,7 +4250,7 @@ test menu-40.9 {identifiers - modify after cloning} -setup {
} -cleanup {
destroy .m1 .m2
} -result {1 0 2}
-test menu-40.10 {identifiers - modify clone} -setup {
+test menu-41.10 {identifiers - modify clone} -setup {
destroy .m1 .m2
} -body {
menu .m1 -tearoff 0
@@ -4229,7 +4262,7 @@ test menu-40.10 {identifiers - modify clone} -setup {
} -cleanup {
destroy .m1 .m2
} -result {1 0 2}
-test menu-40.11 {identifiers - entrycget by id} -setup {
+test menu-41.11 {identifiers - entrycget by id} -setup {
destroy .m
} -body {
menu .m
@@ -4240,7 +4273,7 @@ test menu-40.11 {identifiers - entrycget by id} -setup {
} -cleanup {
destroy .m
} -result {1 2 3}
-test menu-40.12 {identifiers - delete by id} -setup {
+test menu-41.12 {identifiers - delete by id} -setup {
destroy .m
} -body {
menu .m
@@ -4258,7 +4291,7 @@ test menu-40.12 {identifiers - delete by id} -setup {
} -cleanup {
destroy .m
} -result {e001 e002 cmd9}
-test menu-40.13 {identifiers - duplicate} -setup {
+test menu-41.13 {identifiers - duplicate} -setup {
destroy .m
} -body {
menu .m
@@ -4268,7 +4301,7 @@ test menu-40.13 {identifiers - duplicate} -setup {
} -cleanup {
destroy .m
} -returnCodes error -result {entry "foo" already exists}
-test menu-40.14 {identifiers - reserved word} -setup {
+test menu-41.14 {identifiers - reserved word} -setup {
destroy .m
} -body {
menu .m -tearoff 0
@@ -4280,39 +4313,6 @@ test menu-40.14 {identifiers - reserved word} -setup {
destroy .m
} -result {2}
-test menu-40.1 {Use-after-free if menu destroyed while posted - bug 09a11fb1228f} -setup {
-} -constraints {pressbutton} -body {
- set done false
- event generate {} <Motion> -x 100 -y 100
- toplevel .t
- menu .t.m
- .t.m add command -command {puts Marco} -label Marco
- .t.m add command -command {puts Polo} -label Polo
- after 1000 {.t.m post 500 500}
- after 2000 {destroy .t}
- after 2500 {pressbutton 530 510}
- after 3000 {set done true}
- tkwait variable done
-}
-
-test menu-40.2 {Use-after-free if menu destroyed while posted - bug 09a11fb1228f} -setup {
-} -constraints {movemouse} -body {
- set done false
- event generate {} <Motion> -x 100 -y 100
- toplevel .t
- menu .t.m
- .t.m add command -command {puts Marco} -label Marco
- .t.m add command -command {puts Polo} -label Polo
- after 1000 {.t.m post 500 500}
- after 2000 {movemouse 530 510}
- after 3000 {destroy .t}
- after 3500 {movemouse 530 530}
- after 4000 pressbutton 530 530
- after 4500 {set done true}
- tkwait variable done
- pressbutton 530 510
-}
-
# cleanup
imageFinish
deleteWindows
diff --git a/tests/menuDraw.test b/tests/menuDraw.test
index 02111ab..2cafc31 100644
--- a/tests/menuDraw.test
+++ b/tests/menuDraw.test
@@ -558,7 +558,7 @@ test menuDraw-15.2 {TkPostTearoffMenu - Deactivation} -setup {
menu .m1
.m1 add command -label "foo" -state active
set tearoff [tk::TearOffMenu .m1 40 40]
- expr {[$tearoff index active] in [list {} none]}
+ expr {[$tearoff index active]<0}
} -cleanup {
deleteWindows
} -result 1
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index 96ddce3..45c6deb 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -122,7 +122,7 @@ test panedwindow-1.23 {configuration options: -proxyrelief (good)} -body {
} -cleanup {
.p configure -proxyrelief [lindex [.p configure -proxyrelief] 3]
} -result {groove groove}
-test panedwindow-1.24 {configuration options: -proxyrelief (bad)} -constraints needsTcl87 -body {
+test panedwindow-1.24 {configuration options: -proxyrelief (bad)} -body {
.p configure -proxyrelief 1.5
} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, sunken, or ""}
test panedwindow-1.25 {configuration options: -relief (good)} -body {
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 061eacc..ef24860 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -316,10 +316,6 @@ destroy .t
test scrollbar-3.43 {ScrollbarWidgetCmd procedure, "get" option} {
list [catch {.s get a} msg] $msg
} {1 {wrong # args: should be ".s get"}}
-test scrollbar-3.44 {ScrollbarWidgetCmd procedure, "get" option} {deprecated needsTcl87} {
- .s set 100 10 13 14
- .s get
-} {100 10 13 14}
test scrollbar-3.45 {ScrollbarWidgetCmd procedure, "get" option} {
.s set 0.6 0.8
set result {}
@@ -401,30 +397,6 @@ test scrollbar-3.63 {ScrollbarWidgetCmd procedure, "set" option} {
}
set result
} {0.4 0.4}
-test scrollbar-3.64 {ScrollbarWidgetCmd procedure, "set" option} {deprecated needsTcl87} {
- list [catch {.s set abc def ghi jkl} msg] $msg
-} {1 {expected integer but got "abc"}}
-test scrollbar-3.65 {ScrollbarWidgetCmd procedure, "set" option} {deprecated needsTcl87} {
- list [catch {.s set 1 def ghi jkl} msg] $msg
-} {1 {expected integer but got "def"}}
-test scrollbar-3.66 {ScrollbarWidgetCmd procedure, "set" option} {deprecated needsTcl87} {
- list [catch {.s set 1 2 ghi jkl} msg] $msg
-} {1 {expected integer but got "ghi"}}
-test scrollbar-3.67 {ScrollbarWidgetCmd procedure, "set" option} {deprecated needsTcl87} {
- list [catch {.s set 1 2 3 jkl} msg] $msg
-} {1 {expected integer but got "jkl"}}
-test scrollbar-3.68 {ScrollbarWidgetCmd procedure, "set" option} {deprecated needsTcl87} {
- .s set -10 50 20 30
- .s get
-} {0 50 0 0}
-test scrollbar-3.69 {ScrollbarWidgetCmd procedure, "set" option} {deprecated needsTcl87} {
- .s set 100 -10 20 30
- .s get
-} {100 0 20 30}
-test scrollbar-3.70 {ScrollbarWidgetCmd procedure, "set" option} {deprecated needsTcl87} {
- .s set 100 50 30 20
- .s get
-} {100 50 30 30}
test scrollbar-3.71 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 3} msg] $msg
} {1 {wrong # args: should be ".s set firstFraction lastFraction"}}
diff --git a/tests/textTag.test b/tests/textTag.test
index 5d58cb0..7818aee 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -113,7 +113,7 @@ test textTag-1.12 {tag configuration options} -body {
} -cleanup {
.t tag configure x -justify [lindex [.t tag configure x -justify] 3]
} -result {left}
-test textTag-1.13 {configuration options, bug [026e2bb685]} -constraints needsTcl87 -body {
+test textTag-1.13 {configuration options, bug [026e2bb685]} -body {
.t tag configure x -justify right
catch {.t tag configure x -justify middle} msg
list $msg [.t tag configure x -justify]
@@ -169,7 +169,7 @@ test textTag-1.20 {tag configuration options} -body {
.t tag cget x -overstrike
} -cleanup {
.t tag configure x -overstrike [lindex [.t tag configure x -overstrike] 3]
-} -result {on}
+} -result 1
test textTag-1.21 {configuration options} -body {
.t tag configure x -overstrike stupid
} -cleanup {
@@ -192,7 +192,7 @@ test textTag-1.22 {tag configuration options} -body {
} -cleanup {
.t tag configure x -relief [lindex [.t tag configure x -relief] 3]
} -result {raised}
-test textTag-1.23 {configuration options} -constraints needsTcl87 -body {
+test textTag-1.23 {configuration options} -body {
.t tag configure x -relief stupid
} -cleanup {
.t tag configure x -relief [lindex [.t tag configure x -relief] 3]
@@ -291,7 +291,7 @@ test textTag-1.34 {tag configuration options} -body {
.t tag cget x -underline
} -cleanup {
.t tag configure x -underline [lindex [.t tag configure x -underline] 3]
-} -result {no}
+} -result 0
test textTag-1.35 {configuration options} -body {
.t tag configure x -underline stupid
} -cleanup {
@@ -501,7 +501,7 @@ test textTag-5.4 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -underline
} -cleanup {
.t tag delete x
-} -result {-underline {} {} {} yes}
+} -result {-underline {} {} {} 1}
test textTag-5.4a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -underlinefg lightgreen
@@ -515,7 +515,7 @@ test textTag-5.5 {TkTextTagCmd - "configure" option} -body {
.t tag cget x -overstrike
} -cleanup {
.t tag delete x
-} -result {on}
+} -result 1
test textTag-5.5a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -overstrikefg lightgreen
@@ -541,14 +541,14 @@ test textTag-5.8 {TkTextTagCmd - "configure" option} -body {
} -cleanup {
.t tag delete x
} -result {-justify {} {} {} left}
-test textTag-5.9 {TkTextTagCmd - "configure" option, bug [026e2bb685]} -constraints needsTcl87 -body {
- .t tag delete x
+test textTag-5.9 {TkTextTagCmd - "configure" option, bug [026e2bb685]} -body {
+ .t tag delete x
catch {.t tag configure x -justify bogus} msg
list $msg [.t tag configure x -justify]
} -cleanup {
.t tag delete x
} -result {{bad justification "bogus": must be left, right, center, or ""} {-justify {} {} {} {}}}
-test textTag-5.10 {TkTextTagCmd - "configure" option} -constraints needsTcl87 -body {
+test textTag-5.10 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -justify fill
} -cleanup {
diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test
index 9cc1a48..af0417a 100644
--- a/tests/ttk/entry.test
+++ b/tests/ttk/entry.test
@@ -67,7 +67,7 @@ test entry-1.7 "Deletion - insert cursor in the middle " -body {
.e index insert
} -result 0
-test entry-1.8 "Index is between 0 and end" -constraints deprecated -body {
+test entry-1.8 "Index is between 0 and end" -body {
.e delete 0 end
.e insert end abcde
set res [list [.e index -1] [.e index -4] [.e index 999]]
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index 5f2cc84..b424dfb 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -191,10 +191,11 @@ test treeview-3.5 "index - exhaustive test" -body {
} -result [list 0 1 2 3 4 5 6]
test treeview-3.6 "detach" -body {
+ set before [.tv detached newnode]
.tv detach newnode
consistencyCheck .tv
- .tv children {}
-} -result [list newfirstone firstnode anotherone onemore lastnode newlastone]
+ list [.tv children {}] [.tv detached] $before [.tv detached newnode]
+} -result {{newfirstone firstnode anotherone onemore lastnode newlastone} newnode 0 1}
# XREF: treeview-2.13
test treeview-3.7 "detach didn't screw up internal links" -body {
@@ -229,17 +230,19 @@ test treeview-3.11 "Can't detach root item" -body {
} -returnCodes error -result "Cannot detach root item"
test treeview-3.12 "Reattach" -body {
+ set before [.tv detached newnode]
.tv move newnode {} end
consistencyCheck .tv
- .tv children {}
-} -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode]
+ list [.tv children {}] $before [.tv detached newnode] [.tv detached]
+} -result {{newfirstone firstnode anotherone onemore lastnode newlastone newnode} 1 0 {}}
# Bug # ?????
test treeview-3.13 "Re-reattach" -body {
+ set before [.tv detached newnode]
.tv move newnode {} end
consistencyCheck .tv
- .tv children {}
-} -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode]
+ list [.tv children {}] $before [.tv detached newnode]
+} -result {{newfirstone firstnode anotherone onemore lastnode newlastone newnode} 0 0}
catch {
.tv insert newfirstone end -id x1
diff --git a/unix/Makefile.in b/unix/Makefile.in
index ec6ea48..90f3683 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -112,7 +112,7 @@ TCL_PLATFORM_DIR = $(TCLDIR)/unix
# for this version of Tk:
TCL_BIN_DIR = @TCL_BIN_DIR@
-# The linker flags needed to link in the Tcl library (ex: -ltcl8.7)
+# The linker flags needed to link in the Tcl library (ex: -ltcl9.0)
TCL_LIB_FLAG = @TCL_LIB_FLAG@
# Flag, 1: we're building a shared lib, 0 we're not
@@ -335,7 +335,7 @@ CC_SWITCHES_NO_STUBS = -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \
${@TK_WINDOWINGSYSTEM@_INCLUDES} ${CFLAGS} ${CFLAGS_WARNING} \
${SHLIB_CFLAGS} -I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${AC_FLAGS} \
${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \
-${NO_DEPRECATED_FLAGS} -DTCL_UTF_MAX=3 @EXTRA_CC_SWITCHES@
+${NO_DEPRECATED_FLAGS} -DTCL_UTF_MAX=4 @EXTRA_CC_SWITCHES@
CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @TCL_STUB_FLAGS@
@@ -348,7 +348,7 @@ ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@
WISH_OBJS = tkAppInit.o
-TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o tkOldTest.o \
+TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o \
$(@TK_WINDOWINGSYSTEM@_TKTEST_OBJS)
WIDG_OBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
@@ -462,7 +462,7 @@ GENERIC_SRCS = \
$(GENERIC_DIR)/tkTextImage.c \
$(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \
$(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \
- $(GENERIC_DIR)/tkOldConfig.c $(GENERIC_DIR)/tkOldTest.c \
+ $(GENERIC_DIR)/tkOldConfig.c \
$(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \
$(GENERIC_DIR)/tkStubInit.c
@@ -649,9 +649,9 @@ ${LIB_FILE}: ${STUB_LIB_FILE} @LIB_RSRC_FILE@ ${OBJS} ${TK_ZIP_FILE}
fi
${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
- @if test "x${LIB_FILE}" = "xlibtk${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \
- (cd ${TOP_DIR}/win; ${MAKE} tk${MAJOR_VERSION}${MINOR_VERSION}.dll); \
- cp "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll" .; \
+ @if test "x${LIB_FILE}" = "xlibtcl9tk${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \
+ (cd ${TOP_DIR}/win; ${MAKE} tcl9tk${MAJOR_VERSION}${MINOR_VERSION}.dll); \
+ cp "${TOP_DIR}/win/tcl9tk${MAJOR_VERSION}${MINOR_VERSION}.dll" .; \
fi
rm -f $@
@MAKE_STUB_LIB@
@@ -1241,9 +1241,6 @@ tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkImgPhoto.h
tkImgPhInstance.o: $(GENERIC_DIR)/tkImgPhInstance.c $(GENERIC_DIR)/tkImgPhoto.h
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhInstance.c
-tkOldTest.o: $(GENERIC_DIR)/tkOldTest.c
- $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkOldTest.c
-
tkTest.o: $(GENERIC_DIR)/tkTest.c tkUuid.h
$(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkTest.c
diff --git a/unix/configure b/unix/configure
index d528c32..01c6310 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for tk 8.7.
+# Generated by GNU Autoconf 2.71 for tk 9.0.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -608,8 +608,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='tk'
PACKAGE_TARNAME='tk'
-PACKAGE_VERSION='8.7'
-PACKAGE_STRING='tk 8.7'
+PACKAGE_VERSION='9.0'
+PACKAGE_STRING='tk 9.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tk 8.7 to adapt to many kinds of systems.
+\`configure' configures tk 9.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1448,7 +1448,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tk 8.7:";;
+ short | recursive ) echo "Configuration of tk 9.0:";;
esac
cat <<\_ACEOF
@@ -1564,7 +1564,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tk configure 8.7
+tk configure 9.0
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1920,7 +1920,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tk $as_me 8.7, which was
+It was created by tk $as_me 9.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2582,10 +2582,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-TK_VERSION=8.7
-TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=7
-TK_PATCH_LEVEL="a6"
+TK_VERSION=9.0
+TK_MAJOR_VERSION=9
+TK_MINOR_VERSION=0
+TK_PATCH_LEVEL="b1"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
@@ -2678,11 +2678,11 @@ printf "%s\n" "$as_me: WARNING: --with-tcl argument should refer to directory co
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tcl8.7 2>/dev/null` \
+ `ls -d /usr/lib/tcl9.0 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd $i; pwd)`"
@@ -2780,12 +2780,8 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
-if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
- as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
-Found config for Tcl ${TCL_VERSION}" "$LINENO" 5
-fi
-if test "${TCL_MINOR_VERSION}" -lt 6 ; then
- as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
+if test "${TCL_MINOR_VERSION}" -lt 7 ; then
+ as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+
Found config for Tcl ${TCL_VERSION}" "$LINENO" 5
fi
fi
@@ -6252,6 +6248,33 @@ printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
fi
+ # Check for vfork, posix_spawnp() and friends unconditionally
+ ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
+if test "x$ac_cv_func_vfork" = xyes
+then :
+ printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
+if test "x$ac_cv_func_posix_spawnp" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_adddup2" "ac_cv_func_posix_spawn_file_actions_adddup2"
+if test "x$ac_cv_func_posix_spawn_file_actions_adddup2" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_spawnattr_setflags" "ac_cv_func_posix_spawnattr_setflags"
+if test "x$ac_cv_func_posix_spawnattr_setflags" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
+
+fi
+
+
# FIXME: This subst was left in only because the TCL_DL_LIBS
# entry in tclConfig.sh uses it. It is not clear why someone
# would use TCL_DL_LIBS instead of TCL_LIBS.
@@ -6453,6 +6476,56 @@ printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
tcl_flags="$tcl_flags _FILE_OFFSET_BITS"
fi
+
+ if test ${tcl_cv_flag__largefile64_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main (void)
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tcl_cv_flag__largefile64_source=no
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int
+main (void)
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tcl_cv_flag__largefile64_source=yes
+else $as_nop
+ tcl_cv_flag__largefile64_source=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+
+printf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+
+ tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+ fi
+
if test "x${tcl_flags}" = "x" ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
@@ -6642,41 +6715,6 @@ printf "%s\n" "#define HAVE_DIR64 1" >>confdefs.h
fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
-printf %s "checking for struct stat64... " >&6; }
-if test ${tcl_cv_struct_stat64+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/stat.h>
-int
-main (void)
-{
-struct stat64 p;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- tcl_cv_struct_stat64=yes
-else $as_nop
- tcl_cv_struct_stat64=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
-printf "%s\n" "$tcl_cv_struct_stat64" >&6; }
- if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-
-printf "%s\n" "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
-
- fi
-
ac_fn_c_check_func "$LINENO" "open64" "ac_cv_func_open64"
if test "x$ac_cv_func_open64" = xyes
then :
@@ -8917,17 +8955,8 @@ fi
#--------------------------------------------------------------------
# Replace ${VERSION} with contents of ${TK_VERSION}
-if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
TK_STUB_LIB_FILE="libtkstub.a"
TK_STUB_LIB_FLAG="-ltkstub"
-else
- eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}"
-if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}"
-else
- TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`"
-fi
-fi
eval "TK_STUB_LIB_DIR=\"${libdir}\""
TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
@@ -9548,7 +9577,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tk $as_me 8.7, which was
+This file was extended by tk $as_me 9.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -9607,7 +9636,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-tk config.status 8.7
+tk config.status 9.0
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/unix/configure.ac b/unix/configure.ac
index c2c20f4..537bc13 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -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.
-AC_INIT([tk],[8.7])
+AC_INIT([tk],[9.0])
AC_PREREQ([2.69])
dnl This is only used when included from macosx/configure.ac
@@ -23,10 +23,10 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
#endif /* _TKCONFIG */])
])
-TK_VERSION=8.7
-TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=7
-TK_PATCH_LEVEL="a6"
+TK_VERSION=9.0
+TK_MAJOR_VERSION=9
+TK_MINOR_VERSION=0
+TK_PATCH_LEVEL="b1"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
@@ -38,12 +38,8 @@ SC_PATH_TCLCONFIG
SC_LOAD_TCLCONFIG
if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
-if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
- AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
-Found config for Tcl ${TCL_VERSION}])
-fi
-if test "${TCL_MINOR_VERSION}" -lt 6 ; then
- AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
+if test "${TCL_MINOR_VERSION}" -lt 7 ; then
+ AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+
Found config for Tcl ${TCL_VERSION}])
fi
fi
@@ -714,17 +710,8 @@ AC_SUBST(INSTALL_MSGS)
#--------------------------------------------------------------------
# Replace ${VERSION} with contents of ${TK_VERSION}
-if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
TK_STUB_LIB_FILE="libtkstub.a"
TK_STUB_LIB_FLAG="-ltkstub"
-else
- eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}"
-if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}"
-else
- TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`"
-fi
-fi
eval "TK_STUB_LIB_DIR=\"${libdir}\""
TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index a46478c..4a9fe40 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -93,11 +93,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tcl8.7 2>/dev/null` \
+ `ls -d /usr/lib/tcl9.0 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd $i; pwd)`"
@@ -226,11 +226,11 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tk8.7 2>/dev/null` \
+ `ls -d /usr/lib/tk9.0 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tk8.7 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tk8.7 2>/dev/null` \
+ `ls -d /usr/local/lib/tk9.0 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tk9.0 2>/dev/null` \
; do
if test -f "$i/tkConfig.sh" ; then
ac_cv_c_tkconfig="`(cd $i; pwd)`"
@@ -1874,6 +1874,9 @@ dnl # preprocessing tests use only CPPFLAGS.
AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],)
+ # Check for vfork, posix_spawnp() and friends unconditionally
+ AC_CHECK_FUNCS(vfork posix_spawnp posix_spawn_file_actions_adddup2 posix_spawnattr_setflags)
+
# FIXME: This subst was left in only because the TCL_DL_LIBS
# entry in tclConfig.sh uses it. It is not clear why someone
# would use TCL_DL_LIBS instead of TCL_LIBS.
@@ -2292,6 +2295,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [
# Might define the following vars:
# _ISOC99_SOURCE
# _FILE_OFFSET_BITS
+# _LARGEFILE64_SOURCE
#
#--------------------------------------------------------------------
@@ -2315,6 +2319,8 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[
[char *p = (char *)strtoll; char *q = (char *)strtoull;])
SC_TCL_EARLY_FLAG(_FILE_OFFSET_BITS,[#include <sys/stat.h>],
[switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }],64)
+ SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
+ [struct stat64 buf; int i = stat64("/", &buf);])
if test "x${tcl_flags}" = "x" ; then
AC_MSG_RESULT([none])
else
@@ -2335,7 +2341,6 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[
# Might define the following vars:
# TCL_WIDE_INT_IS_LONG
# HAVE_STRUCT_DIRENT64, HAVE_DIR64
-# HAVE_STRUCT_STAT64
# HAVE_TYPE_OFF64_T
# _TIME_BITS
#
@@ -2391,14 +2396,6 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
AC_DEFINE(HAVE_DIR64, 1, [Is 'DIR64' in <sys/types.h>?])
fi
- AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[struct stat64 p;
-]])],
- [tcl_cv_struct_stat64=yes], [tcl_cv_struct_stat64=no])])
- if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
- AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
- fi
-
AC_CHECK_FUNCS(open64 lseek64)
AC_MSG_CHECKING([for off64_t])
AC_CACHE_VAL(tcl_cv_type_off64_t,[
diff --git a/unix/tk.spec b/unix/tk.spec
index 6a6924c..208877f 100644
--- a/unix/tk.spec
+++ b/unix/tk.spec
@@ -4,15 +4,15 @@
Name: tk
Summary: Tk graphical toolkit for the Tcl scripting language.
-Version: 8.7a6
+Version: 9.0b1
Release: 2
License: BSD
Group: Development/Languages
Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz
URL: https://www.tcl-lang.org/
Buildroot: /var/tmp/%{name}%{version}
-Buildrequires: XFree86-devel tcl >= 8.6.0
-Requires: tcl >= 8.6.0
+Buildrequires: XFree86-devel tcl >= 8.7.0
+Requires: tcl >= 8.7.0
%description
The Tcl (Tool Command Language) provides a powerful platform for
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c
index 77f7330..3059801 100644
--- a/unix/tkAppInit.c
+++ b/unix/tkAppInit.c
@@ -12,6 +12,25 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+/*
+ * Explanation on following undef USE_TCL_STUBS by JN 2023-12-19 on the core list:
+ * What's going on is related to TIP #596:
+ * Stubs support for Embedding Tcl in other applications
+ *
+ * If an application using Tcl_Main() is compiled with USE_TCL_STUBS,
+ * Tcl_Main() will be replaced by a stub function, which loads
+ * libtcl9.0.so/tcl90.dll and then calls its Tcl_MainEx(). If
+ * libtcl9.0.so/tcl90.dll is not present (at runtime), a crash is what happens.
+ *
+ * So ... tkAppInit.c should not be compiled with USE_TCL_STUBS
+ * (unless you want to use the TIP #596 functionality)
+ *
+ * The proper solution is to make sure that Makefile.in doesn't use
+ * TCL_USE_STUBS when compiling tkAppInit.c. But that's a
+ * quite big re-organization just before a b1 release. Simpler
+ * is just to #undef'ine USE_TCL_STUBS, it has the same effect.
+ */
+#undef USE_TCL_STUBS
#undef BUILD_tk
#undef STATIC_BUILD
#include "tk.h"
diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in
index 2f6eca6..ffc0e06 100644
--- a/unix/tkConfig.h.in
+++ b/unix/tkConfig.h.in
@@ -34,6 +34,15 @@
/* Define to 1 if you have the `open64' function. */
#undef HAVE_OPEN64
+/* Define to 1 if you have the `posix_spawnattr_setflags' function. */
+#undef HAVE_POSIX_SPAWNATTR_SETFLAGS
+
+/* Define to 1 if you have the `posix_spawnp' function. */
+#undef HAVE_POSIX_SPAWNP
+
+/* Define to 1 if you have the `posix_spawn_file_actions_adddup2' function. */
+#undef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+
/* Does struct password have a pw_gecos field? */
#undef HAVE_PW_GECOS
@@ -58,9 +67,6 @@
/* Is 'struct dirent64' in <sys/types.h>? */
#undef HAVE_STRUCT_DIRENT64
-/* Is 'struct stat64' in <sys/stat.h>? */
-#undef HAVE_STRUCT_STAT64
-
/* Should we include <sys/select.h>? */
#undef HAVE_SYS_SELECT_H
@@ -82,6 +88,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
/* Is weak import available? */
#undef HAVE_WEAK_IMPORT
@@ -189,6 +198,9 @@
/* Add the _ISOC99_SOURCE flag when building */
#undef _ISOC99_SOURCE
+/* Add the _LARGEFILE64_SOURCE flag when building */
+#undef _LARGEFILE64_SOURCE
+
/* # needed in sys/socket.h Should OS/390 do the right thing with sockets? */
#undef _OE_SOCKETS
diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h
index c94b1a5..619dfde 100644
--- a/unix/tkUnixDefault.h
+++ b/unix/tkUnixDefault.h
@@ -351,8 +351,8 @@
#define DEF_MESSAGE_HIGHLIGHT BLACK
#define DEF_MESSAGE_HIGHLIGHT_WIDTH "0"
#define DEF_MESSAGE_JUSTIFY "left"
-#define DEF_MESSAGE_PADX "-1"
-#define DEF_MESSAGE_PADY "-1"
+#define DEF_MESSAGE_PADX NULL
+#define DEF_MESSAGE_PADY NULL
#define DEF_MESSAGE_RELIEF "flat"
#define DEF_MESSAGE_TAKE_FOCUS "0"
#define DEF_MESSAGE_TEXT ""
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 26652c7..a2b0c96 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -238,16 +238,6 @@ static unsigned RankAttributes(FontAttributes *wantPtr,
static void ReleaseFont(UnixFont *fontPtr);
static void ReleaseSubFont(Display *display, SubFont *subFontPtr);
static int SeenName(const char *name, Tcl_DString *dsPtr);
-#if TCL_MAJOR_VERSION < 9
-static int Ucs2beToUtfProc(void *clientData, const char*src,
- int srcLen, int flags, Tcl_EncodingState*statePtr,
- char *dst, int dstLen, int *srcReadPtr,
- int *dstWrotePtr, int *dstCharsPtr);
-static int UtfToUcs2beProc(void *clientData, const char*src,
- int srcLen, int flags, Tcl_EncodingState*statePtr,
- char *dst, int dstLen, int *srcReadPtr,
- int *dstWrotePtr, int *dstCharsPtr);
-#endif
/*
*-------------------------------------------------------------------------
@@ -314,9 +304,6 @@ TkpFontPkgInit(
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
SubFont dummy;
int i;
-#if TCL_MAJOR_VERSION < 9
- Tcl_Encoding ucs2;
-#endif
if (tsdPtr->controlFamily.encoding == NULL) {
@@ -337,15 +324,6 @@ TkpFontPkgInit(
* if it doesn't exist yet. It is used in iso10646 fonts.
*/
-#if TCL_MAJOR_VERSION < 9
- ucs2 = Tcl_GetEncoding(NULL, "ucs-2be");
- if (ucs2 == NULL) {
- Tcl_EncodingType ucs2type = {"ucs-2be", Ucs2beToUtfProc, UtfToUcs2beProc, NULL, NULL, 2};
- Tcl_CreateEncoding(&ucs2type);
- } else {
- Tcl_FreeEncoding(ucs2);
- }
-#endif
Tcl_CreateThreadExitHandler(FontPkgCleanup, NULL);
}
}
@@ -415,7 +393,7 @@ ControlUtfProc(
result = TCL_CONVERT_NOSPACE;
break;
}
- src += TkUtfToUniChar(src, &ch);
+ src += Tcl_UtfToUniChar(src, &ch);
dst[0] = '\\';
if (((size_t)ch < sizeof(mapChars)) && (mapChars[ch] != 0)) {
dst[1] = mapChars[ch];
@@ -449,202 +427,6 @@ ControlUtfProc(
}
/*
- *-------------------------------------------------------------------------
- *
- * Ucs2beToUtfProc --
- *
- * Convert from UCS-2BE (big-endian 16-bit Unicode) to UTF-8.
- *
- * Results:
- * Returns TCL_OK if conversion was successful.
- *
- * Side effects:
- * None.
- *
- *-------------------------------------------------------------------------
- */
-
-#if TCL_MAJOR_VERSION < 9
-static int
-Ucs2beToUtfProc(
- TCL_UNUSED(void *), /* Not used. */
- const char *src, /* Source string in Unicode. */
- int srcLen, /* Source string length in bytes. */
- int flags, /* Conversion control flags. */
- TCL_UNUSED(Tcl_EncodingState *),/* Place for conversion routine to store state
- * information used during a piecewise
- * conversion. Contents of statePtr are
- * initialized and/or reset by conversion
- * routine under control of flags argument. */
- char *dst, /* Output buffer in which converted string is
- * stored. */
- int dstLen, /* The maximum length of output buffer in
- * bytes. */
- int *srcReadPtr, /* Filled with the number of bytes from the
- * source string that were converted. This may
- * be less than the original source length if
- * there was a problem converting some source
- * characters. */
- int *dstWrotePtr, /* Filled with the number of bytes that were
- * stored in the output buffer as a result of
- * the conversion. */
- int *dstCharsPtr) /* Filled with the number of characters that
- * correspond to the bytes stored in the
- * output buffer. */
-{
- const char *srcStart, *srcEnd;
- const char *dstEnd, *dstStart;
- int result, numChars, charLimit = INT_MAX;
- unsigned short ch;
-
- if (flags & TCL_ENCODING_CHAR_LIMIT) {
- charLimit = *dstCharsPtr;
- }
- result = TCL_OK;
-
- /* check alignment with ucs-2 (2 == sizeof(UCS-2)) */
- if ((srcLen % 2) != 0) {
- result = TCL_CONVERT_MULTIBYTE;
- srcLen--;
- }
- /* If last code point is a high surrogate, we cannot handle that yet */
- if ((srcLen >= 2) && ((src[srcLen - 2] & 0xFC) == 0xD8)) {
- result = TCL_CONVERT_MULTIBYTE;
- srcLen -= 2;
- }
-
- srcStart = src;
- srcEnd = src + srcLen;
-
- dstStart = dst;
- dstEnd = dst + dstLen - 4;
-
- for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
- if (dst > dstEnd) {
- result = TCL_CONVERT_NOSPACE;
- break;
- }
-
- ch = (src[0] & 0xFF) << 8 | (src[1] & 0xFF);
- src += 2 /* sizeof(UTF-16) */;
-
- /*
- * Special case for 1-byte utf chars for speed. Make sure we work with
- * unsigned short-size data.
- */
- if (ch && ch < 0x80) {
- *dst++ = (ch & 0xFF);
- } else {
- dst += Tcl_UniCharToUtf(ch, dst);
- }
- }
-
- *srcReadPtr = src - srcStart;
- *dstWrotePtr = dst - dstStart;
- *dstCharsPtr = numChars;
- return result;
-}
-
-/*
- *-------------------------------------------------------------------------
- *
- * UtfToUcs2beProc --
- *
- * Convert from UTF-8 to UCS-2BE (fixed 2-byte encoding).
- *
- * Results:
- * Returns TCL_OK if conversion was successful.
- *
- * Side effects:
- * None.
- *
- *-------------------------------------------------------------------------
- */
-
-#if defined(USE_TCL_STUBS)
-/* Since the UCS-2BE encoding is only used when Tk is dynamically loaded in Tcl 8.6,
- * make sure that Tcl_UtfCharComplete is ALWAYS the pre-TIP #575 version,
- * even though Tk is being compiled with -DTCL_NO_DEPRECATED! */
-# undef Tcl_UtfCharComplete
-# define Tcl_UtfCharComplete ((int (*)(const char *, int))(void *)((&tclStubsPtr->tcl_PkgProvideEx)[326]))
-#endif
-
-static int
-UtfToUcs2beProc(
- TCL_UNUSED(void *), /* TableEncodingData that specifies
- * encoding. */
- const char *src, /* Source string in UTF-8. */
- int srcLen, /* Source string length in bytes. */
- int flags, /* Conversion control flags. */
- TCL_UNUSED(Tcl_EncodingState *),/* Place for conversion routine to store state
- * information used during a piecewise
- * conversion. Contents of statePtr are
- * initialized and/or reset by conversion
- * routine under control of flags argument. */
- char *dst, /* Output buffer in which converted string is
- * stored. */
- int dstLen, /* The maximum length of output buffer in
- * bytes. */
- int *srcReadPtr, /* Filled with the number of bytes from the
- * source string that were converted. This may
- * be less than the original source length if
- * there was a problem converting some source
- * characters. */
- int *dstWrotePtr, /* Filled with the number of bytes that were
- * stored in the output buffer as a result of
- * the conversion. */
- int *dstCharsPtr) /* Filled with the number of characters that
- * correspond to the bytes stored in the
- * output buffer. */
-{
- const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd;
- int result, numChars;
- int ch;
-
- srcStart = src;
- srcEnd = src + srcLen;
- srcClose = srcEnd;
- if (!(flags & TCL_ENCODING_END)) {
- srcClose -= 6;
- }
-
- dstStart = dst;
- dstEnd = dst + dstLen - 2 /* sizeof(UCS-2) */;
-
- result = TCL_OK;
- for (numChars = 0; src < srcEnd; numChars++) {
- if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
- /*
- * If there is more string to follow, this will ensure that the
- * last UTF-8 character in the source buffer hasn't been cut off.
- */
- result = TCL_CONVERT_MULTIBYTE;
- break;
- }
- if (dst > dstEnd) {
- result = TCL_CONVERT_NOSPACE;
- break;
- }
- src += TkUtfToUniChar(src, &ch);
- if (ch > 0xFFFF) {
- ch = 0xFFFD;
- }
-
- /*
- * Ensure big-endianness (store big bits first).
- */
-
- *dst++ = (char)((ch >> 8) & 0xFF);
- *dst++ = (char)(ch & 0xFF);
- }
- *srcReadPtr = src - srcStart;
- *dstWrotePtr = dst - dstStart;
- *dstCharsPtr = numChars;
- return result;
-}
-#endif
-
-/*
*---------------------------------------------------------------------------
*
* TkpGetNativeFont --
@@ -1061,11 +843,11 @@ Tk_MeasureChars(
curX = 0;
end = source + numBytes;
for (p = source; p < end; ) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
if (thisSubFontPtr != lastSubFontPtr) {
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source,
+ (void)Tcl_UtfToExternalDString(familyPtr->encoding, source,
p - source, &runString);
if (familyPtr->isTwoByteFont) {
curX += XTextWidth16(lastSubFontPtr->fontStructPtr,
@@ -1083,7 +865,7 @@ Tk_MeasureChars(
p = next;
}
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source,
+ (void)Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source,
&runString);
if (familyPtr->isTwoByteFont) {
curX += XTextWidth16(lastSubFontPtr->fontStructPtr,
@@ -1108,7 +890,7 @@ Tk_MeasureChars(
* individually.
*/
- next = source + TkUtfToUniChar(source, &ch);
+ next = source + Tcl_UtfToUniChar(source, &ch);
newX = curX = termX = 0;
term = source;
@@ -1143,7 +925,7 @@ Tk_MeasureChars(
break;
}
- next += TkUtfToUniChar(next, &ch);
+ next += Tcl_UtfToUniChar(next, &ch);
if ((ch < 256) && isspace(ch)) {
if (sawNonSpace) {
term = p;
@@ -1168,13 +950,13 @@ Tk_MeasureChars(
*/
curX = newX;
- p += TkUtfToUniChar(p, &ch);
+ p += Tcl_UtfToUniChar(p, &ch);
}
if ((flags & TK_AT_LEAST_ONE) && (term == source) && (p < end)) {
term = p;
termX = curX;
if (term == source) {
- term += TkUtfToUniChar(term, &ch);
+ term += Tcl_UtfToUniChar(term, &ch);
termX = newX;
}
} else if ((p >= end) || !(flags & TK_WHOLE_WORDS)) {
@@ -1320,7 +1102,7 @@ Tk_DrawChars(
needWidth = fontPtr->font.fa.underline + fontPtr->font.fa.overstrike;
for (p = source; p <= end; ) {
if (p < end) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
} else {
next = p + 1;
@@ -1332,7 +1114,7 @@ Tk_DrawChars(
do_width = (needWidth || (p != end)) ? 1 : 0;
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source,
+ (void)Tcl_UtfToExternalDString(familyPtr->encoding, source,
p - source, &runString);
if (familyPtr->isTwoByteFont) {
XDrawString16(display, drawable, gc, x, y,
@@ -2297,8 +2079,8 @@ FontMapLoadPage(
for (i = row << FONTMAP_SHIFT; i < end; i++) {
int hi, lo;
- if (Tcl_UtfToExternal(NULL, encoding, src, TkUniCharToUtf(i, src),
- TCL_ENCODING_STOPONERROR, NULL, buf, sizeof(buf), NULL,
+ if (Tcl_UtfToExternal(NULL, encoding, src, Tcl_UniCharToUtf(i, src),
+ TCL_ENCODING_PROFILE_STRICT, NULL, buf, sizeof(buf), NULL,
NULL, NULL) != TCL_OK) {
continue;
}
@@ -2493,7 +2275,7 @@ CanUseFallback(
}
nameListOrig = nameList;
- srcLen = TkUniCharToUtf(ch, src);
+ srcLen = Tcl_UniCharToUtf(ch, src);
want.fa = fontPtr->font.fa;
want.xa = fontPtr->xa;
@@ -2572,7 +2354,7 @@ CanUseFallback(
numEncodings++;
}
Tcl_UtfToExternal(NULL, encoding, src, srcLen,
- TCL_ENCODING_STOPONERROR, NULL, dst, sizeof(dst), &srcRead,
+ TCL_ENCODING_PROFILE_STRICT, NULL, dst, sizeof(dst), &srcRead,
&dstWrote, NULL);
if (dstWrote == 0) {
goto crossout;
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index c595fbb..933a690 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -196,7 +196,7 @@ TkpGetString(
Tcl_DStringValue(&buf)[len] = '\0';
if (len == 1) {
- len = TkUniCharToUtf((unsigned char) Tcl_DStringValue(&buf)[0],
+ len = Tcl_UniCharToUtf((unsigned char) Tcl_DStringValue(&buf)[0],
Tcl_DStringValue(dsPtr));
Tcl_DStringSetLength(dsPtr, len);
} else {
diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c
index 4ae343c..2ed2e49 100644
--- a/unix/tkUnixMenu.c
+++ b/unix/tkUnixMenu.c
@@ -867,7 +867,7 @@ DrawMenuUnderline(
label = Tcl_GetString(mePtr->labelPtr);
start = Tcl_UtfAtIndex(label, (mePtr->underline < 0) ? mePtr->underline + len : mePtr->underline);
- end = start + TkUtfToUniChar(start, &ch);
+ end = start + Tcl_UtfToUniChar(start, &ch);
Tk_GetPixelsFromObj(NULL, menuPtr->tkwin,
menuPtr->activeBorderWidthPtr, &activeBorderWidth);
diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h
index 1cd2e8a..097c7b8 100644
--- a/unix/tkUnixPort.h
+++ b/unix/tkUnixPort.h
@@ -146,15 +146,6 @@
#endif
/*
- * These calls implement native bitmaps which are not supported under
- * UNIX. The macros eliminate the calls.
- */
-
-#define TkpDefineNativeBitmaps()
-#define TkpCreateNativeBitmap(display, source) None
-#define TkpGetNativeAppBitmap(display, name, w, h) None
-
-/*
* This macro stores a representation of the window handle in a string.
* This should perhaps use the real size of an XID.
*/
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 72692fc..d295a89 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -80,7 +80,7 @@ TCL_DECLARE_MUTEX(xftMutex);
static int utf8ToUcs4(const char *source, FcChar32 *c, int numBytes)
{
if (numBytes >= 6) {
- return TkUtfToUniChar(source, (int *)c);
+ return Tcl_UtfToUniChar(source, (int *)c);
}
return FcUtf8ToUcs4((const FcChar8 *)source, c, numBytes);
}
@@ -744,7 +744,7 @@ Tk_MeasureChars(
while (numBytes > 0) {
int unichar;
- clen = TkUtfToUniChar(source, &unichar);
+ clen = Tcl_UtfToUniChar(source, &unichar);
c = (FcChar32) unichar;
if (clen <= 0) {
diff --git a/win/Makefile.in b/win/Makefile.in
index 2d3c3ea..a101ac9 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -261,7 +261,7 @@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \
-I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \
-I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" \
-${AC_FLAGS} $(NO_DEPRECATED_FLAGS) -DTCL_UTF_MAX=3 -DUSE_TCL_STUBS
+${AC_FLAGS} $(NO_DEPRECATED_FLAGS) -DTCL_UTF_MAX=4 -DUSE_TCL_STUBS
CC_OBJNAME = @CC_OBJNAME@
CC_EXENAME = @CC_EXENAME@
@@ -281,7 +281,6 @@ WISH_OBJS = \
TKTEST_OBJS = \
tkSquare.$(OBJEXT) \
tkTest.$(OBJEXT) \
- tkOldTest.$(OBJEXT) \
tkWinTest.$(OBJEXT)
XLIB_OBJS = \
@@ -765,9 +764,6 @@ testMain.$(OBJEXT): winMain.c
tkTest.$(OBJEXT): tkTest.c
$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
-tkOldTest.$(OBJEXT): tkOldTest.c
- $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
-
tkWinTest.$(OBJEXT): tkWinTest.c
$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
diff --git a/win/README b/win/README
index e371a2c..b8ac0cc 100644
--- a/win/README
+++ b/win/README
@@ -1,4 +1,4 @@
-Tk 8.7 for Windows
+Tk 9.0 for Windows
Originally by Scott Stanton while at Sun Microsystems Labs
diff --git a/win/configure b/win/configure
index ba80bbb..3798e14 100755
--- a/win/configure
+++ b/win/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for tk 8.7.
+# Generated by GNU Autoconf 2.71 for tk 9.0.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -608,8 +608,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='tk'
PACKAGE_TARNAME='tk'
-PACKAGE_VERSION='8.7'
-PACKAGE_STRING='tk 8.7'
+PACKAGE_VERSION='9.0'
+PACKAGE_STRING='tk 9.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1364,7 +1364,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tk 8.7 to adapt to many kinds of systems.
+\`configure' configures tk 9.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1426,7 +1426,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tk 8.7:";;
+ short | recursive ) echo "Configuration of tk 9.0:";;
esac
cat <<\_ACEOF
@@ -1524,7 +1524,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tk configure 8.7
+tk configure 9.0
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1728,7 +1728,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tk $as_me 8.7, which was
+It was created by tk $as_me 9.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2393,10 +2393,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# /bin/sh. The bash shell seems to suffer from some strange failures.
SHELL=/bin/sh
-TK_VERSION=8.7
-TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=7
-TK_PATCH_LEVEL="a6"
+TK_VERSION=9.0
+TK_MAJOR_VERSION=9
+TK_MINOR_VERSION=0
+TK_PATCH_LEVEL="b1"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
@@ -4037,15 +4037,10 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
-if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then
+if test "${TCL_MINOR_VERSION}" -lt 7; then
as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5
-fi
-if test "${TCL_MINOR_VERSION}" -lt 6; then
- as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5
+Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.7+.
+Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.7 or better." "$LINENO" 5
fi
fi
@@ -5797,11 +5792,7 @@ else
fi
fi
-if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
- eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ;
-else
- eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ;
-fi
+eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ;
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
# I left out the other vars that also need to get defined here.
# we also need to double check about spaces in path names
@@ -6475,7 +6466,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tk $as_me 8.7, which was
+This file was extended by tk $as_me 9.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6530,7 +6521,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-tk config.status 8.7
+tk config.status 9.0
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/win/configure.ac b/win/configure.ac
index 08e0af7..3c29be1 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -3,7 +3,7 @@
# generate the file "configure", which is run during Tk installation
# to configure the system for the local environment.
-AC_INIT([tk],[8.7])
+AC_INIT([tk],[9.0])
AC_CONFIG_SRCDIR([../generic/tk.h])
AC_PREREQ([2.69])
@@ -12,10 +12,10 @@ AC_PREREQ([2.69])
# /bin/sh. The bash shell seems to suffer from some strange failures.
SHELL=/bin/sh
-TK_VERSION=8.7
-TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=7
-TK_PATCH_LEVEL="a6"
+TK_VERSION=9.0
+TK_MAJOR_VERSION=9
+TK_MINOR_VERSION=0
+TK_PATCH_LEVEL="b1"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
@@ -77,15 +77,10 @@ SC_PATH_TCLCONFIG($TK_PATCH_LEVEL)
SC_LOAD_TCLCONFIG
if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
-if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then
+if test "${TCL_MINOR_VERSION}" -lt 7; then
AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.])
-fi
-if test "${TCL_MINOR_VERSION}" -lt 6; then
- AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.])
+Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.7+.
+Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.7 or better.])
fi
fi
@@ -247,11 +242,7 @@ else
fi
fi
-if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
- eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ;
-else
- eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ;
-fi
+eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ;
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
# I left out the other vars that also need to get defined here.
# we also need to double check about spaces in path names
diff --git a/win/makefile.vc b/win/makefile.vc
index 6356ad9..3db8eee 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -151,7 +151,6 @@ TKTESTOBJS = \
$(TMP_DIR)\testMain.obj \
$(TMP_DIR)\tkSquare.obj \
$(TMP_DIR)\tkTest.obj \
- $(TMP_DIR)\tkOldTest.obj \
$(TMP_DIR)\tkWinTest.obj \
$(TMP_DIR)\tktest.res
@@ -337,7 +336,7 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)"
CONFIG_DEFS =/DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
/DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
- /DHAVE_STRINGS_H=1 /DTCL_UTF_MAX=3 \
+ /DHAVE_STRINGS_H=1 /DTCL_UTF_MAX=4 \
!if $(TTK_SQUARE_WIDGET)
/DTTK_SQUARE_WIDGET=1 \
!endif
@@ -619,9 +618,6 @@ $(TMP_DIR)\tkUuid.h: $(ROOT)\manifest.uuid
$(TMP_DIR)\tkTest.obj: $(GENERICDIR)\tkTest.c
$(cc32) $(appcflags_nostubs) -Fo$@ $?
-$(TMP_DIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c
- $(cc32) $(appcflags_nostubs) -Fo$@ $?
-
$(TMP_DIR)\tkWinTest.obj: $(WIN_DIR)\tkWinTest.c
$(cc32) $(appcflags_nostubs) -Fo$@ $?
diff --git a/win/tcl.m4 b/win/tcl.m4
index fff706b..4bac910 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -985,13 +985,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
#------------------------------------------------------------------------
AC_DEFUN([SC_WITH_TCL], [
- if test -d ../../tcl8.7$1/win; then
- TCL_BIN_DEFAULT=../../tcl8.7$1/win
+ if test -d ../../tcl9.0$1/win; then
+ TCL_BIN_DEFAULT=../../tcl9.0$1/win
else
- TCL_BIN_DEFAULT=../../tcl8.7/win
+ TCL_BIN_DEFAULT=../../tcl9.0/win
fi
- AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.7 binaries from DIR],
+ AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 9.0 binaries from DIR],
TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
if test ! -d $TCL_BIN_DIR; then
AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h
index dd911bd..6026564 100644
--- a/win/tkWinDefault.h
+++ b/win/tkWinDefault.h
@@ -353,8 +353,8 @@
#define DEF_MESSAGE_HIGHLIGHT HIGHLIGHT
#define DEF_MESSAGE_HIGHLIGHT_WIDTH "0"
#define DEF_MESSAGE_JUSTIFY "left"
-#define DEF_MESSAGE_PADX "-1"
-#define DEF_MESSAGE_PADY "-1"
+#define DEF_MESSAGE_PADX NULL
+#define DEF_MESSAGE_PADY NULL
#define DEF_MESSAGE_RELIEF "flat"
#define DEF_MESSAGE_TAKE_FOCUS "0"
#define DEF_MESSAGE_TEXT ""
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 4be87f1..9e64513 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -846,7 +846,7 @@ Tk_MeasureChars(
start = source;
end = start + numBytes;
for (p = start; p < end; ) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
if (thisSubFontPtr != lastSubFontPtr) {
familyPtr = lastSubFontPtr->familyPtr;
@@ -907,7 +907,7 @@ Tk_MeasureChars(
familyPtr = lastSubFontPtr->familyPtr;
Tcl_DStringInit(&runString);
for (p = start; p < end; ) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
Tcl_UtfToExternal(NULL, familyPtr->encoding, p,
(int) (next - p), TCL_ENCODING_PROFILE_TCL8, NULL, buf, sizeof(buf), NULL,
&dstWrote, NULL);
@@ -962,7 +962,7 @@ Tk_MeasureChars(
p = source;
ch = ' ';
while (p < end) {
- next = p + TkUtfToUniChar(p, &ch2);
+ next = p + Tcl_UtfToUniChar(p, &ch2);
if ((ch != ' ') && (ch2 == ' ')) {
lastWordBreak = p;
}
@@ -1479,7 +1479,7 @@ MultiFontTextOut(
end = source + numBytes;
for (p = source; p < end; ) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
/*
@@ -2262,7 +2262,7 @@ FontMapLoadPage(
end = (row + 1) << FONTMAP_SHIFT;
for (i = row << FONTMAP_SHIFT; i < end; i++) {
if (Tcl_UtfToExternal(NULL, encoding, src,
- TkUniCharToUtf(i, src), TCL_ENCODING_STOPONERROR, NULL,
+ Tcl_UniCharToUtf(i, src), TCL_ENCODING_PROFILE_STRICT, NULL,
buf, sizeof(buf), NULL, NULL, NULL) != TCL_OK) {
continue;
}
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index 5be9e0e..f2230c9 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -113,7 +113,7 @@ TkpGetString(
* Special case for WM_UNICHAR and win2000 multilingual IME input
*/
- len = TkUniCharToUtf(keyEv->keycode, buf);
+ len = Tcl_UniCharToUtf(keyEv->keycode, buf);
Tcl_DStringAppend(dsPtr, buf, len);
} else {
/*
@@ -125,7 +125,7 @@ TkpGetString(
if (((keysym != NoSymbol) && (keysym > 0) && (keysym < 256))
|| (keysym == XK_Return) || (keysym == XK_Tab)) {
- len = TkUniCharToUtf(keysym & 255, buf);
+ len = Tcl_UniCharToUtf(keysym & 255, buf);
Tcl_DStringAppend(dsPtr, buf, len);
}
}
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 755033d..0b96328 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -2111,7 +2111,7 @@ DrawMenuUnderline(
label = Tcl_GetString(mePtr->labelPtr);
start = Tcl_UtfAtIndex(label, mePtr->underline);
- end = start + TkUtfToUniChar(start, &ch);
+ end = start + Tcl_UtfToUniChar(start, &ch);
Tk_UnderlineChars(menuPtr->display, d,
gc, tkfont, label, x + mePtr->indicatorSpace,
y + (height + fmPtr->ascent - fmPtr->descent) / 2,
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index d3471ca..fd43335 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -124,13 +124,4 @@
#define TkpGetPixel(p) (((((p)->red >> 8) & 0xff) \
| ((p)->green & 0xff00) | (((p)->blue << 8) & 0xff0000)) | 0x20000000)
-/*
- * These calls implement native bitmaps which are not currently
- * supported under Windows. The macros eliminate the calls.
- */
-
-#define TkpDefineNativeBitmaps()
-#define TkpCreateNativeBitmap(display, source) None
-#define TkpGetNativeAppBitmap(display, name, w, h) None
-
#endif /* _WINPORT */
diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c
index 8bd3b70..476daea 100644
--- a/win/ttkWinTheme.c
+++ b/win/ttkWinTheme.c
@@ -621,7 +621,7 @@ static void ThumbElementSize(
ThumbElement *thumbPtr = (ThumbElement *)elementRecord;
Ttk_Orient orient;
- TtkGetOrientFromObj(NULL, thumbPtr->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, thumbPtr->orientObj, &orient);
if (orient == TTK_ORIENT_HORIZONTAL) {
*widthPtr = GetSystemMetrics(SM_CXHTHUMB);
*heightPtr = GetSystemMetrics(SM_CYHSCROLL);
@@ -686,7 +686,7 @@ static void SliderElementSize(
SliderElement *slider = (SliderElement *)elementRecord;
Ttk_Orient orient;
- TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
+ Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient);
if (orient == TTK_ORIENT_HORIZONTAL) {
*widthPtr = (GetSystemMetrics(SM_CXHTHUMB) / 2) | 1;
*heightPtr = GetSystemMetrics(SM_CYHSCROLL);
diff --git a/win/winMain.c b/win/winMain.c
index 9c23037..e1191d8 100644
--- a/win/winMain.c
+++ b/win/winMain.c
@@ -12,6 +12,25 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+/*
+ * Explanation on following undef USE_TCL_STUBS by JN 2023-12-19 on the core list:
+ * What's going on is related to TIP #596:
+ * Stubs support for Embedding Tcl in other applications
+ *
+ * If an application using Tcl_Main() is compiled with USE_TCL_STUBS,
+ * Tcl_Main() will be replaced by a stub function, which loads
+ * libtcl9.0.so/tcl90.dll and then calls its Tcl_MainEx(). If
+ * libtcl9.0.so/tcl90.dll is not present (at runtime), a crash is what happens.
+ *
+ * So ... tkAppInit.c should not be compiled with USE_TCL_STUBS
+ * (unless you want to use the TIP #596 functionality)
+ *
+ * The proper solution is to make sure that Makefile.in doesn't use
+ * TCL_USE_STUBS when compiling tkAppInit.c. But that's a
+ * quite big re-organization just before a b1 release. Simpler
+ * is just to #undef'ine USE_TCL_STUBS, it has the same effect.
+ */
+#undef USE_TCL_STUBS
#include "tk.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/xlib/X11/keysymdef.h b/xlib/X11/keysymdef.h
index 8fd4dd3..f614e30 100644
--- a/xlib/X11/keysymdef.h
+++ b/xlib/X11/keysymdef.h
@@ -182,15 +182,6 @@ SOFTWARE.
#define XK_Begin 0xff58 /* BOL */
-#ifndef TK_NO_DEPRECATED
-/* Special Windows keyboard keys */
-
-#define XK_Win_L 0xFF5B /* Left-hand Windows */
-#define XK_Win_R 0xFF5C /* Right-hand Windows */
-#define XK_App 0xFF5D /* Menu key */
-#endif
-
-
/* Misc functions */
#define XK_Select 0xff60 /* Select, mark */
@@ -1741,18 +1732,3 @@ SOFTWARE.
#define XK_braille_dot_9 0xfff9
#define XK_braille_dot_10 0xfffa
#endif /* XK_BRAILLE */
-
-/* Multimedia keys, defined same as on Linux
- * /usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon-keysyms.h
- */
-
-#ifndef TK_NO_DEPRECATED
-#define XK_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */
-#define XK_XF86AudioMute 0x1008FF12 /* Mute sound from the system */
-#define XK_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */
-#define XK_XF86AudioPlay 0x1008FF14 /* Start playing of audio > */
-#define XK_XF86AudioStop 0x1008FF15 /* Stop playing audio */
-#define XK_XF86AudioPrev 0x1008FF16 /* Previous track */
-#define XK_XF86AudioNext 0x1008FF17 /* Next track */
-#endif /* !TK_NO_DEPRECATED */
-