Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch core-8-5-branch Excluding Merge-Ins
This is equivalent to a diff from 32a9cba0 to cb795a34
2023-09-21
| ||
11:53 | Remove .github and .travis-related stuff: No need to build this branch any more Leaf check-in: cb795a34 user: jan.nijtmans tags: core-8-5-branch | |
2022-12-02
| ||
22:31 | upload-artifact@v3 check-in: dd18e6dd user: jan.nijtmans tags: core-8-5-branch | |
2020-10-27
| ||
07:08 | Rename "trunk" to "main". Add "trunk" propagating tag for backwards compatibility check-in: 0f77b70d user: jan.nijtmans tags: trunk, main | |
01:25 | Merge 8.6 Closed-Leaf check-in: 32a9cba0 user: marc_culler tags: trunk | |
2020-10-26
| ||
08:58 | Merge 8.6 check-in: 88e0ce57 user: jan.nijtmans tags: trunk | |
2020-10-25
| ||
20:11 | Adjustment for Sierra. Closed-Leaf check-in: 77a51c32 user: culler tags: bug-5cc72e002c | |
Deleted .fossil-settings/crlf-glob.
|
| < < |
Changes to .fossil-settings/crnl-glob.
|
| > > > | | > | 1 2 3 4 5 6 | win/buildall.vc.bat win/makefile.bc win/makefile.vc win/mkd.bat win/rmd.bat win/rules.vc |
Changes to .fossil-settings/encoding-glob.
1 2 | win/buildall.vc.bat win/makefile.vc | > > | < | 1 2 3 4 5 6 7 8 9 10 | win/buildall.vc.bat win/makefile.bc win/makefile.vc win/mkd.bat win/rmd.bat win/rules.vc win/rc/*.bmp win/rc/*.cur win/rc/*.ico win/rc/*.rc |
Changes to .fossil-settings/ignore-glob.
︙ | ︙ | |||
16 17 18 19 20 21 22 | */Makefile */autom4te.cache */config.cache */config.log */config.status */tkConfig.sh */wish* | | | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | */Makefile */autom4te.cache */config.cache */config.log */config.status */tkConfig.sh */wish* */tktest */versions.vc */version.vc */libtk.vfs */libtk*.zip */tkUuid.h doc/man.macros html macosx/configure win/Debug* win/Release* win/*.manifest win/nmhlp-out.txt win/nmakehlp.out unix/tk.pc unix/Tk-Info.plist unix/Wish-Info.plist |
Changes to .gitignore.
︙ | ︙ | |||
22 23 24 25 26 27 28 | config.status config.status.lineno html manifest.uuid _FOSSIL_ */tkConfig.sh */wish* | | | | > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | config.status config.status.lineno html manifest.uuid _FOSSIL_ */tkConfig.sh */wish* */tktest */versions.vc */version.vc */libtk.vfs */libtk*.zip */tkUuid.h libtommath/bn.ilg libtommath/bn.ind libtommath/pretty.build libtommath/tommath.src libtommath/*.log libtommath/*.pdf libtommath/*.pl |
︙ | ︙ |
Changes to .project.
1 2 | <?xml version="1.0" encoding="UTF-8"?> <projectDescription> | | | 1 2 3 4 5 6 7 8 9 10 11 | <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>tk8.5</name> <comment></comment> <projects> </projects> <buildSpec> </buildSpec> <natures> </natures> </projectDescription> |
Deleted .travis.yml.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to ChangeLog.
more than 10,000 changes
Changes to ChangeLog.2002.
︙ | ︙ | |||
2234 2235 2236 2237 2238 2239 2240 | Removed setting inputContext to null in Tk_MakeWindowExist as it was redundant. * unix/tkUnixWm.c (CreateWrapper): Removed redundat setting of inputContext to null. * win/Makefile.in: changed gdb and shell targets to properly build | | | 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 | Removed setting inputContext to null in Tk_MakeWindowExist as it was redundant. * unix/tkUnixWm.c (CreateWrapper): Removed redundat setting of inputContext to null. * win/Makefile.in: changed gdb and shell targets to properly build all binaries before running (otherwise an error often occured). 2002-03-28 David Gravereaux <[email protected]> * win/.cvsignore (new): * win/lamp.bmp (new): * win/makefile.vc: * win/nmakehlp.c (new): |
︙ | ︙ | |||
5214 5215 5216 5217 5218 5219 5220 | * canvas.test: added test for 5783. * generic/tkCanvPoly.c (DisplayPolygon): added checks for the polygon fillGC not being empty to prevent segfault. [Bug: 5783] 2000-05-31 Eric Melski <[email protected]> * library/bgerror.tcl: Improved bgerror based on work by Donal | | | 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 | * canvas.test: added test for 5783. * generic/tkCanvPoly.c (DisplayPolygon): added checks for the polygon fillGC not being empty to prevent segfault. [Bug: 5783] 2000-05-31 Eric Melski <[email protected]> * library/bgerror.tcl: Improved bgerror based on work by Donal K. Fellows; no longer dependant on tk_dialog; features a Windows-esque "Details" button, and a customizable extra function button that allows the user to (for example) save the stack trace to a file. 2000-05-30 Eric Melski <[email protected]> * generic/tkImgGIF.c: Changed defines for GIF87a/GIF89a to be |
︙ | ︙ |
Changes to ChangeLog.2004.
︙ | ︙ | |||
807 808 809 810 811 812 813 | * doc/canvas.n: Add paragraph to make clearer what is going on with the default canvas origin. [Bug 956681] 2004-07-05 George Peter Staplin <[email protected]> * generic/tkEvent.c: TK_XIM_SPOT preprocessor usage was modified | | | 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 | * doc/canvas.n: Add paragraph to make clearer what is going on with the default canvas origin. [Bug 956681] 2004-07-05 George Peter Staplin <[email protected]> * generic/tkEvent.c: TK_XIM_SPOT preprocessor usage was modified slightly to fix a bug that occured when TK_XIM_SPOT was defined as 0. Thanks to Joe Mistachkin for reporting this bug. 2004-07-05 Donal K. Fellows <[email protected]> TIP#158 IMPLEMENTATION * tests/bind.test: Allow Win apps to distinguish keys |
︙ | ︙ | |||
3517 3518 3519 3520 3521 3522 3523 | * win/configure.in: * unix/tcl.m4: correct HP-UX ia64 --enable-64bit build flags 2003-02-13 Kevin Kenny <[email protected]> * doc/wish.n: Added language to describe the handling of the | | | 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 | * win/configure.in: * unix/tcl.m4: correct HP-UX ia64 --enable-64bit build flags 2003-02-13 Kevin Kenny <[email protected]> * doc/wish.n: Added language to describe the handling of the end-of-file character \u001a in script files. [Bug 685505] 2003-02-10 Jim Ingham <[email protected]> * macosx/tkMacOSXCursor.c (TkMacOSXInstallCursor): Set all theme cursors using SetThemeCursor or SetAnimatedThemeCursors. (TkGetCursorByName): Use the theme cursors for arrow, ibeam, etc. Allow animatedCursor{NUM} form for an animated cursor with count. |
︙ | ︙ |
Deleted ChangeLog.2007.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to README.md.
1 2 | # README: Tk | | > > > > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # README: Tk This is the **Tk 8.5.19** source distribution. You can get any source release of Tk from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). Build Status: 8.5.19 [](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-5-branch) [](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-5-branch) [](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-5-branch) ## <a id="intro">1.</a> Introduction 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.5 Web page](https://www.tcl.tk/software/tcltk/8.5.html) or refer to the "changes" file in this directory, which contains a historical record of all changes to Tk. Tk is maintained, enhanced, and distributed freely by the Tcl community. Source code development and tracking of bug reports and feature requests takes place at [core.tcl-lang.org](https://core.tcl-lang.org/). Tcl/Tk release and mailing list services are [hosted by |
︙ | ︙ |
Changes to changes.
︙ | ︙ | |||
329 330 331 332 333 334 335 | is necessary in order to allow several menu buttons to share the same menu. *** POTENTIAL INCOMPATIBILITY *** 4/12/92 (bug fix) Fixed core dump that occurred in tkError.c when removing the first error record from the error list. | | | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | is necessary in order to allow several menu buttons to share the same menu. *** POTENTIAL INCOMPATIBILITY *** 4/12/92 (bug fix) Fixed core dump that occurred in tkError.c when removing the first error record from the error list. 4/15/92 (bug fix) Fixed bug in tkBind.c that prevented <KeyPress-1> event specifications from being processed correctly: the "1" was treated as a button name rather than a keysym. 4/18/92 (new feature) Added Tk_DefineCursor and Tk_UndefineCursor procedures. 4/18/92 (new feature) Major revision to listboxes. Can now scroll and |
︙ | ︙ | |||
1311 1312 1313 1314 1315 1316 1317 | canvases) so that it correctly prints all of the characters in the ISO Latin-1 character set. 2/19/94 (bug fix) Modified tkBind.c to save and restore the interpreter's result across the execution of binding scripts. Otherwise if an event triggers in the middle of some other script (e.g. a destroy event during window creation, because there was an error in the creation command), | | | 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 | canvases) so that it correctly prints all of the characters in the ISO Latin-1 character set. 2/19/94 (bug fix) Modified tkBind.c to save and restore the interpreter's result across the execution of binding scripts. Otherwise if an event triggers in the middle of some other script (e.g. a destroy event during window creation, because there was an error in the creation command), the intepreter's result gets lost. 2/19/94 (bug fix) Fixed bug in dealing with results of sent command that could cause them to get lost in some situations. 2/21/94 (bug fix) Don't let user close a dialog window created by tk_dialog, since this would cause tk_dialog to hang: force the user to select one of the dialog's buttons. |
︙ | ︙ | |||
3484 3485 3486 3487 3488 3489 3490 | 10/18/96 (new features) A -menu option has been added to the toplevel widget command, which allows a menu to operate as a menubar. On the Macintosh, the menubar is displayed accross the top of the main monitor, just like with other applications. Under Windows and Unix, the menu is attached to the toplevel window. Also, changed some semantics. Tearoff menus will now reflect changes to the menu it was | | | 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 | 10/18/96 (new features) A -menu option has been added to the toplevel widget command, which allows a menu to operate as a menubar. On the Macintosh, the menubar is displayed accross the top of the main monitor, just like with other applications. Under Windows and Unix, the menu is attached to the toplevel window. Also, changed some semantics. Tearoff menus will now reflect changes to the menu it was torn off from, and are deleted when the master menu is deleted. Tearoffs also reflect more look-and-feel of the platforms they are running on. (SRP) 10/31/96 (bug fix) Under Windows, missing system cursors would generate an error instead of falling through to the Tk cursor of the same name. (SS) |
︙ | ︙ | |||
3994 3995 3996 3997 3998 3999 4000 | into account the "-displayof" option. This problem also existed for the "font metrics" and "font measure" commands. (CCS) 9/16/97 (new feature) Added "resource delete" and "resource files" command to the Mac. Also fixed "resource write" when the resource was specified by id and already existed. (JI) | | | 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 | into account the "-displayof" option. This problem also existed for the "font metrics" and "font measure" commands. (CCS) 9/16/97 (new feature) Added "resource delete" and "resource files" command to the Mac. Also fixed "resource write" when the resource was specified by id and already existed. (JI) 9/16/97 (bug fix) Added null bindings to <Command-KeyPress> for the text and entry widget on the Macintosh. This prevents unbound command key sequences from having the character echoed to the widget. Also fixed Cut & Copy bindings. (JI) (RJ) 9/18/97 (bug fix) Revamped Macintosh focus code. Cut, Copy & Paste virtual events now go to the correct (focus) window. (RJ) |
︙ | ︙ | |||
5095 5096 5097 5098 5099 5100 5101 | correctly. (hobbs) 2001-08-28 (bug fix) fixed tk_chooseDirectory crash on Win95. (baker) 2001-08-28 (bug fix) removed 2 second 'raise' delay seen by some Unix window managers. (hobbs, baker) | | | 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 | correctly. (hobbs) 2001-08-28 (bug fix) fixed tk_chooseDirectory crash on Win95. (baker) 2001-08-28 (bug fix) removed 2 second 'raise' delay seen by some Unix window managers. (hobbs, baker) 2001-09-14 (bug fix) fixed memory leaks that occured if errors were thrown while initializing the channel for an image. (darley) 2001-09-20 (new feature) --enable-64bit support was added for HP 11 when using the native compiler. 2001-10-03 (new feature) finalized Win64 support with latest RC1 release and SDK. (hobbs, stacy) |
︙ | ︙ | |||
6496 6497 6498 6499 6500 6501 6502 | 2008-03-27 (platform support)[1921166] Solaris 64bit build fixes (steffen) 2008-03-27 (bug fix) restored [::safe::loadTk] (hobbs) --- Released 8.5.2, March 28, 2008 --- See ChangeLog for details --- | < < < < < < < < < < < < < < | < < | < < | | < | < > < < < < | > > > | < < < < < < < < < < < < < < < < | | < < < < | < < | < | < < | < < < < < | < < < < < < < < < < < < < < < < < | < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | > > | < > > < < < < < < < < < | < < | < < < < < < < < < < < < < < < < | | < | < < < < < < < < < < | < < < < < < < < < < < < < < < < < | 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 | 2008-03-27 (platform support)[1921166] Solaris 64bit build fixes (steffen) 2008-03-27 (bug fix) restored [::safe::loadTk] (hobbs) --- Released 8.5.2, March 28, 2008 --- See ChangeLog for details --- 2008-04-07 (bug fix)[1937135] Tk_ParseArgv() double free crash (hobbs) 2008-04-07 (bug fix)[1936238] wish -h mem explosion (bachmann,kenny) 2008-04-14 (bug fix)[1941740] [tk_chooseColor -title] (thoyts) 2008-04-17 (bug fix)[1327482] canvas item <Enter> events (wangnick) 2008-05-23 (bug fix)[1967576] ttk::label height or width 0 panic (lawlor) 2008-06-10 (enhancement)[1986818] Use Xutf8LookupString when possible (english) 2008-06-12 (bug fix)[1991932] global grab segfault (steffen) 2008-06-12 (platform support) Solaris/amd64 gcc 64bit support (steffen) 2008-06-18 (bug fix) Aqua: missing focus on first map (steffen) --- Released 8.5.3, June 30, 2008 --- See ChangeLog for details --- 2008-07-04 (bug fix)[2009213] crash in [ttk::scale] (polo,english) 2008-07-26 (bug fix)[2026405] portability of [winfo id] (uchida,thoyts) 2008-07-31 (bug fix) export Tk_PkgInitStubsCheck; fixes Tk embed on Windows 2008-08-01 (bug fix)[2009788,2028703] unmapped toplevel crashes (thoyts) 2008-08-05 (bug fix)[2010422] Tk header files revised to accommodate incompatible changes in recent X.org releases of X11 headers. (jenglish) --- Released 8.5.4, August 15, 2008 --- See ChangeLog for details --- 2008-08-19 (behavior change) arguments passed to -[xy]scrollcommand callbacks, and values returned by [xy]view methods are explicitly formatted as doubles. (english) *** POTENTIAL INCOMPATIBILITY *** 2008-08-25 (bug fix)[1936220] fix [tk_getOpenFile -multiple 1] on unix (helfter) 2008-08-25 (bug fix)[1023955] default menu cursor: no more Motif (helfter) 2008-08-28 (bug fix) correct TK_LIBS value to include Xft (porter) 2008-10-05 (bug fix)[2112563] format double values explicitly in double format, avoiding sensitivity to locale setting. (fellows) *** POTENTIAL INCOMPATIBILITY *** 2008-10-10 (bug fix)[1894038] [package require] any Tk 8.5.* in any Tcl 8.5.* (porter) --- Released 8.5.5, October 15, 2008 --- See ChangeLog for details --- 2008-10-17 (enhancement) keyboard bindings for ttk::scale (thoyts) 2008-11-12 (bug fix)[1777362] permit [text] names containing "-" (thoyts) 2008-11-15 (bug fix)[2239034] limit [wm manage] to Frames (thoyts) 2008-11-19 (bug fix)[2312027] Tk_Create*ImageType() thread safety (nijtmans) 2008-11-22 (bug fix)[1939129,1991930] combobox behind other windows (thoyts) 2008-12-22 (bug fix)[1813597,2218964] eliminate unnecessary units conversion in screen distances, reducing precision loss (ferrieux) 2008-12-22 (bug fix)[2107938] no negative font size in PS (fellows) 2008-12-22 (bug fix)[2264732] crash using nondefault visual (english) 2008-12-22 (bug fix)[2207435] [ttk::entry .t -textvar ::noexist::x] (english) --- Released 8.5.6, December 23, 2008 --- See ChangeLog for details --- 2009-01-07 (bug fix)[1847002] Win: prevent grab bypass (thoyts) 2009-01-11 (bug fix) crash on XCreateIC failure (staplin) 2009-01-14 (bug fix)[2507326] Restore aMSN compat (nijtmans) 2009-01-19 (new feature) CONFIG_INSTALL_DIR - where tclConfig.sh goes (cassoff) 2009-01-19 (platform support) better tools for BSD ports (cassoff) 2009-02-17 (platform support) MSVC and _WIN64 (hobbs) 2009-02-23 (bug fix)[1329198,456299,2507419] menu image display (mcdonald) 2009-02-23 (bug fix)[2513104] fix cursor hotspots (mcdonald) 2009-02-23 (bug fix)[2542828] Win: standard question_arrow cursor (danckaert) 2009-02-27 (bug fix)[2645457] crash in Tk_MakeWindowExist() (thoyts) 2009-03-25 (bug fix)[2178820] stop zero-size allocs in ttk (fellows) 2009-03-25 (bug fix)[1871101] blurry large fonts on Vista (garvey,fellows) 2009-04-10 (bug fix)[2116837] std virtual events with Caps Lock (fellows) --- Released 8.5.7, April 15, 2009 --- See ChangeLog for details --- 2009-04-23 (bug fix)[2779910] updated Win chooseDir (hobbs) 2009-04-24 (bug fix) prevent delete of selected folder in Win dialog (hobbs) 2009-04-30 (bug fix)[2080533] panedwindow sash draw crash (fellows) 2009-04-30 (bug fix)[2504402] iconphoto on non-32-bit displays (mcdonald,thoyts) 2009-05-03 (bug fix)[2785744] broken flag twiddling (baker,fellows) 2009-05-13 (bug fix)[2791352] XLFD parsing error (thoyts) 2009-05-14 (new feature) Vista theme support (thoyts) 2009-05-14 (bug fix)[1923684] confused checkbutton state (thoyts) 2009-05-21 (bug fix)[2794778] Win menu keyboard traversal (thoyts) 2009-06-02 (bug fix)[2799589] crash on delayed window activation (thoyts) 2009-06-23 (bug fix)[220935] canvas dash update problem (nijtmans) 2009-07-15 (bug fix)[2821962] photo image copy/paste (rib,fellows) 2009-07-22 (bug fix)[2496114] focus in dead window crash (griffin,fellows) 2009-08-01 (bug fix)[2830420] X iconphoto for big endian (misch,fellows) 2009-08-04 (bug fix) [text] word-wrap of non-breaking space (fellows) 2009-08-24 (bug fix) tk::MessageBox bindings for ttk::buttons (steiner,fellows) 2009-08-25 (bug fix)[1909931] [send] update for Fedora 8 (fellows) 2009-09-10 (bug fix) font allocation crash (berezhnoy,fellows) 2009-09-14 (bug fix)[873608] win tearoff menu, no submenu arrows (traum,hobbs) 2009-09-14 (bug fix)[873613] win tearoff menu repeat select (traum,hobbs) 2009-09-25 (bug fix) grayscale from images (vetter,fellows) 2009-10-07 (bug fix)[2088597] min scrollbar slider size (danckaert,fellows) 2009-10-07 (bug fix)[2787164] combobox/menubutton arrow size (thoyts) 2009-10-08 (bug fix)[2870648] file dialog cursor (danckaert,fellows) 2009-10-10 (feature)[1961455] underline, overstrike Xft fonts (caffin,fellows) 2009-10-15 (feature)[2794032] permit [load] into Tcl 8.6+ interps (porter) 2009-10-22 (bug fix)[2168768] file dialog -typevariable scope (danckaert) 2009-10-22 (bug fix)[1469210] [text] modified error (danckaert) 2009-10-24 (bug fix)[2883712] 64-bit Aqua progress bar (haffner) 2009-10-24 (bug fix)[1530276] X checkbutton -selectcolor (danckaert) 2009-10-25 (bug fix)[1854913] [.t delete] before -startindex (danckaert) 2009-10-25 (bug fix)[2809525] prevent X crash on overlong color name (goth) 2009-10-29 (bug fix)[1825353] Russian Windows tiny fonts problem (thoyts) 2009-11-03 (bug fix)[2891541] fix grab behaviour for main window (thoyts) --- Released 8.5.8, November 16, 2009 --- See ChangeLog for details --- 2009-11-22 (bug fix)[2899949] crash on widget destroy (meier,thoyts) 2009-11-24 (bug fix)[2902814] fix [wm iconphoto] on LP64 systems (fellows) 2009-12-06 (bug fix)[2548661] crash in GetFontFamilyName (riefenstahl) 2009-12-06 (bug fix)[2864685] Compiz menu item animation (gavilán,thoyts) 2009-12-09 (bug fix)[2902573] Update Safe Tk to new Safe Base (kurpies) 2009-12-11 (bug fix)[2912473] accept :: in DISPLAY name (fellows) 2009-12-16 (bug fix)[2496162] crash calling Tk_DeleteOptionTable() (english) 2009-12-20 (bug fix)[2917663] [send] accept SI:* on auth list (fellows) 2009-12-22 (bug fix)[2919205] syntax bug in [tk_messageBox] (zaroo) 2009-12-22 (bug fix)[2912356] [ttk::sizegrip] accommodate Compiz (english) 2009-12-27 (bug fix)[2879927] Win: cascade menu highlight (pawlak,thoyts) 2010-01-01 (bug fix)[1924761] stop [event generate] / XIM conflict (fellows) 2010-01-03 (bug fix)[2848897] ODS_NOACCEL flag support (kovalenko,thoyts) 2010-01-05 (bug fix)[220950] [$menu delete] bounds check (fellows) 2010-01-05 [2898255] unlimited multi-file select (pawlak,fellows,thoyts) 2010-01-06 (bug fix)[1163496] X: [wm transient] fix (bateman,fellows) 2010-01-09 (new feature)[TIP 360] Modernize X11 Menus (thoyts) 2010-01-18 (bug fix)[2932808] canvas update on state change (mcdonald,nijtmans) 2010-01-19 (bug fix)[2931374] overflow in complex tag search (schmitz) 2010-01-19 (new feature)[TIP 359] Extended Window Manager Hint Support (thoyts) 2010-02-17 (bug fix)[2952745] crash in menu deletion (english) 2010-03-11 (bug fix)[2968379] crash in peer text dump (fellows) 2010-05-31 (bug fix)[3006842] crash on empty bind scripts (english) 2010-08-03 (bug fix) entry validation compat with Itcl scope (hobbs) 2010-08-12 (bug fix)[2585265] text <Delete>,<Backspace> note selection (fellows) 2010-08-25 (feature)[3053320] update Ttk to tile 0.8.6 feature set (hobbs) --- Released 8.5.9, September 6, 2010 --- See ChangeLog for details --- 2010-09-02 (bug fix)[3057573] specify combobox text fg color (english) 2010-09-08 (bug fix)[2829363] [$tv see] open item -> sched display (english) 2010-10-11 (bug fix)[3085489] crash in [tag add/remove] (english) 2010-11-04 (enhancement) Updated German messages. (haertel,nijtmans) 2010-11-16 (platform) VS 2005 SP1 MSVC compiler (nijtmans) 2010-11-24 (bug fix)[3071836] crash in tk_getSaveFile (twylite) 2010-12-12 (platform) OpenBSD build improvements (cassoff) 2010-12-17 (platform) Revisions to support rpm 4.4.2 (cassoff) 2011-01-13 (bug fix)[3154705] tk_messageBox close button disabled (skylera) 2011-01-22 (enhancement) add [ttk::entry validate] (schelte,english) 2011-03-10 (bug fix)[3205260] crash in [wm manage] (boudaillier, thoyts) 2011-03-16 (bug fix)[3181181] tearoff submenu fix (menez, thoyts) 2011-03-19 (bug fix)[3205464] [wm forget] loses window (boudaillier,thoyts) 2011-03-19 (bug fix)[3223850] ttk button state disabled during click (thoyts) |
︙ | ︙ | |||
6920 6921 6922 6923 6924 6925 6926 | 2011-04-04 (feature change)[2997657] No -container for [labelframe] (spjuth) 2011-04-04 (bug fix)[723765] [grid remove] lost -in value (saye,spjuth) 2011-04-22 (bug fix)[3291543] mem corrupt when [$canvas dchars] removes all coords of a polygon (rogers,spjuth) | | > > | | > | > > > > > | 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 | 2011-04-04 (feature change)[2997657] No -container for [labelframe] (spjuth) 2011-04-04 (bug fix)[723765] [grid remove] lost -in value (saye,spjuth) 2011-04-22 (bug fix)[3291543] mem corrupt when [$canvas dchars] removes all coords of a polygon (rogers,spjuth) 2011-04-30 (bug fix)[2949774] cascade menu unpost (thoyts) 2011-06-06 (bug fix)[2546087] [console] treatment of '\0' (porter) 2011-06-07 (bug fix)[2358545] Restore "08" in spinbox configured with -from and -to (porter) 2011-06-07 (bug fix)[2484771] modal dialog settings (hoff, thoyts) 2011-06-10 (bug fix)[3175610] incomplete line item refresh (ferrieux) 2011-06-17 (bug fix)[3062331] crash in unset traces (macdonald,porter) --- Released 8.5.10, June 23, 2011 --- See ChangeLog for details --- 2011-06-29 (bug fix)[3341056] new crash in unset traces (militaru,porter) 2011-08-03 (bug fix)[3314770] restore file dialog resizeability (nijtmans) 2011-09-22 (bug fix)[3404541] -takefocus option (dzach,english) 2011-10-24 (new feature)[TIP 382] -confirmoverwrite on save dialog (porter) 2011-10-25 (bug fix)[3410609] AltGr keysyms on Swiss keyboard (tasser,kenny) 2011-11-02 (performance)[3431491] improved "pixels" shimmer logic (fellows) --- Released 8.5.11, November 4, 2011 --- See ChangeLog for details --- 2011-11-17 (bug fix)[3437816] return code of [canvas lower] (hirner,ferrieux) 2011-12-22 (bug fix)[3235256] correct menu failure on Windows (mcdonald) 2012-01-19 (bug fix)[3021557] cursor freeze in elided text (vogel) |
︙ | ︙ | |||
6987 6988 6989 6990 6991 6992 6993 | 2012-06-11 (bug fix)[3294450] ttk text element clipping (oehlmann,fellows) 2012-07-02 (bug fix) Make sure all index tables are static (kirkham,english) 2012-07-23 (bug fix)[3546073] DisplayString() -> DefaultDisplay() (english) | | | < < < > | < | < | < < | < < < | < < < < < < | < | < < | < > > > > > > | | | | < < < < < < < < | | < | < < | < < < < < | < < | | < < | < < < < < < | 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 | 2012-06-11 (bug fix)[3294450] ttk text element clipping (oehlmann,fellows) 2012-07-02 (bug fix) Make sure all index tables are static (kirkham,english) 2012-07-23 (bug fix)[3546073] DisplayString() -> DefaultDisplay() (english) Many revisions to better support a Cygwin environment (nijtmans) --- Released 8.5.12, July 27, 2012 --- See ChangeLog for details --- 2012-07-31 (update)[3551802] XKeycodeToKeysym deprecation (fellows) 2012-08-11 (bug fix)[3554273] text elide and tags (vogel) 2012-08-24 (bug fix)[3558535] file dialog filtering (fellows) 2012-08-25 (bug fix)[3554026,3561016] crash with tearoff menus (gavilán) 2012-08-28 (bug fix)[3562426] Context menu goes off screen (nijtmans) 2012-09-11 (bug fix)[3566594] stop clip region leaks (fellows) 2012-09-28 New colors: aqua crimson fuchsia indigo lime olive silver teal 2012-10-02 (bug fix)[3572016] menu enable after modal dialog (berg,walzer) 2012-10-24 (bug fix)[3574893] crash in [wm forget] (porter) 2012-11-07 (bug fix)[3574708] TkSetFocusWin() crash on XP (mcdonald) --- Released 8.5.13, November 12, 2012 --- See ChangeLog for details --- 2012-12-04 (bug fix)[3588824] text index of images with weird names (gavilan) 2012-12-06 (bug fix) avoid buggy syscall to parse hex color values (fellows) 2013-01-22 (bug fix)[3601782] Tcl_InitStubs failure message (nijtmans) 2013-01-31 (bug fix)[3599928] use XKeycodeToKeysym on old systems (cassoff) 2013-02-04 (bug fix)[3603077] treeview update on tag add/remove (english) 2013-02-28 (bug fix)[3599312] First Alt key event is lost (mcdonald) 2013-03-11 (bug fix)[3607326] Crash [listbox .l -listvariable $array] (porter) 2013-03-13 (enhancement) better build support for Debian arch (shadura) 2013-03-27 (bug fix)[3608074] button, listbox, menu <<Invoke>> (nijtmans) 2013-04-01 (bug fix)[3607830] Xkb runtime checks (griffin) --- Released 8.5.14, April 3, 2013 --- See ChangeLog for details --- 2013-05-19 (platform support) FreeBSD updates (cerutti) 2013-06-05 (bug fix)[3613759] [ttk::entry .e; .e xview end] (nijtmans) 2013-06-05 (bug fix)[2100430] [ttk::entry .e; .e xview insert] (nijtmans) 2013-06-07 (bug fix)[1913750,3500545,3416492,3095112] file dialogs (nijtmans) 2013-06-28 (bug fix)[2501278] reverse ttk::scale key bindings {mcdonald) 2013-06-28 (bug fix)[3588364] crash loading Tk 64-bit windows (nijtmans) 2013-07-02 (bug fix)[32afa6] corrected dirent64 check (griffin) 2013-08-25 (bug fix)[3016181] Cocoa: [destroy $scrollbar] => crash (goddard) 2013-08-26 (bug fix)[c597acd] [$pb step] work with traces (english) 2013-09-15 (bug fix)[8eb5671] macosx Tk compile errors w/clang (deily) --- Released 8.5.15, September 18, 2013 --- http://core.tcl.tk/tk/ for details 2013-10-27 (bug fix) OSX drawing lags (deily,steffen,walzer) 2013-10-28 (bug fix)[3603436] png wrong component indices (nijtmans) 2013-10-31 (bug fix) C++ friendly stubs struct declarations (nijtmans) 2013-10-31 (bug fix) double free of a TkFont (nijtmans) 2013-11-03 (bug fix)[1632447] support PPM maxval up to 65535 (fellows) 2013-11-05 (bug fix)[426679e] OpenBSD man page rendering (nijtmans) 2013-11-11 (bug fix)[0aa5e85] option file \n syntax support (nijtmans) 2013-11-20 (platforms) Support for Windows 8.1 (nijtmans) 2014-01-23 (bug fix)[3606644] X: correct fontconfig dependence (venable) 2014-01-23 (bug fix) FreeBSD build fixes (cerutti) 2014-02-06 (bug fix)[3279221] [menu] event race (danckaert,kupries) 2014-02-11 (bug fix)[52ca3e7] XkbOpenDisplay macro correction (nijtmans) 2014-03-16 (bug fix) Xcode 5.1 update; Retina displays (walzer) 2014-03-20 (bug fix)[2f7cbd0] FreeBSD 10.0 build failure (nijtmans) 2014-04-01 (bug fix)[5bcb502] @TK_LIBS@ in pkgconfig (badshah400,nijtmans) 2014-05-27 (bug fix)[a80f5d7] autoscroll initiation (crogers,english) 2014-07-07 (bug fix) OSX alpha channel rendering (culler,walzer) 2014-07-24 (bug fix) OSX [text] image display & scrolling (culler,walzer) 2014-08-01 (bug fix) OSX font config crash (rob@bitkeeper) --- Released 8.5.16, August 25, 2014 --- http://core.tcl.tk/tk/ for details 2014-08-27 (bug) Cocoa: Crash after [$button destroy] (walzer) 2014-09-23 (bug) Cocoa: button and scroll display fixes (walzer) 2014-09-24 (bug) Cocoa: improved drawing performance (walzer) 2014-10-11 (bug)[9e487e] Phony button clicks from browsers to plugin (nijtmans) 2014-10-11 (bug)[810c43] [text] elide changes advance epoch (vogel) 2014-10-14 (bug)[fb35eb] fix PNG transparency appearance (walton,culler) --- Released 8.5.17, October 25, 2014 --- http://core.tcl.tk/tk/ for details 2014-10-26 Support for Windows 10 (nijtmans) 2014-10-28 (bug) OSX: Improved ttk notebook tab metrics for Yosemite (walzer) 2014-10-30 (bug)[3417012] [scale -digits $bigValue] segfault (vogel) 2014-11-06 (bug)[9d72dc] memleak in Cocoa buttons (revol) 2014-11-07 (bug)[3529885] [scale] handling of negative resolution (vogel) 2015-01-02 (bug) Stop bit loss in [winfo id] on 64-bit Cocoa (porter) 2015-02-06 (bug) several fixes to elided context in [text] (vogel) 2015-02-06 (new feature)[TIP 433] %M binding substitution (mistachkin) *** POTENTIAL INCOMPATIBILITY *** Tk Cocoa 2.0: App Store enabled (walzer,culler,desmera,owen,nyberg,reincke) *** POTENTIAL INCOMPATIBILITY *** --- Released 8.5.18, March 6, 2015 --- http://core.tcl.tk/tk/ for details 2015-03-10 (bug) Cocoa: premature image free crash (walzer) 2015-03-15 (bug) Cocoa: wish launches in front. [focus -force] works (culler) 2015-04-09 (bug)[e4ed00] [$text index "1.0 display wordstart"] crash (vogel) 2015-04-09 (bug)[562118] Unicode support of "wordstart" modifier (vogel) 2015-05-05 (bug)[06c3fc] PNG alpha error corrupted output file (gauthier,porter) 2015-05-24 (bug)[53f8fc] panedwindow geometry management (vogel) 2015-05-26 (bug)[1641721] tk_getOpenFile symlink display doubled (nijtmans) 2015-06-01 (bug)[d7bad5][2368195][3592454][1714535][1292219][3592454] panedwindow fixes (vogel) 2015-06-25 (bug)[805cff] Tk_ConfigureWidget() segfault (aspect,nijtmans) 2015-07-13 (bug)[3f179a] Text widget crash with elided text (vogel) 2015-07-16 (bug)[2886436] Stop [$text delete] acting before start index (vogel) 2015-07-28 (bug)[1236306] TraverseToMenu error bound to toplevel destroy (vogel) 2015-08-20 (bug)[00189c] MSVC 14: semi-static UCRT support (dower,nijtmans) 2015-09-29 (bug)[1501749] Crash embedded window delete bound to <Map> (vogel) 2015-10-08 (new feature)[TIP 437] New panedwindow options (vogel) 2015-10-09 (bug)[1669632] [text] autoseparator placement (nash,vogel) 2015-10-09 (bug)[2262711] [text] RE search Unicode+elided (kaitzschu,vogel) 2015-10-09 (bug)[1815161] [$text count -ypixels] needs management (vogel) |
︙ | ︙ | |||
7251 7252 7253 7254 7255 7256 7257 | 2016-01-09 (bug)[1927212] Mousewheel/scrollbar bindings (vogel) 2016-01-11 (bug)[63c354] Cocoa message boxes (culler) 2016-01-12 (bug)[2049429] get more $text options from database (vogel) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 | 2016-01-09 (bug)[1927212] Mousewheel/scrollbar bindings (vogel) 2016-01-11 (bug)[63c354] Cocoa message boxes (culler) 2016-01-12 (bug)[2049429] get more $text options from database (vogel) 2016-01-25 (bug) OBOE in ttk::notebook options parsing (bromley,english) Tk Cocoa 2.0: More drawing internals refinements (culler,walzer) --- Released 8.5.19, February 12, 2016 --- http://core.tcl.tk/tk/ for details |
Added compat/limits.h.
> > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | /* * limits.h -- * * This is a dummy header file to #include in Tcl when there * is no limits.h in /usr/include. There are only a few * definitions here; also see tclPort.h, which already * #defines some of the things here if they're not arleady * defined. * * Copyright (c) 1991 The Regents of the University of California. * Copyright (c) 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. */ #define LONG_MIN 0x80000000 #define LONG_MAX 0x7fffffff #define INT_MIN 0x80000000 #define INT_MAX 0x7fffffff #define SHRT_MIN 0x8000 #define SHRT_MAX 0x7fff |
Deleted compat/stdbool.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted compat/stdint.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added compat/stdlib.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | /* * stdlib.h -- * * Declares facilities exported by the "stdlib" portion of * the C library. This file isn't complete in the ANSI-C * sense; it only declares things that are needed by Tcl. * This file is needed even on many systems with their own * stdlib.h (e.g. SunOS) because not all stdlib.h files * declare all the procedures needed here (such as strtod). * * Copyright (c) 1991 The Regents of the University of California. * Copyright (c) 1994-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _STDLIB #define _STDLIB #include <tcl.h> extern void abort _ANSI_ARGS_((void)); extern double atof _ANSI_ARGS_((CONST char *string)); extern int atoi _ANSI_ARGS_((CONST char *string)); extern long atol _ANSI_ARGS_((CONST char *string)); extern char * calloc _ANSI_ARGS_((unsigned int numElements, unsigned int size)); extern void exit _ANSI_ARGS_((int status)); extern int free _ANSI_ARGS_((char *blockPtr)); extern char * getenv _ANSI_ARGS_((CONST char *name)); extern char * malloc _ANSI_ARGS_((unsigned int numBytes)); extern void qsort _ANSI_ARGS_((VOID *base, int n, int size, int (*compar)(CONST VOID *element1, CONST VOID *element2))); extern char * realloc _ANSI_ARGS_((char *ptr, unsigned int numBytes)); extern double strtod _ANSI_ARGS_((CONST char *string, char **endPtr)); extern long strtol _ANSI_ARGS_((CONST char *string, char **endPtr, int base)); extern unsigned long strtoul _ANSI_ARGS_((CONST char *string, char **endPtr, int base)); #endif /* _STDLIB */ |
Added compat/unistd.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | /* * unistd.h -- * * Macros, CONSTants and prototypes for Posix conformance. * * Copyright 1989 Regents of the University of California * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without * fee is hereby granted, provided that the above copyright * notice appear in all copies. The University of California * makes no representations about the suitability of this * software for any purpose. It is provided "as is" without * express or implied warranty. */ #ifndef _UNISTD #define _UNISTD #include <sys/types.h> #ifndef _TCL # include "tcl.h" #endif #ifndef NULL #define NULL 0 #endif /* * Strict POSIX stuff goes here. Extensions go down below, in the * ifndef _POSIX_SOURCE section. */ extern void _exit _ANSI_ARGS_((int status)); extern int access _ANSI_ARGS_((CONST char *path, int mode)); extern int chdir _ANSI_ARGS_((CONST char *path)); extern int chown _ANSI_ARGS_((CONST char *path, uid_t owner, gid_t group)); extern int close _ANSI_ARGS_((int fd)); extern int dup _ANSI_ARGS_((int oldfd)); extern int dup2 _ANSI_ARGS_((int oldfd, int newfd)); extern int execl _ANSI_ARGS_((CONST char *path, ...)); extern int execle _ANSI_ARGS_((CONST char *path, ...)); extern int execlp _ANSI_ARGS_((CONST char *file, ...)); extern int execv _ANSI_ARGS_((CONST char *path, char **argv)); extern int execve _ANSI_ARGS_((CONST char *path, char **argv, char **envp)); extern int execvp _ANSI_ARGS_((CONST char *file, char **argv)); extern pid_t fork _ANSI_ARGS_((void)); extern char *getcwd _ANSI_ARGS_((char *buf, size_t size)); extern gid_t getegid _ANSI_ARGS_((void)); extern uid_t geteuid _ANSI_ARGS_((void)); extern gid_t getgid _ANSI_ARGS_((void)); extern int getgroups _ANSI_ARGS_((int bufSize, int *buffer)); extern pid_t getpid _ANSI_ARGS_((void)); extern uid_t getuid _ANSI_ARGS_((void)); extern int isatty _ANSI_ARGS_((int fd)); extern long lseek _ANSI_ARGS_((int fd, long offset, int whence)); extern int pipe _ANSI_ARGS_((int *fildes)); extern int read _ANSI_ARGS_((int fd, char *buf, size_t size)); extern int setgid _ANSI_ARGS_((gid_t group)); extern int setuid _ANSI_ARGS_((uid_t user)); extern unsigned sleep _ANSI_ARGS_ ((unsigned seconds)); extern char *ttyname _ANSI_ARGS_((int fd)); extern int unlink _ANSI_ARGS_((CONST char *path)); extern int write _ANSI_ARGS_((int fd, CONST char *buf, size_t size)); #ifndef _POSIX_SOURCE extern char *crypt _ANSI_ARGS_((CONST char *, CONST char *)); extern int fchown _ANSI_ARGS_((int fd, uid_t owner, gid_t group)); extern int flock _ANSI_ARGS_((int fd, int operation)); extern int ftruncate _ANSI_ARGS_((int fd, unsigned long length)); extern int ioctl _ANSI_ARGS_((int fd, int request, ...)); extern int readlink _ANSI_ARGS_((CONST char *path, char *buf, int bufsize)); extern int setegid _ANSI_ARGS_((gid_t group)); extern int seteuid _ANSI_ARGS_((uid_t user)); extern int setreuid _ANSI_ARGS_((int ruid, int euid)); extern int symlink _ANSI_ARGS_((CONST char *, CONST char *)); extern int ttyslot _ANSI_ARGS_((void)); extern int truncate _ANSI_ARGS_((CONST char *path, unsigned long length)); extern int vfork _ANSI_ARGS_((void)); #endif /* _POSIX_SOURCE */ #endif /* _UNISTD */ |
Changes to doc/3DBorder.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1993 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990-1993 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_Alloc3DBorderFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_Alloc3DBorderFromObj, Tk_Get3DBorder, Tk_Get3DBorderFromObj, Tk_Draw3DRectangle, Tk_Fill3DRectangle, Tk_Draw3DPolygon, Tk_Fill3DPolygon, Tk_3DVerticalBevel, Tk_3DHorizontalBevel, Tk_SetBackgroundFromBorder, Tk_NameOf3DBorder, Tk_3DBorderColor, Tk_3DBorderGC, Tk_Free3DBorderFromObj, Tk_Free3DBorder \- draw borders with three-dimensional appearance .SH SYNOPSIS .nf |
︙ | ︙ | |||
60 61 62 63 64 65 66 | .AS "Tk_3DBorder" borderWidth .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP Tk_Window tkwin in Token for window (for all procedures except \fBTk_Get3DBorder\fR, must be the window for which the border was allocated). .AP Tcl_Obj *objPtr in | | | | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | .AS "Tk_3DBorder" borderWidth .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP Tk_Window tkwin in Token for window (for all procedures except \fBTk_Get3DBorder\fR, must be the window for which the border was allocated). .AP Tcl_Obj *objPtr in Pointer to object whose value describes color corresponding to background (flat areas). Illuminated edges will be brighter than this and shadowed edges will be darker than this. .AP char *colorName in Same as \fIobjPtr\fR except value is supplied as a string rather than an object. .AP Drawable drawable in X token for window or pixmap; indicates where graphics are to be drawn. Must either be the X window for \fItkwin\fR or a pixmap with the same screen and depth as \fItkwin\fR. .AP Tk_3DBorder border in Token for border previously allocated in call to \fBTk_Get3DBorder\fR. .AP int x in |
︙ | ︙ | |||
87 88 89 90 91 92 93 | .AP int height in Height of rectangle describing border or bevel, in pixels. .AP int borderWidth in 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 relief in | | | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | .AP int height in Height of rectangle describing border or bevel, in pixels. .AP int borderWidth in 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 relief in Indicates 3-D position of interior of object relative to exterior; should be \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR, \fBTK_RELIEF_SOLID\fR, or \fBTK_RELIEF_RIDGE\fR (may also be \fBTK_RELIEF_FLAT\fR for \fBTk_Fill3DRectangle\fR). .AP XPoint *pointPtr in Pointer to array of points describing the set of vertices in a polygon. The polygon need not be closed (it will be closed automatically if it is not). |
︙ | ︙ | |||
110 111 112 113 114 115 116 | Height of left side of polygon's path relative to right. \fBTK_RELIEF_RAISED\fR means left side should appear higher and \fBTK_RELIEF_SUNKEN\fR means right side should appear higher; \fBTK_RELIEF_GROOVE\fR and \fBTK_RELIEF_RIDGE\fR mean the obvious things. For \fBTk_Fill3DPolygon\fR, \fBTK_RELIEF_FLAT\fR may also be specified to indicate no difference in height. .AP int leftBevel in | | | > | < | | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | Height of left side of polygon's path relative to right. \fBTK_RELIEF_RAISED\fR means left side should appear higher and \fBTK_RELIEF_SUNKEN\fR means right side should appear higher; \fBTK_RELIEF_GROOVE\fR and \fBTK_RELIEF_RIDGE\fR mean the obvious things. For \fBTk_Fill3DPolygon\fR, \fBTK_RELIEF_FLAT\fR may also be specified to indicate no difference in height. .AP int leftBevel in Non-zero means this bevel forms the left side of the object; zero means it forms the right side. .AP int leftIn in Non-zero means that the left edge of the horizontal bevel angles in, so that the bottom of the edge is farther to the right than the top. Zero means the edge angles out, so that the bottom is farther to the left than the top. .AP int rightIn in Non-zero means that the right edge of the horizontal bevel angles in, so that the bottom of the edge is farther to the left than the top. Zero means the edge angles out, so that the bottom is farther to the right than the top. .AP int topBevel in Non-zero means this bevel forms the top side of the object; zero means it forms the bottom side. .AP int which in Specifies which of the border's graphics contexts is desired. Must be \fBTK_3D_FLAT_GC\fR, \fBTK_3D_LIGHT_GC\fR, or \fBTK_3D_DARK_GC\fR. .BE .SH DESCRIPTION .PP These procedures provide facilities for drawing window borders in a way that produces a three-dimensional appearance. \fBTk_Alloc3DBorderFromObj\fR allocates colors and Pixmaps needed to draw a border in the window given by the \fItkwin\fR argument. The value of \fIobjPtr\fR is a standard Tk color name that determines the border colors. The color indicated by \fIobjPtr\fR will not actually be used in the border; it indicates the background color for the window (i.e. a color for flat surfaces). The illuminated portions of the border will appear brighter than indicated by \fIobjPtr\fR, and the shadowed portions of the border will appear darker than \fIobjPtr\fR. .PP \fBTk_Alloc3DBorderFromObj\fR returns a token that may be used in later calls to \fBTk_Draw3DRectangle\fR. If an error occurs in allocating information for the border (e.g. a bogus color name was given) then NULL is returned and an error message is left in \fIinterp->result\fR. If it returns successfully, \fBTk_Alloc3DBorderFromObj\fR caches 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_Get3DBorder\fR is identical to \fBTk_Alloc3DBorderFromObj\fR except that the color is specified with a string instead of an object. This prevents \fBTk_Get3DBorder\fR from caching the return value, so \fBTk_Get3DBorder\fR is less efficient than \fBTk_Alloc3DBorderFromObj\fR. .PP \fBTk_Get3DBorderFromObj\fR returns the token for an existing border, given the window and color name used to create the border. \fBTk_Get3DBorderFromObj\fR does not actually create the border; it must already have been created with a previous call to |
︙ | ︙ | |||
234 235 236 237 238 239 240 | rectangle. Each procedure takes \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR arguments that describe the rectangular area of the beveled edge (e.g., \fIwidth\fR is the border width for \fBTk_3DVerticalBevel\fR). The \fIleftBorder\fR and \fItopBorder\fR arguments indicate the position of the border relative to the .QW inside | | | | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | rectangle. Each procedure takes \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR arguments that describe the rectangular area of the beveled edge (e.g., \fIwidth\fR is the border width for \fBTk_3DVerticalBevel\fR). The \fIleftBorder\fR and \fItopBorder\fR arguments indicate the position of the border relative to the .QW inside of the object, and \fIrelief\fR indicates the relief of the inside of the object relative to the outside. \fBTk_3DVerticalBevel\fR just draws a rectangular region. \fBTk_3DHorizontalBevel\fR draws a trapezoidal region to generate mitered corners; it should be called after \fBTk_3DVerticalBevel\fR (otherwise \fBTk_3DVerticalBevel\fR will overwrite the mitering in the corner). The \fIleftIn\fR and \fIrightIn\fR arguments to \fBTk_3DHorizontalBevel\fR |
︙ | ︙ | |||
286 287 288 289 290 291 292 293 | For \fBTk_Free3DBorderFromObj\fR the border to release is specified with the window and color name used to create the border; for \fBTk_Free3DBorder\fR the border to release is specified with the Tk_3DBorder token for the border. 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 | > | | 286 287 288 289 290 291 292 293 294 295 | For \fBTk_Free3DBorderFromObj\fR the border to release is specified with the window and color name used to create the border; for \fBTk_Free3DBorder\fR the border to release is specified with the Tk_3DBorder token for the border. 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, object, polygon, raised, shadow, three-dimensional effect |
Changes to doc/AddOption.3.
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | .AP "const char" *name in Multi-element name of option. .AP "const char" *value in Value of option. .AP int priority in Overall priority level to use for option. .BE .SH DESCRIPTION .PP This procedure is invoked to add an option to the database associated with \fItkwin\fR's main window. \fIName\fR contains the option being specified and consists of names and/or classes separated by asterisks or dots, in the usual X format. \fIValue\fR contains the text string to associate with \fIname\fR; | > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | .AP "const char" *name in Multi-element name of option. .AP "const char" *value in Value of option. .AP int priority in Overall priority level to use for option. .BE .SH DESCRIPTION .PP This procedure is invoked to add an option to the database associated with \fItkwin\fR's main window. \fIName\fR contains the option being specified and consists of names and/or classes separated by asterisks or dots, in the usual X format. \fIValue\fR contains the text string to associate with \fIname\fR; |
︙ | ︙ | |||
42 43 44 45 46 47 48 49 50 | .IP 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. .IP 80 Used for options specified interactively after the application starts running. .SH KEYWORDS class, name, option, add | > | 43 44 45 46 47 48 49 50 51 52 | .IP 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. .IP 80 Used for options specified interactively after the application starts running. .SH KEYWORDS class, name, option, add |
Changes to doc/BindTable.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_CreateBindingTable 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateBindingTable, Tk_DeleteBindingTable, Tk_CreateBinding, Tk_DeleteBinding, Tk_GetBinding, Tk_GetAllBindings, Tk_DeleteAllBindings, Tk_BindEvent \- invoke scripts in response to X events .SH SYNOPSIS .nf |
︙ | ︙ | |||
41 42 43 44 45 46 47 | .AP Tk_BindingTable bindingTable in Token for binding table; must have been returned by some previous call to \fBTk_CreateBindingTable\fR. .AP ClientData object in Identifies object with which binding is associated. .AP "const char" *eventString in String describing event sequence. | | > | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | .AP Tk_BindingTable bindingTable in Token for binding table; must have been returned by some previous call to \fBTk_CreateBindingTable\fR. .AP ClientData object in Identifies object with which binding is associated. .AP "const char" *eventString in String describing event sequence. .AP char *script in Tcl script to invoke when binding triggers. .AP int append in Non-zero means append \fIscript\fR to existing script for binding, if any; zero means replace existing script with new one. .AP XEvent *eventPtr in 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 Number of object identifiers pointed to by \fIobjectPtr\fR. .AP ClientData *objectPtr in Points to an array of object identifiers: bindings will be considered for each of these objects in order from first to last. .BE .SH DESCRIPTION .PP These procedures provide a general-purpose mechanism for creating and invoking bindings. Bindings are organized in terms of \fIbinding tables\fR. A binding table consists of a collection of bindings plus a history of recent events. |
︙ | ︙ | |||
107 108 109 110 111 112 113 | \fBTk_CreateBinding\fR returns an X event mask for all the events associated with the bindings. This information may be useful to invoke \fBXSelectInput\fR to select relevant events, or to disallow the use of certain events in bindings. If an error occurred while creating the binding (e.g., \fIeventString\fR refers to a non-existent event), then 0 is returned and an error | | | | | | | > | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | \fBTk_CreateBinding\fR returns an X event mask for all the events associated with the bindings. This information may be useful to invoke \fBXSelectInput\fR to select relevant events, or to disallow the use of certain events in bindings. If an error occurred while creating the binding (e.g., \fIeventString\fR refers to a non-existent event), then 0 is returned and an error message is left in \fIinterp->result\fR. .PP \fBTk_DeleteBinding\fR removes from \fIbindingTable\fR the binding given by \fIobject\fR and \fIeventString\fR, if such a binding exists. \fBTk_DeleteBinding\fR always returns \fBTCL_OK\fR. In some cases it may reset \fIinterp->result\fR to the default empty value. .PP \fBTk_GetBinding\fR returns a pointer to the script associated with \fIeventString\fR and \fIobject\fR in \fIbindingTable\fR. If no such binding exists then NULL is returned and an error message is left in \fIinterp->result\fR. .PP \fBTk_GetAllBindings\fR returns in \fIinterp->result\fR a list of all the event strings for which there are bindings in \fIbindingTable\fR associated with \fIobject\fR. If there are no bindings for \fIobject\fR then an empty string is returned in \fIinterp->result\fR. .PP \fBTk_DeleteAllBindings\fR deletes all of the bindings in \fIbindingTable\fR that are associated with \fIobject\fR. .PP \fBTk_BindEvent\fR is called to process an event. It makes a copy of the event in an internal history list associated with the binding table, then it checks for bindings that match the event. \fBTk_BindEvent\fR processes each of the objects pointed to by \fIobjectPtr\fR in turn. For each object, it finds all the bindings that match the current event history, selects the most specific binding using the priority mechanism described in the documentation for \fBbind\fR, and invokes the script for that binding. If there are no matching bindings for a particular object, then the object is skipped. \fBTk_BindEvent\fR continues through all of the objects, handling exceptions such as errors, \fBbreak\fR, and \fBcontinue\fR as described in the documentation for \fBbind\fR. .SH KEYWORDS binding, event, object, script |
Changes to doc/CanvPsY.3.
1 2 3 4 5 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | '\" '\" 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_CanvasPs 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CanvasPsY, Tk_CanvasPsBitmap, Tk_CanvasPsColor, Tk_CanvasPsFont, Tk_CanvasPsPath, Tk_CanvasPsStipple \- utility procedures for generating Postscript for canvases .SH SYNOPSIS .nf |
︙ | ︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 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 Number of points at \fIcoordPtr\fR. .BE .SH DESCRIPTION .PP These procedures are called by canvas type managers to carry out common functions related to generating Postscript. Most of the procedures take a \fIcanvas\fR argument, which refers to a canvas widget for which Postscript is being generated. | > | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 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 Number of points at \fIcoordPtr\fR. .BE .SH DESCRIPTION .PP These procedures are called by canvas type managers to carry out common functions related to generating Postscript. Most of the procedures take a \fIcanvas\fR argument, which refers to a canvas widget for which Postscript is being generated. |
︙ | ︙ | |||
78 79 80 81 82 83 84 | Canvas x coordinates can be used directly in Postscript without transformation. .PP \fBTk_CanvasPsBitmap\fR generates Postscript to describe a region of a bitmap. The Postscript is generated in proper image data format for Postscript, i.e., as data between angle brackets, one bit per pixel. | | | < | | | | | | < | | | | < | > | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | Canvas x coordinates can be used directly in Postscript without transformation. .PP \fBTk_CanvasPsBitmap\fR generates Postscript to describe a region of a bitmap. The Postscript is generated in proper image data format for Postscript, i.e., as data between angle brackets, one bit per pixel. The Postscript is appended to \fIinterp->result\fR and \fBTCL_OK\fR is returned unless an error occurs, in which case \fBTCL_ERROR\fR is returned and \fIinterp->result\fR is overwritten with an error message. .PP \fBTk_CanvasPsColor\fR generates Postscript to set the current color to correspond to its \fIcolorPtr\fR argument, taking into account any color map specified in the \fBpostscript\fR command. It appends the Postscript to \fIinterp->result\fR and returns \fBTCL_OK\fR unless an error occurs, in which case \fBTCL_ERROR\fR is returned and \fIinterp->result\fR is overwritten with an error message. .PP \fBTk_CanvasPsFont\fR generates Postscript that sets the current font to match \fItkFont\fR as closely as possible. \fBTk_CanvasPsFont\fR takes into account any font map specified in the \fBpostscript\fR command, and it does the best it can at mapping X fonts to Postscript fonts. It appends the Postscript to \fIinterp->result\fR and returns \fBTCL_OK\fR unless an error occurs, in which case \fBTCL_ERROR\fR is returned and \fIinterp->result\fR is overwritten with an error message. .PP \fBTk_CanvasPsPath\fR generates Postscript to set the current path to the set of points given by \fIcoordPtr\fR and \fInumPoints\fR. It appends the resulting Postscript to \fIinterp->result\fR. .PP \fBTk_CanvasPsStipple\fR generates Postscript that will fill the current path in stippled fashion. It uses \fIbitmap\fR as the stipple pattern and the current Postscript color; ones in the stipple bitmap are drawn in the current color, and zeroes are not drawn at all. The Postscript is appended to \fIinterp->result\fR and \fBTCL_OK\fR is returned, unless an error occurs, in which case \fBTCL_ERROR\fR is returned and \fIinterp->result\fR is overwritten with an error message. .SH KEYWORDS bitmap, canvas, color, font, path, Postscript, stipple |
Changes to doc/CanvTkwin.3.
1 2 3 4 5 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | '\" '\" 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_CanvasTkwin 3 4.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CanvasTkwin, Tk_CanvasGetCoord, Tk_CanvasDrawableCoords, Tk_CanvasSetStippleOrigin, Tk_CanvasWindowCoords, Tk_CanvasEventuallyRedraw, Tk_CanvasTagsOption \- utility procedures for canvas type managers .SH SYNOPSIS .nf |
︙ | ︙ | |||
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | .AP int x2 in Right edge of the region that needs redisplay. Only pixels to the left of this coordinate need to be redisplayed. .AP int y2 in Bottom edge of the region that needs redisplay. Only pixels above this coordinate need to be redisplayed. .BE .SH DESCRIPTION .PP These procedures are called by canvas type managers to perform various utility functions. .PP \fBTk_CanvasTkwin\fR returns the Tk_Window associated with a particular canvas. .PP \fBTk_CanvasGetCoord\fR translates a string specification of a coordinate (such as \fB2p\fR or \fB1.6c\fR) into a double-precision canvas coordinate. If \fIstring\fR is a valid coordinate description then \fBTk_CanvasGetCoord\fR stores the corresponding canvas coordinate at *\fIdoublePtr\fR and returns \fBTCL_OK\fR. | > | | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | .AP int x2 in Right edge of the region that needs redisplay. Only pixels to the left of this coordinate need to be redisplayed. .AP int y2 in Bottom edge of the region that needs redisplay. Only pixels above this coordinate need to be redisplayed. .BE .SH DESCRIPTION .PP These procedures are called by canvas type managers to perform various utility functions. .PP \fBTk_CanvasTkwin\fR returns the Tk_Window associated with a particular canvas. .PP \fBTk_CanvasGetCoord\fR translates a string specification of a coordinate (such as \fB2p\fR or \fB1.6c\fR) into a double-precision canvas coordinate. If \fIstring\fR is a valid coordinate description then \fBTk_CanvasGetCoord\fR stores the corresponding canvas coordinate at *\fIdoublePtr\fR and returns \fBTCL_OK\fR. Otherwise it stores an error message in \fIinterp->result\fR and returns \fBTCL_ERROR\fR. .PP \fBTk_CanvasDrawableCoords\fR is called by type managers during redisplay to compute where to draw things. Given \fIx\fR and \fIy\fR coordinates in the space of the canvas, \fBTk_CanvasDrawableCoords\fR computes the corresponding pixel in the drawable that is currently being used for redisplay; |
︙ | ︙ | |||
137 138 139 140 141 142 143 | .PP \fBTk_CanvasTagsParseProc\fR and \fBTk_CanvasTagsPrintProc\fR are procedures that handle the \fB\-tags\fR option for canvas items. The code of a canvas type manager will not call these procedures directly, but will use their addresses to create a \fBTk_CustomOption\fR structure for the \fB\-tags\fR option. The code typically looks like this: | < | | | | | > | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | .PP \fBTk_CanvasTagsParseProc\fR and \fBTk_CanvasTagsPrintProc\fR are procedures that handle the \fB\-tags\fR option for canvas items. The code of a canvas type manager will not call these procedures directly, but will use their addresses to create a \fBTk_CustomOption\fR structure for the \fB\-tags\fR option. The code typically looks like this: .CS static Tk_CustomOption tagsOption = {Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL }; static Tk_ConfigSpec configSpecs[] = { ... {TK_CONFIG_CUSTOM, "\-tags", (char *) NULL, (char *) NULL, (char *) NULL, 0, TK_CONFIG_NULL_OK, &tagsOption}, ... }; .CE .SH KEYWORDS canvas, focus, item type, redisplay, selection, type manager |
Changes to doc/CanvTxtInfo.3.
1 2 3 4 5 | '\" '\" 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. | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | '\" '\" 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_CanvasTextInfo 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CanvasTextInfo \- additional information for managing text items in canvases .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp Tk_CanvasTextInfo * \fBTk_CanvasGetTextInfo\fR(\fIcanvas\fR) .SH ARGUMENTS .AS Tk_Canvas canvas .AP Tk_Canvas canvas in A token that identifies a particular canvas widget. .BE .SH DESCRIPTION .PP Textual canvas items are somewhat more complicated to manage than other items, due to things like the selection and the input focus. \fBTk_CanvasGetTextInfo\fR may be invoked by a type manager to obtain additional information needed for items that display text. The return value from \fBTk_CanvasGetTextInfo\fR is a pointer to |
︙ | ︙ | |||
42 43 44 45 46 47 48 | int \fIselectAnchor\fR; Tk_3DBorder \fIinsertBorder\fR; int \fIinsertWidth\fR; int \fIinsertBorderWidth\fR; Tk_Item *\fIfocusItemPtr\fR; int \fIgotFocus\fR; int \fIcursorOn\fR; | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | int \fIselectAnchor\fR; Tk_3DBorder \fIinsertBorder\fR; int \fIinsertWidth\fR; int \fIinsertBorderWidth\fR; Tk_Item *\fIfocusItemPtr\fR; int \fIgotFocus\fR; int \fIcursorOn\fR; } Tk_CanvasTextInfo; .CE The \fBselBorder\fR field identifies a Tk_3DBorder that should be used for drawing the background under selected text. \fIselBorderWidth\fR gives the width of the raised border around selected text, in pixels. \fIselFgColorPtr\fR points to an XColor that describes the foreground color to be used when drawing selected text. |
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 | Type managers may change \fIselectFirst\fR, \fIselectLast\fR, and \fIselectAnchor\fR to adjust for insertions and deletions in the item (but only if the item is the current owner of the selection or anchor, as determined by \fIselItemPtr\fR or \fIanchorItemPtr\fR). If all of the selected text in the item is deleted, the item should set \fIselItemPtr\fR to NULL to indicate that there is no longer a selection. .SH KEYWORDS canvas, focus, insertion cursor, selection, selection anchor, text | > | 93 94 95 96 97 98 99 100 101 102 | Type managers may change \fIselectFirst\fR, \fIselectLast\fR, and \fIselectAnchor\fR to adjust for insertions and deletions in the item (but only if the item is the current owner of the selection or anchor, as determined by \fIselItemPtr\fR or \fIanchorItemPtr\fR). If all of the selected text in the item is deleted, the item should set \fIselItemPtr\fR to NULL to indicate that there is no longer a selection. .SH KEYWORDS canvas, focus, insertion cursor, selection, selection anchor, text |
Changes to doc/Clipboard.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_ClipboardClear 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_ClipboardClear, Tk_ClipboardAppend \- Manage the clipboard .SH SYNOPSIS .nf |
︙ | ︙ | |||
27 28 29 30 31 32 33 | Window that determines which display's clipboard to manipulate. .AP Atom target in Conversion type for this clipboard item; has same meaning as \fItarget\fR argument to \fBTk_CreateSelHandler\fR. .AP Atom format in Representation to use when data is retrieved; has same meaning as \fIformat\fR argument to \fBTk_CreateSelHandler\fR. | | > | | < | | | > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | Window that determines which display's clipboard to manipulate. .AP Atom target in Conversion type for this clipboard item; has same meaning as \fItarget\fR argument to \fBTk_CreateSelHandler\fR. .AP Atom format in Representation to use when data is retrieved; has same meaning as \fIformat\fR argument to \fBTk_CreateSelHandler\fR. .AP char *buffer in Null terminated string containing the data to be appended to the clipboard. .BE .SH DESCRIPTION .PP These two procedures manage the clipboard for Tk. The clipboard is typically managed by calling \fBTk_ClipboardClear\fR once, then calling \fBTk_ClipboardAppend\fR to add data for any number of targets. .PP \fBTk_ClipboardClear\fR claims the CLIPBOARD selection and frees any data items previously stored on the clipboard in this application. It normally returns \fBTCL_OK\fR, but if an error occurs it returns \fBTCL_ERROR\fR and leaves an error message in \fIinterp->result\fR. \fBTk_ClipboardClear\fR must be called before a sequence of \fBTk_ClipboardAppend\fR calls can be issued. .PP \fBTk_ClipboardAppend\fR appends a buffer of data to the clipboard. The first buffer for a given \fItarget\fR determines the \fIformat\fR for that \fItarget\fR. Any successive appends for that \fItarget\fR must have the same format or an error will be returned. \fBTk_ClipboardAppend\fR returns \fBTCL_OK\fR if the buffer is successfully copied onto the clipboard. If the clipboard is not currently owned by the application, either because \fBTk_ClipboardClear\fR has not been called or because ownership of the clipboard has changed since the last call to \fBTk_ClipboardClear\fR, \fBTk_ClipboardAppend\fR returns \fBTCL_ERROR\fR and leaves an error message in \fIinterp->result\fR. .PP In order to guarantee atomicity, no event handling should occur between \fBTk_ClipboardClear\fR and the following \fBTk_ClipboardAppend\fR calls (otherwise someone could retrieve a partially completed clipboard or claim ownership away from this application). .PP \fBTk_ClipboardClear\fR may invoke callbacks, including arbitrary Tcl scripts, as a result of losing the CLIPBOARD selection, so any calling function should take care to be reentrant at the point \fBTk_ClipboardClear\fR is invoked. .SH KEYWORDS append, clipboard, clear, format, type |
Changes to doc/ClrSelect.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1992-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | > | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | '\" '\" Copyright (c) 1992-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_ClearSelection 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_ClearSelection \- Deselect a selection .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp \fBTk_ClearSelection\fR(\fItkwin, selection\fR) .SH ARGUMENTS .AS Tk_Window tkwin .AP Tk_Window tkwin in The selection will be cleared from the display containing this window. .AP Atom selection in The name of selection to be cleared. .BE .SH DESCRIPTION .PP \fBTk_ClearSelection\fR cancels the selection specified by the atom \fIselection\fR for the display containing \fItkwin\fR. The selection need not be in \fItkwin\fR itself or even in \fItkwin\fR's application. If there is a window anywhere on \fItkwin\fR's display that owns \fIselection\fR, the window will be notified and the selection will be cleared. If there is no owner for \fIselection\fR on the display, then the procedure has no effect. .SH KEYWORDS clear, selection |
Changes to doc/ConfigWidg.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_ConfigureWidget 3 4.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_ConfigureWidget, Tk_ConfigureInfo, Tk_ConfigureValue, Tk_FreeOptions \- process configuration options for widgets .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp int \fBTk_ConfigureWidget(\fIinterp, tkwin, specs, argc, argv, widgRec, flags\fB)\fR .sp int \fBTk_ConfigureInfo(\fIinterp, tkwin, specs, widgRec, argvName, flags\fB)\fR .sp int \fBTk_ConfigureValue(\fIinterp, tkwin, specs, widgRec, argvName, flags\fB)\fR .sp \fBTk_FreeOptions(\fIspecs, widgRec, display, flags\fB)\fR .SH ARGUMENTS .AS Tk_ConfigSpec *widgRec in/out .AP Tcl_Interp *interp in Interpreter to use for returning error messages. .AP Tk_Window tkwin in Window used to represent widget (needed to set up X resources). .AP 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 Command-line options for configuring widget. .AP char *widgRec in/out |
︙ | ︙ | |||
57 58 59 60 61 62 63 | option. If NULL, then information is returned for all available options. .AP Display *display in Display containing widget whose record is being freed; needed in order to free up resources. .BE .SH DESCRIPTION | | | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | option. If NULL, then information is returned for all available options. .AP Display *display in Display containing widget whose record is being freed; needed in 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 retained for backward compatibility. .PP \fBTk_ConfigureWidget\fR is called to configure various aspects of a widget, such as colors, fonts, border width, etc. It is intended as a convenience procedure to reduce the amount |
︙ | ︙ | |||
85 86 87 88 89 90 91 | \fIargv\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. \fBTk_ConfigureWidget\fR normally returns the value \fBTCL_OK\fR; in this case it does not modify \fIinterp\fR. If an error occurs then \fBTCL_ERROR\fR is returned and \fBTk_ConfigureWidget\fR will | | | | | | | | | | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | \fIargv\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. \fBTk_ConfigureWidget\fR normally returns the value \fBTCL_OK\fR; in this case it does not modify \fIinterp\fR. If an error occurs then \fBTCL_ERROR\fR is returned and \fBTk_ConfigureWidget\fR will leave an error message in \fIinterp->result\fR in the standard Tcl fashion. In the event of an error return, some of the fields of \fIwidgRec\fR could already have been set, if configuration information for them was successfully processed before the error occurred. The other fields will be set to reasonable initial values so that \fBTk_FreeOptions\fR can be called for cleanup. .PP The \fIspecs\fR array specifies the kinds of configuration options expected by the widget. Each of its entries specifies one configuration option and has the following structure: .CS typedef struct { int \fItype\fR; char *\fIargvName\fR; char *\fIdbName\fR; char *\fIdbClass\fR; char *\fIdefValue\fR; int \fIoffset\fR; int \fIspecFlags\fR; Tk_CustomOption *\fIcustomPtr\fR; } Tk_ConfigSpec; .CE The \fItype\fR field indicates what type of configuration option this is (e.g. \fBTK_CONFIG_COLOR\fR for a color value, or \fBTK_CONFIG_INT\fR for an integer value). The \fItype\fR field indicates how to use the value of the option (more on this below). The \fIargvName\fR field is a string such as .QW \-font |
︙ | ︙ | |||
157 158 159 160 161 162 163 | form, such as a color if \fItype\fR is \fBTK_CONFIG_COLOR\fR or an integer if \fItype\fR is \fBTK_CONFIG_INT\fR. This value is then stored in the record pointed to by \fIwidgRec\fR. This record is assumed to contain information relevant to the manager of the widget; its exact type is unknown to \fBTk_ConfigureWidget\fR. The \fIoffset\fR field of each \fIspecs\fR entry indicates where in \fIwidgRec\fR to store the information about this configuration option. You should use the | | > | | | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | form, such as a color if \fItype\fR is \fBTK_CONFIG_COLOR\fR or an integer if \fItype\fR is \fBTK_CONFIG_INT\fR. This value is then stored in the record pointed to by \fIwidgRec\fR. This record is assumed to contain information relevant to the manager of the widget; its exact type is unknown to \fBTk_ConfigureWidget\fR. The \fIoffset\fR field of each \fIspecs\fR entry indicates where in \fIwidgRec\fR to store the information about this configuration option. You should use the \fBTk_Offset\fR macro to generate \fIoffset\fR values (see below for a description of \fBTk_Offset\fR). The location indicated by \fIwidgRec\fR and \fIoffset\fR will be referred to as the .QW target in the descriptions below. .PP The \fItype\fR field of each entry in \fIspecs\fR determines what 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. The value is converted to a \fBTk_Cursor\fR by calling \fBTk_GetCursor\fR and the result is stored in the target. In addition, the resulting cursor is made the active cursor for \fItkwin\fR by calling \fBXDefineCursor\fR. If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value may be an empty string, in which case the target and \fItkwin\fR's active cursor will be set to \fBNone\fR. |
︙ | ︙ | |||
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | is stored in the target. 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" .PP In some cases it is useful to generate multiple resources from a single configuration value. For example, a color name might be used both to generate the background color for a widget (using \fBTK_CONFIG_COLOR\fR) and to generate a 3-D border to draw around the widget (using \fBTK_CONFIG_BORDER\fR). In cases like this it is possible to specify that several consecutive entries in \fIspecs\fR are to be treated as a group. The first entry is used to determine a value (using its \fIargvName\fR, \fIdbName\fR, \fIdbClass\fR, and \fIdefValue\fR fields). The value will be processed several times (one for each entry in the group), generating multiple different resources and modifying multiple targets within \fIwidgRec\fR. Each of the entries after the first must have a NULL value in its \fIargvName\fR field; this indicates that the entry is to be grouped with the entry that precedes it. Only the \fItype\fR and \fIoffset\fR fields are used from these follow-on entries. .SH "FLAGS" .PP The \fIflags\fR argument passed to \fBTk_ConfigureWidget\fR is used in conjunction with the \fIspecFlags\fR fields in the entries of \fIspecs\fR to provide additional control over the processing of configuration options. These values are used in three different ways as described below. | > > | 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | is stored in the target. 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" .PP In some cases it is useful to generate multiple resources from a single configuration value. For example, a color name might be used both to generate the background color for a widget (using \fBTK_CONFIG_COLOR\fR) and to generate a 3-D border to draw around the widget (using \fBTK_CONFIG_BORDER\fR). In cases like this it is possible to specify that several consecutive entries in \fIspecs\fR are to be treated as a group. The first entry is used to determine a value (using its \fIargvName\fR, \fIdbName\fR, \fIdbClass\fR, and \fIdefValue\fR fields). The value will be processed several times (one for each entry in the group), generating multiple different resources and modifying multiple targets within \fIwidgRec\fR. Each of the entries after the first must have a NULL value in its \fIargvName\fR field; this indicates that the entry is to be grouped with the entry that precedes it. Only the \fItype\fR and \fIoffset\fR fields are used from these follow-on entries. .SH "FLAGS" .PP The \fIflags\fR argument passed to \fBTk_ConfigureWidget\fR is used in conjunction with the \fIspecFlags\fR fields in the entries of \fIspecs\fR to provide additional control over the processing of configuration options. These values are used in three different ways as described below. |
︙ | ︙ | |||
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | 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 monochrome and color displays. This is done by creating two entries in \fIspecs\fR that are identical except for their \fIdefValue\fR and \fIspecFlags\fR fields. One entry should have the value \fBTK_CONFIG_MONO_ONLY\fR in its \fIspecFlags\fR and the | > > | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | 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 .VS 8.5 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. .VE 8.5 .PP The \fBTK_CONFIG_MONO_ONLY\fR and \fBTK_CONFIG_COLOR_ONLY\fR flags are typically used to specify different default values for monochrome and color displays. This is done by creating two entries in \fIspecs\fR that are identical except for their \fIdefValue\fR and \fIspecFlags\fR fields. One entry should have the value \fBTK_CONFIG_MONO_ONLY\fR in its \fIspecFlags\fR and the |
︙ | ︙ | |||
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | for N different widget types, then N of the high-order bits will be used. Each \fIspecs\fR entry will have one of more of those bits set in its \fIspecFlags\fR field to indicate the widget types for which this entry is valid. When calling \fBTk_ConfigureWidget\fR, \fIflags\fR will have a single one of these bits set to select the entries for the desired widget type. For a working example of this feature, see the code in tkButton.c. .SH TK_CONFIGUREINFO .PP The \fBTk_ConfigureInfo\fR procedure may be used to obtain information about one or all of the options for a given widget. Given a token for a window (\fItkwin\fR), a table describing the configuration options for a class of widgets (\fIspecs\fR), a pointer to a widget record containing the current information for a widget (\fIwidgRec\fR), and a NULL \fIargvName\fR argument, \fBTk_ConfigureInfo\fR generates a string describing all of the configuration options for the window. The string is placed | > > > > > > > > > | | | | > | | > > | | | | | | | | | | | | | | | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | for N different widget types, then N of the high-order bits will be used. Each \fIspecs\fR entry will have one of more of those bits set in its \fIspecFlags\fR field to indicate the widget types for which this entry is valid. When calling \fBTk_ConfigureWidget\fR, \fIflags\fR will have a single one of these bits set to select the entries for the desired widget type. For a working example of this feature, see the code in tkButton.c. .SH TK_OFFSET .PP The \fBTk_Offset\fR macro is provided as a safe way of generating the \fIoffset\fR values for entries in Tk_ConfigSpec structures. It takes two arguments: the name of a type of record, and the name of a field in that record. It returns the byte offset of the named field in records of the given type. .SH TK_CONFIGUREINFO .PP The \fBTk_ConfigureInfo\fR procedure may be used to obtain information about one or all of the options for a given widget. Given a token for a window (\fItkwin\fR), a table describing the configuration options for a class of widgets (\fIspecs\fR), a pointer to a widget record containing the current information for a widget (\fIwidgRec\fR), and a NULL \fIargvName\fR argument, \fBTk_ConfigureInfo\fR generates a string describing all of the configuration options for the window. The string is placed in \fIinterp->result\fR. Under normal circumstances it returns \fBTCL_OK\fR; if an error occurs then it returns \fBTCL_ERROR\fR and \fIinterp->result\fR contains an error message. .PP If \fIargvName\fR is NULL, then the value left in \fIinterp->result\fR by \fBTk_ConfigureInfo\fR consists of a list of one or more entries, each of which describes one configuration option (i.e. one entry in \fIspecs\fR). Each entry in the list will contain either two or five values. If the corresponding entry in \fIspecs\fR has type \fBTK_CONFIG_SYNONYM\fR, then the list will contain two values: the \fIargvName\fR for the entry and the \fIdbName\fR (synonym name). Otherwise the list will contain five values: \fIargvName\fR, \fIdbName\fR, \fIdbClass\fR, \fIdefValue\fR, and current value. The current value is computed from the appropriate field of \fIwidgRec\fR by calling procedures like \fBTk_NameOfColor\fR. .PP If the \fIargvName\fR argument to \fBTk_ConfigureInfo\fR is non-NULL, then it indicates a single option, and information is returned only for that option. The string placed in \fIinterp->result\fR will be a list containing two or five values as described above; this will be identical to the corresponding sublist that would have been returned if \fIargvName\fR had been NULL. .PP The \fIflags\fR argument to \fBTk_ConfigureInfo\fR is used to restrict the \fIspecs\fR entries to consider, just as for \fBTk_ConfigureWidget\fR. .SH TK_CONFIGUREVALUE .PP \fBTk_ConfigureValue\fR takes arguments similar to \fBTk_ConfigureInfo\fR; instead of returning a list of values, it just returns the current value of the option given by \fIargvName\fR (\fIargvName\fR must not be NULL). The value is returned in \fIinterp->result\fR and \fBTCL_OK\fR is normally returned as the procedure's result. If an error occurs in \fBTk_ConfigureValue\fR (e.g., \fIargvName\fR is not a valid option name), \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp->result\fR. This procedure is typically called to implement \fBcget\fR widget commands. .SH TK_FREEOPTIONS .PP The \fBTk_FreeOptions\fR procedure may be invoked during widget cleanup to release all of the resources associated with configuration options. It scans through \fIspecs\fR and for each entry corresponding to a resource that must be explicitly freed (e.g. those with type \fBTK_CONFIG_COLOR\fR), it frees the resource in the widget record. If the field in the widget record does not refer to a resource (e.g. it contains a null pointer) then no resource is freed for that entry. After freeing a resource, \fBTk_FreeOptions\fR sets the corresponding field of the widget record to null. .SH "CUSTOM OPTION TYPES" .PP 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 { Tk_OptionParseProc *\fIparseProc\fR; Tk_OptionPrintProc *\fIprintProc\fR; ClientData \fIclientData\fR; } Tk_CustomOption; typedef int Tk_OptionParseProc( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, Tk_Window \fItkwin\fR, char *\fIvalue\fR, char *\fIwidgRec\fR, int \fIoffset\fR); typedef char *Tk_OptionPrintProc( ClientData \fIclientData\fR, Tk_Window \fItkwin\fR, char *\fIwidgRec\fR, int \fIoffset\fR, Tcl_FreeProc **\fIfreeProcPtr\fR); .CE The Tk_CustomOption structure contains three fields, which are pointers to the two procedures and a \fIclientData\fR value to be passed to those procedures when they are invoked. The \fIclientData\fR value typically points to a structure containing information that is needed by the procedures when they are parsing and printing options. .PP |
︙ | ︙ | |||
578 579 580 581 582 583 584 | record to modify. The last argument, \fIoffset\fR, gives the offset in bytes from the start of the widget record to the location where the option value is to be placed. The procedure should translate the string to whatever form is appropriate for the option and store the value in the widget record. It should normally return \fBTCL_OK\fR, but if an error occurs in translating the string to a value then it should return \fBTCL_ERROR\fR | | | 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | record to modify. The last argument, \fIoffset\fR, gives the offset in bytes from the start of the widget record to the location where the option value is to be placed. The procedure should translate the string to whatever form is appropriate for the option and store the value in the widget record. It should normally return \fBTCL_OK\fR, but if an error occurs in translating the string to a value then it should return \fBTCL_ERROR\fR and store an error message in \fIinterp->result\fR. .PP The \fIprintProc\fR procedure is called by \fBTk_ConfigureInfo\fR to produce a string value describing an existing option. Its \fIclientData\fR, \fItkwin\fR, \fIwidgRec\fR, and \fIoffset\fR arguments all have the same meaning as for Tk_OptionParseProc procedures. |
︙ | ︙ | |||
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 | need not do anything with the \fIfreeProcPtr\fR argument. .PP Once \fIparseProc\fR and \fIprintProc\fR have been defined and a Tk_CustomOption structure has been created for them, options of this new type may be manipulated with Tk_ConfigSpec entries whose \fItype\fR fields are \fBTK_CONFIG_CUSTOM\fR and whose \fIcustomPtr\fR fields point to the Tk_CustomOption structure. .SH EXAMPLES .PP Although the explanation of \fBTk_ConfigureWidget\fR is fairly complicated, its actual use is pretty straightforward. The easiest way to get started is to copy the code from an existing widget. The library implementation of frames (tkFrame.c) has a simple configuration table, and the library implementation of buttons (tkButton.c) has a much more complex table that uses many of the fancy \fIspecFlags\fR mechanisms. .SH "SEE ALSO" Tk_SetOptions(3) .SH KEYWORDS anchor, bitmap, boolean, border, cap style, color, configuration options, cursor, custom, double, font, integer, join style, justify, millimeters, pixels, relief, synonym, uid | > > > | 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | need not do anything with the \fIfreeProcPtr\fR argument. .PP Once \fIparseProc\fR and \fIprintProc\fR have been defined and a Tk_CustomOption structure has been created for them, options of this new type may be manipulated with Tk_ConfigSpec entries whose \fItype\fR fields are \fBTK_CONFIG_CUSTOM\fR and whose \fIcustomPtr\fR fields point to the Tk_CustomOption structure. .SH EXAMPLES .PP Although the explanation of \fBTk_ConfigureWidget\fR is fairly complicated, its actual use is pretty straightforward. The easiest way to get started is to copy the code from an existing widget. The library implementation of frames (tkFrame.c) has a simple configuration table, and the library implementation of buttons (tkButton.c) has a much more complex table that uses many of the fancy \fIspecFlags\fR mechanisms. .SH "SEE ALSO" Tk_SetOptions(3) .SH KEYWORDS anchor, bitmap, boolean, border, cap style, color, configuration options, cursor, custom, double, font, integer, join style, justify, millimeters, pixels, relief, synonym, uid |
Changes to doc/ConfigWind.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1993 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990-1993 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_ConfigureWindow 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_ConfigureWindow, Tk_MoveWindow, Tk_ResizeWindow, Tk_MoveResizeWindow, Tk_SetWindowBorderWidth, Tk_ChangeWindowAttributes, Tk_SetWindowBackground, Tk_SetWindowBackgroundPixmap, Tk_SetWindowBorder, Tk_SetWindowBorderPixmap, Tk_SetWindowColormap, Tk_DefineCursor, Tk_UndefineCursor \- change window configuration or attributes .SH SYNOPSIS .nf |
︙ | ︙ |
Changes to doc/CoordToWin.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1993 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. | | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | '\" '\" Copyright (c) 1990-1993 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_CoordsToWindow 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CoordsToWindow \- Find window containing a point .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp Tk_Window \fBTk_CoordsToWindow\fR(\fIrootX, rootY, tkwin\fR) .SH ARGUMENTS .AS Tk_Window tkwin .AP int rootX in X-coordinate (in root window coordinates). .AP int rootY in Y-coordinate (in root window coordinates). .AP Tk_Window tkwin in Token for window that identifies application. .BE .SH DESCRIPTION .PP \fBTk_CoordsToWindow\fR locates the window that contains a given point. The point is specified in root coordinates with \fIrootX\fR and \fIrootY\fR (if a virtual-root window manager is in use then \fIrootX\fR and \fIrootY\fR are in the coordinate system of the virtual root window). The return value from the procedure is a token for the window that contains the given point. If the point is not in any window, or if the containing window is not in the same application as \fItkwin\fR, then NULL is returned. .PP The containing window is decided using the same rules that determine which window contains the mouse cursor: if a parent and a child both contain the point then the child gets preference, and if two siblings both contain the point then the highest one in the stacking order (i.e. the one that's visible on the screen) gets preference. .SH KEYWORDS containing, coordinates, root window |
Changes to doc/CrtCmHdlr.3.
1 2 3 4 5 | '\" '\" Copyright (c) 2000 Ajuba Solutions. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | > > | | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | '\" '\" Copyright (c) 2000 Ajuba Solutions. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_CreateClientMessageHandler 3 "8.4" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateClientMessageHandler, Tk_DeleteClientMessageHandler \- associate procedure callback with ClientMessage type X events .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp \fBTk_CreateClientMessageHandler\fR(\fIproc\fR) .sp \fBTk_DeleteClientMessageHandler\fR(\fIproc\fR) .SH ARGUMENTS .AP Tk_ClientMessageProc *proc in Procedure to invoke whenever a ClientMessage X event occurs on any display. .BE .SH DESCRIPTION .PP \fBTk_CreateClientMessageHandler\fR arranges for \fIproc\fR to be invoked in the future whenever a ClientMessage X event occurs that is not handled by \fBWM_PROTOCOL\fR. \fBTk_CreateClientMessageHandler\fR is intended for use by applications which need to watch X ClientMessage events, such as drag and drop applications. .PP The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR; this mechanism only works in programs that dispatch events through \fBTk_HandleEvent\fR (or through other Tk procedures that call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or \fBTk_MainLoop\fR). .PP \fIProc\fR should have arguments and result that match the type \fBTk_ClientMessageProc\fR: .CS typedef int Tk_ClientMessageProc( Tk_Window \fItkwin\fR, XEvent *\fIeventPtr\fR); .CE The \fItkwin\fR parameter to \fIproc\fR is the Tk window which is associated with this event. \fIEventPtr\fR is a pointer to the X event. .PP Whenever an X ClientMessage event is processed by \fBTk_HandleEvent\fR, the \fIproc\fR is called if it was not handled as a \fBWM_PROTOCOL\fR. The return value from \fIproc\fR is normally 0. A non-zero return value indicates that the event is not to be handled further; that is, \fIproc\fR has done all processing that is to be allowed for the event. .PP If there are multiple ClientMessage event handlers, each one is called for each event, in the order in which they were established. .PP \fBTk_DeleteClientMessageHandler\fR may be called to delete a previously-created ClientMessage event handler: it deletes each handler it finds that matches the \fIproc\fR argument. If no such handler exists, then \fBTk_DeleteClientMessageHandler\fR returns without doing anything. Although Tk supports it, it's probably a bad idea to have more than one callback with the same \fIproc\fR argument. .SH KEYWORDS bind, callback, event, handler |
Changes to doc/CrtConsoleChan.3.
1 2 3 4 5 | '\" '\" Copyright (c) 2007 ActiveState Software Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | '\" '\" Copyright (c) 2007 ActiveState Software Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_InitConsoleChannels 3 8.5 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_InitConsoleChannels \- Install the console channels as standard channels .SH SYNOPSIS .nf |
︙ | ︙ |
Changes to doc/CrtErrHdlr.3.
1 2 3 4 5 6 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" 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_CreateErrorHandler 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateErrorHandler, Tk_DeleteErrorHandler \- handle X protocol errors .SH SYNOPSIS .nf |
︙ | ︙ | |||
68 69 70 71 72 73 74 | .IP [5] The protocol request to which the error pertains must have been made when the handler was active (see below for more information). .PP \fIProc\fR should have arguments and result that match the following type: .CS | | | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | .IP [5] The protocol request to which the error pertains must have been made when the handler was active (see below for more information). .PP \fIProc\fR should have arguments and result that match the following type: .CS typedef int Tk_ErrorProc( ClientData \fIclientData\fR, XErrorEvent *\fIerrEventPtr\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTcl_CreateErrorHandler\fR when the callback was created. Typically, \fIclientData\fR points to a data structure containing application-specific information that is needed to deal with the error. \fIErrEventPtr\fR is a pointer to the X error event. |
︙ | ︙ | |||
132 133 134 135 136 137 138 139 140 | it requires communication to and from the X server. After the \fBXSync\fR call Tk is guaranteed not to call any error handlers deleted before the \fBXSync\fR call. .PP For the Tk error handling mechanism to work properly, it is essential that application code never calls \fBXSetErrorHandler\fR directly; applications should use only \fBTk_CreateErrorHandler\fR. .SH KEYWORDS callback, error, event, handler | > | 132 133 134 135 136 137 138 139 140 141 | it requires communication to and from the X server. After the \fBXSync\fR call Tk is guaranteed not to call any error handlers deleted before the \fBXSync\fR call. .PP For the Tk error handling mechanism to work properly, it is essential that application code never calls \fBXSetErrorHandler\fR directly; applications should use only \fBTk_CreateErrorHandler\fR. .SH KEYWORDS callback, error, event, handler |
Changes to doc/CrtGenHdlr.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1992-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | > | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | '\" '\" Copyright (c) 1992-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_CreateGenericHandler 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateGenericHandler, Tk_DeleteGenericHandler \- associate procedure callback with all X events .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp \fBTk_CreateGenericHandler\fR(\fIproc, clientData\fR) .sp \fBTk_DeleteGenericHandler\fR(\fIproc, clientData\fR) .SH ARGUMENTS .AS "Tk_GenericProc" clientData .AP Tk_GenericProc *proc in Procedure to invoke whenever any X event occurs on any display. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE .SH DESCRIPTION .PP \fBTk_CreateGenericHandler\fR arranges for \fIproc\fR to be invoked in the future whenever any X event occurs. This mechanism is \fInot\fR intended for dispatching X events on windows managed by Tk (you should use \fBTk_CreateEventHandler\fR for this purpose). \fBTk_CreateGenericHandler\fR is intended for other purposes, such as tracing X events, monitoring events on windows not owned by Tk, accessing X-related libraries that were not originally designed for use with Tk, and so on. .PP The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR; this mechanism only works in programs that dispatch events through \fBTk_HandleEvent\fR (or through other Tk procedures that call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or \fBTk_MainLoop\fR). .PP \fIProc\fR should have arguments and result that match the type \fBTk_GenericProc\fR: .CS typedef int Tk_GenericProc( ClientData \fIclientData\fR, XEvent *\fIeventPtr\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTk_CreateGenericHandler\fR when the callback was created. Typically, \fIclientData\fR points to a data structure containing application-specific information about how to handle events. \fIEventPtr\fR is a pointer to the X event. |
︙ | ︙ |
Changes to doc/CrtImgType.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1997 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | | | | | < > | | | > > < | | | | | | | | | | | | > | | | | | > | | | | | | | | | | > | | | > | | | | > | | | | > < | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1997 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_CreateImageType 3 8.5 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateImageType, Tk_GetImageMasterData, Tk_InitImageArgs \- define new kind of image .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp \fBTk_CreateImageType\fR(\fItypePtr\fR) .sp ClientData \fBTk_GetImageMasterData\fR(\fIinterp, name, typePtrPtr\fR) .sp \fBTk_InitImageArgs\fR(\fIinterp, argc, argvPtr\fR) .SH ARGUMENTS .AS Tk_ImageType *typePtrPtr .AP Tk_ImageType *typePtr in Structure that defines the new type of image. Must be static: a pointer to this structure is retained by the image code. .AP Tcl_Interp *interp in Interpreter in which image was created. .AP "const char" *name in 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 .SH DESCRIPTION .PP \fBTk_CreateImageType\fR is invoked to define a new kind of image. An image type corresponds to a particular value of the \fItype\fR argument for the \fBimage create\fR command. There may exist any number of different image types, and new types may be defined dynamically by calling \fBTk_CreateImageType\fR. For example, there might be one type for 2-color bitmaps, another for multi-color images, another for dithered images, another for video, and so on. .PP The code that implements a new image type is called an \fIimage manager\fR. It consists of a collection of procedures plus three different kinds of data structures. 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 { char *\fIname\fR; Tk_ImageCreateProc *\fIcreateProc\fR; Tk_ImageGetProc *\fIgetProc\fR; Tk_ImageDisplayProc *\fIdisplayProc\fR; Tk_ImageFreeProc *\fIfreeProc\fR; Tk_ImageDeleteProc *\fIdeleteProc\fR; } Tk_ImageType; .CE The fields of this structure will be described in later subsections of this entry. .PP The second major data structure manipulated by an image manager is called an \fIimage master\fR; it contains overall information about a particular image, such as the values of the configuration options specified in an \fBimage create\fR command. There will usually be one of these structures for each invocation of the \fBimage create\fR command. .PP The third data structure related to images is an \fIimage instance\fR. There will usually be one of these structures for each usage of an image in a particular widget. It is possible for a single image to appear simultaneously in multiple widgets, or even multiple times in the same widget. Furthermore, different instances may be on different screens or displays. The image instance data structure describes things that may vary from instance to instance, such as colors and graphics contexts for redisplay. There is usually one instance structure for each \fB\-image\fR option specified for a widget or canvas item. .PP The following subsections describe the fields of a Tk_ImageType in more detail. .SS NAME .PP \fItypePtr->name\fR provides a name for the image type. Once \fBTk_CreateImageType\fR returns, this name may be used in \fBimage create\fR commands to create images of the new type. If there already existed an image type by this name then the new image type replaces the old one. .SS CREATEPROC \fItypePtr->createProc\fR provides the address of a procedure for Tk to call whenever \fBimage create\fR is invoked to create an image of the new type. \fItypePtr->createProc\fR must match the following prototype: .CS typedef int Tk_ImageCreateProc( Tcl_Interp *\fIinterp\fR, char *\fIname\fR, int \fIobjc\fR, Tcl_Obj *const \fIobjv\fR[], Tk_ImageType *\fItypePtr\fR, Tk_ImageMaster \fImaster\fR, ClientData *\fImasterDataPtr\fR); .CE The \fIinterp\fR argument is the interpreter in which the \fBimage\fR command was invoked, and \fIname\fR is the name for the new image, which was either specified explicitly in the \fBimage\fR command or generated automatically by the \fBimage\fR command. The \fIobjc\fR and \fIobjv\fR arguments describe all the configuration options for the new image (everything after the name argument to \fBimage\fR). The \fImaster\fR argument is a token that refers to Tk's information about this image; the image manager must return this token to Tk when invoking the \fBTk_ImageChanged\fR procedure. Typically \fIcreateProc\fR will parse \fIobjc\fR and \fIobjv\fR and create an image master data structure for the new image. \fIcreateProc\fR may store an arbitrary one-word value at *\fImasterDataPtr\fR, which will be passed back to the image manager when other callbacks are invoked. Typically the value is a pointer to the master data structure for the image. .PP If \fIcreateProc\fR encounters an error, it should leave an error message in the interpreter result and return \fBTCL_ERROR\fR; otherwise it should return \fBTCL_OK\fR. .PP \fIcreateProc\fR should call \fBTk_ImageChanged\fR in order to set the size of the image and request an initial redisplay. .SS GETPROC .PP \fItypePtr->getProc\fR is invoked by Tk whenever a widget calls \fBTk_GetImage\fR to use a particular image. This procedure must match the following prototype: .CS typedef ClientData Tk_ImageGetProc( Tk_Window \fItkwin\fR, ClientData \fImasterData\fR); .CE The \fItkwin\fR argument identifies the window in which the image will be used and \fImasterData\fR is the value returned by \fIcreateProc\fR when the image master was created. \fIgetProc\fR will usually create a data structure for the new instance, including such things as the resources needed to display the image in the given window. \fIgetProc\fR returns a one-word token for the instance, which is typically the address of the instance data structure. Tk will pass this value back to the image manager when invoking its \fIdisplayProc\fR and \fIfreeProc\fR procedures. .SS DISPLAYPROC .PP \fItypePtr->displayProc\fR is invoked by Tk whenever an image needs to be displayed (i.e., whenever a widget calls \fBTk_RedrawImage\fR). \fIdisplayProc\fR must match the following prototype: .CS typedef void Tk_ImageDisplayProc( ClientData \fIinstanceData\fR, Display *\fIdisplay\fR, Drawable \fIdrawable\fR, int \fIimageX\fR, int \fIimageY\fR, int \fIwidth\fR, int \fIheight\fR, int \fIdrawableX\fR, int \fIdrawableY\fR); .CE The \fIinstanceData\fR will be the same as the value returned by \fIgetProc\fR when the instance was created. \fIdisplay\fR and \fIdrawable\fR indicate where to display the image; \fIdrawable\fR may be a pixmap rather than the window specified to \fIgetProc\fR (this is usually the case, since most widgets double-buffer their redisplay to get smoother visual effects). \fIimageX\fR, \fIimageY\fR, \fIwidth\fR, and \fIheight\fR identify the region of the image that must be redisplayed. This region will always be within the size of the image as specified in the most recent call to \fBTk_ImageChanged\fR. \fIdrawableX\fR and \fIdrawableY\fR indicate where in \fIdrawable\fR the image should be displayed; \fIdisplayProc\fR should display the given region of the image so that point (\fIimageX\fR, \fIimageY\fR) in the image appears at (\fIdrawableX\fR, \fIdrawableY\fR) in \fIdrawable\fR. .SS FREEPROC .PP \fItypePtr->freeProc\fR contains the address of a procedure that Tk will invoke when an image instance is released (i.e., when \fBTk_FreeImage\fR is invoked). This can happen, for example, when a widget is deleted or a image item in a canvas is deleted, or when the image displayed in a widget or canvas item is changed. \fIfreeProc\fR must match the following prototype: .CS typedef void Tk_ImageFreeProc( ClientData \fIinstanceData\fR, Display *\fIdisplay\fR); .CE The \fIinstanceData\fR will be the same as the value returned by \fIgetProc\fR when the instance was created, and \fIdisplay\fR is the display containing the window for the instance. \fIfreeProc\fR should release any resources associated with the image instance, since the instance will never be used again. .SS DELETEPROC .PP \fItypePtr->deleteProc\fR is a procedure that Tk invokes when an image is being deleted (i.e. when the \fBimage delete\fR command is invoked). Before invoking \fIdeleteProc\fR Tk will invoke \fIfreeProc\fR for each of the image's instances. \fIdeleteProc\fR must match the following prototype: .CS typedef void Tk_ImageDeleteProc( ClientData \fImasterData\fR); .CE The \fImasterData\fR argument will be the same as the value stored in \fI*masterDataPtr\fR by \fIcreateProc\fR when the image was created. \fIdeleteProc\fR should release any resources associated with the image. .SH TK_GETIMAGEMASTERDATA .PP The procedure \fBTk_GetImageMasterData\fR may be invoked to retrieve information about an image. For example, an image manager can use this procedure to locate its image master data for an image. If there exists an image named \fIname\fR in the interpreter given by \fIinterp\fR, then \fI*typePtrPtr\fR is filled in with type information for the image (the \fItypePtr\fR value passed to \fBTk_CreateImageType\fR when the image type was registered) 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 master data structure). If no such image exists then NULL is returned and NULL is stored at \fI*typePtrPtr\fR. .SH "LEGACY INTERFACE SUPPORT" In Tk 8.2 and earlier, the definition of \fBTk_ImageCreateProc\fR was incompatibly different, with the following prototype: .CS typedef int Tk_ImageCreateProc( Tcl_Interp *\fIinterp\fR, char *\fIname\fR, int \fIargc\fR, char **\fIargv\fR, Tk_ImageType *\fItypePtr\fR, Tk_ImageMaster \fImaster\fR, ClientData *\fImasterDataPtr\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 |
︙ | ︙ | |||
273 274 275 276 277 278 279 280 281 282 | 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 | > > | | 279 280 281 282 283 284 285 286 287 288 289 290 291 | 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 image manager, image type, instance, master |
Changes to doc/CrtItemType.3.
1 2 3 4 5 | '\" '\" Copyright (c) 1994-1995 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | '\" '\" Copyright (c) 1994-1995 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_CreateItemType 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateItemType, Tk_GetItemTypes \- define new kind of canvas item .SH SYNOPSIS .nf |
︙ | ︙ | |||
40 41 42 43 44 45 46 | of all item types currently defined for canvases. The entries in the list are linked together through their \fInextPtr\fR fields, with the end of the list marked by a NULL \fInextPtr\fR. .PP You may find it easier to understand the rest of this manual entry by looking at the code for an existing canvas item type such as | | < | | | < < < | | | < | < | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | < | | | | | | < | < < < | < < | | | | | | < | | | | | | | < | | | < < < | < < | | | | | < | | | | | | < < < < < < | | < | | | | < | | | < | | | | | | | | | < | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | of all item types currently defined for canvases. The entries in the list are linked together through their \fInextPtr\fR fields, with the end of the list marked by a NULL \fInextPtr\fR. .PP You may find it easier to understand the rest of this manual entry by looking at the code for an existing canvas item type such as bitmap (file tkCanvBmap.c) or text (tkCanvText.c). The easiest way to create a new type manager is to copy the code for an existing type and modify it for the new type. .PP Tk provides a number of utility procedures for the use of canvas type managers, such as \fBTk_CanvasCoords\fR and \fBTk_CanvasPsColor\fR; these are described in separate manual entries. .SH "DATA STRUCTURES" .PP A type manager consists of a collection of procedures that provide a standard set of operations on items of that type. The type manager deals with three kinds of data structures. The first data structure is a Tk_ItemType; it contains information such as the name of the type and pointers to the standard procedures implemented by the type manager: .CS typedef struct Tk_ItemType { char *\fIname\fR; int \fIitemSize\fR; Tk_ItemCreateProc *\fIcreateProc\fR; Tk_ConfigSpec *\fIconfigSpecs\fR; Tk_ItemConfigureProc *\fIconfigProc\fR; Tk_ItemCoordProc *\fIcoordProc\fR; Tk_ItemDeleteProc *\fIdeleteProc\fR; Tk_ItemDisplayProc *\fIdisplayProc\fR; int \fIalwaysRedraw\fR; Tk_ItemPointProc *\fIpointProc\fR; Tk_ItemAreaProc *\fIareaProc\fR; Tk_ItemPostscriptProc *\fIpostscriptProc\fR; Tk_ItemScaleProc *\fIscaleProc\fR; Tk_ItemTranslateProc *\fItranslateProc\fR; Tk_ItemIndexProc *\fIindexProc\fR; Tk_ItemCursorProc *\fIicursorProc\fR; Tk_ItemSelectionProc *\fIselectionProc\fR; Tk_ItemInsertProc *\fIinsertProc\fR; Tk_ItemDCharsProc *\fIdCharsProc\fR; Tk_ItemType *\fInextPtr\fR; } Tk_ItemType; .CE .PP The fields of a Tk_ItemType structure are described in more detail later in this manual entry. When \fBTk_CreateItemType\fR is called, its \fItypePtr\fR argument must point to a structure with all of the fields initialized except \fInextPtr\fR, which Tk sets to link all the types together into a list. The structure must be in permanent memory (either statically allocated or dynamically allocated but never freed); Tk retains a pointer to this structure. .PP The second data structure manipulated by a type manager is an \fIitem record\fR. For each item in a canvas there exists one item record. All of the items of a given type generally have item records with the same structure, but different types usually have different formats for their item records. The first part of each item record is a header with a standard structure defined by Tk via the type Tk_Item; the rest of the item record is defined by the type manager. A type manager must define its item records with a Tk_Item as the first field. For example, the item record for bitmap items is defined as follows: .CS typedef struct BitmapItem { Tk_Item \fIheader\fR; double \fIx\fR, \fIy\fR; Tk_Anchor \fIanchor\fR; Pixmap \fIbitmap\fR; XColor *\fIfgColor\fR; XColor *\fIbgColor\fR; GC \fIgc\fR; } BitmapItem; .CE The \fIheader\fR substructure contains information used by Tk to manage the item, such as its identifier, its tags, its type, and its bounding box. The fields starting with \fIx\fR belong to the type manager: Tk will never read or write them. The type manager should not need to read or write any of the fields in the header except for four fields whose names are \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR. These fields give a bounding box for the items using integer canvas coordinates: the item should not cover any pixels with x-coordinate lower than \fIx1\fR or y-coordinate lower than \fIy1\fR, nor should it cover any pixels with x-coordinate greater than or equal to \fIx2\fR or y-coordinate greater than or equal to \fIy2\fR. It is up to the type manager to keep the bounding box up to date as the item is moved and reconfigured. .PP Whenever Tk calls a procedure in a type manager it passes in a pointer to an item record. The argument is always passed as a pointer to a Tk_Item; the type manager will typically cast this into a pointer to its own specific type, such as BitmapItem. .PP The third data structure used by type managers has type Tk_Canvas; it serves as an opaque handle for the canvas widget as a whole. Type managers need not know anything about the contents of this structure. A Tk_Canvas handle is typically passed in to the procedures of a type manager, and the type manager can pass the handle back to library procedures such as Tk_CanvasTkwin to fetch information about the canvas. .SS NAME .PP This section and the ones that follow describe each of the fields in a Tk_ItemType structure in detail. The \fIname\fR field provides a string name for the item type. Once \fBTk_CreateImageType\fR returns, this name may be used in \fBcreate\fR widget commands to create items of the new type. If there already existed an item type by this name then the new item type replaces the old one. .SS ITEMSIZE \fItypePtr->itemSize\fR gives the size in bytes of item records of this type, including the Tk_Item header. Tk uses this size to allocate memory space for items of the type. All of the item records for a given type must have the same size. If variable length fields are needed for an item (such as a list of points for a polygon), the type manager can allocate a separate object of variable length and keep a pointer to it in the item record. .SS CREATEPROC .PP \fItypePtr->createProc\fR points to a procedure for Tk to call whenever a new item of this type is created. \fItypePtr->createProc\fR must match the following prototype: .CS typedef int Tk_ItemCreateProc( Tcl_Interp *\fIinterp\fR, Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIobjc\fR, Tcl_Obj* const \fIobjv\fR[]); .CE The \fIinterp\fR argument is the interpreter in which the canvas's \fBcreate\fR widget command was invoked, and \fIcanvas\fR is a handle for the canvas widget. \fIitemPtr\fR is a pointer to a newly-allocated item of size \fItypePtr->itemSize\fR. Tk has already initialized the item's header (the first \fBsizeof(Tk_ItemType)\fR bytes). The \fIobjc\fR and \fIobjv\fR arguments describe all of the arguments to the \fBcreate\fR command after the \fItype\fR argument. For example, in the widget command .CS \fB\&.c create rectangle 10 20 50 50 \-fill black\fR .CE \fIobjc\fR will be \fB6\fR and \fIobjv\fR[0] will contain the integer object \fB10\fR. .PP \fIcreateProc\fR should use \fIobjc\fR and \fIobjv\fR to initialize the type-specific parts of the item record and set an initial value for the bounding box in the item's header. It should return a standard Tcl completion code and leave an error message in \fIinterp->result\fR if an error occurs. If an error occurs Tk will free the item record, so \fIcreateProc\fR must be sure to leave the item record in a clean state if it returns an error (e.g., it must free any additional memory that it allocated for the item). .SS CONFIGSPECS .PP Each type manager must provide a standard table describing its configuration options, in a form suitable for use with \fBTk_ConfigureWidget\fR. This table will normally be used by \fItypePtr->createProc\fR and \fItypePtr->configProc\fR, but Tk also uses it directly 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 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 .PP \fItypePtr->configProc\fR is called by Tk whenever the \fBitemconfigure\fR widget command is invoked to change the configuration options for a canvas item. This procedure must match the following prototype: .CS typedef int Tk_ItemConfigureProc( Tcl_Interp *\fIinterp\fR, Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIobjc\fR, Tcl_Obj* const \fIobjv\fR[], int \fIflags\fR); .CE The \fIinterp\fR objument 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. For example, if the following command is invoked: .CS \fB\&.c itemconfigure 2 \-fill red \-outline black\fR .CE \fIobjc\fR is \fB4\fR and \fIobjv\fR contains the string objects \fB\-fill\fR through \fBblack\fR. \fIobjc\fR will always be an even value. The \fIflags\fR argument contains flags to pass to \fBTk_ConfigureWidget\fR; currently this value is always \fBTK_CONFIG_ARGV_ONLY\fR when Tk invokes \fItypePtr->configProc\fR, but the type manager's \fIcreateProc\fR procedure will usually invoke \fIconfigProc\fR with different flag values. .PP \fItypePtr->configProc\fR returns a standard Tcl completion code and leaves an error message in \fIinterp->result\fR if an error occurs. It must update the item's bounding box to reflect the new configuration options. .SS COORDPROC .PP \fItypePtr->coordProc\fR is invoked by Tk to implement the \fBcoords\fR widget command for an item. It must match the following prototype: .CS typedef int Tk_ItemCoordProc( Tcl_Interp *\fIinterp\fR, Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIobjc\fR, Tcl_Obj* const \fIobjv\fR[]); .CE The arguments \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR all have the standard meanings, and \fIobjc\fR and \fIobjv\fR describe the coordinate arguments. For example, if the following widget command is invoked: .CS \fB\&.c coords 2 30 90\fR .CE \fIobjc\fR will be \fB2\fR and \fBobjv\fR will contain the integer objects \fB30\fR and \fB90\fR. .PP The \fIcoordProc\fR procedure should process the new coordinates, update the item appropriately (e.g., it must reset the bounding box in the item's header), and return a standard Tcl completion code. If an error occurs, \fIcoordProc\fR must leave an error message in \fIinterp->result\fR. .SS DELETEPROC .PP \fItypePtr->deleteProc\fR is invoked by Tk to delete an item and free any resources allocated to it. It must match the following prototype: .CS typedef void Tk_ItemDeleteProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, Display *\fIdisplay\fR); .CE The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual interpretations, and \fIdisplay\fR identifies the X display containing the canvas. \fIdeleteProc\fR must free up any resources allocated for the item, so that Tk can free the item record. \fIdeleteProc\fR should not actually free the item record; this will be done by Tk when \fIdeleteProc\fR returns. .SS "DISPLAYPROC AND ALWAYSREDRAW" .PP \fItypePtr->displayProc\fR is invoked by Tk to redraw an item on the screen. It must match the following prototype: .CS typedef void Tk_ItemDisplayProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, Display *\fIdisplay\fR, Drawable \fIdst\fR, int \fIx\fR, int \fIy\fR, int \fIwidth\fR, int \fIheight\fR); .CE The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual meaning. \fIdisplay\fR identifies the display containing the canvas, and \fIdst\fR specifies a drawable in which the item should be rendered; typically this is an off-screen pixmap, which Tk will copy into the canvas's window once all relevant items have been drawn. \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR specify a rectangular region in canvas coordinates, which is the area to be redrawn; |
︙ | ︙ | |||
397 398 399 400 401 402 403 | will not necessarily be the same as those in the canvas. \fIdisplayProc\fR should call \fBTk_CanvasDrawableCoords\fR to transform coordinates from those of the canvas to those of \fIdst\fR. .PP Normally an item's \fIdisplayProc\fR is only invoked if the item overlaps the area being displayed. | | < < | | > | | | < | | | | < | < | | | | < | | < | | | | | < | | | | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | will not necessarily be the same as those in the canvas. \fIdisplayProc\fR should call \fBTk_CanvasDrawableCoords\fR to transform coordinates from those of the canvas to those of \fIdst\fR. .PP Normally an item's \fIdisplayProc\fR is only invoked if the item overlaps the area being displayed. However, if \fItypePtr->alwaysRedraw\fR has a non-zero value, then \fIdisplayProc\fR is invoked during every redisplay operation, even if the item does not overlap the area of redisplay. \fIalwaysRedraw\fR should normally be set to 0; it is only set to 1 in special cases such as window items that need to be unmapped when they are off-screen. .SS POINTPROC .PP \fItypePtr->pointProc\fR is invoked by Tk to find out how close a given point is to a canvas item. Tk uses this procedure for purposes such as locating the item under the mouse or finding the closest item to a given point. The procedure must match the following prototype: .CS typedef double Tk_ItemPointProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, double *\fIpointPtr\fR); .CE \fIcanvas\fR and \fIitemPtr\fR have the usual meaning. \fIpointPtr\fR points to an array of two numbers giving the x and y coordinates of a point. \fIpointProc\fR must return a real value giving the distance from the point to the item, or 0 if the point lies inside the item. .SS AREAPROC .PP \fItypePtr->areaProc\fR is invoked by Tk to find out the relationship between an item and a rectangular area. It must match the following prototype: .CS typedef int Tk_ItemAreaProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, double *\fIrectPtr\fR); .CE \fIcanvas\fR and \fIitemPtr\fR have the usual meaning. \fIrectPtr\fR points to an array of four real numbers; the first two give the x and y coordinates of the upper left corner of a rectangle, and the second two give the x and y coordinates of the lower right corner. \fIareaProc\fR must return \-1 if the item lies entirely outside the given area, 0 if it lies partially inside and partially outside the area, and 1 if it lies entirely inside the area. .SS POSTSCRIPTPROC .PP \fItypePtr->postscriptProc\fR is invoked by Tk to generate Postscript for an item during the \fBpostscript\fR widget command. If the type manager is not capable of generating Postscript then \fItypePtr->postscriptProc\fR should be NULL. The procedure must match the following prototype: .CS typedef int Tk_ItemPostscriptProc( Tcl_Interp *\fIinterp\fR, Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIprepass\fR); .CE The \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR arguments all have standard meanings; \fIprepass\fR will be described below. If \fIpostscriptProc\fR completes successfully, it should append Postscript for the item to the information in \fIinterp->result\fR (e.g. by calling \fBTcl_AppendResult\fR, not \fBTcl_SetResult\fR) and return \fBTCL_OK\fR. If an error occurs, \fIpostscriptProc\fR should clear the result and replace its contents with an error message; then it should return \fBTCL_ERROR\fR. .PP Tk provides a collection of utility procedures to simplify \fIpostscriptProc\fR. For example, \fBTk_CanvasPsColor\fR will generate Postscript to set the current color to a given Tk color and \fBTk_CanvasPsFont\fR will set up font information. |
︙ | ︙ | |||
491 492 493 494 495 496 497 | upper left) to the space of Postscript (where the origin is at the lower left). .PP In order to generate Postscript that complies with the Adobe Document Structuring Conventions, Tk actually generates Postscript in two passes. It calls each item's \fIpostscriptProc\fR in each pass. The only purpose of the first pass is to collect font information | | | < | < | | | | | | | < < | | < < | < | | | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | < | | | | | | < | < < < | | | | < | | | | < | | | | < | | | | | | < | | | | | | < | | | | | < | < < < < < | | < | | < | | | | | < | | 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | upper left) to the space of Postscript (where the origin is at the lower left). .PP In order to generate Postscript that complies with the Adobe Document Structuring Conventions, Tk actually generates Postscript in two passes. It calls each item's \fIpostscriptProc\fR in each pass. The only purpose of the first pass is to collect font information (which is done by \fBTk_CanvasPsFont\fR); the actual Postscript is discarded. Tk sets the \fIprepass\fR argument to \fIpostscriptProc\fR to 1 during the first pass; the type manager can use \fIprepass\fR to skip all Postscript generation except for calls to \fBTk_CanvasPsFont\fR. During the second pass \fIprepass\fR will be 0, so the type manager must generate complete Postscript. .SS SCALEPROC \fItypePtr->scaleProc\fR is invoked by Tk to rescale a canvas item during the \fBscale\fR widget command. The procedure must match the following prototype: .CS typedef void Tk_ItemScaleProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, double \fIoriginX\fR, double \fIoriginY\fR, double \fIscaleX\fR, double \fIscaleY\fR); .CE The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual meaning. \fIoriginX\fR and \fIoriginY\fR specify an origin relative to which the item is to be scaled, and \fIscaleX\fR and \fIscaleY\fR give the x and y scale factors. The item should adjust its coordinates so that a point in the item that used to have coordinates \fIx\fR and \fIy\fR will have new coordinates \fIx\(fm\fR and \fIy\(fm\fR, where .CS \fIx\(fm = originX + scaleX*(x-originX) y\(fm = originY + scaleY*(y-originY)\fR .CE \fIscaleProc\fR must also update the bounding box in the item's header. .SS TRANSLATEPROC \fItypePtr->translateProc\fR is invoked by Tk to translate a canvas item during the \fBmove\fR widget command. The procedure must match the following prototype: .CS typedef void Tk_ItemTranslateProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, double \fIdeltaX\fR, double \fIdeltaY\fR); .CE The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual meaning, and \fIdeltaX\fR and \fIdeltaY\fR give the amounts that should be added to each x and y coordinate within the item. The type manager should adjust the item's coordinates and update the bounding box in the item's header. .SS INDEXPROC \fItypePtr->indexProc\fR is invoked by Tk to translate a string index specification into a numerical index, for example during the \fBindex\fR widget command. It is only relevant for item types that support indexable text; \fItypePtr->indexProc\fR may be specified as NULL for non-textual item types. The procedure must match the following prototype: .CS typedef int Tk_ItemIndexProc( Tcl_Interp *\fIinterp\fR, Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, char \fIindexString\fR, int *\fIindexPtr\fR); .CE The \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR arguments all have the usual meaning. \fIindexString\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. 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.). \fIindexProc\fR should return a Tcl completion code and set \fIinterp->result\fR in the event of an error. .SS ICURSORPROC .PP \fItypePtr->icursorProc\fR is invoked by Tk during the \fBicursor\fR widget command to set the position of the insertion cursor in a textual item. It is only relevant for item types that support an insertion cursor; \fItypePtr->icursorProc\fR may be specified as NULL for item types that do not support an insertion cursor. The procedure must match the following prototype: .CS typedef void Tk_ItemCursorProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIindex\fR); .CE \fIcanvas\fR and \fIitemPtr\fR have the usual meanings, and \fIindex\fR is an index into the item's text, as returned by a previous call to \fItypePtr->insertProc\fR. The type manager should position the insertion cursor in the item just before the character given by \fIindex\fR. Whether or not to actually display the insertion cursor is determined by other information provided by \fBTk_CanvasGetTextInfo\fR. .SS SELECTIONPROC .PP \fItypePtr->selectionProc\fR is invoked by Tk during selection retrievals; it must return part or all of the selected text in the item (if any). It is only relevant for item types that support text; \fItypePtr->selectionProc\fR may be specified as NULL for non-textual item types. The procedure must match the following prototype: .CS typedef int Tk_ItemSelectionProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIoffset\fR, char *\fIbuffer\fR, int \fImaxBytes\fR); .CE \fIcanvas\fR and \fIitemPtr\fR have the usual meanings. \fIoffset\fR is an offset in bytes into the selection where 0 refers to the first byte of the selection; it identifies the first character that is to be returned in this call. \fIbuffer\fR points to an area of memory in which to store the requested bytes, and \fImaxBytes\fR specifies the maximum number of bytes to return. \fIselectionProc\fR should extract up to \fImaxBytes\fR characters from the selection and copy them to \fImaxBytes\fR; it should return a count of the number of bytes actually copied, which may be less than \fImaxBytes\fR if there are not \fIoffset+maxBytes\fR bytes in the selection. .SS INSERTPROC .PP \fItypePtr->insertProc\fR is invoked by Tk during the \fBinsert\fR widget command to insert new text into a canvas item. It is only relevant for item types that support text; \fItypePtr->insertProc\fR may be specified as NULL for non-textual item types. The procedure must match the following prototype: .CS typedef void Tk_ItemInsertProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIindex\fR, char *\fIstring\fR); .CE \fIcanvas\fR and \fIitemPtr\fR have the usual meanings. \fIindex\fR is an index into the item's text, as returned by a previous call to \fItypePtr->insertProc\fR, and \fIstring\fR contains new text to insert just before the character given by \fIindex\fR. The type manager should insert the text and recompute the bounding box in the item's header. .SS DCHARSPROC .PP \fItypePtr->dCharsProc\fR is invoked by Tk during the \fBdchars\fR widget command to delete a range of text from a canvas item. It is only relevant for item types that support text; \fItypePtr->dCharsProc\fR may be specified as NULL for non-textual item types. The procedure must match the following prototype: .CS typedef void Tk_ItemDCharsProc( Tk_Canvas \fIcanvas\fR, Tk_Item *\fIitemPtr\fR, int \fIfirst\fR, int \fIlast\fR); .CE \fIcanvas\fR and \fIitemPtr\fR have the usual meanings. \fIfirst\fR and \fIlast\fR give the indices of the first and last bytes to be deleted, as returned by previous calls to \fItypePtr->indexProc\fR. The type manager should delete the specified characters and update the bounding box in the item's header. .SH "SEE ALSO" Tk_CanvasPsY, Tk_CanvasTextInfo, Tk_CanvasTkwin .SH KEYWORDS canvas, focus, item type, selection, type manager |
Changes to doc/CrtPhImgFmt.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Australian National University '\" Copyright (c) 1994-1997 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | '\" '\" Copyright (c) 1994 The Australian National University '\" Copyright (c) 1994-1997 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" Author: Paul Mackerras ([email protected]), '\" Department of Computer Science, '\" Australian National University. '\" .TH Tk_CreatePhotoImageFormat 3 8.5 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreatePhotoImageFormat \- define new file format for photo images .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp \fBTk_CreatePhotoImageFormat\fR(\fIformatPtr\fR) .SH ARGUMENTS .AS Tk_PhotoImageFormat *formatPtr .AP Tk_PhotoImageFormat *formatPtr in Structure that defines the new file format. .BE .SH DESCRIPTION .PP \fBTk_CreatePhotoImageFormat\fR is invoked to define a new file format for image data for use with photo images. The code that implements an image file format is called an image file format handler, or handler for short. The photo image code maintains a list of handlers that can be used to read and |
︙ | ︙ | |||
41 42 43 44 45 46 47 | An image file format handler consists of a collection of procedures plus a Tk_PhotoImageFormat structure, which contains the name of the image file format and pointers to six procedures provided by the handler to deal with files and strings in this format. The Tk_PhotoImageFormat structure contains the following fields: .CS typedef struct Tk_PhotoImageFormat { | | | > | > | < | | | | | | | > | < | | | | | | > | < | | | | | | | | | > | < | | | | | | | | > | < | | | | | > | < | | | | > < | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | An image file format handler consists of a collection of procedures plus a Tk_PhotoImageFormat structure, which contains the name of the image file format and pointers to six procedures provided by the handler to deal with files and strings in this format. The Tk_PhotoImageFormat structure contains the following fields: .CS typedef struct Tk_PhotoImageFormat { char *\fIname\fR; Tk_ImageFileMatchProc *\fIfileMatchProc\fR; Tk_ImageStringMatchProc *\fIstringMatchProc\fR; Tk_ImageFileReadProc *\fIfileReadProc\fR; Tk_ImageStringReadProc *\fIstringReadProc\fR; Tk_ImageFileWriteProc *\fIfileWriteProc\fR; Tk_ImageStringWriteProc *\fIstringWriteProc\fR; } Tk_PhotoImageFormat; .CE .PP The handler need not provide implementations of all six procedures. For example, the procedures that handle string data would not be provided for a format in which the image data are stored in binary, and could therefore contain null characters. If any procedure is not implemented, the corresponding pointer in the Tk_PhotoImageFormat structure should be set to NULL. The handler must provide the \fIfileMatchProc\fR procedure if it provides the \fIfileReadProc\fR procedure, and the \fIstringMatchProc\fR procedure if it provides the \fIstringReadProc\fR procedure. .SH NAME .PP \fIformatPtr->name\fR provides a name for the image type. Once \fBTk_CreatePhotoImageFormat\fR returns, this name may be used in the \fB\-format\fR photo image configuration and subcommand option. The manual page for the photo image (photo(n)) describes how image file formats are chosen based on their names and the value given to the \fB\-format\fR option. The first character of \fIformatPtr->name\fR must not be an uppercase character from the ASCII character set (that is, one of the characters \fBA\fR-\fBZ\fR). Such names are used only for legacy interface support (see below). .SH FILEMATCHPROC \fIformatPtr->fileMatchProc\fR provides the address of a procedure for Tk to call when it is searching for an image file format handler suitable for reading data in a given file. \fIformatPtr->fileMatchProc\fR must match the following prototype: .CS typedef int Tk_ImageFileMatchProc( Tcl_Channel \fIchan\fR, const char *\fIfileName\fR, Tcl_Obj *\fIformat\fR, int *\fIwidthPtr\fR, int *\fIheightPtr\fR, Tcl_Interp *\fIinterp\fR); .CE The \fIfileName\fR argument is the name of the file containing the image data, which is open for reading as \fIchan\fR. The \fIformat\fR argument contains the value given for the \fB\-format\fR option, or NULL if the option was not specified. If the data in the file appears to be in the format supported by this handler, the \fIformatPtr->fileMatchProc\fR procedure should store the width and height of the image in *\fIwidthPtr\fR and *\fIheightPtr\fR respectively, and return 1. Otherwise it should return 0. .SH STRINGMATCHPROC \fIformatPtr->stringMatchProc\fR provides the address of a procedure for Tk to call when it is searching for an image file format handler for suitable for reading data from a given string. \fIformatPtr->stringMatchProc\fR must match the following prototype: .CS typedef int Tk_ImageStringMatchProc( Tcl_Obj *\fIdata\fR, Tcl_Obj *\fIformat\fR, int *\fIwidthPtr\fR, int *\fIheightPtr\fR, Tcl_Interp *\fIinterp\fR); .CE The \fIdata\fR argument points to the object containing the image data. The \fIformat\fR argument contains the value given for the \fB\-format\fR option, or NULL if the option was not specified. If the data in the string appears to be in the format supported by this handler, the \fIformatPtr->stringMatchProc\fR procedure should store the width and height of the image in *\fIwidthPtr\fR and *\fIheightPtr\fR respectively, and return 1. Otherwise it should return 0. .SH FILEREADPROC \fIformatPtr->fileReadProc\fR provides the address of a procedure for 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 Tk_ImageFileReadProc( Tcl_Interp *\fIinterp\fR, Tcl_Channel \fIchan\fR, const char *\fIfileName\fR, Tcl_Obj *\fIformat\fR, PhotoHandle \fIimageHandle\fR, int \fIdestX\fR, int \fIdestY\fR, int \fIwidth\fR, int \fIheight\fR, int \fIsrcX\fR, int \fIsrcY\fR); .CE The \fIinterp\fR argument is the interpreter in which the command was invoked to read the image; it should be used for reporting errors. The image data is in the file named \fIfileName\fR, which is open for reading as \fIchan\fR. The \fIformat\fR argument contains the value given for the \fB\-format\fR option, or NULL if the option was not specified. The image data in the file, or a subimage of it, is to be read into the photo image identified by the handle \fIimageHandle\fR. The subimage of the data in the file is of dimensions \fIwidth\fR x \fIheight\fR and has its top-left corner at coordinates (\fIsrcX\fR,\fIsrcY\fR). It is to be stored in the photo image with its top-left corner at coordinates (\fIdestX\fR,\fIdestY\fR) using the \fBTk_PhotoPutBlock\fR procedure. The return value is a standard Tcl return value. .SH STRINGREADPROC \fIformatPtr->stringReadProc\fR provides the address of a procedure 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 Tk_ImageStringReadProc( Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIdata\fR, Tcl_Obj *\fIformat\fR, PhotoHandle \fIimageHandle\fR, int \fIdestX\fR, int \fIdestY\fR, int \fIwidth\fR, int \fIheight\fR, int \fIsrcX\fR, int \fIsrcY\fR); .CE The \fIinterp\fR argument is the interpreter in which the command was invoked to read the image; it should be used for reporting errors. The \fIdata\fR argument points to the image data in object form. The \fIformat\fR argument contains the value given for the \fB\-format\fR option, or NULL if the option was not specified. The image data in the string, or a subimage of it, is to be read into the photo image identified by the handle \fIimageHandle\fR. The subimage of the data in the string is of dimensions \fIwidth\fR x \fIheight\fR and has its top-left corner at coordinates (\fIsrcX\fR,\fIsrcY\fR). It is to be stored in the photo image with its top-left corner at coordinates (\fIdestX\fR,\fIdestY\fR) using the \fBTk_PhotoPutBlock\fR procedure. The return value is a standard Tcl return value. .SH FILEWRITEPROC \fIformatPtr->fileWriteProc\fR provides the address of a procedure for Tk to call to write data from a photo image to a file. \fIformatPtr->fileWriteProc\fR must match the following prototype: .CS typedef int Tk_ImageFileWriteProc( Tcl_Interp *\fIinterp\fR, const char *\fIfileName\fR, Tcl_Obj *\fIformat\fR, Tk_PhotoImageBlock *\fIblockPtr\fR); .CE The \fIinterp\fR argument is the interpreter in which the command was invoked to write the image; it should be used for reporting errors. The image data to be written are in memory and are described by the Tk_PhotoImageBlock structure pointed to by \fIblockPtr\fR; see the manual page FindPhoto(3) for details. The \fIfileName\fR argument points to the string giving the name of the file in which to write the image data. The \fIformat\fR argument contains the value given for the \fB\-format\fR option, or NULL if the option was not specified. The format string can contain extra characters after the name of the format. If appropriate, the \fIformatPtr->fileWriteProc\fR procedure may interpret these characters to specify further details about the image file. The return value is a standard Tcl return value. .SH STRINGWRITEPROC \fIformatPtr->stringWriteProc\fR provides the address of a procedure 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 Tk_ImageStringWriteProc( Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIformat\fR, Tk_PhotoImageBlock *\fIblockPtr\fR); .CE The \fIinterp\fR argument is the interpreter in which the command was invoked to convert the image; it should be used for reporting errors. The image data to be converted are in memory and are described by the Tk_PhotoImageBlock structure pointed to by \fIblockPtr\fR; see the manual page FindPhoto(3) for details. The data for the string should be put in the interpreter \fIinterp\fR result. The \fIformat\fR argument contains the value given for the \fB\-format\fR option, or NULL if the option was not specified. The format string can contain extra characters after the name of the format. If appropriate, the \fIformatPtr->stringWriteProc\fR procedure may interpret these characters to specify further details about the image file. The return value is a standard Tcl return value. .SH "LEGACY INTERFACE SUPPORT" 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 |
︙ | ︙ | |||
260 261 262 263 264 265 266 267 268 269 270 | 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 photo image, image file | > > | 262 263 264 265 266 267 268 269 270 271 272 273 274 | 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 photo image, image file |
Changes to doc/CrtSelHdlr.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_CreateSelHandler 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateSelHandler, Tk_DeleteSelHandler \- arrange to handle requests for a selection .SH SYNOPSIS .nf |
︙ | ︙ | |||
40 41 42 43 44 45 46 | requestor. .BE .SH DESCRIPTION .PP \fBTk_CreateSelHandler\fR arranges for a particular procedure (\fIproc\fR) to be called whenever \fIselection\fR is owned by \fItkwin\fR and the selection contents are requested in the | | | | | | | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | requestor. .BE .SH DESCRIPTION .PP \fBTk_CreateSelHandler\fR arranges for a particular procedure (\fIproc\fR) to be called whenever \fIselection\fR is owned by \fItkwin\fR and the selection contents are requested in the form given by \fItarget\fR. \fITarget\fR should be one of the entries defined in the left column of Table 2 of the X Inter-Client Communication Conventions Manual (ICCCM) or any other form in which an application is willing to present the selection. The most common form is STRING. .PP \fIProc\fR should have arguments and result that match the type \fBTk_SelectionProc\fR: .CS typedef int Tk_SelectionProc( ClientData \fIclientData\fR, int \fIoffset\fR, char *\fIbuffer\fR, int \fImaxBytes\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTk_CreateSelHandler\fR. Typically, \fIclientData\fR points to a data structure containing application-specific information that is needed to retrieve the selection. \fIOffset\fR specifies an offset position into the selection, \fIbuffer\fR specifies a |
︙ | ︙ | |||
108 109 110 111 112 113 114 115 116 | If \fBTk_CreateSelHandler\fR is called when there already exists a handler for \fIselection\fR and \fItarget\fR on \fItkwin\fR, then the existing handler is replaced with a new one. .PP \fBTk_DeleteSelHandler\fR removes the handler given by \fItkwin\fR, \fIselection\fR, and \fItarget\fR, if such a handler exists. If there is no such handler then it has no effect. .SH KEYWORDS format, handler, selection, target | > | 108 109 110 111 112 113 114 115 116 117 | If \fBTk_CreateSelHandler\fR is called when there already exists a handler for \fIselection\fR and \fItarget\fR on \fItkwin\fR, then the existing handler is replaced with a new one. .PP \fBTk_DeleteSelHandler\fR removes the handler given by \fItkwin\fR, \fIselection\fR, and \fItarget\fR, if such a handler exists. If there is no such handler then it has no effect. .SH KEYWORDS format, handler, selection, target |
Changes to doc/CrtWindow.3.
1 2 3 4 5 6 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" 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_CreateWindow 3 4.2 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateWindow, Tk_CreateWindowFromPath, Tk_DestroyWindow, Tk_MakeWindowExist \- create or delete window .SH SYNOPSIS .nf |
︙ | ︙ | |||
48 49 50 51 52 53 54 | Token for window. .AP "const char" *pathName in Name of new window, specified as path name within application (e.g. \fB.a.b.c\fR). .BE .SH DESCRIPTION .PP | | | | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | Token for window. .AP "const char" *pathName in Name of new window, specified as path name within application (e.g. \fB.a.b.c\fR). .BE .SH DESCRIPTION .PP The procedures \fBTk_CreateWindow\fR, \fBTk_CreateAnonymousWindow\fR, and \fBTk_CreateWindowFromPath\fR are used to create new windows for use in Tk-based applications. Each of the procedures returns a token that can be used to manipulate the window in other calls to the Tk library. If the window could not be created successfully, then NULL is returned and \fIinterp->result\fR is modified to hold an error message. .PP Tk supports two different kinds of windows: internal windows and top-level windows. An internal window is an interior window of a Tk application, such as a scrollbar or menu bar or button. A top-level window is one that is created as a child of a screen's root window, rather than as an interior window, but which is logically part of some existing main |
︙ | ︙ | |||
82 83 84 85 86 87 88 | The only difference is that new X window for a top-level window will not be a child of \fIparent\fR's X window. For example, a pull-down menu's \fIparent\fR would be the button-like window used to invoke it, which would in turn be a child of the menu bar window. A dialog box might have the application's main window as its parent. .PP \fBTk_CreateAnonymousWindow\fR differs from \fBTk_CreateWindow\fR in | | | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | The only difference is that new X window for a top-level window will not be a child of \fIparent\fR's X window. For example, a pull-down menu's \fIparent\fR would be the button-like window used to invoke it, which would in turn be a child of the menu bar window. A dialog box might have the application's main window as its parent. .PP \fBTk_CreateAnonymousWindow\fR differs from \fBTk_CreateWindow\fR in that it creates an unnamed window. This window will be manipulable only using C interfaces, and will not be visible to Tcl scripts. Both interior windows and top-level windows may be created with \fBTk_CreateAnonymousWindow\fR. .PP \fBTk_CreateWindowFromPath\fR offers an alternate way of specifying new windows. In \fBTk_CreateWindowFromPath\fR the new window is specified with a token for any window in the target |
︙ | ︙ | |||
137 138 139 140 141 142 143 144 145 146 | the request and returned an event for it. .PP If a window has been created but has not been mapped, so no X window exists, it is possible to force the creation of the X window by calling \fBTk_MakeWindowExist\fR. This procedure issues the X commands to instantiate the window given by \fItkwin\fR. .SH KEYWORDS create, deferred creation, destroy, display, internal window, screen, top-level window, window | > | 137 138 139 140 141 142 143 144 145 146 147 | the request and returned an event for it. .PP If a window has been created but has not been mapped, so no X window exists, it is possible to force the creation of the X window by calling \fBTk_MakeWindowExist\fR. This procedure issues the X commands to instantiate the window given by \fItkwin\fR. .SH KEYWORDS create, deferred creation, destroy, display, internal window, screen, top-level window, window |
Changes to doc/DeleteImg.3.
1 2 3 4 5 | '\" '\" Copyright (c) 1995-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. | | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | '\" '\" Copyright (c) 1995-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_DeleteImage 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_DeleteImage \- Destroy an image. .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp \fBTk_DeleteImage\fR(\fIinterp, name\fR) .SH ARGUMENTS .AS Tcl_Interp *interp .AP Tcl_Interp *interp in Interpreter for which the image was created. .AP "const char" *name in Name of the image. .BE .SH DESCRIPTION .PP \fBTk_DeleteImage\fR deletes the image given by \fIinterp\fR and \fIname\fR, if there is one. All instances of that image will redisplay as empty regions. If the given image does not exist then the procedure has no effect. .SH KEYWORDS delete image, image manager |
Changes to doc/DrawFocHlt.3.
1 2 3 4 5 | '\" '\" Copyright (c) 1995-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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | '\" '\" Copyright (c) 1995-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_DrawFocusHighlight 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_DrawFocusHighlight \- draw the traversal highlight ring for a widget .SH SYNOPSIS .nf |
︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | Graphics context to use for drawing the highlight. .AP int width in Width of the highlight ring, in pixels. .AP Drawable drawable in Drawable in which to draw the highlight; usually an offscreen pixmap for double buffering. .BE .SH DESCRIPTION .PP \fBTk_DrawFocusHighlight\fR is a utility procedure that draws the traversal highlight ring for a widget. It is typically invoked by widgets during redisplay. .SH KEYWORDS focus, traversal highlight | > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | Graphics context to use for drawing the highlight. .AP int width in Width of the highlight ring, in pixels. .AP Drawable drawable in Drawable in which to draw the highlight; usually an offscreen pixmap for double buffering. .BE .SH DESCRIPTION .PP \fBTk_DrawFocusHighlight\fR is a utility procedure that draws the traversal highlight ring for a widget. It is typically invoked by widgets during redisplay. .SH KEYWORDS focus, traversal highlight |
Changes to doc/EventHndlr.3.
1 2 3 4 5 6 | '\" '\" 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. | | | < < < < < < < < < < > | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | '\" '\" 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_CreateEventHandler 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_CreateEventHandler, Tk_DeleteEventHandler \- associate procedure callback with an X event .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp \fBTk_CreateEventHandler\fR(\fItkwin, mask, proc, clientData\fR) .sp \fBTk_DeleteEventHandler\fR(\fItkwin, mask, proc, clientData\fR) .SH ARGUMENTS .AS "unsigned long" clientData .AP Tk_Window tkwin in Token for window in which events may occur. .AP "unsigned long" mask in Bit-mask of events (such as \fBButtonPressMask\fR) for which \fIproc\fR should be called. .AP Tk_EventProc *proc in Procedure to invoke whenever an event in \fImask\fR occurs in the window given by \fItkwin\fR. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE .SH DESCRIPTION .PP \fBTk_CreateEventHandler\fR arranges for \fIproc\fR to be invoked in the future whenever one of the event types specified by \fImask\fR occurs in the window specified by \fItkwin\fR. The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR; this mechanism only works in programs that dispatch events through \fBTk_HandleEvent\fR (or through other Tk procedures that call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or \fBTk_MainLoop\fR). .PP \fIProc\fR should have arguments and result that match the type \fBTk_EventProc\fR: .CS typedef void Tk_EventProc( ClientData \fIclientData\fR, XEvent *\fIeventPtr\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTk_CreateEventHandler\fR when the callback was created. Typically, \fIclientData\fR points to a data structure containing application-specific information about the window in which the event occurred. \fIEventPtr\fR is a pointer to the X event, which will be one of the ones |
︙ | ︙ | |||
77 78 79 80 81 82 83 | When a window is deleted all of its handlers will be deleted automatically; in this case there is no need to call \fBTk_DeleteEventHandler\fR. .PP If multiple handlers are declared for the same type of X event on the same window, then the handlers will be invoked in the order they were created. | | < < < < | 68 69 70 71 72 73 74 75 76 77 | When a window is deleted all of its handlers will be deleted automatically; in this case there is no need to call \fBTk_DeleteEventHandler\fR. .PP If multiple handlers are declared for the same type of X event on the same window, then the handlers will be invoked in the order they were created. .SH KEYWORDS bind, callback, event, handler |
Changes to doc/FindPhoto.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Australian National University '\" 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. | | > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | '\" '\" Copyright (c) 1994 The Australian National University '\" 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. '\" '\" Author: Paul Mackerras ([email protected]), '\" Department of Computer Science, '\" Australian National University. '\" .TH Tk_FindPhoto 3 8.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_FindPhoto, Tk_PhotoPutBlock, Tk_PhotoPutZoomedBlock, Tk_PhotoGetImage, Tk_PhotoBlank, Tk_PhotoExpand, Tk_PhotoGetSize, Tk_PhotoSetSize \- manipulate the image data stored in a photo image. .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp Tk_PhotoHandle \fBTk_FindPhoto\fR(\fIinterp, imageName\fR) .sp .VS 8.5 int \fBTk_PhotoPutBlock\fR(\fIinterp, handle, blockPtr, x, y, width, height,\ compRule\fR) .sp int \fBTk_PhotoPutZoomedBlock\fR(\fIinterp, handle, blockPtr, x, y, width, height,\ zoomX, zoomY, subsampleX, subsampleY, compRule\fR) .VE 8.5 .sp int \fBTk_PhotoGetImage\fR(\fIhandle, blockPtr\fR) .sp void \fBTk_PhotoBlank\fR(\fIhandle\fR) .sp .VS 8.5 int \fBTk_PhotoExpand\fR(\fIinterp, handle, width, height\fR) .VE 8.5 .sp void \fBTk_PhotoGetSize\fR(\fIhandle, widthPtr, heightPtr\fR) .sp .VS 8.5 int \fBTk_PhotoSetSize\fR(\fIinterp. handle, width, height\fR) .VE 8.5 .SH ARGUMENTS .AS Tk_PhotoImageBlock window_path .AP Tcl_Interp *interp in Interpreter in which image was created and in which error reporting is to be done. .AP "const char" *imageName in Name of the photo image. |
︙ | ︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 | .AP int zoomX in Specifies the zoom factor to be applied in the X direction to pixels being written to the photo image. .AP int zoomY in Specifies the zoom factor to be applied in the Y direction to pixels being written to the photo image. .BE .SH DESCRIPTION .PP \fBTk_FindPhoto\fR returns an opaque handle that is used to identify a particular photo image to the other procedures. The parameter is the name of the image, that is, the name specified to the \fBimage create photo\fR command, or assigned by that command if no name was specified. | > < < | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | .AP int zoomX in Specifies the zoom factor to be applied in the X direction to pixels being written to the photo image. .AP int zoomY in Specifies the zoom factor to be applied in the Y direction to pixels being written to the photo image. .BE .SH DESCRIPTION .PP \fBTk_FindPhoto\fR returns an opaque handle that is used to identify a particular photo image to the other procedures. The parameter is the name of the image, that is, the name specified to the \fBimage create photo\fR command, or assigned by that command if no name was specified. .PP \fBTk_PhotoPutBlock\fR is used to supply blocks of image data to be displayed. The call affects an area of the image of size \fIwidth\fR x \fIheight\fR pixels, with its top-left corner at coordinates (\fIx\fR,\fIy\fR). All of \fIwidth\fR, \fIheight\fR, \fIx\fR, and \fIy\fR must be non-negative. If part of this area lies outside the |
︙ | ︙ | |||
119 120 121 122 123 124 125 | .CS typedef struct { unsigned char *\fIpixelPtr\fR; int \fIwidth\fR; int \fIheight\fR; int \fIpitch\fR; int \fIpixelSize\fR; | | | | < < < < < | | | < < < | < > > | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | .CS typedef struct { unsigned char *\fIpixelPtr\fR; int \fIwidth\fR; int \fIheight\fR; int \fIpitch\fR; int \fIpixelSize\fR; int \fIoffset[4]\fR; } Tk_PhotoImageBlock; .CE The \fIpixelPtr\fR field points to the first pixel, that is, the top-left pixel in the block. The \fIwidth\fR and \fIheight\fR fields specify the dimensions of the block of pixels. The \fIpixelSize\fR field specifies the address difference between two horizontally adjacent pixels. Often it is 3 or 4, but it can have any value. The \fIpitch\fR field specifies the address difference between two vertically adjacent pixels. The \fIoffset\fR array contains the offsets from the address of a pixel to the addresses of the bytes containing the red, green, blue and alpha (transparency) components. These are normally 0, 1, 2 and 3, but can have other values, e.g., for images that are stored as separate red, green and blue planes. .PP The \fIcompRule\fR parameter to \fBTk_PhotoPutBlock\fR specifies a compositing rule that says what to do with transparent pixels. The value \fBTK_PHOTO_COMPOSITE_OVERLAY\fR says that the previous contents of the photo image should show through, and the value \fBTK_PHOTO_COMPOSITE_SET\fR says that the previous contents of the photo image should be completely ignored, and the values from the block be copied directly across. The behavior in Tk8.3 and earlier was equivalent to having \fBTK_PHOTO_COMPOSITE_OVERLAY\fR as a compositing rule. .PP The value given for the \fIwidth\fR and \fIheight\fR parameters to \fBTk_PhotoPutBlock\fR do not have to correspond to the values specified in \fIblock\fR. If they are smaller, \fBTk_PhotoPutBlock\fR extracts a sub-block from the image data supplied. If they are larger, the data given are replicated (in a tiled fashion) to fill the specified area. These rules operate independently in the horizontal and vertical directions. .PP .VS 8.5 \fBTk_PhotoPutBlock\fR normally returns \fBTCL_OK\fR, though if it cannot allocate sufficient memory to hold the resulting image, \fBTCL_ERROR\fR is returned instead and, if the \fIinterp\fR argument is non-NULL, an error message is placed in the interpreter's result. .VE 8.5 .PP \fBTk_PhotoPutZoomedBlock\fR works like \fBTk_PhotoPutBlock\fR except that the image can be reduced or enlarged for display. The \fIsubsampleX\fR and \fIsubsampleY\fR parameters allow the size of the image to be reduced by subsampling. \fBTk_PhotoPutZoomedBlock\fR will use only pixels from the input image whose X coordinates are multiples of \fIsubsampleX\fR, and whose Y |
︙ | ︙ | |||
188 189 190 191 192 193 194 | .PP \fBTk_PhotoGetImage\fR can be used to retrieve image data from a photo image. \fBTk_PhotoGetImage\fR fills in the structure pointed to by the \fIblockPtr\fR parameter with values that describe the address and layout of the image data that the photo image has stored internally. The values are valid until the image is destroyed or its size is changed. | < < < < < < < < < < < < > > > > > > | | < < < < < < < < < < < < < < < < > | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | .PP \fBTk_PhotoGetImage\fR can be used to retrieve image data from a photo image. \fBTk_PhotoGetImage\fR fills in the structure pointed to by the \fIblockPtr\fR parameter with values that describe the address and layout of the image data that the photo image has stored internally. The values are valid until the image is destroyed or its size is changed. \fBTk_PhotoGetImage\fR returns 1 for compatibility with the corresponding procedure in the old photo widget. .PP \fBTk_PhotoBlank\fR blanks the entire area of the photo image. Blank areas of a photo image are transparent. .PP \fBTk_PhotoExpand\fR requests that the widget's image be expanded to be at least \fIwidth\fR x \fIheight\fR pixels in size. The width and/or height are unchanged if the user has specified an explicit image width or height with the \fB\-width\fR and/or \fB\-height\fR configuration options, respectively. If the image data are being supplied in many small blocks, it is more efficient to use \fBTk_PhotoExpand\fR or \fBTk_PhotoSetSize\fR at the beginning rather than allowing the image to expand in many small increments as image blocks are supplied. .PP .VS 8.5 \fBTk_PhotoExpand\fR normally returns \fBTCL_OK\fR, though if it cannot allocate sufficient memory to hold the resulting image, \fBTCL_ERROR\fR is returned instead and, if the \fIinterp\fR argument is non-NULL, an error message is placed in the interpreter's result. .VE 8.5 .PP \fBTk_PhotoSetSize\fR specifies the size of the image, as if the user had specified the given \fIwidth\fR and \fIheight\fR values to the \fB\-width\fR and \fB\-height\fR configuration options. A value of zero for \fIwidth\fR or \fIheight\fR does not change the image's width or height, but allows the width or height to be changed by subsequent calls to \fBTk_PhotoPutBlock\fR, \fBTk_PhotoPutZoomedBlock\fR or \fBTk_PhotoExpand\fR. .PP .VS 8.5 \fBTk_PhotoSetSize\fR normally returns \fBTCL_OK\fR, though if it cannot allocate sufficient memory to hold the resulting image, \fBTCL_ERROR\fR is returned instead and, if the \fIinterp\fR argument is non-NULL, an error message is placed in the interpreter's result. .VE 8.5 .PP \fBTk_PhotoGetSize\fR returns the dimensions of the image in *\fIwidthPtr\fR and *\fIheightPtr\fR. .SH PORTABILITY .PP In Tk 8.3 and earlier, \fBTk_PhotoPutBlock\fR and \fBTk_PhotoPutZoomedBlock\fR had different signatures. If you want to compile code that uses the old interface against 8.4 without updating your code, compile it with the flag -DUSE_COMPOSITELESS_PHOTO_PUT_BLOCK. Code linked using Stubs against older versions of Tk will continue to work. .PP .VS 8.5 In Tk 8.4, \fBTk_PhotoPutBlock\fR, \fBTk_PhotoPutZoomedBlock\fR, \fBTk_PhotoExpand\fR and \fBTk_PhotoSetSize\fR did not take an \fIinterp\fR argument or return any result code. If insufficient memory was available for an image, Tk would panic. This behaviour is still supported if you compile your extension with the additional flag -DUSE_PANIC_ON_PHOTO_ALLOC_FAILURE. Code linked using Stubs against older versions of Tk will continue to work. .VE 8.5 .SH CREDITS .PP The code for the photo image type was developed by Paul Mackerras, based on his earlier photo widget code. .SH KEYWORDS photo, image |
Changes to doc/FontId.3.
1 2 3 4 5 | '\" '\" Copyright (c) 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. | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | '\" '\" Copyright (c) 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_FontId 3 8.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_FontId, Tk_GetFontMetrics, Tk_PostscriptFontName \- accessor functions for fonts .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp Font \fBTk_FontId(\fItkfont\fB)\fR |
︙ | ︙ | |||
33 34 35 36 37 38 39 | Pointer to an initialized \fBTcl_DString\fR to which the name of the Postscript font that corresponds to \fItkfont\fR will be appended. .BE .SH DESCRIPTION .PP Given a \fItkfont\fR, \fBTk_FontId\fR returns the token that should be selected into an XGCValues structure in order to construct a graphics | | | | | < | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | Pointer to an initialized \fBTcl_DString\fR to which the name of the Postscript font that corresponds to \fItkfont\fR will be appended. .BE .SH DESCRIPTION .PP Given a \fItkfont\fR, \fBTk_FontId\fR returns the token that should be selected into an XGCValues structure in order to construct a graphics context that can be used to draw text in the specified font. .PP \fBTk_GetFontMetrics\fR computes the ascent, descent, and linespace of the \fItkfont\fR in pixels and stores those values in the structure pointer to by \fIfmPtr\fR. These values can be used in computations such as to space multiple lines of text, to align the baselines of text in different fonts, and to vertically align text in a given region. See the documentation for the \fBfont\fR command for definitions of the terms ascent, descent, and linespace, used in font metrics. .PP \fBTk_PostscriptFontName\fR maps a \fItkfont\fR to the corresponding Postscript font name that should be used when printing. The return value is the size in points of the \fItkfont\fR and the Postscript font name is appended to \fIdsPtr\fR. \fIDsPtr\fR must refer to an initialized \fBTcl_DString\fR. Given a .QW reasonable Postscript printer, the following screen font families should print correctly: .IP \fBAvant Garde\fR, \fBArial\fR, \fBBookman\fR, \fBCourier\fR, \fBCourier New\fR, \fBGeneva\fR, \fBHelvetica\fR, \fBMonaco\fR, \fBNew Century Schoolbook\fR, \fBNew York\fR, \fBPalatino\fR, \fBSymbol\fR, \fBTimes\fR, \fBTimes New Roman\fR, \fBZapf Chancery\fR, and \fBZapf Dingbats\fR. .PP Any other font families may not print correctly because the computed Postscript font name may be incorrect or not exist on the printer. .SH "DATA STRUCTURES" 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 { int \fIascent\fR; int \fIdescent\fR; int \fIlinespace\fR; } Tk_FontMetrics; .CE .PP The \fIascent\fR field is the amount in pixels that the tallest letter sticks up above the baseline, plus any extra blank space added by the designer of the font. .PP The \fIdescent\fR is the largest amount in pixels that any letter |
︙ | ︙ |
Changes to doc/FreeXId.3.
1 2 3 4 5 6 | '\" '\" 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. | | | > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | '\" '\" 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 The default allocator for resource identifiers provided by Xlib is very simple-minded and does not allow resource identifiers to be re-used. If a long-running application reaches the end of the resource id space, it will generate an X protocol error and crash. Tk replaces the default id allocator with its own allocator, which allows identifiers to be reused. In order for this to work, \fBTk_FreeXId\fR must be called to tell the allocator about resources that have been freed. Tk automatically calls \fBTk_FreeXId\fR whenever it frees a resource, so if you use procedures like \fBTk_GetFont\fR, \fBTk_GetGC\fR, and \fBTk_GetPixmap\fR then you need not call \fBTk_FreeXId\fR. However, if you allocate resources directly from Xlib, for example by calling \fBXCreatePixmap\fR, then you should call \fBTk_FreeXId\fR when you call the corresponding Xlib free procedure, such as \fBXFreePixmap\fR. If you do not call \fBTk_FreeXId\fR then the resource identifier will be lost, which could cause problems if the application runs long enough to lose all of the available identifiers. .SH KEYWORDS resource identifier |
Changes to doc/GeomReq.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_GeometryRequest 3 "8.4" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GeometryRequest, Tk_SetMinimumRequestSize, Tk_SetInternalBorder, Tk_SetInternalBorderEx \- specify desired geometry or internal border for a window .SH SYNOPSIS .nf |
︙ | ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | .AP int right in 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. .AP int bottom in Space to leave for bottom side of internal border for \fItkwin\fR, in pixel units. .BE .SH DESCRIPTION .PP \fBTk_GeometryRequest\fR is called by widget code to indicate its preference for the dimensions of a particular window. The arguments to \fBTk_GeometryRequest\fR are made available to the geometry manager for the window, which then decides on the actual geometry for the window. Although geometry managers generally try to satisfy | > | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | .AP int right in 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. .AP int bottom in Space to leave for bottom side of internal border for \fItkwin\fR, in pixel units. .BE .SH DESCRIPTION .PP \fBTk_GeometryRequest\fR is called by widget code to indicate its preference for the dimensions of a particular window. The arguments to \fBTk_GeometryRequest\fR are made available to the geometry manager for the window, which then decides on the actual geometry for the window. Although geometry managers generally try to satisfy |
︙ | ︙ | |||
84 85 86 87 88 89 90 91 92 | \fBTk_SetMinimumRequestSize\fR, \fBTk_SetInternalBorder\fR and \fBTk_SetInternalBorderEx\fR can be retrieved using the macros \fBTk_ReqWidth\fR, \fBTk_ReqHeight\fR, \fBTk_MinReqWidth\fR, \fBTk_MinReqHeight\fR, \fBTk_MinReqWidth\fR, \fBTk_InternalBorderLeft\fR, \fBTk_InternalBorderRight\fR, \fBTk_InternalBorderTop\fR and \fBTk_InternalBorderBottom\fR. See the \fBTk_WindowId\fR manual entry for details. .SH KEYWORDS geometry, request | > | 85 86 87 88 89 90 91 92 93 94 | \fBTk_SetMinimumRequestSize\fR, \fBTk_SetInternalBorder\fR and \fBTk_SetInternalBorderEx\fR can be retrieved using the macros \fBTk_ReqWidth\fR, \fBTk_ReqHeight\fR, \fBTk_MinReqWidth\fR, \fBTk_MinReqHeight\fR, \fBTk_MinReqWidth\fR, \fBTk_InternalBorderLeft\fR, \fBTk_InternalBorderRight\fR, \fBTk_InternalBorderTop\fR and \fBTk_InternalBorderBottom\fR. See the \fBTk_WindowId\fR manual entry for details. .SH KEYWORDS geometry, request |
Changes to doc/GetAnchor.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_GetAnchorFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetAnchorFromObj, Tk_GetAnchor, Tk_NameOfAnchor \- translate between strings and anchor positions .SH SYNOPSIS .nf |
︙ | ︙ | |||
24 25 26 27 28 29 30 | \fBTk_NameOfAnchor(\fIanchor\fB)\fR .SH ARGUMENTS .AS "Tk_Anchor" *anchorPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting, or NULL. .AP Tcl_Obj *objPtr in/out String value contains name of anchor point: | | | | | | | | | | | < < < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | \fBTk_NameOfAnchor(\fIanchor\fB)\fR .SH ARGUMENTS .AS "Tk_Anchor" *anchorPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting, or NULL. .AP Tcl_Obj *objPtr in/out String value contains name of anchor point: .QW n , .QW ne , .QW e , .QW se , .QW s , .QW sw , .QW w , .QW nw , or .QW center ; internal rep will be modified to cache corresponding Tk_Anchor. .AP "const char" *string in Same as \fIobjPtr\fR except description of anchor point is passed as a string. .AP int *anchorPtr out Pointer to location in which to store anchor position corresponding to \fIobjPtr\fR or \fIstring\fR. .AP Tk_Anchor anchor in |
︙ | ︙ |
Changes to doc/GetBitmap.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_AllocBitmapFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_AllocBitmapFromObj, Tk_GetBitmap, Tk_GetBitmapFromObj, Tk_DefineBitmap, Tk_NameOfBitmap, Tk_SizeOfBitmap, Tk_FreeBitmapFromObj, Tk_FreeBitmap \- maintain database of single-plane pixmaps .SH SYNOPSIS .nf |
︙ | ︙ | |||
45 46 47 48 49 50 51 | String value describes desired bitmap; internal rep will be modified to cache pointer to corresponding Pixmap. .AP "const char" *info in Same as \fIobjPtr\fR except description of bitmap is passed as a string and resulting Pixmap is not cached. .AP "const char" *name in Name for new bitmap to be defined. | | > | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | String value describes desired bitmap; internal rep will be modified to cache pointer to corresponding Pixmap. .AP "const char" *info in Same as \fIobjPtr\fR except description of bitmap is passed as a string and resulting Pixmap is not cached. .AP "const char" *name in Name for new bitmap to be defined. .AP "const char" *source in Data for bitmap, in standard bitmap format. Must be stored in static memory whose value will never change. .AP "int" width in Width of bitmap. .AP "int" height in Height of bitmap. .AP "int" *widthPtr out Pointer to word to fill in with \fIbitmap\fR's width. .AP "int" *heightPtr out Pointer to word to fill in with \fIbitmap\fR's height. .AP Display *display in Display for which \fIbitmap\fR was allocated. .AP Pixmap bitmap in Identifier for a bitmap allocated by \fBTk_AllocBitmapFromObj\fR or \fBTk_GetBitmap\fR. .BE .SH DESCRIPTION .PP These procedures manage a collection of bitmaps (one-plane pixmaps) being used by an application. The procedures allow bitmaps to be re-used efficiently, thereby avoiding server overhead, and also allow bitmaps to be named with character strings. .PP \fBTk_AllocBitmapFromObj\fR returns a Pixmap identifier for a bitmap that matches the description in \fIobjPtr\fR and is suitable for use in \fItkwin\fR. It re-uses an existing bitmap, if possible, and 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 or X10 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 |
︙ | ︙ | |||
205 206 207 208 209 210 211 | argument gives a name for the bitmap; it must not previously have been used in a call to \fBTk_DefineBitmap\fR. The arguments \fIsource\fR, \fIwidth\fR, and \fIheight\fR describe the bitmap. \fBTk_DefineBitmap\fR normally returns \fBTCL_OK\fR; if an error occurs (e.g. a bitmap named \fInameId\fR has already been defined) then \fBTCL_ERROR\fR is returned and an error message is left in | | | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | argument gives a name for the bitmap; it must not previously have been used in a call to \fBTk_DefineBitmap\fR. The arguments \fIsource\fR, \fIwidth\fR, and \fIheight\fR describe the bitmap. \fBTk_DefineBitmap\fR normally returns \fBTCL_OK\fR; if an error occurs (e.g. a bitmap named \fInameId\fR has already been defined) then \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp->result\fR. Note: \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 \fBTk_GetBitmap\fR. .PP Typically \fBTk_DefineBitmap\fR is used by \fB#include\fR-ing a |
︙ | ︙ | |||
277 278 279 280 281 282 283 284 | For \fBTk_FreeBitmapFromObj\fR the bitmap to release is specified with the same information used to create it; for \fBTk_FreeBitmap\fR the bitmap to release is specified with its Pixmap token. There should be exactly one call to \fBTk_FreeBitmapFromObj\fR or \fBTk_FreeBitmap\fR for each call to \fBTk_AllocBitmapFromObj\fR or \fBTk_GetBitmap\fR. .SH BUGS | > < > | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | For \fBTk_FreeBitmapFromObj\fR the bitmap to release is specified with the same information used to create it; for \fBTk_FreeBitmap\fR the bitmap to release is specified with its Pixmap token. There should be exactly one call to \fBTk_FreeBitmapFromObj\fR or \fBTk_FreeBitmap\fR for each call to \fBTk_AllocBitmapFromObj\fR or \fBTk_GetBitmap\fR. .SH BUGS In determining whether an existing bitmap can be used to satisfy a new request, \fBTk_AllocBitmapFromObj\fR and \fBTk_GetBitmap\fR consider only the immediate value of the string description. For example, when a file name is passed to \fBTk_GetBitmap\fR, \fBTk_GetBitmap\fR will assume it is safe to re-use an existing bitmap created from the same file name: it will not check to see whether the file itself has changed, or whether the current directory has changed, thereby causing the name to refer to a different file. .SH KEYWORDS bitmap, pixmap |
Changes to doc/GetCapStyl.3.
1 2 3 4 5 6 | '\" '\" 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. | | | | | | < > | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | '\" '\" 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_GetCapStyle 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetCapStyle, Tk_NameOfCapStyle \- translate between strings and cap styles .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp int \fBTk_GetCapStyle(\fIinterp, string, capPtr\fB)\fR .sp const char * \fBTk_NameOfCapStyle(\fIcap\fB)\fR .SH ARGUMENTS .AS "Tcl_Interp" *capPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP "const char" *string in String containing name of cap style: one of .QW butt , .QW projecting , or .QW round . .AP int *capPtr out Pointer to location in which to store X cap style corresponding to \fIstring\fR. .AP int cap in Cap style: one of \fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR. .BE .SH DESCRIPTION .PP \fBTk_GetCapStyle\fR places in \fI*capPtr\fR the X cap style corresponding to \fIstring\fR. This will be one of the values \fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR. Cap styles are typically used in X graphics contexts to indicate how the end-points of lines should be capped. See the X documentation for information on what each style implies. .PP Under normal circumstances the return value is \fBTCL_OK\fR and \fIinterp\fR is unused. If \fIstring\fR does not contain a valid cap style or an abbreviation of one of these names, then an error message is stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and \fI*capPtr\fR is unmodified. .PP \fBTk_NameOfCapStyle\fR is the logical inverse of \fBTk_GetCapStyle\fR. Given a cap style such as \fBCapButt\fR it returns a statically-allocated string corresponding to \fIcap\fR. If \fIcap\fR is not a legal cap style, then .QW "unknown cap style" is returned. .SH KEYWORDS butt, cap style, projecting, round |
Changes to doc/GetClrmap.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetColormap, Tk_PreserveColormap, Tk_FreeColormap \- allocate and free colormaps .SH SYNOPSIS .nf |
︙ | ︙ |
Changes to doc/GetColor.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1991 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990-1991 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_AllocColorFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_AllocColorFromObj, Tk_GetColor, Tk_GetColorFromObj, Tk_GetColorByValue, Tk_NameOfColor, Tk_FreeColorFromObj, Tk_FreeColor \- maintain database of colors .SH SYNOPSIS .nf |
︙ | ︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | Pointer to X color information. Must have been allocated by previous call to \fBTk_AllocColorFromObj\fR, \fBTk_GetColor\fR or \fBTk_GetColorByValue\fR, except when passed to \fBTk_NameOfColor\fR. .AP Drawable drawable in Drawable in which the result graphics context will be used. Must have same screen and depth as the window for which the color was allocated. .BE .SH DESCRIPTION .PP These procedures manage the colors being used by a Tk application. They allow colors to be shared whenever possible, so that colormap space is preserved, and they pick closest available colors when colormap space is exhausted. .PP Given a textual description of a color, \fBTk_AllocColorFromObj\fR locates a pixel value that may be used to render the color | > | | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | Pointer to X color information. Must have been allocated by previous call to \fBTk_AllocColorFromObj\fR, \fBTk_GetColor\fR or \fBTk_GetColorByValue\fR, except when passed to \fBTk_NameOfColor\fR. .AP Drawable drawable in Drawable in which the result graphics context will be used. Must have same screen and depth as the window for which the color was allocated. .BE .SH DESCRIPTION .PP These procedures manage the colors being used by a Tk application. They allow colors to be shared whenever possible, so that colormap space is preserved, and they pick closest available colors when colormap space is exhausted. .PP Given a textual description of a color, \fBTk_AllocColorFromObj\fR locates a pixel value that may be used to render the color in a particular window. The desired color is specified with an object 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 \fB#\fIRGB\fR .TP 20 |
︙ | ︙ | |||
102 103 104 105 106 107 108 | will use the closest existing color in the colormap. \fBTk_AllocColorFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to procedures such as \fBTk_AllocColorFromObj\fR and \fBTk_GetColorFromObj\fR. .PP \fBTk_GetColor\fR is identical to \fBTk_AllocColorFromObj\fR except that the description of the color is specified with a string instead | | | | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | will use the closest existing color in the colormap. \fBTk_AllocColorFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to procedures such as \fBTk_AllocColorFromObj\fR and \fBTk_GetColorFromObj\fR. .PP \fBTk_GetColor\fR is identical to \fBTk_AllocColorFromObj\fR except that the description of the color is specified with a string instead of an object. This prevents \fBTk_GetColor\fR from caching the return value, so \fBTk_GetColor\fR is less efficient than \fBTk_AllocColorFromObj\fR. .PP \fBTk_GetColorFromObj\fR returns the token for an existing color, given the window and description used to create the color. \fBTk_GetColorFromObj\fR does not actually create the color; the color must already have been created with a previous call to \fBTk_AllocColorFromObj\fR or \fBTk_GetColor\fR. The return value is cached in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetColorFromObj\fR with the same \fIobjPtr\fR and \fItkwin\fR. .PP \fBTk_GetColorByValue\fR is similar to \fBTk_GetColor\fR except that the desired color is indicated with the \fIred\fR, \fIgreen\fR, and \fIblue\fR fields of the structure pointed to by \fIcolorPtr\fR. .PP This package maintains a database of all the colors currently in use. If the same color is requested multiple times from \fBTk_GetColor\fR or \fBTk_AllocColorFromObj\fR (e.g. by different windows), or if the same intensities are requested multiple times from \fBTk_GetColorByValue\fR, then existing pixel values will be re-used. Re-using an existing pixel avoids any interaction with the window server, which makes the allocation much more efficient. These procedures also provide a portable interface that works across all platforms. For this reason, you should generally use \fBTk_AllocColorFromObj\fR, \fBTk_GetColor\fR, or \fBTk_GetColorByValue\fR |
︙ | ︙ | |||
169 170 171 172 173 174 175 | with the same information used to create it; for \fBTk_FreeColor\fR the color to release is specified with a pointer to its XColor structure. There should be exactly one call to \fBTk_FreeColorFromObj\fR or \fBTk_FreeColor\fR for each call to \fBTk_AllocColorFromObj\fR, \fBTk_GetColor\fR, or \fBTk_GetColorByValue\fR. .SH KEYWORDS | | | 170 171 172 173 174 175 176 177 | with the same information used to create it; for \fBTk_FreeColor\fR the color to release is specified with a pointer to its XColor structure. There should be exactly one call to \fBTk_FreeColorFromObj\fR or \fBTk_FreeColor\fR for each call to \fBTk_AllocColorFromObj\fR, \fBTk_GetColor\fR, or \fBTk_GetColorByValue\fR. .SH KEYWORDS color, intensity, object, pixel value |
Changes to doc/GetCursor.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_AllocCursorFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_AllocCursorFromObj, Tk_GetCursor, Tk_GetCursorFromObj, Tk_GetCursorFromData, Tk_NameOfCursor, Tk_FreeCursorFromObj, Tk_FreeCursor \- maintain database of cursors .SH SYNOPSIS .nf |
︙ | ︙ | |||
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | .AP Display *display in Display for which \fIcursor\fR was allocated. .AP Tk_Cursor cursor in Opaque Tk identifier for cursor. If passed to \fBTk_FreeCursor\fR, must have been returned by some previous call to \fBTk_GetCursor\fR or \fBTk_GetCursorFromData\fR. .BE .SH DESCRIPTION .PP These procedures manage a collection of cursors being used by an application. The procedures allow cursors to be re-used efficiently, thereby avoiding server overhead, and also allow cursors to be named with character strings. .PP | > | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | .AP Display *display in Display for which \fIcursor\fR was allocated. .AP Tk_Cursor cursor in Opaque Tk identifier for cursor. If passed to \fBTk_FreeCursor\fR, must have been returned by some previous call to \fBTk_GetCursor\fR or \fBTk_GetCursorFromData\fR. .BE .SH DESCRIPTION .PP These procedures manage a collection of cursors being used by an application. The procedures allow cursors to be re-used efficiently, thereby avoiding server overhead, and also allow cursors to be named with character strings. .PP |
︙ | ︙ | |||
113 114 115 116 117 118 119 | cursor. If there are conflicts color cursors will always be loaded 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. | | | | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | cursor. If there are conflicts color cursors will always be loaded 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 or X10 cursor format. \fIFgColor\fR and \fIbgColor\fR indicate the colors to use for the 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 |
︙ | ︙ | |||
208 209 210 211 212 213 214 215 | For \fBTk_FreeCursorFromObj\fR the cursor to release is specified with the same information used to create it; for \fBTk_FreeCursor\fR the cursor to release is specified with its Tk_Cursor token. There should be exactly one call to \fBTk_FreeCursor\fR for each call to \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR, or \fBTk_GetCursorFromData\fR. .SH BUGS | > < > | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | For \fBTk_FreeCursorFromObj\fR the cursor to release is specified with the same information used to create it; for \fBTk_FreeCursor\fR the cursor to release is specified with its Tk_Cursor token. There should be exactly one call to \fBTk_FreeCursor\fR for each call to \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR, or \fBTk_GetCursorFromData\fR. .SH BUGS In determining whether an existing cursor can be used to satisfy a new request, \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR, and \fBTk_GetCursorFromData\fR consider only the immediate values of their arguments. For example, when a file name is passed to \fBTk_GetCursor\fR, \fBTk_GetCursor\fR will assume it is safe to re-use an existing cursor created from the same file name: it will not check to see whether the file itself has changed, or whether the current directory has changed, thereby causing the name to refer to a different file. Similarly, \fBTk_GetCursorFromData\fR assumes that if the same \fIsource\fR pointer is used in two different calls, then the pointers refer to the same data; it does not check to see if the actual data values have changed. .SH KEYWORDS cursor |
Changes to doc/GetDash.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1989-1993 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. | | | < | | > | | | < < | | < | | | | | | | | | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | '\" '\" Copyright (c) 1989-1993 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_GetDash 3 8.3 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetDash \- convert from string to valid dash structure. .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp int \fBTk_GetDash\fR(\fIinterp, string, dashPtr\fR) .SH ARGUMENTS .AS Tk_Dash *dashPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP "const char *" string in Textual value to be converted. .AP Tk_Dash *dashPtr out Points to place to store the dash pattern value converted from \fIstring\fR. .BE .SH DESCRIPTION .PP These procedure parses the string and fills in the result in the Tk_Dash structure. The string can be a list of integers or a character string containing only .QW \fB.,\-_\fR or spaces. If all goes well, \fBTCL_OK\fR is returned. If \fIstring\fR does not have the proper syntax then \fBTCL_ERROR\fR is returned, an error message is left in the interpreter's result, and nothing is stored at *\fIdashPtr\fR. .PP The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the .QW outline color. The other segments are drawn transparent. .PP The second possible syntax is a character list containing only 5 possible characters .QW "\fB.,\-_ \fR" . The space can be used to enlarge the space between other line elements, and can not occur as the first position in the string. Some examples: .CS \-dash . = \-dash {2 4} \-dash \- = \-dash {6 4} \-dash \-. = \-dash {6 4 2 4} \-dash \-.. = \-dash {6 4 2 4 2 4} \-dash {. } = \-dash {2 8} \-dash , = \-dash {4 4} .CE .PP The main difference of this syntax with the previous is that it is shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This assures that .QW . will always be displayed as a dot and .QW \- always as a dash regardless of the line width. .PP On systems where only a limited set of dash patterns, the dash pattern will be displayed as the most close dash pattern that is available. For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically as the first one. .SH KEYWORDS dash, conversion |
Changes to doc/GetFont.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1992 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | | | | | < < < | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | '\" '\" Copyright (c) 1990-1992 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_AllocFontFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_AllocFontFromObj, Tk_GetFont, Tk_GetFontFromObj, Tk_NameOfFont, Tk_FreeFontFromObj, Tk_FreeFont \- maintain database of fonts .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp Tk_Font \fBTk_AllocFontFromObj(\fIinterp, tkwin, objPtr\fB)\fR .sp Tk_Font \fBTk_GetFont(\fIinterp, tkwin, string\fB)\fR .sp Tk_Font \fBTk_GetFontFromObj(\fItkwin, objPtr\fB)\fR .sp const char * \fBTk_NameOfFont(\fItkfont\fB)\fR .sp Tk_Font \fBTk_FreeFontFromObj(\fItkwin, objPtr\fB)\fR .sp void \fBTk_FreeFont(\fItkfont\fB)\fR .SH ARGUMENTS .AS "const char" *tkfont .AP "Tcl_Interp" *interp in Interpreter to use for error reporting. If \fBNULL\fR, then no error messages are left after errors. .AP Tk_Window tkwin in Token for window in which font will be used. |
︙ | ︙ | |||
54 55 56 57 58 59 60 | .SH DESCRIPTION .PP \fBTk_AllocFontFromObj\fR finds the font indicated by \fIobjPtr\fR and returns a token that represents the font. The return value can be used in subsequent calls to procedures such as \fBTk_GetFontMetrics\fR, \fBTk_MeasureChars\fR, and \fBTk_FreeFont\fR. The Tk_Font token will remain valid until | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | .SH DESCRIPTION .PP \fBTk_AllocFontFromObj\fR finds the font indicated by \fIobjPtr\fR and returns a token that represents the font. The return value can be used in subsequent calls to procedures such as \fBTk_GetFontMetrics\fR, \fBTk_MeasureChars\fR, and \fBTk_FreeFont\fR. The Tk_Font token will remain valid until \fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR is called to release it. \fIObjPtr\fR can contain either a symbolic name or a font description; see the documentation for the \fBfont\fR command for a description of the valid formats. If \fBTk_AllocFontFromObj\fR is unsuccessful (because, for example, \fIobjPtr\fR did not contain a valid font specification) then it returns \fBNULL\fR and leaves an error message in \fIinterp\fR's result if \fIinterp\fR is not \fBNULL\fR. \fBTk_AllocFontFromObj\fR caches information about the return |
︙ | ︙ | |||
87 88 89 90 91 92 93 | \fBTk_AllocFontFromObj\fR and \fBTk_GetFont\fR maintain a database of all fonts they have allocated. If the same font is requested multiple times (e.g. by different windows or for different purposes), then a single Tk_Font will be shared for all uses. The underlying resources will be freed automatically when no-one is using the font anymore. .PP | < < < > | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | \fBTk_AllocFontFromObj\fR and \fBTk_GetFont\fR maintain a database of all fonts they have allocated. If the same font is requested multiple times (e.g. by different windows or for different purposes), then a single Tk_Font will be shared for all uses. The underlying resources will be freed automatically when no-one is using the font anymore. .PP The procedure \fBTk_NameOfFont\fR is roughly the inverse of \fBTk_GetFont\fR. Given a \fItkfont\fR that was created by \fBTk_GetFont\fR (or \fBTk_AllocFontFromObj\fR), the return value is the \fIstring\fR argument that was passed to \fBTk_GetFont\fR to create the font. The string returned by \fBTk_NameOfFont\fR is only guaranteed to persist until the \fItkfont\fR is deleted. The caller must not modify this string. .PP When a font is no longer needed, \fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR should be called to release it. For \fBTk_FreeFontFromObj\fR the font to release is specified with the same information used to create it; for \fBTk_FreeFont\fR the font to release is specified with its Tk_Font token. There should be exactly one call to \fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR for each call to \fBTk_AllocFontFromObj\fR or \fBTk_GetFont\fR. .SH "SEE ALSO" Tk_FontId(3) .SH KEYWORDS font |
Changes to doc/GetGC.3.
1 2 3 4 5 6 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" 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_GetGC 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetGC, Tk_FreeGC \- maintain database of read-only graphics contexts .SH SYNOPSIS .nf |
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | graphics context. .AP Display *display in Display for which \fIgc\fR was allocated. .AP GC gc in X identifier for graphics context that is no longer needed. Must have been allocated by \fBTk_GetGC\fR. .BE .SH DESCRIPTION .PP \fBTk_GetGC\fR and \fBTk_FreeGC\fR manage a collection of graphics contexts being used by an application. The procedures allow graphics contexts to be shared, thereby avoiding the server overhead that would be incurred if a separate GC were created for each use. \fBTk_GetGC\fR takes arguments describing the desired graphics context and returns an X identifier | > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | graphics context. .AP Display *display in Display for which \fIgc\fR was allocated. .AP GC gc in X identifier for graphics context that is no longer needed. Must have been allocated by \fBTk_GetGC\fR. .BE .SH DESCRIPTION .PP \fBTk_GetGC\fR and \fBTk_FreeGC\fR manage a collection of graphics contexts being used by an application. The procedures allow graphics contexts to be shared, thereby avoiding the server overhead that would be incurred if a separate GC were created for each use. \fBTk_GetGC\fR takes arguments describing the desired graphics context and returns an X identifier |
︙ | ︙ | |||
62 63 64 65 66 67 68 69 70 | When a graphics context is no longer needed, \fBTk_FreeGC\fR should be called to release it. There should be exactly one call to \fBTk_FreeGC\fR for each call to \fBTk_GetGC\fR. When a graphics context is no longer in use anywhere (i.e. it has been freed as many times as it has been gotten) \fBTk_FreeGC\fR will release it to the X server and delete it from the database. .SH KEYWORDS graphics context | > | 63 64 65 66 67 68 69 70 71 72 | When a graphics context is no longer needed, \fBTk_FreeGC\fR should be called to release it. There should be exactly one call to \fBTk_FreeGC\fR for each call to \fBTk_GetGC\fR. When a graphics context is no longer in use anywhere (i.e. it has been freed as many times as it has been gotten) \fBTk_FreeGC\fR will release it to the X server and delete it from the database. .SH KEYWORDS graphics context |
Changes to doc/GetHINSTANCE.3.
1 2 3 | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. | | | 1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" .TH Tk_GetHISTANCE 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetHINSTANCE \- retrieve the global application instance handle .SH SYNOPSIS .nf |
︙ | ︙ |
Changes to doc/GetHWND.3.
1 2 3 | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. | | | 1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" .TH HWND 3 8.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetHWND, Tk_AttachHWND \- manage interactions between the Windows handle and an X window .SH SYNOPSIS .nf |
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 | .PP \fBTk_GetHWND\fR returns the Windows HWND identifier for X Windows window given by \fIwindow\fR. .PP \fBTk_AttachHWND\fR binds the Windows HWND identifier to the specified Tk_Window given by \fItkwin\fR. It returns an X Windows window that encapsulates the HWND. .SH KEYWORDS identifier, window | > | 28 29 30 31 32 33 34 35 36 37 | .PP \fBTk_GetHWND\fR returns the Windows HWND identifier for X Windows window given by \fIwindow\fR. .PP \fBTk_AttachHWND\fR binds the Windows HWND identifier to the specified Tk_Window given by \fItkwin\fR. It returns an X Windows window that encapsulates the HWND. .SH KEYWORDS identifier, window |
Changes to doc/GetImage.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_GetImage 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetImage, Tk_RedrawImage, Tk_SizeOfImage, Tk_FreeImage \- use an image in a widget .SH SYNOPSIS .nf |
︙ | ︙ | |||
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | in \fIdrawable\fR where y-coordinate \fIimageY\fR of the image should be displayed. .AP "int" widthPtr out Store width of \fIimage\fR (in pixels) here. .AP "int" heightPtr out Store height of \fIimage\fR (in pixels) here. .BE .SH DESCRIPTION .PP These procedures are invoked by widgets that wish to display images. \fBTk_GetImage\fR is invoked by a widget when it first decides to display an image. \fIname\fR gives the name of the desired image and \fItkwin\fR identifies the window where the image will be displayed. \fBTk_GetImage\fR looks up the image in the table of existing images and returns a token for a new instance of the image. If the image does not exist then \fBTk_GetImage\fR returns NULL | > | | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | in \fIdrawable\fR where y-coordinate \fIimageY\fR of the image should be displayed. .AP "int" widthPtr out Store width of \fIimage\fR (in pixels) here. .AP "int" heightPtr out Store height of \fIimage\fR (in pixels) here. .BE .SH DESCRIPTION .PP These procedures are invoked by widgets that wish to display images. \fBTk_GetImage\fR is invoked by a widget when it first decides to display an image. \fIname\fR gives the name of the desired image and \fItkwin\fR identifies the window where the image will be displayed. \fBTk_GetImage\fR looks up the image in the table of existing images and returns a token for a new instance of the image. If the image does not exist then \fBTk_GetImage\fR returns NULL and leaves an error message in \fIinterp->result\fR. .PP When a widget wishes to actually display an image it must call \fBTk_RedrawImage\fR, identifying the image (\fIimage\fR), a region within the image to redisplay (\fIimageX\fR, \fIimageY\fR, \fIwidth\fR, and \fIheight\fR), and a place to display the image (\fIdrawable\fR, \fIdrawableX\fR, and \fIdrawableY\fR). Tk will then invoke the appropriate image manager, which will |
︙ | ︙ | |||
101 102 103 104 105 106 107 | using the image will need to find out about the changes so that they can redisplay themselves. The \fIchangeProc\fR and \fIclientData\fR arguments to \fBTk_GetImage\fR are used for this purpose. \fIchangeProc\fR will be called by Tk whenever a change occurs in the image; it must match the following prototype: .CS | | | | | | | | | > > | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | using the image will need to find out about the changes so that they can redisplay themselves. The \fIchangeProc\fR and \fIclientData\fR arguments to \fBTk_GetImage\fR are used for this purpose. \fIchangeProc\fR will be called by Tk whenever a change occurs in the image; it must match the following prototype: .CS typedef void Tk_ImageChangedProc( ClientData \fIclientData\fR, int \fIx\fR, int \fIy\fR, int \fIwidth\fR, int \fIheight\fR, int \fIimageWidth\fR, int \fIimageHeight\fR); .CE The \fIclientData\fR argument to \fIchangeProc\fR is the same as the \fIclientData\fR argument to \fBTk_GetImage\fR. It is usually a pointer to the widget record for the widget or some other data structure managed by the widget. The arguments \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR identify a region within the image that must be redisplayed; they are specified in pixels measured from the upper-left corner of the image. The arguments \fIimageWidth\fR and \fIimageHeight\fR give the image's (new) size. .SH "SEE ALSO" Tk_CreateImageType .SH KEYWORDS images, redisplay |
Changes to doc/GetJoinStl.3.
1 2 3 4 5 6 | '\" '\" 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. | | | | | | < > | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | '\" '\" 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_GetJoinStyle 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetJoinStyle, Tk_NameOfJoinStyle \- translate between strings and join styles .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp int \fBTk_GetJoinStyle(\fIinterp, string, joinPtr\fB)\fR .sp const char * \fBTk_NameOfJoinStyle(\fIjoin\fB)\fR .SH ARGUMENTS .AS "Tcl_Interp" *joinPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP "const char" *string in String containing name of join style: one of .QW bevel , .QW miter , or .QW round . .AP int *joinPtr out Pointer to location in which to store X join style corresponding to \fIstring\fR. .AP int join in Join style: one of \fBJoinBevel\fR, \fBJoinMiter\fR, \fBJoinRound\fR. .BE .SH DESCRIPTION .PP \fBTk_GetJoinStyle\fR places in \fI*joinPtr\fR the X join style corresponding to \fIstring\fR, which will be one of \fBJoinBevel\fR, \fBJoinMiter\fR, or \fBJoinRound\fR. Join styles are typically used in X graphics contexts to indicate how adjacent line segments should be joined together. See the X documentation for information on what each style implies. .PP Under normal circumstances the return value is \fBTCL_OK\fR and \fIinterp\fR is unused. If \fIstring\fR does not contain a valid join style or an abbreviation of one of these names, then an error message is stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and \fI*joinPtr\fR is unmodified. .PP \fBTk_NameOfJoinStyle\fR is the logical inverse of \fBTk_GetJoinStyle\fR. Given a join style such as \fBJoinBevel\fR it returns a statically-allocated string corresponding to \fIjoin\fR. If \fIjoin\fR is not a legal join style, then .QW "unknown join style" is returned. .SH KEYWORDS bevel, join style, miter, round |
Changes to doc/GetJustify.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_GetJustifyFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetJustifyFromObj, Tk_GetJustify, Tk_NameOfJustify \- translate between strings and justification styles .SH SYNOPSIS .nf |
︙ | ︙ | |||
23 24 25 26 27 28 29 | const char * \fBTk_NameOfJustify(\fIjustify\fB)\fR .SH ARGUMENTS .AS "Tk_Justify" *justifyPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting, or NULL. .AP Tcl_Obj *objPtr in/out | | | | | < | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | const char * \fBTk_NameOfJustify(\fIjustify\fB)\fR .SH ARGUMENTS .AS "Tk_Justify" *justifyPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting, or NULL. .AP Tcl_Obj *objPtr in/out String value contains name of justification style, one of .QW left , .QW right , or .QW center . The internal rep will be modified to cache corresponding justify value. .AP "const char" *string in Same as \fIobjPtr\fR except description of justification style is passed as a string. .AP int *justifyPtr out Pointer to location in which to store justify value corresponding to \fIobjPtr\fR or \fIstring\fR. |
︙ | ︙ | |||
79 80 81 82 83 84 85 86 87 | .PP \fBTk_NameOfJustify\fR is the logical inverse of \fBTk_GetJustify\fR. Given a justify value it returns a statically-allocated string corresponding to \fIjustify\fR. If \fIjustify\fR is not a legal justify value, then .QW "unknown justification style" is returned. .SH KEYWORDS center, fill, justification, string | > | 78 79 80 81 82 83 84 85 86 87 | .PP \fBTk_NameOfJustify\fR is the logical inverse of \fBTk_GetJustify\fR. Given a justify value it returns a statically-allocated string corresponding to \fIjustify\fR. If \fIjustify\fR is not a legal justify value, then .QW "unknown justification style" is returned. .SH KEYWORDS center, fill, justification, string |
Changes to doc/GetOption.3.
1 2 3 4 5 6 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" 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_GetOption 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetOption \- retrieve an option from the option database .SH SYNOPSIS .nf |
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | Token for window. .AP "const char" *name in Name of desired option. .AP "const char" *class in Class of desired option. Null means there is no class for this option; do lookup based on name only. .BE .SH DESCRIPTION .PP This procedure is invoked to retrieve an option from the database associated with \fItkwin\fR's main window. If there is an option for \fItkwin\fR that matches the given \fIname\fR or \fIclass\fR, then it is returned in the form of a Tk_Uid. If multiple options match \fIname\fR and \fIclass\fR, then the highest-priority one is returned. If no option matches, then NULL is returned. .PP \fBTk_GetOption\fR caches options related to \fItkwin\fR so that successive calls for the same \fItkwin\fR will execute much more quickly than successive calls for different windows. .SH KEYWORDS class, name, option, retrieve | > > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | Token for window. .AP "const char" *name in Name of desired option. .AP "const char" *class in Class of desired option. Null means there is no class for this option; do lookup based on name only. .BE .SH DESCRIPTION .PP This procedure is invoked to retrieve an option from the database associated with \fItkwin\fR's main window. If there is an option for \fItkwin\fR that matches the given \fIname\fR or \fIclass\fR, then it is returned in the form of a Tk_Uid. If multiple options match \fIname\fR and \fIclass\fR, then the highest-priority one is returned. If no option matches, then NULL is returned. .PP \fBTk_GetOption\fR caches options related to \fItkwin\fR so that successive calls for the same \fItkwin\fR will execute much more quickly than successive calls for different windows. .SH KEYWORDS class, name, option, retrieve |
Changes to doc/GetPixels.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetPixelsFromObj, Tk_GetPixels, Tk_GetMMFromObj, Tk_GetScreenMM \- translate between strings and screen units .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp int \fBTk_GetPixelsFromObj(\fIinterp, tkwin, objPtr, intPtr\fB)\fR .sp int \fBTk_GetPixels(\fIinterp, tkwin, string, intPtr\fB)\fR .sp int \fBTk_GetMMFromObj(\fIinterp, tkwin, objPtr, doublePtr\fB)\fR .sp int |
︙ | ︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | Same as \fIobjPtr\fR except specification of distance is passed as a string. .AP int *intPtr out Pointer to location in which to store converted distance in pixels. .AP double *doublePtr out Pointer to location in which to store converted distance in millimeters. .BE .SH DESCRIPTION .PP These procedures take as argument a specification of distance on the screen (\fIobjPtr\fR or \fIstring\fR) and compute the corresponding distance either in integer pixels or floating-point millimeters. In either case, \fIobjPtr\fR or \fIstring\fR | > | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | Same as \fIobjPtr\fR except specification of distance is passed as a string. .AP int *intPtr out Pointer to location in which to store converted distance in pixels. .AP double *doublePtr out Pointer to location in which to store converted distance in millimeters. .BE .SH DESCRIPTION .PP These procedures take as argument a specification of distance on the screen (\fIobjPtr\fR or \fIstring\fR) and compute the corresponding distance either in integer pixels or floating-point millimeters. In either case, \fIobjPtr\fR or \fIstring\fR |
︙ | ︙ | |||
80 81 82 83 84 85 86 | by a character that is not one of the ones above) then \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fBTk_GetPixelsFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetPixelsFromObj\fR with the same \fIobjPtr\fR. .PP | < < < | > | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | by a character that is not one of the ones above) then \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fBTk_GetPixelsFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetPixelsFromObj\fR with the same \fIobjPtr\fR. .PP \fBTk_GetPixels\fR is identical to \fBTk_GetPixelsFromObj\fR except that the screen distance is specified with a string instead of an object. This prevents \fBTk_GetPixels\fR from caching the return value, so \fBTk_GetAnchor\fR is less efficient than \fBTk_GetPixelsFromObj\fR. .PP \fBTk_GetMMFromObj\fR and \fBTk_GetScreenMM\fR are similar to \fBTk_GetPixelsFromObj\fR and \fBTk_GetPixels\fR (respectively) except that they convert the screen distance to millimeters and store a double-precision floating-point result at \fI*doublePtr\fR. .SH KEYWORDS centimeters, convert, inches, millimeters, pixels, points, screen units |
Changes to doc/GetPixmap.3.
1 2 3 4 5 6 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" 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_GetPixmap 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetPixmap, Tk_FreePixmap \- allocate and free pixmaps .SH SYNOPSIS .nf |
︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | .AP "int" height in Height of pixmap. .AP "int" depth in Number of bits per pixel in pixmap. .AP Pixmap pixmap in Pixmap to destroy. .BE .SH DESCRIPTION .PP These procedures are identical to the Xlib procedures \fBXCreatePixmap\fR and \fBXFreePixmap\fR, except that they have extra code to manage X resource identifiers so that identifiers for deleted pixmaps can be reused in the future. It is important for Tk applications to use these procedures rather than \fBXCreatePixmap\fR and \fBXFreePixmap\fR; otherwise long-running applications may run out of resource identifiers. .PP \fBTk_GetPixmap\fR creates a pixmap suitable for drawing in \fId\fR, with dimensions given by \fIwidth\fR, \fIheight\fR, and \fIdepth\fR, and returns its identifier. \fBTk_FreePixmap\fR destroys the pixmap given by \fIpixmap\fR and makes its resource identifier available for reuse. .SH KEYWORDS pixmap, resource identifier | > > | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | .AP "int" height in Height of pixmap. .AP "int" depth in Number of bits per pixel in pixmap. .AP Pixmap pixmap in Pixmap to destroy. .BE .SH DESCRIPTION .PP These procedures are identical to the Xlib procedures \fBXCreatePixmap\fR and \fBXFreePixmap\fR, except that they have extra code to manage X resource identifiers so that identifiers for deleted pixmaps can be reused in the future. It is important for Tk applications to use these procedures rather than \fBXCreatePixmap\fR and \fBXFreePixmap\fR; otherwise long-running applications may run out of resource identifiers. .PP \fBTk_GetPixmap\fR creates a pixmap suitable for drawing in \fId\fR, with dimensions given by \fIwidth\fR, \fIheight\fR, and \fIdepth\fR, and returns its identifier. \fBTk_FreePixmap\fR destroys the pixmap given by \fIpixmap\fR and makes its resource identifier available for reuse. .SH KEYWORDS pixmap, resource identifier |
Changes to doc/GetRelief.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1998 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_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetReliefFromObj, Tk_GetRelief, Tk_NameOfRelief \- translate between strings and relief values .SH SYNOPSIS .nf |
︙ | ︙ | |||
24 25 26 27 28 29 30 | \fBTk_NameOfRelief(\fIrelief\fB)\fR .SH ARGUMENTS .AS "Tcl_Interp" *reliefPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP Tcl_Obj *objPtr in/out String value contains name of relief, one of | | | | | | | < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | \fBTk_NameOfRelief(\fIrelief\fB)\fR .SH ARGUMENTS .AS "Tcl_Interp" *reliefPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP Tcl_Obj *objPtr in/out String value contains name of relief, one of .QW flat , .QW groove , .QW raised , .QW ridge , .QW solid , or .QW sunken ; the internal rep will be modified to cache corresponding relief value. .AP char *string in Same as \fIobjPtr\fR except description of relief is passed as a string. .AP int *reliefPtr out Pointer to location in which to store relief value corresponding to \fIobjPtr\fR or \fIname\fR. |
︙ | ︙ |
Changes to doc/GetRootCrd.3.
1 2 3 4 5 6 | '\" '\" 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. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" 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_GetRootCoords 3 "" Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetRootCoords \- Compute root-window coordinates of window .SH SYNOPSIS .nf |
︙ | ︙ |
Changes to doc/GetScroll.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | | | | > > > > > > | < < < < < < | | > | | | | | | | | | | | < | < | | | > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME Tk_GetScrollInfo, Tk_GetScrollInfoObj \- parse arguments for scrolling commands .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp int \fBTk_GetScrollInfo(\fIinterp, argc, argv, dblPtr, intPtr\fB)\fR .sp int \fBTk_GetScrollInfoObj(\fIinterp, objc, objv, dblPtr, intPtr\fB)\fR .SH ARGUMENTS .AS "Tcl_Interp" *dblPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP int argc in Number of strings in \fIargv\fR array. .AP "const char" *argv[] in Argument strings. These represent the entire widget command, of which the first word is typically the widget name and the second word is typically \fBxview\fR or \fByview\fR. .AP int 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 which the first word is typically the widget name and the second word is typically \fBxview\fR or \fByview\fR. .AP double *dblPtr out Filled in with fraction from \fBmoveto\fR option, if any. .AP int *intPtr out Filled in with line or page count from \fBscroll\fR option, if any. The value may be negative. .BE .SH DESCRIPTION .PP \fBTk_GetScrollInfo\fR parses the arguments expected by widget scrolling commands such as \fBxview\fR and \fByview\fR. It receives the entire list of words that make up a widget command and parses the words starting with \fIargv\fR[2]. The words starting with \fIargv\fR[2] must have one of the following forms: .CS \fBmoveto \fIfraction\fR \fBscroll \fInumber\fB units\fR \fBscroll \fInumber\fB pages\fR .CE .LP Any of the \fBmoveto\fR, \fBscroll\fR, \fBunits\fR, and \fBpages\fR keywords may be abbreviated. If \fIargv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR is returned as result and \fI*dblPtr\fR is filled in with the \fIfraction\fR argument to the command, which must be a proper real value. If \fIargv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR or \fBTK_SCROLL_PAGES\fR is returned and \fI*intPtr\fR is filled in with the \fInumber\fR value, which must be a proper integer. If an error occurs in parsing the arguments, \fBTK_SCROLL_ERROR\fR is returned and an error message is left in \fIinterp->result\fR. .PP \fBTk_GetScrollInfoObj\fR is identical in function to \fBTk_GetScrollInfo\fR. However, \fBTk_GetScrollInfoObj\fR accepts Tcl_Obj style arguments, making it more appropriate for use with new development. .SH KEYWORDS parse, scrollbar, scrolling command, xview, yview |
Changes to doc/GetSelect.3.
1 2 3 4 5 6 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\&qu |