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.
|
Changes to .fossil-settings/encoding-glob.
1 2 | 1 2 3 4 5 6 7 8 9 10 | + + - + - | win/buildall.vc.bat win/makefile.bc win/makefile.vc win/mkd.bat |
Changes to .fossil-settings/ignore-glob.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - + + + | */Makefile */autom4te.cache */config.cache */config.log */config.status */tkConfig.sh */wish* |
︙ |
Changes to .gitignore.
︙ | |||
22 23 24 25 26 27 28 | 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* |
︙ |
Changes to .project.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | <?xml version="1.0" encoding="UTF-8"?> <projectDescription> |
︙ |
Deleted .travis.yml.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to ChangeLog.
more than 10,000 changes
Changes to ChangeLog.2002.
︙ | |||
2234 2235 2236 2237 2238 2239 2240 | 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 |
︙ | |||
5214 5215 5216 5217 5218 5219 5220 | 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 |
︙ |
Changes to ChangeLog.2004.
︙ | |||
807 808 809 810 811 812 813 | 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 |
︙ | |||
3517 3518 3519 3520 3521 3522 3523 | 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 |
︙ |
Deleted ChangeLog.2007.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to README.md.
1 2 | 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 |
︙ |
Changes to changes.
︙ | |||
329 330 331 332 333 334 335 | 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. |
︙ | |||
1311 1312 1313 1314 1315 1316 1317 | 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), |
︙ | |||
3484 3485 3486 3487 3488 3489 3490 | 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 |
︙ | |||
3994 3995 3996 3997 3998 3999 4000 | 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) |
︙ | |||
5095 5096 5097 5098 5099 5100 5101 | 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) |
︙ | |||
6496 6497 6498 6499 6500 6501 6502 | 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 --- |
︙ | |||
6920 6921 6922 6923 6924 6925 6926 | 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) |
︙ | |||
6987 6988 6989 6990 6991 6992 6993 | 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) |
︙ | |||
7251 7252 7253 7254 7255 7256 7257 | 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) |
Added compat/limits.h.
|
Deleted compat/stdbool.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted compat/stdint.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Added compat/stdlib.h.
|
Added compat/unistd.h.
|
Changes to doc/3DBorder.3.
1 2 3 4 5 6 | 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. |
︙ | |||
60 61 62 63 64 65 66 | 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 |
︙ | |||
87 88 89 90 91 92 93 | 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 |
︙ | |||
110 111 112 113 114 115 116 | 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 |
︙ | |||
234 235 236 237 238 239 240 | 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 |
︙ | |||
286 287 288 289 290 291 292 293 | 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 |
Changes to doc/AddOption.3.
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 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 | 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 | 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. |
︙ | |||
41 42 43 44 45 46 47 | 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. |
︙ | |||
107 108 109 110 111 112 113 | 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 |
Changes to doc/CanvPsY.3.
1 2 3 4 5 | 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. |
︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 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 | 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. |
Changes to doc/CanvTkwin.3.
1 2 3 4 5 | 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. |
︙ | |||
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | 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. |
︙ | |||
137 138 139 140 141 142 143 | 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: |
Changes to doc/CanvTxtInfo.3.
1 2 3 4 5 | 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. |
︙ | |||
42 43 44 45 46 47 48 | 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; |
︙ | |||
92 93 94 95 96 97 98 99 100 | 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 | 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. |
︙ | |||
27 28 29 30 31 32 33 | 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. |
Changes to doc/ClrSelect.3.
1 2 3 4 5 6 | 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. |
Changes to doc/ConfigWidg.3.
1 2 3 4 5 6 | 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. |
︙ | |||
57 58 59 60 61 62 63 | 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 |
︙ | |||
85 86 87 88 89 90 91 | 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 |
︙ | |||
157 158 159 160 161 162 163 | 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 |
︙ | |||
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 | 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 | 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 | 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 |
︙ | |||
578 579 580 581 582 583 584 | 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 |
︙ | |||
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 | 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 | 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. |
︙ |
Changes to doc/CoordToWin.3.
1 2 3 4 5 6 | 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. |
Changes to doc/CrtCmHdlr.3.
1 2 3 4 5 | 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. |
Changes to doc/CrtConsoleChan.3.
1 2 3 4 5 | 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. |
︙ |
Changes to doc/CrtErrHdlr.3.
1 2 3 4 5 6 | 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. |
︙ | |||
68 69 70 71 72 73 74 | 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 |
︙ | |||
132 133 134 135 136 137 138 139 140 | 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 | 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. |
︙ |
Changes to doc/CrtImgType.3.
1 2 3 4 5 6 | 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. |
︙ | |||
273 274 275 276 277 278 279 280 281 282 | 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 |
Changes to doc/CrtItemType.3.
1 2 3 4 5 | 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. |
︙ | |||
40 41 42 43 44 45 46 | 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 |
︙ | |||
397 398 399 400 401 402 403 | 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. |
︙ | |||
491 492 493 494 495 496 497 | 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 |
Changes to doc/CrtPhImgFmt.3.
1 2 3 4 5 6 | 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. |
︙ | |||
41 42 43 44 45 46 47 | 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 { |
︙ | |||
260 261 262 263 264 265 266 267 268 269 270 | 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 | 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. |
︙ | |||
40 41 42 43 44 45 46 | 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 |
︙ | |||
108 109 110 111 112 113 114 115 116 | 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 | 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. |
︙ | |||
48 49 50 51 52 53 54 | 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 |
︙ | |||
82 83 84 85 86 87 88 | 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 |
︙ | |||
137 138 139 140 141 142 143 144 145 146 | 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 | 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. |
Changes to doc/DrawFocHlt.3.
1 2 3 4 5 | 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. |
︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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 | 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. |
︙ | |||
77 78 79 80 81 82 83 | 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. |
Changes to doc/FindPhoto.3.
1 2 3 4 5 6 | 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. |
︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 | 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. |
︙ | |||
119 120 121 122 123 124 125 | 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; |
︙ | |||
188 189 190 191 192 193 194 | 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. |
Changes to doc/FontId.3.
1 2 3 4 5 | 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. |
︙ | |||
33 34 35 36 37 38 39 | 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 |
︙ |
Changes to doc/FreeXId.3.
1 2 3 4 5 6 | 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. |
Changes to doc/GeomReq.3.
1 2 3 4 5 6 | 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. |
︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 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 | 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 | 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. |
︙ | |||
24 25 26 27 28 29 30 | 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: |
︙ |
Changes to doc/GetBitmap.3.
1 2 3 4 5 6 | 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. |
︙ | |||
45 46 47 48 49 50 51 | 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. |
︙ | |||
205 206 207 208 209 210 211 | 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 |
︙ | |||
277 278 279 280 281 282 283 284 | 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 |
Changes to doc/GetCapStyl.3.
1 2 3 4 5 6 | 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. |
Changes to doc/GetClrmap.3.
1 2 3 4 5 6 | 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. |
︙ |
Changes to doc/GetColor.3.
1 2 3 4 5 6 | 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. |
︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 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 |
︙ | |||
102 103 104 105 106 107 108 | 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 |
︙ | |||
169 170 171 172 173 174 175 | 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 |
Changes to doc/GetCursor.3.
1 2 3 4 5 6 | 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. |
︙ | |||
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | 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 | 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. |
︙ | |||
208 209 210 211 212 213 214 215 | 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 |
Changes to doc/GetDash.3.
1 2 3 4 5 6 | 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. |
Changes to doc/GetFont.3.
1 2 3 4 5 6 | 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. |
︙ | |||
54 55 56 57 58 59 60 | 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 |
︙ | |||
87 88 89 90 91 92 93 | 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 |
Changes to doc/GetGC.3.
1 2 3 4 5 6 | 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. |
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 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 | 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 | 1 2 3 4 5 6 7 8 9 10 11 | - + | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. |
︙ |
Changes to doc/GetHWND.3.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 | - + | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. |
︙ | |||
28 29 30 31 32 33 34 35 36 | 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 | 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. |
︙ | |||
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | 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 |
︙ | |||
101 102 103 104 105 106 107 | 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 |
Changes to doc/GetJoinStl.3.
1 2 3 4 5 6 | 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. |
Changes to doc/GetJustify.3.
1 2 3 4 5 6 | 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. |
︙ | |||
23 24 25 26 27 28 29 | 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 |
︙ | |||
79 80 81 82 83 84 85 86 87 | 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 | 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. |
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 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 | 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. |
︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 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 | 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 |
Changes to doc/GetPixmap.3.
1 2 3 4 5 6 | 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. |
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | 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 | 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. |
︙ | |||
24 25 26 27 28 29 30 | 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 |
︙ |
Changes to doc/GetRootCrd.3.
1 2 3 4 5 6 | 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. |
︙ |
Changes to doc/GetScroll.3.
1 2 3 4 5 6 | 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. |
Changes to doc/GetSelect.3.
1 2 3 4 5 6 | 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. |
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 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 | + - - - - - + + + + - - + - - - - - + + + + + | Form in which to retrieve selection. .AP Tk_GetSelProc *proc in Procedure to invoke to process pieces of the selection as they are retrieved. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE .SH DESCRIPTION .PP \fBTk_GetSelection\fR retrieves the selection specified by the atom \fIselection\fR in the format specified by \fItarget\fR. The selection may actually be retrieved in several pieces; as each piece is retrieved, \fIproc\fR is called to process the piece. \fIProc\fR should have arguments and result that match the type \fBTk_GetSelProc\fR: |
Changes to doc/GetUid.3.
1 2 3 4 5 6 | 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 | - + + + | '\" '\" 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. |
Changes to doc/GetVRoot.3.
1 2 3 4 5 6 | 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. |
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 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 | + + | .AP int yPtr out Points to word in which to store y-offset of virtual root. .AP "int" widthPtr out Points to word in which to store width of virtual root. .AP "int" heightPtr out Points to word in which to store height of virtual root. .BE .SH DESCRIPTION .PP \fBTk_GetVRootGeometry\fR returns geometry information about the virtual root window associated with \fItkwin\fR. The .QW associated virtual root is the one in which \fItkwin\fR's nearest top-level ancestor (or \fItkwin\fR itself if it is a top-level window) has been reparented by the window manager. This window is identified by a \fB__SWM_ROOT\fR or \fB__WM_ROOT\fR property placed on the top-level window by the window manager. If \fItkwin\fR is not associated with a virtual root (e.g. because the window manager does not use virtual roots) then *\fIxPtr\fR and *\fIyPtr\fR will be set to 0 and *\fIwidthPtr\fR and *\fIheightPtr\fR will be set to the dimensions of the screen containing \fItkwin\fR. .SH KEYWORDS geometry, height, location, virtual root, width, window manager |
Changes to doc/GetVisual.3.
1 2 3 4 5 6 | 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. |
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | .PP \fBTk_GetVisual\fR takes a string description of a visual and finds a suitable X Visual for use in \fItkwin\fR, if there is one. It returns a pointer to the X Visual structure for the visual and stores the number of bits per pixel for it at \fI*depthPtr\fR. If \fIstring\fR is unrecognizable or if no suitable visual could be found, then NULL is returned and \fBTk_GetVisual\fR leaves |
︙ |
Changes to doc/Grab.3.
1 2 3 | 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 | - + + + + + - + + | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. |
Changes to doc/HWNDToWindow.3.
1 2 3 | 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 | - + + + | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. |
Changes to doc/HandleEvent.3.
1 2 3 4 5 6 | 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 | - + + | '\" '\" Copyright (c) 1990-1992 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. |
︙ | |||
38 39 40 41 42 43 44 45 46 | 39 40 41 42 43 44 45 46 47 48 | + | it is possible to invoke \fBTk_HandleEvent\fR recursively from a handler called by \fBTk_HandleEvent\fR. This sort of operation is useful in some modal situations, such as when a notifier has been popped up and an application wishes to wait for the user to click a button in the notifier before doing anything else. .SH KEYWORDS callback, event, handler, window |
Changes to doc/IdToWindow.3.
1 2 3 4 5 | 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) 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. |
Changes to doc/ImgChanged.3.
1 2 3 4 5 6 | 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) 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. |
Changes to doc/Inactive.3.
1 2 3 | 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 | - + - + + - - + + + | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. |
Changes to doc/InternAtom.3.
1 2 3 4 5 6 | 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. |
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + | .AP Tk_Window tkwin in Token for window. Used to map atom or name relative to a particular display. .AP "const char" *name in String name for which atom is desired. .AP Atom atom in Atom for which corresponding string name is desired. .BE .SH DESCRIPTION .PP These procedures are similar to the Xlib procedures \fBXInternAtom\fR and \fBXGetAtomName\fR. \fBTk_InternAtom\fR returns the atom identifier associated with string given by \fIname\fR; the atom identifier is only valid for the display associated with \fItkwin\fR. |
︙ | |||
47 48 49 50 51 52 53 54 55 | 48 49 50 51 52 53 54 55 56 57 | + | Tk caches the information returned by \fBTk_InternAtom\fR and \fBTk_GetAtomName\fR so that future calls for the same information can be serviced from the cache without contacting the server. Thus \fBTk_InternAtom\fR and \fBTk_GetAtomName\fR are generally much faster than their Xlib counterparts, and they should be used in place of the Xlib procedures. .SH KEYWORDS atom, cache, display |
Changes to doc/MainLoop.3.
1 2 3 4 5 6 | 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) 1990-1992 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. |
Changes to doc/MainWin.3.
1 2 3 4 5 6 | 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 | - + - + + + + - + - + + | '\" '\" 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. |
Changes to doc/MaintGeom.3.
1 2 3 4 5 6 | 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 | - + - + - + - - + + - - + + - - - + + + - - - + + + - + - + + - + - + - - - + + + - - + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - + - + | '\" '\" 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. |
Changes to doc/ManageGeom.3.
1 2 3 4 5 6 | 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. |
︙ | |||
28 29 30 31 32 33 34 | 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 | - + - - + + - + - - - + + + - + - + - + - + - - - + + + - + + | .AP ClientData clientData in Arbitrary one-word value to pass to geometry manager callbacks. .BE .SH DESCRIPTION .PP \fBTk_ManageGeometry\fR arranges for a particular geometry manager, described by the \fImgrPtr\fR argument, to control the geometry |
Changes to doc/MapWindow.3.
1 2 3 4 5 6 | 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 | - + + - - - + + + + | '\" '\" Copyright (c) 1990 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. |
Changes to doc/MeasureChar.3.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" 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. |
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | .AP Tk_Font tkfont in Token for font in which text is to be drawn or measured. Must have been returned by a previous call to \fBTk_GetFont\fR. .AP "const char" *string in Text to be measured or displayed. Need not be null terminated. Any non-printing meta-characters in the string (such as tabs, newlines, and other control characters) will be measured or displayed in a |
︙ | |||
56 57 58 59 60 61 62 | 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 | - + - + - + - + - + - + - + | Filled with the number of pixels occupied by the number of characters returned as the result of \fBTk_MeasureChars\fR. .AP Display *display in Display on which to draw. .AP Drawable drawable in Window or pixmap in which to draw. .AP GC gc in |
Changes to doc/MoveToplev.3.
1 2 3 4 5 6 | 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. |
︙ | |||
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 | 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 | + + | top-left pixel of the decorative border supplied for \fItkwin\fR by the window manager, if there is one. .AP int y in New y-coordinate for the top-left pixel of \fItkwin\fR's border, or the top-left pixel of the decorative border supplied for \fItkwin\fR by the window manager, if there is one. .BE .SH DESCRIPTION .PP In general, a window should never set its own position; this should be done only by the geometry manger that is responsible for the window. For top-level windows the window manager is effectively the geometry manager; Tk provides interface code between the application and the window manager to convey the application's desires to the geometry manager. The desired size for a top-level window is conveyed using the usual \fBTk_GeometryRequest\fR mechanism. The procedure \fBTk_MoveToplevelWindow\fR may be used by an application to request a particular position for a top-level window; this procedure is similar in function to the \fBwm geometry\fR Tcl command except that negative offsets cannot be specified. It is invoked by widgets such as menus that want to appear at a particular place on the screen. .PP When \fBTk_MoveToplevelWindow\fR is called it does not immediately pass on the new desired location to the window manager; it defers this action until all other outstanding work has been completed, using the \fBTcl_DoWhenIdle\fR mechanism. .SH KEYWORDS position, top-level window, window manager |
Changes to doc/Name.3.
1 2 3 4 5 6 | 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-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. |
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 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 | + - + + | .AP Tk_Window tkwin in Token for window. .AP Tcl_Interp *interp out Interpreter to use for error reporting. .AP "const char" *pathName in Character string containing path name of window. .BE .SH DESCRIPTION .PP Each window managed by Tk has two names, a short name that identifies a window among children of the same parent, and a path name that identifies the window uniquely among all the windows belonging to the same main window. The path name is used more often in Tk than the short name; many commands, like \fBbind\fR, expect path names as arguments. .PP The \fBTk_Name\fR macro returns a window's short name, which is the same as the \fIname\fR argument passed to \fBTk_CreateWindow\fR when the window was created. The value is returned as a Tk_Uid, which may be used just like a string pointer but also has the properties of a unique identifier (see the manual entry for \fBTk_GetUid\fR for details). .PP |
︙ | |||
69 70 71 72 73 74 75 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + - + | is created as a child of the root window, but its logical parent will usually be a window within the application. .PP The procedure \fBTk_NameToWindow\fR returns the token for a window given its path name (the \fIpathName\fR argument) and another window belonging to the same main window (\fItkwin\fR). It normally returns a token for the named window, but if no such window exists |
Changes to doc/NameOfImg.3.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + - - + + + + | .SH NAME Tk_NameOfImage \- Return name of image. .SH SYNOPSIS .nf \fB#include <tk.h>\fR .sp const char * |
Changes to doc/OwnSelect.3.
1 2 3 4 5 6 | 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. |
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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 | + - - + + | .AP Atom selection in The name of the selection to be owned, such as XA_PRIMARY. .AP Tk_LostSelProc *proc in Procedure to invoke when \fItkwin\fR loses selection ownership later. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE .SH DESCRIPTION .PP \fBTk_OwnSelection\fR arranges for \fItkwin\fR to become the new owner of the selection specified by the atom \fIselection\fR. After this call completes, future requests for the selection will be directed to handlers created for \fItkwin\fR using \fBTk_CreateSelHandler\fR. When \fItkwin\fR eventually loses the selection ownership, \fIproc\fR will be invoked so that the window can clean itself up (e.g. by unhighlighting the selection). \fIProc\fR should have arguments and result that match the type \fBTk_LostSelProc\fR: .CS |
Changes to doc/ParseArgv.3.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | '\" '\" Copyright (c) 1990-1992 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. |
︙ | |||
56 57 58 59 60 61 62 | 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 | - - + + - + - - - - + + + + | an argument that does not match \fIargTable\fR and returned to the caller; however, if the \fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR bit is set in \fIflags\fR then \fIargv[0]\fR will be processed just like the other elements of \fIargv\fR. .PP \fBTk_ParseArgv\fR normally returns the value \fBTCL_OK\fR. If an error occurs while parsing the arguments, then \fBTCL_ERROR\fR is returned and |
︙ | |||
182 183 184 185 186 187 188 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - + - | arguments are discarded from \fIargv\fR. If \fItkwin\fR is NULL, then argument specifiers of this type are ignored (as if they did not exist). .TP \fBTK_ARGV_HELP\fR When this kind of option is encountered, \fBTk_ParseArgv\fR uses the \fIhelp\fR fields of \fIargTable\fR to format a message describing |
︙ | |||
256 257 258 259 260 261 262 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | - + - - + | \fIArgc\fR and \fIargv\fR refer to all of the options after the matching one. \fIGenfunc\fR should behave in a fashion similar to \fBTk_ParseArgv\fR: parse as many of the remaining arguments as it can, then return any that are left by compacting them to the beginning of \fIargv\fR (starting at \fIargv\fR[0]). \fIGenfunc\fR should return a count of how many arguments are left in \fIargv\fR; \fBTk_ParseArgv\fR will process them. If \fIgenfunc\fR encounters |
︙ | |||
308 309 310 311 312 313 314 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | - + - + - + - + - - + + - + | char *fileName = defaultFileName; Boolean exec = FALSE; /* * Define option descriptions. */ Tk_ArgvInfo argTable[] = { |
︙ |
Changes to doc/QWinEvent.3.
1 2 3 4 5 | 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. |
︙ | |||
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 | 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 | + + | .AP XEvent *eventPtr in An event to add to the event queue. It is important that all unused fields of the structure be set to zero. .AP Tcl_QueuePosition position in Where to add the new event in the queue: \fBTCL_QUEUE_TAIL\fR, \fBTCL_QUEUE_HEAD\fR, or \fBTCL_QUEUE_MARK\fR. .BE .SH DESCRIPTION .PP \fBTk_QueueWindowEvent\fR places a window event on Tcl's internal event queue for eventual servicing. It creates a Tcl_Event structure, copies the event into that structure, and calls \fBTcl_QueueEvent\fR to add the event to the queue. When the event is eventually removed from the queue it is processed just like all window events. .PP When multiple motion events are received for the same window in rapid succession, they are collapsed by default. This behavior can be controlled with \fBTk_CollapseMotionEvents\fR. \fBTk_CollapseMotionEvents\fR always returns the previous value for collapse behavior on the \fIdisplay\fR. .PP The \fIposition\fR argument to \fBTk_QueueWindowEvent\fR has the same significance as for \fBTcl_QueueEvent\fR; see the documentation for \fBTcl_QueueEvent\fR for details. .SH KEYWORDS callback, clock, handler, modal timeout, events |
Changes to doc/Restack.3.
1 2 3 4 5 6 | 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. |
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + | Indicates new position of \fItkwin\fR relative to \fIother\fR; must be \fBAbove\fR or \fBBelow\fR. .AP Tk_Window other in \fITkwin\fR will be repositioned just above or below this window. Must be a sibling of \fItkwin\fR or a descendant of a sibling. If NULL then \fItkwin\fR is restacked above or below all siblings. .BE .SH DESCRIPTION .PP \fBTk_RestackWindow\fR changes the stacking order of \fIwindow\fR relative to its siblings. If \fIother\fR is specified as NULL then \fIwindow\fR is repositioned at the top or bottom of its stacking order, depending on whether \fIaboveBelow\fR is \fBAbove\fR or \fBBelow\fR. If \fIother\fR has a non-NULL value then \fIwindow\fR is repositioned just above or below \fIother\fR. .PP The \fIaboveBelow\fR argument must have one of the symbolic values \fBAbove\fR or \fBBelow\fR. Both of these values are defined by the include file <X11/Xlib.h>. .SH KEYWORDS above, below, obscure, stacking order |
Changes to doc/RestrictEv.3.
1 2 3 4 5 6 | 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 | - + - + - + - + - + + - - - + + + - + - + | '\" '\" 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. |
︙ |
Changes to doc/SetAppName.3.
1 2 3 4 5 6 | 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 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. |
︙ | |||
54 55 56 57 58 59 60 61 62 | 55 56 57 58 59 60 61 62 63 64 | + | The application can be made accessible again by calling \fBTk_SetAppName\fR. .PP \fBTk_SetAppName\fR is called automatically by \fBTk_Init\fR, so applications do not normally need to call it explicitly. .PP The command \fBtk appname\fR provides Tcl-level access to the functionality of \fBTk_SetAppName\fR. .SH KEYWORDS application, name, register, send command |
Changes to doc/SetCaret.3.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" Copyright (c) 2002 ActiveState Corporation. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + | .AP int x in Window-relative x coordinate. .AP int y in Window-relative y coordinate. .AP int h in Height of the caret in the window. .BE .SH DESCRIPTION .PP \fBTk_SetCaretPos\fR sets the caret location for the display of the specified Tk_Window \fItkwin\fR. The caret is the per-display cursor location used for indicating global focus (e.g. to comply with Microsoft Accessibility guidelines), as well as for location of the over-the-spot XIM (X Input Methods) or Windows IME windows. .SH KEYWORDS caret, cursor |
Changes to doc/SetClass.3.
1 2 3 4 5 6 | 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 | - + + | '\" '\" 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. |
︙ | |||
49 50 51 52 53 54 55 56 57 | 50 51 52 53 54 55 56 57 58 59 | + | \fBTk_Class\fR is a macro that returns the current value of \fItkwin\fR's class. The value is returned as a Tk_Uid, which may be used just like a string pointer but also has the properties of a unique identifier (see the manual entry for \fBTk_GetUid\fR for details). If \fItkwin\fR has not yet been given a class, then \fBTk_Class\fR will return NULL. .SH KEYWORDS class, unique identifier, window, window manager |
Changes to doc/SetClassProcs.3.
1 2 3 4 5 | 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 | - + - + + - + - + - - + + - + - - - - + + + + - - - + + + + | '\" '\" 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. |
Changes to doc/SetGrid.3.
1 2 3 4 5 6 | 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. |
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + | Height in grid units that corresponds to the pixel dimension \fItkwin\fR has requested via \fBTk_GeometryRequest\fR. .AP int widthInc in Width of one grid unit, in pixels. .AP int heightInc in Height of one grid unit, in pixels. .BE .SH DESCRIPTION .PP \fBTk_SetGrid\fR turns on gridded geometry management for \fItkwin\fR's toplevel window and specifies the geometry of the grid. \fBTk_SetGrid\fR is typically invoked by a widget when its \fBsetGrid\fR option is true. It restricts interactive resizing of \fItkwin\fR's toplevel window so |
︙ | |||
55 56 57 58 59 60 61 62 63 | 56 57 58 59 60 61 62 63 64 65 | + | with gridding enabled. If \fBTk_SetGrid\fR or \fBTk_UnsetGrid\fR is invoked when some other window is already controlling gridding for \fItkwin\fR's toplevel, the calls for the new window have no effect. .PP See the \fBwm\fR manual entry for additional information on gridded geometry management. .SH KEYWORDS grid, window, window manager |
Changes to doc/SetOptions.3.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + - + | '\" '\" Copyright (c) 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. |
︙ | |||
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 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 | + + + - + - + | Tcl_Obj * \fBTk_GetOptionValue(\fIinterp, recordPtr, optionTable, namePtr, tkwin\fB)\fR .sp Tcl_Obj * \fBTk_GetOptionInfo(\fIinterp, recordPtr, optionTable, namePtr, tkwin\fB)\fR .sp \fBTk_FreeConfigOptions(\fIrecordPtr, optionTable, tkwin\fB)\fR .sp int \fBTk_Offset(\fItype, field\fB)\fR .SH ARGUMENTS .AS Tk_SavedOptions "*const objv[]" in/out .AP Tcl_Interp *interp in A Tcl interpreter. Most procedures use this only for returning error messages; if it is NULL then no error messages are returned. For \fBTk_CreateOptionTable\fR the value cannot be NULL; it gives the interpreter in which the option table will be used. .AP "const Tk_OptionSpec" *templatePtr in Points to an array of static information that describes the configuration options that are supported. Used to build a Tk_OptionTable. The information pointed to by this argument must exist for the lifetime of the Tk_OptionTable. .AP Tk_OptionTable optionTable in Token for an option table. Must have been returned by a previous call to \fBTk_CreateOptionTable\fR. |
︙ | |||
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | 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 | + + + + + + - - + + - + - + | (e.g., because \fInamePtr\fR contains an unknown option name) then NULL is returned and an error message is left in \fIinterp\fR's result unless \fIinterp\fR is NULL. .PP \fBTk_FreeConfigOptions\fR must be invoked when a widget is deleted. It frees all of the resources associated with any of the configuration options defined in \fIrecordPtr\fR by \fIoptionTable\fR. .PP The \fBTk_Offset\fR macro is provided as a safe way of generating the \fIobjOffset\fR and \fIinternalOffset\fR values for entries in Tk_OptionSpec 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 "TEMPLATES" .PP The array of Tk_OptionSpec structures passed to \fBTk_CreateOptionTable\fR via its \fItemplatePtr\fR argument describes the configuration options supported by a particular class of widgets. Each structure specifies one configuration option and has the following fields: .CS typedef struct { Tk_OptionType \fItype\fR; const char *\fIoptionName\fR; const char *\fIdbName\fR; const char *\fIdbClass\fR; const char *\fIdefValue\fR; |
︙ | |||
430 431 432 433 434 435 436 | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | - + - - | .TP \fBTK_OPTION_STRING_TABLE\fR For this type, \fIclientData\fR is a pointer to an array of strings suitable for passing to \fBTcl_GetIndexFromObj\fR. The value must be one of the strings in the table, or a unique abbreviation of one of the strings. The internal form is an integer giving the index into the table of the matching string, like the return value |
︙ |
Changes to doc/SetVisual.3.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | '\" '\" Copyright (c) 1992 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. |
︙ | |||
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 | 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 | + + | New visual type to use for \fItkwin\fR. .AP "int" depth in Number of bits per pixel desired for \fItkwin\fR. .AP Colormap colormap in New colormap for \fItkwin\fR, which must be compatible with \fIvisual\fR and \fIdepth\fR. .BE .SH DESCRIPTION .PP When Tk creates a new window it assigns it the default visual characteristics (visual, depth, and colormap) for its screen. \fBTk_SetWindowVisual\fR may be called to change them. \fBTk_SetWindowVisual\fR must be called before the window has actually been created in X (e.g. before \fBTk_MapWindow\fR or \fBTk_MakeWindowExist\fR has been invoked for the window). The safest thing is to call \fBTk_SetWindowVisual\fR immediately after calling \fBTk_CreateWindow\fR. If \fItkwin\fR has already been created before \fBTk_SetWindowVisual\fR is called then it returns 0 and does not make any changes; otherwise it returns 1 to signify that the operation completed successfully. .PP Note: \fBTk_SetWindowVisual\fR should not be called if you just want to change a window's colormap without changing its visual or depth; call \fBTk_SetWindowColormap\fR instead. .SH KEYWORDS colormap, depth, visual |
Changes to doc/StrictMotif.3.
1 2 3 4 5 | 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) 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. |
Changes to doc/TextLayout.3.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" 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. |
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 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 | + - + | \fBTk_DistanceToTextLayout(\fIlayout, x, y\fB)\fR .sp int \fBTk_IntersectTextLayout(\fIlayout, x, y, width, height\fB)\fR .sp void \fBTk_TextLayoutToPostscript(\fIinterp, layout\fB)\fR .SH ARGUMENTS .AS Tk_TextLayout "*xPtr, *yPtr" .AP Tk_Font tkfont in Font to use when constructing and displaying a text layout. The \fItkfont\fR must remain valid for the lifetime of the text layout. Must have been returned by a previous call to \fBTk_GetFont\fR. .AP "const char" *string in Potentially multi-line string whose dimensions are to be computed and stored in the text layout. The \fIstring\fR must remain valid for the |
︙ | |||
73 74 75 76 77 78 79 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + | \fBTK_IGNORE_NEWLINES\fR means that newline/return characters should not cause a line break. If either tabs or newlines/returns are ignored, then they will be treated as regular characters, being measured and displayed in a platform-dependent manner as described in \fBTk_MeasureChars\fR, and will not have any special behaviors. .AP int *widthPtr out If non-NULL, filled with either the width, in pixels, of the widest |
︙ | |||
97 98 99 100 101 102 103 | 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 | - + - + - + + - + - + - + | text layout. .AP int "x, y" in Point, in pixels, at which to place the upper-left hand corner of the text layout when it is being drawn, or the coordinates of a point (with respect to the upper-left hand corner of the text layout) to check against the text layout. .AP int firstChar in |
︙ | |||
178 179 180 181 182 183 184 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - - - - - + + + - + | considered closest to the first character in the text layout; any point whose \fIy\fR-value is greater than the height of the text layout will be considered closest to the last character in the text layout. Any point whose \fIx\fR-value is less than 0 will be considered closest to the first character on that line; any point whose \fIx\fR-value is greater than the width of the text layout will be considered closest to the last character on that line. The return value is the index of the character that was closest |
︙ | |||
227 228 229 230 231 232 233 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + - | entirely inside of the rectangle. .PP \fBTk_TextLayoutToPostscript\fR outputs code consisting of a Postscript array of strings that represent the individual lines in \fIlayout\fR. It is the responsibility of the caller to take the Postscript array of strings and add some Postscript function operate on the array to render each of the lines. The code that represents the Postscript array of |
︙ | |||
260 261 262 263 264 265 266 | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + - + - + | of a word is not considered a word break. \fBTk_ComputeTextLayout\fR always attempts to place at least one word on each line. If it cannot because the \fIwrapLength\fR is too small, the word will be broken and as much as fits placed on the line and the rest on subsequent line(s). If \fIwrapLength\fR is so small that not even one character can fit on a given line, the \fIwrapLength\fR is ignored for that line and one character will be placed on the line anyhow. When wrapping is turned |
Changes to doc/TkInitStubs.3.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" Copyright (c) 1999 Scriptics Corporation '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
30 31 32 33 34 35 36 | 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 | - + - + - - + - - - - - + + + + + - - - | as \fIversion\fR. .BE .SH INTRODUCTION .PP The Tcl stubs mechanism defines a way to dynamically bind extensions to a particular Tcl implementation at run time. the stubs mechanism requires no changes to applications |
︙ |
Changes to doc/Tk_Init.3.
1 2 3 4 5 | 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 | - + + - + | '\" '\" 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. |
︙ | |||
77 78 79 80 81 82 83 84 85 | 78 79 80 81 82 83 84 85 86 87 | + | \fBtoplevel\fR Toplevels can be used to cover the entire screen and to steal input from the user. .TP \fBwm\fR If toplevels are ever allowed, wm can be used to remove decorations, move windows around, etc. .SH KEYWORDS safe, application, initialization, load, main window |
Changes to doc/Tk_Main.3.
1 2 3 4 5 6 | 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 | - + - + - + - + - - + - + - - - - - - - - - | '\" '\" 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. |
Changes to doc/WindowId.3.
1 2 3 4 5 6 | 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 | - + - + - - - | '\" '\" Copyright (c) 1990-1993 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. |
︙ | |||
96 97 98 99 100 101 102 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - - - + | \fBTk_Depth\fR(\fItkwin\fR) .sp Colormap \fBTk_Colormap\fR(\fItkwin\fR) .sp Tcl_Interp * \fBTk_Interp\fR(\fItkwin\fR) |
︙ | |||
129 130 131 132 133 134 135 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - - | .PP \fBTk_Display\fR returns a pointer to the Xlib display structure corresponding to \fItkwin\fR. \fBTk_DisplayName\fR returns an ASCII string identifying \fItkwin\fR's display. \fBTk_ScreenNumber\fR returns the index of \fItkwin\fR's screen among all the screens of \fItkwin\fR's display. \fBTk_Screen\fR returns a pointer to the Xlib structure corresponding to \fItkwin\fR's screen. |
︙ | |||
172 173 174 175 176 177 178 | 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 | - + - + - | call to \fBTk_GeometryRequest\fR for \fItkwin\fR. .PP \fBTk_MinReqWidth\fR and \fBTk_MinReqHeight\fR return information about the window's minimum requested size. These values correspond to the last call to \fBTk_SetMinimumRequestSize\fR for \fItkwin\fR. .PP \fBTk_InternalBorderLeft\fR, \fBTk_InternalBorderRight\fR, |
Changes to doc/bell.n.
1 2 3 4 5 6 7 | 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) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" 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. |
Changes to doc/bind.n.
1 2 3 4 5 6 7 | 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 | - + - + - - - + + | '\" '\" Copyright (c) 1990 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 1998 by Scriptics Corporation. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
66 67 68 69 70 71 72 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + | .PP The \fIsequence\fR argument specifies a sequence of one or more event patterns, with optional white space between the patterns. Each event pattern may take one of three forms. In the simplest case it is a single printing ASCII character, such as \fBa\fR or \fB[\fR. The character may not be a space character or the character \fB<\fR. This form of |
︙ | |||
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | 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 | + + - + - + - + | substantial mouse motion in between. For example, \fB<Double\-Button\-1>\fR is equivalent to \fB<Button\-1><Button\-1>\fR with the extra time and space requirement. .PP The \fBCommand\fR and \fBOption\fR modifiers are equivalents of \fBMod1\fR resp. \fBMod2\fR, they correspond to Macintosh-specific modifier keys. .PP .VS 8.5 The \fBExtended\fR modifier is, at present, specific to Windows. It appears on events that are associated with the keys on the .QW "extended keyboard" . On a US keyboard, the extended keys include the \fBAlt\fR and \fBControl\fR keys at the right of the keyboard, the cursor keys in the cluster to the left of the numeric pad, the \fBNumLock\fR key, the \fBBreak\fR key, the \fBPrintScreen\fR key, and the \fB/\fR and \fBEnter\fR keys in the numeric keypad. .VE 8.5 .SS "EVENT TYPES" .PP The \fItype\fR field may be any of the standard X event types, with a few extra abbreviations. The \fItype\fR field will also accept a couple non-standard X event types that were added to better support the Macintosh and Windows platforms. Below is a list of all the valid types; where two names appear together, they are synonyms. .DS |
︙ | |||
197 198 199 200 201 202 203 | 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 | - - + + - + - + + + - - - - - - - - - - - - - - + + - + - + | active. Likewise, the \fBDeactive\fR event is sent when the window's state changes from active to deactive. There are no useful percent substitutions you would make when binding to these events. .IP \fBMouseWheel\fR 5 Many contemporary mice support a mouse wheel, which is used for scrolling documents without using the scrollbars. By rolling the wheel, the system will generate \fBMouseWheel\fR events that the |
︙ | |||
278 279 280 281 282 283 284 | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + - | A \fBDestroy\fR event is delivered to a window when it is destroyed. .RS .PP When the \fBDestroy\fR event is delivered to a widget, it is in a .QW half-dead |
︙ | |||
360 361 362 363 364 365 366 | 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 | - - + + - - + + - + - + - + - + - | This event type is included only for completeness; there is no reliable way to track changes to a window's position in the stacking order. .RE .SS "EVENT DETAILS" .PP The last part of a long event specification is \fIdetail\fR. In the |
︙ | |||
430 431 432 433 434 435 436 | 419 420 421 422 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 | - + - + + + + + + - + - - + + | formatted as a hexadecimal number. Valid only for \fBConfigure\fR events. Indicates the sibling window immediately below the receiving window in the stacking order, or \fB0\fR if the receiving window is at the bottom. .IP \fB%b\fR 5 The number of the button that was pressed or released. Valid only |
︙ | |||
515 516 517 518 519 520 521 | 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 | - - + + - - - - + - - + + + - + - + - + | The \fIwidth\fR field from the event. Indicates the new or requested width of the window. Valid only for \fBConfigure\fR, \fBConfigureRequest\fR, \fBCreate\fR, \fBResizeRequest\fR, and \fBExpose\fR events. .IP "\fB%x\fR, \fB%y\fR" 5 The \fIx\fR and \fIy\fR fields from the event. |
︙ | |||
579 580 581 582 583 584 585 | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + | The path name of the window to which the event was reported (the \fIwindow\fR field from the event). Valid for all event types. .IP "\fB%X\fR, \fB%Y\fR" 5 The \fIx_root\fR and \fIy_root\fR fields from the event. If a virtual-root window manager is being used then the substituted values are the corresponding x-coordinate and y-coordinate in the virtual root. Valid only for |
︙ | |||
621 622 623 624 625 626 627 | 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 | - + - - - - + + - - - - - - - - + + - - + - + | an \fBall\fR binding. The \fBbindtags\fR command may be used to change this order for a particular window or to associate additional binding tags with the window. .PP The \fBcontinue\fR and \fBbreak\fR commands may be used inside a binding script to control the processing of matching scripts. |
︙ | |||
692 693 694 695 696 697 698 | 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 | - + - - + + - - - + + + - | An unbound event is not considered to be an error. .SH "MULTI-EVENT SEQUENCES AND IGNORED EVENTS" .PP When a \fIsequence\fR specified in a \fBbind\fR command contains more than one event pattern, then its script is executed whenever the recent events (leading up to and including the current event) match the given sequence. This means, for example, that if button 1 is |
︙ | |||
739 740 741 742 743 744 745 | 721 722 723 724 725 726 727 | - - - | set keysym "You pressed %K" } .CE .SH "SEE ALSO" bgerror(n), bindtags(n), event(n), focus(n), grab(n), keysyms(n) .SH KEYWORDS binding, event |
Changes to doc/bindtags.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + + | '\" '\" 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. |
︙ | |||
68 69 70 71 72 73 74 | 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 | - + + - - - | .CE replaces the \fBButton\fR tag for \fB.b\fR with \fBTrickyButton\fR. This means that the default widget bindings for buttons, which are associated with the \fBButton\fR tag, will no longer apply to \fB.b\fR, but any bindings associated with \fBTrickyButton\fR (perhaps some new button behavior) will apply. .SH EXAMPLE |
Changes to doc/bitmap.n.
1 2 3 4 5 6 | 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 | - + - - - - - + + - - - - - - + - + - - + - - + + - - - | '\" '\" 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. |
Deleted doc/busy.n.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to doc/button.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | '\" '\" 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. |
︙ | |||
53 54 55 56 57 58 59 | 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 | - + - - + + - - + + - + + - + - + - + + - + | toolbar buttons, by configuring \fB\-relief flat \-overrelief raised\fR. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the button. The empty string is the default value. .OP \-state state State Specifies one of three states for the button: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the |
︙ | |||
133 134 135 136 137 138 139 | 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 | - - - + + + + | modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. \fIOption\fR may have any of the values accepted by the \fBbutton\fR command. .TP \fIpathName \fBflash\fR Flash the button. This is accomplished by redisplaying the button |
︙ | |||
169 170 171 172 173 174 175 | 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 | - + - - - - - - - - - - + + - - - - - + + + + + - - - | to be invoked. .PP If the button's state is \fBdisabled\fR then none of the above actions occur: the button is completely non-responsive. .PP The behavior of buttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. |
Changes to doc/canvas.n.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + | '\" '\" Copyright (c) 1992-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 1997-1999 Scriptics Corporation. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH canvas n 8.3 Tk "Tk Built-In Commands" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME |
︙ | |||
32 33 34 35 36 37 38 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | Specifies a boolean value that indicates whether or not it should be allowable to set the canvas's view outside the region defined by the \fBscrollRegion\fR argument. Defaults to true, which means that the view will be constrained within the scroll region. .OP \-height height Height Specifies a desired window height that the canvas widget should request from |
︙ | |||
168 169 170 171 172 173 174 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | - + - + - + - + - + - + - - - - - + - + - + - + - - + - - - - - - + - - - - + + + - + - + - + - + - + - + - - - - - - + - - + - - + - - - | .PP \fItagOrId\fR may contain a logical expressions of tags by using operators: .QW \fB&&\fR , .QW \fB||\fR , .QW \fB^\fR , .QW \fB!\fR , |
︙ | |||
466 467 468 469 470 471 472 | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | - + - + - - - + + + | If both \fIcommand\fR and \fIsequence\fR are omitted then the command returns a list of all the sequences for which bindings have been defined for \fItagOrId\fR. .RS .PP The only events for which bindings may be specified are those related to the mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR, |
︙ | |||
501 502 503 504 505 506 507 | 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 | - - - - - + - + - + - - - - - - - - - - - - - + + - - + - + - - - + - - | command, then they are invoked in addition to bindings created for the canvas's items using the \fBbind\fR widget command. The bindings for items will be invoked before any of the bindings for the window as a whole. .RE .TP \fIpathName \fBcanvasx \fIscreenx\fR ?\fIgridspacing\fR? |
︙ | |||
637 638 639 640 641 642 643 | 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 | - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - + - + - + - - + - + - - + + - - - - - - - - - - - - - - - + - + - + - + - - - - - - - - - - + - - - - + + - - + - - - - - + - - - - + - + - - - - - + - - - - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - + - - + - + - + - - + - - + - - - - + - - - - + - - - + - - - + - - + + + + - + - - - - + - - - + - - - + + + + - + - - - - + - + - + - - - + - - - - - - - - - - - + + - + + - - - - - + + - - - + + - + - + - - - - - + + + + + + + + - - - + - - + - - + - - + - - + + - - + + - + - - - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - - + + - + - + - - - - + + + + + + + + + + + + - + - - + + + - - + + - - + + - + - + - - - - + + + + + + + + + + + + - + - - + + - - + + - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - | within the canvas. In most cases it is advisable to follow the \fBfocus\fR widget command with the \fBfocus\fR command to set the focus window to the canvas (if it was not there already). .RE .TP \fIpathName \fBgettags\fR \fItagOrId\fR |
︙ | |||
1621 1622 1623 1624 1625 1626 1627 | 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 | - + + - - + + - + - + - + + - - + + - + - - + + - - + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + + - - + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + + - - + + - + - + - + + - - + + - + - + - - + + - - + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + + + - + - - - - - - + + + + + + + + | (\fBbutt\fR, \fBprojecting\fR, or \fBround\fR). If this option is not specified then it defaults to \fBbutt\fR. Where arrowheads are drawn the cap style is ignored. .TP \fB\-joinstyle \fIstyle\fR Specifies the ways in which joints are to be drawn at the vertices of the line. |
︙ | |||
1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 | 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 | + + - + - + - - + + - - + + - + - + - - - - + + + + + + + + + + + + + | .TP \fB\-text \fIstring\fR \fIString\fR specifies the characters to be displayed in the text item. Newline characters cause line breaks. The characters in the item may also be changed with the \fBinsert\fR and \fBdelete\fR widget commands. This option defaults to an empty string. .VS 8.5 .TP \fB\-underline \fI\fR Specifies the integer index of a character within the text to be underlined. 0 corresponds to the first character of the text displayed, 1 to the next character, and so on. \-1 means that no underline should be drawn (if the whole text item is to be underlined, the appropriate font should be used instead). .VE 8.5 .TP \fB\-width \fIlineLength\fR Specifies a maximum line length for the text, in any of the forms described in the \fBCOORDINATES\fR section above. If this option is zero (the default) the text is broken into lines only at newline characters. However, if this option is non-zero then any line that would be longer than \fIlineLength\fR is broken just before a space |
︙ | |||
1957 1958 1959 1960 1961 1962 1963 | 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 | - + - + - + - - + + - - - - | \fB\-window \fIpathName\fR . Specifies the window to associate with this item. The window specified by \fIpathName\fR must either be a child of the canvas widget or a child of some ancestor of the canvas widget. \fIPathName\fR may not refer to a top-level window. .PP |
Changes to doc/checkbutton.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | '\" '\" 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. |
︙ | |||
34 35 36 37 38 39 40 | 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 | - + - + | If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-indicatoron indicatorOn IndicatorOn Specifies whether or not the indicator should be drawn. Must be a |
︙ | |||
75 76 77 78 79 80 81 | 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 | - + - + - + - - + + - - + + + - + - + + + - + + | the indicator regardless of the select state. If \fBindicatorOn\fR is false, this color is used as the background for the entire widget, in place of \fBbackground\fR or \fBactiveBackground\fR, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected. .OP \-selectimage selectImage SelectImage |
︙ | |||
130 131 132 133 134 135 136 | 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 | - + - + - + + - - - - + + + + - + | \fIpathName\fR's parent must exist. .PP A checkbutton is a widget that displays a textual string, bitmap or image and a square called an \fIindicator\fR. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines |
︙ | |||
181 182 183 184 185 186 187 188 189 190 191 192 193 194 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | + - + | automatically selects and deselects itself when the variables value changes to and from the button's .QW on , .QW off and .QW tristate values. .VE 8.5 .SH "WIDGET COMMAND" .PP The \fBcheckbutton\fR command creates a new Tcl command whose name is \fIpathName\fR. This command may be used to invoke various operations on the widget. It has the following general form: .CS |
︙ | |||
260 261 262 263 264 265 266 | 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 | - - + - - - - - - - + + + + + + - - - | .IP [2] When mouse button 1 is pressed over a checkbutton, it is invoked (its selection state toggles and the command associated with the button is invoked, if there is one). .IP [3] When a checkbutton has the input focus, the space key causes the checkbutton to be invoked. Under Windows, there are additional key bindings; plus |
Changes to doc/chooseColor.n.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + + | '\" '\" 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. |
︙ | |||
33 34 35 36 37 38 39 | 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - + - - - | option is not specified, then a default title will be displayed. .LP If the user selects a color, \fBtk_chooseColor\fR will return the name of the color in a form acceptable to \fBTk_GetColor\fR. If the user cancels the operation, both commands will return the empty string. .SH EXAMPLE |
Changes to doc/chooseDirectory.n.
1 2 3 | 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 | - + - - - - - - - - - + + - - - - - - - - + - - - | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. |
Changes to doc/clipboard.n.
1 2 3 4 5 6 | 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 | - + - + + - + + + + + + + + - - + - + - - - + + + - + - - + + - - - - - - - - - - + + - + - | '\" '\" 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. |
︙ | |||
144 145 146 147 148 149 150 151 152 153 154 | 142 143 144 145 146 147 148 149 150 151 152 153 154 | + + - - - | bind $c <<Paste>> { catch { set canvas %W eval [\fBclipboard get \-type\fR TkCanvasItem] } } .CE .SH "SEE ALSO" interp(n), selection(n) .SH KEYWORDS clear, format, clipboard, append, selection, type |
Changes to doc/colors.n.
︙ | |||
201 202 203 204 205 206 207 | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - + | gold3 205 173 0 gold4 139 117 0 goldenrod 218 165 32 goldenrod1 255 193 37 goldenrod2 238 180 34 goldenrod3 205 155 29 goldenrod4 139 105 20 |
︙ | |||
303 304 305 306 307 308 309 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | - + - + | gray94 240 240 240 gray95 242 242 242 gray96 245 245 245 gray97 247 247 247 gray98 250 250 250 gray99 252 252 252 gray100 255 255 255 |
︙ | |||
530 531 532 533 534 535 536 | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | - + | LimeGreen 50 205 50 linen 250 240 230 magenta 255 0 255 magenta1 255 0 255 magenta2 238 0 238 magenta3 205 0 205 magenta4 139 0 139 |
︙ | |||
647 648 649 650 651 652 653 | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | - + | plum 221 160 221 plum1 255 187 255 plum2 238 174 238 plum3 205 150 205 plum4 139 102 139 powder blue 176 224 230 PowderBlue 176 224 230 |
︙ | |||
780 781 782 783 784 785 786 | 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | - + - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + - | yellow4 139 139 0 YellowGreen 154 205 50 .DE .SH "PORTABILITY ISSUES" .TP \fBMac OS X\fR . |
Changes to doc/console.n.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" Copyright (c) 2001 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - - + + - - - + - | Tk toolkit loaded, and control over this interpreter is given through the \fBconsole\fR command. The behaviour of the console window is defined mainly through the contents of the \fIconsole.tcl\fR file in the Tk library. Except for TkAqua, this command is not available when Tk is loaded into a tclsh interpreter with .QW "\fBpackage require Tk\fR" , as a conventional terminal is expected to be present in that case. |
︙ | |||
128 129 130 131 132 133 134 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - - - - | Pressing F9 rebuilds the console window by destroying all its children and reloading the Tcl script that defined the console's behaviour. .PP Most other behaviour is the same as a conventional text widget except for the way that the \fI<<Cut>>\fR event is handled identically to the \fI<<Copy>>\fR event. .SH EXAMPLE |
Changes to doc/cursors.n.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + - + | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. |
︙ | |||
131 132 133 134 135 136 137 | 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 | - - - + + - - + - - - - - - - - - - - - - - - - - - | .RE .TP \fBMac OS X\fR On Mac OS X systems, the following cursors are mapped to native cursors: .RS .CS arrow |
Changes to doc/destroy.n.
1 2 3 4 5 6 | 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. |
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - - - | is deleted then all windows will be destroyed and the application will (normally) exit. The \fIwindow\fRs are destroyed in order, and if an error occurs in destroying a window the command aborts without destroying the remaining windows. No error is returned if \fIwindow\fR does not exist. .SH EXAMPLE |
Changes to doc/dialog.n.
1 2 3 4 5 6 | 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) 1992 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. |
︙ | |||
56 57 58 59 60 61 62 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + + - - - | If the dialog's window is destroyed before the user selects one of the buttons, then \-1 is returned. .PP While waiting for the user to respond, \fBtk_dialog\fR sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box. .SH EXAMPLE |
Changes to doc/entry.n.
1 2 3 4 5 6 7 | 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 | - + - + - - + - + | '\" '\" Copyright (c) 1990-1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 1998-2000 Scriptics Corporation. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
61 62 63 64 65 66 67 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + - + - + | displayed, the contents will not be selectable, and the entry may be displayed in a different color, depending on the values of the \fB\-disabledforeground\fR and \fB\-disabledbackground\fR options. .OP \-validate validate Validate Specifies the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. It defaults to \fBnone\fR. When you want validation, you must explicitly |
︙ | |||
93 94 95 96 97 98 99 | 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 | - + - - + + - - - + + + - + - + - + - + - + - - + + | \fIpathName\fR's parent must exist. .PP An entry is a widget that displays a one-line text string and allows that string to be edited using widget commands described below, which are typically bound to keystrokes and mouse actions. When first created, an entry's string is empty. A portion of the entry may be selected as described below. |
︙ | |||
154 155 156 157 158 159 160 | 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 | - + - - + + - - - - + + + + - - - - - - + + + + + + - + - + - - + + - + | The type of validation currently set. .IP \fB%V\fR 5 The type of validation that triggered the callback (key, focusin, focusout, forced). .IP \fB%W\fR 5 The name of the entry widget. .PP |
︙ | |||
366 367 368 369 370 371 372 | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - - - + + + | or \fBselect adjust\fR command in this widget. If the selection is not in this widget then a new selection is created using the most recent anchor point specified for the widget. Returns an empty string. .RE .TP \fIpathName \fBvalidate\fR |
︙ | |||
399 400 401 402 403 404 405 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + - - + + + - - - + + + - - | Adjusts the view in the window so that the character \fIfraction\fR of the way through the text appears at the left edge of the window. \fIFraction\fR must be a fraction between 0 and 1. .TP \fIpathName \fBxview scroll \fInumber what\fR This command shifts the view in the window left or right according to \fInumber\fR and \fIwhat\fR. |
︙ | |||
446 447 448 449 450 451 452 | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | - + - - - + + | .IP [5] Clicking mouse button 1 with the Control key down will position the insertion cursor in the entry without affecting the selection. .IP [6] If any normal printing characters are typed in an entry, they are inserted at the point of the insertion cursor. .IP [7] |
︙ | |||
533 534 535 536 537 538 539 | 530 531 532 533 534 535 536 | - - - | .PP The behavior of entries can be changed by defining new bindings for individual widgets or by redefining the class bindings. .SH "SEE ALSO" ttk::entry(n) .SH KEYWORDS entry, widget |
Changes to doc/event.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - + | '\" '\" Copyright (c) 1996 Sun Microsystems, Inc. '\" Copyright (c) 1998-2000 Ajuba Solutions. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | is a list of all the virtual events that are currently defined. If \fB<<\fIvirtual\fB>>\fR is specified then the return value is a list whose elements are the physical event sequences currently defined for the given virtual event; if the virtual event is not defined then an empty string is returned. .RS .PP |
︙ | |||
96 97 98 99 100 101 102 | 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 | - + + + | \fISize\fR must be a screen distance; it specifies the \fIborder_width\fR field for the event. Valid for \fBConfigure\fR events. Corresponds to the \fB%B\fR substitution for binding scripts. .TP \fB\-button\fI number\fR \fINumber\fR must be an integer; it specifies the \fIdetail\fR field |
︙ | |||
151 152 153 154 155 156 157 | 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 | - + - + - + - + - + - + - + - + - + - + - - + - + | \fISize\fR must be a screen distance; it specifies the \fIheight\fR field for the event. Valid for \fBConfigure\fR events. Corresponds to the \fB%h\fR substitution for binding scripts. .TP \fB\-keycode\fI number\fR \fINumber\fR must be an integer; it specifies the \fIkeycode\fR field for the event. |
︙ | |||
278 279 280 281 282 283 284 | 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 | - + - + - - - + + + - | This option is useful when generating a series of events that should be processed in order but at the front of the queue. .RE .TP \fB\-x\fI coord\fR \fICoord\fR must be a screen distance; it specifies the \fIx\fR field for the event. |
︙ | |||
335 336 337 338 339 340 341 | 335 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 416 417 418 419 420 421 422 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 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + + + + - - - - - - - - + - - + - - - + + - - + - - - - - - - - - - - - - - + - - - - - - + - - - | changed. .TP \fB<<Selection>>\fR This is sent to a text widget when the selection in the widget is changed. .TP \fB<<ThemeChanged>>\fR |
Changes to doc/focus.n.
1 2 3 4 5 6 | 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 | - + - + + | '\" '\" 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. |
︙ | |||
101 102 103 104 105 106 107 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - | will stay on the top-level window containing the window with the focus. However, Tk generates FocusIn and FocusOut events just as if the X focus were on the internal window. This approach gets around a number of problems that would occur if the X focus were actually moved; the fact that the X focus is on the top-level is invisible unless you use C code to query the X server directly. .SH "EXAMPLE" |
︙ | |||
126 127 128 129 130 131 132 133 134 | 126 127 128 129 130 131 132 133 134 135 | + - - - | if {!$traverseToMiddle} { \fBfocus\fR .before break } } \fBfocus\fR .before .CE .SH KEYWORDS events, focus, keyboard, top-level, window manager |
Changes to doc/focusNext.n.
1 2 3 4 5 6 | 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 | - + + | '\" '\" 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. |
︙ | |||
49 50 51 52 53 54 55 56 57 | 50 51 52 53 54 55 56 57 58 59 | + - - - | The \fBfocus\fR command may be used to move the focus to a window other than the one under the mouse, but as soon as the mouse moves into a new window the focus will jump to that window. Note: at present there is no built-in support for returning the application to an explicit focus model; to do this you will have to write a script that deletes the bindings created by \fBtk_focusFollowsMouse\fR. .SH KEYWORDS focus, keyboard traversal, top-level |
Changes to doc/font.n.
1 2 3 4 5 6 | 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 | - + - + - + - + - - - - - - - - | '\" '\" Copyright (c) 1996 Sun Microsystems, Inc. '\" Copyright (c) 2006-2007 Daniel A. Steffen <[email protected]> '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
84 85 86 87 88 89 90 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | omitted, it defaults to the main window. .TP \fBfont measure \fIfont\fR ?\fB\-displayof \fIwindow\fR? \fItext\fR . Measures the amount of space the string \fItext\fR would use in the given \fIfont\fR when displayed in \fIwindow\fR. \fIfont\fR is a font description; see \fBFONT DESCRIPTIONS\fR below. If the \fIwindow\fR argument is |
︙ | |||
106 107 108 109 110 111 112 | 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 | - + - + | omitted, it defaults to the main window. If \fIoption\fR is specified, returns the value of that metric; if it is omitted, the return value is a list of all the metrics and their values. See \fBFONT METRICS\fR below for a list of the possible metrics. .TP \fBfont names\fR The return value is a list of all the named fonts that are currently defined. |
︙ | |||
185 186 187 188 189 190 191 | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | - + | system font. Cases [3], [4], and [5] are accepted on all platforms and the closest available font will be used. In some situations it may not be possible to find any close font (e.g., the font family was a garbage value); in that case, some system-dependent default font is chosen. If the font description does not match any of the above patterns, an error is generated. .SH "FONT METRICS" |
︙ | |||
227 228 229 230 231 232 233 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | - | characters, or is .QW \fB0\fR if this is a proportionally-spaced font, where individual characters have different widths. The widths of control characters, tab characters, and other non-printing characters are not included when calculating this value. .SH "FONT OPTIONS" |
︙ | |||
291 292 293 294 295 296 297 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | - + | font should be underlined. The default value for underline is \fBfalse\fR. .TP \fB\-overstrike \fIboolean\fR The value is a boolean flag that specifies whether a horizontal line should be drawn through the middle of characters in this font. The default value for overstrike is \fBfalse\fR. .SH "STANDARD FONTS" |
︙ | |||
334 335 336 337 338 339 340 | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | - + | \fBTkTooltipFont\fR . This font should be used for tooltip windows (transient information windows). .LP It is \fInot\fR advised to change these fonts, as they may be modified by Tk itself in response to system changes. Instead, make a copy of the font and modify that. |
︙ | |||
378 379 380 381 382 383 384 | 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 | - + + - - - | \fBsystemPushButtonFont\fR \fBsystemUtilityWindowTitleFont\fR \fBsystemAlertHeaderFont\fR \fBsystemToolbarFont\fR \fBsystemMiniSystemFont\fR \fBsystemDetailSystemFont\fR \fBsystemDetailEmphasizedSystemFont\fR .DE .RE .SH EXAMPLE |
Deleted doc/fontchooser.n.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to doc/frame.n.
1 2 3 4 5 6 | 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 | - + - + - + - - - - - - - - - - - + - + - + - - - - - - - - - - + | '\" '\" 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. |
︙ | |||
106 107 108 109 110 111 112 | 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 | - + - - + - - - + - - - - | or in the option database to configure aspects of the frame such as its background color and relief. The \fBframe\fR command returns the path name of the new window. .PP A frame is a simple widget. Its primary purpose is to act as a spacer or container for complex window layouts. The only features |
Changes to doc/getOpenFile.n.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" 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. |
︙ | |||
31 32 33 34 35 36 37 | 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 | - - - - - - - - - - - - + + - - - - - - - - - + - | as\fR command in the \fBFile\fR menu. If the user enters a file that already exists, the dialog box prompts the user for confirmation whether the existing file should be overwritten or not. .PP The following \fIoption\-value\fR pairs are possible as command line arguments to these two commands: .TP |
︙ | |||
178 179 180 181 182 183 184 | 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 | - - + - + - - - | to ensure portability, wild card characters are not allowed in the extensions, except as in the special extension .QW * . Extensions without a full stop character (e.g. .QW ~ ) are allowed but may not work on all platforms. .SH EXAMPLE |
Changes to doc/grab.n.
1 2 3 4 5 6 | 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) 1992 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. |
︙ | |||
57 58 59 60 61 62 63 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - - - - - - - - - - | redirected to the focus window. During a global grab Tk grabs the keyboard so that all keyboard events are always sent to the grabbing application. The \fBfocus\fR command is still used to determine which window in the application receives the keyboard events. The keyboard grab is released when the grab is released. .PP |
︙ | |||
107 108 109 110 111 112 113 | 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 | - - - + - - - - | does nothing. Returns an empty string. .TP \fBgrab status \fIwindow\fR Returns \fBnone\fR if no grab is currently set on \fIwindow\fR, \fBlocal\fR if a local grab is set on \fIwindow\fR, and \fBglobal\fR if a global grab is set. .SH WARNING |
Changes to doc/grid.n.
1 2 3 4 5 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | - + - + - + - - + - + + - + - - + + - + - - + - + - + - + - - - + + - + + - - - + + + + - + - + - - + - - + + - + - - + - + - - + + - - + - + - - - + + - - - + + - - - + + - - + - + - - + - + - - + - + - - + - - + - - + + - - - + + - + - + - - + + - + - + - + - - - - + + + - + - - - - - - - - - + - - + - - + + - + - - + - + - - + - + - + - + - - - + + - + + - - - + + + + - + - + - - - - + + + - - + + + - - - - - - - - - + - - - - - + + + + - + - - - + + - + - - - - - - + + - + - - - - + + + + - + - - - - + + + - - - + + - - + - + - - + + - + - + - + - + - + - + - + - + - + + - + - + - - + + + - - - + + + - + - - + + - + - - + + - - - + + + - - - - - - + + + + + + - - - - + - - - | '\" '\" 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. |
Changes to doc/image.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + + | '\" '\" 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. |
︙ | |||
89 90 91 92 93 94 95 96 97 98 99 | 90 91 92 93 94 95 96 97 98 99 100 101 102 | + + - - - | color, or nothing. See the \fBbitmap\fR manual entry for more information. .TP \fBphoto\fR Displays a variety of full-color images, using dithering to approximate colors on displays with limited color capabilities. See the \fBphoto\fR manual entry for more information. .SH "SEE ALSO" bitmap(n), options(n), photo(n) .SH KEYWORDS height, image, types of images, width |
Changes to doc/keysyms.n.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | + - + - - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - + - - - - - - + + - - - + + - - - - - + + - - - + - - - - - + - - - - + + - - - - - - - - + + + + + - - - - + + + - - - - - + + + - - - - - - - - - - - - + - - - + - - + - - - + + - - - + + - - - - + + - - - - - - + + + + - - + - - - + - - - - - - + - - - + - - - - + + + - - - + + - - - - + + - - - - - - + - - - - - - - - - + + + - - - + - - - + - - - - - - + - - - - + + + - - - - - + + + - - - - + + + - - - + + - - - - - - - + - - + - - - - + + + - - - - - + - - - - - - - - - - - - + + + + + - - - - - - + + + - - - - + + + - - - - + - - - + + - - + - - - - - + + - - - + + - - + - - - - - - - - - - - - + + + + - - - - - + + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - + + + - - + - - - - - - - - + + + + + - - - - - - + + + + - - - - - + - - - - - - - - - - - - + + - - - + + - - - - + + + - - - - - - - - - + + - - - + + - - - - + + + - - - - - - - - - - + + + - - - - + + + + + - - - + - - - - - - - - + + + - - - - + + - - - - - - - - - - - - - + + + - - - - + + + - - - + + - - - - + + + - - + - - - - - - + - - - - - - - + - - - - - - - + + - - - - - - - + - - - - + + - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - + + + - - - - - + + + + - - - - + + + - - - - - - - - - - - - - - - + + + - - + - - + - - - - - - - - - + + + + + + + + - - - - + + + - - - - - - + + - - - - - - - - - - - - - - - + - - + - - - - + + - - - - + + - - + - - + - - + - - - - + - - + - - - + - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - + + - - - - - - - + + + - - - + + - - - + + - - - - - + + - - - - - - - + + + + - - - - - - - - - - - - + - - - - - - + - - - - - - + - - - - - + - - - - + + + - - + - - - + + - - - - - + + + + - - - + - - - + - - - - - - - + + + + - - - - - - - - + + + + + + + - - - + + - - - - - - - - - - - - + + + - - + - - - + - - + - - + - - + - - - - + + + - - - + + - - - - - - - - - - + - - - - - - - - - - + + + - - - - + - - + - - + - - + - - - - - + + + + - - + - - - - - + + - - + - - - - - - + + + + - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + - - - + - - - - - + - - - - - - - - - + + - - - + - - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + - - - - + - - - - - + + - - + - - - - - - + + + + + - - + - - - - + - - - - - + + - - - - + - - - - + + + - - - - - - - - - - - - - - + + + + + + - - - - - - - - - + + + + - - - - - - - - + + + + + - - - - - - - + + + + - - + - - + - - + - - - - - + + - - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + + - - - - - - - - + + + + - - - - - - + + + - - - - + - - - + - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - + + + - - - - - - - - - + + + + + + - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + - - - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - + - - - - - - - - + + - - - - - + + - - - - + + + - - - - - - - - - - - - - - - - + - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - + - - - - - - - + - - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - + + + + - - - - - - - + + + + + + - - - - - + + + + - - - - - - - - - - - - - - + + - - - + + + + - - - - - + + + - - - - - - - + - - + - - - - + + + - - - - - - - - - - - - - - + + - - + - - - - + + + - - - - - - - - - + - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + - - - + + - - + - - - - - - - - - - - - - - - - + - - - - - - - - - - + - - + - - + - - + - - - - - + + + + - - - - - - - + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - + - - + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - + - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + - - - - - - + + - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - + + - - - - - - - - + + + + + + + - - + - - - + + - - - - - - - - + + + + + + + - - - - + + + - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + - - + - - - - - - - - - - + + + - - + - - - - + - - - - - - - - - - + + + - - + - - - - + - - - - - - - - - - - - - - + + + + + + + - - - + + - - - - - - - - - - - - + + + + + + - - - + - - - - - - - - - - + + + + + - - + - - - - + - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - + + + - - + - - - - - - - - - - + + + + + + + - - - + + - - - - - - - - - + + + - - + - - - - + - - - - - - - - - - + + + - - + - - - - + - - - - - - - - - - - - - - + + + + + + + - - - + + - - - - - - - - - - - - - + + + + + + + - - - + + - - - - - - - - - + + + - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + - - + - - + - - - - - - - - - - + + + + + + + - - - - - - - - - + + + + - - - + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + - + - - - | '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" .TH keysyms n 8.3 Tk "Tk Built-In Commands" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME keysyms \- keysyms recognized by Tk .BE .SH DESCRIPTION .PP |
Changes to doc/label.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | '\" '\" 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. |
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - - - - + + + + | screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. If this option is not specified, the label's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-state state State Specifies one of three states for the label: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the |
︙ | |||
59 60 61 62 63 64 65 | 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 | - + - + - + | \fIpathName\fR argument. At the time this command is invoked, there must not exist a window named \fIpathName\fR, but \fIpathName\fR's parent must exist. .PP A label is a widget that displays a textual string, bitmap or image. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines |
︙ | |||
101 102 103 104 105 106 107 | 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 | - - - - | \fIOption\fR may have any of the values accepted by the \fBlabel\fR command. .SH BINDINGS .PP When a new label is created, it has no default event bindings: labels are not intended to be interactive. .SH EXAMPLE |
Changes to doc/labelframe.n.
1 2 3 4 5 6 7 8 9 10 11 12 | 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 | - + - + - + - + | '\" '\" 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 labelframe n 8.4 Tk "Tk Built-In Commands" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME |
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + | and if it is not a descendant of this window, it will be raised above it in the stacking order. .OP \-visual visual Visual Specifies visual information for the new window in any of the forms accepted by \fBTk_GetVisual\fR. If this option is not specified, the new window will use the same visual as its parent. |
︙ | |||
91 92 93 94 95 96 97 | 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 | - + - + - | .SH "WIDGET COMMAND" .PP The \fBlabelframe\fR command creates a new Tcl command whose name is the same as the path name of the labelframe's window. This command may be used to invoke various operations on the widget. It has the following general form: .CS |
︙ | |||
166 167 168 169 170 171 172 | 165 166 167 168 169 170 171 | - - - | set cheese none set pickle none .CE .SH "SEE ALSO" frame(n), label(n), ttk::labelframe(n) .SH KEYWORDS labelframe, widget |
Changes to doc/listbox.n.
1 2 3 4 5 6 | 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 | - + - + - - - + + + - | '\" '\" Copyright (c) 1990 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. |
︙ | |||
72 73 74 75 76 77 78 | 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 | - + - - + + - - - - | \fIpathName\fR's parent must exist. .PP A listbox is a widget that displays a list of strings, one per line. When first created, a new listbox has no elements. Elements may be added or deleted using widget commands described below. In addition, one or more elements may be selected as described below. |
︙ | |||
132 133 134 135 136 137 138 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 423 424 425 | - + - - - - - - - - - - - - + + - - - + - - - - - - - - - - - - - - - + - - - + - - - - + - - + + + - + - - - - + - - + - - - - - + + + - - - + + + | .SH "WIDGET COMMAND" .PP The \fBlistbox\fR command creates a new Tcl command whose name is \fIpathName\fR. This command may be used to invoke various operations on the widget. It has the following general form: .CS |
︙ | |||
573 574 575 576 577 578 579 | 532 533 534 535 536 537 538 539 540 541 | - + - - - | The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in the widget to the clipboard, if there is a selection. .PP The behavior of listboxes can be changed by defining new bindings for individual widgets or by redefining the class bindings. .SH "SEE ALSO" |
Changes to doc/loadTk.n.
1 2 3 4 5 | 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 | - + - + - + - - - - - + + + + + + - - - - - - + + + + + + + - - - + + + - - - - + + + + + - - - + + + + + - + + - - - - - + + + + + + + - - - + + + + - - + + + + - - + + + | '\" '\" 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. |
Changes to doc/lower.n.
1 2 3 4 5 6 | 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 | - + + - + - - - + - - - | '\" '\" 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. |
Deleted doc/man.macros.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to doc/menu.n.
1 2 3 4 5 6 | 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) 1990-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. |
︙ | |||
94 95 96 97 98 99 100 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + - - | .PP Menu entries are displayed with up to three separate fields. The main field is a label in the form of a text string, a bitmap, or an image, controlled by the \fB\-label\fR, \fB\-bitmap\fR, and \fB\-image\fR options for the entry. If the \fB\-accelerator\fR option is specified for an entry then a second textual field is displayed to the right of the label. The accelerator |
︙ | |||
208 209 210 211 212 213 214 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - + | .PP If a \fB\-command\fR option is specified for a cascade entry then it is evaluated as a Tcl command whenever the entry is invoked. This is not supported on Windows. .SS "TEAR-OFF ENTRIES" .PP A tear-off entry appears at the top of the menu if enabled with the |
︙ | |||
233 234 235 236 237 238 239 | 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 | - - - - - - - - - - + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - + + + - - - + + + | As noted, menubars may behave differently on different platforms. One example of this concerns the handling of checkbuttons and radiobuttons within the menu. While it is permitted to put these menu elements on menubars, they may not be drawn with indicators on some platforms, due to system restrictions. .SS "SPECIAL MENUS IN MENUBARS" .PP |
︙ | |||
299 300 301 302 303 304 305 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | - + - - - - - - - - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - - - - + - + - - + - + - + - - + - - - + + + - - + - - - + - - + - - - - - - - - - + + + + + + + + - - - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | .SH "WIDGET COMMAND" .PP The \fBmenu\fR command creates a new Tcl command whose name is \fIpathName\fR. This command may be used to invoke various operations on the widget. It has the following general form: .CS |
︙ | |||
832 833 834 835 836 837 838 | 745 746 747 748 749 750 751 | - - - | At present it is not possible to use the option database to specify values for the options to individual entries. .SH "SEE ALSO" bind(n), menubutton(n), ttk::menubutton(n), toplevel(n) .SH KEYWORDS menu, widget |
Changes to doc/menubar.n.
1 2 3 4 5 6 | 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 | - + - + + + + - - - | '\" '\" Copyright (c) 1992 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. |
Changes to doc/menubutton.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | '\" '\" Copyright (c) 1990-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. |
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - - + + - - + + | Specifies the path name of the menu associated with this menubutton. The menu must be a child of the menubutton. .OP \-state state State Specifies one of three states for the menubutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the menubutton is displayed using the \fBforeground\fR and \fBbackground\fR options. The active state is typically used when the pointer is over the menubutton. In active state |
︙ | |||
80 81 82 83 84 85 86 | 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 | - + - + - - - - - + - - - + - + - - | there must not exist a window named \fIpathName\fR, but \fIpathName\fR's parent must exist. .PP A menubutton is a widget that displays a textual string, bitmap, or image and is associated with a menu widget. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines |
︙ | |||
172 173 174 175 176 177 178 | 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 | - + - - - | any menubutton or menu, the menubutton unposts without invoking any menu entry. .IP [6] When a menubutton is posted, its associated menu claims the input focus to allow keyboard traversal of the menu and its submenus. See the \fBmenu\fR manual entry for details on these bindings. .IP [7] |
Changes to doc/message.n.
1 2 3 4 5 6 | 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 | - + - + - + - - + + - + - + - + - + - + - - + + - + - + - | '\" '\" 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. |
︙ | |||
102 103 104 105 106 107 108 | 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 | - + - + - - | .SH "WIDGET COMMAND" .PP The \fBmessage\fR command creates a new Tcl command whose name is \fIpathName\fR. This command may be used to invoke various operations on the widget. It has the following general form: .CS |
︙ | |||
141 142 143 144 145 146 147 | 138 139 140 141 142 143 144 | - - - | .PP Tabs do not work very well with text that is centered or right-justified. The most common result is that the line is justified wrong. .SH "SEE ALSO" label(n) .SH KEYWORDS message, widget |
Changes to doc/messageBox.n.
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - - - - - | the buttons in the message window is identified by a unique symbolic name (see the \fB\-type\fR options). After the message window is popped up, \fBtk_messageBox\fR waits for the user to select one of the buttons. Then it returns the symbolic name of the selected button. .PP The following option-value pairs are supported: .TP |
︙ |
Changes to doc/option.n.
1 2 3 4 5 6 | 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. |
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - - + + | .SH DESCRIPTION .PP The \fBoption\fR command allows you to add entries to the Tk option database or to retrieve options from the database. The \fBadd\fR form of the command adds a new option to the database. \fIPattern\fR contains the option being specified, and consists of names and/or classes |
︙ | |||
55 56 57 58 59 60 61 | 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 | - - - - - - + + + + | The \fBreadfile\fR form of the command reads \fIfileName\fR, which should have the standard format for an X resource database such as \fB.Xdefaults\fR, and adds all the options specified in that file to the option database. If \fIpriority\fR is specified, it indicates the priority level at which to enter the options; \fIpriority\fR defaults to \fBinteractive\fR. .PP |
︙ | |||
111 112 113 114 115 116 117 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - - - + | .PP If the overall pattern is preceded by an asterisk, then the overall pattern applies anywhere it can throughout the whole widget hierarchy. Otherwise the first word of the pattern is matched against the name and class of the .QW \fB.\fR \fBtoplevel\fR, which are usually set by options to \fBwish\fR. .SH EXAMPLES |
︙ |
Changes to doc/optionMenu.n.
1 2 3 4 5 6 | 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. |
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - - - | and appear in the option menubutton. The current value can also be changed by setting the variable. .PP The return value from \fBtk_optionMenu\fR is the name of the menu associated with \fIpathName\fR, so that the caller can change its configuration options or manipulate it in other ways. .SH EXAMPLE |
Changes to doc/options.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + + - | '\" '\" 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. |
︙ | |||
54 55 56 57 58 59 60 | 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 | - - - - + - - + + - - + + - + | definition of active elements. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. This option is typically only available in widgets displaying more than one element at a time (e.g. menus but not buttons). .OP \-activeforeground activeForeground Background Specifies foreground color to use when drawing active elements. See above for definition of active elements. |
︙ | |||
138 139 140 141 142 143 144 | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + - - + + | rectangle to draw around the outside of the widget when it has the input focus. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget. .OP \-image image Image Specifies an image to display in the widget, which must have been created with the \fBimage create\fR command. |
︙ | |||
168 169 170 171 172 173 174 | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | - - + + | milliseconds the insertion cursor should remain .QW on in each blink cycle. .OP \-insertwidth insertWidth InsertWidth Specifies a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion |
︙ | |||
220 221 222 223 224 225 226 | 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 | - - - - - - - - + - + - + - + - + - + - + | this amount to the height it would normally need (as determined by the height of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space above and/or below what it displays inside. Most widgets only use this option for padding text: if they are displaying a bitmap or image, then they usually ignore padding options. |
︙ | |||
340 341 342 343 344 345 346 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | - + - + - + + + - - - | 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the |
Changes to doc/pack-old.n.
1 2 3 4 5 6 | 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) 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. |
︙ | |||
184 185 186 187 188 189 190 191 192 | 185 186 187 188 189 190 191 192 193 194 | + - - - | them, and it unmaps any windows for which there was no space left in the cavity. .PP The packer makes geometry requests on behalf of the parent windows it manages. For each parent window it requests a size large enough to accommodate all the options specified by all the packed children, such that zero space would be leftover for \fBexpand\fR options. .SH KEYWORDS geometry manager, location, packer, parcel, size |
Changes to doc/pack.n.
1 2 3 4 5 6 | 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 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + + - + - - + + - + - - + + - + - - + + - - + + - - + + - + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - - - - + + + + - - - - - - - - - + - + - - + + - + - + - + - + - - - + + + - + - - - - - - + + - + - + - + - - - - + + + + - + - - + + - + - + - - + + - + - + - + - - - + + + - + - + - - - + + + - + - + - + - - - + + + - + - + - - - + + + - + - + - + - - + + - - + + - - - - - - + + + + + + - + - + + - - - | '\" '\" 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. |
Changes to doc/palette.n.
1 2 3 4 5 | 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 | - + + | '\" '\" 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. |
︙ | |||
62 63 64 65 66 67 68 69 70 | 63 64 65 66 67 68 69 70 71 72 | + - - - | from the .Xdefaults file or options specified on the command-line that creates a widget. .PP The procedure \fBtk_bisque\fR is provided for backward compatibility: it restores the application's colors to the light brown .PQ bisque color scheme used in Tk 3.6 and earlier versions. .SH KEYWORDS bisque, color, palette |
Changes to doc/panedwindow.n.
1 2 3 4 5 6 | 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 | - + - + - - - - - - - - - - - + + + | '\" '\" Copyright (c) 1992 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. |
︙ | |||
88 89 90 91 92 93 94 | 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 | - + - + - - - + - - + - - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - + + - - - + - - + - - + - - - + - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - | .SH "WIDGET COMMAND" .PP The \fBpanedwindow\fR command creates a new Tcl command whose name is the same as the path name of the panedwindow's window. This command may be used to invoke various operations on the widget. It has the following general form: .CS |
Changes to doc/photo.n.
1 2 3 4 5 6 | 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 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 329 330 331 332 333 334 335 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 | - + - - - - - - - - - - - - - - + - - - - - - + + + + + + - - - - - + + - - + - - + + - - + - - - - - - - - - - + + + + + + - + - - + - - - - - - - - - + - - - + - - + - - - - - - - - + - - + - - - - - - - + - - + - - - - - - + + + + + - - - - + + + - + - - - - + - - - - + - - + - - - - - - - + - - - + + + + + + + - + - - + - - - - - - - - + - - + - - + - - - - - - - - - + - - - + - - + - - - - + - - + - - + - - - + - - - - - - + - - - - - + + + - - - + + - - - - - - + - - - - - - + - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | '\" '\" 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. |
︙ | |||
684 685 686 687 688 689 690 | 422 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 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - | slashes. .SH CREDITS .PP The photo image type was designed and implemented by Paul Mackerras, based on his earlier photo widget and some suggestions from John Ousterhout. .SH EXAMPLE |
Changes to doc/place.n.
1 2 3 4 5 6 | 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 | - + + - - + + - - - + + + - - + + - + - + - + - + - + - + - - + + - + - + - - + - + - + - - - + + - + - + - - + + - - - - + + + + - + - - - - + + + + - + - + - + - + - - + + - + - + - + - - + + - + - + - + - + - - - + + + - - - - - - + + - + - + - + - + + - + - - - | '\" '\" Copyright (c) 1992 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. |
Changes to doc/popup.n.
1 2 3 4 5 | 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) 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. |
Changes to doc/radiobutton.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | '\" '\" 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. |
︙ | |||
34 35 36 37 38 39 40 | 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 | - + + + + + + + + + + + - + - + - - - - - - - - - - + - + - + - - + + - - + + + - + - + + + - + + | If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-indicatoron indicatorOn IndicatorOn Specifies whether or not the indicator should be drawn. Must be a |
︙ | |||
124 125 126 127 128 129 130 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + - + - + | there must not exist a window named \fIpathName\fR, but \fIpathName\fR's parent must exist. .PP A radiobutton is a widget that displays a textual string, bitmap or image and a diamond or circle called an \fIindicator\fR. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines |
︙ | |||
151 152 153 154 155 156 157 | 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 | + - - - + + + + - + - - - - - - | The indicator is drawn without a round mark inside. Typically, several radiobuttons share a single variable and the value of the variable indicates which radiobutton is to be selected. When a radiobutton is selected it sets the value of the variable to indicate that fact; each radiobutton also monitors the value of the variable and automatically selects and deselects itself when the variable's value changes. .VS 8.5 |
︙ | |||
256 257 258 259 260 261 262 | 257 258 259 260 261 262 263 | - - - | .PP The behavior of radiobuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. .SH "SEE ALSO" checkbutton(n), labelframe(n), listbox(n), options(n), scale(n), ttk::radiobutton(n) .SH KEYWORDS radiobutton, widget |
Changes to doc/raise.n.
1 2 3 4 5 6 | 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 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. |
Changes to doc/scale.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | '\" '\" 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. |
︙ | |||
51 52 53 54 55 56 57 | 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 | - + - + - + - + - + - - + + + - - + + - + - + - + - - - - - + - - + - - - + + - + - + - + - + - + - + - - - - | Specifies the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). For vertical scales this is the scale's height; for horizontal scales it is the scale's width. .OP \-resolution resolution Resolution A real value specifying the resolution for the scale. If this value is greater than zero then the scale's value will always be |
Changes to doc/scrollbar.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | '\" '\" 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. |
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + | All scrollable widgets have \fBxview\fR and \fByview\fR commands that take exactly the additional arguments appended by the scrollbar as described in \fBSCROLLING COMMANDS\fR below. .OP \-elementborderwidth elementBorderWidth BorderWidth Specifies the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
︙ | |||
99 100 101 102 103 104 105 | 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 | - + - - - + + - + - - - - - - + - - + - - + - - - - + + + + + + + + + - + - - - - - - - - - - - - - + | .SH "WIDGET COMMAND" .PP The \fBscrollbar\fR command creates a new Tcl command whose name is \fIpathName\fR. This command may be used to invoke various operations on the widget. It has the following general form: .CS |
︙ | |||
273 274 275 276 277 278 279 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - | .LP The most recent \fBset\fR widget command determines whether or not to use the old syntax. If it is given two real arguments then the new syntax will be used in the future, and if it is given four integer arguments then the old syntax will be used. .SH BINDINGS |
︙ | |||
340 341 342 343 344 345 346 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - - - - | The Prior and Next keys have the same behavior as mouse clicks over \fBtrough1\fR and \fBtrough2\fR, respectively. .IP [13] The Home key adjusts the view to the top (left edge) of the document. .IP [14] The End key adjusts the view to the bottom (right edge) of the document. .SH EXAMPLE |
Changes to doc/selection.n.
1 2 3 4 5 6 | 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 | - + - + + - + + - - + - + - + - - + - + - + - - + + - - + + - + - - - + + - - + + - + - - + + - + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - + - + - - - | '\" '\" 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. |
Changes to doc/send.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + + | '\" '\" 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. |
︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | 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 | + + - + + | the application's main window. .TP \fB\-\|\-\fR Serves no purpose except to terminate the list of options. This option is needed only if \fIapp\fR could contain a leading .QW \- character. .SH "APPLICATION NAMES" .PP The name of an application is set initially from the name of the program or script that created the application. You can query and change the name of an application with the \fBtk appname\fR command. .SH "DISABLING SENDS" .PP If the \fBsend\fR command is removed from an application (e.g. |
︙ | |||
81 82 83 84 85 86 87 | 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 | - - - - | list of enabled hosts is empty. This means that applications cannot connect to your server unless they use some other form of authorization such as that provide by \fBxauth\fR. Under Windows, \fBsend\fR is currently disabled. Most of the functionality is provided by the \fBdde\fR command instead. .SH EXAMPLE |
Changes to doc/spinbox.n.
1 2 3 4 5 6 | 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 | - + - + - | '\" '\" Copyright (c) 2000 Jeffrey Hobbs. '\" 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. |
︙ | |||
51 52 53 54 55 56 57 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - + - - + - + - + | when using the \fB\-from\fR and \fB\-to\fR range. This must be a format specifier of the form \fB%<pad>.<pad>f\fR, as it will format a floating-point number. .OP \-from from From A floating-point value corresponding to the lowest value for a spinbox, to be used in conjunction with \fB\-to\fR and \fB\-increment\fR. When all are specified correctly, the spinbox will use these values to control its |
︙ | |||
81 82 83 84 85 86 87 | 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 | - + - - + - + - + - + | displayed, the contents will not be selectable, and the spinbox may be displayed in a different color, depending on the values of the \fB\-disabledforeground\fR and \fB\-disabledbackground\fR options. .OP \-to to To A floating-point value corresponding to the highest value for the spinbox, to be used in conjunction with \fB\-from\fR and \fB\-increment\fR. When all are specified correctly, the spinbox will use these values to control |
︙ | |||
128 129 130 131 132 133 134 | 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 | - + - - + + - - + + - + - + - + - + - + - - + + | \fIpathName\fR's parent must exist. .PP A \fBspinbox\fR is an extended \fBentry\fR widget that allows he user to move, or spin, through a fixed set of ascending or descending values such as times or dates in addition to editing the value as in an \fBentry\fR. When first created, a spinbox's string is empty. A portion of the spinbox may be selected as described below. |
︙ | |||
189 190 191 192 193 194 195 | 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 | - + - - + + - - - - + + + + - - - - - - + + + + + + - + - + - - + + - - - + + + - - + + - - - - - + | The type of validation currently set. .IP \fB%V\fR 5 The type of validation that triggered the callback (key, focusin, focusout, forced). .IP \fB%W\fR 5 The name of the spinbox widget. .PP |
︙ | |||
405 406 407 408 409 410 411 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | - + | given by \fIindex\fR. Does not change the selection. Returns an empty string. .TP \fIpathName \fBselection present\fR Returns 1 if there is are characters selected in the spinbox, 0 if nothing is selected. .TP |
︙ | |||
433 434 435 436 437 438 439 | 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 | - - - + + + - + - + - - + + + - - + + - - + | .TP \fIpathName \fBset\fR ?\fIstring\fR? If \fIstring\fR is specified, the spinbox will try and set it to this value, otherwise it just returns the spinbox's string. If validation is on, it will occur when setting the string. .TP \fIpathName \fBvalidate\fR |
︙ | |||
514 515 516 517 518 519 520 | 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | - + - - - + + | .IP [5] Clicking mouse button 1 with the Control key down will position the insertion cursor in the spinbox without affecting the selection. .IP [6] If any normal printing characters are typed in a spinbox, they are inserted at the point of the insertion cursor. .IP [7] |
︙ | |||
594 595 596 597 598 599 600 | 586 587 588 589 590 591 592 593 594 595 | - + - - - - | If the spinbox is disabled using the \fB\-state\fR option, then the spinbox's view can still be adjusted and text in the spinbox can still be selected, but no insertion cursor will be displayed and no text modifications will take place. .PP The behavior of spinboxes can be changed by defining new bindings for individual widgets or by redefining the class bindings. |
Changes to doc/text.n.
1 2 3 4 5 6 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 | - + - + - + - - + + + + - - - + + + + + + - - - - + + + + + - - + + + + - - - + + + - - - - - - - - + - - + + - - - - + + + + + + - - - - - + + + + + + - - - - + + + + + + + - - - - - - + + + + + + + - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + + + - + + - - - + + + - - - - - - - - + + + + + + + + + + + - - - - - + + + + + + + + - - - - - - - + + + + + + + + + + - + + - - + + + - - + + + + - + - - + + + - - - + + + + - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - + + + + + + - - - + + - - + + - - - - - + + + + - - - - + + + + - - - + + + + - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - + + + + + - - - - + + + + + - - - - - - + + + + + + + + - - - - - - + + + + + + - - + + - - - - + + + + + - - + + + + - - - - + + + + + - - - - - + + + + + + + + - - - - - + + + + + + - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - + + + + + + - - - - + + + + + + + - - - - + + + + - - - - - + + + + + + - - - - + + - - - - + + + - - - - - + + + + + - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - + + + + + + - - - + + - - - - - - + - - - - - - - + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - + - - - - - - - - - - - + + + + + - - - - + + + + - - - - + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + - - + - - - - - + - - - - - - - - - + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + + + - + + - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + + + + - - + + + - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + + + - - - - - - + + + + + + + + + + + + - - + + + + + + - - - - - - + + + + + + + + + - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + - - - - - + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + + - - - - + + + + + - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + - - - - + + + + + + - - - - - - - + + + + + + + + - - - + + - - - - - + + + + + - - - + + + - - - - - + + + - - + + + - - - + + - - + + + - - - + + + - - + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + + - - - + + + - - - - - - + + + + + + - - + + - - - - - - + + + + + + + - - - - - - + + + + + - - - - - - - - + + + + + + + - - + + + - - - - + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - - - + + + + - - - - - - - - + + + + + + + + + + - - - + + + + - - - - - - - + + + + + + + + - + - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - - - + + + + + + - - + + - - - + - - + + - - - - - + + + + + + - - + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - + + + + - | '\" '\" Copyright (c) 1992 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. |
︙ | |||
1202 1203 1204 1205 1206 1207 1208 | 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 | - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + - - - - - + + + + + + - - - - + + - - - - - - + + + - - - - - - + + + + + + - - - - - + + + + + - + - - - - - + + + + - - - - - - - - - - - + - - - - - + + + + - - - + + - - + + - - - - + + - - + - - - - + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + - - - - + + + + - + - - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + - - - - - + + + + + - - - + + - - - - - - - - - - + + + + + + + + + + + + - - + - - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + - - - - + + + - - - - + + + + - - - - - + + + + + - - + - - - - - - - + + + + + - + - - - + + - - - - - + + + + - - - - - - - + + + + + + + + - - - - - + + + + + - - - - + + + - - - - - - - + + + + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + + - - - - - + + + + + + + - - - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + + - + + - - + + + - - - - - + + + + + + + - - + + - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - + - - - - + + + + - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + - - - - + + + + + - + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + - - - - + + + + - - - - - - + + + + + - - + + + - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + - - - - - - - - + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + - + - - - - + + + + - + - - - - + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + - - - + + - - - + + + - - - - - - - - - - + + + + + + + + + + + + - - - - + + + - - - - - + + + + + + - - + + - - - - - + + + + + + + + - + - - - + + + - + - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + + - - - + + + + - - - + + + + + - - - - - + + + + + - - + + - - + + - - + + - - - - + + + + - - - - - + + + + - - + + - - - - + + + + + - - - - + + + + - - - + + + + - - - - - - + + + + + + + - - + + - + - - - - + + + + - - - + + + + - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + + + + - - - - + + + + - - - + + + + - - - - - + + + + + - - - + + + - - - - + + + + + - - - + + + + - - - + + + - - - + + + + - - - + + + - - + + - - + + + + + - - + + - - - - - + + - - + + - - - + + + + - - + + + - - - + + + - + + - + + - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + - - + + - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + + - - - - - - - - + + + + + + + + + - + + - - - | first range so deleted text does not cause an undesired index shifting side-effects. If multiple ranges with the same start index are given, then the longest range is used. If overlapping ranges are given, then they will be merged into spans that do not cause deletion of text outside the given ranges due to text shifted during deletion. .TP \fIpathName \fBdlineinfo \fIindex\fR |
Changes to doc/tk.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + + | '\" '\" Copyright (c) 1992 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. |
︙ | |||
41 42 43 44 45 46 47 | 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 | - - - - - - - - + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - - - | This will interfere with option processing, since names starting with capitals are assumed to be classes; as a result, Tk may not be able to find some options for the application. If sends have been disabled by deleting the \fBsend\fR command, this command will reenable them and recreate the \fBsend\fR command. .TP |
Changes to doc/tk4.0.ps.
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + | % FrameMaker. % NOTE % This file fixes the problem with NeWS printers dithering color output. % Any questions should be sent to [email protected] % % Known Problems: % Due to bugs in Transcript, the 'PS-Adobe-' is omitted from line 1 |
︙ | |||
34 35 36 37 38 39 40 | 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 | - + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - + - + - - + + - - - - - + + + + + - - + + - - + + - - - + + + - + - - - - - - - + + + + + + + - - + + - + - + - - + + - - + + - + | % } if systemdict /colorimage known systemdict /currentcolortransfer known and exit } loop def % Uncomment the following line to force b&w on color printer % /FMPrintInColor false def |
︙ | |||
233 234 235 236 237 238 239 | 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 | - - - + + + - + - + - + | /A4 {a4tray a4} def /A4Small {a4tray a4small} def /B4 {b4tray b4} def /B5 {b5tray b5} def /unknown {unknown} def papersizedict dup papername known {papername} {/unknown} ifelse get end |
︙ | |||
310 311 312 313 314 315 316 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - - - - + + + + - - - - - - - + + + + + + + - + | /fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl /periodcentered /quotesinglbase /quotedblbase /perthousand /Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute /Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve /Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron /breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron ] def |
︙ | |||
366 367 368 369 370 371 372 | 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 | - - + + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - - - - - + + + + + + + - + - - - - + + + + - + | orgfreq organgle orgproc cvx setscreen } if } bind def /HUE FMLOCAL /SAT FMLOCAL /BRIGHT FMLOCAL /Colors FMLOCAL |
︙ | |||
651 652 653 654 655 656 657 | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - - + + - + - + - + - + - - - - - - - - - - + + + + + + + + + + - + - + - + - + - - + + - - + + - + | /val FMLOCAL /ws FMLOCAL /im FMLOCAL /bs FMLOCAL /cs FMLOCAL /len FMLOCAL /pos FMLOCAL |
︙ | |||
809 810 811 812 813 814 815 | 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 | - + - + - + - - - - + + + + - + - - - + + + - - - - + + + + - + - + - - + + - - - - + + + + - + - + - + - - - - - - - + + + + + + + - + - - + + - - - - + + + + - + - + - + - + - - - - + + + + - + - + - + - + | setcolortransfer {pop 0} setundercolorremoval {} setblackgeneration } bind def /tran FMLOCAL /fakecolorsetup { /tran 256 string def |
︙ | |||
1380 1381 1382 1383 1384 1385 1386 | 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 | - + | -0.27 ( binding, and) 457.95 580 P (a binding on) 152.1 567.89 T 5 F (<Control-a>) 204.57 567.89 T 3 F ( takes precedence over a binding on) 270.54 567.89 T 5 F |
︙ | |||
1574 1575 1576 1577 1578 1579 1580 | 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 | - + - + | 5 F (Control) 391.17 608.33 T 3 F (, or any combina-) 433.15 608.33 T (tion of them. If you wish for a binding not to trigger when a modi\336er is present, you can) 152.1 596.33 T (just de\336ne an empty binding for that modi\336er combination. For example,) 152.1 584.33 T 5 9 Q |
︙ |
Changes to doc/tk_mac.n.
1 2 3 4 5 6 | 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) 2011 Kevin Walzer. '\" Copyright (c) 2011 Donal K. Fellows. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
77 78 79 80 81 82 83 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | } .CE .RE .TP \fB::tk::mac::OpenApplication\fR . If a proc of this name is defined, this proc fill fire when your application |
︙ | |||
126 127 128 129 130 131 132 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - - + + + | .RE .TP \fB::tk::mac::PrintDocument \fIfile...\fR . If a proc of this name is defined it is the default Apple Event handler for kAEPrintDocuments, .QW pdoc , |
︙ | |||
156 157 158 159 160 161 162 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | .TP \fB::tk::mac::ShowHelp\fR . Customizes behavior of Apple Help menu; if this procedure is not defined, the platform-specific standard Help menu item .QW "YourApp Help" performs the default Cocoa action of showing the Help Book configured in the |
︙ |
Changes to doc/tkerror.n.
1 2 3 4 5 6 | 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 | - + + - + - + - + + - - - | '\" '\" 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. |
Changes to doc/tkvars.n.
1 2 3 4 5 6 | 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) 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. |
Changes to doc/tkwait.n.
1 2 3 4 5 6 | 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 | - + + | '\" '\" Copyright (c) 1992 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. |
︙ | |||
39 40 41 42 43 44 45 | 40 41 42 43 44 45 46 47 48 49 | - + - - - - | with a dialog box before using the result of that interaction. .PP While the \fBtkwait\fR command is waiting it processes events in the normal fashion, so the application will continue to respond to user interactions. If an event handler invokes \fBtkwait\fR again, the nested call to \fBtkwait\fR must complete before the outer call can complete. |
Changes to doc/toplevel.n.
1 2 3 4 5 6 7 8 9 10 11 12 | 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 | - + - + - - - - - - - - - - - - - + + + + - + | '\" '\" 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 toplevel n 8.4 Tk "Tk Built-In Commands" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME |
︙ | |||
78 79 80 81 82 83 84 | 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 | - - - - - - - - - - + + - + - + - + + - - + - - + - - + - + - - + + + | Specifies the screen on which to place the new window. Any valid screen name may be used, even one associated with a different display. Defaults to the same screen as its parent. This option is special in that it may not be specified via the option database, and it may not be modified with the \fBconfigure\fR widget command. |
Changes to doc/ttk_Geometry.3.
︙ | |||
62 63 64 65 66 67 68 | 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 | - - + - + - - + - - + + - + - + - - + + - - - - + + + + - + | .AP "Ttk_Box *" cavity in/out A rectangular region from which a parcel is allocated. .AP short border in Extra padding (in pixels) to add uniformly to each side of a region. .AP short bottom in Extra padding (in pixels) to add to the bottom of a region. .AP Ttk_Box box in |
︙ | |||
126 127 128 129 130 131 132 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | - + | int \fIy\fR; int \fIwidth\fR; int \fIheight\fR; } \fBTtk_Box\fR; .CE All coordinates are relative to the window. .PP |
︙ | |||
171 172 173 174 175 176 177 | 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 | - + - + - + - + - - + + - + - + - - + + | short \fIleft\fR; short \fItop\fR; short \fIright\fR; short \fIbottom\fR; } \fBTtk_Padding\fR; .CE .PP |
Changes to doc/ttk_Theme.3.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" Copyright (c) 2003 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ |
Changes to doc/ttk_button.n.
1 2 3 4 5 | 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 | - + - + - + + + + + + + + + - - + + - - + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - + - - - + | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_checkbutton.n.
1 2 3 4 5 | 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 | - + - + - + - + - - + + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_combobox.n.
1 2 3 4 5 | 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 | - + - + - + - + - + - + | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - - + + - - | '\"See \fIttk::widget(n)\fR. '\".TP '\"\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? '\"Modify or query widget options. '\"See \fIttk::widget(n)\fR. .TP \fIpathName \fBcurrent\fR ?\fInewIndex\fR? |
︙ | |||
108 109 110 111 112 113 114 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | .DE .SH "VIRTUAL EVENTS" .PP The combobox widget generates a \fB<<ComboboxSelected>>\fR virtual event when the user selects an element from the list of values. If the selection action unposts the listbox, this event is delivered after the listbox is unposted. |
Changes to doc/ttk_entry.n.
1 2 3 4 5 6 7 | 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) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 1998-2000 Scriptics Corporation. '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | of the entry. .OP \-state state State Compatibility option; see \fIttk::widget(n)\fR for details. Specifies one of three states for the entry, \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. See \fBWIDGET STATES\fR, below. .OP \-textvariable textVariable Variable |
︙ | |||
83 84 85 86 87 88 89 | 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 | - + - - + + | Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. .\" Not in ttk: If the value is less than or equal to zero, the widget picks a .\" Not in ttk: size just large enough to hold its current text. .SH NOTES .PP A portion of the entry may be selected as described below. |
︙ | |||
213 214 215 216 217 218 219 | 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 329 330 331 332 333 334 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + | .RE '\".TP '\"\fIpathName \fBstate\fR ?\fIstateSpec\fR? '\"Modify or query the widget state. '\"See \fIttk::widget(n)\fR. .TP \fIpathName \fBvalidate\fR |
︙ | |||
305 306 307 308 309 310 311 | 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 | - + - + - + | .IP \fB%W\fR The name of the entry widget. .RE .SS "DIFFERENCES FROM TK ENTRY WIDGET VALIDATION" .PP The standard Tk entry widget automatically disables validation (by setting \fB\-validate\fR to \fBnone\fR) |
︙ | |||
349 350 351 352 353 354 355 | 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | - + - - - + + | .IP \0\(bu 4 Clicking mouse button 1 with the Control key down will position the insert cursor in the entry without affecting the selection. .IP \0\(bu 4 If any normal printing characters are typed in an entry, they are inserted at the point of the insert cursor. .IP \0\(bu 4 |
︙ | |||
400 401 402 403 404 405 406 | 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 | - + - - + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | .IP \0\(bu 4 Control-d deletes the character to the right of the insert cursor. .IP \0\(bu 4 Control-k deletes all the characters to the right of the insertion cursor. .SH "WIDGET STATES" .PP |
Changes to doc/ttk_frame.n.
1 2 3 4 5 | 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 | - + - - + + - + - - + + + - - - - - - - - - - - - - - - - - - - | '\" '\" Copyright (c) 2005 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_image.n.
1 2 3 4 5 | 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 | - + - + - - - - - - - - + - - - - - - - - - - + - + - + | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ |
Changes to doc/ttk_intro.n.
1 2 3 4 5 | 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) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
43 44 45 46 47 48 49 | 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 | - + - + - + - + | .PP An \fIelement\fR displays an individual part of a widget. For example, a vertical scrollbar widget contains \fBuparrow\fR, \fBdownarrow\fR, \fBtrough\fR and \fBslider\fR elements. .PP Element names use a recursive dotted notation. For example, \fBuparrow\fR identifies a generic arrow element, |
︙ | |||
82 83 84 85 86 87 88 | 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 | - + - + - + - + - + - + - + - + | For example, the layout for a horizontal scrollbar is: .PP .CS ttk::\fBstyle layout\fR Horizontal.TScrollbar { Scrollbar.trough \-children { Scrollbar.leftarrow \-side left \-sticky w Scrollbar.rightarrow \-side right \-sticky e |
︙ |
Changes to doc/ttk_label.n.
1 2 3 4 5 | 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) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_labelframe.n.
1 2 3 4 5 | 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) 2005 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_menubutton.n.
1 2 3 4 5 | 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 | - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_notebook.n.
1 2 3 4 5 | 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 | - + - + - + - + - + - + - + - - - - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_panedwindow.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | '\" '\" Copyright (c) 2005 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" |
︙ | |||
48 49 50 51 52 53 54 | 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 | - + - + - + - + - + - + - + - - + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | When the paned window is resized, the extra space is added or subtracted to each pane proportionally to its \fB\-weight\fR. .SH "WIDGET COMMAND" Supports the standard \fBconfigure\fR, \fBcget\fR, \fBstate\fR, and \fBinstate\fR commands; see \fIttk::widget(n)\fR for details. Additional commands: .TP |
Changes to doc/ttk_progressbar.n.
1 2 3 4 5 | 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 | - + - - - - - - - - + + - + + + - + - + + - - - - - - - - - - - - - - - - + + + + + + + + + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | '\" '\" Copyright (c) 2005 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_radiobutton.n.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
25 26 27 28 29 30 31 | 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 | - - + + - - + + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | \-takefocus \-text \-textvariable \-underline \-width .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command A Tcl script to evaluate whenever the widget is invoked. .OP \-value Value Value |
Changes to doc/ttk_scale.n.
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - + - - | scale's height; for horizontal scales it is the scale's width. .OP \-orient orient Orient Specifies which orientation whether the widget should be laid out horizontally or vertically. Must be either \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these. .OP \-to to To Specifies a real value corresponding to the right or bottom end of the scale. |
︙ | |||
63 64 65 66 67 68 69 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | .TP \fIpathName \fBget \fR?\fIx y\fR? . Get the current value of the \fB\-value\fR option, or the value corresponding to the coordinates \fIx,y\fR if they are specified. \fIX\fR and \fIy\fR are pixel coordinates relative to the scale widget origin. .TP |
︙ | |||
89 90 91 92 93 94 95 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | .PP .TP \fIpathName \fBcoords \fR?\fIvalue\fR? . Get the coordinates corresponding to \fIvalue\fR, or the coordinates corresponding to the current value of the \fB\-value\fR option if \fIvalue\fR is omitted. |
Changes to doc/ttk_scrollbar.n.
1 2 3 4 5 6 | 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 | - + - + - + - + - + - - + + - + | '\" '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 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 | + + + + + + + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | The widget should adjust its view so that the point given by \fIfraction\fR appears at the beginning of the widget. If \fIfraction\fR is 0 it refers to the beginning of the document. 1.0 refers to the end of the document, 0.333 refers to a point one-third of the way through the document, and so on. .TP \fIprefix \fBscroll \fInumber \fBunits\fR The widget should adjust its view by \fInumber\fR units. The units are defined in whatever way makes sense for the widget, such as characters or lines in a text widget. \fINumber\fR is either 1, which means one unit should scroll off the top or left of the window, or \-1, which means that one unit should scroll off the bottom or right of the window. .TP \fIprefix \fBscroll \fInumber \fBpages\fR The widget should adjust its view by \fInumber\fR pages. It is up to the widget to define the meaning of a page; typically it is slightly less than what fits in the window, so that there is a slight overlap between the old and new views. \fINumber\fR is either 1, which means the next page should become visible, or \-1, which means that the previous page should become visible. |
Changes to doc/ttk_separator.n.
1 2 3 4 5 | 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 | - + - + - - + + - - - - - - - - - - - - - - | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_sizegrip.n.
1 2 3 4 5 | 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 | - + - + | '\" '\" Copyright (c) 2006 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - - - - - - - - - - - - - | instead of .QW "\fBwm geometry ... \fIw\fBx\fIh\fB+\fIx\fB+\fIy\fR" ), the sizegrip widget will not resize the window. .PP \fBttk::sizegrip\fR widgets only support .QW southeast resizing. |
Changes to doc/ttk_spinbox.n.
1 2 3 4 5 | 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 | - - + + - - + + - - - - - - - - + + + + + - - - - - - + + + + + + + + + - - + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | '\" '\" Copyright (c) 2008 Pat Thoyts '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Changes to doc/ttk_style.n.
1 2 | 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 | - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - - - + + + + - - - - - - - - + - - - - - - - - - - - - + - - - - + - - - - - + + + + | '\" '\" Copyright (c) 2004 Joe English |
︙ |
Changes to doc/ttk_treeview.n.
1 2 3 4 5 | 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 | - - + + - + - + - + - + - - + - + - - + + + + + + - + - + | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ | |||
107 108 109 110 111 112 113 | 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 | - + - + - + - + - + - + - - + + - - - + + + - - - - + + - - - + | .TP \fIpathname \fBchildren \fIitem\fR ?\fInewchildren\fR? If \fInewchildren\fR is not specified, returns the list of children belonging to \fIitem\fR. .RS .PP If \fInewchildren\fR is specified, replaces \fIitem\fR's child list |
︙ | |||
181 182 183 184 185 186 187 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - + | Returns 1 if the specified \fIitem\fR is present in the tree, 0 otherwise. .TP \fIpathname \fBfocus \fR?\fIitem\fR? If \fIitem\fR is specified, sets the focus item to \fIitem\fR. Otherwise, returns the current focus item, or \fB{}\fR if there is none. .\" Need: way to clear the focus item. {} works for this... |
︙ | |||
231 232 233 234 235 236 237 | 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 | - + - + - + - + - + - + - + - + | .IP cell A data cell. .RE \fIpathname \fBidentify item \fIx y\fR Returns the item ID of the item at position \fIy\fR. .TP \fIpathname \fBidentify column \fIx y\fR |
︙ | |||
340 341 342 343 344 345 346 | 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 | - - - - - - + - + - - + + - + - - + + - + - - - - - - + + + + + - + - + - - - - + + + + - - + - + | .TP \fIpathname \fBstate\fR ?\fIstateSpec\fR? Modify or query the widget state; see \fIttk::widget(n)\fR. .TP \fIpathName \fBtag \fIargs...\fR .RS .TP |
︙ | |||
424 425 426 427 428 429 430 | 416 417 418 419 420 421 422 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 | - + - - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | If there are more values than columns, the extra values are ignored. .RE .OP \-open open Open A boolean value indicating whether the item's children should be displayed (\fB\-open true\fR) or hidden (\fB\-open false\fR). .OP \-tags tags Tags |
Changes to doc/ttk_vsapi.n.
1 2 3 4 5 | 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 | - + - + - + - - + + - + - + - - - - - - - - - + - - + - - - - + + + - + - - + - + - + - + - + - + - + - + | '\" '\" Copyright (c) 2008 Pat Thoyts '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
︙ |
Changes to doc/ttk_widget.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | '\" '\" Copyright (c) 2004 Joe English '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" |
︙ | |||
50 51 52 53 54 55 56 | 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 | - + - - - + + + + + + + + + - - - + + + + + + + + + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - - - - - - + - + - + | Each of the numbers is a fraction between 0 and 1 indicating a position in the document; 0 indicates the beginning, and 1 indicates the end. The first fraction indicates the first information in the widget that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. .PP |
Changes to doc/winfo.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + + | '\" '\" Copyright (c) 1990-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. |
︙ | |||
69 70 71 72 73 74 75 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - - - | system of the root window (if a virtual-root window manager is in use then the coordinate system of the virtual root window is used). If the \fB\-displayof\fR option is given then the coordinates refer to the screen containing \fIwindow\fR; otherwise they refer to the screen of the application's main window. If no window in this application contains the point then an empty string is returned. |
︙ | |||
103 104 105 106 107 108 109 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - + | Returns the geometry for \fIwindow\fR, in the form \fIwidth\fBx\fIheight\fB+\fIx\fB+\fIy\fR. All dimensions are in pixels. .TP \fBwinfo height \fIwindow\fR Returns a decimal string giving \fIwindow\fR's height in pixels. When a window is first created its height will be 1 pixel; the |
︙ | |||
314 315 316 317 318 319 320 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - + - + - - - | relative to the root window of its screen. This is normally either zero or negative. Returns 0 if there is no virtual root window for \fIwindow\fR. .TP \fBwinfo width \fIwindow\fR Returns a decimal string giving \fIwindow\fR's width in pixels. When a window is first created its width will be 1 pixel; the |
Changes to doc/wish.1.
1 2 3 4 5 6 | 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 | - + - + + + | '\" '\" Copyright (c) 1991-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. |
︙ | |||
57 58 59 60 61 62 63 | 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 | - + - + | .SH DESCRIPTION .PP \fBWish\fR is a simple program consisting of the Tcl command language, the Tk toolkit, and a main program that reads commands from standard input or from a file. It creates a main window and then processes Tcl commands. If \fBwish\fR is invoked with arguments, then the first few |
︙ | |||
207 208 209 210 211 212 213 | 209 210 211 212 213 214 215 216 217 | - - - - + | \fBtcl_prompt1\fR exists then it must consist of a Tcl script to output a prompt; instead of outputting a prompt \fBwish\fR will evaluate the script in \fBtcl_prompt1\fR. The variable \fBtcl_prompt2\fR is used in a similar way when a newline is typed but the current command is not yet complete; if \fBtcl_prompt2\fR is not set then no prompt is output for incomplete commands. |
Changes to doc/wm.n.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | '\" '\" Copyright (c) 1991-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. |
︙ | |||
23 24 25 26 27 28 29 | 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 | - - - - - - - - - - - + + + + + + + + + - - - + + + + + + + - - - - - + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + + + + + - - | the \fIoption\fR argument. All of the forms expect at least one additional argument, \fIwindow\fR, which must be the path name of a top-level window. .PP The legal forms for the \fBwm\fR command are: .TP \fBwm aspect \fIwindow\fR ?\fIminNumer minDenom maxNumer maxDenom\fR? |
︙ | |||
254 255 256 257 258 259 260 | 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 | - - - - - - | whose colormaps differ from their parents, followed by the top-level itself; the order of the internal windows is undefined. See the ICCCM documentation for more information on the \fBWM_COLORMAP_WINDOWS\fR property. .RE .TP \fBwm command \fIwindow\fR ?\fIvalue\fR? |
︙ | |||
357 358 359 360 361 362 363 | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - | size and location of the window. This can vary significantly, for example to reflect the addition of decorative elements to \fIwindow\fR such as title bars, and window managers are not required to precisely follow the requests made through this command. .RE .TP \fBwm grid \fIwindow\fR ?\fIbaseWidth baseHeight widthInc heightInc\fR? |
︙ | |||
393 394 395 396 397 398 399 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - - - + - - - - + - - - + + - - - - - - - - - - - - - - - - - - - - | .PP Note: this command should not be needed very often, since the \fBTk_SetGrid\fR library procedure and the \fBsetGrid\fR option provide easier access to the same functionality. .RE .TP \fBwm group \fIwindow\fR ?\fIpathName\fR? |
︙ | |||
636 637 638 639 640 641 642 | 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 603 604 605 606 607 608 609 610 | - - - - - - + - - - - - - - - - - + + + + + + + + + + - - + - - - - - | you have not asked for one with \fBwm protocol\fR. If a \fBWM_DELETE_WINDOW\fR message arrives when you have not defined a handler, then Tk handles the message by destroying the window for which it was received. .RE .TP \fBwm resizable \fIwindow\fR ?\fIwidth height\fR? |
︙ | |||
799 800 801 802 803 804 805 | 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | - + - | Tk (and the window manager) assume that there is a grid of some sort within the application and that the application should be resized in terms of \fIgrid units\fR rather than pixels. Gridded geometry management is typically invoked by turning on the \fBsetGrid\fR option for a widget; it can also be invoked with the \fBwm grid\fR command or by calling \fBTk_SetGrid\fR. In each of these approaches the particular widget (or sometimes |
︙ | |||
851 852 853 854 855 856 857 | 723 724 725 726 727 728 729 | - - - | \fBwm title\fR .msg "Dialog demo" \fBwm deiconify\fR .msg .CE .SH "SEE ALSO" toplevel(n), winfo(n) .SH KEYWORDS aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager |
Changes to generic/default.h.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + - + | * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _DEFAULT #define _DEFAULT #if defined(__WIN32__) || defined(_WIN32) || \ |
︙ |
Changes to generic/ks_names.h.
1 2 3 4 5 6 | 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 | - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - | /* * This file should be maintained in sync with xlib/X11/keysymdefs.h * * Note that this should be done manually only, because in some cases * keysymdefs.h defines the same integer for multiple keysyms, e.g.: * |
︙ | |||
77 78 79 80 81 82 83 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - - - - - - - - - - - - - | { "KP_Space", 0xFF80 }, { "KP_Tab", 0xFF89 }, { "KP_Enter", 0xFF8D }, { "KP_F1", 0xFF91 }, { "KP_F2", 0xFF92 }, { "KP_F3", 0xFF93 }, { "KP_F4", 0xFF94 }, |
︙ | |||
181 182 183 184 185 186 187 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + - - - - + + + - - + - - - - - + + + + - - - + - - - - - - - - - - - + + + + + + - - - - + + + - - - - + + - - - - + + - - - - - - - - - - - - + + + + + + + + - - - + + - - + - - - - - - + - - - + - - - - - - + + - - - - - - - - - + + + + + + + + - - - - - - + + + + + - - - - - - + + + + + - - - - - - - + + + + + + - - + - - - - - - - + + + + + + - - - - - - - - - - - + + + + + - - - + - - - - - - - + + + - - - - + - - + - - - - - - - - + + + + + + + - - - - + + + - - - - - + + - - + - - - - - - - - - - - + + + + + + + + + + - - - + - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + - - - - + - - - - + + - - - + + - - - - - - - - - - - - + + + + + + + + + + - - + - - - - - - - - - + + + - - - - - + - - - - - - - - - - - + + + + + + + + + + - - - + + - - - - + + + - - - - + + - - - - - + - - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - + + + + - - - - + + + - - - - - - + + + + - - + - - - + + - - - - - + + - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + + + + + - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + - - - - - - - - - - - + + + + + + + + + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - + - - - - - - - - - - + + + + + + + + + - - - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - + - - - - + - - - - - - - - - - + + + + + + + + + - - - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + - - + - - - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + - - - - - - - - + + + + + + + + + + + + + - - + - - - - - - + + + + + - - + - - - + + - - + - - + - - + - - + - - + - - + - - + - - + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - + - - - - - + + - - - - - - - - - + - - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - + + - - - - - - - + - - - - - - - - - - - + + - - - - + - - - + - - - - - - - - - - - + + - - - - + + + - - + - - - - - - - - - + - - - - - - - - - - - - - - - - - - + - - + - - - - - + + + + - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - + - - - - - - + - - + - - - - - - - + - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + - - - - - - - - + + + + + + + - - - - - - - + - - - - - - - - - - - - - - - - - + + - - + - - - - + + + - - - - + - - - - - - - + - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - + + + - - - - - - - - - - + + + + - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - + + - - - - - - - + + + - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - + + + + - - - - - - - - - - - - + + - - - - - - + + - - - - - - - - - - - + - - - - - - - - - - - - - + + - - - - - - - - - - - - + + - - - - - - - - - + + + - - - - - - - - - - - - + - - - - + - - - - - + + - - - - - + + - - - - - - + + - - - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + - - - - - - - - - - - - - - - - + + + + + - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - + + + + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + - - - - + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | { "Meta_R", 0xFFE8 }, { "Alt_L", 0xFFE9 }, { "Alt_R", 0xFFEA }, { "Super_L", 0xFFEB }, { "Super_R", 0xFFEC }, { "Hyper_L", 0xFFED }, { "Hyper_R", 0xFFEE }, |
Deleted generic/nanosvg.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted generic/nanosvgrast.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tk.decls.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - | # Define the tk interface with 3 sub interfaces: # tkPlat - platform specific public # tkInt - generic private # tkPlatInt - platform specific private interface tk hooks {tkPlat tkInt tkIntPlat tkIntXlib} |
︙ | |||
101 102 103 104 105 106 107 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + | void Tk_CanvasSetStippleOrigin(Tk_Canvas canvas, GC gc) } declare 18 { int Tk_CanvasTagsParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 19 { |
︙ | |||
124 125 126 127 128 129 130 | 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 | - + - + - + - - + + - + - + - + - + | int *yPtr, int *widthPtr, int *heightPtr) } declare 24 { void Tk_ClearSelection(Tk_Window tkwin, Atom selection) } declare 25 { int Tk_ClipboardAppend(Tcl_Interp *interp, Tk_Window tkwin, |
︙ | |||
241 242 243 244 245 246 247 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | - + | declare 53 { void Tk_DeleteSelHandler(Tk_Window tkwin, Atom selection, Atom target) } declare 54 { void Tk_DestroyWindow(Tk_Window tkwin) } declare 55 { |
︙ | |||
313 314 315 316 317 318 319 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | - + - + | declare 72 { void Tk_FreeGC(Display *display, GC gc) } declare 73 { void Tk_FreeImage(Tk_Image image) } declare 74 { |
︙ | |||
344 345 346 347 348 349 350 | 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 | - + - + - + | Tk_BindingTable bindingTable, ClientData object) } declare 82 { int Tk_GetAnchor(Tcl_Interp *interp, const char *str, Tk_Anchor *anchorPtr) } declare 83 { |
︙ | |||
399 400 401 402 403 404 405 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | - - + + | GC Tk_GetGC(Tk_Window tkwin, unsigned long valueMask, XGCValues *valuePtr) } declare 97 { Tk_Image Tk_GetImage(Tcl_Interp *interp, Tk_Window tkwin, const char *name, Tk_ImageChangedProc *changeProc, ClientData clientData) } declare 98 { |
︙ | |||
435 436 437 438 439 440 441 | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - + | int Tk_GetRelief(Tcl_Interp *interp, const char *name, int *reliefPtr) } declare 107 { void Tk_GetRootCoords(Tk_Window tkwin, int *xPtr, int *yPtr) } declare 108 { int Tk_GetScrollInfo(Tcl_Interp *interp, |
︙ | |||
468 469 470 471 472 473 474 | 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 | - + - - + + | declare 115 { void Tk_HandleEvent(XEvent *eventPtr) } declare 116 { Tk_Window Tk_IdToWindow(Display *display, Window window) } declare 117 { |
︙ | |||
514 515 516 517 518 519 520 | 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 | - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + | declare 128 { void Tk_MoveWindow(Tk_Window tkwin, int x, int y) } declare 129 { void Tk_MoveToplevelWindow(Tk_Window tkwin, int x, int y) } declare 130 { |
︙ | |||
688 689 690 691 692 693 694 | 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | - + | Tk_TextLayout layout, int x, int y, int underline) } declare 180 { void Tk_Ungrab(Tk_Window tkwin) } declare 181 { |
︙ | |||
740 741 742 743 744 745 746 | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 | - + | declare 193 { void Tk_FreeBitmapFromObj(Tk_Window tkwin, Tcl_Obj *objPtr) } declare 194 { void Tk_FreeColorFromObj(Tk_Window tkwin, Tcl_Obj *objPtr) } declare 195 { |
︙ | |||
770 771 772 773 774 775 776 | 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | - + - + | XColor *Tk_GetColorFromObj(Tk_Window tkwin, Tcl_Obj *objPtr) } declare 203 { Tk_Cursor Tk_GetCursorFromObj(Tk_Window tkwin, Tcl_Obj *objPtr) } declare 204 { Tcl_Obj *Tk_GetOptionInfo(Tcl_Interp *interp, |
︙ | |||
798 799 800 801 802 803 804 | 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | - + - + - + - + | Tcl_Obj *objPtr, int *resultPtr) } declare 210 { int Tk_GetScrollInfoObj(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], double *dblPtr, int *intPtr) } declare 211 { |
︙ | |||
920 921 922 923 924 925 926 | 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | - + - + - + | # declare 241 { Tk_Window Tk_CreateAnonymousWindow(Tcl_Interp *interp, Tk_Window parent, const char *screenName) } declare 242 { void Tk_SetClassProcs(Tk_Window tkwin, |
︙ | |||
997 998 999 1000 1001 1002 1003 | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 | - + - + - + - + | } declare 260 { Tk_StyledElement Tk_GetStyledElement(Tk_Style style, int elementId, Tk_OptionTable optionTable) } declare 261 { void Tk_GetElementSize(Tk_Style style, Tk_StyledElement element, |
︙ | |||
1059 1060 1061 1062 1063 1064 1065 | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 | - + - + - - - + - - - - - - - - - - - - - - + - - - - | # Note that this restores the usual rules for stub compatibility. Stub-enabled # extensions compiled against 8.5 headers and linked to the 8.5 stub library # will produce a file [load]able into an interp with Tk 8.X, for X >= 5. # It will *not* be [load]able into interps with Tk 8.4 (or Tk 8.2!). # Developers who need to produce a file [load]able into legacy interps must # build against legacy sources. declare 272 { |
︙ | |||
1117 1118 1119 1120 1121 1122 1123 | 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 | - - - + + + + + + + + + + + + + + + + + - + - + - - - + + - + - - - - - - - - - - - + - + + + + + + + - - + - - + + + + + + + + + + | declare 5 win { int Tk_TranslateWinEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result) } ################################ # Aqua specific functions |
Changes to generic/tk.h.
︙ | |||
13 14 15 16 17 18 19 | 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 | - - + + - + - - - + + - - - - - + - - - - + + - - - - + - - + + + - + - - - + + + - - - + + + - - - - - - - - + - - + | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TK #define _TK #include <tcl.h> |
︙ | |||
188 189 190 191 192 193 194 | 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 | - - + - - - - + + + + - - - - + + + + - - - - - + | const char *optionName; /* Name used to specify option in Tcl * commands. */ const char *dbName; /* Name for option in option database. */ const char *dbClass; /* Class for option in database. */ const char *defValue; /* Default value for option if not specified * in command line, the option database, or * the system. */ |
︙ | |||
235 236 237 238 239 240 241 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | - - + - - - - - - - - - + + + - - - - - + + + + | /* * The following structure and function types are used by TK_OPTION_CUSTOM * options; the structure holds pointers to the functions needed by the Tk * option config code to handle a custom option. */ |
︙ | |||
277 278 279 280 281 282 283 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - - + - | } Tk_ObjCustomOption; /* * Macro to use to fill in "offset" fields of the Tk_OptionSpec structure. * Computes number of bytes from beginning of structure to a given field. */ |
︙ | |||
303 304 305 306 307 308 309 | 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 | - + - + - - + - - - | * option. */ Tcl_Obj *valuePtr; /* The old value of the option, in the form of * a Tcl object; may be NULL if the value was * not saved as an object. */ double internalForm; /* The old value of the option, in some * internal representation such as an int or * (XColor *). Valid only if the field |
︙ | |||
351 352 353 354 355 356 357 | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | - - - - - + + + + + - - - - - + - | /* * This is a temporary flag used while tkObjConfig and new widgets are in * development. */ #ifndef __NO_OLD_CONFIG |
︙ | |||
386 387 388 389 390 391 392 | 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 | - + - - - + + - - - - - + | * database, etc. */ typedef struct Tk_ConfigSpec { int type; /* Type of option, such as TK_CONFIG_COLOR; * see definitions below. Last option in table * must have type TK_CONFIG_END. */ |
︙ | |||
442 443 444 445 446 447 448 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | - - + - - + - + - + - + | * (internal-use-only flags are defined there). */ #define TK_CONFIG_NULL_OK (1 << 0) #define TK_CONFIG_COLOR_ONLY (1 << 1) #define TK_CONFIG_MONO_ONLY (1 << 2) #define TK_CONFIG_DONT_SET_DEFAULT (1 << 3) |
︙ | |||
599 600 601 602 603 604 605 | 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - - - - + + + + + - - - - | #define TK_IGNORE_NEWLINES 16 /* * Widget class procedures used to implement platform specific widget * behavior. */ |
︙ | |||
634 635 636 637 638 639 640 | 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | - + - + - - - + + + + - + - - + + - + | * (or NULL if the structure is NULL). * * A more general version of this function may be useful if other * size-versioned structure pop up in the future: * * #define Tk_GetField(name, who, which) \ * (((who) == NULL) ? NULL : |
︙ | |||
711 712 713 714 715 716 717 | 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 | - + | typedef struct { int type; unsigned long serial; /* # of last request processed by server. */ Bool send_event; /* True if this came from a SendEvent * request. */ Display *display; /* Display the event was read from. */ Window event; /* Window on which event was requested. */ |
︙ | |||
781 782 783 784 785 786 787 | 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | - + - | (((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED) #define Tk_TopWinHierarchy(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY) #define Tk_IsManageable(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE) #define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) #define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) |
︙ | |||
829 830 831 832 833 834 835 | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | - + - - - - - - - - - | Tk_Uid classUid; XWindowChanges changes; unsigned int dummy6; /* dirtyChanges */ XSetWindowAttributes atts; unsigned long dummy7; /* dirtyAtts */ unsigned int flags; char *dummy8; /* handlerList */ |
︙ | |||
900 901 902 903 904 905 906 907 908 909 910 911 912 913 | 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | + + + | * process or elsewhere) may be embedding itself * inside the window. * TK_BOTH_HALVES: 1 means that this window is used for * application embedding (either as container or * embedded application), and both the containing * and embedded halves are associated with * windows in this particular process. * TK_DEFER_MODAL: 1 means that this window has deferred a modal * loop until all of the bindings for the current * event have been invoked. * TK_WRAPPER: 1 means that this window is the extra wrapper * window created around a toplevel to hold the * menubar under Unix. See tkUnixWm.c for more * information. * TK_REPARENTED: 1 means that this window has been reparented * so that as far as the window system is * concerned it isn't a child of its Tk parent. |
︙ | |||
923 924 925 926 927 928 929 | 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 | - - - - - + - - - - - - + + + + + + + - - + - - - - - + - + - - - | * window's parent either doesn't exist or is not * owned by this Tk application. * TK_PROP_PROPCHANGE 1 means that PropertyNotify events in the * window's children should propagate up to this * window. * TK_WM_MANAGEABLE 1 marks a window as capable of being converted * into a toplevel using [wm manage]. |
︙ | |||
1045 1046 1047 1048 1049 1050 1051 | 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | - - - + + + - - - - - - + + + + + + + - - - - + + - - + - - + - - - - - + + + - - - - + + - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + - - - + + + - - - - - - - - - - - + + + + + + + + + - - + - - + - - - - + | #define TK_ITEM_DONT_REDRAW 2 /* * Records of the following type are used to describe a type of item (e.g. * lines, circles, etc.) that can form part of a canvas widget. */ |
︙ | |||
1167 1168 1169 1170 1171 1172 1173 | 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 | - - - + - - - - - - - - + - - + - + - - - - - + - - - | Tk_ItemInsertProc *insertProc; /* Procedure to insert something into an * item. */ Tk_ItemDCharsProc *dCharsProc; /* Procedure to delete characters from an * item. */ struct Tk_ItemType *nextPtr;/* Used to link types together into a list. */ |
︙ | |||
1255 1256 1257 1258 1259 1260 1261 | 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | - + - - - + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + | typedef struct Tk_TSOffset { int flags; /* Flags; see below for possible values */ int xoffset; /* x offset */ int yoffset; /* y offset */ } Tk_TSOffset; /* |
︙ | |||
1403 1404 1405 1406 1407 1408 1409 | 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 | - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + | /* * Procedure prototypes and structures used in reading and writing photo * images: */ typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat; #ifdef USE_OLD_IMAGE |
︙ | |||
1487 1488 1489 1490 1491 1492 1493 | 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 | - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + | #define TK_STYLE_VERSION TK_STYLE_VERSION_1 /* * The following structures and prototypes are used as static templates to * declare widget elements. */ |
︙ | |||
1545 1546 1547 1548 1549 1550 1551 | 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 | - | * The definitions below provide backward compatibility for functions and * types related to event handling that used to be in Tk but have moved to * Tcl. * *---------------------------------------------------------------------- */ |
︙ | |||
1579 1580 1581 1582 1583 1584 1585 | 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 | - + + + + + + - - - - + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - - + + - | /* Additional stuff that has moved to Tcl: */ #define Tk_EventuallyFree Tcl_EventuallyFree #define Tk_FreeProc Tcl_FreeProc #define Tk_Preserve Tcl_Preserve #define Tk_Release Tcl_Release |
︙ | |||
1647 1648 1649 1650 1651 1652 1653 | 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 | - + - | #define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat #endif /* USE_OLD_IMAGE */ /* *---------------------------------------------------------------------- * * Allow users to say that they don't want to alter their source to add extra |
︙ | |||
1686 1687 1688 1689 1690 1691 1692 | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 | - | # endif # define Tk_PhotoExpand Tk_PhotoExpand_Panic # ifdef Tk_PhotoSetSize # undef Tk_PhotoSetSize # endif # define Tk_PhotoSetSize Tk_PhotoSetSize_Panic #endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */ |
︙ |
Changes to generic/tk3d.c.
︙ | |||
15 16 17 18 19 20 21 | 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 | - + - - + | #include "tk3d.h" /* * The following table defines the string values for reliefs, which are used * by Tk_GetReliefFromObj. */ |
︙ | |||
68 69 70 71 72 73 74 | 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 | - - + + - + - + + - + + - - - + + + - + - + - + | * Tk_Draw3DRectangle and Tk_Free3DBorder. If an error prevented the * border from being created then NULL is returned and an error message * will be left in the interp's result. * * Side effects: * The border is added to an internal database with a reference count. * For each call to this function, there should eventually be a call to |
︙ | |||
196 197 198 199 200 201 202 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + | if (!dispPtr->borderInit) { BorderInit(dispPtr); } hashPtr = Tcl_CreateHashEntry(&dispPtr->borderTable, colorName, &isNew); if (!isNew) { |
︙ | |||
313 314 315 316 317 318 319 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
416 417 418 419 420 421 422 | 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | + - + - + | Tk_Free3DBorder( Tk_3DBorder border) /* Token for border to be released. */ { TkBorder *borderPtr = (TkBorder *) border; Display *display = DisplayOfScreen(borderPtr->screen); TkBorder *prevPtr; borderPtr->resourceRefCount--; |
︙ | |||
456 457 458 459 460 461 462 | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | - + | } else { while (prevPtr->nextPtr != borderPtr) { prevPtr = prevPtr->nextPtr; } prevPtr->nextPtr = borderPtr->nextPtr; } if (borderPtr->objRefCount == 0) { |
︙ | |||
488 489 490 491 492 493 494 | 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 | - + - + - - - - - - - - - + - + | void Tk_Free3DBorderFromObj( Tk_Window tkwin, /* The window this border lives in. Needed for * the screen and colormap values. */ Tcl_Obj *objPtr) /* The Tcl_Obj * to be freed. */ { Tk_Free3DBorder(Tk_Get3DBorderFromObj(tkwin, objPtr)); |
︙ | |||
557 558 559 560 561 562 563 | 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | - + - + | */ static void DupBorderObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { |
︙ | |||
589 590 591 592 593 594 595 | 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | - + | */ void Tk_SetBackgroundFromBorder( Tk_Window tkwin, /* Window whose background is to be set. */ Tk_3DBorder border) /* Token for border. */ { |
︙ | |||
619 620 621 622 623 624 625 | 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | - - + + | int Tk_GetReliefFromObj( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Obj *objPtr, /* The object we are trying to get the value * from. */ int *resultPtr) /* Where to place the answer. */ { |
︙ | |||
645 646 647 648 649 650 651 | 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | - + - + - + + - - - - + + + + | * *---------------------------------------------------------------------- */ int Tk_GetRelief( Tcl_Interp *interp, /* For error messages. */ |
︙ | |||
693 694 695 696 697 698 699 | 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
754 755 756 757 758 759 760 | 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | - + - + + | * negative. */ int leftRelief) /* TK_RELIEF_RAISED or TK_RELIEF_SUNKEN: * indicates how stuff to left of trajectory * looks relative to stuff on right. */ { XPoint poly[4], b1, b2, newB1, newB2; XPoint perp, c, shift1, shift2; /* Used for handling parallel lines. */ |
︙ | |||
951 952 953 954 955 956 957 | 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 | - + | int x, int y, int width, int height, /* Outside area of rectangular region. */ int borderWidth, /* Desired width for border, in pixels. Border * will be *inside* region. */ int relief) /* Indicates 3D effect: TK_RELIEF_FLAT, * TK_RELIEF_RAISED, or TK_RELIEF_SUNKEN. */ { |
︙ | |||
980 981 982 983 984 985 986 | 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 | - - + + | } } doubleBorder = 2*borderWidth; if ((width > doubleBorder) && (height > doubleBorder)) { XFillRectangle(Tk_Display(tkwin), drawable, borderPtr->bgGC, x + borderWidth, y + borderWidth, |
︙ | |||
1022 1023 1024 1025 1026 1027 1028 | 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 | - + | * left of the polygon's trajectory. May be * negative. */ int leftRelief) /* Indicates 3D effect of left side of * trajectory relative to right: * TK_RELIEF_FLAT, TK_RELIEF_RAISED, or * TK_RELIEF_SUNKEN. */ { |
︙ | |||
1083 1084 1085 1086 1087 1088 1089 | 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 | + + - + - - - + + - - + - - - + + - - - + + + + + | XPoint *p2Ptr, /* Second point on line. */ int distance, /* New line is to be this many units to the * left of original line, when looking from p1 * to p2. May be negative. */ XPoint *p3Ptr) /* Store coords of point on new line here. */ { int dx, dy, dxNeg, dyNeg; /* |
︙ | |||
1248 1249 1250 1251 1252 1253 1254 | 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 | - + | /* * If we are lucky (and the user doesn't use too many different displays, * screens, or colormaps...) then the TkBorder structure we need will be * cached in the internal representation of the Tcl_Obj. Check it out... */ |
︙ | |||
1276 1277 1278 1279 1280 1281 1282 | 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 | - - + + - - + + | * find the right TkBorder structure. */ hashPtr = Tcl_FindHashEntry(&dispPtr->borderTable, Tcl_GetString(objPtr)); if (hashPtr == NULL) { goto error; } |
︙ | |||
1310 1311 1312 1313 1314 1315 1316 | 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 | - + - + | * Results: * The return value is a standard Tcl result. If an error occurs during * conversion, an error message is left in the interpreter's result * unless "interp" is NULL. * * Side effects: * If no error occurs, a blank internal format for a border value is |
︙ | |||
1357 1358 1359 1360 1361 1362 1363 | 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 | - + + - + - + - - + - - + - + | *---------------------------------------------------------------------- */ Tcl_Obj * TkDebugBorder( Tk_Window tkwin, /* The window in which the border will be used * (not currently used). */ |
Changes to generic/tk3d.h.
︙ | |||
8 9 10 11 12 13 14 | 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 | - + + + + + + - + - - - + + + + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TK3D #define _TK3D |
︙ | |||
78 79 80 81 82 83 84 85 | 84 85 86 87 88 89 90 91 92 93 94 | + + + | * Declarations for platform specific interfaces used by this module. */ MODULE_SCOPE TkBorder *TkpGetBorder(void); MODULE_SCOPE void TkpGetShadows(TkBorder *borderPtr, Tk_Window tkwin); MODULE_SCOPE void TkpFreeBorder(TkBorder *borderPtr); # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLIMPORT #endif /* _TK3D */ |
Changes to generic/tkArgv.c.
︙ | |||
14 15 16 17 18 19 20 | 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 | - + - + | #include "tkInt.h" /* * Default table of argument descriptors. These are normally available in * every application. */ |
︙ | |||
57 58 59 60 61 62 63 | 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 | - + - + - + - - - + + + - | int Tk_ParseArgv( Tcl_Interp *interp, /* Place to store error message. */ Tk_Window tkwin, /* Window to use for setting Tk options. NULL * means ignore Tk option specs. */ int *argcPtr, /* Number of arguments in argv. Modified to * hold # args left in argv at end. */ |
︙ | |||
136 137 138 139 140 141 142 | 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 | - - + - - + - - + - - + + + - - - - + + + + - - - - - - - + + + + + + + - + - + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - + - - - + + + - - + + - - + - + - - + + - - - - - - - + + + + + + - - + + - | matchPtr = infoPtr; goto gotMatch; } if (flags & TK_ARGV_NO_ABBREV) { continue; } if (matchPtr != NULL) { |
︙ | |||
328 329 330 331 332 333 334 | 324 325 326 327 328 329 330 331 332 333 334 335 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 | - + - + - + - - + - + - + - + - + - - + + - - + + - - + + - + - | *---------------------------------------------------------------------- */ static void PrintUsage( Tcl_Interp *interp, /* Place information in this interp's result * area. */ |
Deleted generic/tkArray.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tkAtom.c.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + | #include "tkInt.h" /* * The following are a list of the predefined atom strings. They should match * those found in xatom.h */ |
︙ | |||
72 73 74 75 76 77 78 | 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 | - + - - + + - + | *-------------------------------------------------------------- */ Atom Tk_InternAtom( Tk_Window tkwin, /* Window token; map name to atom for this * window's display. */ |
︙ | |||
117 118 119 120 121 122 123 | 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 | - + - - + + - + - + - - - + + + + - + - + - + - + - + - + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
Changes to generic/tkBind.c.
1 2 3 4 5 6 7 8 9 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | - - - - + - + - - - - - - - - - - - - - - - - - + + + - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - + - - - - + - - - - - - - - - - + - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + + - + - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + - - - - - + + - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - + + + + + + + - + - + + + + + + + + + + + - + + + - - + + + + + + + + + + + + + + + - - + + + + + + - + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - + + + + + + + + + + - - - + - + - - + + + + + + + + + + - - - + + + + + - - - + + + + + + - - - - + + + + - + - - - - - - - - | /* * tkBind.c -- * * This file provides functions that associate Tcl commands with X events * or sequences of X events. * * Copyright (c) 1989-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998 by Scriptics Corporation. |
︙ | |||
476 477 478 479 480 481 482 | 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 | - - - + + + + - + - - + + + + | /* * This module also keeps a hash table mapping from event names to information * about those events. The structure, an array to use to initialize the hash * table, and the hash table are all defined below. */ typedef struct { |
︙ | |||
523 524 525 526 527 528 529 | 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 | - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - + + - - + + - - - - - - + + + - - - - - - + + - - - - - + + - + | {"Create", CreateNotify, SubstructureNotifyMask}, {"MapRequest", MapRequest, SubstructureRedirectMask}, {"ResizeRequest", ResizeRequest, ResizeRedirectMask}, {NULL, 0, 0} }; static Tcl_HashTable eventTable; |
︙ | |||
618 619 620 621 622 623 624 | 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 | - + - - - - - + + + + + | /* SelectionNotify */ 0, /* ColormapNotify */ COLORMAP, /* ClientMessage */ 0, /* MappingNotify */ 0, /* VirtualEvent */ VIRTUAL, /* Activate */ ACTIVATE, /* Deactivate */ ACTIVATE, |
︙ | |||
662 663 664 665 666 667 668 | 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 | - - + + - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + - - + + + - + - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + - - - - - + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + - + - + + - - - - - - - - - - - - - + - + - - + - + - - - + + - | {NotifyPointer, "NotifyPointer"}, {NotifyPointerRoot, "NotifyPointerRoot"}, {NotifyDetailNone, "NotifyDetailNone"}, {-1, NULL} }; static const TkStateMap circPlace[] = { |
︙ | |||
1422 1423 1424 1425 1426 1427 1428 | 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | - - + - + - + - - - - - - | void TkBindFree( TkMainInfo *mainPtr) /* The newly created application. */ { BindInfo *bindInfoPtr; |
︙ | |||
1458 1459 1460 1461 1462 1463 1464 | 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 | - - + + + - - + + - - - - - - + + + - + - - - - + + - + | * Memory is allocated for the new table. * *-------------------------------------------------------------- */ Tk_BindingTable Tk_CreateBindingTable( |
︙ | |||
1504 1505 1506 1507 1508 1509 1510 | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 | + - + + + - - - - + + - - - - + + - + + + + + - + + - - - - - - - - - - - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * Memory is freed. * *-------------------------------------------------------------- */ void Tk_DeleteBindingTable( Tk_BindingTable bindingTable) |
︙ | |||
1627 1628 1629 1630 1631 1632 1633 | 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 | + - - - - - - - - + + + + + + + + + + + + + + - + - - + - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + - - + - - - - - - - - - - + - - - - + + + + + + + - - - - + + + + + + + - - - - + - - - - - - - + - - - - - + + + + | * *-------------------------------------------------------------- */ unsigned long Tk_CreateBinding( Tcl_Interp *interp, /* Used for error reporting. */ Tk_BindingTable bindingTable, |
︙ | |||
1726 1727 1728 1729 1730 1731 1732 | 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 | + - - - + + + + + + - - - + + + - - - - + + + - - - - + + - - - - + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + - + - + + - - - + + + + + + - + + - + - - - + + + + - - - + + + + | * *-------------------------------------------------------------- */ int Tk_DeleteBinding( Tcl_Interp *interp, /* Used for error reporting. */ Tk_BindingTable bindingTable, |
︙ | |||
1837 1838 1839 1840 1841 1842 1843 | 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 | + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + - - - - - + - - - + - - - - - - + + - - - + - - - - + + + - - - - - - + + - - - - - - - - - + - - - - - - - + - - - + - - - - + - - - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * *-------------------------------------------------------------- */ void Tk_GetAllBindings( Tcl_Interp *interp, /* Interpreter returning result or error. */ Tk_BindingTable bindingTable, |
︙ | |||
2026 2027 2028 2029 2030 2031 2032 | 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 | + - + + - + - - - - + + + + + - - - + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - + - - - - - - + - - - + - - - + - - - - - - - + - - - - - - - - + - - - + - - - - + - - - - - - - - - + - - - - - - - + - - - - - - - - - - - - - - - - + - + - - - - + + + + + + - + + - + - + - - - + + + + + - - - - - - - + + + - - - - - - - - - - - + + + + - - + - - - - - - - - - - - - - - - - - - - - - + - - - + - - - - - - - - - + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - + + + + - - - + - - - - - - + + + - - - - + - - - - + + - - - - + + - - - - + + - - - - - - - - - - - - - - + + - - + - - + - - - + - - + - - - - - + - - - + - - - - - + - - + - - + - - + - - + - - + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + - + - + - - - - - + + - - - - - - + + + - - - - - + + + + + + + - - - + + + + - - - - + + - - - - - - + + + + + + - - - - - - + + + + - - - - + - - - + - - - + + + - - + + + - - - - + + + + + - - - - + + + + - - - - + - - - - + + + - - + - - - + - - + - - + - - - - - - - - + - - - + - - - + + - - - - + + + + + + + + - - + + + + - - + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + - + - - + + + + + + + + - + + + + - + + + + + + + + + + + + + + + - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - + + + - - - - - + + + - - - + + + + + + + + + + + - - - + + + + - - - - - + + + + + + + - - - + + - - + + - - - + + + + + + + + + - - - - - - - + + + + + + + - + + + + + + + + + + + + + - + - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + - - + + - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + - + - - - - + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + - | * None. * *-------------------------------------------------------------- */ void Tk_DeleteAllBindings( Tk_BindingTable bindingTable, |
︙ | |||
2957 2958 2959 2960 2961 2962 2963 | 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 | - - - - - - + + + + + + + + + + + + + + - + + + - - + - - - - - - - + + + - - - - - + + - - - - - - - - - + - + + - + - + + - - + + - + - + - + + - + - + + - + + + + - - + + + - - + + + - - - - + + + + + + + + + - + + - + - + - + - + - + - + + + - + - + - + + - + - + - + - - + + + - + + - + + - + - + - + - + - + - + + + - + - + + - + + - + - - + + + - + + - + + - + + - + - - + + + + - + + + - + - - + + - + - + - + - + - + + + - + - - + + + + - + - + - + + + - + + + - + - - + + - + - + - + + + + + - + + + - + - + - + - + - + - + - + + + - + + + + - - + + + + - + - - + + - - - + + + + - + - - + + - - + + + - + - + + - + - - + + - + - - - + + + + + - - - - + + - - + + + + + + + - + - - + + + - + - - + + + - + - + - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - | * None. * *-------------------------------------------------------------- */ static void ExpandPercents( |
︙ | |||
3296 3297 3298 3299 3300 3301 3302 | 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 | - + + - - + + + + + + + + - - + + + - | static void ChangeScreen( Tcl_Interp *interp, /* Interpreter in which to invoke command. */ char *dispName, /* Name of new display. */ int screenIndex) /* Index of new screen. */ { |
︙ | |||
3332 3333 3334 3335 3336 3337 3338 | 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 | - + - - - - - - + + + + + + + + - + + + - + - - - - - - - - - + - - - - - - - + + + + - + + - + - + + - + + + + - + + - + + - + - - - - - - + + + + + + | int Tk_EventObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
3436 3437 3438 3439 3440 3441 3442 | 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 | - + + - - - - + + - | * *vetPtr is now initialized. * *--------------------------------------------------------------------------- */ static void InitVirtualEventTable( |
︙ | |||
3469 3470 3471 3472 3473 3474 3475 | 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 | - + - - - + + - - - - + + - - - + + - + - - + + - - - - - - - + - + + + - + + - - - - - - + + + - - + + + + - - + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | static void DeleteVirtualEventTable( VirtualEventTable *vetPtr) /* The virtual event table to delete. */ { Tcl_HashEntry *hPtr; Tcl_HashSearch search; |
︙ | |||
3600 3601 3602 3603 3604 3605 3606 | 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 | - - - + + + + + - - + + - - - - - + + - + + - + - + - + - - - - + + + + + + - - + + - - - + - - - + + - + + + + + + + + + - + + - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + - - + - - - + + - - - + + - + - + + | *-------------------------------------------------------------- */ static int DeleteVirtualEvent( Tcl_Interp *interp, /* Used for error reporting. */ VirtualEventTable *vetPtr, /* Table in which to delete event. */ |
︙ | |||
3733 3734 3735 3736 3737 3738 3739 | 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 | - + + - - + + - - - - - + + - + + + - - - - + + + + + + - + | *--------------------------------------------------------------------------- */ static int GetVirtualEvent( Tcl_Interp *interp, /* Interpreter for reporting. */ VirtualEventTable *vetPtr, /* Table in which to look for event. */ |
︙ | |||
3787 3788 3789 3790 3791 3792 3793 | 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 | - + - + - - - - + + + + + + - + + | static void GetAllVirtualEvents( Tcl_Interp *interp, /* Interpreter returning result. */ VirtualEventTable *vetPtr) /* Table containing events. */ { Tcl_HashEntry *hPtr; Tcl_HashSearch search; |
︙ | |||
3828 3829 3830 3831 3832 3833 3834 | 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 | - + - + - - + - + - + - - + - - - - - - - - + - + - - - + + - - - + + + - - + - + + - - + + - - + - - + + - + - + - + + - + + - - - - + + + + - + - + - + - - - - - + + - - + - - - + + - + - - + + - - - + + - + + + - + + + - + - + - + - + - - - - + - + + - + - - + + - + - + + - + - + - + + - + - + - + - + - - + + - - + + - - + + + - + + - + - + - + + - + - + - + - + - + - + - + - + - + - + + - - - - - - - - - - - - + + + + + + - + - + - + + + - + - + - + - + - + - - - - - + - - + + - + - + - - + - + - + - + - + - + - + - + - + - + + - - - + + + - - - + + - - + - - - + - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + - + - - - - - - + + + + - - - - - + - - + + - - + - - - - + + + - - - - + - + - + - + - - - + + - - - - + - - - - - + - - + - - - - - - - - - - + + + - - - + - | * When constructing the event, * event.xany.serial is filled with the current X serial number. * event.xany.window is filled with the target window. * event.xany.display is filled with the target window's display. * Any other fields in eventPtr which are not specified by the pattern * string or the optional arguments, are set to 0. * |
︙ | |||
4581 4582 4583 4584 4585 4586 4587 | 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 | - - - + - - - - - + + + - | GetVirtualEventUid( Tcl_Interp *interp, char *virtString) { Tk_Uid uid; size_t length; |
︙ | |||
4628 4629 4630 4631 4632 4633 4634 | 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 | + - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - + + - - + + + - - - - - - - - - - - + + + + + - - - - - - + + + + + + + + + + + - - - + + + + - - - - + + + - - + - - - - + + + + + + + + + + - - - - - - + + + + - + - - - - + + - - + - - - - + + - - - - + + + + + - - + - - - - - - - - + + + + + + + - - + - - + - - + - - - - - - + + + + + + - + - - + + - - + + + - | * *---------------------------------------------------------------------- */ static PatSeq * FindSequence( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tcl_HashTable *patternTablePtr, |
︙ | |||
4800 4801 4802 4803 4804 4805 4806 | 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 | - - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - + + + + + + + + - - - + + + + + - + - + - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + - + - - - - - + + - - - - - - + + + + + + - - - + + + + + + + - - - - - - - - - - + - - - + + - - - - + + + - - - - - - + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + + + - - + - - - - - - - - + - - - - - - - - - - + - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - + + + + + + - - - - - - + + + + + - - + - - + - - - - - - - - - - + - - - - - - - + + + + + - - - - - - + + + + + + + - - + - - - - - + + + + + + - - - - - - - + + + + + + - - - + + + + - + | * On exit, eventStringPtr points to rest of event string (after the * closing '>', so that this function can be called repeatedly to parse * all the events in the entire sequence. * *--------------------------------------------------------------------------- */ |
︙ | |||
5080 5081 5082 5083 5084 5085 5086 | 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 | - + - - - + + + - - - + + + + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - - - - - - + - - + - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
5233 5234 5235 5236 5237 5238 5239 | 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 | - + - + - - + - + - - + - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * None. * *---------------------------------------------------------------------- */ KeySym TkStringToKeysym( |
︙ | |||
5312 5313 5314 5315 5316 5317 5318 | 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 | - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - | *---------------------------------------------------------------------- */ XEvent * TkpGetBindingXEvent( Tcl_Interp *interp) /* Interpreter. */ { |
Changes to generic/tkBitmap.c.
︙ | |||
84 85 86 87 88 89 90 | 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 | - + - - + | */ typedef struct { const char *source; /* Bitmap bits. */ int width, height; /* Dimensions of bitmap. */ } DataKey; |
︙ | |||
163 164 165 166 167 168 169 | 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 | - + - + - - - + + + - + - + | * for legal syntax of string value. */ { TkBitmap *bitmapPtr; if (objPtr->typePtr != &tkBitmapObjType) { InitBitmapObj(objPtr); } |
︙ | |||
313 314 315 316 317 318 319 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 416 417 418 419 420 | - + - - + + - - + - - + - - - + + - - + + - - - + - + - + | if (!dispPtr->bitmapInit) { BitmapInit(dispPtr); } nameHashPtr = Tcl_CreateHashEntry(&dispPtr->bitmapNameTable, string, &isNew); if (!isNew) { |
︙ | |||
463 464 465 466 467 468 469 | 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | - + | */ int Tk_DefineBitmap( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ const char *name, /* Name to use for bitmap. Must not already be * defined as a bitmap. */ |
︙ | |||
488 489 490 491 492 493 494 | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | - + - - + - + | if (!tsdPtr->initialized) { BitmapInit(NULL); } predefHashPtr = Tcl_CreateHashEntry(&tsdPtr->predefBitmapTable, name, &isNew); if (!isNew) { |
︙ | |||
532 533 534 535 536 537 538 | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | - + - + | TkDisplay *dispPtr = TkGetDisplay(display); if (dispPtr == NULL || !dispPtr->bitmapInit) { unknown: Tcl_Panic("Tk_NameOfBitmap received unknown bitmap argument"); } |
︙ | |||
574 575 576 577 578 579 580 | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + - + | TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->bitmapInit) { unknownBitmap: Tcl_Panic("Tk_SizeOfBitmap received unknown bitmap argument"); } |
︙ | |||
608 609 610 611 612 613 614 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | + - + - + - + | static void FreeBitmap( TkBitmap *bitmapPtr) /* Bitmap to be released. */ { TkBitmap *prevPtr; bitmapPtr->resourceRefCount--; |
︙ | |||
662 663 664 665 666 667 668 | 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | - + - + | Tcl_HashEntry *idHashPtr; TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->bitmapInit) { Tcl_Panic("Tk_FreeBitmap called before Tk_GetBitmap"); } |
︙ | |||
702 703 704 705 706 707 708 | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | - + - - - - - - - - - + - + | { FreeBitmap(GetBitmapFromObj(tkwin, objPtr)); } /* *--------------------------------------------------------------------------- * |
︙ | |||
765 766 767 768 769 770 771 | 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | - + - + | */ static void DupBitmapObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { |
︙ | |||
801 802 803 804 805 806 807 808 809 810 811 | 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 | + - + - + - + | * For each call to this function, there should eventually be a call to * Tk_FreeBitmap, so that the database can be cleaned up when bitmaps * aren't needed anymore. * *---------------------------------------------------------------------- */ /* ARGSUSED */ Pixmap Tk_GetBitmapFromData( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which bitmap will be used. */ |
︙ | |||
905 906 907 908 909 910 911 | 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 | - + - + - - + + - + | Tcl_HashEntry *hashPtr; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; if (objPtr->typePtr != &tkBitmapObjType) { InitBitmapObj(objPtr); } |
︙ | |||
974 975 976 977 978 979 980 | 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | - + | /* * Free the old internalRep before setting the new one. */ Tcl_GetString(objPtr); typePtr = objPtr->typePtr; if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { |
︙ | |||
1019 1020 1021 1022 1023 1024 1025 | 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 | - + - + - + - + - + - + - + - + - + - + | */ if (!tsdPtr->initialized) { tsdPtr->initialized = 1; dummy = Tcl_CreateInterp(); Tcl_InitHashTable(&tsdPtr->predefBitmapTable, TCL_STRING_KEYS); |
︙ | |||
1098 1099 1100 1101 1102 1103 1104 | 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 | - + | unsigned int *height_return, Pixmap *bitmap_return, int *x_hot_return, int *y_hot_return) { char *data; |
︙ | |||
1134 1135 1136 1137 1138 1139 1140 | 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 | - + - + - + - + | *---------------------------------------------------------------------- */ Tcl_Obj * TkDebugBitmap( Tk_Window tkwin, /* The window in which the bitmap will be used * (not currently used). */ |
︙ |
Deleted generic/tkBusy.c.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted generic/tkBusy.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tkButton.c.
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkButton.h" #include "default.h" |
︙ | |||
66 67 68 69 70 71 72 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - - + + - - + + - + - - + + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - - + + - + - - + + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - + - + - + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - + - - + + - + - + - + - - + + - - + + - + - + - + - - + + - + - + - + - + - + - - - + + + - - + + - - + + - + - - + + - + - + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - - + + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - - + + - - + + - + - - + + - + - + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - - + + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - - - + + + - + - + | /* * Information used for parsing configuration options. There is a * separate table for each of the four widget classes. */ static const Tk_OptionSpec labelOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", |
︙ | |||
624 625 626 627 628 629 630 | 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | - + - - + | * See the user documentation. * *-------------------------------------------------------------- */ static int ButtonCreate( |
︙ | |||
669 670 671 672 673 674 675 | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | - + - + | */ optionTable = Tk_CreateOptionTable(interp, optionSpecs[type]); Tk_SetClass(tkwin, classNames[type]); butPtr = TkpCreateButton(tkwin); |
︙ | |||
744 745 746 747 748 749 750 | 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 | - + - + - + + | butPtr->cursor = NULL; butPtr->takeFocusPtr = NULL; butPtr->commandPtr = NULL; butPtr->flags = 0; Tk_CreateEventHandler(butPtr->tkwin, ExposureMask|StructureNotifyMask|FocusChangeMask, |
︙ | |||
785 786 787 788 789 790 791 | 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | - + - + - - + + - + - + - - + + + - + - - + + + | static int ButtonWidgetObjCmd( ClientData clientData, /* Information about button widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { |
︙ | |||
866 867 868 869 870 871 872 | 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 | - + - - + + - - - - - - | Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->activeBorder); } else { butPtr->state = STATE_NORMAL; Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->normalBorder); } |
︙ | |||
922 923 924 925 926 927 928 | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | - + - + | (butPtr->flags & SELECTED) ? butPtr->offValuePtr : butPtr->onValuePtr, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) { goto error; } break; } |
︙ | |||
955 956 957 958 959 960 961 | 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 | - + - - - + + + | DestroyButton( TkButton *butPtr) /* Info about button widget. */ { butPtr->flags |= BUTTON_DELETED; TkpDestroyButton(butPtr); if (butPtr->flags & REDRAW_PENDING) { |
︙ | |||
1000 1001 1002 1003 1004 1005 1006 | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 | - - - + + + - + | if (butPtr->copyGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->copyGC); } if (butPtr->textLayout != NULL) { Tk_FreeTextLayout(butPtr->textLayout); } if (butPtr->selVarNamePtr != NULL) { |
︙ | |||
1033 1034 1035 1036 1037 1038 1039 | 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 | - + - - - + + + - - - + + + - + | * *---------------------------------------------------------------------- */ static int ConfigureButton( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1123 1124 1125 1126 1127 1128 1129 | 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 | - + | } if (butPtr->type >= TYPE_CHECK_BUTTON) { Tcl_Obj *valuePtr, *namePtr; if (butPtr->selVarNamePtr == NULL) { butPtr->selVarNamePtr = Tcl_NewStringObj( |
︙ | |||
1172 1173 1174 1175 1176 1177 1178 | 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 | - + - + - + - + | /* * If a radiobutton has the empty string as value it should be * selected. */ if ((butPtr->type == TYPE_RADIO_BUTTON) && |
︙ | |||
1300 1301 1302 1303 1304 1305 1306 | 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 | - - - + + + - - - + + + - + | } /* * Reestablish the variable traces, if they're needed. */ if (butPtr->textVarNamePtr != NULL) { |
︙ | |||
1345 1346 1347 1348 1349 1350 1351 | 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 | - + + + | void TkButtonWorldChanged( ClientData instanceData) /* Information about widget. */ { XGCValues gcValues; GC newGC; unsigned long mask; |
︙ | |||
1428 1429 1430 1431 1432 1433 1434 | 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 | - + | TkpComputeButtonGeometry(butPtr); /* * Lastly, arrange for the button to be redisplayed. */ if (Tk_IsMapped(butPtr->tkwin) && !(butPtr->flags & REDRAW_PENDING)) { |
︙ | |||
1456 1457 1458 1459 1460 1461 1462 | 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 | - + | */ static void ButtonEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
1487 1488 1489 1490 1491 1492 1493 | 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 | - + | } } } return; redraw: if ((butPtr->tkwin != NULL) && !(butPtr->flags & REDRAW_PENDING)) { |
︙ | |||
1514 1515 1516 1517 1518 1519 1520 | 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 | - + | *---------------------------------------------------------------------- */ static void ButtonCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 | 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 | + - - + + - - + + - + - - - + - - - - + - - - - - - - - - - - - - - - - + + - - + - + - + | * * Side effects: * The button may become selected or deselected. * *-------------------------------------------------------------- */ /* ARGSUSED */ static char * ButtonVarProc( ClientData clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* Name of variable. */ const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { |
︙ | |||
1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 | 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 | + - + + - - + + - - + - - - - - + - - - - - - + - - - - - - - - - - - - - - - + - - - - + - - + - + | * * Side effects: * The text displayed in the button will change to match the variable. * *-------------------------------------------------------------- */ /* ARGSUSED */ static char * ButtonTextVarProc( ClientData clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* Not used. */ const char *name2, /* Not used. */ int flags) /* Information about what happened. */ { |
︙ | |||
1816 1817 1818 1819 1820 1821 1822 | 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 | - + - - - - - - - + | ClientData clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (might be * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { |
︙ | |||
1860 1861 1862 1863 1864 1865 1866 | 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 | - + - - - - - - - - - - - - - + | ClientData clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (might be * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { |
︙ | |||
1913 1914 1915 1916 1917 1918 1919 | 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 | - + - - - - - - - - - - - - - + | ClientData clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (might be * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { |
Changes to generic/tkButton.h.
︙ | |||
288 289 290 291 292 293 294 | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | - + | #define TRISTATED (1 << 4) /* * Declaration of button class functions structure * and button/label defaults, for use in optionSpecs. */ |
︙ |
Changes to generic/tkCanvArc.c.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - - + + - - - + | /* * tkCanvArc.c -- * * This file implements arc items for canvas widgets. * * Copyright (c) 1992-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. */ |
︙ | |||
61 62 63 64 65 66 67 | 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 | - - - - - - - - - - + + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + - + - + - + - + - + - + - + - + - + - + - - + - + - - | Style style; /* How to draw arc: arc, chord, or * pieslice. */ GC fillGC; /* Graphics context for filling item. */ double center1[2]; /* Coordinates of center of arc outline at * start (see ComputeArcOutline). */ double center2[2]; /* Coordinates of center of arc outline at * start+extent (see ComputeArcOutline). */ |
︙ | |||
242 243 244 245 246 247 248 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - - + + + + | TranslateArc, /* translateProc */ NULL, /* indexProc */ NULL, /* icursorProc */ NULL, /* selectionProc */ NULL, /* insertProc */ NULL, /* dTextProc */ NULL, /* nextPtr */ |
︙ | |||
272 273 274 275 276 277 278 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | - + - + | static int CreateArc( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
302 303 304 305 306 307 308 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | - - + | arcPtr->activeFillColor = NULL; arcPtr->disabledFillColor = NULL; arcPtr->fillStipple = None; arcPtr->activeFillStipple = None; arcPtr->disabledFillStipple = None; arcPtr->style = PIESLICE_STYLE; arcPtr->fillGC = NULL; |
︙ | |||
351 352 353 354 355 356 357 | 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 | - + - + + - - - - - - - + + + + + + + + + + + - - - + + + - - - - - - - - - - - - + - - - + + + | static int ArcCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
432 433 434 435 436 437 438 | 420 421 422 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 | - + - + | static int ConfigureArc( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Arc item to reconfigure. */ int objc, /* Number of elements in objv. */ |
︙ | |||
470 471 472 473 474 475 476 | 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 | - - - - - - - - - - - - - - - - + + + + + + + + - + - + - + | arcPtr->activeFillColor != NULL || arcPtr->activeFillStipple != None) { itemPtr->redraw_flags |= TK_ITEM_STATE_DEPENDANT; } else { itemPtr->redraw_flags &= ~TK_ITEM_STATE_DEPENDANT; } |
︙ | |||
590 591 592 593 594 595 596 | 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 603 604 605 606 607 608 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + | ComputeArcBbox(canvas, arcPtr); return TCL_OK; } /* *-------------------------------------------------------------- * |
︙ | |||
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | + - + - + - + - + - + | * * Side effects: * The fields x1, y1, x2, and y2 are updated in the header for itemPtr. * *-------------------------------------------------------------- */ /* ARGSUSED */ static void ComputeArcBbox( Tk_Canvas canvas, /* Canvas that contains item. */ ArcItem *arcPtr) /* Item whose bbox is to be recomputed. */ { double tmp, center[2], point[2]; double width; Tk_State state = arcPtr->header.state; if (state == TK_STATE_NULL) { |
︙ | |||
895 896 897 898 899 900 901 | 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 | - - + + - - - + - + | static void DisplayArc( Tk_Canvas canvas, /* Canvas that contains item. */ Tk_Item *itemPtr, /* Item to be displayed. */ Display *display, /* Display on which to draw item. */ Drawable drawable, /* Pixmap or window in which to draw item. */ |
︙ | |||
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 | 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 | + - + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static double ArcToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *pointPtr) /* Pointer to x and y coordinates. */ { ArcItem *arcPtr = (ArcItem *) itemPtr; double vertex[2], pointAngle, diff, dist, newDist; double poly[8], polyDist, width, t1, t2; int filled, angleInRange; Tk_State state = itemPtr->state; if (state == TK_STATE_NULL) { |
︙ | |||
1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 | 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 | + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int ArcToArea( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against arc. */ double *rectPtr) /* Pointer to array of four coordinates (x1, * y1, x2, y2) describing rectangular area. */ { |
︙ | |||
1258 1259 1260 1261 1262 1263 1264 | 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 | - + - + | * that arc is inside rectangle. 0 means every * test so far shows arc to be outside of * rectangle. */ int newInside; Tk_State state = itemPtr->state; if(state == TK_STATE_NULL) { |
︙ | |||
1506 1507 1508 1509 1510 1511 1512 | 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | arcPtr->bbox[3] = originY + scaleY*(arcPtr->bbox[3] - originY); ComputeArcBbox(canvas, arcPtr); } /* *-------------------------------------------------------------- * |
︙ | |||
1627 1628 1629 1630 1631 1632 1633 | 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 | - + + - + - + | /* * Make sure that the outlinePtr array is large enough to hold either a * chord or pie-slice outline. */ if (arcPtr->numOutlinePoints == 0) { |
︙ | |||
1691 1692 1693 1694 1695 1696 1697 | 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 | - + | * shape of the oval. The key in the code below is to realize that the * slope of the line from arcPtr->center1 to corner1 is (boxWidth*sin1) * divided by (boxHeight*cos1), and similarly for arcPtr->center2 and * corner2. These formulas can be computed from the formula for the oval. */ width = arcPtr->outline.width; |
︙ | |||
1994 1995 1996 1997 1998 1999 2000 | 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 | - + + - - - + - + | */ static int ArcToPostscript( Tcl_Interp *interp, /* Leave Postscript or error message here. */ Tk_Canvas canvas, /* Information about overall canvas. */ Tk_Item *itemPtr, /* Item for which Postscript is wanted. */ |
︙ | |||
2052 2053 2054 2055 2056 2057 2058 | 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 | - - - - - - - - - - + - - - - - - - - - - + + + + + + + + + + + - - + + - - - - + + - - + + - + - + - - - + - + - - + - - - + + + - - + + - + - - - - - + + + + - - + + + + - - - - + - + - - - - - + + + + - - + + + + - - - - + - - - - - - - | fillColor = arcPtr->disabledFillColor; } if (arcPtr->disabledFillStipple!=None) { fillStipple = arcPtr->disabledFillStipple; } } |
︙ | |||
2189 2190 2191 2192 2193 2194 2195 | 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 | - + - - + + - + + - + | * value argument. * *-------------------------------------------------------------- */ static int StyleParseProc( |
︙ | |||
2221 2222 2223 2224 2225 2226 2227 | 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 | - - + + - - | return TCL_OK; } if ((c == 'p') && (strncmp(value, "pieslice", length) == 0)) { *stylePtr = PIESLICE_STYLE; return TCL_OK; } |
︙ | |||
2250 2251 2252 2253 2254 2255 2256 | 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 | - + - - + + - - + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ |
Changes to generic/tkCanvBmap.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + - | /* * tkCanvBmap.c -- * * This file implements bitmap items for canvas widgets. * * Copyright (c) 1992-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. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" |
︙ | |||
37 38 39 40 41 42 43 | 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 | - - + + + - - + + + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - + - + - - | * on screen. */ } BitmapItem; /* * Information used for parsing configuration specs: */ |
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - - | TranslateBitmap, /* translateProc */ NULL, /* indexProc */ NULL, /* icursorProc */ NULL, /* selectionProc */ NULL, /* insertProc */ NULL, /* dTextProc */ NULL, /* nextPtr */ |
︙ | |||
166 167 168 169 170 171 172 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + - + | static int TkcCreateBitmap( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
199 200 201 202 203 204 205 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + | * Process the arguments to fill in the item record. Only 1 (list) or 2 (x * y) coords are allowed. */ if (objc == 1) { i = 1; } else { |
︙ | |||
242 243 244 245 246 247 248 | 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 | - + + - - + + + + - - - + + + - + - - - + + + | static int BitmapCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
305 306 307 308 309 310 311 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 | - + - + - + - + | static int ConfigureBitmap( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Bitmap item to reconfigure. */ int objc, /* Number of elements in objv. */ |
︙ | |||
418 419 420 421 422 423 424 | 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | - | static void DeleteBitmap( Tk_Canvas canvas, /* Info about overall canvas widget. */ Tk_Item *itemPtr, /* Item that is being deleted. */ Display *display) /* Display containing window for canvas. */ { BitmapItem *bmapPtr = (BitmapItem *) itemPtr; |
︙ | |||
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | 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 | + - + - + | * * Side effects: * The fields x1, y1, x2, and y2 are updated in the header for itemPtr. * *-------------------------------------------------------------- */ /* ARGSUSED */ static void ComputeBitmapBbox( Tk_Canvas canvas, /* Canvas that contains item. */ BitmapItem *bmapPtr) /* Item whose bbox is to be recomputed. */ { int width, height; int x, y; Pixmap bitmap; Tk_State state = bmapPtr->header.state; if (state == TK_STATE_NULL) { |
︙ | |||
591 592 593 594 595 596 597 | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | - + - + | /* * If the area being displayed doesn't cover the whole bitmap, then only * redisplay the part of the bitmap that needs redisplay. */ if (state == TK_STATE_NULL) { |
︙ | |||
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | + - | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static double BitmapToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *coordPtr) /* Pointer to x and y coordinates. */ { BitmapItem *bmapPtr = (BitmapItem *) itemPtr; double x1, x2, y1, y2, xDiff, yDiff; |
︙ | |||
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | + - | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int BitmapToArea( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against rectangle. */ double *rectPtr) /* Pointer to array of four coordinates * (x1,y1,x2,y2) describing rectangular * area. */ { BitmapItem *bmapPtr = (BitmapItem *) itemPtr; |
︙ | |||
784 785 786 787 788 789 790 | 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | double scaleX, /* Amount to scale in X direction. */ double scaleY) /* Amount to scale in Y direction. */ { BitmapItem *bmapPtr = (BitmapItem *) itemPtr; bmapPtr->x = originX + scaleX*(bmapPtr->x - originX); bmapPtr->y = originY + scaleY*(bmapPtr->y - originY); |
︙ | |||
883 884 885 886 887 888 889 890 891 892 893 | 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 | + - - - - + - + | * information; 0 means final Postscript is * being created. */ { BitmapItem *bmapPtr = (BitmapItem *) itemPtr; double x, y; int width, height, rowsAtOnce, rowsThisTime; int curRow; char buffer[100 + TCL_DOUBLE_SPACE * 2 + TCL_INTEGER_SPACE * 4]; XColor *fgColor; XColor *bgColor; Pixmap bitmap; Tk_State state = itemPtr->state; |
︙ | |||
944 945 946 947 948 949 950 | 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | - - - - - - - - - + + - - + - - - + + - - - + + + - - + - - + + - - - + + + - - + - - - - + + - - - + - - - - + + + - - + - - + - - + - - - - + - - - - - + - - - - + | case TK_ANCHOR_SE: x -= width; break; case TK_ANCHOR_S: x -= width/2.0; break; case TK_ANCHOR_SW: break; case TK_ANCHOR_W: y -= height/2.0; break; case TK_ANCHOR_CENTER: x -= width/2.0; y -= height/2.0; break; } |
Changes to generic/tkCanvImg.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + | /* * tkCanvImg.c -- * * This file implements image items for canvas widgets. * * 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. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" /* * The structure below defines the record for each image item. */ |
︙ | |||
39 40 41 42 43 44 45 | 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 | - - + + + - - + + + - + - + - + - + - + - + - + - + - + - + - - | * image at present. */ } ImageItem; /* * Information used for parsing configuration specs: */ |
︙ | |||
124 125 126 127 128 129 130 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | - - | TranslateImage, /* translateProc */ NULL, /* indexProc */ NULL, /* icursorProc */ NULL, /* selectionProc */ NULL, /* insertProc */ NULL, /* dTextProc */ NULL, /* nextPtr */ |
︙ | |||
154 155 156 157 158 159 160 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + - + | static int CreateImage( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
184 185 186 187 188 189 190 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + | * Process the arguments to fill in the item record. Only 1 (list) or 2 (x * y) coords are allowed. */ if (objc == 1) { i = 1; } else { |
︙ | |||
226 227 228 229 230 231 232 | 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 | - + - + - - - + + + + + + - - - + + + - - + - + - - - + + + | static int ImageCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
289 290 291 292 293 294 295 | 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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | - + - + - + - + - + | static int ConfigureImage( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Image item to reconfigure. */ int objc, /* Number of elements in objv. */ |
︙ | |||
381 382 383 384 385 386 387 | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | - - | static void DeleteImage( Tk_Canvas canvas, /* Info about overall canvas widget. */ Tk_Item *itemPtr, /* Item that is being deleted. */ Display *display) /* Display containing window for canvas. */ { ImageItem *imgPtr = (ImageItem *) itemPtr; |
︙ | |||
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | 421 422 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 | + - + - + | * * Side effects: * The fields x1, y1, x2, and y2 are updated in the header for itemPtr. * *-------------------------------------------------------------- */ /* ARGSUSED */ static void ComputeImageBbox( Tk_Canvas canvas, /* Canvas that contains item. */ ImageItem *imgPtr) /* Item whose bbox is to be recomputed. */ { int width, height; int x, y; Tk_Image image; Tk_State state = imgPtr->header.state; if(state == TK_STATE_NULL) { |
︙ | |||
534 535 536 537 538 539 540 | 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | - - + - + | /* Describes region of canvas that must be * redisplayed (not used). */ { ImageItem *imgPtr = (ImageItem *) itemPtr; short drawableX, drawableY; Tk_Image image; Tk_State state = itemPtr->state; |
︙ | |||
593 594 595 596 597 598 599 | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | - | ImageToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *coordPtr) /* Pointer to x and y coordinates. */ { ImageItem *imgPtr = (ImageItem *) itemPtr; double x1, x2, y1, y2, xDiff, yDiff; |
︙ | |||
651 652 653 654 655 656 657 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | - | Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against rectangle. */ double *rectPtr) /* Pointer to array of four coordinates * (x1,y1,x2,y2) describing rectangular * area. */ { ImageItem *imgPtr = (ImageItem *) itemPtr; |
︙ | |||
696 697 698 699 700 701 702 | 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | - + + + - - + + - + | Tcl_Interp *interp, /* Leave Postscript or error message here. */ Tk_Canvas canvas, /* Information about overall canvas. */ Tk_Item *itemPtr, /* Item for which Postscript is wanted. */ int prepass) /* 1 means this is a prepass to collect font * information; 0 means final Postscript is * being created.*/ { |
︙ | |||
747 748 749 750 751 752 753 | 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | - - + - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | case TK_ANCHOR_S: x -= width/2.0; break; case TK_ANCHOR_SW: break; case TK_ANCHOR_W: y -= height/2.0; break; case TK_ANCHOR_CENTER: x -= width/2.0; y -= height/2.0; break; } if (!prepass) { |
︙ | |||
888 889 890 891 892 893 894 | 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 | - + | ClientData clientData, /* Pointer to canvas item for image. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (may be <= * 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { |
︙ |
Changes to generic/tkCanvLine.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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 | + - - + | /* * tkCanvLine.c -- * * This file implements line items for canvas widgets. * * Copyright (c) 1991-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" |
︙ | |||
55 56 57 58 59 60 61 | 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 | - + - + - + - + - + - + - + - + - - - + + + - - - + + + - - - + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - - + + + + - - + + + - + - + - + - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - | * point in line. First point of arrowhead is * tip. Malloc'ed. NULL means no arrowhead at * first point. */ double *lastArrowPtr; /* Points to polygon for arrowhead at last * point in line (PTS_IN_ARROW points, first * of which is tip). Malloc'ed. NULL means no * arrowhead at last point. */ |
︙ | |||
276 277 278 279 280 281 282 | 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 | - + - + - + | static int CreateLine( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
313 314 315 316 317 318 319 | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - + | /* * Count the number of points and then parse them into a point array. * Leading arguments are assumed to be points if they start with a digit * or a minus sign followed by a digit. */ for (i = 1; i < objc; i++) { |
︙ | |||
355 356 357 358 359 360 361 | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | - + | static int LineCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
391 392 393 394 395 396 397 | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 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 | + - - - - + + + + + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + + | if (objc == 1) { if (Tcl_ListObjGetElements(interp, objv[0], &objc, (Tcl_Obj ***) &objv) != TCL_OK) { return TCL_ERROR; } } if (objc & 1) { char buf[64 + TCL_INTEGER_SPACE]; |
︙ | |||
464 465 466 467 468 469 470 | 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 | - - + + - + - - + + - + + - - + + - | */ static int ConfigureLine( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Line item to reconfigure. */ |
︙ | |||
542 543 544 545 546 547 548 | 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 | - + - + - + | if (linePtr->splineSteps < 1) { linePtr->splineSteps = 1; } else if (linePtr->splineSteps > 100) { linePtr->splineSteps = 100; } |
︙ | |||
601 602 603 604 605 606 607 | 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | - + - + - + - + - + | * Resources associated with itemPtr are released. * *-------------------------------------------------------------- */ static void DeleteLine( |
︙ | |||
650 651 652 653 654 655 656 | 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | - - + + - + - - + + - - + + - + - - + + | { double *coordPtr; int i, intWidth; double width; Tk_State state = linePtr->header.state; Tk_TSOffset *tsoffset; |
︙ | |||
705 706 707 708 709 710 711 | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | - - + - - + - - + - | if (linePtr->arrow != ARROWS_FIRST) { TkIncludePoint((Tk_Item *) linePtr, linePtr->lastArrowPtr); } } tsoffset = &linePtr->outline.tsoffset; if (tsoffset->flags & TK_OFFSET_INDEX) { |
︙ | |||
747 748 749 750 751 752 753 | 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 | - + | intWidth = (int) (width + 0.5); linePtr->header.x1 -= intWidth; linePtr->header.x2 += intWidth; linePtr->header.y1 -= intWidth; linePtr->header.y2 += intWidth; |
︙ | |||
829 830 831 832 833 834 835 | 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | + - - + + - - - + - + - + - + | static void DisplayLine( Tk_Canvas canvas, /* Canvas that contains item. */ Tk_Item *itemPtr, /* Item to be displayed. */ Display *display, /* Display on which to draw item. */ Drawable drawable, /* Pixmap or window in which to draw item. */ int x, int y, int width, int height) |
︙ | |||
875 876 877 878 879 880 881 | 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | - + - + - - + + - - + - + - - - + + - + - + - + | } else { numPoints = linePtr->numPoints; } if (numPoints <= MAX_STATIC_POINTS) { pointPtr = staticPoints; } else { |
︙ | |||
951 952 953 954 955 956 957 | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 | - + - + - + - + - - + + + - - + + - + - + - + - - + - - - + - - - - + + - - - + + - + - + - + - + - + - + - + - + - - + + - - + + - + - - + - | *-------------------------------------------------------------- */ static void LineInsert( Tk_Canvas canvas, /* Canvas containing text item. */ Tk_Item *itemPtr, /* Line item to be modified. */ |
︙ | |||
1145 1146 1147 1148 1149 1150 1151 | 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 | - - + + - + - + - + - + | *-------------------------------------------------------------- */ static void LineDeleteCoords( Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Item in which to delete characters. */ |
︙ | |||
1195 1196 1197 1198 1199 1200 1201 | 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 | - + | first1 -= 2; } if (last1 < length-2) { last1 += 2; } } |
︙ | |||
1241 1242 1243 1244 1245 1246 1247 | 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 | - + - + | count = last + 2 - first; for (i=last+2; i<length; i++) { linePtr->coordPtr[i-count] = linePtr->coordPtr[i]; } linePtr->numPoints -= count/2; if (linePtr->firstArrowPtr != NULL) { |
︙ | |||
1276 1277 1278 1279 1280 1281 1282 | 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | - + - + | for (i = 0, coordPtr = linePtr->lastArrowPtr; i < PTS_IN_ARROW; i++, coordPtr += 2) { TkIncludePoint(itemPtr, coordPtr); } } width = linePtr->outline.width; |
︙ | |||
1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 | 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 | + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static double LineToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *pointPtr) /* Pointer to x and y coordinates. */ { Tk_State state = itemPtr->state; |
︙ | |||
1343 1344 1345 1346 1347 1348 1349 | 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 | - - + + - - + + - - + + - + + - + - + - - | bestDist = 1.0e36; /* * Handle smoothed lines by generating an expanded set of points against * which to do the check. */ |
︙ | |||
1523 1524 1525 1526 1527 1528 1529 | 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 | - + | bestDist = dist; } } } done: if ((linePoints != staticSpace) && (linePoints != linePtr->coordPtr)) { |
︙ | |||
1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 | 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 | + - - + + - - + + - - + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int LineToArea( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against line. */ double *rectPtr) { LineItem *linePtr = (LineItem *) itemPtr; double staticSpace[2*MAX_STATIC_POINTS]; double *linePoints; int numPoints, result; double radius, width; Tk_State state = itemPtr->state; |
︙ | |||
1598 1599 1600 1601 1602 1603 1604 | 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 | - + + - + - - + + + | if ((linePtr->smooth) && (linePtr->numPoints > 2)) { numPoints = linePtr->smooth->coordProc(canvas, NULL, linePtr->numPoints, linePtr->splineSteps, NULL, NULL); if (numPoints <= MAX_STATIC_POINTS) { linePoints = staticSpace; } else { |
︙ | |||
1644 1645 1646 1647 1648 1649 1650 | 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 | - + | goto done; } } } done: if ((linePoints != staticSpace) && (linePoints != linePtr->coordPtr)) { |
︙ | |||
1689 1690 1691 1692 1693 1694 1695 | 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 | - + + + - + | * Delete any arrowheads before scaling all the points (so that the * end-points of the line get restored). */ if (linePtr->firstArrowPtr != NULL) { linePtr->coordPtr[0] = linePtr->firstArrowPtr[0]; linePtr->coordPtr[1] = linePtr->firstArrowPtr[1]; |
︙ | |||
1737 1738 1739 1740 1741 1742 1743 | 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 | - + - + - + - - - + - - - + + + + + - - - - - + + + + + + + - - - - + - - + + - - + - + + + - - + + + - - - - + + + + - - - - | GetLineIndex( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item for which the index is being * specified. */ Tcl_Obj *obj, /* Specification of a particular coord in * itemPtr's line. */ |
︙ | |||
1853 1854 1855 1856 1857 1858 1859 | 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - + - + - - + + + + + + + + + + - - - - - + + + + - - - - - - - - - - - + - + - - + + - + - + + + | } ComputeLineBbox(canvas, linePtr); } /* *-------------------------------------------------------------- * |
︙ | |||
2026 2027 2028 2029 2030 2031 2032 | 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 | - + - - + + - + + - + - + | * value argument. * *-------------------------------------------------------------- */ static int ArrowParseProc( |
︙ | |||
2062 2063 2064 2065 2066 2067 2068 | 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 | - - + + - - | return TCL_OK; } if ((c == 'b') && (strncmp(value, "both", length) == 0)) { *arrowPtr = ARROWS_BOTH; return TCL_OK; } |
︙ | |||
2091 2092 2093 2094 2095 2096 2097 | 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 | - + - - + + - - + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 | 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 | + - + - - + + - - + + - - + + | * firstArrowPtr and lastArrowPtr polygons are allocated and initialized, * if need be, and the end points of the line are adjusted so that a * thick line doesn't stick out past the arrowheads. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int ConfigureArrows( Tk_Canvas canvas, /* Canvas in which arrows will be displayed * (interp and tkwin fields are needed). */ LineItem *linePtr) /* Item to configure for arrows. */ { double *poly, *coordPtr; double dx, dy, length, sinTheta, cosTheta, temp; double fracHeight; /* Line width as fraction of arrowhead * width. */ double backup; /* Distance to backup end points so the line * ends in the middle of the arrowhead. */ double vertX, vertY; /* Position of arrowhead vertex. */ double shapeA, shapeB, shapeC; /* Adjusted coordinates (see explanation * below). */ double width; Tk_State state = linePtr->header.state; |
︙ | |||
2195 2196 2197 2198 2199 2200 2201 | 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 | - + + | */ fracHeight = (width/2.0)/shapeC; backup = fracHeight*shapeB + shapeA*(1.0 - fracHeight)/2.0; if (linePtr->arrow != ARROWS_LAST) { poly = linePtr->firstArrowPtr; if (poly == NULL) { |
︙ | |||
2239 2240 2241 2242 2243 2244 2245 | 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 | - + + | * Similar arrowhead calculation for the last point of the line. */ if (linePtr->arrow != ARROWS_FIRST) { coordPtr = linePtr->coordPtr + 2*(linePtr->numPoints-2); poly = linePtr->lastArrowPtr; if (poly == NULL) { |
︙ | |||
2296 2297 2298 2299 2300 2301 2302 | 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 | - + + - + + - - - - + + - - + + - + - + - - + + - + - + - + - - - - - - - - - - - - + - - + - - + + - - - + - - + + - - - + + - + + - + - + - - + - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + - + - + - - - + + - + - + - - - + - - + - + + - + - - - + + + + + - + - - - - + + + + + - - - - - - - - - + - + - - + - - - + + - + - + - - - - - + + + + - - - - + | */ static int LineToPostscript( Tcl_Interp *interp, /* Leave Postscript or error message here. */ Tk_Canvas canvas, /* Information about overall canvas. */ Tk_Item *itemPtr, /* Item for which Postscript is wanted. */ |
Changes to generic/tkCanvPoly.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + - | /* * tkCanvPoly.c -- * * This file implements polygon items for canvas widgets. * * Copyright (c) 1991-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-2000 Ajuba Solutions. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" |
︙ | |||
40 41 42 43 44 45 46 | 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 | - + - - + + + - - + + + - - + + + - - + + + - - - + + + + - - + + + - + - + - + - + - - + + - + - + - + - - + + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + - + - + - - | * disabled. */ Pixmap fillStipple; /* Stipple bitmap for filling polygon. */ Pixmap activeFillStipple; /* Stipple bitmap for filling polygon if state * is active. */ Pixmap disabledFillStipple; /* Stipple bitmap for filling polygon if state * is disabled. */ GC fillGC; /* Graphics context for filling polygon. */ |
︙ | |||
245 246 247 248 249 250 251 | 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 | - + - + - + | static int CreatePolygon( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
285 286 287 288 289 290 291 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | - + - | /* * Count the number of points and then parse them into a point array. * Leading arguments are assumed to be points if they start with a digit * or a minus sign followed by a digit. */ for (i = 0; i < objc; i++) { |
︙ | |||
329 330 331 332 333 334 335 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | - + | static int PolygonCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
356 357 358 359 360 361 362 | 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 | + - - - - + + + + - - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - - - - - - - + + + + + + + - - + + | if (objc == 1) { if (Tcl_ListObjGetElements(interp, objv[0], &objc, (Tcl_Obj ***) &objv) != TCL_OK) { return TCL_ERROR; } } if (objc & 1) { char buf[64 + TCL_INTEGER_SPACE]; |
︙ | |||
427 428 429 430 431 432 433 | 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 | - + - + | static int ConfigurePolygon( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Polygon item to reconfigure. */ int objc, /* Number of elements in objv. */ |
︙ | |||
463 464 465 466 467 468 469 | 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 | - - + + - + - + - - + + - + - - + + - + | polyPtr->activeFillColor != NULL || polyPtr->activeFillStipple != None) { itemPtr->redraw_flags |= TK_ITEM_STATE_DEPENDANT; } else { itemPtr->redraw_flags &= ~TK_ITEM_STATE_DEPENDANT; } |
︙ | |||
562 563 564 565 566 567 568 | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | - + - + - + | * Resources associated with itemPtr are released. * *-------------------------------------------------------------- */ static void DeletePolygon( |
︙ | |||
623 624 625 626 627 628 629 | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | - - + + - + - - + - - + + - - + + | { double *coordPtr; int i; double width; Tk_State state = polyPtr->header.state; Tk_TSOffset *tsoffset; |
︙ | |||
664 665 666 667 668 669 670 | 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 | - - + | i++, coordPtr += 2) { TkIncludePoint((Tk_Item *) polyPtr, coordPtr); } tsoffset = &polyPtr->tsoffset; if (tsoffset->flags & TK_OFFSET_INDEX) { int index = tsoffset->flags & ~TK_OFFSET_INDEX; |
︙ | |||
704 705 706 707 708 709 710 | 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 | - + - - + - - + - + - + - + + - + + - - + + | if (tsoffset->flags & TK_OFFSET_INDEX) { int index = tsoffset->flags & ~TK_OFFSET_INDEX; if (tsoffset->flags == INT_MAX) { index = (polyPtr->numPoints - 1) * 2; } index %= (polyPtr->numPoints - 1) * 2; |
︙ | |||
823 824 825 826 827 828 829 | 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | - + - + - - + + - + | * unless the polygon has an enormous number of points; in this case, * dynamically allocate an array. */ if (numPoints <= MAX_STATIC_POINTS) { pointPtr = staticPoints; } else { |
︙ | |||
872 873 874 875 876 877 878 | 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | + - - + + - - - + - - + + - - + + - + - + - - + - - + + - + - + - + + - + - + - + - + - + - + - + - - + + + - + - + - + | static void DisplayPolygon( Tk_Canvas canvas, /* Canvas that contains item. */ Tk_Item *itemPtr, /* Item to be displayed. */ Display *display, /* Display on which to draw item. */ Drawable drawable, /* Pixmap or window in which to draw item. */ int x, int y, int width, int height) |
︙ | |||
1080 1081 1082 1083 1084 1085 1086 | 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 | - + - - + - - - + + - + - + - + - + - + - + - - + - | polyPtr->autoClosed = 1; polyPtr->numPoints++; } } newCoordPtr[length] = newCoordPtr[0]; newCoordPtr[length+1] = newCoordPtr[1]; |
︙ | |||
1166 1167 1168 1169 1170 1171 1172 | 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 | - - + + - + - + - + - + - + - + - - + + - + | *-------------------------------------------------------------- */ static void PolygonDeleteCoords( Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Item in which to delete characters. */ |
︙ | |||
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 | 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 | + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static double PolygonToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *pointPtr) /* Pointer to x and y coordinates. */ { PolygonItem *polyPtr = (PolygonItem *) itemPtr; |
︙ | |||
1261 1262 1263 1264 1265 1266 1267 | 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 | - + - - + + - - + + - + - + + - + + - + + - + | * angle was < 11 degrees. */ double width; Tk_State state = itemPtr->state; bestDist = 1.0e36; if (state == TK_STATE_NULL) { |
︙ | |||
1346 1347 1348 1349 1350 1351 1352 | 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 | - - + + - - + + | /* * Compute the polygonal shape corresponding to this edge, consisting * of two points for the first point of the edge and two points for * the last point of the edge. */ if (count == numPoints) { |
︙ | |||
1378 1379 1380 1381 1382 1383 1384 | 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 | - - + + - - + + - - + + | } else if (dist < bestDist) { bestDist = dist; } changedMiterToBevel = 0; } } if (count == 2) { |
︙ | |||
1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 | 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 | + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int PolygonToArea( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against polygon. */ double *rectPtr) /* Pointer to array of four coordinates * (x1,y1,x2,y2) describing rectangular * area. */ |
︙ | |||
1454 1455 1456 1457 1458 1459 1460 | 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 | - + - - + + - - + + - + - + - + + - + | * everything seen so far was inside the area; * -1 means everything was outside the area. 0 * means overlap has been found. */ double width; Tk_State state = itemPtr->state; if (state == TK_STATE_NULL) { |
︙ | |||
1579 1580 1581 1582 1583 1584 1585 | 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 | - - + + - + | } changedMiterToBevel = 0; } } if (count == 2) { TkGetButtPoints(coordPtr, coordPtr+2, width, 0, poly+4, poly+6); } else if (polyPtr->joinStyle == JoinMiter) { |
︙ | |||
1664 1665 1666 1667 1668 1669 1670 | 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 | - + - + - + - + - - - + - + + + - - - - - + + + + + + + + + - - - - + - - + + - - + - + - + - - - + - + - - - - + - - - + - - - - - - - - + + - - - - + + - - - - - - - + + - - - - - - - - - - + + - - + - - - - + | * *-------------------------------------------------------------- */ static int GetPolygonIndex( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1827 1828 1829 1830 1831 1832 1833 | 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 | - + - + - - - + - - + + - - + + - + - + - + - + - - + + - + - + - + - + - - - - - - - - - + + - + - - - - - - - - + - - - - - - + - + - - - - + - - + - - + + - - + + + + - - - - + - + - + - - - - + + + - - - - + + - - + + - + - + - - - + - + - + - - + - - + - - - + + + + - - - - - - - - | */ static int PolygonToPostscript( Tcl_Interp *interp, /* Leave Postscript or error message here. */ Tk_Canvas canvas, /* Information about overall canvas. */ Tk_Item *itemPtr, /* Item for which Postscript is wanted. */ |
Changes to generic/tkCanvPs.c.
︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | + | /* * One of the following structures is created to keep track of Postscript * output being generated. It consists mostly of information provided on the * widget command line. */ typedef struct TkPostscriptInfo { Tk_Window tkwin; /* The canvas being printed. */ int x, y, width, height; /* Area to print, in canvas pixel * coordinates. */ int x2, y2; /* x+width and y+height. */ char *pageXString; /* String value of "-pagex" option or NULL. */ char *pageYString; /* String value of "-pagey" option or NULL. */ double pageX, pageY; /* Postscript coordinates (in points) * corresponding to pageXString and |
︙ | |||
67 68 69 70 71 72 73 | 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 | - + - + - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - - + - + + - + - + - - - - - - - - - - - - - - - - - - - - + + + + + | * "gray", or "color". Malloc'ed. */ int colorLevel; /* Numeric value corresponding to colorMode: 0 * for mono, 1 for gray, 2 for color. */ char *fileName; /* Name of file in which to write Postscript; * NULL means return Postscript info as * result. Malloc'ed. */ char *channelName; /* If -channel is specified, the name of the |
︙ | |||
230 231 232 233 234 235 236 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - | psInfo.colorMode = NULL; psInfo.colorLevel = 0; psInfo.fileName = NULL; psInfo.channelName = NULL; psInfo.chan = NULL; psInfo.prepass = 0; psInfo.prolog = 1; |
︙ | |||
321 322 323 324 325 326 327 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - - + + - - - - - - + + + - - - + + + - - - - + + + - - - - + + + + - - - + + + - - - - + + + - + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - + + + - + - - - - + + - - - + + - - + + - - + + - - + - - + - - - - - - + + + + + + - - - + + + - + - + + - - - + - - + - - - - - - - + + - - - + + - + - + - - + + - + - - - - - - + + + + + + - + - + - - - - - + + + + - - - + + + - - - + + + + - - - - - + - - + - - - - + - - - + + - - - - - + + + - - - - - + - - - | if (strncmp(psInfo.colorMode, "monochrome", length) == 0) { psInfo.colorLevel = 0; } else if (strncmp(psInfo.colorMode, "gray", length) == 0) { psInfo.colorLevel = 1; } else if (strncmp(psInfo.colorMode, "color", length) == 0) { psInfo.colorLevel = 2; } else { |
︙ | |||
647 648 649 650 651 652 653 | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - + - - - - - - - - - - - - - - - | if (psInfo.fileName != NULL) { ckfree(psInfo.fileName); } if ((psInfo.chan != NULL) && (psInfo.channelName == NULL)) { Tcl_Close(interp, psInfo.chan); } if (psInfo.channelName != NULL) { |
︙ | |||
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 | 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 | + + + + - + - - - + + - - - + + + + + - - + + | int Tk_PostscriptColor( Tcl_Interp *interp, Tk_PostscriptInfo psInfo, /* Postscript info. */ XColor *colorPtr) /* Information about color. */ { TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo; int tmp; double red, green, blue; char string[200]; if (psInfoPtr->prepass) { return TCL_OK; } /* * If there is a color map defined, then look up the color's name in the * map and use the Postscript commands found there, if there are any. */ if (psInfoPtr->colorVar != NULL) { CONST char *cmdString; |
︙ | |||
770 771 772 773 774 775 776 777 778 | 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | + - - + + + - + - - - - + + + - - + - - - - + + + + + + + + + - + - - + - - + + + + | Tk_PostscriptFont( Tcl_Interp *interp, Tk_PostscriptInfo psInfo, /* Postscript Info. */ Tk_Font tkfont) /* Information about font in which text is to * be printed. */ { TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo; char pointString[TCL_INTEGER_SPACE]; Tcl_DString ds; int i, points; |
︙ | |||
859 860 861 862 863 864 865 866 867 868 869 870 | 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 | + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - + + - - + + | Tk_PostscriptInfo psInfo, /* Postscript info. */ Pixmap bitmap, /* Bitmap for which to generate Postscript. */ int startX, int startY, /* Coordinates of upper-left corner of * rectangular region to output. */ int width, int height) /* Height of rectangular region. */ { TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo; XImage *imagePtr; int charsInLine, x, y, lastX, lastY, value, mask; unsigned int totalWidth, totalHeight; char string[100]; Window dummyRoot; int dummyX, dummyY; unsigned dummyBorderwidth, dummyDepth; if (psInfoPtr->prepass) { return TCL_OK; } |
︙ | |||
966 967 968 969 970 971 972 973 974 975 | 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 | + - + + + + + - + - - - - + | Tk_Window tkwin, Tk_PostscriptInfo psInfo, /* Interpreter for returning Postscript or * error message. */ Pixmap bitmap) /* Bitmap to use for stippling. */ { TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo; int width, height; char string[TCL_INTEGER_SPACE * 2]; Window dummyRoot; int dummyX, dummyY; unsigned dummyBorderwidth, dummyDepth; |
︙ | |||
1050 1051 1052 1053 1054 1055 1056 | 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 | - + - - - - + + + - - + + + | Tk_PostscriptInfo psInfo, /* Canvas on whose behalf Postscript is being * generated. */ double *coordPtr, /* Pointer to first in array of 2*numPoints * coordinates giving points for path. */ int numPoints) /* Number of points at *coordPtr. */ { TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo; |
︙ | |||
1133 1134 1135 1136 1137 1138 1139 | 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 | - + - | if (*end != 0) { goto error; } *doublePtr = d; return TCL_OK; error: |
︙ | |||
1163 1164 1165 1166 1167 1168 1169 | 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 | - + - + - + - + - - - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
1217 1218 1219 1220 1221 1222 1223 | 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 | - + | *blue = cdata->colors[b].blue / 65535.0; } else { *red = cdata->colors[pixel].red / 65535.0; *green = cdata->colors[pixel].green / 65535.0; *blue = cdata->colors[pixel].blue / 65535.0; } } |
︙ | |||
1250 1251 1252 1253 1254 1255 1256 1257 1258 | 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 | + - + - - - + - + | Tk_Window tkwin, Tk_PostscriptInfo psInfo, /* postscript info */ XImage *ximage, /* Image to draw */ int x, int y, /* First pixel to output */ int width, int height) /* Width and height of area */ { TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo; char buffer[256]; int xx, yy, band, maxRows; double red, green, blue; |
︙ | |||
1309 1310 1311 1312 1313 1314 1315 | 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 | - + - + - + - - - - - + + + + + - - + + - + + - - + + + | } else { cdata.separated=0; for (i = 0; i < ncolors; i ++) { cdata.colors[i].pixel = i; } } |
︙ | |||
1390 1391 1392 1393 1394 1395 1396 | 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 | - + + - + - - + + - - - + + + + - - + + - + - + - + + - + - - - + + + + - + + - + | TkImageGetColor(&cdata, XGetPixel(ximage, xx, yy), &red, &green, &blue); if (0.30 * red + 0.59 * green + 0.11 * blue > 0.5) { data |= mask; } mask >>= 1; if (mask == 0) { |
︙ | |||
1490 1491 1492 1493 1494 1495 1496 | 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 | + - + + + - + + - + + - + + + + + + + + + - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + - - + + - - + + - - - - - - + + + + + + + + + + + - | Tcl_Interp *interp, Tk_PhotoImageBlock *blockPtr, Tk_PostscriptInfo psInfo, int width, int height) { TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo; int colorLevel = psInfoPtr->colorLevel; static int codeIncluded = 0; |
︙ | |||
1599 1600 1601 1602 1603 1604 1605 | 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 | - + | for (yy = 0, lineLen=0; yy < height; yy++) { switch (colorLevel) { case 0: { /* * Generate data for image in monochrome mode. No attempt at * dithering is made--instead, just set a threshold. To handle |
︙ | |||
1627 1628 1629 1630 1631 1632 1633 | 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 | - + + - + - + + | if ((alpha != 0) && (0.3086*red + 0.6094*green + 0.082*blue < 128)) { data |= mask; } mask >>= 1; if (mask == 0) { |
︙ | |||
1666 1667 1668 1669 1670 1671 1672 | 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 | - + + - + - + + - + + - + - + + - + - + + - + - + + - + - - - - + - | if ((alpha != 0) && (0.3086*red + 0.6094*green + 0.082*blue >= 128)) { data |= mask; } mask >>= 1; if (mask == 0) { |
Changes to generic/tkCanvText.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + | /* * tkCanvText.c -- * * This file implements text items for canvas widgets. * * Copyright (c) 1991-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. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" #include "default.h" /* * The structure below defines the record for each text item. */ |
︙ | |||
28 29 30 31 32 33 34 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | * (and shared with) the generic canvas * code. */ /* * Fields that are set by widget commands other than "configure". */ double x, y; /* Positioning point for text. */ |
︙ | |||
50 51 52 53 54 55 56 | 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 | - - - - + + - - - + + + + + + - - - - - + + + - - + + + - - + + + - + - + - + - + - - - + - + - + - + - + - + - + - + - + - + - - + + - + - + - - - + + + - + - + - + - + - + - - | Pixmap activeStipple; /* Stipple bitmap for text, or None. */ Pixmap disabledStipple; /* Stipple bitmap for text, or None. */ char *text; /* Text for item (malloc-ed). */ int width; /* Width of lines for word-wrap, pixels. Zero * means no word-wrap. */ int underline; /* Index of character to put underline beneath * or -1 for no underlining. */ |
︙ | |||
191 192 193 194 195 196 197 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + - - - - | DisplayCanvText, /* displayProc */ TK_CONFIG_OBJS, /* flags */ TextToPoint, /* pointProc */ TextToArea, /* areaProc */ TextToPostscript, /* postscriptProc */ ScaleText, /* scaleProc */ TranslateText, /* translateProc */ |
︙ | |||
228 229 230 231 232 233 234 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + - + | static int CreateText( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
261 262 263 264 265 266 267 | 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 | - - - + + - - - + | textPtr->justify = TK_JUSTIFY_LEFT; textPtr->stipple = None; textPtr->activeStipple = None; textPtr->disabledStipple = None; textPtr->text = NULL; textPtr->width = 0; textPtr->underline = -1; |
︙ | |||
325 326 327 328 329 330 331 | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 | - + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + | static int TextCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
391 392 393 394 395 396 397 | 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 416 417 418 419 420 421 422 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 | - + - + - - + + - - + + - + - - + + - + | static int ConfigureText( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Rectangle item to reconfigure. */ int objc, /* Number of elements in objv. */ |
︙ | |||
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | 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 | + - + - + - + - + - - - - - - - - - - - - - - - - | } else { newGC = NULL; } if (textPtr->cursorOffGC != NULL) { Tk_FreeGC(Tk_Display(tkwin), textPtr->cursorOffGC); } textPtr->cursorOffGC = newGC; /* * If the text was changed, move the selection and insertion indices to * keep them inside the item. */ textPtr->numBytes = strlen(textPtr->text); textPtr->numChars = Tcl_NumUtfChars(textPtr->text, textPtr->numBytes); if (textInfoPtr->selItemPtr == itemPtr) { |
︙ | |||
566 567 568 569 570 571 572 | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | - | static void DeleteText( Tk_Canvas canvas, /* Info about overall canvas widget. */ Tk_Item *itemPtr, /* Item that is being deleted. */ Display *display) /* Display containing window for canvas. */ { TextItem *textPtr = (TextItem *) itemPtr; |
︙ | |||
629 630 631 632 633 634 635 | 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | - + - - - + + - - + + - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - + - - - - - - + | static void ComputeTextBbox( Tk_Canvas canvas, /* Canvas that contains item. */ TextItem *textPtr) /* Item whose bbox is to be recomputed. */ { Tk_CanvasTextInfo *textInfoPtr; |
︙ | |||
798 799 800 801 802 803 804 | 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 | - + - - + + - - + + - - + + - - + + - - - + - + | Drawable drawable, /* Pixmap or window in which to draw item. */ int x, int y, int width, int height) /* Describes region of canvas that must be * redisplayed (not used). */ { TextItem *textPtr; Tk_CanvasTextInfo *textInfoPtr; |
︙ | |||
868 869 870 871 872 873 874 | 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 | - - - - - + + + - - + + - - - + - - - - - - - - - - + + + + - + - - - - + + - - + - - - - - - - - - - - + + - - + + + + - - + + + + + + + - + - - + - - + - - - - + + + - - - + + - - - - + + - - + - - + - + - + - + - + - + - - - + - + - + - - + + - + - + - + - + | * However, for the last line we only want to display up to the * last character, not the end of the line. */ x = xFirst; height = hFirst; for (y = yFirst ; y <= yLast; y += height) { |
︙ | |||
1087 1088 1089 1090 1091 1092 1093 | 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 | - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + | *-------------------------------------------------------------- */ static void TextDeleteChars( Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Item in which to delete characters. */ |
︙ | |||
1189 1190 1191 1192 1193 1194 1195 | 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | - + - + - - - - + + | TextToPoint( Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Item to check against point. */ double *pointPtr) /* Pointer to x and y coordinates. */ { TextItem *textPtr; Tk_State state = itemPtr->state; |
︙ | |||
1239 1240 1241 1242 1243 1244 1245 | 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 | - + - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | * (x1,y1,x2,y2) describing rectangular * area. */ { TextItem *textPtr; Tk_State state = itemPtr->state; if (state == TK_STATE_NULL) { |
︙ | |||
1371 1372 1373 1374 1375 1376 1377 | 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 | - + - + - + + - + - - - + - - - - + + + - - - - - - - - + + - + - - + - - + - - + - - - + + - - - + + - + + + + + + - - + + | * *-------------------------------------------------------------- */ static int GetTextIndex( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1471 1472 1473 1474 1475 1476 1477 1478 1479 | 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 | + - + - + - + | * * Side effects: * The cursor position will change. * *-------------------------------------------------------------- */ /* ARGSUSED */ static void SetTextCursor( |
︙ | |||
1510 1511 1512 1513 1514 1515 1516 | 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 | - + - + - + - + - + - + - - + + - - - + + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
1576 1577 1578 1579 1580 1581 1582 | 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | - + - + + - - - + - - + + - + - - + + - + - - - - - - - - - - - - - + - - - + - - - + - - + + - + + + - - - + + + + + + - + - - - - - + + + + + - - - + + - - - + + - - - - - - - - - - - - | Tk_Canvas canvas, /* Information about overall canvas. */ Tk_Item *itemPtr, /* Item for which Postscript is wanted. */ int prepass) /* 1 means this is a prepass to collect font * information; 0 means final Postscript is * being created. */ { TextItem *textPtr = (TextItem *) itemPtr; |
Changes to generic/tkCanvUtil.c.
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 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 | + - + - + - + - - - - - - - - - - - - - - | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkCanvas.h" #include <assert.h> /* * Structures defined only in this file. */ typedef struct SmoothAssocData { struct SmoothAssocData *nextPtr; /* Pointer to next SmoothAssocData. */ Tk_SmoothMethod smooth; /* Name and functions associated with this * option. */ } SmoothAssocData; |
︙ | |||
83 84 85 86 87 88 89 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + - + | *---------------------------------------------------------------------- */ Tk_Window Tk_CanvasTkwin( Tk_Canvas canvas) /* Token for the canvas. */ { TkCanvas *canvasPtr = (TkCanvas *) canvas; |
︙ | |||
115 116 117 118 119 120 121 122 123 | 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 | + - + - + | Tk_CanvasDrawableCoords( Tk_Canvas canvas, /* Token for the canvas. */ double x, /* Coordinates in canvas space. */ double y, short *drawableXPtr, /* Screen coordinates are stored here. */ short *drawableYPtr) { TkCanvas *canvasPtr = (TkCanvas *) canvas; double tmp; |
︙ | |||
174 175 176 177 178 179 180 181 182 | 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 | + - + - + | Tk_CanvasWindowCoords( Tk_Canvas canvas, /* Token for the canvas. */ double x, /* Coordinates in canvas space. */ double y, short *screenXPtr, /* Screen coordinates are stored here. */ short *screenYPtr) { TkCanvas *canvasPtr = (TkCanvas *) canvas; double tmp; |
︙ | |||
227 228 229 230 231 232 233 | 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 | - + - + - + - + - + | * None. * *-------------------------------------------------------------- */ int Tk_CanvasGetCoord( |
︙ | |||
265 266 267 268 269 270 271 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | - + - + - + | * None. * *-------------------------------------------------------------- */ int Tk_CanvasGetCoordFromObj( |
︙ | |||
301 302 303 304 305 306 307 | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | + - - - + + + | void Tk_CanvasSetStippleOrigin( Tk_Canvas canvas, /* Token for a canvas. */ GC gc) /* Graphics context that is about to be used * to draw a stippled pattern as part of * redisplaying the canvas. */ { TkCanvas *canvasPtr = (TkCanvas *) canvas; |
︙ | |||
332 333 334 335 336 337 338 | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | - + | Tk_CanvasSetOffset( Tk_Canvas canvas, /* Token for a canvas. */ GC gc, /* Graphics context that is about to be used * to draw a stippled pattern as part of * redisplaying the canvas. */ Tk_TSOffset *offset) /* Offset (may be NULL pointer)*/ { |
︙ | |||
376 377 378 379 380 381 382 | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - + | *---------------------------------------------------------------------- */ Tk_CanvasTextInfo * Tk_CanvasGetTextInfo( Tk_Canvas canvas) /* Token for the canvas widget. */ { |
︙ | |||
398 399 400 401 402 403 404 | 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 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | - - + + - + - + - + - + - - - - - - + + + - + - + | * The tags for a given item get replaced by those indicated in the value * argument. * *-------------------------------------------------------------- */ int |
︙ | |||
467 468 469 470 471 472 473 | 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 | - - - + + + - + - + - - - - + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
514 515 516 517 518 519 520 | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | - + - + - + - - - - + | * indicated in the value argument. * *-------------------------------------------------------------- */ int TkCanvasDashParseProc( |
︙ | |||
549 550 551 552 553 554 555 | 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 | - + - + - + - + + - - - + - + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
613 614 615 616 617 618 619 | 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | - + + + - + - + + | static SmoothAssocData * InitSmoothMethods( Tcl_Interp *interp) { SmoothAssocData *methods, *ptr; |
︙ | |||
649 650 651 652 653 654 655 | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + - + + | * *-------------------------------------------------------------- */ void Tk_CreateSmoothMethod( Tcl_Interp *interp, |
︙ | |||
674 675 676 677 678 679 680 | 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 | - + - + - + + | prevPtr = typePtr2, typePtr2 = typePtr2->nextPtr) { if (!strcmp(typePtr2->smooth.name, smooth->name)) { if (prevPtr == NULL) { methods = typePtr2->nextPtr; } else { prevPtr->nextPtr = typePtr2->nextPtr; } |
︙ | |||
707 708 709 710 711 712 713 | 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 | - + - + - - + - - + | *---------------------------------------------------------------------- */ static void SmoothMethodCleanupProc( ClientData clientData, /* Points to "smoothMethod" AssocData for the * interpreter. */ |
︙ | |||
738 739 740 741 742 743 744 | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | - + - + - + - - - + + + - - - + + - + - - + - - + | * indicated in the value argument. * *-------------------------------------------------------------- */ int TkSmoothParseProc( |
︙ | |||
830 831 832 833 834 835 836 | 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 | - + - + - + - - + + - - - - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
869 870 871 872 873 874 875 | 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 | - + - + - + - + + + - - - + + - + - - + + - - + + - + + - - - + + + - - + - - + + - - + - + - - + + | * *-------------------------------------------------------------- */ int Tk_GetDash( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1022 1023 1024 1025 1026 1027 1028 | 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 | - - + + - - + + - - + + | Tk_DeleteOutline( Display *display, /* Display containing window. */ Tk_Outline *outline) { if (outline->gc != NULL) { Tk_FreeGC(display, outline->gc); } |
︙ | |||
1106 1107 1108 1109 1110 1111 1112 | 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | - + - + | if (width < 1.0) { width = 1.0; } dash = &(outline->dash); color = outline->color; stipple = outline->stipple; if (state == TK_STATE_NULL) { |
︙ | |||
1189 1190 1191 1192 1193 1194 1195 | 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 | - + - + - + | int Tk_ChangeOutlineGC( Tk_Canvas canvas, Tk_Item *item, Tk_Outline *outline) { |
︙ | |||
1243 1244 1245 1246 1247 1248 1249 | 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 | - + - + + - + - - + + - + - - + + - - - + + + | if ((dash->number<-1) || ((dash->number == -1) && (dash->pattern.array[0] != ','))) { char *q; int i = -dash->number; p = (i > (int)sizeof(char *)) ? dash->pattern.pt : dash->pattern.array; |
︙ | |||
1322 1323 1324 1325 1326 1327 1328 | 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 | - + - + | if (width < 1.0) { width = 1.0; } dash = &(outline->dash); color = outline->color; stipple = outline->stipple; if (state == TK_STATE_NULL) { |
︙ | |||
1365 1366 1367 1368 1369 1370 1371 | 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 | - - + + - + | if ((unsigned int)ABS(dash->number) > sizeof(char *)) { dashList = dash->pattern.pt[0]; } else if (dash->number != 0) { dashList = dash->pattern.array[0]; } else { dashList = (char) (4 * width + 0.5); } |
︙ | |||
1399 1400 1401 1402 1403 1404 1405 1406 1407 | 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 | + - - - - - - + + + + + + + + - + + + + - + - + - + - + + + - - - + + + + + + + - - - + - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + - - + + + + - + | int Tk_CanvasPsOutline( Tk_Canvas canvas, Tk_Item *item, Tk_Outline *outline) { char string[41]; char pattern[11]; int i; |
︙ | |||
1519 1520 1521 1522 1523 1524 1525 | 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 | - + - + | *-------------------------------------------------------------- */ static int DashConvert( char *l, /* Must be at least 2*n chars long, or NULL to * indicate "just check syntax". */ |
︙ | |||
1667 1668 1669 1670 1671 1672 1673 1674 1675 | 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 | + + + + - | int numOutput = 0; /* Number of output coordinates */ double lft, rgh; /* Left and right sides of the bounding box */ double top, btm; /* Top and bottom sizes of the bounding box */ double *tempArr; /* Temporary storage used by the clipper */ double *a, *b, *t; /* Pointers to parts of the temporary * storage */ int i, j; /* Loop counters */ #ifndef NDEBUG int maxOutput; /* Maximum number of outputs that we will * allow */ #endif double limit[4]; /* Boundries at which clipping occurs */ double staticSpace[480]; /* Temp space from the stack */ |
︙ | |||
1708 1709 1710 1711 1712 1713 1714 | 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 | - + - + - + | * to do the translation. */ for (i=0; i<numVertex; i++){ double x, y; x = coordArr[i*2]; |
︙ | |||
1762 1763 1764 1765 1766 1767 1768 | 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 | + + + - + - + - + - + - - + + - + - + - - - + - - + + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | limit[2] = -lft; limit[3] = btm; /* * This is the loop that makes the four passes through the data. */ #ifndef NDEBUG maxOutput = numVertex*3; #endif |
Changes to generic/tkCanvWind.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + | /* * tkCanvWind.c -- * * This file implements window items for canvas widgets. * * Copyright (c) 1992-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. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" /* * The structure below defines the record for each window item. */ |
︙ | |||
33 34 35 36 37 38 39 | 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 | - - + + + - - + + + - + - + - + - + - + - - + + - + - + - - - - + + | Tk_Canvas canvas; /* Canvas containing this item. */ } WindowItem; /* * Information used for parsing configuration specs: */ |
︙ | |||
128 129 130 131 132 133 134 | 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 | - - - + | TranslateWinItem, /* translateProc */ NULL, /* indexProc */ NULL, /* cursorProc */ NULL, /* selectionProc */ NULL, /* insertProc */ NULL, /* dTextProc */ NULL, /* nextPtr */ |
︙ | |||
169 170 171 172 173 174 175 | 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 | - + - + - + - | static int CreateWinItem( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
240 241 242 243 244 245 246 | 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 | - + - + - - - - + + + + + + - - - + + + - + - - - + + + | static int WinItemCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
302 303 304 305 306 307 308 | 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 329 330 331 332 333 334 335 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 | - + - + - - + + - + + - - + + + + + + + - + - - + + + - - - - - - - - + | static int ConfigureWinItem( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Window item to reconfigure. */ int objc, /* Number of elements in objv. */ |
︙ | |||
404 405 406 407 408 409 410 | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | - - - + + + | DeleteWinItem( Tk_Canvas canvas, /* Overall info about widget. */ Tk_Item *itemPtr, /* Item that is being deleted. */ Display *display) /* Display containing window for canvas. */ { WindowItem *winItemPtr = (WindowItem *) itemPtr; Tk_Window canvasTkwin = Tk_CanvasTkwin(canvas); |
︙ | |||
447 448 449 450 451 452 453 | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | - + | int width, height, x, y; Tk_State state = winItemPtr->header.state; x = (int) (winItemPtr->x + ((winItemPtr->x >= 0) ? 0.5 : - 0.5)); y = (int) (winItemPtr->y + ((winItemPtr->y >= 0) ? 0.5 : - 0.5)); if (state == TK_STATE_NULL) { |
︙ | |||
567 568 569 570 571 572 573 | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | - - - - - - + | * redisplayed (not used). */ { WindowItem *winItemPtr = (WindowItem *) itemPtr; int width, height; short x, y; Tk_Window canvasTkwin = Tk_CanvasTkwin(canvas); Tk_State state = itemPtr->state; |
︙ | |||
660 661 662 663 664 665 666 | 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | - | WinItemToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *pointPtr) /* Pointer to x and y coordinates. */ { WindowItem *winItemPtr = (WindowItem *) itemPtr; double x1, x2, y1, y2, xDiff, yDiff; |
︙ | |||
718 719 720 721 722 723 724 | 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | - | Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against rectangle. */ double *rectPtr) /* Pointer to array of four coordinates * (x1,y1,x2,y2) describing rectangular * area. */ { WindowItem *winItemPtr = (WindowItem *) itemPtr; |
︙ | |||
755 756 757 758 759 760 761 | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | - + - - - - + + | * *-------------------------------------------------------------- */ #ifdef X_GetImage static int xerrorhandler( |
︙ | |||
793 794 795 796 797 798 799 | 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | - + + | Tcl_Interp *interp, /* Leave Postscript or error message here. */ Tk_Canvas canvas, /* Information about overall canvas. */ Tk_Item *itemPtr, /* Item for which Postscript is wanted. */ int prepass) /* 1 means this is a prepass to collect font * information; 0 means final Postscript is * being created. */ { |
︙ | |||
836 837 838 839 840 841 842 843 844 845 846 847 | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 | + + - - - - - - - - + - + + + - - + + - - - + + + + - - - + + - - - - + + + + + + + + - + - + - + - - - - - - - - + - - + - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | CanvasPsWindow( Tcl_Interp *interp, /* Leave Postscript or error message here. */ Tk_Window tkwin, /* window to be printed */ Tk_Canvas canvas, /* Information about overall canvas. */ double x, double y, /* origin of window. */ int width, int height) /* width/height of window. */ { char buffer[256]; XImage *ximage; int result; Tcl_DString buffer1, buffer2; #ifdef X_GetImage Tk_ErrorHandler handle; #endif |
︙ | |||
1051 1052 1053 1054 1055 1056 1057 | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 | - + | */ static void WinItemStructureProc( ClientData clientData, /* Pointer to record describing window item. */ XEvent *eventPtr) /* Describes what just happened. */ { |
︙ | |||
1081 1082 1083 1084 1085 1086 1087 | 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 | - + - - + - + - + + - - + + - + - + - - + | */ static void WinItemRequestProc( ClientData clientData, /* Pointer to record for window item. */ Tk_Window tkwin) /* Window that changed its desired size. */ { |
︙ |
Changes to generic/tkCanvas.c.
︙ | |||
9 10 11 12 13 14 15 | 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) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ /* #define USE_OLD_TAG_SEARCH 1 */ |
︙ | |||
48 49 50 51 52 53 54 | 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 329 330 331 332 333 334 335 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 | - - + + + + - - - + + + + - - + + + + - + - - + + - - - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - - + + + - + - - + + + - - + + - + - - + + + - + - - - - + - - + - + + - + + + + + + - + - + + + + + + + + + + + - + - - + + + + + + + - - - - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Tk_Item *currentPtr; /* Pointer to last item returned. */ Tk_Item *lastPtr; /* The item right before the currentPtr is * tracked so if the currentPtr is deleted we * don't have to start from the beginning. */ int searchOver; /* Non-zero means NextItem should always * return NULL. */ int type; /* Search type (see #defs below) */ |
︙ | |||
678 679 680 681 682 683 684 | 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 416 417 418 419 420 421 422 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 | - + - + - + - + - - + + - - + + - + | */ int Tk_CanvasObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ |
︙ | |||
777 778 779 780 781 782 783 784 785 786 787 | 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 | + + - + - + - + - + - + | canvasPtr->flags = 0; canvasPtr->nextId = 1; canvasPtr->psInfo = NULL; canvasPtr->canvas_state = TK_STATE_NORMAL; canvasPtr->tsoffset.flags = 0; canvasPtr->tsoffset.xoffset = 0; canvasPtr->tsoffset.yoffset = 0; #ifndef USE_OLD_TAG_SEARCH canvasPtr->bindTagExprs = NULL; #endif Tcl_InitHashTable(&canvasPtr->idTable, TCL_ONE_WORD_KEYS); Tk_SetClass(canvasPtr->tkwin, "Canvas"); |
︙ | |||
826 827 828 829 830 831 832 | 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 | - + - + + + + + - - + + - - - + + - - - + + + - + - - - + + - - - + + - + - - + + - + - + - + + - + + + + | */ static int CanvasWidgetCmd( ClientData clientData, /* Information about canvas widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
923 924 925 926 927 928 929 | 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 | - + - + - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - + + - - - + + - - + + + | if (itemPtr->y2 > y2) { y2 = itemPtr->y2; } } } } if (gotAny) { |
︙ | |||
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 | 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | + - + - - - - + + + + - + + + - + - - + + + - + + - + - - - + + - + + + - + - - + + | * Flag in TagSearch that expr has changed ownership so * that TagSearchDestroy doesn't try to free it. */ searchPtr->expr = NULL; } } #endif /* not USE_OLD_TAG_SEARCH */ if (argv4[0] == '+') { argv4++; append = 1; } mask = Tk_CreateBinding(interp, canvasPtr->bindingTable, object, Tcl_GetString(objv[3]), argv4, append); if (mask == 0) { result = TCL_ERROR; goto done; } |
︙ | |||
1157 1158 1159 1160 1161 1162 1163 | 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | - + + + + - + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - + - + - - - - - - - - + - + - + + + + + - - - + + + - - + - - - - - - - - + - - - + + + + + + + + + + + + - - - + + + + - - + - + + - + - - + + + + - + + + + + + + + + + + + + - + + + - + + - + - + - + - + + + - + - + - + - + | Tcl_WrongNumArgs(interp, 2, objv, "tagOrId ?x y x y ...?"); result = TCL_ERROR; goto done; } FIRST_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto done); if (itemPtr != NULL) { if (objc != 3) { |
︙ | |||
1451 1452 1453 1454 1455 1456 1457 | 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 | - + - - - - - - - + - - + - - - - - - - + + + + - + + + + - + + + - - + + - + - - - - + + - - - + + + - + + + + + + + + - + - + - + + - - - + + - + + - + + + + + + - + - - + + + + - + + + + + + + + + - + + + + + - + - + + + - + - + + + - + + + - - - + + + + + + + + + + + + + + + + + + + + - + + + + - + - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + - - + - + | } if (objc == 4) { tag = Tk_GetUid(Tcl_GetString(objv[3])); } else { tag = Tk_GetUid(Tcl_GetString(objv[2])); } FOR_EVERY_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto done) { |
︙ | |||
1796 1797 1798 1799 1800 1801 1802 | 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 | - - - - + - - - - - - - + - - - - - + + + - - - - - - + - - - - - - - - - + - - - - - - - + - - - + - - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + - - + - - - - + + + + - + - + - - + + - + | prevPtr = canvasPtr->lastItemPtr; } else { prevPtr = NULL; FOR_EVERY_CANVAS_ITEM_MATCHING(objv[3], &searchPtr, goto done) { prevPtr = itemPtr; } if (prevPtr == NULL) { |
︙ | |||
1956 1957 1958 1959 1960 1961 1962 | 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 | - - - + + - - - + + + - - + + - + + + + + + + - - + + + + - - + + + + - + | - canvasPtr->scrollY1; newYOrigin = canvasPtr->scrollY1 + tmp; CanvasSetOrigin(canvasPtr, newXOrigin, newYOrigin); } break; } case CANV_SELECT: { |
︙ | |||
2065 2066 2067 2068 2069 2070 2071 | 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 | - - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + - - - + + - - - - + - - - - + + - - + - - - + + - - - - - + - - - - - + - + + - + | if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "tag"); result = TCL_ERROR; goto done; } FIRST_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto done); if (itemPtr != NULL) { |
︙ | |||
2228 2229 2230 2231 2232 2233 2234 | 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 | - + - + + + + - + - + - + + + - + | * Everything associated with the canvas is freed up. * *---------------------------------------------------------------------- */ static void DestroyCanvas( |
︙ | |||
2298 2299 2300 2301 2302 2303 2304 | 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 | - + - + | static int ConfigureCanvas( Tcl_Interp *interp, /* Used for error reporting. */ TkCanvas *canvasPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in objv. */ |
︙ | |||
2354 2355 2356 2357 2358 2359 2360 | 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 | - + | if (result != TCL_OK) { Tcl_ResetResult(canvasPtr->interp); } } } } |
︙ | |||
2380 2381 2382 2383 2384 2385 2386 | 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 | - + - - + + - - + - + - + | canvasPtr->scrollX1 = 0; canvasPtr->scrollY1 = 0; canvasPtr->scrollX2 = 0; canvasPtr->scrollY2 = 0; if (canvasPtr->regionString != NULL) { int argc2; |
︙ | |||
2440 2441 2442 2443 2444 2445 2446 | 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 | - + - + - + + + + - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + | canvasPtr->xOrigin, canvasPtr->yOrigin, canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin), canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin)); return TCL_OK; } /* |
︙ | |||
3028 3029 3030 3031 3032 3033 3034 | 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 | - + - + - + - + - | /* * Choose a new current item if that is needed (this could cause event * handlers to be invoked). */ while (canvasPtr->flags & REPICK_NEEDED) { |
︙ | |||
3150 3151 3152 3153 3154 3155 3156 | 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 | - + - - + + + - + | for (itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL; itemPtr = itemPtr->nextPtr) { if ((itemPtr->x1 >= screenX2) || (itemPtr->y1 >= screenY2) || (itemPtr->x2 < screenX1) || (itemPtr->y2 < screenY1)) { |
︙ | |||
3227 3228 3229 3230 3231 3232 3233 | 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 | - + - - + + - + - + | canvasPtr->redrawY1 = canvasPtr->redrawY2 = 0; if (canvasPtr->flags & UPDATE_SCROLLBARS) { CanvasUpdateScrollbars(canvasPtr); } } /* |
︙ | |||
3274 3275 3276 3277 3278 3279 3280 | 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 | - + + - + | } else if (eventPtr->type == DestroyNotify) { if (canvasPtr->tkwin != NULL) { canvasPtr->tkwin = NULL; Tcl_DeleteCommandFromToken(canvasPtr->interp, canvasPtr->widgetCmd); } if (canvasPtr->flags & REDRAW_PENDING) { |
︙ | |||
3310 3311 3312 3313 3314 3315 3316 | 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 | - - + + + | * Special hack: if the canvas is unmapped, then must notify all items * with "alwaysRedraw" set, so that they know that they are no longer * displayed. */ for (itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL; itemPtr = itemPtr->nextPtr) { |
︙ | |||
3339 3340 3341 3342 3343 3344 3345 | 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 | - + - + - + - + | *---------------------------------------------------------------------- */ static void CanvasCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
3418 3419 3420 3421 3422 3423 3424 | 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 | - + - + - + - - + + - - + - - - - - + + + | canvasPtr->redrawX1 = x1; canvasPtr->redrawY1 = y1; canvasPtr->redrawX2 = x2; canvasPtr->redrawY2 = y2; canvasPtr->flags |= BBOX_NOT_EMPTY; } if (!(canvasPtr->flags & REDRAW_PENDING)) { |
︙ | |||
3482 3483 3484 3485 3486 3487 3488 | 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 | - + - + - + | canvasPtr->redrawX2 = itemPtr->x2; canvasPtr->redrawY2 = itemPtr->y2; canvasPtr->flags |= BBOX_NOT_EMPTY; } itemPtr->redraw_flags |= FORCE_REDRAW; } if (!(canvasPtr->flags & REDRAW_PENDING)) { |
︙ | |||
3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 | 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | tkOvalType.nextPtr = &tkBitmapType; tkBitmapType.nextPtr = &tkArcType; tkArcType.nextPtr = &tkWindowType; tkWindowType.nextPtr = NULL; Tcl_MutexUnlock(&typeListMutex); } #ifdef USE_OLD_TAG_SEARCH /* *-------------------------------------------------------------- * * StartTagSearch -- * * This function is called to initiate an enumeration of all items in a * given canvas that contain a given tag. * * Results: * The return value is a pointer to the first item in canvasPtr that * matches tag, or NULL if there is no such item. The information at * *searchPtr is initialized such that successive calls to NextItem will * return successive items that match tag. * * Side effects: * SearchPtr is linked into a list of searches in progress on canvasPtr, * so that elements can safely be deleted while the search is in * progress. EndTagSearch must be called at the end of the search to * unlink searchPtr from this list. * *-------------------------------------------------------------- */ static Tk_Item * StartTagSearch( TkCanvas *canvasPtr, /* Canvas whose items are to be searched. */ Tcl_Obj *tagObj, /* Object giving tag value. */ TagSearch *searchPtr) /* Record describing tag search; will be * initialized here. */ { int id; Tk_Item *itemPtr, *lastPtr; Tk_Uid *tagPtr; Tk_Uid uid; char *tag = Tcl_GetString(tagObj); int count; TkWindow *tkwin; TkDisplay *dispPtr; tkwin = (TkWindow *) canvasPtr->tkwin; dispPtr = tkwin->dispPtr; /* * Initialize the search. */ searchPtr->canvasPtr = canvasPtr; searchPtr->searchOver = 0; /* * Find the first matching item in one of several ways. If the tag is a * number then it selects the single item with the matching identifier. * In this case see if the item being requested is the hot item, in which * case the search can be skipped. */ if (isdigit(UCHAR(*tag))) { char *end; Tcl_HashEntry *entryPtr; dispPtr->numIdSearches++; id = strtoul(tag, &end, 0); if (*end == 0) { itemPtr = canvasPtr->hotPtr; lastPtr = canvasPtr->hotPrevPtr; if ((itemPtr == NULL) || (itemPtr->id != id) || (lastPtr == NULL) || (lastPtr->nextPtr != itemPtr)) { dispPtr->numSlowSearches++; entryPtr = Tcl_FindHashEntry(&canvasPtr->idTable, (char *) id); if (entryPtr != NULL) { itemPtr = (Tk_Item *)Tcl_GetHashValue(entryPtr); lastPtr = itemPtr->prevPtr; } else { lastPtr = itemPtr = NULL; } } searchPtr->lastPtr = lastPtr; searchPtr->searchOver = 1; canvasPtr->hotPtr = itemPtr; canvasPtr->hotPrevPtr = lastPtr; return itemPtr; } } searchPtr->tag = uid = Tk_GetUid(tag); if (uid == Tk_GetUid("all")) { /* * All items match. */ searchPtr->tag = NULL; searchPtr->lastPtr = NULL; searchPtr->currentPtr = canvasPtr->firstItemPtr; return canvasPtr->firstItemPtr; } /* * None of the above. Search for an item with a matching tag. */ for (lastPtr = NULL, itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL; lastPtr = itemPtr, itemPtr = itemPtr->nextPtr) { for (tagPtr = itemPtr->tagPtr, count = itemPtr->numTags; count > 0; tagPtr++, count--) { if (*tagPtr == uid) { searchPtr->lastPtr = lastPtr; searchPtr->currentPtr = itemPtr; return itemPtr; } } } searchPtr->lastPtr = lastPtr; searchPtr->searchOver = 1; return NULL; } /* *-------------------------------------------------------------- * * NextItem -- * * This function returns successive items that match a given tag; it * should be called only after StartTagSearch has been used to begin a * search. * * Results: * The return value is a pointer to the next item that matches the tag * specified to StartTagSearch, or NULL if no such item exists. * *SearchPtr is updated so that the next call to this function will * return the next item. * * Side effects: * None. * *-------------------------------------------------------------- */ static Tk_Item * NextItem( TagSearch *searchPtr) /* Record describing search in progress. */ { Tk_Item *itemPtr, *lastPtr; int count; Tk_Uid uid; Tk_Uid *tagPtr; /* * Find next item in list (this may not actually be a suitable one to * return), and return if there are no items left. */ lastPtr = searchPtr->lastPtr; if (lastPtr == NULL) { itemPtr = searchPtr->canvasPtr->firstItemPtr; } else { itemPtr = lastPtr->nextPtr; } if ((itemPtr == NULL) || (searchPtr->searchOver)) { searchPtr->searchOver = 1; return NULL; } if (itemPtr != searchPtr->currentPtr) { /* * The structure of the list has changed. Probably the previously- * returned item was removed from the list. In this case, don't * advance lastPtr; just return its new successor (i.e. do nothing * here). */ } else { lastPtr = itemPtr; itemPtr = lastPtr->nextPtr; } /* * Handle special case of "all" search by returning next item. */ uid = searchPtr->tag; if (uid == NULL) { searchPtr->lastPtr = lastPtr; searchPtr->currentPtr = itemPtr; return itemPtr; } /* * Look for an item with a particular tag. */ for ( ; itemPtr != NULL; lastPtr = itemPtr, itemPtr = itemPtr->nextPtr) { for (tagPtr = itemPtr->tagPtr, count = itemPtr->numTags; count > 0; tagPtr++, count--) { if (*tagPtr == uid) { searchPtr->lastPtr = lastPtr; searchPtr->currentPtr = itemPtr; return itemPtr; } } } searchPtr->lastPtr = lastPtr; searchPtr->searchOver = 1; return NULL; } #else /* !USE_OLD_TAG_SEARCH */ /* *---------------------------------------------------------------------- * * GetStaticUids -- * * This function is invoked to return a structure filled with the Uids * used when doing tag searching. If it was never before called in the |
︙ | |||
3665 3666 3667 3668 3669 3670 3671 | 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 | - + - - + + | *-------------------------------------------------------------- */ static void TagSearchExprInit( TagSearchExpr **exprPtrPtr) { |
︙ | |||
3697 3698 3699 3700 3701 3702 3703 | 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 | - + - + - + | *-------------------------------------------------------------- */ static void TagSearchExprDestroy( TagSearchExpr *expr) { |
︙ | |||
3734 3735 3736 3737 3738 3739 3740 | 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 | - + - + - + - + - + - + - + | static int TagSearchScan( TkCanvas *canvasPtr, /* Canvas whose items are to be searched. */ Tcl_Obj *tagObj, /* Object giving tag value. */ TagSearch **searchPtrPtr) /* Record describing tag search; will be * initialized here. */ { |
︙ | |||
3809 3810 3811 3812 3813 3814 3815 | 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 | - - - + + | } /* * For all other tags and tag expressions convert to a UID. This UID is * kept forever, but this should be thought of as a cache rather than as a * memory leak. */ |
︙ | |||
3899 3900 3901 3902 3903 3904 3905 | 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 | - + - - + + | * Deallocates memory. * *-------------------------------------------------------------- */ static void TagSearchDestroy( |
︙ | |||
3930 3931 3932 3933 3934 3935 3936 | 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 | - - + + - - - - - + + + + + - - + + + - + + + - + - + - - + + - - + - + - + - - - + + + - - + - - - + + + - - - + - + - - + + - - + - + | * *-------------------------------------------------------------- */ static int TagSearchScanExpr( Tcl_Interp *interp, /* Current interpreter. */ |
︙ | |||
4102 4103 4104 4105 4106 4107 4108 | 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 | - + - + - + - - + + - - + - + - - + + - - + - + - + - - - + + + - - - + - - + - | *++tag = '\0'; expr->uids[expr->index++] = Tk_GetUid(searchPtr->rewritebuffer); looking_for_tag = 0; found_tag = 1; } |
︙ | |||
4199 4200 4201 4202 4203 4204 4205 | 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 | - + - + - + - + - + - + - + + + + + - + | int count; int result; /* Value of expr so far */ int parendepth; SearchUids *searchUids; /* Collection of uids for basic search * expression terms. */ searchUids = GetStaticUids(); |
︙ | |||
4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 | 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 | + + + + - + | * If the previous result was 1 then negate the next result. */ negate_result = result; } else if (uid == searchUids->endparenUid) { return result; /* * } else { * assert(0); */ } looking_for_tag = 1; } } /* |
︙ | |||
4370 4371 4372 4373 4374 4375 4376 | 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 | - + | Tcl_HashEntry *entryPtr; itemPtr = searchPtr->canvasPtr->hotPtr; lastPtr = searchPtr->canvasPtr->hotPrevPtr; if ((itemPtr == NULL) || (itemPtr->id != searchPtr->id) || (lastPtr == NULL) || (lastPtr->nextPtr != itemPtr)) { entryPtr = Tcl_FindHashEntry(&searchPtr->canvasPtr->idTable, |
︙ | |||
4402 4403 4404 4405 4406 4407 4408 | 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 | - - + + + | if (searchPtr->type == SEARCH_TYPE_TAG) { /* * Optimized single-tag search */ uid = searchPtr->expr->uid; for (lastPtr = NULL, itemPtr = searchPtr->canvasPtr->firstItemPtr; |
︙ | |||
4505 4506 4507 4508 4509 4510 4511 | 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 | - + | if (searchPtr->type == SEARCH_TYPE_TAG) { /* * Optimized single-tag search */ uid = searchPtr->expr->uid; for (; itemPtr != NULL; lastPtr = itemPtr, itemPtr = itemPtr->nextPtr) { |
︙ | |||
4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 | 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 | + - + - - + + - - + + + - + + + - + - + + - + | return itemPtr; } } searchPtr->lastPtr = lastPtr; searchPtr->searchOver = 1; return NULL; } #endif /* USE_OLD_TAG_SEARCH */ /* *-------------------------------------------------------------- * * DoItem -- * * This is a utility function called by FindItems. It either adds |
︙ | |||
4637 4638 4639 4640 4641 4642 4643 | 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 | - + + + + + + - - + | static int FindItems( Tcl_Interp *interp, /* Interpreter for error reporting. */ TkCanvas *canvasPtr, /* Canvas whose items are to be searched. */ int objc, /* Number of entries in argv. Must be greater * than zero. */ |
︙ | |||
4685 4686 4687 4688 4689 4690 4691 | 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 | - - + - - - + - + - + - - + - + - + - - - + + - - + + - - + + | return TCL_ERROR; } FOR_EVERY_CANVAS_ITEM_MATCHING(objv[first+1], searchPtrPtr, return TCL_ERROR) { lastPtr = itemPtr; } if ((lastPtr != NULL) && (lastPtr->nextPtr != NULL)) { |
︙ | |||
4778 4779 4780 4781 4782 4783 4784 | 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 | + + + - + + | (itemPtr->state == TK_STATE_NULL && canvasPtr->canvas_state == TK_STATE_HIDDEN))) { itemPtr = itemPtr->nextPtr; } if (itemPtr == NULL) { return TCL_OK; } closestDist = (*itemPtr->typePtr->pointProc)((Tk_Canvas) canvasPtr, itemPtr, coords) - halo; if (closestDist < 0.0) { |
︙ | |||
4805 4806 4807 4808 4809 4810 4811 | 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 | - - + - + + + - + + | while (1) { itemPtr = itemPtr->nextPtr; if (itemPtr == NULL) { itemPtr = canvasPtr->firstItemPtr; } if (itemPtr == startPtr) { |
︙ | |||
4845 4846 4847 4848 4849 4850 4851 | 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 | - - - + + - - - - - | } return FindArea(interp, canvasPtr, objv+first+1, uid, 0); case CANV_WITHTAG: if (objc != first+2) { Tcl_WrongNumArgs(interp, first+1, objv, "tagOrId"); return TCL_ERROR; } |
︙ | |||
4886 4887 4888 4889 4890 4891 4892 | 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 | - + - - + - + - + - - - - + + + + - - + - - + + - - + + - | */ static int FindArea( Tcl_Interp *interp, /* Interpreter for error reporting and result * storing. */ TkCanvas *canvasPtr, /* Canvas whose items are to be searched. */ |
︙ | |||
4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 | 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 | + + + + + + + + + + + + + + | * The items identified by "tag" are moved so that they are all together * in the display list and immediately after prevPtr. The order of the * moved items relative to each other is not changed. * *-------------------------------------------------------------- */ #ifdef USE_OLD_TAG_SEARCH static void RelinkItems( TkCanvas *canvasPtr, /* Canvas to be modified. */ Tcl_Obj *tag, /* Tag identifying items to be moved in the * redisplay list. */ Tk_Item *prevPtr) /* Reposition the items so that they go just * after this item (NULL means put at * beginning of list). */ #else /* USE_OLD_TAG_SEARCH */ static int RelinkItems( TkCanvas *canvasPtr, /* Canvas to be modified. */ Tcl_Obj *tag, /* Tag identifying items to be moved in the * redisplay list. */ Tk_Item *prevPtr, /* Reposition the items so that they go just * after this item (NULL means put at * beginning of list). */ TagSearch **searchPtrPtr) /* From CanvasWidgetCmd local vars */ #endif /* USE_OLD_TAG_SEARCH */ { Tk_Item *itemPtr; #ifdef USE_OLD_TAG_SEARCH TagSearch search; #endif /* USE_OLD_TAG_SEARCH */ Tk_Item *firstMovePtr, *lastMovePtr; int result; /* * Find all of the items to be moved and remove them from the list, making * an auxiliary list running from firstMovePtr to lastMovePtr. Record * their areas for redisplay. |
︙ | |||
5018 5019 5020 5021 5022 5023 5024 | 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 | - + + + + + + + | itemPtr->prevPtr = NULL; firstMovePtr = itemPtr; } else { itemPtr->prevPtr = lastMovePtr; lastMovePtr->nextPtr = itemPtr; } lastMovePtr = itemPtr; |
︙ | |||
5075 5076 5077 5078 5079 5080 5081 | 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 | - + - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + | */ static void CanvasBindProc( ClientData clientData, /* Pointer to canvas structure. */ XEvent *eventPtr) /* Pointer to X event that just happened. */ { |
︙ | |||
5123 5124 5125 5126 5127 5128 5129 | 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 | - - - + + + - - + + - - - - - - + + + + + | canvasPtr->state = eventPtr->xbutton.state; CanvasDoEvent(canvasPtr, eventPtr); eventPtr->xbutton.state ^= mask; canvasPtr->state = eventPtr->xbutton.state; PickCurrentItem(canvasPtr, eventPtr); eventPtr->xbutton.state ^= mask; } |
︙ | |||
5172 5173 5174 5175 5176 5177 5178 | 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 | - + + + - + + | TkCanvas *canvasPtr, /* Canvas widget in which to select current * item. */ XEvent *eventPtr) /* Event describing location of mouse cursor. * Must be EnterWindow, LeaveWindow, * ButtonRelease, or MotionNotify. */ { double coords[2]; |
︙ | |||
5216 5217 5218 5219 5220 5221 5222 | 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 | - - + + - + | canvasPtr->pickEvent.xcrossing.time = eventPtr->xmotion.time; canvasPtr->pickEvent.xcrossing.x = eventPtr->xmotion.x; canvasPtr->pickEvent.xcrossing.y = eventPtr->xmotion.y; canvasPtr->pickEvent.xcrossing.x_root = eventPtr->xmotion.x_root; canvasPtr->pickEvent.xcrossing.y_root = eventPtr->xmotion.y_root; canvasPtr->pickEvent.xcrossing.mode = NotifyNormal; canvasPtr->pickEvent.xcrossing.detail = NotifyNonlinear; |
︙ | |||
5252 5253 5254 5255 5256 5257 5258 | 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 | - + | } else { canvasPtr->newCurrentPtr = NULL; } if ((canvasPtr->newCurrentPtr == canvasPtr->currentItemPtr) && !(canvasPtr->flags & LEFT_GRABBED_ITEM)) { /* |
︙ | |||
5295 5296 5297 5298 5299 5300 5301 | 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 | - + + + + + - - + - - + - - + + + + + + + + - - - - + + + + + + + | /* * The check below is needed because there could be an event handler * for <LeaveNotify> that deletes the current item. */ if ((itemPtr == canvasPtr->currentItemPtr) && !buttonDown) { |
︙ | |||
5385 5386 5387 5388 5389 5390 5391 | 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 | - + - - + - + - + | y1 = (int) (coords[1] - canvasPtr->closeEnough); x2 = (int) (coords[0] + canvasPtr->closeEnough); y2 = (int) (coords[1] + canvasPtr->closeEnough); bestPtr = NULL; for (itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL; itemPtr = itemPtr->nextPtr) { |
︙ | |||
5429 5430 5431 5432 5433 5434 5435 | 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 | - - + + + + + + + + + + + + + + | static void CanvasDoEvent( TkCanvas *canvasPtr, /* Canvas widget in which event occurred. */ XEvent *eventPtr) /* Real or simulated X event that is to be * processed. */ { #define NUM_STATIC 3 |
︙ | |||
5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 | 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 | + + - + + + + - - - + + + + - + + + - + | if (expr->match) { numExprs++; } expr = expr->next; } numObjects = itemPtr->numTags + numExprs + 2; #endif /* not USE_OLD_TAG_SEARCH */ if (numObjects <= NUM_STATIC) { objectPtr = staticObjects; } else { objectPtr = (ClientData *) ckalloc((unsigned) |
︙ | |||
5537 5538 5539 5540 5541 5542 5543 | 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 | - + - + + - + + + + - + + | *---------------------------------------------------------------------- */ static void CanvasBlinkProc( ClientData clientData) /* Pointer to record describing entry. */ { |
︙ | |||
5584 5585 5586 5587 5588 5589 5590 | 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 | - + + - + + + - + + - + | { Tcl_DeleteTimerHandler(canvasPtr->insertBlinkHandler); if (gotFocus) { canvasPtr->textInfo.gotFocus = 1; canvasPtr->textInfo.cursorOn = 1; if (canvasPtr->insertOffTime != 0) { canvasPtr->insertBlinkHandler = Tcl_CreateTimerHandler( |
︙ | |||
5622 5623 5624 5625 5626 5627 5628 | 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 | - + - + - + + - + - + - + - + | *---------------------------------------------------------------------- */ static void CanvasSelectTo( TkCanvas *canvasPtr, /* Information about widget. */ Tk_Item *itemPtr, /* Item that is to hold selection. */ |
︙ | |||
5683 5684 5685 5686 5687 5688 5689 | 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 | - + - + - + - + + + + + + + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
5721 5722 5723 5724 5725 5726 5727 | 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 | - + + + - + + | *---------------------------------------------------------------------- */ static void CanvasLostSelection( ClientData clientData) /* Information about entry widget. */ { |
︙ | |||
5840 5841 5842 5843 5844 5845 5846 | 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 | - - - + + - + - + - + - - - - - + - - + - + - + - - - - - + - - + - + - + - + | TkCanvas *canvasPtr) /* Information about canvas. */ { int result; Tcl_Interp *interp; int xOrigin, yOrigin, inset, width, height; int scrollX1, scrollX2, scrollY1, scrollY2; char *xScrollCmd, *yScrollCmd; |
︙ | |||
5968 5969 5970 5971 5972 5973 5974 | 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 | - - - - - + + + + + | } } /* * Adjust the origin if necessary to keep as much as possible of the * canvas in the view. The variables left, right, etc. keep track of how * much extra space there is on each side of the view before it will stick |
︙ | |||
6050 6051 6052 6053 6054 6055 6056 | 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 | + - + - + - - + + - - + | * Side effects: * Memory is allocated for the objv array, which must be freed using * ckfree() when no longer needed. * *---------------------------------------------------------------------- */ /* ARGSUSED */ |
︙ | |||
6097 6098 6099 6100 6101 6102 6103 | 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 | - + + | int Tk_CanvasPsColor( Tcl_Interp *interp, /* Interpreter for returning Postscript or * error message. */ Tk_Canvas canvas, /* Information about canvas. */ XColor *colorPtr) /* Information about color. */ { |
︙ | |||
6130 6131 6132 6133 6134 6135 6136 | 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 | - + | Tk_CanvasPsFont( Tcl_Interp *interp, /* Interpreter for returning Postscript or * error message. */ Tk_Canvas canvas, /* Information about canvas. */ Tk_Font tkfont) /* Information about font in which text is to * be printed. */ { |
︙ | |||
6163 6164 6165 6166 6167 6168 6169 | 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 | - - + + + | * error message. */ Tk_Canvas canvas, /* Information about canvas. */ Pixmap bitmap, /* Bitmap for which to generate Postscript. */ int startX, int startY, /* Coordinates of upper-left corner of * rectangular region to output. */ int width, int height) /* Size of rectangular region. */ { |
︙ | |||
6196 6197 6198 6199 6200 6201 6202 | 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 | - - + + | int Tk_CanvasPsStipple( Tcl_Interp *interp, /* Interpreter for returning Postscript or * error message. */ Tk_Canvas canvas, /* Information about canvas. */ Pixmap bitmap) /* Bitmap to use for stippling. */ { |
︙ | |||
6223 6224 6225 6226 6227 6228 6229 | 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 | - + | double Tk_CanvasPsY( Tk_Canvas canvas, /* Token for canvas on whose behalf Postscript * is being generated. */ double y) /* Y-coordinate in canvas coords. */ { |
︙ | |||
6253 6254 6255 6256 6257 6258 6259 | 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 | + - + | * interpreter's result field. */ Tk_Canvas canvas, /* Canvas on whose behalf Postscript is being * generated. */ double *coordPtr, /* Pointer to first in array of 2*numPoints * coordinates giving points for path. */ int numPoints) /* Number of points at *coordPtr. */ { Tk_PostscriptPath(interp, ((TkCanvas *) canvas)->psInfo, |
Changes to generic/tkCanvas.h.
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + | * of the previous current item. */ double closeEnough; /* The mouse is assumed to be inside an item * if it is this close to it. */ XEvent pickEvent; /* The event upon which the current choice of * currentItem is based. Must be saved so that * if the currentItem is deleted, can pick * another. */ |
︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - + | char *takeFocus; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal * scripts. Malloc'ed, but may be NULL. */ double pixelsPerMM; /* Scale factor between MM and pixels; used * when converting coordinates. */ int flags; /* Various flags; see below for * definitions. */ |
︙ | |||
287 288 289 290 291 292 293 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | - + - - - - - - | /* * Canvas-related functions that are shared among Tk modules but not exported * to the outside world: */ MODULE_SCOPE int TkCanvPostscriptCmd(TkCanvas *canvasPtr, |
Changes to generic/tkClipboard.c.
︙ | |||
15 16 17 18 19 20 21 | 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 | - - - - - - + + + + + + - + - + - + - + - + - - - + + + | #include "tkInt.h" #include "tkSelect.h" /* * Prototypes for functions used only in this file: */ |
︙ | |||
98 99 100 101 102 103 104 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + | cbPtr = cbPtr->nextPtr; if (cbPtr == NULL) { break; } srcPtr = cbPtr->buffer; length = cbPtr->length; } |
︙ | |||
122 123 124 125 126 127 128 | 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 | - + - + - + - - - + + + + - + - - + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
167 168 169 170 171 172 173 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | - + - - + + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
202 203 204 205 206 207 208 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + | *---------------------------------------------------------------------- */ static void ClipboardLostSel( ClientData clientData) /* Pointer to TkDisplay structure. */ { |
︙ | |||
264 265 266 267 268 269 270 | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + - + | for (targetPtr = dispPtr->clipTargetPtr; targetPtr != NULL; targetPtr = nextTargetPtr) { for (cbPtr = targetPtr->firstBufferPtr; cbPtr != NULL; cbPtr = nextCbPtr) { ckfree(cbPtr->buffer); nextCbPtr = cbPtr->nextPtr; |
︙ | |||
321 322 323 324 325 326 327 | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | - + | Tk_ClipboardAppend( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Window tkwin, /* Window that selects a display. */ Atom type, /* The desired conversion type for this * clipboard item, e.g. STRING or LENGTH. */ Atom format, /* Format in which the selection information * should be returned to the requestor. */ |
︙ | |||
355 356 357 358 359 360 361 | 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 | - + - + - - + + - - - + + - - + - + - + | for (targetPtr = dispPtr->clipTargetPtr; targetPtr != NULL; targetPtr = targetPtr->nextPtr) { if (targetPtr->type == type) { break; } } if (targetPtr == NULL) { |
︙ | |||
417 418 419 420 421 422 423 | 415 416 417 418 419 420 421 422 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 | - + - - + + - + - + - - - - + + + + - + - - + | */ int Tk_ClipboardObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
474 475 476 477 478 479 480 | 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 | - - + + - - + | /* * Increment i so that it points to the value for the flag instead * of the flag itself. */ i++; if (i >= objc) { |
︙ | |||
515 516 517 518 519 520 521 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - + | } else { format = XA_STRING; } return Tk_ClipboardAppend(interp, tkwin, target, format, Tcl_GetString(objv[i])); } case CLIPBOARD_CLEAR: { |
︙ | |||
543 544 545 546 547 548 549 | 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 | - + - - + + - - + + - - + | if (tkwin == NULL) { return TCL_ERROR; } return Tk_ClipboardClear(interp, tkwin); } case CLIPBOARD_GET: { Atom target; |
︙ | |||
633 634 635 636 637 638 639 | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | - - + + - - + + - | * Sets up the clipWindow and related data structures. * *---------------------------------------------------------------------- */ int TkClipInit( |
︙ | |||
673 674 675 676 677 678 679 | 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 | - + + - + + | /* * Create selection handlers for types TK_APPLICATION and TK_WINDOW on * this window. Can't use the default handlers for these types because * this isn't a full-fledged window. */ Tk_CreateSelHandler(dispPtr->clipWindow, dispPtr->clipboardAtom, |
︙ | |||
697 698 699 700 701 702 703 704 705 706 707 | 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 | + - + - + - + | * Side effects: * Bytes get appended to the dynamic string pointed to by the clientData * argument. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int ClipboardGetProc( ClientData clientData, /* Dynamic string holding partially assembled * selection. */ |
Changes to generic/tkCmds.c.
︙ | |||
10 11 12 13 14 15 16 | 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 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" |
︙ | |||
91 92 93 94 95 96 97 | 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 | - + - + - - - + + - - + - | int Tk_BellObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
159 160 161 162 163 164 165 | 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 | - + - + - + + - - + + | int Tk_BindObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
232 233 234 235 236 237 238 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - + | command = Tk_GetBinding(interp, winPtr->mainPtr->bindingTable, object, Tcl_GetString(objv[2])); if (command == NULL) { Tcl_ResetResult(interp); return TCL_OK; } |
︙ | |||
281 282 283 284 285 286 287 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | + - + - + | if (winPtr->numTags != 0) { /* * Make a copy of the tags for the window, replacing window names with * pointers to the pathName from the appropriate window. */ if (winPtr->numTags > MAX_OBJS) { objPtr = (ClientData *) ckalloc((unsigned) |
︙ | |||
315 316 317 318 319 320 321 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | - + | count = 3; } objPtr[count-1] = (ClientData) Tk_GetUid("all"); } Tk_BindEvent(winPtr->mainPtr->bindingTable, eventPtr, (Tk_Window) winPtr, count, objPtr); if (objPtr != objects) { |
︙ | |||
343 344 345 346 347 348 349 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 | - + - + - + - + - + - + - - + + + - + - + | int Tk_BindtagsObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
444 445 446 447 448 449 450 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | - + - + | TkFreeBindingTags( TkWindow *winPtr) /* Window whose tags are to be released. */ { int i; const char *p; for (i = 0; i < winPtr->numTags; i++) { |
︙ | |||
484 485 486 487 488 489 490 | 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | - + | Tk_DestroyObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window window; |
︙ | |||
523 524 525 526 527 528 529 530 531 532 533 534 535 536 | 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 | + - + - - - - + - - - + - - + | * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ /* ARGSUSED */ int Tk_LowerObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
582 583 584 585 586 587 588 589 590 591 592 593 594 595 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 | + - + - - - - + - - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + - - - + + + - - - + + + - - - - - - + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - + + + + + + - + - + - - - - + + + + - - - - - - - - - + - - - - - + + + + + - - - - - + + + + + + - - - + + + + + + - - - - - - - - - + + + + + + - - - - - - - - + + + + + + + + + + | * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ /* ARGSUSED */ int Tk_RaiseObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
978 979 980 981 982 983 984 985 986 987 988 989 990 991 | 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | + - + - - + - - - + + + - - - - - - - + + + - + - - - - - + - - + + - - - + - + - - - - - - + + - - - - - - + - - - - + + - - - - + + + + - + + - + + - + - + | * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ /* ARGSUSED */ int Tk_TkwaitObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
1163 1164 1165 1166 1167 1168 1169 1170 1171 | 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 | + - + - + - | * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ /* ARGSUSED */ int Tk_UpdateObjCmd( |
︙ | |||
1198 1199 1200 1201 1202 1203 1204 | 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 | - - - - - - + - - - - + - - - - - - - - - - - - - - - - + - - - - + | * possible that the entire application could be destroyed by an event * handler that occurs during the update. Thus, don't use any information * from tkwin after calling Tcl_DoOneEvent. */ while (1) { while (Tcl_DoOneEvent(flags) != 0) { |
︙ | |||
1268 1269 1270 1271 1272 1273 1274 | 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | - - + + - + + - + | int Tk_WinfoObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 | 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 | + + | WIN_ATOM, WIN_ATOMNAME, WIN_CONTAINING, WIN_INTERPS, WIN_PATHNAME, WIN_EXISTS, WIN_FPIXELS, WIN_PIXELS, WIN_RGB, WIN_VISUALSAVAILABLE }; tkwin = (Tk_Window) clientData; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0, &index) != TCL_OK) { return TCL_ERROR; |
︙ | |||
1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 | 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 | + - - + - + - - + - - + + - + - - - + + + + + + + - + + + + + + - + + - + - - + - + - - + | string = Tcl_GetString(objv[2]); tkwin = Tk_NameToWindow(interp, string, tkwin); if (tkwin == NULL) { return TCL_ERROR; } } winPtr = (TkWindow *) tkwin; resultPtr = Tcl_GetObjResult(interp); switch ((enum options) index) { case WIN_CELLS: |
︙ | |||
1425 1426 1427 1428 1429 1430 1431 | 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 | - + - + - - + - + - + - + - + - + - + - - - + + + + + + - - + - - + - - + - - + - - + - - + - + - + - + - + - + - + - - - + + + + + + + - + - + - + - + - + - + - + - - + - + - + - - + + + - - - + | if (winPtr == NULL) { x = -1; y = -1; } else { TkGetPointerCoords((Tk_Window) winPtr, &x, &y); } if (useX & useY) { |
︙ | |||
1612 1613 1614 1615 1616 1617 1618 | 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 | - + | } string = Tcl_GetString(objv[3]); if (Tk_GetPixels(interp, tkwin, string, &y) != TCL_OK) { return TCL_ERROR; } tkwin = Tk_CoordsToWindow(x, y, tkwin); if (tkwin != NULL) { |
︙ | |||
1640 1641 1642 1643 1644 1645 1646 | 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 | - + - - + + - - - + + - + + - + + - + + - + + - + + + - + + - - - - - - - - - - - - + - - - - + - - - + + + - + - + + - + + - + - + - - + + - - - + - - + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Tcl_WrongNumArgs(interp, 2, objv, "?-displayof window? id"); return TCL_ERROR; } string = Tcl_GetString(objv[2 + skip]); if (TkpScanWindowId(interp, string, &id) != TCL_OK) { return TCL_ERROR; } |
︙ | |||
1852 1853 1854 1855 1856 1857 1858 | 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 | - - + + - + - + - - + + - - + + - + - + - - + + - - + + - | Tk_Window *tkwinPtr) /* On input, contains main window of * application associated with interp. On * output, filled with window specified as * option to "-displayof" argument, or * unmodified if "-displayof" argument was not * present. */ { |
︙ |
Changes to generic/tkColor.c.
︙ | |||
27 28 29 30 31 32 33 | 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 | - + - - + | Display *display; /* Display for colormap. */ } ValueKey; /* * The structure below is used to allocate thread-local data. */ |
︙ | |||
108 109 110 111 112 113 114 | 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 | - + - + - + - + - + | if (tkColPtr != NULL) { if (tkColPtr->resourceRefCount == 0) { /* * This is a stale reference: it refers to a TkColor that's no * longer in use. Clear the reference. */ |
︙ | |||
199 200 201 202 203 204 205 | 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 | - + - - - + + - - - + + | /* * First, check to see if there's already a mapping for this color name. */ nameHashPtr = Tcl_CreateHashEntry(&dispPtr->colorNameTable, name, &isNew); if (!isNew) { |
︙ | |||
310 311 312 313 314 315 316 | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | - + | valueKey.green = colorPtr->green; valueKey.blue = colorPtr->blue; valueKey.colormap = Tk_Colormap(tkwin); valueKey.display = display; valueHashPtr = Tcl_CreateHashEntry(&dispPtr->colorValueTable, (char *) &valueKey, &isNew); if (!isNew) { |
︙ | |||
355 356 357 358 359 360 361 | 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 | - + - + - - - - - - - - - - - - - - - - - - - | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
476 477 478 479 480 481 482 | 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 | + - + - + - + | * Tk_GetColor. */ if (tkColPtr->magic != COLOR_MAGIC) { Tcl_Panic("Tk_FreeColor called with bogus color"); } tkColPtr->resourceRefCount--; |
︙ | |||
545 546 547 548 549 550 551 | 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 | - + - + - - - - - - - - - + + - + - + | void Tk_FreeColorFromObj( Tk_Window tkwin, /* The window this color lives in. Needed for * the screen and colormap values. */ Tcl_Obj *objPtr) /* The Tcl_Obj * to be freed. */ { Tk_FreeColor(Tk_GetColorFromObj(tkwin, objPtr)); |
︙ | |||
613 614 615 616 617 618 619 | 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | - + - + | */ static void DupColorObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { |
︙ | |||
663 664 665 666 667 668 669 | 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | - + | /* * First check to see if the internal representation of the object is * defined and is a color that is valid for the current screen and color * map. If it is, we are done. */ |
︙ | |||
689 690 691 692 693 694 695 | 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | - + - - + + | */ hashPtr = Tcl_FindHashEntry(&dispPtr->colorNameTable, Tcl_GetString(objPtr)); if (hashPtr == NULL) { goto error; } |
︙ | |||
739 740 741 742 743 744 745 | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | - + | /* * Free the old internalRep before setting the new one. */ Tcl_GetString(objPtr); typePtr = objPtr->typePtr; if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { |
︙ | |||
796 797 798 799 800 801 802 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 | - + - + - + - + - + - + - + - + - + | *---------------------------------------------------------------------- */ Tcl_Obj * TkDebugColor( Tk_Window tkwin, /* The window in which the color will be used * (not currently used). */ |
︙ | |||
907 908 909 910 911 912 913 | 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 | - - - - - - - - - - - - - + + + + + + + - + - + | /* Not exactly 12 hex digits, so invalid */ return 0; } else { name -= 13; } goto done; } else if (((*name - 'A') & 0xdf) < sizeof(tkWebColors)/sizeof(tkWebColors[0])) { |
Changes to generic/tkColor.h.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + + + + + + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TKCOLOR #define _TKCOLOR |
︙ | |||
34 35 36 37 38 39 40 | 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 | - + - + | * color and all other fields defaulted. May * be NULL. */ Screen *screen; /* Screen where this color is valid. Used to * delete it, and to find its display. */ Colormap colormap; /* Colormap from which this entry was * allocated. */ Visual *visual; /* Visual associated with colormap. */ |
︙ | |||
68 69 70 71 72 73 74 75 | 73 74 75 76 77 78 79 80 81 82 83 | + + + | #ifndef TkpFreeColor MODULE_SCOPE void TkpFreeColor(TkColor *tkColPtr); #endif MODULE_SCOPE TkColor * TkpGetColor(Tk_Window tkwin, Tk_Uid name); MODULE_SCOPE TkColor * TkpGetColorByValue(Tk_Window tkwin, XColor *colorPtr); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT #endif /* _TKCOLOR */ |
Changes to generic/tkConfig.c.
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - + + - - - - - - + | #define __NO_OLD_CONFIG #endif #include "tkInt.h" #include "tkFont.h" /* |
︙ | |||
63 64 65 66 67 68 69 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - - + + | Tcl_Obj *defaultPtr; /* Default value for this option. */ union { Tcl_Obj *monoColorPtr; /* For color and border options, this is an * alternate default value to use on * monochrome displays. */ struct TkOption *synonymPtr; /* For synonym options, this points to the |
︙ | |||
87 88 89 90 91 92 93 | 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 | - + - + - + + + - - + + - + - + - - + - - + + - + | /* * One of the following exists for each Tk_OptionSpec array that has been * passed to Tk_CreateOptionTable. */ typedef struct OptionTable { |
︙ | |||
168 169 170 171 172 173 174 175 176 177 178 179 | 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 | + - + - - - - - - + + + + + + + + - - - + + + + + - + - + + - + - - + + | Tk_CreateOptionTable( Tcl_Interp *interp, /* Interpreter associated with the application * in which this table will be used. */ const Tk_OptionSpec *templatePtr) /* Static information about the configuration * options. */ { Tcl_HashTable *hashTablePtr; Tcl_HashEntry *hashEntryPtr; int newEntry; OptionTable *tablePtr; const Tk_OptionSpec *specPtr, *specPtr2; Option *optionPtr; |
︙ | |||
262 263 264 265 266 267 268 | 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 | - + - - + + - + - - + + | optionPtr->defaultPtr = Tcl_NewStringObj(specPtr->defValue,-1); Tcl_IncrRefCount(optionPtr->defaultPtr); } if (((specPtr->type == TK_OPTION_COLOR) || (specPtr->type == TK_OPTION_BORDER)) && (specPtr->clientData != NULL)) { optionPtr->extra.monoColorPtr = |
︙ | |||
326 327 328 329 330 331 332 | 328 329 330 331 332 333 334 335 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 416 417 418 | - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | void Tk_DeleteOptionTable( Tk_OptionTable optionTable) /* The option table to delete. */ { OptionTable *tablePtr = (OptionTable *) optionTable; Option *optionPtr; |
︙ | |||
377 378 379 380 381 382 383 | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + | *-------------------------------------------------------------- */ int Tk_InitOptions( Tcl_Interp *interp, /* Interpreter for error reporting. NULL means * don't leave an error message. */ |
︙ | |||
548 549 550 551 552 553 554 | 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 | - + - + - + - - + + - - + + | */ static int DoObjConfig( Tcl_Interp *interp, /* Interpreter for error reporting. If NULL, * then no message is left if an error * occurs. */ |
︙ | |||
650 651 652 653 654 655 656 | 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | - + - - + - - + + - - - - - - - - - + + + + + - | if (internalPtr != NULL) { *((double *) oldInternalPtr) = *((double *) internalPtr); *((double *) internalPtr) = newDbl; } break; } case TK_OPTION_STRING: { |
︙ | |||
876 877 878 879 880 881 882 | 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 | - + - + + + + - - - - + + + + | if (internalPtr != NULL) { *((Tk_Window *) oldInternalPtr) = *((Tk_Window *) internalPtr); *((Tk_Window *) internalPtr) = newWin; } break; } case TK_OPTION_CUSTOM: { |
︙ | |||
937 938 939 940 941 942 943 944 945 946 | 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | + + - - + + + - + | *---------------------------------------------------------------------- */ static int ObjectIsEmpty( Tcl_Obj *objPtr) /* Object to test. May be NULL. */ { int length; if (objPtr == NULL) { return 1; } |
︙ | |||
975 976 977 978 979 980 981 | 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 | - + | const char *name, /* String balue to be looked up in the option * table. */ OptionTable *tablePtr) /* Table in which to look up name. */ { Option *bestPtr, *optionPtr; OptionTable *tablePtr2; const char *p1, *p2; |
︙ | |||
1061 1062 1063 1064 1065 1066 1067 | 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 | - + - + | Tcl_Interp *interp, /* Used only for error reporting; if NULL no * message is left after an error. */ Tcl_Obj *objPtr, /* Object whose string value is to be looked * up in the option table. */ OptionTable *tablePtr) /* Table in which to look up objPtr. */ { Option *bestPtr; |
︙ | |||
1089 1090 1091 1092 1093 1094 1095 | 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 | - + - - - + - | if ((objPtr->typePtr != NULL) && (objPtr->typePtr->freeIntRepProc != NULL)) { objPtr->typePtr->freeIntRepProc(objPtr); } objPtr->internalRep.twoPtrValue.ptr1 = (void *) tablePtr; objPtr->internalRep.twoPtrValue.ptr2 = (void *) bestPtr; |
︙ | |||
1142 1143 1144 1145 1146 1147 1148 | 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 | - + - - - + + + + - + + - - - + - - - + + + + - - - + + - - - - - + - - - - - - - - - - - + - - - - - - - - - | } return optionPtr->specPtr; } /* *---------------------------------------------------------------------- * |
︙ | |||
1223 1224 1225 1226 1227 1228 1229 | 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 | - + | *-------------------------------------------------------------- */ int Tk_SetOptions( Tcl_Interp *interp, /* Interpreter for error reporting. If NULL, * then no error message is returned.*/ |
︙ | |||
1270 1271 1272 1273 1274 1275 1276 | 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 | - + - - - + + - + + - - - + + + + | } if (optionPtr->specPtr->type == TK_OPTION_SYNONYM) { optionPtr = optionPtr->extra.synonymPtr; } if (objc < 2) { if (interp != NULL) { |
︙ | |||
1341 1342 1343 1344 1345 1346 1347 | 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 | - + - + - + - + - - + + - - + + - - + + - - + + - + + | */ void Tk_RestoreSavedOptions( Tk_SavedOptions *savePtr) /* Holds saved option information; must have * been passed to Tk_SetOptions. */ { |
︙ | |||
1448 1449 1450 1451 1452 1453 1454 | 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 | - + - + | case TK_OPTION_PIXELS: *((int *) internalPtr) = *((int *) ptr); break; case TK_OPTION_WINDOW: *((Tk_Window *) internalPtr) = *((Tk_Window *) ptr); break; case TK_OPTION_CUSTOM: { |
︙ | |||
1486 1487 1488 1489 1490 1491 1492 | 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 | - + - + - - + + + | */ void Tk_FreeSavedOptions( Tk_SavedOptions *savePtr) /* Contains options saved in a previous call * to Tk_SetOptions. */ { |
︙ | |||
1522 1523 1524 1525 1526 1527 1528 1529 1530 | 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 | + - + - + - + - - + + - - + + | * Side effects: * All of the Tcl_Obj's in recordPtr that are controlled by configuration * options in optionTable are freed. * *---------------------------------------------------------------------- */ /* ARGSUSED */ void Tk_FreeConfigOptions( |
︙ | |||
1590 1591 1592 1593 1594 1595 1596 | 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 | - + - + - + | */ static void FreeResources( Option *optionPtr, /* Description of the configuration option. */ Tcl_Obj *objPtr, /* The current value of the option, specified * as an object. */ |
︙ | |||
1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 | 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 | + + | Tk_FreeFontFromObj(tkwin, objPtr); } break; case TK_OPTION_STYLE: if (internalFormExists) { Tk_FreeStyle(*((Tk_Style *) internalPtr)); *((Tk_Style *) internalPtr) = NULL; } else if (objPtr != NULL) { Tk_FreeStyleFromObj(objPtr); } break; case TK_OPTION_BITMAP: if (internalFormExists) { if (*((Pixmap *) internalPtr) != None) { Tk_FreeBitmap(Tk_Display(tkwin), *((Pixmap *) internalPtr)); *((Pixmap *) internalPtr) = None; |
︙ | |||
1669 1670 1671 1672 1673 1674 1675 | 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 | - + - + + | *((Tk_Cursor *) internalPtr) = NULL; } } else if (objPtr != NULL) { Tk_FreeCursorFromObj(tkwin, objPtr); } break; case TK_OPTION_CUSTOM: { |
︙ | |||
1710 1711 1712 1713 1714 1715 1716 | 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 | - + - + | *-------------------------------------------------------------- */ Tcl_Obj * Tk_GetOptionInfo( Tcl_Interp *interp, /* Interpreter for error reporting. If NULL, * then no error message is created. */ |
︙ | |||
1778 1779 1780 1781 1782 1783 1784 | 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 | - + | * Memory is allocated. * *-------------------------------------------------------------- */ static Tcl_Obj * GetConfigList( |
︙ | |||
1821 1822 1823 1824 1825 1826 1827 | 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 | - - + + | } else if (optionPtr->defaultPtr != NULL) { elementPtr = optionPtr->defaultPtr; } else { elementPtr = Tcl_NewObj(); } Tcl_ListObjAppendElement(NULL, listPtr, elementPtr); |
︙ | |||
1856 1857 1858 1859 1860 1861 1862 | 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 | - + - + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - + + - - - - - + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - | * None. * *---------------------------------------------------------------------- */ static Tcl_Obj * GetObjectForOption( |
︙ | |||
1998 1999 2000 2001 2002 2003 2004 | 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 | - + - - + + | */ Tcl_Obj * Tk_GetOptionValue( Tcl_Interp *interp, /* Interpreter for error reporting. If NULL * then no messages are provided for * errors. */ |
︙ | |||
2058 2059 2060 2061 2062 2063 2064 | 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 | - + + - - + + - + - + - + - + | * None. * *---------------------------------------------------------------------- */ Tcl_Obj * TkDebugConfig( |
︙ |
Changes to generic/tkConsole.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 | - + - + - - - - - + + + + - - - + + + - + - + - - + + - + - + | /* * tkConsole.c -- * * This file implements a Tcl console for systems that may not otherwise * have access to a console. It uses the Text widget and provides special * access via a console command. * * 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. */ |
︙ | |||
163 164 165 166 167 168 169 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - + | /* * If the file is a character device, we need to try to figure out whether * it is a serial port, a console, or something else. We test for the * console case first because this is more common. */ if (fileType == FILE_TYPE_CHAR) { |
︙ | |||
220 221 222 223 224 225 226 | 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 329 330 | - + - + - - + - - - - + + - - - + + - + - - + - - - + + + + + + - + - - + - - - + + + + + + - + - - + - - - + + + + + + - + | ConsoleInfo *info; Tcl_Channel consoleChannel; /* * Ensure that we are getting a compatible version of Tcl. */ |
︙ | |||
341 342 343 344 345 346 347 | 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 416 417 418 419 420 421 422 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 | - - - - - + - - + - - - + - - + - - - + - + - + - + - + - + + - - + + - + - + - + - + - - - + + + - + | Tcl_Command token; int result = TCL_OK; int haveConsoleChannel = 1; /* Init an interp with Tcl and Tk */ Tcl_Interp *consoleInterp = Tcl_CreateInterp(); if (Tcl_Init(consoleInterp) != TCL_OK) { |
︙ | |||
490 491 492 493 494 495 496 | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | - + | * *---------------------------------------------------------------------- */ static int ConsoleOutput( ClientData instanceData, /* Indicates which device to use. */ |
︙ | |||
513 514 515 516 517 518 519 | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | - + | /* * Not checking for utf8 == NULL. Did not check for TCL_ERROR * from Tcl_SetChannelOption() in Tk_InitConsoleChannels() either. * Assumption is utf-8 Tcl_Encoding is reliably present. */ |
︙ | |||
555 556 557 558 559 560 561 562 563 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | + - - - + + + - + - + + - - + + - + - - + - - - + - + - - - - - - - - - - - - + - - + + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int ConsoleInput( |
︙ | |||
659 660 661 662 663 664 665 666 667 | 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 | + - - + + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int ConsoleHandle( |
︙ | |||
692 693 694 695 696 697 698 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | - + - - + - + - - + + | */ static int ConsoleObjCmd( ClientData clientData, /* Access to the console interp */ Tcl_Interp *interp, /* Current interpreter */ int objc, /* Number of arguments */ |
︙ | |||
743 744 745 746 747 748 749 | 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | - - - + - + - - + - | return TCL_ERROR; } cmd = Tcl_NewStringObj("wm title .", -1); if (objc == 3) { Tcl_ListObjAppendElement(NULL, cmd, objv[2]); } break; |
︙ | |||
784 785 786 787 788 789 790 | 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 | - + - + - + - - + + - + - - - + - - - - - - + + + - - + - - + + - - - + + - + - + + - - + + | */ static int InterpreterObjCmd( ClientData clientData, /* */ Tcl_Interp *interp, /* Current interpreter */ int objc, /* Number of arguments */ |
︙ | |||
916 917 918 919 920 921 922 | 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 | - + - - + + - + - + - - + + | *---------------------------------------------------------------------- */ static void ConsoleDeleteProc( ClientData clientData) { |
Changes to generic/tkCursor.c.
︙ | |||
19 20 21 22 23 24 25 | 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 | - - + + - - - + + - + | * structure is indexed with two hash tables defined below. One of the tables * is cursorIdTable, and the other is either cursorNameTable or * cursorDataTable, each of which are stored in the TkDisplay structure for * the current thread. */ typedef struct { |
︙ | |||
96 97 98 99 100 101 102 | 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 | - + - + - - - + + + - + - + | * obj's string rep. */ { TkCursor *cursorPtr; if (objPtr->typePtr != &tkCursorObjType) { InitCursorObj(objPtr); } |
︙ | |||
184 185 186 187 188 189 190 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - | Tk_GetCursor( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which cursor will be used. */ Tk_Uid string) /* Description of cursor. See manual entry for * details on legal syntax. */ { TkCursor *cursorPtr = TkcGetCursor(interp, tkwin, string); |
︙ | |||
221 222 223 224 225 226 227 | 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 | - + - + - + - + | *---------------------------------------------------------------------- */ static TkCursor * TkcGetCursor( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which cursor will be used. */ |
︙ | |||
269 270 271 272 273 274 275 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - + | cursorPtr->display = Tk_Display(tkwin); cursorPtr->resourceRefCount = 1; cursorPtr->objRefCount = 0; cursorPtr->otherTable = &dispPtr->cursorNameTable; cursorPtr->hashPtr = nameHashPtr; cursorPtr->nextPtr = existingCursorPtr; cursorPtr->idHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorIdTable, |
︙ | |||
307 308 309 310 311 312 313 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 | - - + + - + - + - + - - + - - - + - - + | *---------------------------------------------------------------------- */ Tk_Cursor Tk_GetCursorFromData( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which cursor will be used. */ |
︙ | |||
407 408 409 410 411 412 413 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | - + - + - + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
459 460 461 462 463 464 465 | 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 | + - + - + - + | static void FreeCursor( TkCursor *cursorPtr) /* Cursor to be released. */ { TkCursor *prevPtr; cursorPtr->resourceRefCount--; |
︙ | |||
513 514 515 516 517 518 519 | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | - + - + | Tcl_HashEntry *idHashPtr; TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->cursorInit) { Tcl_Panic("Tk_FreeCursor called before Tk_GetCursor"); } |
︙ | |||
548 549 550 551 552 553 554 | 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 | - + - + - - - - - - - - - + + - + - + | void Tk_FreeCursorFromObj( Tk_Window tkwin, /* The window this cursor lives in. Needed for * the display value. */ Tcl_Obj *objPtr) /* The Tcl_Obj * to be freed. */ { FreeCursor(GetCursorFromObj(tkwin, objPtr)); |
︙ | |||
616 617 618 619 620 621 622 | 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | - + - + | */ static void DupCursorObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { |
︙ | |||
701 702 703 704 705 706 707 | 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 | - + - + - - + + | /* * The internal representation is a cache of the last cursor used with the * given name. But there can be lots different cursors for each cursor * name; one cursor for each display. Check to see if the cursor we have * cached is the one that is needed. */ |
︙ | |||
765 766 767 768 769 770 771 | 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | - + | /* * Free the old internalRep before setting the new one. */ Tcl_GetString(objPtr); typePtr = objPtr->typePtr; if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { |
︙ | |||
838 839 840 841 842 843 844 | 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | - + - + - + - + | *---------------------------------------------------------------------- */ Tcl_Obj * TkDebugCursor( Tk_Window tkwin, /* The window in which the cursor will be used * (not currently used). */ |
Deleted generic/tkDList.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tkDecls.h.
︙ | |||
13 14 15 16 17 18 19 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 | - - - - - - - - + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + + + + - + + + + + + + - - + + + + + - - + + + + + - - + + + + + + + + - + + + + + + + - - + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + - + + + + - - + + + + + - - + + + + + + + + + + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + - - + + + + + + + + + + + + + + + + - + + + + - + + + + - + - + + + + - + + + + - + + + + - + + + + + + + + + + - + + + + + + + - - + + + + + - + + + + + + + + + + + + + - + + + + - + - - + + + + + + + - + + + + - + + + + + + + - - + + + + + - + + + + + + + - + + + + + + + - + + + + - + + + + + + + - + + + + - + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + - - + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + + + + - - + + + + + - - + + + + - - + + + + + + + + + + - - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + - + + + + - + + + + + + + + + + - + - + + + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + - - + + + + - - + + + + + + + - + + + + - + + + + + + + - + + + + - + + + + - + + + + + + + - + + + + + + + + + + + + + + + + - + + + + - + + + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - - + + + - - + - - + - - - - + - - + - - - - + + + + + + - - - - - + + + + + - + - + - + - - + + - + - - - + + + - + - + - + - + - - - + + + - + - + - + - + - + - + - + - - - - - - + + + + + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + - + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - + - - - - + + + + - - + + - - + + - - + + - - - + + + - + - - - - + + + + - - - - - - - - + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + - - - - - - - - - + - - + - - + - - - - - - - - + + + - - - - - - + - - - - + - - - - - - - - - + + + + | #define _TKDECLS #ifdef BUILD_tk #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT #endif |
Changes to generic/tkEntry.c.
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + | * Copyright (c) 2002 ActiveState Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" |
︙ | |||
59 60 61 62 63 64 65 | 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 | - - + + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - + - - + + - + - - + + - + - + - + - + - + - + - - - - - - - - + + - + - - + + - - - + + + - - + + - + - - + + - + - + - - + + - + - + - + - + - + | /* * Information used for Entry objv parsing. */ static const Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", |
︙ | |||
182 183 184 185 186 187 188 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - - + + - - + + - + - + - - - - - - + + + + + + - - - - + + + + - + - + - - + + - - + + - - + + - + - + - + - + - + - + - + - - + + - + - + - - + + - + - + - + - + - + - + - - - - - - - + - - + + - + - + - - + + - - - + + + - - + + - - + + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - - + + - + - - + + - + - - + - + - + - - + | #define DEF_SPINBOX_FORMAT "" #define DEF_SPINBOX_VALUES "" #define DEF_SPINBOX_WRAP "0" static const Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Background", |
︙ | |||
516 517 518 519 520 521 522 | 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 | - + - - + + - + - - + + - - - + - + - + - + - + - + | /* * Initialize the fields of the structure that won't be initialized by * ConfigureEntry, or that ConfigureEntry requires to be initialized * already (e.g. resource pointers). Only the non-NULL/0 data must be * initialized as memset covers the rest. */ |
︙ | |||
599 600 601 602 603 604 605 | 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | - + - + - - + + - + - - + - + - + - + - - + + - - - + - + - - + + + - + - - + + + - + - - + - + - + - + - + - + - + - + - + - - + - + - - + + - - - + - + | static int EntryWidgetObjCmd( ClientData clientData, /* Information about entry widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
825 826 827 828 829 830 831 | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 | - + - - + + - + - + - - - + + + - + - + - + - + - - - + + + - + - - + - + | switch (selIndex) { case SELECTION_ADJUST: if (objc != 4) { Tcl_WrongNumArgs(interp, 3, objv, "index"); goto error; } if (GetEntryIndex(interp, entryPtr, |
︙ | |||
939 940 941 942 943 944 945 | 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 | - + - + - + - - - + + + + - + | selIndex = entryPtr->validate; entryPtr->validate = VALIDATE_ALL; code = EntryValidateChange(entryPtr, NULL, entryPtr->string, -1, VALIDATE_FORCED); if (entryPtr->validate != VALIDATE_NONE) { entryPtr->validate = selIndex; } |
︙ | |||
988 989 990 991 992 993 994 | 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 | - + - + - + - + | break; } case TK_SCROLL_UNITS: index += count; break; } } |
︙ | |||
1031 1032 1033 1034 1035 1036 1037 | 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 | - + - + - - - + + + | * Everything associated with the entry is freed up. * *---------------------------------------------------------------------- */ static void DestroyEntry( |
︙ | |||
1071 1072 1073 1074 1075 1076 1077 | 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | - + - + | if (sbPtr->formatBuf) { ckfree(sbPtr->formatBuf); } } Tk_FreeTextLayout(entryPtr->textLayout); Tk_FreeConfigOptions((char *) entryPtr, entryPtr->optionTable, entryPtr->tkwin); |
︙ | |||
1111 1112 1113 1114 1115 1116 1117 | 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 | - - + + - - - - + + + + - + - + - + - - - - + + + + - + | { Tk_SavedOptions savedOptions; Tk_3DBorder border; Tcl_Obj *errorResult = NULL; Spinbox *sbPtr = (Spinbox *) entryPtr; /* Only used when this widget is of type * TK_SPINBOX */ |
︙ | |||
1191 1192 1193 1194 1195 1196 1197 | 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 | - - + + - - + - - + - - - + - + - - - + + - - - + | } if (entryPtr->insertBorderWidth > entryPtr->insertWidth/2) { entryPtr->insertBorderWidth = entryPtr->insertWidth/2; } if (entryPtr->type == TK_SPINBOX) { if (sbPtr->fromValue > sbPtr->toValue) { |
︙ | |||
1259 1260 1261 1262 1263 1264 1265 | 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 | - + | Tcl_DecrRefCount(sbPtr->listObj); } sbPtr->listObj = NULL; if (sbPtr->valueStr != NULL) { Tcl_Obj *newObjPtr; int nelems; |
︙ | |||
1293 1294 1295 1296 1297 1298 1299 | 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 | - - + - + | } /* * Claim the selection if we've suddenly started exporting it. */ if (entryPtr->exportSelection && (!oldExport) |
︙ | |||
1327 1328 1329 1330 1331 1332 1333 | 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 | - + | * If the entry is tied to the value of a variable, create the variable if * it doesn't exist, and set the entry's value from the variable's value. */ if (entryPtr->textVarName != NULL) { const char *value; |
︙ | |||
1381 1382 1383 1384 1385 1386 1387 | 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 | + - - - - + + + + + - - - + + + - + | */ double dvalue; if (sscanf(entryPtr->string, "%lf", &dvalue) <= 0) { /* Scan failure */ dvalue = sbPtr->fromValue; } else { |
︙ | |||
1450 1451 1452 1453 1454 1455 1456 | 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 | - + | ClientData instanceData) /* Information about widget. */ { XGCValues gcValues; GC gc = NULL; unsigned long mask; Tk_3DBorder border; XColor *colorPtr; |
︙ | |||
1474 1475 1476 1477 1478 1479 1480 | 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 | - - + + | /* * Default background and foreground are from the normal state. In a * disabled state, both of those may be overridden; in the readonly state, * the background may be overridden. */ |
︙ | |||
1503 1504 1505 1506 1507 1508 1509 | 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 | - - - - - - - - - - - - | mask = GCForeground | GCFont | GCGraphicsExposures; gc = Tk_GetGC(entryPtr->tkwin, mask, &gcValues); if (entryPtr->textGC != NULL) { Tk_FreeGC(entryPtr->display, entryPtr->textGC); } entryPtr->textGC = gc; |
︙ | |||
1541 1542 1543 1544 1545 1546 1547 | 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 | - - - + + + + + - + - + - - - - - - - + + + + + - + - + - - - | #ifndef MAC_OSX_TK /* *-------------------------------------------------------------- * * TkpDrawEntryBorderAndFocus -- * |
︙ | |||
1617 1618 1619 1620 1621 1622 1623 | 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 | - + | *-------------------------------------------------------------- */ static void DisplayEntry( ClientData clientData) /* Information about window. */ { |
︙ | |||
1644 1645 1646 1647 1648 1649 1650 | 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 | - + - + - + | entryPtr->flags &= ~UPDATE_SCROLLBAR; /* * Preserve/Release because updating the scrollbar can have the * side-effect of destroying or unmapping the entry widget. */ |
︙ | |||
1680 1681 1682 1683 1684 1685 1686 | 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 | - + | xBound = Tk_Width(tkwin) - entryPtr->inset - entryPtr->xWidth; baseY = (Tk_Height(tkwin) + fm.ascent - fm.descent) / 2; /* * Hide the selection whenever we don't have the focus, unless we * always want to show selection. */ |
︙ | |||
1705 1706 1707 1708 1709 1710 1711 | 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 | - + - + | } else { border = entryPtr->normalBorder; } Tk_Fill3DRectangle(tkwin, pixmap, border, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT); if (showSelection && (entryPtr->state != STATE_DISABLED) |
︙ | |||
1748 1749 1750 1751 1752 1753 1754 | 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 | - + - - - - - + + + + - - - + + + - - - - - + + + - - - - - - + - - - - - + + + + + - - - - - - - - + + + - - - - - - - - - - - - - - - | if ((entryPtr->state == STATE_NORMAL) && (entryPtr->flags & GOT_FOCUS)) { Tk_CharBbox(entryPtr->textLayout, entryPtr->insertPos, &cursorX, NULL, NULL, NULL); cursorX += entryPtr->layoutX; cursorX -= (entryPtr->insertWidth == 1) ? 1 : (entryPtr->insertWidth)/2; Tk_SetCaretPos(entryPtr->tkwin, cursorX, baseY - fm.ascent, fm.ascent + fm.descent); |
︙ | |||
1968 1969 1970 1971 1972 1973 1974 | 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 | - + - - - + + - - + + - + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | *---------------------------------------------------------------------- */ static void EntryComputeGeometry( Entry *entryPtr) /* Widget record for entry. */ { |
︙ | |||
2105 2106 2107 2108 2109 2110 2111 | 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 | - + + - - - - + + + + + | maxOffScreen = Tk_PointToChar(entryPtr->textLayout, overflow, 0); Tk_CharBbox(entryPtr->textLayout, maxOffScreen, &rightX, NULL, NULL, NULL); if (rightX < overflow) { maxOffScreen++; } |
︙ | |||
2153 2154 2155 2156 2157 2158 2159 | 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 | - + - + + - + + - + | * *---------------------------------------------------------------------- */ static int InsertChars( Entry *entryPtr, /* Entry that is to get the new elements. */ |
︙ | |||
2196 2197 2198 2199 2200 2201 2202 | 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 | - + - + - + - + - + - + | * result in actually forming valid UTF-8 sequences; the number of * characters added may not be Tcl_NumUtfChars(string, -1), because of * context. The actual number of characters added is how many characters * are in the string now minus the number that used to be there. */ oldChars = entryPtr->numChars; |
︙ | |||
2252 2253 2254 2255 2256 2257 2258 | 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 | - - + + - + - + - + - + | * *---------------------------------------------------------------------- */ static int DeleteChars( Entry *entryPtr, /* Entry widget to modify. */ |
︙ | |||
2305 2306 2307 2308 2309 2310 2311 | 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 | - - + + - - + + - - - + + + - - + + - - + + - - + + | /* * Deleting characters results in the remaining characters being * renumbered. Update the various indexes into the string to reflect this * change. */ |
︙ | |||
2379 2380 2381 2382 2383 2384 2385 | 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 | - - + + | if (newValue != NULL) { EntrySetValue(entryPtr, newValue); } if (entryPtr->textVarName == NULL) { newValue = NULL; } else { |
︙ | |||
2461 2462 2463 2464 2465 2466 2467 | 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 | - + | } else { /* * If we validate, we create a copy of the value, as it may point to * volatile memory, like the value of the -textvar which may get freed * during validation */ |
︙ | |||
2490 2491 2492 2493 2494 2495 2496 | 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 | - + - - - - - + + + + + - - + + - + | oldSource = entryPtr->string; ckfree((char *)entryPtr->string); if (malloced) { entryPtr->string = value; } else { |
︙ | |||
2550 2551 2552 2553 2554 2555 2556 | 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 | - + - + | */ static void EntryEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
2590 2591 2592 2593 2594 2595 2596 | 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 | - + - + - + | case DestroyNotify: if (!(entryPtr->flags & ENTRY_DELETED)) { entryPtr->flags |= (ENTRY_DELETED | VALIDATE_ABORT); Tcl_DeleteCommandFromToken(entryPtr->interp, entryPtr->widgetCmd); if (entryPtr->flags & REDRAW_PENDING) { Tcl_CancelIdleCall(DisplayEntry, clientData); } |
︙ | |||
2631 2632 2633 2634 2635 2636 2637 | 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 | - + | *---------------------------------------------------------------------- */ static void EntryCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
2670 2671 2672 2673 2674 2675 2676 | 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 | - - + + - + - - - - - - - - - - - + - - + - - - - - + + + + + + + + + + + + + - - + - + + - + - - - + + + + + - - - - + + - - - - - + - + - + - - - - + + + + + + - - + - - + - - + | */ static int GetEntryIndex( Tcl_Interp *interp, /* For error messages. */ Entry *entryPtr, /* Entry for which the index is being * specified. */ |
︙ | |||
2788 2789 2790 2791 2792 2793 2794 | 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 | - + - + - + | */ static void EntryScanTo( Entry *entryPtr, /* Information about widget. */ int x) /* X-coordinate to use for scan operation. */ { |
︙ | |||
2844 2845 2846 2847 2848 2849 2850 | 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 | - + - + - + - - + - + - + - - + + | * *---------------------------------------------------------------------- */ static void EntrySelectTo( Entry *entryPtr, /* Information about widget. */ |
︙ | |||
2907 2908 2909 2910 2911 2912 2913 | 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 | - + - + - + - - + + - + - - - - + + + - + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
2963 2964 2965 2966 2967 2968 2969 | 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 | - + - - + + - - - + + | *---------------------------------------------------------------------- */ static void EntryLostSelection( ClientData clientData) /* Information about entry widget. */ { |
︙ | |||
3018 3019 3020 3021 3022 3023 3024 | 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 | - + | * Right now we don't do selective redisplays: the whole window will be * redrawn. This doesn't seem to hurt performance noticeably, but if it * does then this could be changed. */ if (!(entryPtr->flags & REDRAW_PENDING)) { entryPtr->flags |= REDRAW_PENDING; |
︙ | |||
3057 3058 3059 3060 3061 3062 3063 | 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 | - + | if (entryPtr->numChars == 0) { *firstPtr = 0.0; *lastPtr = 1.0; } else { charsInWindow = Tk_PointToChar(entryPtr->textLayout, Tk_Width(entryPtr->tkwin) - entryPtr->inset - entryPtr->xWidth - entryPtr->layoutX - 1, 0); |
︙ | |||
3099 3100 3101 3102 3103 3104 3105 | 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 | - - + - - + - - - - + - - - - - - + + + + + - - + + | EntryUpdateScrollbar( Entry *entryPtr) /* Information about widget. */ { char firstStr[TCL_DOUBLE_SPACE], lastStr[TCL_DOUBLE_SPACE]; int code; double first, last; Tcl_Interp *interp; |
︙ | |||
3150 3151 3152 3153 3154 3155 3156 | 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 | - + - + - + | *---------------------------------------------------------------------- */ static void EntryBlinkProc( ClientData clientData) /* Pointer to record describing entry. */ { |
︙ | |||
3198 3199 3200 3201 3202 3203 3204 | 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 | - + + - - - - + + + + - + - - - - + + + + | * it's losing it. */ { Tcl_DeleteTimerHandler(entryPtr->insertBlinkHandler); if (gotFocus) { entryPtr->flags |= GOT_FOCUS | CURSOR_ON; if (entryPtr->insertOffTime != 0) { entryPtr->insertBlinkHandler = Tcl_CreateTimerHandler( |
︙ | |||
3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 | 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 | + - + - - - - - + - - - - - - - - - - - - - - - - - - - - - + + + - + - + | * * Side effects: * The text displayed in the entry will change to match the variable. * *-------------------------------------------------------------- */ /* ARGSUSED */ static char * EntryTextVarProc( ClientData clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* Not used. */ const char *name2, /* Not used. */ int flags) /* Information about what happened. */ { |
︙ | |||
3329 3330 3331 3332 3333 3334 3335 | 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 | - - + + - - + + - + - - - - + + + + - + - - - + + + - - + + - + - - + + - + - - - - - - + + + - | * An error condition may arise * *-------------------------------------------------------------- */ static int EntryValidate( |
︙ | |||
3439 3440 3441 3442 3443 3444 3445 | 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 | - + | p = Tcl_DStringValue(&script); code = EntryValidate(entryPtr, p); Tcl_DStringFree(&script); /* * If e->validate has become VALIDATE_NONE during the validation, or we * now have VALIDATE_VAR set (from EntrySetValue) and didn't before, it |
︙ | |||
3477 3478 3479 3480 3481 3482 3483 | 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 | - - - - + + - - - + + | * We also don't call the invcmd, as it may want to do entry * manipulation which the setting of the var will later wipe anyway. */ if (varValidate) { entryPtr->validate = VALIDATE_NONE; } else if (entryPtr->invalidCmd != NULL) { |
︙ | |||
3532 3533 3534 3535 3536 3537 3538 | 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 | - - + + - + - - + + | * None. * *-------------------------------------------------------------- */ static void ExpandPercents( |
︙ | |||
3581 3582 3583 3584 3585 3586 3587 | 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 | - + - + | /* * There's a percent sequence here. Process it. */ before++; /* skip over % */ if (*before != '\0') { |
︙ | |||
3628 3629 3630 3631 3632 3633 3634 | 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 | - + | number = -1; break; } sprintf(numStorage, "%d", number); string = numStorage; break; case 'i': /* index of insert/delete */ |
︙ | |||
3661 3662 3663 3664 3665 3666 3667 | 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 | - + | break; } break; case 'W': /* widget name */ string = Tk_PathName(entryPtr->tkwin); break; default: |
︙ | |||
3697 3698 3699 3700 3701 3702 3703 | 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 | - + - - + + - - + | * See the user documentation. * *-------------------------------------------------------------- */ int Tk_SpinboxObjCmd( |
︙ | |||
3734 3735 3736 3737 3738 3739 3740 | 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 | - + - - + + - + - - + + | /* * Initialize the fields of the structure that won't be initialized by * ConfigureEntry, or that ConfigureEntry requires to be initialized * already (e.g. resource pointers). Only the non-NULL/0 data must be * initialized as memset covers the rest. */ |
︙ | |||
3773 3774 3775 3776 3777 3778 3779 | 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 | - + - - - + - + - + - + - + - + - + | sbPtr->curElement = SEL_NONE; sbPtr->bCursor = NULL; sbPtr->repeatDelay = 400; sbPtr->repeatInterval = 100; sbPtr->fromValue = 0.0; sbPtr->toValue = 100.0; sbPtr->increment = 1.0; |
︙ | |||
3836 3837 3838 3839 3840 3841 3842 | 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 | - - + + - + - + - - + - + - + - + - - - + + + + - - - + - + - - + + + - - + + + - - + + + - + - - + - + - + - + - + - - + + - + - + - + - + - - + | static int SpinboxWidgetObjCmd( ClientData clientData, /* Information about spinbox widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
4035 4036 4037 4038 4039 4040 4041 | 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 | - + - - + + - - - + - + | goto error; } } break; case SB_CMD_SCAN: { int x; |
︙ | |||
4100 4101 4102 4103 4104 4105 4106 | 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 | - + - - + + - + - + - - - + + + - + - - + + - + - + - - - + + + - + - - + - + - - + + | switch (selIndex) { case SB_SEL_ADJUST: if (objc != 4) { Tcl_WrongNumArgs(interp, 3, objv, "index"); goto error; } if (GetEntryIndex(interp, entryPtr, |
︙ | |||
4235 4236 4237 4238 4239 4240 4241 | 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 | - + - - + - + - + - - - + + + + - + - + - + - + - + - + | } if (objc == 3) { code = EntryValueChanged(entryPtr, Tcl_GetString(objv[2])); if (code != TCL_OK) { goto error; } } |
︙ | |||
4386 4387 4388 4389 4390 4391 4392 | 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 | - - + + - + | * The widget value may change. * *-------------------------------------------------------------- */ static int SpinboxInvoke( |
︙ | |||
4422 4423 4424 4425 4426 4427 4428 | 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 | - - - + + - + - + | if (strcmp(Tcl_GetString(objPtr), entryPtr->string)) { /* * Somehow the string changed from what we expected, so let's * do a search on the list to see if the current value is * there. If not, move to the first element of the list. */ |
︙ | |||
4521 4522 4523 4524 4525 4526 4527 | 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 | - + - - + - + | Tcl_DStringAppend(&script, "", 1); code = Tcl_EvalEx(interp, Tcl_DStringValue(&script), -1, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT); Tcl_DStringFree(&script); if (code != TCL_OK) { |
︙ |
Changes to generic/tkEntry.h.
1 2 3 4 5 6 7 8 | 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 | - + + + + + + | /* * tkEntry.h -- * * This module defined the structures for the Entry & SpinBox widgets. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * |
︙ | |||
39 40 41 42 43 44 45 | 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 | - + - + - + - + - + | * available for this widget. */ enum EntryType type; /* Specialized type of Entry widget */ /* * Fields that are set by widget commands other than "configure". */ |
︙ | |||
124 125 126 127 128 129 130 | 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 | - - - - - - - - - - - - - - + - - + + - + - + | * scrollbar(s). Malloc'ed. NULL means no * command to issue. */ char *showChar; /* Value of -show option. If non-NULL, first * character is used for displaying all * characters in entry. Malloc'ed. This is * only used by the Entry widget. */ |
︙ | |||
304 305 306 307 308 309 310 311 | 296 297 298 299 300 301 302 303 304 305 306 | + + + | * the Entry widget. */ MODULE_SCOPE int TkpDrawEntryBorderAndFocus(Entry *entryPtr, Drawable d, int isSpinbox); MODULE_SCOPE int TkpDrawSpinboxButtons(Spinbox *sbPtr, Drawable d); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT #endif /* _TKENTRY */ |
Changes to generic/tkError.c.
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - - + + | * request code (-1 means consider all minor * codes). */ Tk_ErrorProc *errorProc, /* Procedure to invoke when a matching error * occurs. NULL means just ignore matching * errors. */ ClientData clientData) /* Arbitrary value to pass to errorProc. */ { |
︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + | defaultHandler = XSetErrorHandler(ErrorProc); } /* * Create the handler record. */ |
︙ | |||
143 144 145 146 147 148 149 | 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 | - - + + + - - + + - - - - - - - - - + - - + + - + - + | */ void Tk_DeleteErrorHandler( Tk_ErrorHandler handler) /* Token for handler to delete; was previous * return value from Tk_CreateErrorHandler. */ { |
︙ | |||
216 217 218 219 220 221 222 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - + - - + + | * *-------------------------------------------------------------- */ static int ErrorProc( Display *display, /* Display for which error occurred. */ |
︙ | |||
249 250 251 252 253 254 255 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - - + + | && (errorPtr->request != errEventPtr->request_code)) || ((errorPtr->minorCode != -1) && (errorPtr->minorCode != errEventPtr->minor_code)) || ((errorPtr->lastRequest != (unsigned long) -1) && (errorPtr->lastRequest < errEventPtr->serial))) { continue; } |
︙ | |||
272 273 274 275 276 277 278 | 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 | - + + - + | * were deleted by the container. Now we are getting the errors * (BadWindow) after Tk already deleted the window itself. */ if (errEventPtr->error_code == BadWindow) { Window w = (Window) errEventPtr->resourceid; |
Changes to generic/tkEvent.c.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - - - - - - - | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" |
︙ | |||
77 78 79 80 81 82 83 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + | XEvent event; /* The X event. */ } TkWindowEvent; /* * Array of event masks corresponding to each X event: */ |
︙ | |||
140 141 142 143 144 145 146 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + | /* * The structure below is used to store Data for the Event module that must be * kept thread-local. The "dataKey" is used to fetch the thread-specific * storage for the current thread. */ |
︙ | |||
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 | 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 | + + + + | /* * Prototypes for functions that are only referenced locally within this file. */ static void CleanUpTkEvent(XEvent *eventPtr); static void DelayedMotionProc(ClientData clientData); static int GetButtonMask(unsigned int Button); static unsigned long GetEventMaskFromXEvent(XEvent *eventPtr); static TkWindow * GetTkWindowFromXEvent(XEvent *eventPtr); static void InvokeClientMessageHandlers(ThreadSpecificData *tsdPtr, Tk_Window tkwin, XEvent *eventPtr); static int InvokeFocusHandlers(TkWindow **winPtrPtr, unsigned long mask, XEvent *eventPtr); static int InvokeGenericHandlers(ThreadSpecificData *tsdPtr, XEvent *eventPtr); static int InvokeMouseHandlers(TkWindow *winPtr, unsigned long mask, XEvent *eventPtr); static Window ParentXId(Display *display, Window w); static int RefreshKeyboardMappingIfNeeded(XEvent *eventPtr); static int TkXErrorHandler(ClientData clientData, XErrorEvent *errEventPtr); static void UpdateButtonEventState(XEvent *eventPtr); static int WindowEventProc(Tcl_Event *evPtr, int flags); #ifdef TK_USE_INPUT_METHODS static void CreateXIC(TkWindow *winPtr); #endif /* TK_USE_INPUT_METHODS */ /* *---------------------------------------------------------------------- * * InvokeFocusHandlers -- * * Call focus-related code to look at FocusIn, FocusOut, Enter, and Leave |
︙ | |||
242 243 244 245 246 247 248 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + + - + + + + + + | { if ((mask & (FocusChangeMask|EnterWindowMask|LeaveWindowMask)) && (TkFocusFilterEvent(*winPtrPtr, eventPtr) == 0)) { return 1; } /* |
︙ | |||
317 318 319 320 321 322 323 324 325 326 327 328 329 330 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | + | * * Create the X input context for our winPtr. * XIM is only ever enabled on Unix. * *---------------------------------------------------------------------- */ #if defined(TK_USE_INPUT_METHODS) static void CreateXIC( TkWindow *winPtr) { TkDisplay *dispPtr = winPtr->dispPtr; long im_event_mask = 0L; const char *preedit_attname = NULL; |
︙ | |||
347 348 349 350 351 352 353 | 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 | - + - + - - + + | preedit_attname, preedit_attlist, NULL); if (preedit_attlist) { XFree(preedit_attlist); } |
︙ | |||
509 510 511 512 513 514 515 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } return 0; } /* *---------------------------------------------------------------------- * |
︙ | |||
579 580 581 582 583 584 585 | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 | - + | tsdPtr->cmList = tmpPtr; } else { prevPtr->nextPtr = tmpPtr; } if (tmpPtr == NULL) { tsdPtr->lastCmPtr = prevPtr; } |
︙ | |||
641 642 643 644 645 646 647 | 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | - + - + | tsdPtr->genericList = tmpPtr; } else { prevPtr->nextPtr = tmpPtr; } if (tmpPtr == NULL) { tsdPtr->lastGenericPtr = prevPtr; } |
︙ | |||
689 690 691 692 693 694 695 | 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 | - - + + - + | Tk_CreateEventHandler( Tk_Window token, /* Token for window in which to create * handler. */ unsigned long mask, /* Events for which proc should be called. */ Tk_EventProc *proc, /* Function to call for each selected event */ ClientData clientData) /* Arbitrary data to pass to proc. */ { |
︙ | |||
736 737 738 739 740 741 742 | 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 | - + + | return; } /* * No event handler matched, so create a new one. */ |
︙ | |||
779 780 781 782 783 784 785 | 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 | - - + + - + | void Tk_DeleteEventHandler( Tk_Window token, /* Same as corresponding arguments passed */ unsigned long mask, /* previously to Tk_CreateEventHandler. */ Tk_EventProc *proc, ClientData clientData) { |
︙ | |||
822 823 824 825 826 827 828 | 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | - + | */ if (prevPtr == NULL) { winPtr->handlerList = handlerPtr->nextPtr; } else { prevPtr->nextPtr = handlerPtr->nextPtr; } |
︙ | |||
858 859 860 861 862 863 864 | 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 | - + | Tk_GenericProc *proc, /* Function to call on every event. */ ClientData clientData) /* One-word value to pass to proc. */ { GenericHandler *handlerPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); |
︙ | |||
937 938 939 940 941 942 943 | 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - + | Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* * We use a GenericHandler struct, because it's basically the same, except * with an extra clientData field we'll never use. */ |
︙ | |||
1039 1040 1041 1042 1043 1044 1045 | 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 | - + - + + | * *---------------------------------------------------------------------- */ static int TkXErrorHandler( ClientData clientData, /* Pointer to flag we set. */ |
︙ | |||
1083 1084 1085 1086 1087 1088 1089 | 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | - + | /* * Handle errors ourselves. */ gotXError = 0; handler = Tk_CreateErrorHandler(display, -1, -1, -1, |
︙ | |||
1128 1129 1130 1131 1132 1133 1134 | 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 | - + - + - - - - - - - - - - - - - - - | *---------------------------------------------------------------------- */ void Tk_HandleEvent( XEvent *eventPtr) /* Event to dispatch. */ { |
︙ | |||
1202 1203 1204 1205 1206 1207 1208 | 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 | - + - - - - - - - - + - - - + + | /* * Protect interpreter for this window from possible deletion while we * are dealing with the event for this window. Thus, widget writers do * not have to worry about protecting the interpreter in their own * code. */ |
︙ | |||
1270 1271 1272 1273 1274 1275 1276 | 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 | - + - + - + | || (eventPtr->type == SelectionNotify)) { TkSelEventProc((Tk_Window) winPtr, eventPtr); } else if (eventPtr->type == ClientMessage) { if (eventPtr->xclient.message_type == Tk_InternAtom((Tk_Window) winPtr, "WM_PROTOCOLS")) { TkWmProtocolEventProc(winPtr, eventPtr); } else { |
︙ | |||
1312 1313 1314 1315 1316 1317 1318 | 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 | - + | /* * Release the interpreter for this window so that it can be potentially * deleted if requested. */ releaseInterpreter: if (interp != NULL) { |
︙ | |||
1348 1349 1350 1351 1352 1353 1354 | 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 | - - + + | */ void TkEventDeadWindow( TkWindow *winPtr) /* Information about the window that is being * deleted. */ { |
︙ | |||
1371 1372 1373 1374 1375 1376 1377 | 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 | - + | if (ipPtr->nextHandler == handlerPtr) { ipPtr->nextHandler = NULL; } if (ipPtr->winPtr == winPtr) { ipPtr->winPtr = NULL; } } |
︙ | |||
1398 1399 1400 1401 1402 1403 1404 | 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 | - + | *---------------------------------------------------------------------- */ Time TkCurrentTime( TkDisplay *dispPtr) /* Display for which the time is desired. */ { |
︙ | |||
1546 1547 1548 1549 1550 1551 1552 | 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 | - + | /* * Don't filter motion events if the user defaulting to true (1), which * could be set to false (0) when the user wishes to receive all the * motion data) */ if (!(dispPtr->flags & TK_DISPLAY_COLLAPSE_MOTION_EVENTS)) { |
︙ | |||
1574 1575 1576 1577 1578 1579 1580 | 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 | - + - + - + | * The new event may conflict with the saved motion event. Queue * the saved motion event now so that it will be processed before * the new event. */ Tcl_QueueEvent(&dispPtr->delayedMotionPtr->header, position); dispPtr->delayedMotionPtr = NULL; |
︙ | |||
1641 1642 1643 1644 1645 1646 1647 | 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | childPtr = childPtr->nextPtr; } } /* *---------------------------------------------------------------------- * |
︙ | |||
1716 1717 1718 1719 1720 1721 1722 | 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 | - + | ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!(flags & TCL_WINDOW_EVENTS)) { return 0; } if (tsdPtr->restrictProc != NULL) { |
︙ | |||
1762 1763 1764 1765 1766 1767 1768 | 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 | - - + - | static void CleanUpTkEvent( XEvent *eventPtr) { switch (eventPtr->type) { case KeyPress: case KeyRelease: { |
︙ | |||
1810 1811 1812 1813 1814 1815 1816 | 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 | - + | */ static void DelayedMotionProc( ClientData clientData) /* Pointer to display containing a delayed * motion event to be serviced. */ { |
︙ | |||
1842 1843 1844 1845 1846 1847 1848 | 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 | - + | void TkCreateExitHandler( Tcl_ExitProc *proc, /* Function to invoke. */ ClientData clientData) /* Arbitrary value to pass to proc. */ { ExitHandler *exitPtr; |
︙ | |||
1907 1908 1909 1910 1911 1912 1913 | 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 | - + | if ((exitPtr->proc == proc) && (exitPtr->clientData == clientData)) { if (prevPtr == NULL) { firstExitPtr = exitPtr->nextPtr; } else { prevPtr->nextPtr = exitPtr->nextPtr; } |
︙ | |||
1941 1942 1943 1944 1945 1946 1947 | 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 | - + | Tcl_ExitProc *proc, /* Function to invoke. */ ClientData clientData) /* Arbitrary value to pass to proc. */ { ExitHandler *exitPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); |
︙ | |||
1991 1992 1993 1994 1995 1996 1997 | 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 | - + | if ((exitPtr->proc == proc) && (exitPtr->clientData == clientData)) { if (prevPtr == NULL) { tsdPtr->firstExitPtr = exitPtr->nextPtr; } else { prevPtr->nextPtr = exitPtr->nextPtr; } |
︙ | |||
2018 2019 2020 2021 2022 2023 2024 | 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 | - + | * None. * *---------------------------------------------------------------------- */ void TkFinalize( |
︙ | |||
2040 2041 2042 2043 2044 2045 2046 | 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 | - - + + - + - + - - + + | * Be careful to remove the handler from the list before invoking its * callback. This protects us against double-freeing if the callback * should call TkDeleteExitHandler on itself. */ firstExitPtr = exitPtr->nextPtr; Tcl_MutexUnlock(&exitMutex); |
︙ |
Changes to generic/tkFileFilter.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - - - + + + + + + + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkFileFilter.h" |
︙ | |||
80 81 82 83 84 85 86 | 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 | - + - - - - - + + + + - - | int isWindows) /* True if we are running on Windows. */ { int listObjc; Tcl_Obj ** listObjv = NULL; int i; if (types == NULL) { |
︙ | |||
156 157 158 159 160 161 162 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + | *---------------------------------------------------------------------- */ void TkFreeFileFilters( FileFilterList *flistPtr) /* List of file filters to free */ { |
︙ | |||
258 259 260 261 262 263 264 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | - - + + | /* * Might be cleaner to use 'Tcl_GetOSTypeFromObj' but that is actually * static to the MacOS X/Darwin version of Tcl, and would therefore * require further code refactoring. */ for (i=0; i<ostypeCount; i++) { |
︙ | |||
287 288 289 290 291 292 293 | 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 329 | - - - + + - - - + + - + - - + + - + + - + - + - + - + - + - + | */ Tcl_UtfToExternalDString(macRoman, strType, len, &osTypeDS); len = Tcl_DStringLength(&osTypeDS); Tcl_DStringFree(&osTypeDS); } if (len != 4) { |
︙ | |||
371 372 373 374 375 376 377 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | - - - + + + | } if (ostypeList != NULL && ostypeCount > 0) { if (macRoman == NULL) { macRoman = Tcl_GetEncoding(NULL, "macRoman"); } for (i=0; i<ostypeCount; i++) { Tcl_DString osTypeDS; |
︙ | |||
428 429 430 431 432 433 434 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 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 | - + - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | *---------------------------------------------------------------------- */ static FileFilter * GetFilter( FileFilterList *flistPtr, /* The FileFilterList that contains the newly * created filter */ |
Changes to generic/tkFileFilter.h.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - - + + + + + - - | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TK_FILE_FILTER #define _TK_FILE_FILTER |
︙ | |||
75 76 77 78 79 80 81 | 76 77 78 79 80 81 82 83 84 85 | - + - + - - | MODULE_SCOPE void TkFreeFileFilters(FileFilterList *flistPtr); MODULE_SCOPE void TkInitFileFilters(FileFilterList *flistPtr); MODULE_SCOPE int TkGetFileFilters(Tcl_Interp *interp, FileFilterList *flistPtr, Tcl_Obj *valuePtr, int isWindows); |
Changes to generic/tkFocus.c.
︙ | |||
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | + + + + + + + + | * this display. Used to identify stale focus * notifications coming from the X server. */ struct TkDisplayFocusInfo *nextPtr; /* Next in list of all display focus records * for a given application. */ } DisplayFocusInfo; /* * The following magic value is stored in the "send_event" field of FocusIn * and FocusOut events that are generated in this file. This allows us to * separate "real" events coming from the server from those that we generated. */ #define GENERATED_EVENT_MAGIC ((Bool) 0x547321ac) /* * Debugging support... */ #define DEBUG(dispPtr, arguments) \ if ((dispPtr)->focusDebug) { \ printf arguments; \ |
︙ | |||
104 105 106 107 108 109 110 | 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 | - + - + - - - + + + - + - + - - - + + | */ int Tk_FocusObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
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 | - - + + - + | } } /* * We have a subcommand to parse and act upon. */ |
︙ | |||
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 | - + - - + + - + | case 2: /* -lastfor */ windowName = Tcl_GetString(objv[2]); newPtr = (TkWindow *) Tk_NameToWindow(interp, windowName, tkwin); if (newPtr == NULL) { return TCL_ERROR; } for (topLevelPtr = newPtr; topLevelPtr != NULL; |
︙ | |||
275 276 277 278 279 280 281 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | - - + + | int retValue, delta; /* * If this was a generated event, just turn off the generated flag and * pass the event through to Tk bindings. */ |
︙ | |||
378 379 380 381 382 383 384 | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | - + | } /* * If there is a grab in effect and this window is outside the grabbed * tree, then ignore the event. */ |
︙ | |||
411 412 413 414 415 416 417 | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | - + | for (tlFocusPtr = winPtr->mainPtr->tlFocusPtr; tlFocusPtr != NULL; tlFocusPtr = tlFocusPtr->nextPtr) { if (tlFocusPtr->topLevelPtr == winPtr) { break; } } if (tlFocusPtr == NULL) { |
︙ | |||
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 | - - + + - - - - - + + + + + | displayFocusPtr->focusWinPtr = newFocusPtr; dispPtr->implicitWinPtr = winPtr; dispPtr->focusPtr = newFocusPtr; } } else if (eventPtr->type == LeaveNotify) { /* * If the pointer just left a window for which we automatically |
︙ | |||
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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | - - - - - - - - + + + - - + + - + - - - - - - + + + + + + - - - + + + - - + + + - + - - - - + - - + + - - - - + - - - + - - - - - + + + + + + - + - - - - + + - - - - + + - - + + + + | * Don't set focus if window is already dead. [Bug 3574708] */ if (winPtr->flags & TK_ALREADY_DEAD) { return; } |
︙ | |||
803 804 805 806 807 808 809 | 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | - + | * Various things get cleaned up and recycled. * *---------------------------------------------------------------------- */ void TkFocusDeadWindow( |
︙ | |||
851 852 853 854 855 856 857 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | - + | dispPtr->focusPtr = NULL; } if (prevPtr == NULL) { winPtr->mainPtr->tlFocusPtr = tlFocusPtr->nextPtr; } else { prevPtr->nextPtr = tlFocusPtr->nextPtr; } |
︙ | |||
924 925 926 927 928 929 930 | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 | - + | winPtr = destPtr; if (winPtr == NULL) { return; } } event.xfocus.serial = LastKnownRequestProcessed(winPtr->display); |
︙ | |||
957 958 959 960 961 962 963 | 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 | - + | */ static void FocusMapProc( ClientData clientData, /* Toplevel window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
1011 1012 1013 1014 1015 1016 1017 | 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 | - + | } } /* * The record doesn't exist yet. Make a new one. */ |
︙ | |||
1047 1048 1049 1050 1051 1052 1053 | 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 | - + - + - - + + - - - - + + + + - + + - - - + + + - + - - + + - - - + - - - + - - + - - - - + - - - - - + + + - - + - - - + - - - + + - - - + - - - - - + - - - + + - + + - - + - - + + - + - + - + | TkMainInfo *mainPtr) /* Record that identifies a particular * application. */ { while (mainPtr->displayFocusPtr != NULL) { DisplayFocusInfo *displayFocusPtr = mainPtr->displayFocusPtr; mainPtr->displayFocusPtr = mainPtr->displayFocusPtr->nextPtr; |
Changes to generic/tkFont.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - - - | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkFont.h" |
︙ | |||
40 41 42 43 44 45 46 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - + | /* * The following data structure is used to keep track of the font attributes * for each named font that has been defined. The named font is only deleted * when the last reference to it goes away. */ typedef struct NamedFont { |
︙ | |||
92 93 94 95 96 97 98 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + | typedef struct TextLayout { Tk_Font tkfont; /* The font used when laying out the text. */ const char *string; /* The string that was layed out. */ int width; /* The maximum width of all lines in the text * layout. */ int numChunks; /* Number of chunks actually used in following * array. */ |
︙ | |||
162 163 164 165 166 167 168 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + | }; /* * The following structure and defines specify the valid builtin options when * configuring a set of font attributes. */ |
︙ | |||
187 188 189 190 191 192 193 | 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 329 330 331 332 333 334 335 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + | /* * Hardcoded font aliases. These are used to describe (mostly) identical fonts * whose names differ from platform to platform. If the user-supplied font * name matches any of the names in one of the alias lists, the other names in * the alias list are also automatically tried. */ |
︙ | |||
376 377 378 379 380 381 382 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | - + + | *--------------------------------------------------------------------------- */ void TkFontPkgInit( TkMainInfo *mainPtr) /* The application being created. */ { |
︙ | |||
409 410 411 412 413 414 415 | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 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 | - + - + + + + - + - + - - + + - + | *--------------------------------------------------------------------------- */ void TkFontPkgFree( TkMainInfo *mainPtr) /* The application being deleted. */ { |
︙ | |||
469 470 471 472 473 474 475 | 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 | - - - + + + + + + - + | Tk_FontObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int index; |
︙ | |||
521 522 523 524 525 526 527 | 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 | - + - + - + - + - - - + - - + - + | n = skip + 3; optPtr = NULL; charPtr = NULL; if (n < objc) { s = Tcl_GetString(objv[n]); if (s[0] == '-' && s[1] != '-') { optPtr = objv[n]; |
︙ | |||
601 602 603 604 605 606 607 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 | - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + + | } result = GetAttributeInfoObj(interp, faPtr, optPtr); Tk_FreeFont(tkfont); return result; } case FONT_CONFIGURE: { |
︙ | |||
673 674 675 676 677 678 679 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | - + - + - + - + + - + - - + + - + - - - - + + + - + - + - + + - - + + - + + - + + + - + - + - + - - - + + - - - + + - - | if (ConfigAttributesObj(interp, tkwin, objc - skip, objv + skip, &fa) != TCL_OK) { return TCL_ERROR; } if (TkCreateNamedFont(interp, tkwin, name, &fa) != TCL_OK) { return TCL_ERROR; } |
︙ | |||
840 841 842 843 844 845 846 | 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 | - + + - + - + - + - + - + - - - - - - + - - - + - - - - + + - - + | TkFontInfo *fiPtr, /* Info about application's fonts. */ Tk_Window tkwin, /* A window in the application. */ Tcl_HashEntry *namedHashPtr)/* The named font that is changing. */ { Tcl_HashEntry *cacheHashPtr; Tcl_HashSearch search; TkFont *fontPtr; |
︙ | |||
954 955 956 957 958 959 960 | 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 | - + + + + - - + + - - + + - - + | int TkCreateNamedFont( Tcl_Interp *interp, /* Interp for error return (can be NULL). */ Tk_Window tkwin, /* A window associated with interp. */ const char *name, /* Name for the new named font. */ TkFontAttributes *faPtr) /* Attributes for the new named font. */ { |
︙ | |||
1007 1008 1009 1010 1011 1012 1013 | 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | - + - + + + - - + + - - + - + | *--------------------------------------------------------------------------- */ int TkDeleteNamedFont( Tcl_Interp *interp, /* Interp for error return (can be NULL). */ Tk_Window tkwin, /* A window associated with interp. */ |
︙ | |||
1064 1065 1066 1067 1068 1069 1070 | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 | - + | Tk_Window tkwin, /* For display on which font will be used. */ const char *string) /* String describing font, as: named font, * native format, or parseable string. */ { Tk_Font tkfont; Tcl_Obj *strPtr; |
︙ | |||
1100 1101 1102 1103 1104 1105 1106 | 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | - + + - + - - + + - + - + - + - + - - + | Tk_Font Tk_AllocFontFromObj( Tcl_Interp *interp, /* Interp for database and error return. */ Tk_Window tkwin, /* For screen on which font will be used. */ Tcl_Obj *objPtr) /* Object describing font, as: named font, * native format, or parseable string. */ { |
︙ | |||
1202 1203 1204 1205 1206 1207 1208 | 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 | - - - + + - | * Detect the system font engine going wrong and fail more gracefully. */ if (fontPtr == NULL) { if (isNew) { Tcl_DeleteHashEntry(cacheHashPtr); } |
︙ | |||
1239 1240 1241 1242 1243 1244 1245 | 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 | - + - + - | /* * Get information used for drawing underlines in generic code on a * non-underlined font. */ descent = fontPtr->fm.descent; fontPtr->underlinePos = descent / 2; |
︙ | |||
1283 1284 1285 1286 1287 1288 1289 | 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | - + - - + - - + + - + - + - + - + - | * old internal representation. * *---------------------------------------------------------------------- */ Tk_Font Tk_GetFontFromObj( |
︙ | |||
1358 1359 1360 1361 1362 1363 1364 | 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | - + - + - | * TkFont pointer is NULL. * *---------------------------------------------------------------------- */ static int SetFontFromAny( |
︙ | |||
1402 1403 1404 1405 1406 1407 1408 | 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 | - + + | *--------------------------------------------------------------------------- */ const char * Tk_NameOfFont( Tk_Font tkfont) /* Font whose name is desired. */ { |
︙ | |||
1428 1429 1430 1431 1432 1433 1434 | 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 | - + - + + + - + - - + + + - + - + - + | *--------------------------------------------------------------------------- */ void Tk_FreeFont( Tk_Font tkfont) /* Font to be released. */ { |
︙ | |||
1500 1501 1502 1503 1504 1505 1506 | 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 | - + - - - - - - - - - + - - + + + - | { Tk_FreeFont(Tk_GetFontFromObj(tkwin, objPtr)); } /* *--------------------------------------------------------------------------- * |
︙ | |||
1562 1563 1564 1565 1566 1567 1568 | 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 | - + - + - - | */ static void DupFontObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { |
︙ | |||
1598 1599 1600 1601 1602 1603 1604 | 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 | - + + | */ Font Tk_FontId( Tk_Font tkfont) /* Font that is going to be selected into * GC. */ { |
︙ | |||
1630 1631 1632 1633 1634 1635 1636 | 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 | - + + | void Tk_GetFontMetrics( Tk_Font tkfont, /* Font in which metrics are calculated. */ Tk_FontMetrics *fmPtr) /* Pointer to structure in which font metrics * for tkfont will be stored. */ { |
︙ | |||
1671 1672 1673 1674 1675 1676 1677 | 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 | - + + | int Tk_PostscriptFontName( Tk_Font tkfont, /* Font in which text will be printed. */ Tcl_DString *dsPtr) /* Pointer to an initialized Tcl_DString to * which the name of the Postscript font that * corresponds to tkfont will be appended. */ { |
︙ | |||
1704 1705 1706 1707 1708 1709 1710 | 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 | - + - + - + | } else if (strcasecmp(family, "AvantGarde") == 0) { family = "AvantGarde"; } else if (strcasecmp(family, "ZapfChancery") == 0) { family = "ZapfChancery"; } else if (strcasecmp(family, "ZapfDingbats") == 0) { family = "ZapfDingbats"; } else { |
︙ | |||
1774 1775 1776 1777 1778 1779 1780 | 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 | - + | /* * Get the string to use for the slant. */ slantString = NULL; if (fontPtr->fa.slant == TK_FS_ROMAN) { |
︙ | |||
1804 1805 1806 1807 1808 1809 1810 | 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 | - + | Tcl_DStringAppend(dsPtr, weightString, -1); } if (slantString != NULL) { Tcl_DStringAppend(dsPtr, slantString, -1); } } |
︙ | |||
1902 1903 1904 1905 1906 1907 1908 | 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 | - + + + - - + + | int numBytes, /* Number of bytes in string. */ int x, int y, /* Coordinates at which the first character of * the whole string would be drawn. */ int firstByte, /* Index of first byte of first character. */ int lastByte) /* Index of first byte after the last * character. */ { |
︙ | |||
1963 1964 1965 1966 1967 1968 1969 | 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 | - - + + + | * means that tab characters should not be * expanded. TK_IGNORE_NEWLINES means that * newline characters should not cause a line * break. */ int *widthPtr, /* Filled with width of string. */ int *heightPtr) /* Filled with height of string. */ { |
︙ | |||
1997 1998 1999 2000 2001 2002 2003 | 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 | - - + + - + - + - + | } if (wrapLength == 0) { wrapLength = -1; } maxChunks = 1; |
︙ | |||
2062 2063 2064 2065 2066 2067 2068 | 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 | - + - + | bytesThisChunk, curX, newX, baseline); start += bytesThisChunk; curX = newX; } } |
︙ | |||
2101 2102 2103 2104 2105 2106 2107 | 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 | - + | /* * No more characters are going to go on this line, either because no * more characters can fit or there are no more characters left. * Consume all extra spaces at end of line. */ |
︙ | |||
2162 2163 2164 2165 2166 2167 2168 | 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 | - + | } /* * If last line ends with a newline, then we need to make a 0 width chunk * on the next line. Otherwise "Hello" and "Hello\n" are the same height. */ |
︙ | |||
2251 2252 2253 2254 2255 2256 2257 | 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 | - + + - + | *--------------------------------------------------------------------------- */ void Tk_FreeTextLayout( Tk_TextLayout textLayout) /* The text layout to be released. */ { |
︙ | |||
2282 2283 2284 2285 2286 2287 2288 | 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 | - + - - + - - - - - + - + + + | *--------------------------------------------------------------------------- */ void Tk_DrawTextLayout( Display *display, /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ |
︙ | |||
2328 2329 2330 2331 2332 2333 2334 | 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - | Tk_MeasureChars(layoutPtr->tkfont, chunkPtr->start, firstByte - chunkPtr->start, -1, 0, &drawX); } if (lastChar < numDisplayChars) { numDisplayChars = lastChar; } lastByte = Tcl_UtfAtIndex(chunkPtr->start, numDisplayChars); |
︙ | |||
2469 2470 2471 2472 2473 2474 2475 | 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 | - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - + - - - + - - + - - - - - - - - - - | Tk_TextLayout layout, /* Layout information, from a previous call to * Tk_ComputeTextLayout(). */ int x, int y, /* Upper-left hand corner of rectangle in * which to draw (pixels). */ int underline) /* Index of the single character to underline, * or -1 for no underline. */ { |
︙ | |||
2585 2586 2587 2588 2589 2590 2591 | 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 | - + + | Tk_PointToChar( Tk_TextLayout layout, /* Layout information, from a previous call to * Tk_ComputeTextLayout(). */ int x, int y) /* Coordinates of point to check, with respect * to the upper-left corner of the text * layout. */ { |
︙ | |||
2649 2650 2651 2652 2653 2654 2655 | 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 | - + + | * This is a special chunk that encapsulates a single * tab or newline char. */ return numChars; } n = Tk_MeasureChars((Tk_Font) fontPtr, chunkPtr->start, |
︙ | |||
2732 2733 2734 2735 2736 2737 2738 | 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 | - - + + + + - - + + | * character specified by index, if * non-NULL. */ int *widthPtr, int *heightPtr) /* Filled with the width and height of the * bounding box for the character specified by * index, if non-NULL. */ { |
︙ | |||
2842 2843 2844 2845 2846 2847 2848 | 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 | - + + | Tk_TextLayout layout, /* Layout information, from a previous call * to Tk_ComputeTextLayout(). */ int x, int y) /* Coordinates of point to check, with respect * to the upper-left corner of the text layout * (in pixels). */ { int i, x1, x2, y1, y2, xDiff, yDiff, dist, minDist, ascent, descent; |
︙ | |||
2929 2930 2931 2932 2933 2934 2935 | 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 | - + + - + - - + + - | * layout. Coordinates are with respect to the * upper-left hand corner of the text layout * itself. */ int width, int height) /* The width and height of the above * rectangular area, in pixels. */ { int result, i, x1, y1, x2, y2; |
︙ | |||
2985 2986 2987 2988 2989 2990 2991 | 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } else { result = 1; } chunkPtr++; } return result; } |
︙ | |||
3277 3278 3279 3280 3281 3282 3283 | 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 | - - + + + - - - + - - + + - - + + + - - + + + + + + - + + + + + - + + - - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + + + + + + + + - - - + + + - - - - + - - - - - - - - - + + + + + + - - - - - - + + + - - + - - + - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - + - + - - - - - + + + + - - - + + + + + - | */ void Tk_TextLayoutToPostscript( Tcl_Interp *interp, /* Filled with Postscript code. */ Tk_TextLayout layout) /* The layout to be rendered. */ { |
︙ | |||
3395 3396 3397 3398 3399 3400 3401 | 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 | - + - + - + - - + - - + | * *--------------------------------------------------------------------------- */ static int ConfigAttributesObj( Tcl_Interp *interp, /* Interp for error return. */ |
︙ | |||
3505 3506 3507 3508 3509 3510 3511 | 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 | - + + + - - - - + - - - - | /* The font attributes to inspect. */ Tcl_Obj *objPtr) /* If non-NULL, indicates the single option * whose value is to be returned. Otherwise * information is returned for all options. */ { int i, index, start, end; const char *str; |
︙ | |||
3559 3560 3561 3562 3563 3564 3565 | 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 | - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + | valuePtr = Tcl_NewBooleanObj(faPtr->overstrike); break; } if (objPtr != NULL) { Tcl_SetObjResult(interp, valuePtr); return TCL_OK; } |
︙ | |||
3656 3657 3658 3659 3660 3661 3662 | 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 | - + - + | * name. Any attributes that were not * specified in font name are filled with * default values. */ { const char *dash; int objc, result, i, n; Tcl_Obj **objv; |
︙ | |||
3722 3723 3724 3725 3726 3727 3728 | 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 | - + - - + - + | * Wasn't an XLFD or "-option value" string. Try it as a "font size style" * list. */ if ((Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv) != TCL_OK) || (objc < 1)) { if (interp != NULL) { |
︙ | |||
3771 3772 3773 3774 3775 3776 3777 | 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 | - - + - - + | } /* * Unknown style. */ if (interp != NULL) { |
︙ | |||
3821 3822 3823 3824 3825 3826 3827 | 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 | - - + + | int maxChunks, numChars; size_t s; layoutPtr = *layoutPtrPtr; maxChunks = *maxPtr; if (layoutPtr->numChunks == maxChunks) { maxChunks *= 2; |
︙ | |||
3894 3895 3896 3897 3898 3899 3900 | 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 | - + | str = string; if (*str == '-') { str++; } Tcl_DStringInit(&ds); |
︙ | |||
3927 3928 3929 3930 3931 3932 3933 | 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 | - + | * then assume the above incorrect form was used and shift all the rest of * the fields right by one, so the number gets interpreted as a pixelsize. * This fix is so that we don't get a million reports that "it works under * X (as a native font name), but gives a syntax error under Windows (as a * parsed set of attributes)". */ |
︙ | |||
3978 3979 3980 3981 3982 3983 3984 | 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 | - + - + - - + + | /* XLFD_ADD_STYLE ignored. */ /* * Pointsize in tenths of a point, but treat it as tenths of a pixel for * historical compatibility. */ |
︙ | |||
4017 4018 4019 4020 4021 4022 4023 | 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 | - + - + - - | * [ N1 N2 N3 N4 ] * * where N1 is the pixel size, and where N2, N3, and N4 are some * additional numbers that I don't know the purpose of, so I * ignore them. */ |
︙ | |||
4097 4098 4099 4100 4101 4102 4103 | 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 | - + - + - + - + - + - + - + - + + - + | * * Side effects: * None. * *--------------------------------------------------------------------------- */ |
︙ | |||
4199 4200 4201 4202 4203 4204 4205 | 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 | - + | * * Side effects: * None. * *------------------------------------------------------------------------- */ |
︙ | |||
4224 4225 4226 4227 4228 4229 4230 | 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 | - + | * * Side effects: * None. * *------------------------------------------------------------------------- */ |
︙ | |||
4247 4248 4249 4250 4251 4252 4253 | 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 | - + | * * Side effects: * None. * *------------------------------------------------------------------------- */ |
︙ | |||
4275 4276 4277 4278 4279 4280 4281 | 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 | - + - + - + - + | *---------------------------------------------------------------------- */ Tcl_Obj * TkDebugFont( Tk_Window tkwin, /* The window in which the font will be used * (not currently used). */ |
︙ | |||
4327 4328 4329 4330 4331 4332 4333 | 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 | - + + - + - + | int TkFontGetFirstTextLayout( Tk_TextLayout layout, /* Layout information, from a previous call to * Tk_ComputeTextLayout(). */ Tk_Font *font, char *dst) { |
Changes to generic/tkFont.h.
︙ | |||
10 11 12 13 14 15 16 | 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 | - - + + + - + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TKFONT #define _TKFONT |
︙ | |||
85 86 87 88 89 90 91 | 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 | - + - + | */ typedef struct TkFont { /* * Fields used and maintained exclusively by generic code. */ |
︙ | |||
181 182 183 184 185 186 187 | 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 | - - - - - - - + - - - - - - + + + + + + - + - + - + - + - - + + + - - | #define XLFD_RESOLUTION_X 8 #define XLFD_RESOLUTION_Y 9 #define XLFD_SPACING 10 #define XLFD_AVERAGE_WIDTH 11 #define XLFD_CHARSET 12 #define XLFD_NUMFIELDS 13 /* Number of fields in XLFD. */ |
Changes to generic/tkFrame.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - - + + | * Copyright (c) 1990-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. */ |
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - - - - - - - - - - | * pixels of extra space to leave on left and * right of child area. */ int padX; /* Integer value corresponding to padXPtr. */ Tcl_Obj *padYPtr; /* Value of -padx option: specifies how many * pixels of extra space to leave above and * below child area. */ int padY; /* Integer value corresponding to padYPtr. */ |
︙ | |||
168 169 170 171 172 173 174 | 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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | - + - - + + - + - + - + - + - + - - + + - + - - + + - - + + - - + + - + - + - + - - - - + - - - + - + - + - - - + - - - - + - - - + - + - + - + - + - - - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - - - - - - - + - + - + - + - - - + | enum labelanchor { LABELANCHOR_E, LABELANCHOR_EN, LABELANCHOR_ES, LABELANCHOR_N, LABELANCHOR_NE, LABELANCHOR_NW, LABELANCHOR_S, LABELANCHOR_SE, LABELANCHOR_SW, LABELANCHOR_W, LABELANCHOR_WN, LABELANCHOR_WS }; |
︙ | |||
399 400 401 402 403 404 405 | 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 | - + - + - + | */ int Tk_FrameObjCmd( ClientData clientData, /* Either NULL or pointer to option table. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
448 449 450 451 452 453 454 | 416 417 418 419 420 421 422 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 | - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - + - - - + - + + - - + + - - + + - - + + - - + + - - + + | */ int TkCreateFrame( ClientData clientData, /* Either NULL or pointer to option table. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ |
︙ | |||
598 599 600 601 602 603 604 | 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 | - - + + - - + - - - - - - - - + + + + + + + - - - + + + + | screenName); } else if (appName == NULL) { /* * This occurs when someone tried to create a frame/toplevel while we * are being destroyed. Let an error be thrown. */ |
︙ | |||
675 676 677 678 679 680 681 | 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 | - - + + - - + + - - - - - + + + + + + - - + - - + + - - - - - + + + + + + - - - + - + | /* * Create the widget record, process configuration options, and create * event handlers. Then fill in a few additional fields in the widget * record from the special options. */ if (type == TYPE_LABELFRAME) { |
︙ | |||
761 762 763 764 765 766 767 | 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | - + - + - + - + - - + - - + + - + - + - - + + + - - + + + - - + + + - + - - + - + - + - + - + - + - + - + + + + - + - - - + + + - - - - - + + + - + | */ static int FrameWidgetObjCmd( ClientData clientData, /* Information about frame widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
886 887 888 889 890 891 892 | 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 | - + - - + + - - - - - - + - - - | * Everything associated with the frame is freed up. * *---------------------------------------------------------------------- */ static void DestroyFrame( |
︙ | |||
933 934 935 936 937 938 939 | 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 | - + - - + + | *---------------------------------------------------------------------- */ static void DestroyFramePartly( Frame *framePtr) /* Info about frame widget. */ { |
︙ | |||
973 974 975 976 977 978 979 | 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 | - + - + - - + - + - - + - - - - - + - - + - - - - - - - - + | * *---------------------------------------------------------------------- */ static int ConfigureFrame( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1064 1065 1066 1067 1068 1069 1070 | 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 | - - + + - + + + + + + - + - + - + + - + - + - - - - - - - - + | * geometry management for it. */ if (framePtr->type == TYPE_LABELFRAME) { if (oldWindow != labelframePtr->labelWin) { if (oldWindow != NULL) { Tk_DeleteEventHandler(oldWindow, StructureNotifyMask, |
︙ | |||
1146 1147 1148 1149 1150 1151 1152 | 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 | - - + + - + - - - - - - - - - | *--------------------------------------------------------------------------- */ static void FrameWorldChanged( ClientData instanceData) /* Information about widget. */ { |
︙ | |||
1195 1196 1197 1198 1199 1200 1201 | 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 | - + - - + - - + - | */ labelframePtr->labelReqWidth = labelframePtr->labelReqHeight = 0; if (anyTextLabel) { labelText = Tcl_GetString(labelframePtr->textPtr); Tk_FreeTextLayout(labelframePtr->textLayout); |
︙ | |||
1298 1299 1300 1301 1302 1303 1304 | 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 | - + | if ((framePtr->width > 0) || (framePtr->height > 0)) { Tk_GeometryRequest(tkwin, framePtr->width, framePtr->height); } if (Tk_IsMapped(tkwin)) { if (!(framePtr->flags & REDRAW_PENDING)) { |
︙ | |||
1324 1325 1326 1327 1328 1329 1330 | 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 | - + - + - - | * Display-related numbers get changed in *framePtr. * *---------------------------------------------------------------------- */ static void ComputeFrameGeometry( |
︙ | |||
1363 1364 1365 1366 1367 1368 1369 | 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | - + - - - + - - | maxHeight = Tk_Height(tkwin); maxWidth = Tk_Width(tkwin); if ((labelframePtr->labelAnchor >= LABELANCHOR_N) && (labelframePtr->labelAnchor <= LABELANCHOR_SW)) { maxWidth -= padding; |
︙ | |||
1473 1474 1475 1476 1477 1478 1479 | 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 | - - + + | *---------------------------------------------------------------------- */ static void DisplayFrame( ClientData clientData) /* Information about widget. */ { |
︙ | |||
1510 1511 1512 1513 1514 1515 1516 | 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 | - + - - - - - - - - - - - - - - - - - + - - - - + + + + + + + + + + + + + + | } } /* * If -background is set to "", no interior is drawn. */ |
︙ | |||
1647 1648 1649 1650 1651 1652 1653 | 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 | - + - - + - - - - + + + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | || (labelframePtr->labelBox.y != Tk_Y(labelframePtr->labelWin)) || (labelframePtr->labelBox.width != Tk_Width(labelframePtr->labelWin)) || (labelframePtr->labelBox.height != Tk_Height(labelframePtr->labelWin))) { Tk_MoveResizeWindow(labelframePtr->labelWin, |
︙ | |||
1732 1733 1734 1735 1736 1737 1738 | 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 | - + - + | * *-------------------------------------------------------------- */ static void FrameEventProc( ClientData clientData, /* Information about window. */ |
︙ | |||
1768 1769 1770 1771 1772 1773 1774 | 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 | - + - + - - + + | * DestroyFrame, we must free all options now. */ DestroyFramePartly(framePtr); Tk_DeleteEventHandler(framePtr->tkwin, ExposureMask|StructureNotifyMask|FocusChangeMask, |
︙ | |||
1799 1800 1801 1802 1803 1804 1805 | 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 | - + | TkpSetMainMenubar(framePtr->interp, framePtr->tkwin, framePtr->menuName); } return; redraw: if ((framePtr->tkwin != NULL) && !(framePtr->flags & REDRAW_PENDING)) { |
︙ | |||
1826 1827 1828 1829 1830 1831 1832 | 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 | - + | *---------------------------------------------------------------------- */ static void FrameCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
1877 1878 1879 1880 1881 1882 1883 | 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 | - + - + - + - + | *---------------------------------------------------------------------- */ static void MapFrame( ClientData clientData) /* Pointer to frame structure. */ { |
︙ | |||
1932 1933 1934 1935 1936 1937 1938 | 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 | - - + + | void TkInstallFrameMenu( Tk_Window tkwin) /* The window that was just created. */ { TkWindow *winPtr = (TkWindow *) tkwin; if (winPtr->mainPtr != NULL) { |
︙ | |||
1965 1966 1967 1968 1969 1970 1971 | 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 | - + - + | */ static void FrameStructureProc( ClientData clientData, /* Pointer to record describing frame. */ XEvent *eventPtr) /* Describes what just happened. */ { |
︙ | |||
2003 2004 2005 2006 2007 2008 2009 | 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 | - + - - + - + - + - + - - + + - + - - + + - - + - + - - + + - + - - + - + - - + - - - - - + + - - + - | */ static void FrameRequestProc( ClientData clientData, /* Pointer to record for frame. */ Tk_Window tkwin) /* Window that changed its desired size. */ { |
︙ | |||
2110 2111 2112 2113 2114 2115 2116 | 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * *-------------------------------------------------------------- */ Tk_Window TkToplevelWindowForCommand( Tcl_Interp *interp, |
Changes to generic/tkGC.c.
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + | * values in the graphics context and the other based on the display and GC * identifier. */ typedef struct { GC gc; /* Graphics context. */ Display *display; /* Display to which gc belongs. */ |
︙ | |||
62 63 64 65 66 67 68 | 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 | - + - + - + | * *---------------------------------------------------------------------- */ GC Tk_GetGC( Tk_Window tkwin, /* Window in which GC will be used. */ |
︙ | |||
214 215 216 217 218 219 220 | 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 | - + - + | } valueKey.display = Tk_Display(tkwin); valueKey.screenNum = Tk_ScreenNumber(tkwin); valueKey.depth = Tk_Depth(tkwin); valueHashPtr = Tcl_CreateHashEntry(&dispPtr->gcValueTable, (char *) &valueKey, &isNew); if (!isNew) { |
︙ | |||
287 288 289 290 291 292 293 | 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 | - + - + - - + + + + - + | void Tk_FreeGC( Display *display, /* Display for which gc was allocated. */ GC gc) /* Graphics context to be released. */ { Tcl_HashEntry *idHashPtr; |
︙ | |||
343 344 345 346 347 348 349 | 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 | - + + + + + + + - + | { Tcl_HashEntry *entryPtr; Tcl_HashSearch search; TkGC *gcPtr; for (entryPtr = Tcl_FirstHashEntry(&dispPtr->gcIdTable, &search); entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) { |
︙ |
Changes to generic/tkGeometry.c.
︙ | |||
11 12 13 14 15 16 17 | 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 | - - + + - - - + + + - - - - - + + + + + - - + + - + - + - - - + + + - + - + - + - + - + - + - - + + | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" /* * Data structures of the following type are used by Tk_MaintainGeometry. For |
︙ | |||
128 129 130 131 132 133 134 | 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 | - + - + | void Tk_GeometryRequest( Tk_Window tkwin, /* Window that geometry information pertains * to. */ int reqWidth, int reqHeight)/* Minimum desired dimensions for window, in * pixels. */ { |
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | - - + + | void Tk_SetInternalBorderEx( Tk_Window tkwin, /* Window that will have internal border. */ int left, int right, /* Width of internal border, in pixels. */ int top, int bottom) { |
︙ | |||
214 215 216 217 218 219 220 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - + - - + + + - + | } if (bottom != winPtr->internalBorderBottom) { winPtr->internalBorderBottom = bottom; changed = 1; } /* |
︙ | |||
275 276 277 278 279 280 281 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + | */ void Tk_SetMinimumRequestSize( Tk_Window tkwin, /* Window that will have internal border. */ int minWidth, int minHeight)/* Minimum requested size, in pixels. */ { |
︙ | |||
299 300 301 302 303 304 305 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + - - - - - + + + + + - - + + - + - - - + - + - + - - + + - - + + - + - + - + - + - - - - - + + + + + - + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - + - + - - + + - - - - - + + + + + - + - - - - - + + + + + - + - + - + - - - + + + - - - + + + - - + + - + - - - + - + - - + + - + - - - - + + + + - - - + + + - - + + - - - - - - + + + + + + - - + + - - + + - + - + - + - + - - - + + + - - + + - - - + + + - - + + - - + + - + - + - + - + - - - + + + - + - + - - - - + + + + - + - - + + - - + + - - - - - - + + + + + + - + - - - + + + - + - + | Tk_ResizeWindow(tkwin, Tk_Width(tkwin), Tk_Height(tkwin)); } /* *---------------------------------------------------------------------- * |
︙ |
Changes to generic/tkGet.c.
︙ | |||
18 19 20 21 22 23 24 | 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 | - + - + - + | /* * One of these structures is created per thread to store thread-specific * data. In this case, it is used to house the Tk_Uid structs used by each * thread. The "dataKey" below is used to locate the ThreadSpecificData for * the current thread. */ |
︙ | |||
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + | * *-------------------------------------------------------------- */ int Tk_GetAnchor( Tcl_Interp *interp, /* Use this for error reporting. */ |
︙ | |||
148 149 150 151 152 153 154 | 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 | - - - + + - - + | *anchorPtr = TK_ANCHOR_CENTER; return TCL_OK; } goto error; } error: |
︙ | |||
212 213 214 215 216 217 218 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - + | * *-------------------------------------------------------------- */ int Tk_GetJoinStyle( Tcl_Interp *interp, /* Use this for error reporting. */ |
︙ | |||
235 236 237 238 239 240 241 | 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 | - - + + - - - + | return TCL_OK; } if ((c == 'r') && (strncmp(string, "round", length) == 0)) { *joinPtr = JoinRound; return TCL_OK; } |
︙ | |||
293 294 295 296 297 298 299 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | - + | * *-------------------------------------------------------------- */ int Tk_GetCapStyle( Tcl_Interp *interp, /* Use this for error reporting. */ |
︙ | |||
316 317 318 319 320 321 322 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | - - + + - - - + | return TCL_OK; } if ((c == 'r') && (strncmp(string, "round", length) == 0)) { *capPtr = CapRound; return TCL_OK; } |
︙ | |||
411 412 413 414 415 416 417 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | - + | * *-------------------------------------------------------------- */ int Tk_GetJustify( Tcl_Interp *interp, /* Use this for error reporting. */ |
︙ | |||
434 435 436 437 438 439 440 | 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 | - - + + - - - + | return TCL_OK; } if ((c == 'c') && (strncmp(string, "center", length) == 0)) { *justifyPtr = TK_JUSTIFY_CENTER; return TCL_OK; } |
︙ | |||
489 490 491 492 493 494 495 | 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | - + - + - | * All information in the identifier table is deleted. * *---------------------------------------------------------------------- */ static void FreeUidThreadExitProc( |
︙ | |||
522 523 524 525 526 527 528 | 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - + | * New information may be entered into the identifier table. * *---------------------------------------------------------------------- */ Tk_Uid Tk_GetUid( |
︙ | |||
564 565 566 567 568 569 570 | 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 | - + - + + + | int Tk_GetScreenMM( Tcl_Interp *interp, /* Use this for error reporting. */ Tk_Window tkwin, /* Window whose screen determines conversion * from centimeters and other absolute * units. */ |
︙ | |||
608 609 610 611 612 613 614 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | - - - - - - | end++; } if (*end != 0) { goto error; } *doublePtr = d; return TCL_OK; |
︙ | |||
642 643 644 645 646 647 648 | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | - + | int Tk_GetPixels( Tcl_Interp *interp, /* Use this for error reporting. */ Tk_Window tkwin, /* Window whose screen determines conversion * from centimeters and other absolute * units. */ |
︙ | |||
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | + - + - + + + | * * TkGetDoublePixels -- * * Given a string, returns the number of pixels corresponding to that * string. * * Results: * The return value is a standard Tcl return result. If TCL_OK is * returned, then everything went well and the pixel distance is stored * at *doublePtr; otherwise TCL_ERROR is returned and an error message is * left in interp->result. * * Side effects: * None. * *-------------------------------------------------------------- */ int TkGetDoublePixels( Tcl_Interp *interp, /* Use this for error reporting. */ Tk_Window tkwin, /* Window whose screen determines conversion * from centimeters and other absolute * units. */ |
︙ | |||
731 732 733 734 735 736 737 | 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | - - - - - - | end++; } if (*end != 0) { goto error; } *doublePtr = d; return TCL_OK; |
Changes to generic/tkGrab.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" |
︙ | |||
128 129 130 131 132 133 134 | 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 | - + + + + + + + + + + + + - + | /* * The following magic value is stored in the "send_event" field of * EnterNotify and LeaveNotify events that are generated in this file. This * allows us to separate "real" events coming from the server from those that * we generated. */ |
︙ | |||
162 163 164 165 166 167 168 169 170 171 172 173 | 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 | + - + - + - - + + - + - - + + - - - - + + + + - - - - - - + - + - + + | * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ /* ARGSUSED */ int Tk_GrabObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
260 261 262 263 264 265 266 | 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 329 330 331 332 333 334 335 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 | - + - - + + - - - - + + - - + + - + - + - - + - + - + - + - | /* [grab current ?window?] */ if (objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "current ?window?"); return TCL_ERROR; } if (objc == 3) { tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), |
︙ | |||
404 405 406 407 408 409 410 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | - + + + + | ReleaseButtonGrab(dispPtr); if (dispPtr->eventualGrabWinPtr != NULL) { if ((dispPtr->eventualGrabWinPtr == winPtr) && (grabGlobal == ((dispPtr->grabFlags & GRAB_GLOBAL) != 0))) { return TCL_OK; } if (dispPtr->eventualGrabWinPtr->mainPtr != winPtr->mainPtr) { |
︙ | |||
426 427 428 429 430 431 432 | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + | * (b) it allows us to track mouse motion among all of the windows of * this application. */ dispPtr->grabFlags &= ~(GRAB_GLOBAL|GRAB_TEMP_GLOBAL); XQueryPointer(dispPtr->display, winPtr->window, &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, &dummy6, &state); |
︙ | |||
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 | - + + + + + + + + + + + + + + + + + + + + | None, CurrentTime); if (grabResult != AlreadyGrabbed) { break; } Tcl_Sleep(100); } if (grabResult != 0) { |
︙ | |||
513 514 515 516 517 518 519 | 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | - - - - - - - - - - - - - - - - - - - - - - - - - | MovePointer2(dispPtr->serverWinPtr, winPtr, NotifyGrab, 1, 0); break; } } } QueueGrabWindowChange(dispPtr, winPtr); return TCL_OK; |
︙ | |||
633 634 635 636 637 638 639 | 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | - + | * to its current window. * *---------------------------------------------------------------------- */ static void ReleaseButtonGrab( |
︙ | |||
662 663 664 665 666 667 668 | 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | - - - - - + - + | *---------------------------------------------------------------------- * * TkPointerEvent -- * * This function is called for each pointer-related event, before the * event has been processed. It does various things to make grabs work * correctly. |
︙ | |||
723 724 725 726 727 728 729 | 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | - + | /* * Keep track of what window the mouse is *really* over. Any events * that we generate have a special send_event value, which is detected * below and used to ignore the event for purposes of setting * serverWinPtr. */ |
︙ | |||
773 774 775 776 777 778 779 | 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | - - - - - - - - - - - - - - | && (winPtr != dispPtr->buttonWinPtr)) { return 0; } } return 1; } |
︙ | |||
813 814 815 816 817 818 819 | 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | - - - - - - - | winPtr2 = dispPtr->grabWinPtr; } if (winPtr2 != winPtr) { TkChangeEventWindow(eventPtr, winPtr2); Tk_QueueWindowEvent(eventPtr, TCL_QUEUE_HEAD); return 0; } |
︙ | |||
863 864 865 866 867 868 869 | 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 | - + | if (outsideGrabTree) { winPtr2 = dispPtr->grabWinPtr; /* Note 5. */ } else { winPtr2 = winPtr; /* Note 5. */ } } if (eventPtr->type == ButtonPress) { |
︙ | |||
890 891 892 893 894 895 896 | 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 | - - - + + | } } } dispPtr->buttonWinPtr = winPtr; return 1; } } else { |
︙ | |||
927 928 929 930 931 932 933 | 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 | - + - + | * None. * *---------------------------------------------------------------------- */ void TkChangeEventWindow( |
︙ | |||
1015 1016 1017 1018 1019 1020 1021 | 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 | - + | * means don't generate leave events. */ int enterType, /* Type of events to generate for windows * being entered (EnterNotify or FocusIn). 0 * means don't generate enter events. */ Tcl_QueuePosition position) /* Position at which events are added to the * system event queue. */ { |
︙ | |||
1174 1175 1176 1177 1178 1179 1180 | 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 | - + | winPtr = destPtr; if ((winPtr == NULL) || (winPtr->window == None)) { return; } } event.xcrossing.serial = LastKnownRequestProcessed(winPtr->display); |
︙ | |||
1208 1209 1210 1211 1212 1213 1214 | 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | - + | * code. * *---------------------------------------------------------------------- */ void TkGrabDeadWindow( |
︙ | |||
1260 1261 1262 1263 1264 1265 1266 | 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 | - + - + - + - - + | static void EatGrabEvents( TkDisplay *dispPtr, /* Display from which to consume events. */ unsigned int serial) /* Only discard events that have a serial * number at least this great. */ { |
︙ | |||
1298 1299 1300 1301 1302 1303 1304 | 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | - + | */ static Tk_RestrictAction GrabRestrictProc( ClientData arg, XEvent *eventPtr) { |
︙ | |||
1356 1357 1358 1359 1360 1361 1362 | 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 | - + | TkDisplay *dispPtr, /* Display on which to change the grab * window. */ TkWindow *grabWinPtr) /* Window that is to become the new grab * window (may be NULL). */ { NewGrabWinEvent *grabEvPtr; |
︙ | |||
1391 1392 1393 1394 1395 1396 1397 | 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | - + | * *---------------------------------------------------------------------- */ static int GrabWinEventProc( Tcl_Event *evPtr, /* Event of type NewGrabWinEvent. */ |
︙ | |||
1436 1437 1438 1439 1440 1441 1442 | 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 | - + | TkWindow *winPtr1, /* First window. May be NULL. */ TkWindow *winPtr2, /* Second window. May be NULL. */ int *countPtr1, /* Store nesting level of winPtr1 within * common ancestor here. */ int *countPtr2) /* Store nesting level of winPtr2 within * common ancestor here. */ { |
︙ |
Changes to generic/tkGrid.c.
︙ | |||
62 63 64 65 66 67 68 | 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 | - + - + - - + + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - + - + - + - + | /* * Default value for 'grid anchor'. */ #define GRID_DEFAULT_ANCHOR TK_ANCHOR_NW /* |
︙ | |||
231 232 233 234 235 236 237 | 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 | - + - + - + - - - - + - + - - - + + + - + - + - + - + - + - + - + - - - + + + - + - - - + + + - + - + - - + + - + | int minSize; } UniformGroup; /* * Flag values for Grid structures: * * REQUESTED_RELAYOUT 1 means a Tcl_DoWhenIdle request has already |
︙ | |||
329 330 331 332 333 334 335 | 326 327 328 329 330 331 332 333 334 335 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 | - + - - + + - + - - - - - - + - - + + - + - + - - + + - - - - - - - - - + - - + - - - - - + + + + + - + - | */ int Tk_GridObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
439 440 441 442 443 444 445 | 421 422 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 | - + - - - + + + - + - + - - - + + + - - - + + - - + + - - - + + + | */ static int GridAnchorCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
508 509 510 511 512 513 514 | 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 | - + - - - + + + - + - + - + | */ static int GridBboxCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
549 550 551 552 553 554 555 | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | - + - + | return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, objv[6], &row2) != TCL_OK) { return TCL_ERROR; } } |
︙ | |||
638 639 640 641 642 643 644 | 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | - + - - + + - + - + - - + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - - + + - - - + + + - - - - + + + + - - - - + + + + - - + + | */ static int GridForgetRemoveCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
728 729 730 731 732 733 734 | 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 | - + - - - + + + - + - - + + - + - - - - + + + - - - - + - - - - - - + + + + + - - - + + | */ static int GridInfoCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
790 791 792 793 794 795 796 | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 | - + - - - - - + + + + + - + + + + + - - - - - + - + - - + + - + - - - + + + - + - - + + - + - - + + - + | */ static int GridLocationCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
883 884 885 886 887 888 889 | 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | - + - - + + - + - + - + - + - - - - - - - - - - - + - - - - - + - - + + - - + + - - - + + + | */ static int GridPropagateCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
971 972 973 974 975 976 977 | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 | - + - - + + - - + + - + - + - - - + + + - - - + + + - - + + + - - + - - + - - + + | */ static int GridRowColumnConfigureCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
1065 1066 1067 1068 1069 1070 1071 | 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 | - + - + - + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - - + + - - + + - + - - - - - + + + + + + - - - + + + - - + - + - + - + - - - + + + - - - + + - - + + - - - + + + - + - + - + + + + - + - + - + - + + + + - + - + - - + + - + - + - + - + - + - - + + - - - + + + - - - - - - - | pad = slotPtr[slot].pad; weight = slotPtr[slot].weight; uniform = slotPtr[slot].uniform; } Tcl_ListObjAppendElement(interp, res, Tcl_NewStringObj("-minsize", -1)); |
︙ | |||
1304 1305 1306 1307 1308 1309 1310 | 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 | - + - - - + + + - + - + - - - + + + - + - + - - + + - + - + - - - + + + - + - + - + - - + + - - + + - - + - + - + - - - - + + + + - - + + - + + | */ static int GridSizeCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
1438 1439 1440 1441 1442 1443 1444 | 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 | - + - + - + - + - + - + - + - - + + - + - + - - + + - - + + | *---------------------------------------------------------------------- */ static void GridReqProc( ClientData clientData, /* Grid's information about window that got * new preferred geometry. */ |
︙ | |||
1506 1507 1508 1509 1510 1511 1512 | 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 | - + - + | *---------------------------------------------------------------------- */ static int AdjustOffsets( int size, /* The total layout size (in pixels). */ int slots, /* Number of slots. */ |
︙ | |||
1653 1654 1655 1656 1657 1658 1659 | 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 | - + - + - + - - - + + + - - - - + + + + - - - + + + - - - + + + | } /* *---------------------------------------------------------------------- * * AdjustForSticky -- * |
︙ | |||
1721 1722 1723 1724 1725 1726 1727 | 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 | - + - + - - - + + + - + - - - + + + + - + - + - - + + - + - + - - - - - - - + + + + + + + - - + + - - + + - - - - + + + + - - + + - - + + - + - - - - - - + + + + + + - + - + - - + + + - - + + - - + + - + - + - + - + - - - - - + + + + + - - + + - - + + - - + + - + - - + + - + - + - - + + - + - + - - - + + + - - - + + + - + + | * time so that a series of grid requests can be merged into a single * layout operation. * * Results: * None. * * Side effects: |
︙ | |||
2005 2006 2007 2008 2009 2010 2011 | 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 | - - + + - + - + - - - + + + - - - - - + + + + + - + - - - + + + - - - - - + + + + + - + - - + - + | layoutPtr[slot].uniform = NULL; layoutPtr[slot].pad = 0; layoutPtr[slot].binNextPtr = NULL; } /* * Step 2. |
︙ | |||
2120 2121 2122 2123 2124 2125 2126 | 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 | - + - + - + - - + + - - + + - + - - + + - - + + | if (uniformGroups > 0) { for (slot = 0; slot < gridCount; slot++) { if (layoutPtr[slot].uniform != NULL) { for (start = 0; start < uniformGroups; start++) { if (uniformGroupPtr[start].group == layoutPtr[slot].uniform) { |
︙ | |||
2393 2394 2395 2396 2397 2398 2399 | 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 | - + - + | } } } /* * Step 6. * All of the space has been apportioned; copy the layout information back |
︙ | |||
2431 2432 2433 2434 2435 2436 2437 | 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 | - + - + - + - - + + - + - + - + - + - + - + - + - + - + - - - - + + + + - - - - + + + + - + - + - + - + - + - - + + - + - - - + + - + - + - + - + - + - - + + - + - - - + + - + - + - + - - - + + + - - + + - + - - + + - + - - + + - - + + - + - + - + - + - + - - + + - - - + + + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - - + + + - - + + - + - - + - - - - - - - - - - - - - - + - + - + - - - + + + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - - - - - + + + + - + - + - + - + - + - + - - - + + + - + - - + + - + - + - + - + - - - + + + - - + - + - + - + - + - + - + - + - + - + - - - + + + - - + + - - + + - - + + - - + + - - - - + + + - - - + + - - - + + - - - - + - - - + + - - + + - - - - + + + + - + - - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + - + - + - - + + - - - - + + + - + - - - - + + + - + - + - - + - + - - + + - - + - - - + + - + - + - - - - + + + - + - + - - - - + + + - + - + - + - + - - - + + - + - - - - + + + - + - + - - + + - + - + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + - + - - - + + - - + - + - + - - - - + + + - - - - - - + + + + - - - - - - - - - - + - - - - - - - + + - - + + - - + + - + - + - - + + - - - + + + - - + + - + - + - + - - + - - + | */ static Gridder * GetGrid( Tk_Window tkwin) /* Token for window for which grid structure * is desired. */ { |
︙ | |||
3492 3493 3494 3495 3496 3497 3498 | 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 | - - + + - - - - - + + + + + - - + + - - - + + - + - - + - - + - - - - - - - - - - - - - - - - + - + - - - + + + + - - - - + + - - + + - - + + - - + + - + + + + + | lastRow = otherPtr->row + otherPtr->numRows - 2; lastColumn = otherPtr->column + otherPtr->numCols; } lastColumn += numSkip; match = 0; |
︙ | |||
3602 3603 3604 3605 3606 3607 3608 | 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 | - + | * none * *---------------------------------------------------------------------- */ static int StringToSticky( |
︙ | |||
3648 3649 3650 3651 3652 3653 3654 | 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 | - + - - + + | * None. * *---------------------------------------------------------------------- */ static Tcl_Obj * NewPairObj( |
︙ | |||
3675 3676 3677 3678 3679 3680 3681 | 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 | - + - - - - + + + + | * None. * *---------------------------------------------------------------------- */ static Tcl_Obj * NewQuadObj( |
Changes to generic/tkImage.c.
︙ | |||
11 12 13 14 15 16 17 | 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 | - - + + - - + + - + - + - - + + - + - + - - + + - + - - + + - + - + - + | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" /* * Each call to Tk_GetImage returns a pointer to one of the following |
︙ | |||
139 140 141 142 143 144 145 | 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 | - - + - - + + - + - - + - - + + - + | * command. * *---------------------------------------------------------------------- */ void Tk_CreateOldImageType( |
︙ | |||
201 202 203 204 205 206 207 | 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 | - + - + - + - + - + - - - + + - - + - | */ int Tk_ImageObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
268 269 270 271 272 273 274 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - + - - + + - + - + - - + + - - - - - - - - - - - - - + + + + + + + + + + + - + - - - + + + - + - - - + + + - - + + - + + + - + - - - - - + + + + + - + - + - + - - + + - - + + - - + + + - - + + - + - - - + + - - + + - - - - + - - + - - + - - + + - + - - + + - + - - + - + - + - | if ((*arg == typePtr->name[0]) && (strcmp(arg, typePtr->name) == 0)) { break; } } } if (typePtr == NULL) { |
︙ | |||
517 518 519 520 521 522 523 | 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 | - + - + - - - + + + - - + + - + - + - + - + - + - + - + | * redisplay themselves as appropriate. * *---------------------------------------------------------------------- */ void Tk_ImageChanged( |
︙ | |||
597 598 599 600 601 602 603 | 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | - + - + - - + + - + - + - + - + - - + + - + - - | Tk_Image Tk_GetImage( Tcl_Interp *interp, /* Place to leave error message if image can't * be found. */ Tk_Window tkwin, /* Token for window in which image will be * used. */ |
︙ | |||
663 664 665 666 667 668 669 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | - + - - + + - + - + - + - - + + - - - + + + - - + + | void Tk_FreeImage( Tk_Image image) /* Token for image that is no longer needed by * a widget. */ { Image *imagePtr = (Image *) image; |
︙ | |||
735 736 737 738 739 740 741 | 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | - + - + - - - - + + + + - - + + - + | Image *imagePtr = (Image *) image; int result; XImage *ximage; Pixmap pmap; GC newGC; XGCValues gcValues; |
︙ | |||
831 832 833 834 835 836 837 | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 | - + - + - - + + - - + + - - - + + + | * the Tk_GetImage call for the image. */ int drawableX, int drawableY) /* Coordinates in drawable that correspond to * imageX and imageY. */ { Image *imagePtr = (Image *) image; |
︙ | |||
889 890 891 892 893 894 895 | 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 | - - + + | Tk_SizeOfImage( Tk_Image image, /* Token for image whose size is wanted. */ int *widthPtr, /* Return width of image here. */ int *heightPtr) /* Return height of image here. */ { Image *imagePtr = (Image *) image; |
︙ | |||
914 915 916 917 918 919 920 | 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | - + - + - + - + - - + + - + + - - - - + + + + - + - - - + + + - - + + - + | *---------------------------------------------------------------------- */ void Tk_DeleteImage( Tcl_Interp *interp, /* Interpreter in which the image was * created. */ |
︙ | |||
998 999 1000 1001 1002 1003 1004 | 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 | - + - + - - - + + + + | * ill effects. * *---------------------------------------------------------------------- */ static void EventuallyDeleteImage( |
︙ | |||
1039 1040 1041 1042 1043 1044 1045 | 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 | - + - + - + - + - + - - + - + - + + - - + + - - + + | * going away. */ { Tcl_HashSearch search; Tcl_HashEntry *hPtr; for (hPtr = Tcl_FirstHashEntry(&mainPtr->imageTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { |
︙ | |||
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 | 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 | + | * Side Effects: * The GCTileStipOrigin is reset in the GC. This will cause the tile * origin to change when the GC is used for drawing. * *---------------------------------------------------------------------- */ /*ARGSUSED*/ void Tk_SetTSOrigin( Tk_Window tkwin, GC gc, int x, int y) { while (!Tk_TopWinHierarchy(tkwin)) { |
︙ |
Changes to generic/tkImgBmap.c.
︙ | |||
10 11 12 13 14 15 16 | 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 | - + - - + + - - + + - + - + - + - - + + | * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" /* |
︙ | |||
94 95 96 97 98 99 100 | 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 329 330 331 332 333 334 335 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 416 417 | - + - - + - + - + - + - + - + - - + + - + - + - - + + + - + - + - - + + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + - + - - + + - + - + - + - - - + + + + - + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - + - - + - - + + - + - - - - - - + + + + + + - - - + - - + + - - + + - + - + - + - - - + + + - - + + - + - - + + - + - - + + - + | "bitmap", /* name */ ImgBmapCreate, /* createProc */ ImgBmapGet, /* getProc */ ImgBmapDisplay, /* displayProc */ ImgBmapFree, /* freeProc */ ImgBmapDelete, /* deleteProc */ ImgBmapPostscript, /* postscriptProc */ |
︙ | |||
441 442 443 444 445 446 447 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | - - - - + + + + | * it clear that this instance cannot be displayed. Then report the error. */ if (instancePtr->gc != NULL) { Tk_FreeGC(Tk_Display(instancePtr->tkwin), instancePtr->gc); } instancePtr->gc = NULL; |
︙ | |||
472 473 474 475 476 477 478 | 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 | - - + + - + - - + - - + - - - + + | * *---------------------------------------------------------------------- */ char * TkGetBitmapData( Tcl_Interp *interp, /* For reporting errors, or NULL. */ |
︙ | |||
596 597 598 599 600 601 602 | 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | - - - + + - - - + | } if ((pi.word[0] == '{') && (pi.word[1] == 0)) { goto getData; } } } else if ((pi.word[0] == '{') && (pi.word[1] == 0)) { if (interp != NULL) { |
︙ | |||
642 643 644 645 646 647 648 | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 | - - + - | *heightPtr = height; *hotXPtr = hotX; *hotYPtr = hotY; return data; error: if (interp != NULL) { |
︙ | |||
681 682 683 684 685 686 687 | 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | - - + | */ static int NextBitmapWord( ParseInfo *parseInfoPtr) /* Describes what we're reading and where we * are in it. */ { |
︙ | |||
747 748 749 750 751 752 753 | 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | - + - + - - + + - + - - + + - + - + - + - + | * See the user documentation. * *-------------------------------------------------------------- */ static int ImgBmapCmd( |
︙ | |||
812 813 814 815 816 817 818 | 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 | - + - + - + - + - + - + - - + + - - + + - + | *---------------------------------------------------------------------- */ static ClientData ImgBmapGet( Tk_Window tkwin, /* Window in which the instance will be * used. */ |
︙ | |||
890 891 892 893 894 895 896 | 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 | - + | int imageX, int imageY, /* Upper-left corner of region within image to * draw. */ int width, int height, /* Dimensions of region within image to draw. */ int drawableX, int drawableY) /* Coordinates within drawable that correspond * to imageX and imageY. */ { |
︙ | |||
944 945 946 947 948 949 950 | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 | - + + - + | static void ImgBmapFree( ClientData clientData, /* Pointer to BitmapInstance structure for * instance to be displayed. */ Display *display) /* Display containing window that used image. */ { |
︙ | |||
971 972 973 974 975 976 977 | 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - - + + - + - + - + - + - + - + - - - + + + - - + + - - + + - - + + | } if (instancePtr->mask != None) { Tk_FreePixmap(display, instancePtr->mask); } if (instancePtr->gc != NULL) { Tk_FreeGC(display, instancePtr->gc); } |
︙ | |||
1043 1044 1045 1046 1047 1048 1049 | 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | - + - + - - - + + + | * The image is deleted. * *---------------------------------------------------------------------- */ static void ImgBmapCmdDeletedProc( |
︙ | |||
1075 1076 1077 1078 1079 1080 1081 | 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 | - + - + + | */ static int GetByte( Tcl_Channel chan) /* The channel we read from. */ { char buffer; |
︙ | |||
1106 1107 1108 1109 1110 1111 1112 1113 | 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 | + + + + - + + - + - + - + - + + | * * 2. The origin of the postscript coordinate system is set to the * lower left corner of the bitmap. * * 3. The postscript coordinate system has been scaled so that the * entire bitmap is one unit squared. * * Some postscript implementations cannot handle bitmap strings longer * than about 60k characters. If the bitmap data is that big or bigger, * then we render it by splitting it into several smaller bitmaps. * * Results: |
︙ | |||
1150 1151 1152 1153 1154 1155 1156 | 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 | + + + + + + - - + + + - - - - + + + + + - + - + + + - - + + - - + - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + - + - + - - + - - - - - - + + + + - - - + + + - + - + - - + - - + - - + - - + - - - - + - - - - - + - - - - + | 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243, 11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251, 7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247, 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255, }; if (width*height > 60000) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "unable to generate postscript for bitmaps " "larger than 60000 pixels", NULL); return TCL_ERROR; } |
Changes to generic/tkImgGIF.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 | - + + + + | /* * tkImgGIF.c -- * * A photo image file handler for GIF files. Reads 87a and 89a GIF files. * At present, there only is a file write function. GIF images may be * read using the -data option of the photo image. The data may be given * as a binary string in a Tcl_Obj or by representing the data as BASE64 * encoded ascii. Derived from the giftoppm code found in the pbmplus * package and tkImgFmtPPM.c in the tk4.0b2 distribution. * * Copyright (c) Reed Wade ([email protected]), University of Tennessee * Copyright (c) 1995-1997 Sun Microsystems, Inc. * Copyright (c) 1997 Australian National University |
︙ | |||
51 52 53 54 55 56 57 | 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 | - + - + - + | * state keeps track of which byte we are about to read, or EOF. */ typedef struct mFile { unsigned char *data; /* mmencoded source string */ int c; /* bits left over from previous character */ int state; /* decoder state (0-4 or GIF_DONE) */ |
︙ | |||
102 103 104 105 106 107 108 | 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 | - - - - - - - - - - - + - - + - + - | int done; unsigned int window; int bitsInWindow; unsigned char *c; } reader; } GIFImageConfig; |
︙ | |||
183 184 185 186 187 188 189 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | unsigned char cmap[MAXCOLORMAPSIZE][4], int srcX, int srcY, int interlace, int transparent); /* * these are for the BASE64 image reader code only */ |
︙ | |||
347 348 349 350 351 352 353 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - + - - - | FileMatchGIF( Tcl_Channel chan, /* The image file, open for reading. */ const char *fileName, /* The name of the image file. */ Tcl_Obj *format, /* User-specified format object, or NULL. */ int *widthPtr, int *heightPtr, /* The dimensions of the image are returned * here if the file is a valid raw GIF file. */ |
︙ | |||
392 393 394 395 396 397 398 | 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 329 330 331 332 333 334 335 336 337 | - - + - + - - - - + + - - - + + - - - - + + - - + + - - - + - | * image to be written to. */ int width, int height, /* Dimensions of block of photo image to be * written to. */ int srcX, int srcY) /* Coordinates of top-left pixel to be used in * image being read. */ { int fileWidth, fileHeight, imageWidth, imageHeight; |
︙ | |||
509 510 511 512 513 514 515 | 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 | - - + + - - - - + - - + - + - - - - + - - + - + - + - - | while (1) { if (Fread(gifConfPtr, buf, 1, 1, chan) != 1) { /* * Premature end of image. */ |
︙ | |||
579 580 581 582 583 584 585 | 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - - + - - - - - - + - - - | if (index--) { /* * This is not the GIF frame we want to read: skip it. */ if (BitSet(buf[8], LOCALCOLORMAP)) { if (!ReadColorMap(gifConfPtr, chan, bitPixel, colorMap)) { |
︙ | |||
635 636 637 638 639 640 641 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - - + - | /* * Found the frame we want to read. Next, check for a local color map for * this frame. */ if (BitSet(buf[8], LOCALCOLORMAP)) { if (!ReadColorMap(gifConfPtr, chan, bitPixel, colorMap)) { |
︙ | |||
683 684 685 686 687 688 689 | 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 | - - - - - - - + - - - + - - + - + - + - + - + - + | block.width = width; block.height = height; block.pixelSize = (transparent>=0) ? 4 : 3; block.offset[0] = 0; block.offset[1] = 1; block.offset[2] = 2; block.offset[3] = (transparent>=0) ? 3 : 0; |
︙ | |||
753 754 755 756 757 758 759 | 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | - + - + - - - + | static int StringMatchGIF( Tcl_Obj *dataObj, /* the object containing the image data */ Tcl_Obj *format, /* the image format object, or NULL */ int *widthPtr, /* where to put the string width */ int *heightPtr, /* where to put the string height */ |
︙ | |||
827 828 829 830 831 832 833 | 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | - + - + | Tcl_Obj *format, /* format object, or NULL */ Tk_PhotoHandle imageHandle, /* the image to write this data into */ int destX, int destY, /* The rectangular region of the */ int width, int height, /* image to copy */ int srcX, int srcY) { MFile handle, *hdlPtr = &handle; |
︙ | |||
918 919 920 921 922 923 924 | 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | - + | int number, unsigned char buffer[MAXCOLORMAPSIZE][4]) { int i; unsigned char rgb[3]; for (i = 0; i < number; ++i) { |
︙ | |||
943 944 945 946 947 948 949 | 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | - + - + - + - + | int label, unsigned char *buf, int *transparent) { int count; switch (label) { |
︙ | |||
984 985 986 987 988 989 990 | 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 | - + - + | GetDataBlock( GIFImageConfig *gifConfPtr, Tcl_Channel chan, unsigned char *buf) { unsigned char count; |
︙ | |||
1035 1036 1037 1038 1039 1040 1041 | 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 | - - + + - + - - - - - + + + - + - | int len, int rows, unsigned char cmap[MAXCOLORMAPSIZE][4], int srcX, int srcY, int interlace, int transparent) { unsigned char initialCodeSize; |
︙ | |||
1255 1256 1257 1258 1259 1260 1261 | 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 | - - - - - - - - - - - - - - - - - - - | ypos = interlaceStart[pass]; } } else { ypos++; } pixelPtr = imagePtr + (ypos) * len * ((transparent>=0)?4:3); } |
︙ | |||
1395 1396 1397 1398 1399 1400 1401 | 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 | - + | *---------------------------------------------------------------------- */ static void mInit( unsigned char *string, /* string containing initial mmencoded data */ MFile *handle, /* mmdecode "file" handle */ |
︙ | |||
1421 1422 1423 1424 1425 1426 1427 | 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 | - + - - + + | * * Side effects: * The base64 handle will change state. * *---------------------------------------------------------------------- */ |
︙ | |||
1474 1475 1476 1477 1478 1479 1480 | 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 | - + | if (handle->length-- <= 0) { return GIF_DONE; } c = char64(*handle->data); handle->data++; } while (c == GIF_SPACE); |
︙ | |||
1570 1571 1572 1573 1574 1575 1576 | 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 | - + - - + + - + - + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * a base64 encoded string. * * Results: - same as POSIX fread() or Tcl Tcl_Read() * *---------------------------------------------------------------------- */ |
︙ | |||
1648 1649 1650 1651 1652 1653 1654 | 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - + - - - - - - + + + + + + - - + + - + - + - - - - + + + + - - - - - + + + + + - - - + + - + - + - + - + - + - + - + - + - + - - - - - - - + + + + + + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + + - + - - - + + - + - + + - - - + + - + - + + - - - + + + - + - - - + + + - + + - + - - - - + + + - + - + + + - + - + - - - - + + - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + + + + + + + + + - - + + + + - - - + - - - - + + + - - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + - - + + + + + + - - - - + + - - + + - - - - - - - + + + + + + + + - - - - - + + + - - - + + + + + + - - - + + + - - + + + + - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + - - + + - - - - + + + + - - - + + - - - - - - - - - + + + + + + + + + + + - - - - - + + + + - - - + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + - - - - + - - - - - - - + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - - + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + - - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + - - - - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - + + + - + - - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - + - - + - - - - + - - - - - + + + + + + + + + | } if (Tcl_SetChannelOption(interp, chan, "-translation", "binary") != TCL_OK) { Tcl_Close(NULL, chan); return TCL_ERROR; } |
Deleted generic/tkImgListFormat.c.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted generic/tkImgPNG.c.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tkImgPPM.c.
︙ | |||
30 31 32 33 34 35 36 | 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 | - + - + - + - | #define PGM 1 #define PPM 2 /* * The format record for the PPM file format: */ |
︙ | |||
90 91 92 93 94 95 96 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - + + - + | * *---------------------------------------------------------------------- */ static int FileMatchPPM( Tcl_Channel chan, /* The image file, open for reading. */ |
︙ | |||
126 127 128 129 130 131 132 | 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 | - - + + - + - - - - + + - - + + - - - - - + + + + + | *---------------------------------------------------------------------- */ static int FileReadPPM( Tcl_Interp *interp, /* Interpreter to use for reporting errors. */ Tcl_Channel chan, /* The image file, open for reading. */ |
︙ | |||
208 209 210 211 212 213 214 | 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 | - + - - + - - - + + + - - + | if (nLines > height) { nLines = height; } if (nLines <= 0) { nLines = 1; } nBytes = nLines * block.pitch; |
︙ | |||
246 247 248 249 250 251 252 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + - + | value = value * 255 / maxIntensity; p[0] = p[1] = (unsigned char) value; } } block.height = nLines; if (Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY, width, nLines, TK_PHOTO_COMPOSITE_SET) != TCL_OK) { |
︙ | |||
277 278 279 280 281 282 283 | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | - - + + - + - | * *---------------------------------------------------------------------- */ static int FileWritePPM( Tcl_Interp *interp, |
︙ | |||
313 314 315 316 317 318 319 | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | - + - - - + + + - - + + | pixLinePtr = blockPtr->pixelPtr + blockPtr->offset[0]; greenOffset = blockPtr->offset[1] - blockPtr->offset[0]; blueOffset = blockPtr->offset[2] - blockPtr->offset[0]; if ((greenOffset == 1) && (blueOffset == 2) && (blockPtr->pixelSize == 3) && (blockPtr->pitch == (blockPtr->width * 3))) { nBytes = blockPtr->height * blockPtr->pitch; |
︙ | |||
366 367 368 369 370 371 372 | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | - + | * *---------------------------------------------------------------------- */ static int StringWritePPM( Tcl_Interp *interp, |
︙ | |||
442 443 444 445 446 447 448 | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | - + - + | * *---------------------------------------------------------------------- */ static int StringMatchPPM( Tcl_Obj *dataObj, /* The image data. */ |
︙ | |||
477 478 479 480 481 482 483 | 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 | - + - - - + + - - - + + + + + - - + + - - + | *---------------------------------------------------------------------- */ static int StringReadPPM( Tcl_Interp *interp, /* Interpreter to use for reporting errors. */ Tcl_Obj *dataObj, /* The image data. */ |
︙ | |||
552 553 554 555 556 557 558 | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | - - + - | if (maxIntensity == 0x00ff) { /* * We have all the data in memory, so write everything in one go. */ if (block.pitch*height > dataSize) { |
︙ | |||
576 577 578 579 580 581 582 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | - + - + - - + - + - + - + | if (nLines > height) { nLines = height; } if (nLines <= 0) { nLines = 1; } nBytes = nLines * block.pitch; |
︙ | |||
759 760 761 762 763 764 765 | 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | - + - - + | int *maxIntensityPtr, /* The maximum intensity value for the image * is stored here. */ unsigned char **dataBufferPtr, int *dataSizePtr) { #define BUFFER_SIZE 1000 char buffer[BUFFER_SIZE], c; |
︙ |
Deleted generic/tkImgPhInstance.c.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tkImgPhoto.c.
︙ | |||
14 15 16 17 18 19 20 | 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 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * Author: Paul Mackerras ([email protected]), * Department of Computer Science, * Australian National University. */ |
︙ | |||
44 45 46 47 48 49 50 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - - - - - - - - - - - + + + + + + + + - - + - - - - - + + + + + + + + + - - - + + + - + - - + - - - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + - + - - + + + - - + + + + + + + + + - + + + + + + + + + + - + + + + + + - + + + + + - + - - + - - - + + | /* * Bit definitions for use with ParseSubcommandOptions: each bit is set in the * allowedOptions parameter on a call to ParseSubcommandOptions if that option * is allowed for the current photo image subcommand. On return, the bit is * set in the options field of the SubcommandOptions structure if that option * was specified. * |
︙ | |||
257 258 259 260 261 262 263 | 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 | - - + - + - - + - + - - + - - - + | * Side effects: * The new image file format is entered into a table used in the photo * image "read" and "write" subcommands. * *---------------------------------------------------------------------- */ |
︙ | |||
334 335 336 337 338 339 340 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | - + - + - - + + - + - + - - - - - - - - - - + + + + + + + + + + - - + + - + | *---------------------------------------------------------------------- */ static int ImgPhotoCreate( Tcl_Interp *interp, /* Interpreter for application containing * image. */ |
︙ | |||
394 395 396 397 398 399 400 | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | - + - + - + - - + + + + - - + - + + + + - + + + - + - + - - - - + + + + - - - + + + - + - + - - + + - - + + - + - + - + - - - - - - + + - + - + - - - - - - + + - + - - - + + + - | * See the user documentation. * *---------------------------------------------------------------------- */ static int ImgPhotoCmd( |
︙ | |||
569 570 571 572 573 574 575 | 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | - + - - + - - + - - - - - + + - - - + | /* * Look for the source image and get a pointer to its image data. * Check the values given for the -from option. */ srcHandle = Tk_FindPhoto(interp, Tcl_GetString(options.name)); if (srcHandle == NULL) { |
︙ | |||
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 | + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - + + - - - - + + + + - - - + + - - - + + + - - - - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + - - - - - - + + + + + + + - - + - - - + + - - + + + - + - + - - - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - + + + - - - - - - - - + + + + - - - - + - - + + - - + - - + - + - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - - - - - + + - - + - - - + - - - + + + - - - + - - + - - - - + + + - - + - - - - - - - - - - - - + + + + - + - - + + - | height = 0; } else { height = (height - options.subsampleY - 1) / -options.subsampleY; } options.toY2 = options.toY + height * options.zoomY; } /* * Set the destination image size if the -shrink option was specified. */ if (options.options & OPT_SHRINK) { if (ImgPhotoSetSize(masterPtr, options.toX2, options.toY2) != TCL_OK) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, TK_PHOTO_ALLOC_FAILURE_MESSAGE, NULL); return TCL_ERROR; } } /* * Copy the image data over using Tk_PhotoPutZoomedBlock. */ block.pixelPtr += options.fromX * block.pixelSize + options.fromY * block.pitch; block.width = options.fromX2 - options.fromX; block.height = options.fromY2 - options.fromY; |
︙ | |||
994 995 996 997 998 999 1000 | 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 | - - + + - - - + - + - - + - - - + - + - - - - - + + + + + - + - - - + + + - + - - - + + + - + - + - - + - - + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - + + + - - - - - + + + + + + + + + + - + - - - - - - - + + - + - - - + - - - - + - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - + + - - - + + + + + + + + + + + + + - - + + + + - - - - + + + - + - - - - + + - - + - - - - + + + + - - - + + - + - - - - + + - - - - - - - - - - - + + + - - - - + + + - - - - - - - - - - - - - + - - - + + - - + + + - - + + + - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + - - - - - - - - - + - + - - + - + - - + + - - + + - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + + + + - + - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + + + + - + + + - + + | /* * Check the values given for the -from option. */ if ((options.fromX > imageWidth) || (options.fromY > imageHeight) || (options.fromX2 > imageWidth) || (options.fromY2 > imageHeight)) { |
︙ | |||
1634 1635 1636 1637 1638 1639 1640 | 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 | + - + - + + - + - + + - + - + - - - - - - - - - - - + + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - + - + - + - + - - - + + - - - + - - - + + - - - + - + - + - - + + - - + + - + - - - + + + - - - + + - - + + - + - - + + - - + + - + - - - - + + + + - - - - + + + + - - + + - - - + - - + + - + - - + + - - + - - + + - + - - - + + + - - + + - - - + + + - - - + + - - - + + + - + - - + + - - - + + + - + - + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + | * the SubcommandOptions structure. */ switch (bit) { case OPT_FROM: if ((values[0] < 0) || (values[1] < 0) || ((numValues > 2) && ((values[2] < 0) || (values[3] < 0)))) { Tcl_AppendResult(interp, "value(s) for the -from", |
︙ | |||
2164 2165 2166 2167 2168 2169 2170 | 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 | - + - + - - - + + + - + - + - - + + - - + + - - - + + + + + + + - - + - + - - + + - + - - + + - + - + - + - - + + - + - + - + - + - - - + + + - - + + - - - + + + - - - - + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * The image is deleted. * *---------------------------------------------------------------------- */ static void ImgPhotoCmdDeletedProc( |
︙ | |||
2391 2392 2393 2394 2395 2396 2397 | 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 | - + - + - - + - - - + + - - - + - - + - - - + + - - - + - - - + + - - - - - + + - - - + | *---------------------------------------------------------------------- */ static int MatchFileFormat( Tcl_Interp *interp, /* Interpreter to use for reporting errors. */ Tcl_Channel chan, /* The image file, open for reading. */ |
︙ | |||
2545 2546 2547 2548 2549 2550 2551 | 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 | - + - + - - - - - - - - - - - - - + + - - - - - - - - - - - - - - + + - - - - + + - - - + - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - + - - - - + + - - - - - - - - + - + - - - + + + - + | * is returned here. */ int *widthPtr, int *heightPtr, /* The dimensions of the image are returned * here. */ int *oldformat) /* Returns 1 if the old image API is used. */ { int matched = 0, useoldformat = 0; |
︙ | |||
2748 2749 2750 2751 2752 2753 2754 | 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 | - + - - + - - - - - + - - - - - - + + - - - + + + - - - - - - - - - - - - - - - + + - - - + - - - - - - - + + - - + - - - - - + - - - - + + - - - - - - + + - - - + - - - - - - - - - - + + - - + + - - - - + + + + - + - + - - + + - + - - - + + + - - + + - + - - + + - + - - + + - + | int Tk_PhotoPutBlock( Tcl_Interp *interp, /* Interpreter for passing back error * messages, or NULL. */ Tk_PhotoHandle handle, /* Opaque handle for the photo image to be * updated. */ |
︙ | |||
3031 3032 3033 3034 3035 3036 3037 | 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 | - + | destPtr[2], Alpha); destPtr[3] = PD_SRC_OVER_ALPHA(alpha, Alpha); } destPtr += 4; } } |
︙ | |||
3075 3076 3077 3078 3079 3080 3081 | 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 | - - + + - + - - + + - - + + - + - - - + + + - - + - - - - + - - - - + + + + + - - - + + - - + - + - + - + - - + + - - - - - - - - | recalculateValidRegion: workRgn = TkCreateRegion(); rect.x = x; rect.y = y; rect.width = width; rect.height = height; TkUnionRectWithRegion(&rect, workRgn, workRgn); |
︙ | |||
3182 3183 3184 3185 3186 3187 3188 | 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 | - + - + - - - - - - - - - - - - + + - - - + + + - - - - - - - - - - - - - - + + - - - + - - - - - - - - - + + - - - - - + - - - - + + - - - + + - - + - - - - - - - - - - - - - + + - - + + - - - - + + + + - + - + - - + + - + - + - + - + - - + + - + - + - + | int Tk_PhotoPutZoomedBlock( Tcl_Interp *interp, /* Interpreter for passing back error * messages, or NULL. */ Tk_PhotoHandle handle, /* Opaque handle for the photo image to be * updated. */ |
︙ | |||
3443 3444 3445 3446 3447 3448 3449 | 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 | - - + + - + - - + + - - + + - + - + - + - + - + - + - + - + - - + + - - - - - - - - - + - + - + - + - + - + - - - + + + - + - + - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | TkRegion workRgn = TkCreateRegion(); rect.x = x; rect.y = y; rect.width = width; rect.height = 1; TkUnionRectWithRegion(&rect, workRgn, workRgn); |
︙ | |||
3614 3615 3616 3617 3618 3619 3620 | 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 | - + - - + + - - + + - + - - - + + + - + + + + + - - + + | *---------------------------------------------------------------------- */ void Tk_PhotoBlank( Tk_PhotoHandle handle) /* Handle for the image to be blanked. */ { |
︙ | |||
3676 3677 3678 3679 3680 3681 3682 | 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 | - + - - + + - - + + - - - + + + - - + + - - - + + | int Tk_PhotoExpand( Tcl_Interp *interp, /* Interpreter for passing back error * messages, or NULL. */ Tk_PhotoHandle handle, /* Handle for the image to be expanded. */ int width, int height) /* Desired minimum dimensions of the image. */ { |
︙ | |||
3724 3725 3726 3727 3728 3729 3730 | 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 | - + - - + + | Tk_PhotoGetSize( Tk_PhotoHandle handle, /* Handle for the image whose dimensions are * requested. */ int *widthPtr, int *heightPtr) /* The dimensions of the image are returned * here. */ { |
︙ | |||
3756 3757 3758 3759 3760 3761 3762 | 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 | - + - - - - + + + + - - + + - - - + + | Tk_PhotoSetSize( Tcl_Interp *interp, /* Interpreter for passing back error * messages, or NULL. */ Tk_PhotoHandle handle, /* Handle for the image whose size is to be * set. */ int width, int height) /* New dimensions for the image. */ { |
︙ | |||
3799 3800 3801 3802 3803 3804 3805 | 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 | - + - + | */ TkRegion TkPhotoGetValidRegion( Tk_PhotoHandle handle) /* Handle for the image whose valid region is * to obtained. */ { |
︙ | |||
3827 3828 3829 3830 3831 3832 3833 | 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 | - + - + - + | * None. * *---------------------------------------------------------------------- */ static char * ImgGetPhoto( |
︙ | |||
3871 3872 3873 3874 3875 3876 3877 | 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 | - + - - + + - - - - - - | if (!alphaOffset) { blockPtr->offset[3]= -1; /* Tell caller alpha need not be read */ } greenOffset = blockPtr->offset[1] - blockPtr->offset[0]; blueOffset = blockPtr->offset[2] - blockPtr->offset[0]; if (((optPtr->options & OPT_BACKGROUND) && alphaOffset) || ((optPtr->options & OPT_GRAYSCALE) && (greenOffset||blueOffset))) { |
︙ | |||
3982 3983 3984 3985 3986 3987 3988 | 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 | - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | blockPtr->width * blockPtr->pixelSize; } } blockPtr->pixelPtr = (unsigned char *) data; blockPtr->pixelSize = newPixelSize; blockPtr->pitch = newPixelSize * blockPtr->width; blockPtr->offset[0] = 0; |
︙ | |||
4024 4025 4026 4027 4028 4029 4030 | 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 | - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + | Tk_PhotoGetImage( Tk_PhotoHandle handle, /* Handle for the photo image from which image * data is desired. */ Tk_PhotoImageBlock *blockPtr) /* Information about the address and layout of * the image data is returned here. */ { |
︙ | |||
4119 4120 4121 4122 4123 4124 4125 | 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 | - + | /* *---------------------------------------------------------------------- * * Tk_PhotoExpand_Panic, Tk_PhotoPutBlock_Panic, * Tk_PhotoPutZoomedBlock_Panic, Tk_PhotoSetSize_Panic * |
︙ | |||
4172 4173 4174 4175 4176 4177 4178 | 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 | - - | Tk_PhotoHandle handle, int width, int height) { if (Tk_PhotoSetSize(NULL, handle, width, height) != TCL_OK) { Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } } |
Deleted generic/tkImgPhoto.h.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted generic/tkImgSVGnano.c.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tkImgUtil.c.
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + | */ dataWidth = image->bytes_per_line; if (dataWidth % alignment) { dataWidth += (alignment - (dataWidth % alignment)); } |
︙ |
Changes to generic/tkInt.decls.
︙ | |||
13 14 15 16 17 18 19 | 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 | - - - + + - + - - - + + + + + - + + + + - + - + | library tk ############################################################################## # Define the unsupported generic interfaces. interface tkInt |
︙ | |||
95 96 97 98 99 100 101 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + | Display *display, Drawable drawable, GC gc, GC outlineGC) } declare 21 { int TkFindStateNum(Tcl_Interp *interp, const char *option, const TkStateMap *mapPtr, const char *strKey) } declare 22 { |
︙ | |||
121 122 123 124 125 126 127 | 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 | - - + + - + | } # Name change only, TkFreeCursor in Tcl 8.0.x now TkpFreeCursor declare 29 { void TkpFreeCursor(TkCursor *cursorPtr) } declare 30 { |
︙ | |||
178 179 180 181 182 183 184 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - + | TkWindow *destPtr, int leaveType, int enterType, Tcl_QueuePosition position) } declare 45 { void TkInstallFrameMenu(Tk_Window tkwin) } declare 46 { |
︙ | |||
245 246 247 248 249 250 251 | 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 | - + - + - - + + - + - + | declare 65 { void TkpMakeMenuWindow(Tk_Window tkwin, int transient) } declare 66 { Window TkpMakeWindow(TkWindow *winPtr, Window parent) } declare 67 { |
︙ | |||
306 307 308 309 310 311 312 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | - + - + | # Exported publically as Tk_SetClassProcs in 8.4a2 #declare 84 { # void TkSetClassProcs(Tk_Window tkwin, # TkClassProcs *procs, ClientData instanceData) #} declare 85 { void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin, |
︙ | |||
350 351 352 353 354 355 356 | 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 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + | declare 97 { void TkWmUnmapWindow(TkWindow *winPtr) } # new for 8.1 declare 98 { |
︙ | |||
448 449 450 451 452 453 454 | 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 | - + - + | declare 138 { KeySym TkpGetKeySym(TkDisplay *dispPtr, XEvent *eventPtr) } declare 139 { void TkpInitKeymapInfo(TkDisplay *dispPtr) } declare 140 { |
︙ | |||
502 503 504 505 506 507 508 | 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 | - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + - - - - - - - - - - - - - - - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - + + + - + | } declare 154 { void TkDeleteThreadExitHandler(Tcl_ExitProc *proc, ClientData clientData) } # entries needed only by tktest: declare 156 { |
︙ | |||
686 687 688 689 690 691 692 693 694 695 696 697 | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - | } declare 9 x11 { void TkWmCleanup(TkDisplay *dispPtr) } declare 10 x11 { void TkSendCleanup(TkDisplay *dispPtr) } declare 11 x11 { void TkFreeXId(TkDisplay *dispPtr) } declare 12 x11 { int TkpWmSetState(TkWindow *winPtr, int state) } # only needed by tktest: declare 13 x11 { |
︙ | |||
874 875 876 877 878 879 880 | 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | - - + + - - - + + + + + + - - - + + + + | void TkWmCleanup(TkDisplay *dispPtr) } declare 44 win { void TkSendCleanup(TkDisplay *dispPtr) } # only needed by tktest: declare 45 win { |
︙ | |||
914 915 916 917 918 919 920 | 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 | - - - + + - + + + + + + + + + + + + + | } declare 9 aqua { void TkMacOSXClearMenubarActive(void) } declare 10 aqua { int TkMacOSXDispatchMenuEvent(int menuID, int index) } |
︙ | |||
959 960 961 962 963 964 965 | 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | - - - + + - + - - - + + - + - + + + + - + - + + + + + + + + + | } declare 24 aqua { void *TkMacOSXMakeStippleMap(Drawable d1, Drawable d2) } declare 25 aqua { void TkMacOSXMenuClick(void) } |
︙ | |||
1429 1430 1431 1432 1433 1434 1435 | 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 | - + | unsigned int sw, unsigned int sh, int dx, int dy) } declare 106 win { int XFillRectangle(Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height) } |
︙ | |||
1455 1456 1457 1458 1459 1460 1461 | 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - - - + + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - - + + - + - + - + - - + + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - | declare 113 win { int XSync(Display *display, Bool discard) } declare 114 win { VisualID XVisualIDFromVisual(Visual *visual) } |
Changes to generic/tkInt.h.
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 | 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 | + + + + + + - + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TKINT #define _TKINT #ifndef _TK #include "tk.h" #endif #ifndef _TCL #include "tcl.h" #endif #ifndef _TKPORT #include "tkPort.h" #endif /* |
︙ | |||
54 55 56 57 58 59 60 | 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 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - - - - - - - - - - + - + + + + + + + + - + - + - + | # ifdef __cplusplus # define MODULE_SCOPE extern "C" # else # define MODULE_SCOPE extern # endif #endif |
︙ | |||
196 197 198 199 200 201 202 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - - | /* * One of the following structures is maintained for each display containing a * window managed by Tk. In part, the structure is used to store thread- * specific data, since each thread will have its own TkDisplay structure. */ |
︙ | |||
239 240 241 242 243 244 245 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | - + | * modifier, than this is zero. */ unsigned int metaModMask; /* Has one bit set to indicate the modifier * corresponding to the "Meta" key. If no such * modifier, then this is zero. */ unsigned int altModMask; /* Has one bit set to indicate the modifier * corresponding to the "Meta" key. If no such * modifier, then this is zero. */ |
︙ | |||
313 314 315 316 317 318 319 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | - + | * Information used by tkError.c only: */ struct TkErrorHandler *errorPtr; /* First in list of error handlers for this * display. NULL means no handlers exist at * present. */ |
︙ | |||
365 366 367 368 369 370 371 | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | - - - + + + - - - | * initializing. */ /* * Information used by tkGeometry.c only: */ Tcl_HashTable maintainHashTable; |
︙ | |||
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | + + + + - + - + | /* * Information used by tkMacWinMenu.c only: */ int postCommandGeneration; /* * Information used by tkOption.c only. */ /* * Information used by tkPack.c only. */ int packInit; /* 0 means table below needs initializing. */ Tcl_HashTable packerHashTable; /* Maps from Tk_Window tokens to corresponding * Packer structures. */ /* * Information used by tkPlace.c only. */ int placeInit; /* 0 means tables below need initializing. */ |
︙ | |||
473 474 475 476 477 478 479 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - | Atom timestampAtom; /* Atom for TIMESTAMP. */ Atom textAtom; /* Atom for TEXT. */ Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */ Atom applicationAtom; /* Atom for TK_APPLICATION. */ Atom windowAtom; /* Atom for TK_WINDOW. */ Atom clipboardAtom; /* Atom for CLIPBOARD. */ Atom utf8Atom; /* Atom for UTF8_STRING. */ |
︙ | |||
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 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - + - - - - - - + - - - - - - - - + + + + | * yet. */ Atom commProperty; /* X's name for comm property. */ Atom registryProperty; /* X's name for property containing registry * of interpreter names. */ Atom appNameProperty; /* X's name for property used to hold the * application name on each comm window. */ /* * Information used by tkXId.c only: */ struct TkIdStack *idStackPtr; /* First in list of chunks of free resource * identifiers, or NULL if there are no free * resources. */ XID (*defaultAllocProc) (Display *display); /* Default resource allocator for display. */ struct TkIdStack *windowStackPtr; /* First in list of chunks of window ids that * can't be reused right now. */ Tcl_TimerToken idCleanupScheduled; /* If set, it means a call to WindowIdCleanup * has already been scheduled, 0 means it * hasn't. */ /* * Information used by tkUnixWm.c and tkWinWm.c only: */ struct TkWmInfo *firstWmPtr;/* Points to first top-level window. */ struct TkWmInfo *foregroundWmPtr; /* Points to the foreground window. */ /* * Information maintained by tkWindow.c for use later on by tkXId.c: */ int destroyCount; /* Number of Tk_DestroyWindow operations in * progress. */ unsigned long lastDestroyRequest; /* Id of most recent XDestroyWindow request; * can re-use ids in windowStackPtr when * server has seen this request and event * queue is empty. */ /* * Information used by tkVisual.c only: */ TkColormap *cmapPtr; /* First in list of all non-default colormaps * allocated for this display. */ /* * Miscellaneous information: */ |
︙ | |||
639 640 641 642 643 644 645 | 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 644 | - + - - + - - - | /* * Tk keeps one of the following data structures for each main window (created * by a call to TkCreateMainWindow). It stores information that is shared by * all of the windows associated with a particular main window. */ typedef struct TkMainInfo { |
︙ | |||
682 683 684 685 686 687 688 | 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 | - + - - + | * application has ever used. Used only by * tkFocus.c. */ struct ElArray *optionRootPtr; /* Top level of option hierarchy for this main * window. NULL means uninitialized. Managed * by tkOption.c. */ |
︙ | |||
729 730 731 732 733 734 735 | 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 | - + | TkDisplay *dispPtr; /* Tk's information about display for * window. */ int screenNum; /* Index of screen for window, among all those * for dispPtr. */ Visual *visual; /* Visual to use for window. If not default, * MUST be set before X window is created. */ int depth; /* Number of bits/pixel. */ |
︙ | |||
791 792 793 794 795 796 797 | 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | - + | /* * Information kept by the event manager (tkEvent.c): */ TkEventHandler *handlerList;/* First in list of event handlers declared * for this window, or NULL if none. */ |
︙ | |||
825 826 827 828 829 830 831 | 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 | - + - - + - - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + | /* First in list of handlers for returning the * selection in various forms. */ /* * Information used by tkGeometry.c for geometry management. */ |
︙ | |||
1006 1007 1008 1009 1010 1011 1012 1013 1014 | 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + | * modifiers such as Meta and Alt that may float among the actual modifier * bits. */ #define META_MASK (AnyModifier<<1) #define ALT_MASK (AnyModifier<<2) #define EXTENDED_MASK (AnyModifier<<3) /* |
︙ | |||
1207 1208 1209 1210 1211 1212 1213 | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 | - - - | Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ListboxObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_LowerObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); |
︙ | |||
1240 1241 1242 1243 1244 1245 1246 | 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | - - + + - - - + + - + + + - - + + - - + + - - + + - - - - - - - - - - + - - + + + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_RaiseObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ScaleObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); |
Changes to generic/tkIntDecls.h.
︙ | |||
11 12 13 14 15 16 17 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 | - - - - - - - - - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + - + + + + - + - - + + + + - + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + + + + - + + + + - - + + + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + - + + + + - + + + + + + + - + + + + - + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + - + + + + - + + + + - + + + + - - + + + + + - + + + + - + + + + - - + + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + - - + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + + + + - - + + + + + - - + + + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - - + - - - + - - - - + + - - + + + + - - - + + + + + + - - + + + + - - - + + + + + + - - + + + + - - - + + + + + + - - + + + + - - - + + + + + + - - + + + + - - - + + + + + + - - + + + + - - - - + + + + + - - - - - + - - - - - + - - - - + - - - - - - + - - - + + - - + + - - - - - + - + - - - - - + + + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - - + + + - - - - + + + + - - + + - + - + - - - - - - - - - - + + + + + + + + + + - - + + - - + + - - + + - - + + - + - - - + + + - - + + - - + + - - - - - - - - - - + + + + + + + + + + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + - - + - - - - - - + - - - + - - - + - - - + - + + + + + + - + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + - - + - - + - - + - - + - - + - - - + + - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + - - - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + | * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TKINTDECLS #define _TKINTDECLS |
Changes to generic/tkIntPlatDecls.h.
︙ | |||
30 31 32 33 34 35 36 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + + + - + - - - + + + + + + + + + + + + + + - + + + + + + + + + + + + + - + + + + + + + + - + + + + - + + + + - + + + + + + + - + + + + + + + + + + - + + + + - - - + + - - - + + - - - - - - - + - - - + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - + + + + + - - - + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - + - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + | extern "C" { #endif /* * Exported function declarations: */ |
︙ | |||
368 369 370 371 372 373 374 | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 | - + - + - - - - + + - + - - - - - + + + + + - - + + - + - + - + - + - - - - + + + + - - + + - - - - + + + + - - + + - + - - + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - - - - - + + + + + + + + + + + + - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + | void (*tkWinSetMenu) (Tk_Window tkwin, HMENU hMenu); /* 25 */ void (*tkWinSetWindowPos) (HWND hwnd, HWND siblingHwnd, int pos); /* 26 */ void (*tkWinWmCleanup) (HINSTANCE hInstance); /* 27 */ void (*tkWinXCleanup) (ClientData clientData); /* 28 */ void (*tkWinXInit) (HINSTANCE hInstance); /* 29 */ void (*tkWinSetForegroundWindow) (TkWindow *winPtr); /* 30 */ void (*tkWinDialogDebug) (int debug); /* 31 */ |
Changes to generic/tkIntXlibDecls.h.
︙ | |||
15 16 17 18 19 20 21 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 | - - - - + + + + - - - - - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + - + - - + - - - + - - - - - - - - + - - + - - - + - - - - + + - + + + + + + + + - + - - - + - - - - + - - + - - + - - + - - + - - + - - + - - + - - + - - - - - + - - - - - + - - + - - - + - - + - - + - - - - - - + - - + - - + + - + - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - + + + + - + + + + - + + + + - + + + + - + + + + + + + + + + - + + + + - + + + + + + + - + + + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + - + + + + + + + - + + + + - + + + + - + + + + - + + + + + + + - + + + + - + + + + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + + + + - + + + + - + + + + + + + - - - - - + + - - + - - + - - + - - - + - - + - - + - - + + - - + - - - + - - - + - - + - - + - - + - - - - + - - + - - + - - + - - + - - + - - + - - - + - - + - - + - - - + - - - - - - - - + - - + - - - + - - - + - - - + - - - + - - - - + - - + - - + - - + - - + - - + - - + - - + - - - - + - - - - + - - + - - + - - - - - + - - - - - + - - + - - - + - - + - - + - - - - - - + - - + - - + + - - + + - - + - + - + | /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made * in the generic/tkInt.decls script. */ |
︙ | |||
979 980 981 982 983 984 985 | 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 | - + | int (*xUngrabPointer) (Display *d, Time t); /* 74 */ int (*xUnmapWindow) (Display *d, Window w); /* 75 */ int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 76 */ void (*xDestroyIC) (XIC x); /* 77 */ Bool (*xFilterEvent) (XEvent *x, Window w); /* 78 */ int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 79 */ int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 80 */ |
︙ | |||
1008 1009 1010 1011 1012 1013 1014 | 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 | - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - + + + + + - - + + - - - + + + - - - + + + - - - - + + + + - - + + - - - - - - - + + + + + + + - + - + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + - - + - - - - - + + + + + - - - + + + + - - + + - - + - - + - - + - - + - - + - - + - - + - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + - - + - - + - - + - - + - - + - - + - - - + + - - + - - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - + - - - - - - - - - - - - - - + - + + + - - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 103 */ int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 104 */ int (*xWarpPointer) (Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy); /* 105 */ int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 106 */ int (*xFlush) (Display *display); /* 107 */ int (*xGrabServer) (Display *display); /* 108 */ int (*xUngrabServer) (Display *display); /* 109 */ |
Changes to generic/tkListbox.c.
︙ | |||
8 9 10 11 12 13 14 | 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) 1990-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. */ |
︙ | |||
86 87 88 89 90 91 92 | 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 | - + - + - + - - + | GC selTextGC; /* For drawing selected text. */ int width; /* Desired width of window, in characters. */ int height; /* Desired height of window, in lines. */ int lineHeight; /* Number of pixels allocated for each line in * display. */ int topIndex; /* Index of top-most element visible in * window. */ |
︙ | |||
162 163 164 165 166 167 168 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - - - - - - - - | char *xScrollCmd; /* Command prefix for communicating with * horizontal scrollbar. NULL means no command * to issue. Malloc'ed. */ int state; /* Listbox state. */ Pixmap gray; /* Pixmap for displaying disabled text. */ int flags; /* Various flag bits: see below for * definitions. */ |
︙ | |||
195 196 197 198 199 200 201 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + | * already been queued to redraw this window. * UPDATE_V_SCROLLBAR: Non-zero means vertical scrollbar needs to be * updated. * UPDATE_H_SCROLLBAR: Non-zero means horizontal scrollbar needs to * be updated. * GOT_FOCUS: Non-zero means this widget currently has the * input focus. |
︙ | |||
235 236 237 238 239 240 241 | 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 329 330 331 332 333 334 335 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 | - - + + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - - + + - + - - + + - - - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - - + + | /* * The optionSpecs table defines the valid configuration options for the * listbox widget. */ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle", |
︙ | |||
436 437 438 439 440 441 442 | 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 | - - + - - + + | static void ListboxWorldChanged(ClientData instanceData); static int NearestListboxElement(Listbox *listPtr, int y); static char * ListboxListVarProc(ClientData clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); static void MigrateHashEntries(Tcl_HashTable *table, int first, int last, int offset); |
︙ | |||
469 470 471 472 473 474 475 | 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 | - + - + - - + - + + - + + - + - - + + - - + + - + + - + + - - + - + - + - - + + - + | * See the user documentation. * *-------------------------------------------------------------- */ int Tk_ListboxObjCmd( |
︙ | |||
604 605 606 607 608 609 610 | 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | - + - - + - + - + | static int ListboxWidgetObjCmd( ClientData clientData, /* Information about listbox widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Arguments as Tcl_Obj's. */ { |
︙ | |||
672 673 674 675 676 677 678 | 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | - + + + - + - - + + + + + - + - - - + + + + - + + + - - - + + + - | if (result != TCL_OK) { break; } result = ListboxBboxSubCmd(interp, listPtr, index); break; |
︙ | |||
821 822 823 824 825 826 827 | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 | - - + + - + - + + - - - + + - + - + - - + + - - - + - - - + + + + | if (objc == 3) { /* * One element request - we return a string */ Tcl_SetObjResult(interp, elemPtrs[first]); } else { |
︙ | |||
953 954 955 956 957 958 959 | 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | - + | } result = Tcl_GetIntFromObj(interp, objv[2], &y); if (result != TCL_OK) { break; } index = NearestListboxElement(listPtr, y); |
︙ | |||
1013 1014 1015 1016 1017 1018 1019 | 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 | - + - + - + - + | index = listPtr->nElements - 1; } if (index < 0) { index = 0; } diff = listPtr->topIndex - index; if (diff > 0) { |
︙ | |||
1079 1080 1081 1082 1083 1084 1085 | 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | - + - - - + + + - - + - - - - + - - - - - - - - - - + + | static int ListboxBboxSubCmd( Tcl_Interp *interp, /* Pointer to the calling Tcl interpreter */ Listbox *listPtr, /* Information about the listbox */ int index) /* Index of the element to get bbox info on */ { |
︙ | |||
1216 1217 1218 1219 1220 1221 1222 | 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 | - - + + + | result = ListboxSelect(listPtr, first, last, 0); break; case SELECTION_INCLUDES: if (objc != 4) { Tcl_WrongNumArgs(interp, 3, objv, "index"); return TCL_ERROR; } |
︙ | |||
1250 1251 1252 1253 1254 1255 1256 | 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | + - + - + - - - + - - + - + - + - - + + + + - - + + - + | static int ListboxXviewSubCmd( Tcl_Interp *interp, /* Pointer to the calling Tcl interpreter */ Listbox *listPtr, /* Information about the listbox */ int objc, /* Number of arguments in the objv array */ Tcl_Obj *const objv[]) /* Array of arguments to the procedure */ { |
︙ | |||
1328 1329 1330 1331 1332 1333 1334 | 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 | - - + + - - - + - - + - - + + + - - + + + + - - + + | static int ListboxYviewSubCmd( Tcl_Interp *interp, /* Pointer to the calling Tcl interpreter */ Listbox *listPtr, /* Information about the listbox */ int objc, /* Number of arguments in the objv array */ Tcl_Obj *const objv[]) /* Array of arguments to the procedure */ { |
︙ | |||
1406 1407 1408 1409 1410 1411 1412 | 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 | - + + - + - + - + - - + | int index) /* Index of the item to retrieve attributes * for. */ { int isNew; Tcl_HashEntry *entry; ItemAttr *attrs; |
︙ | |||
1442 1443 1444 1445 1446 1447 1448 | 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 | - + - + - + - + - + - + - + - + - + - + | * Everything associated with the listbox is freed up. * *---------------------------------------------------------------------- */ static void DestroyListbox( |
︙ | |||
1524 1525 1526 1527 1528 1529 1530 | 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 | - + - - - + | * *---------------------------------------------------------------------- */ static void DestroyListboxOptionTables( ClientData clientData, /* Pointer to the OptionTables struct */ |
︙ | |||
1555 1556 1557 1558 1559 1560 1561 | 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 | - + - + - + - + - + | * *---------------------------------------------------------------------- */ static int ConfigureListbox( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1607 1608 1609 1610 1611 1612 1613 | 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 | - + - + - - - + + | if (listPtr->highlightWidth < 0) { listPtr->highlightWidth = 0; } listPtr->inset = listPtr->highlightWidth + listPtr->borderWidth; /* * Claim the selection if we've suddenly started exporting it and |
︙ | |||
1661 1662 1663 1664 1665 1666 1667 | 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 | - - - + + + | != TCL_OK) { Tcl_AppendResult(listPtr->interp, ": invalid -listvariable value", NULL); continue; } listPtr->listObj = listVarObj; |
︙ | |||
1687 1688 1689 1690 1691 1692 1693 | 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 | - - - + + + + | Tcl_ListObjLength(listPtr->interp, listPtr->listObj, &listPtr->nElements); if (error) { Tcl_SetObjResult(interp, errorResult); Tcl_DecrRefCount(errorResult); return TCL_ERROR; |
︙ | |||
1715 1716 1717 1718 1719 1720 1721 | 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 | - + - + | * *---------------------------------------------------------------------- */ static int ConfigureListboxItem( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1766 1767 1768 1769 1770 1771 1772 | 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 | - + | static void ListboxWorldChanged( ClientData instanceData) /* Information about widget. */ { XGCValues gcValues; GC gc; unsigned long mask; |
︙ | |||
1837 1838 1839 1840 1841 1842 1843 | 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 | - - + + - + - - + - - + - + - + - + | *-------------------------------------------------------------- */ static void DisplayListbox( ClientData clientData) /* Information about window. */ { |
︙ | |||
1933 1934 1935 1936 1937 1938 1939 | 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 | - + - + | freeGC = 0; /* * Lookup this item in the item attributes table, to see if it has * special foreground/background colors. */ |
︙ | |||
2024 2025 2026 2027 2028 2029 2030 | 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 | - + + - + | Tk_3DHorizontalBevel(tkwin, pixmap, selectedBg, x-left, y, width+left+right, listPtr->selBorderWidth, 1, 1, 1, TK_RELIEF_RAISED); } /* Draw bottom bevel */ if (i + 1 == listPtr->nElements || |
︙ | |||
2074 2075 2076 2077 2078 2079 2080 | 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 | - - - - - - - + - - + - - - - - - - + + - + - + | } } /* * Draw the actual text of this item. */ |
︙ | |||
2163 2164 2165 2166 2167 2168 2169 | 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 | - + | /* * Don't bother changing if it is about to be freed. */ gcValues.line_style = LineSolid; XChangeGC(listPtr->display, gc, GCLineStyle, &gcValues); } |
︙ | |||
2237 2238 2239 2240 2241 2242 2243 | 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 | - + - - + - + - + | * longer be up-to-date and must be * recomputed. If fontChanged is 1 then this * must be 1. */ int updateGrid) /* Non-zero means call Tk_SetGrid or * Tk_UnsetGrid to update gridding for the * window. */ { |
︙ | |||
2319 2320 2321 2322 2323 2324 2325 | 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 | - + - + - - + - + | * callback is registered for the listbox. * *---------------------------------------------------------------------- */ static int ListboxInsertSubCmd( |
︙ | |||
2436 2437 2438 2439 2440 2441 2442 | 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 | - + - + - - + | * The listbox will be modified and (eventually) redisplayed. * *---------------------------------------------------------------------- */ static int ListboxDeleteSubCmd( |
︙ | |||
2476 2477 2478 2479 2480 2481 2482 | 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 | - + - + - + - + - + | widthChanged = 0; for (i = first; i <= last; i++) { /* * Remove selection information. */ |
︙ | |||
2614 2615 2616 2617 2618 2619 2620 | 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 | - + - + | */ static void ListboxEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
2689 2690 2691 2692 2693 2694 2695 | 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 | - + | *---------------------------------------------------------------------- */ static void ListboxCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
2727 2728 2729 2730 2731 2732 2733 | 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 | - + - - + - - - - - - - - - + + + + + + + + - - - + - - - - + - + + + + - + + + + + + + + + + + + - - - - - + + + + | static int GetListboxIndex( Tcl_Interp *interp, /* For error messages. */ Listbox *listPtr, /* Listbox for which the index is being * specified. */ Tcl_Obj *indexObj, /* Specifies an element in the listbox. */ |
︙ | |||
2826 2827 2828 2829 2830 2831 2832 | 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 | - + | * change its display too. * *---------------------------------------------------------------------- */ static void ChangeListboxView( |
︙ | |||
2861 2862 2863 2864 2865 2866 2867 | 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 | - + - + + + | * The listbox may be redrawn to reflect its new horizontal offset. * *---------------------------------------------------------------------- */ static void ChangeListboxOffset( |
︙ | |||
2909 2910 2911 2912 2913 2914 2915 | 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 | - + - + + + - + | * The view in the window may change. * *---------------------------------------------------------------------- */ static void ListboxScanTo( |
︙ | |||
2976 2977 2978 2979 2980 2981 2982 | 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 | - + - + | * None. * *---------------------------------------------------------------------- */ static int NearestListboxElement( |
︙ | |||
3017 3018 3019 3020 3021 3022 3023 | 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 | - + | * non-zero. * *---------------------------------------------------------------------- */ static int ListboxSelect( |
︙ | |||
3052 3053 3054 3055 3056 3057 3058 | 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 | - + - - - + + + - + - - - + + | /* * For each index in the range, find it in our selection hash table. If * it's not there but should be, add it. If it's there but shouldn't be, * remove it. */ for (i = first; i <= last; i++) { |
︙ | |||
3108 3109 3110 3111 3112 3113 3114 | 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 | - + - + - + - + - + - - + - + - + - + - + + - - - + + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
3195 3196 3197 3198 3199 3200 3201 | 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 | - + - + - | *---------------------------------------------------------------------- */ static void ListboxLostSelection( ClientData clientData) /* Information about listbox widget. */ { |
︙ | |||
3225 3226 3227 3228 3229 3230 3231 | 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 | + - + + + + + + + + + | *---------------------------------------------------------------------- */ static void GenerateListboxSelectEvent( Listbox *listPtr) /* Information about widget. */ { union {XEvent general; XVirtualEvent virtual;} event; |
︙ | |||
3247 3248 3249 3250 3251 3252 3253 | 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 | - + - - - - + | * Information gets redisplayed. * *---------------------------------------------------------------------- */ static void EventuallyRedrawRange( |
︙ | |||
3293 3294 3295 3296 3297 3298 3299 | 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 | - + - + - + - - + + - + - - + - - - - - - + - + | * process errors in the command. * *---------------------------------------------------------------------- */ static void ListboxUpdateVScrollbar( |
︙ | |||
3363 3364 3365 3366 3367 3368 3369 | 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 | - + - + - - - - + + + + - - + + + - - + + - + - - + - - - - - - + - + | * process errors in the command. * *---------------------------------------------------------------------- */ static void ListboxUpdateHScrollbar( |
︙ | |||
3441 3442 3443 3444 3445 3446 3447 | 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 | - - - + - - - - - - - - - - - - - - - - - - - - - - - + + | const char *name2, /* Not used. */ int flags) /* Information about what happened. */ { Listbox *listPtr = (Listbox *)clientData; Tcl_Obj *oldListObj, *varListObj; int oldLength, i; Tcl_HashEntry *entry; |
︙ | |||
3512 3513 3514 3515 3516 3517 3518 | 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 | - + - + - + + - + | */ Tcl_DecrRefCount(oldListObj); } /* * If the list length has decreased, then we should clean up selection and |
︙ | |||
3607 3608 3609 3610 3611 3612 3613 | 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 | - + - + + - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * It's more efficient to do one if/else and nest the for loops inside, * although we could avoid some code duplication if we nested the if/else * inside the for loops. */ if (offset > 0) { for (i = last; i >= first; i--) { |
Changes to generic/tkMacWinMenu.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkMenu.h" |
︙ | |||
42 43 44 45 46 47 48 | 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 | - + - - + + | PreprocessMenu( TkMenu *menuPtr) { int index, result, finished; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); |
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - + | break; } } } } while (!finished); done: |
︙ |
Changes to generic/tkMain.c.
︙ | |||
11 12 13 14 15 16 17 | 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 | - + - - + - - - - - - - - - - - - - - + - - - - + - - - - - - - - - - - + - - - - - - + + + + + - - - - + + + + + - - + - - + - - - + - - - + + + + + + - - + + - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - + | * 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. */ #include "tkInt.h" |
︙ | |||
158 159 160 161 162 163 164 | 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 329 330 331 332 333 334 335 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 | - + - - + + - - + + + - + - + - + - + + - + + + + - + - - + - - + - - - + + + + + + + + + - + - + - + - - + + - - + - - - + + - - - - + + + + - - + + + + - + + + + - + + - + + + + - + + + - + + - - + + - - + + + - - - + + + - + - + - - - + + + + - - + + - - - + + + - - + + - + | * *---------------------------------------------------------------------- */ void Tk_MainEx( int argc, /* Number of arguments. */ |
︙ | |||
396 397 398 399 400 401 402 403 404 | 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 416 417 418 419 420 421 422 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 | + - - + + + - + - - - - + + + + - + - - + + - + - - - + + + + - + - + - + - - - + + + + - - - - + + + + - + - - + + | * * Side effects: * Could be almost arbitrary, depending on the command that's typed. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static void StdinProc( |
︙ | |||
484 485 486 487 488 489 490 | 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 | + + - + - + - + - - - + + + - - - - + + + + + + + + + + - - + - - - - - + + + + + + + + + + + - - + - - - + + | * *---------------------------------------------------------------------- */ static void Prompt( Tcl_Interp *interp, /* Interpreter to use for prompting. */ int partial) /* Non-zero means there already exists a * partial command, so use the secondary |
Changes to generic/tkMenu.c.
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - - + + - + | * the Macintosh, the platform specific menu handle for cascades attached to a * menu bar must have a title that matches the label for the cascade menu. * * To handle all of the constraints, Tk menubars and tearoff menus are * implemented using menu clones. Menu clones are full menus in their own * right; they have a Tk window and pathname associated with them; they have a * TkMenu structure and array of entries. However, they are linked with the |
︙ | |||
73 74 75 76 77 78 79 | 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 | - + - - - - - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + - - + + - + - - + + - - - - - + + - + - + - + - + - - + + - + - + - + - + - + - - + + - + - + - + - - + + - - - + + + - + | #endif #include "tkInt.h" #include "tkMenu.h" #define MENU_HASH_KEY "tkMenus" |
︙ | |||
341 342 343 344 345 346 347 | 334 335 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 416 417 418 419 420 421 422 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 | - - + + - - + + + - + - + - - - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - + - - - + + + - - + - - - - + + + + - + - - - + + + - + + - + - - - + + + | static int ConfigureMenuEntry(TkMenuEntry *mePtr, int objc, Tcl_Obj *const objv[]); static void DeleteMenuCloneEntries(TkMenu *menuPtr, int first, int last); static void DestroyMenuHashTable(ClientData clientData, Tcl_Interp *interp); static void DestroyMenuInstance(TkMenu *menuPtr); |
︙ | |||
514 515 516 517 518 519 520 | 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 | - + - - - + + + - + | TkMenuEntry *nextCascadePtr; Tcl_Obj *newMenuName, *newObjv[2]; while (cascadeListPtr != NULL) { nextCascadePtr = cascadeListPtr->nextCascadePtr; /* |
︙ | |||
589 590 591 592 593 594 595 | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | - + | listtkwin = topLevelListPtr->tkwin; TkSetWindowMenuBar(menuPtr->interp, listtkwin, Tk_PathName(menuPtr->tkwin), Tk_PathName(menuPtr->tkwin)); topLevelListPtr = nextPtr; } } |
︙ | |||
618 619 620 621 622 623 624 | 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | - - + + - - - + - - + + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + - - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + + - + - - + - + - + - - - + + - - - - + - - - - - - - + + + + + - + - + - + - + - + - + - - + - + - + + - + - | static int MenuWidgetObjCmd( ClientData clientData, /* Information about menu widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { |
︙ | |||
971 972 973 974 975 976 977 | 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 | - + - + | Tcl_WrongNumArgs(interp, 2, objv, "index"); goto error; } result = MenuDoYPosition(interp, menuPtr, objv[2]); break; } done: |
︙ | |||
1001 1002 1003 1004 1005 1006 1007 | 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 | - + - + - - + - - + | *---------------------------------------------------------------------- */ int TkInvokeMenu( Tcl_Interp *interp, /* The interp that the menu lives in. */ TkMenu *menuPtr, /* The menu we are invoking. */ |
︙ | |||
1071 1072 1073 1074 1075 1076 1077 | 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | - + - | && (mePtr->commandPtr != NULL)) { Tcl_Obj *commandPtr = mePtr->commandPtr; Tcl_IncrRefCount(commandPtr); result = Tcl_EvalObjEx(interp, commandPtr, TCL_EVAL_GLOBAL); Tcl_DecrRefCount(commandPtr); } |
︙ | |||
1103 1104 1105 1106 1107 1108 1109 | 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 | - - + + - - - - + + - + - + - - - + + + - + - - + + - + - + - + - + - - - + + | DestroyMenuInstance( TkMenu *menuPtr) /* Info about menu widget. */ { int i; TkMenu *menuInstancePtr; TkMenuEntry *cascadePtr, *nextCascadePtr; Tcl_Obj *newObjv[2]; |
︙ | |||
1259 1260 1261 1262 1263 1264 1265 | 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | - + | topLevelListPtr = menuPtr->menuRefPtr->topLevelListPtr; while (topLevelListPtr != NULL) { nextTopLevelPtr = topLevelListPtr->nextPtr; TkpSetWindowMenuBar(topLevelListPtr->tkwin, NULL); topLevelListPtr = nextTopLevelPtr; } } |
︙ | |||
1386 1387 1388 1389 1390 1391 1392 | 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 | - + - + - + - - + + - + | * Everything associated with the menu entry is freed. * *---------------------------------------------------------------------- */ static void DestroyMenuEntry( |
︙ | |||
1454 1455 1456 1457 1458 1459 1460 | 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 | - + - + - + - + | } if (mePtr->selectImage != NULL) { Tk_FreeImage(mePtr->selectImage); } if (((mePtr->type == CHECK_BUTTON_ENTRY) || (mePtr->type == RADIO_BUTTON_ENTRY)) && (mePtr->namePtr != NULL)) { |
︙ | |||
1488 1489 1490 1491 1492 1493 1494 | 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 | - - + + | *--------------------------------------------------------------------------- */ static void MenuWorldChanged( ClientData instanceData) /* Information about widget. */ { |
︙ | |||
1522 1523 1524 1525 1526 1527 1528 | 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 | - + - - - + - - - + + + + - + - + - + - - + + - + - - - - - - - - - - - - - - - - - - - - + - + + - - - + + + - + - + + + - + - + + - - + + - + - + - + | * *---------------------------------------------------------------------- */ static int ConfigureMenu( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
1694 1695 1696 1697 1698 1699 1700 | 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 | - + - + - + | static int PostProcessEntry( TkMenuEntry *mePtr) /* The entry we are configuring. */ { TkMenu *menuPtr = mePtr->menuPtr; int index = mePtr->index; |
︙ | |||
1738 1739 1740 1741 1742 1743 1744 | 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 | - + | * the list of entries pointing to the new menu. * * BUG: We are not recloning for special case #3 yet. */ name = Tcl_GetString(mePtr->namePtr); if (mePtr->childMenuRefPtr != NULL) { |
︙ | |||
1787 1788 1789 1790 1791 1792 1793 | 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 | - + - + - + - + + | /* * Get the images for the entry, if there are any. Allocate the new images * before freeing the old ones, so that the reference counts don't go to * zero and cause image data to be discarded. */ if (mePtr->imagePtr != NULL) { |
︙ | |||
1853 1854 1855 1856 1857 1858 1859 | 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 | - - + + - - - + + + | TCL_GLOBAL_ONLY); } else { valuePtr = NULL; } mePtr->entryFlags &= ~ENTRY_SELECTED; if (valuePtr != NULL) { if (mePtr->onValuePtr != NULL) { |
︙ | |||
1903 1904 1905 1906 1907 1908 1909 | 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 | - + - + - + - + - + | * mePtr; old resources get freed, if there were any. * *---------------------------------------------------------------------- */ static int ConfigureMenuEntry( |
︙ | |||
1967 1968 1969 1970 1971 1972 1973 | 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 | - + - + - - + - + - + | * mePtr; old resources get freed, if there were any. * *---------------------------------------------------------------------- */ static int ConfigureMenuCloneEntries( |
︙ | |||
2035 2036 2037 2038 2039 2040 2041 | 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 | - + - + | if (mePtr->namePtr != NULL) { newCascadeName = Tcl_GetString(mePtr->namePtr); cascadeMenuRefPtr = TkFindMenuReferences(menuPtr->interp, newCascadeName); } } |
︙ | |||
2090 2091 2092 2093 2094 2095 2096 | 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 | - + - + - + - - - - - - - - - - - - - + - + + - + - + + + + + + + + + + + + + + + + + + - + - + - + - - + - | } return TCL_OK; } /* *-------------------------------------------------------------- * |
︙ | |||
2196 2197 2198 2199 2200 2201 2202 | 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 | - + | *---------------------------------------------------------------------- */ static void MenuCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
2238 2239 2240 2241 2242 2243 2244 | 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 | - + - + - - - + + - + - + - + | * *---------------------------------------------------------------------- */ static TkMenuEntry * MenuNewEntry( TkMenu *menuPtr, /* Menu that will hold the new entry. */ |
︙ | |||
2298 2299 2300 2301 2302 2303 2304 | 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 | - + - + - + | mePtr->namePtr = NULL; mePtr->childMenuRefPtr = NULL; mePtr->onValuePtr = NULL; mePtr->offValuePtr = NULL; mePtr->entryFlags = 0; mePtr->index = index; mePtr->nextCascadePtr = NULL; |
︙ | |||
2341 2342 2343 2344 2345 2346 2347 | 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 | - + - - + - + - - - + + - - + + - + - + - + - - + + + - - + + - + - + - + | TkMenu *menuPtr, /* Widget in which to create new entry. */ Tcl_Obj *indexPtr, /* Object describing index at which to insert. * NULL means insert at end. */ int objc, /* Number of elements in objv. */ Tcl_Obj *const objv[]) /* Arguments to command: first arg is type of * entry, others are config options. */ { |
︙ | |||
2481 2482 2483 2484 2485 2486 2487 | 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 | - + - - + + - - + - + - - - - - - - - + - - - - + + + - - - + - - - - - - - - - - - - - - + | MenuVarProc( ClientData clientData, /* Information about menu entry. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* First part of variable's name. */ const char *name2, /* Second part of variable's name. */ int flags) /* Describes what just happened. */ { |
︙ | |||
2588 2589 2590 2591 2592 2593 2594 | 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 | - - - + + + - + - + - + | * may get posted and unposted. * *---------------------------------------------------------------------- */ int TkActivateMenuEntry( |
︙ | |||
2694 2695 2696 2697 2698 2699 2700 | 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 | - + - - + + - + - + - + - + - - - - + + + + - + - - - + + + - + - - + + - + | { int returnResult; int menuType, i; TkMenuReferences *menuRefPtr; Tcl_Obj *menuDupCommandArray[4]; if (newMenuTypePtr == NULL) { |
︙ | |||
2838 2839 2840 2841 2842 2843 2844 | 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 | - + | } } returnResult = TCL_OK; } else { returnResult = TCL_ERROR; } |
︙ | |||
2864 2865 2866 2867 2868 2869 2870 | 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 | - + - + - - + + - + | static int MenuDoXPosition( Tcl_Interp *interp, TkMenu *menuPtr, Tcl_Obj *objPtr) { |
︙ | |||
2901 2902 2903 2904 2905 2906 2907 | 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 | - + - + - - + + - + | static int MenuDoYPosition( Tcl_Interp *interp, TkMenu *menuPtr, Tcl_Obj *objPtr) { |
︙ | |||
2939 2940 2941 2942 2943 2944 2945 | 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 | - + - - + + - - + | * * Side effects: * If int is invalid, interp's result will be set to NULL. * *---------------------------------------------------------------------- */ |
︙ | |||
2972 2973 2974 2975 2976 2977 2978 | 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 | - + - + - + - + | } } else { x = borderwidth; } *indexPtr = -1; |
︙ | |||
3022 3023 3024 3025 3026 3027 3028 | 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 | - + | *---------------------------------------------------------------------- */ static void RecursivelyDeleteMenu( TkMenu *menuPtr) /* The menubar instance we are deleting. */ { |
︙ | |||
3075 3076 3077 3078 3079 3080 3081 3082 3083 | 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 | + - + | { Tcl_Obj *resultPtr = NULL; /* Initialization needed only to prevent * compiler warning. */ Tcl_Obj *childPtr; char *destString; int i; int doDot; Tcl_CmdInfo cmdInfo; Tcl_HashTable *nameTablePtr = NULL; TkWindow *winPtr = (TkWindow *) menuPtr->tkwin; |
︙ | |||
3109 3110 3111 3112 3113 3114 3115 | 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 | - + - + | Tcl_DecrRefCount(resultPtr); resultPtr = Tcl_DuplicateObj(parentPtr); if (doDot) { Tcl_AppendToObj(resultPtr, ".", -1); } Tcl_AppendObjToObj(resultPtr, childPtr); |
︙ | |||
3146 3147 3148 3149 3150 3151 3152 | 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 | - + - + | *---------------------------------------------------------------------- */ void TkSetWindowMenuBar( Tcl_Interp *interp, /* The interpreter the toplevel lives in. */ Tk_Window tkwin, /* The toplevel window. */ |
︙ | |||
3175 3176 3177 3178 3179 3180 3181 | 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 | - + | */ if (menuRefPtr->menuPtr != NULL) { TkMenu *instancePtr; menuPtr = menuRefPtr->menuPtr; |
︙ | |||
3212 3213 3214 3215 3216 3217 3218 | 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 | - + | if (topLevelListPtr != NULL) { if (prevTopLevelPtr == NULL) { menuRefPtr->topLevelListPtr = menuRefPtr->topLevelListPtr->nextPtr; } else { prevTopLevelPtr->nextPtr = topLevelListPtr->nextPtr; } |
︙ | |||
3252 3253 3254 3255 3256 3257 3258 | 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 | - | CloneMenu(menuPtr, cloneMenuPtr, menubarPtr); cloneMenuRefPtr = TkFindMenuReferencesObj(interp, cloneMenuPtr); if ((cloneMenuRefPtr != NULL) && (cloneMenuRefPtr->menuPtr != NULL)) { Tcl_Obj *cursorPtr = Tcl_NewStringObj("-cursor", -1); Tcl_Obj *nullPtr = Tcl_NewObj(); |
︙ | |||
3278 3279 3280 3281 3282 3283 3284 | 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 | - + + | } /* * Add this window to the menu's list of windows that refer to this * menu. */ |
︙ | |||
3308 3309 3310 3311 3312 3313 3314 | 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 | - + - - - - + + | * *---------------------------------------------------------------------- */ static void DestroyMenuHashTable( ClientData clientData, /* The menu hash table we are destroying. */ |
︙ | |||
3338 3339 3340 3341 3342 3343 3344 | 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 | - + - + + - + - + | *---------------------------------------------------------------------- */ Tcl_HashTable * TkGetMenuHashTable( Tcl_Interp *interp) /* The interp we need the hash table in.*/ { |
︙ | |||
3374 3375 3376 3377 3378 3379 3380 | 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 | - + - + - + - + | * *---------------------------------------------------------------------- */ TkMenuReferences * TkCreateMenuReferences( Tcl_Interp *interp, |
︙ | |||
3418 3419 3420 3421 3422 3423 3424 | 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 | - + - + | * *---------------------------------------------------------------------- */ TkMenuReferences * TkFindMenuReferences( Tcl_Interp *interp, /* The interp the menu is living in. */ |
︙ | |||
3457 3458 3459 3460 3461 3462 3463 | 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 | - + - | */ TkMenuReferences * TkFindMenuReferencesObj( Tcl_Interp *interp, /* The interp the menu is living in. */ Tcl_Obj *objPtr) /* The path of the menu widget. */ { |
︙ | |||
3489 3490 3491 3492 3493 3494 3495 | 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 | - + | TkMenuReferences *menuRefPtr) /* The menu reference to free. */ { if ((menuRefPtr->menuPtr == NULL) && (menuRefPtr->parentEntryPtr == NULL) && (menuRefPtr->topLevelListPtr == NULL)) { Tcl_DeleteHashEntry(menuRefPtr->hashEntryPtr); |
︙ | |||
3523 3524 3525 3526 3527 3528 3529 | 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 | - + + - + - + - + - - + + - + - + - - + + - - | * entries to delete. */ int last) /* The zero-based last entry. */ { TkMenu *menuListPtr; int numDeleted, i, j; numDeleted = last + 1 - first; |
︙ | |||
3608 3609 3610 3611 3612 3613 3614 | 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 | - + - - - - - - - - - - - - - - | menusInitialized = 1; } /* * Make sure we cleanup on finalize. */ |
Changes to generic/tkMenu.h.
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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 | + + + + + + + + + | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TKMENU #define _TKMENU #ifndef _TK #include "tk.h" #endif #ifndef _TKINT #include "tkInt.h" #endif #ifndef _DEFAULT #include "default.h" #endif #ifdef BUILD_tk # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT #endif /* * Dummy types used by the platform menu code. */ typedef struct TkMenuPlatformData_ *TkMenuPlatformData; typedef struct TkMenuPlatformEntryData_ *TkMenuPlatformEntryData; |
︙ | |||
60 61 62 63 64 65 66 | 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 | - + - + - + | int type; /* Type of menu entry; see below for valid * types. */ struct TkMenu *menuPtr; /* Menu with which this entry is * associated. */ Tk_OptionTable optionTable; /* Option table for this menu entry. */ Tcl_Obj *labelPtr; /* Main text label displayed in entry (NULL if * no label). */ |
︙ | |||
112 113 114 115 116 117 118 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + | * overall font for menu. */ int columnBreak; /* If this is 0, this item appears below the * item in front of it. If this is 1, this * item starts a new column. This field is * always 0 for tearoff and separator * entries. */ int hideMargin; /* If this is 0, then the item has enough |
︙ | |||
181 182 183 184 185 186 187 | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | - + | int entryFlags; /* Various flags. See below for * definitions. */ int index; /* Need to know which index we are. This is * zero-based. This is the top-left entry of * the menu. */ /* |
︙ | |||
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 | 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 | + + - - - - + + + + | #define SEPARATOR_ENTRY 4 #define TEAROFF_ENTRY 5 /* * Menu states */ MODULE_SCOPE const char *tkMenuStateStrings[]; #define ENTRY_ACTIVE 0 #define ENTRY_NORMAL 1 #define ENTRY_DISABLED 2 /* * A data structure of the following type is kept for each menu widget: */ typedef struct TkMenu { Tk_Window tkwin; /* Window that embodies the pane. NULL means * that the window has been destroyed but the * data structures haven't yet been cleaned * up. */ Display *display; /* Display containing widget. Needed, among * other things, so that resources can be * freed up even after tkwin has gone away. */ Tcl_Interp *interp; /* Interpreter associated with menu. */ Tcl_Command widgetCmd; /* Token for menu's widget command. */ TkMenuEntry **entries; /* Array of pointers to all the entries in the * menu. NULL means no entries. */ |
︙ | |||
347 348 349 350 351 352 353 | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | - + - - + + + + + | * definition. */ TkMenuEntry *postedCascade; /* Points to menu entry for cascaded submenu * that is currently posted or NULL if no * submenu posted. */ struct TkMenu *nextInstancePtr; /* The next instance of this menu in the * chain. */ |
︙ | |||
374 375 376 377 378 379 380 | 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - | * of options are in this structure. */ Tk_OptionSpec *extensionPtr;/* Needed by the configuration package for * this widget to be extended. */ Tk_SavedOptions *errorStructPtr; /* We actually have to allocate these because * multiple menus get changed during one * ConfigureMenu call. */ |
︙ | |||
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | 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 | + + + + + + + + + + + - + - + - + - + - + - + - + + + - + - + - + | * entries that have this menu as their child. * NULL means no cascade entries. */ Tcl_HashEntry *hashEntryPtr;/* This is needed because the pathname of the * window (which is what we hash on) may not * be around when we are deleting. */ } TkMenuReferences; /* * This structure contains all of the option tables that are needed by menus. */ typedef struct TkMenuOptionTables { Tk_OptionTable menuOptionTable; /* The option table for menus. */ Tk_OptionTable entryOptionTables[6]; /* The tables for menu entries. */ } TkMenuOptionTables; /* * Flag bits for menus: * * REDRAW_PENDING: Non-zero means a DoWhenIdle handler has * already been queued to redraw this window. * RESIZE_PENDING: Non-zero means a call to ComputeMenuGeometry * has already been scheduled. * MENU_DELETION_PENDING Non-zero means that we are currently * destroying this menu's internal structures. * This is useful when we are in the middle of |
︙ | |||
534 535 536 537 538 539 540 | 560 561 562 563 564 565 566 567 568 569 570 571 572 573 | - + - - + + + | const Tk_FontMetrics *menuMetricsPtr, int x, int y, int width, int height, int strictMotif, int drawingParameters); MODULE_SCOPE void TkpMenuInit(void); MODULE_SCOPE int TkpMenuNewEntry(TkMenuEntry *mePtr); MODULE_SCOPE int TkpNewMenu(TkMenu *menuPtr); MODULE_SCOPE int TkpPostMenu(Tcl_Interp *interp, TkMenu *menuPtr, |
Changes to generic/tkMenuDraw.c.
︙ | |||
294 295 296 297 298 299 300 | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - + | * *---------------------------------------------------------------------- */ int TkMenuConfigureEntryDrawOptions( TkMenuEntry *mePtr, |
︙ | |||
428 429 430 431 432 433 434 | 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | - + | void TkEventuallyRecomputeMenu( TkMenu *menuPtr) { if (!(menuPtr->menuFlags & RESIZE_PENDING)) { menuPtr->menuFlags |= RESIZE_PENDING; |
︙ | |||
454 455 456 457 458 459 460 | 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 | - - + + - + - - + + - + - + | */ void TkRecomputeMenu( TkMenu *menuPtr) { if (menuPtr->menuFlags & RESIZE_PENDING) { |
︙ | |||
526 527 528 529 530 531 532 | 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | - + | *-------------------------------------------------------------- */ static void ComputeMenuGeometry( ClientData clientData) /* Structure describing menu. */ { |
︙ | |||
582 583 584 585 586 587 588 | 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | - + - - - - - - - + | ClientData clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (may be * <=0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { |
︙ | |||
617 618 619 620 621 622 623 | 611 612 613 614 615 616 617 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 644 645 646 647 | - - - + + + - - + + + + | *---------------------------------------------------------------------- */ static void DisplayMenu( ClientData clientData) /* Information about widget. */ { |
︙ | |||
668 669 670 671 672 673 674 | 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | - - + + - - - - + + + - - - - - + - - + + - - - - + + + + + - - - - - - - - + + + + + - - + + - - - - - - - + + + - - + + - - - - - - | if (menuPtr->menuType != MENUBAR) { if (!(mePtr->entryFlags & ENTRY_NEEDS_REDISPLAY)) { continue; } } mePtr->entryFlags &= ~ENTRY_NEEDS_REDISPLAY; |
︙ | |||
762 763 764 765 766 767 768 | 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | - + | */ void TkMenuEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
789 790 791 792 793 794 795 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 | - + - + - + | } menuPtr->menuFlags |= MENU_WIN_DESTRUCTION_PENDING; if (menuPtr->widgetCmd != NULL) { Tcl_DeleteCommandFromToken(menuPtr->interp, menuPtr->widgetCmd); menuPtr->widgetCmd = NULL; } if (menuPtr->menuFlags & REDRAW_PENDING) { |
︙ | |||
827 828 829 830 831 832 833 | 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 | - + - - - - - - - + + - - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ClientData clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (may be * <=0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { |
︙ | |||
891 892 893 894 895 896 897 | 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 | - - + + | *-------------------------------------------------------------- */ int TkPostSubmenu( Tcl_Interp *interp, /* Used for invoking sub-commands and * reporting errors. */ |
︙ | |||
950 951 952 953 954 955 956 | 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 | - - + + | Tk_GetRootCoords(menuPtr->tkwin, &x, &y); AdjustMenuCoords(menuPtr, mePtr, &x, &y); menuPtr->postedCascade = mePtr; subary[0] = mePtr->namePtr; subary[1] = Tcl_NewStringObj("post", -1); |
︙ |
Changes to generic/tkMenubutton.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + - - - - - - - - - - - | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkMenubutton.h" |
︙ | |||
55 56 57 58 59 60 61 | 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 | - - + + - - - + + + - - + + - - - + + + - + - + - - + + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - + - + - + - + - + | /* * Information used for parsing configuration specs: */ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", |
︙ | |||
207 208 209 210 211 212 213 | 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 | - + - + - - + | * See the user documentation. * *-------------------------------------------------------------- */ int Tk_MenubuttonObjCmd( |
︙ | |||
242 243 244 245 246 247 248 | 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 | - + - + - - + + | */ optionTable = Tk_CreateOptionTable(interp, optionSpecs); Tk_SetClass(tkwin, "Menubutton"); mbPtr = TkpCreateMenuButton(tkwin); |
︙ | |||
302 303 304 305 306 307 308 | 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 | - + - + - + | mbPtr->direction = DIRECTION_FLUSH; mbPtr->cursor = NULL; mbPtr->takeFocus = NULL; mbPtr->flags = 0; Tk_CreateEventHandler(mbPtr->tkwin, ExposureMask|StructureNotifyMask|FocusChangeMask, |
︙ | |||
343 344 345 346 347 348 349 | 331 332 333 334 335 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 | - + - + - - + + - + - + - - + + + - + - - + + + - + - + | static int MenuButtonWidgetObjCmd( ClientData clientData, /* Information about button widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
418 419 420 421 422 423 424 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | - + - + - + - + | *---------------------------------------------------------------------- */ static void DestroyMenuButton( char *memPtr) /* Info about button widget. */ { |
︙ | |||
459 460 461 462 463 464 465 | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | - + | Tk_FreeBitmap(mbPtr->display, mbPtr->gray); } if (mbPtr->textLayout != NULL) { Tk_FreeTextLayout(mbPtr->textLayout); } Tk_FreeConfigOptions((char *) mbPtr, mbPtr->optionTable, mbPtr->tkwin); mbPtr->tkwin = NULL; |
︙ | |||
486 487 488 489 490 491 492 | 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 | - + - + - + - + | * *---------------------------------------------------------------------- */ static int ConfigureMenuButton( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
567 568 569 570 571 572 573 | 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - + + | * Get the image for the widget, if there is one. Allocate the new * image before freeing the old one, so that the reference count * doesn't go to zero and cause image data to be discarded. */ if (mbPtr->imageString != NULL) { image = Tk_GetImage(mbPtr->interp, mbPtr->tkwin, |
︙ | |||
621 622 623 624 625 626 627 | 612 613 614 615 616 617 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 | - + - + - + - + - + - + | /* * If no image or -compound is used, display the value of a variable. * Set up a trace to watch for any changes in it, create the variable * if it doesn't exist, and fetch its current value. */ const char *value; |
︙ | |||
671 672 673 674 675 676 677 | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | - + + + | void TkMenuButtonWorldChanged( ClientData instanceData) /* Information about widget. */ { XGCValues gcValues; GC gc; unsigned long mask; |
︙ | |||
744 745 746 747 748 749 750 | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | - + | TkpComputeMenuButtonGeometry(mbPtr); /* * Lastly, arrange for the button to be redisplayed. */ if (Tk_IsMapped(mbPtr->tkwin) && !(mbPtr->flags & REDRAW_PENDING)) { |
︙ | |||
772 773 774 775 776 777 778 | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | - + - | */ static void MenuButtonEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
804 805 806 807 808 809 810 | 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 | - + | } } } return; redraw: if ((mbPtr->tkwin != NULL) && !(mbPtr->flags & REDRAW_PENDING)) { |
︙ | |||
831 832 833 834 835 836 837 | 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 | - + | *---------------------------------------------------------------------- */ static void MenuButtonCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 | + - + - + - - - - - + - - - + - - - - - - - - - - - - - - - - - + - + - - + + - + | * Side effects: * The text displayed in the menu button will change to match the * variable. * *-------------------------------------------------------------- */ /* ARGSUSED */ static char * MenuButtonTextVarProc( ClientData clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* Name of variable. */ const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { |
︙ | |||
961 962 963 964 965 966 967 | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 | - + - - - - - - - + | ClientData clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (may be <= * 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { |
Changes to generic/tkMenubutton.h.
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + + + + | #include "tkInt.h" #endif #ifndef _TKMENU #include "tkMenu.h" #endif #ifdef BUILD_tk # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT #endif /* * Legal values for the "orient" field of TkMenubutton records. */ enum direction { DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH, DIRECTION_LEFT, DIRECTION_RIGHT |
︙ | |||
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | 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 | + + + + + + + + + | * which is displayed if the "-indicatoron" option is true. The units for * these options are 1/10 millimeters. */ #define INDICATOR_WIDTH 40 #define INDICATOR_HEIGHT 17 /* * Declaration of variables shared between the files in the button module. */ MODULE_SCOPE Tk_ClassProcs tkpMenubuttonClass; /* * Declaration of procedures used in the implementation of the button widget. */ MODULE_SCOPE void TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr); MODULE_SCOPE TkMenuButton *TkpCreateMenuButton(Tk_Window tkwin); MODULE_SCOPE void TkpDisplayMenuButton(ClientData clientData); MODULE_SCOPE void TkpDestroyMenuButton(TkMenuButton *mbPtr); MODULE_SCOPE void TkMenuButtonWorldChanged(ClientData instanceData); # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLIMPORT #endif /* _TKMENUBUTTON */ |
Changes to generic/tkMessage.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - + + | * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-2000 by Ajuba Solutions. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ |
︙ | |||
105 106 107 108 109 110 111 | 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 | - + - + - - + + - + - + - - + + - + - + - + - + - - + + - + - - + + - + - - + + - - + + - + - + - + - + - - + + - - + + - + - - + + - + - - | /* * Information used for argv parsing. */ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MESSAGE_ANCHOR, |
︙ | |||
210 211 212 213 214 215 216 | 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 | - + - + - + - - + - - + + - - + + - + - - + + - + | * See the user documentation. * *-------------------------------------------------------------- */ int Tk_MessageObjCmd( |
︙ | |||
301 302 303 304 305 306 307 | 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 329 330 331 332 333 334 335 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 | - + - - + + - + - - + + - + - + - + - + | */ static int MessageWidgetObjCmd( ClientData clientData, /* Information about message widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
379 380 381 382 383 384 385 | 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 416 417 418 419 | - + - + - + - + - + - + | * Everything associated with the message is freed up. * *---------------------------------------------------------------------- */ static void DestroyMessage( |
︙ | |||
434 435 436 437 438 439 440 | 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 | - + - + - - + - + - + - + - + - + - + - + - + - + | * *---------------------------------------------------------------------- */ static int ConfigureMessage( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
525 526 527 528 529 530 531 | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | - + + + | static void MessageWorldChanged( ClientData instanceData) /* Information about widget. */ { XGCValues gcValues; GC gc = NULL; Tk_FontMetrics fm; |
︙ | |||
555 556 557 558 559 560 561 | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | - + | * Recompute the desired geometry for the window, and arrange for the * window to be redisplayed. */ ComputeMessageGeometry(msgPtr); if ((msgPtr->tkwin != NULL) && Tk_IsMapped(msgPtr->tkwin) && !(msgPtr->flags & REDRAW_PENDING)) { |
︙ | |||
580 581 582 583 584 585 586 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | - + | * desired geometry for this window. * *-------------------------------------------------------------- */ static void ComputeMessageGeometry( |
︙ | |||
664 665 666 667 668 669 670 | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | - - + + | *-------------------------------------------------------------- */ static void DisplayMessage( ClientData clientData) /* Information about window. */ { |
︙ | |||
740 741 742 743 744 745 746 | 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | - + - + - + | */ static void MessageEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
793 794 795 796 797 798 799 | 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 | - + | *---------------------------------------------------------------------- */ static void MessageCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
824 825 826 827 828 829 830 831 832 833 834 | 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 | + - - + + - - + + - - - - - + - - - + - - - - - - - - - - - - - - - - - + - + - + - + | * * Side effects: * The text displayed in the message will change to match the variable. * *-------------------------------------------------------------- */ /* ARGSUSED */ static char * MessageTextVarProc( ClientData clientData, /* Information about message. */ Tcl_Interp *interp, /* Interpreter containing variable. */ |
Changes to generic/tkObj.c.
︙ | |||
29 30 31 32 33 34 35 | 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 | - - + + - + - | (objPtr)->internalRep.twoPtrValue.ptr1 = INT2PTR(intval); \ (objPtr)->internalRep.twoPtrValue.ptr2 = 0 #define GET_SIMPLEPIXEL(objPtr) \ (PTR2INT((objPtr)->internalRep.twoPtrValue.ptr1)) #define SET_COMPLEXPIXEL(objPtr, repPtr) \ |
︙ | |||
70 71 72 73 74 75 76 | 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 | - - + - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * A WindowRep caches name-to-window lookups. The cache is invalid if tkwin is * NULL or if mainPtr->deletionEpoch does not match epoch. */ typedef struct WindowRep { Tk_Window tkwin; /* Cached window; NULL if not found. */ TkMainInfo *mainPtr; /* MainWindow associated with tkwin. */ |
︙ | |||
282 283 284 285 286 287 288 | 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + | Tcl_Obj *objPtr, /* The object from which to get pixels. */ int *intPtr, double *dblPtr) /* Places to store resulting pixels. */ { int result, fresh; double d; PixelRep *pixelPtr; |
︙ | |||
461 462 463 464 465 466 467 | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - + | static void FreePixelInternalRep( Tcl_Obj *objPtr) /* Pixel object with internal rep to free. */ { if (!SIMPLE_PIXELREP(objPtr)) { PixelRep *pixelPtr = GET_COMPLEXPIXEL(objPtr); |
︙ | |||
487 488 489 490 491 492 493 | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | - - + + - + | * internal rep. * *---------------------------------------------------------------------- */ static void DupPixelInternalRep( |
︙ | |||
532 533 534 535 536 537 538 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | - + - | static int SetPixelFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr) /* The object to convert. */ { const Tcl_ObjType *typePtr; |
︙ | |||
573 574 575 576 577 578 579 | 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 | - + - + + + + + - - - + + + + + + | /* * Free the old internalRep before setting the new one. */ typePtr = objPtr->typePtr; if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { |
︙ | |||
632 633 634 635 636 637 638 | 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 | - + - + | Tk_Window tkwin, Tcl_Obj *objPtr, /* The object from which to get mms. */ double *doublePtr) /* Place to store resulting millimeters. */ { int result; double d; MMRep *mmPtr; |
︙ | |||
682 683 684 685 686 687 688 | 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | - + | *---------------------------------------------------------------------- */ static void FreeMMInternalRep( Tcl_Obj *objPtr) /* MM object with internal rep to free. */ { |
︙ | |||
707 708 709 710 711 712 713 | 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 644 645 | - - + + - - + + - + | * internal rep. * *---------------------------------------------------------------------- */ static void DupMMInternalRep( |
︙ | |||
743 744 745 746 747 748 749 | 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | - + - + - + - + - + | * double-to-string conversion. * *---------------------------------------------------------------------- */ static void UpdateStringOfMM( |
︙ | |||
789 790 791 792 793 794 795 | 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 | - + - | static int SetMMFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr) /* The object to convert. */ { ThreadSpecificData *typeCache = GetTypeCache(); const Tcl_ObjType *typePtr; |
︙ | |||
825 826 827 828 829 830 831 | 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | - - - + + | if (rest == string) { /* * Must copy string before resetting the result in case a caller * is trying to convert the interpreter's result to mms. */ error: |
︙ | |||
861 862 863 864 865 866 867 | 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 | - + - + - + | /* * Free the old internalRep before setting the new one. */ typePtr = objPtr->typePtr; if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { |
︙ | |||
906 907 908 909 910 911 912 | 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 | - + + - + - - - - - + + + + - - + - + + | TkGetWindowFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tk_Window tkwin, /* A token to get the main window from. */ Tcl_Obj *objPtr, /* The object from which to get window. */ Tk_Window *windowPtr) /* Place to store resulting window. */ { TkMainInfo *mainPtr = ((TkWindow *) tkwin)->mainPtr; |
︙ | |||
961 962 963 964 965 966 967 | 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 | - - + + - + - + - + - + | * TkGetWindowFromObj, which initializes the WindowRep cache. * *---------------------------------------------------------------------- */ static int SetWindowFromAny( |
︙ | |||
1008 1009 1010 1011 1012 1013 1014 | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 | - - + + - + - - + + - + | * internal rep. * *---------------------------------------------------------------------- */ static void DupWindowInternalRep( |
︙ | |||
1044 1045 1046 1047 1048 1049 1050 | 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | *---------------------------------------------------------------------- */ static void FreeWindowInternalRep( Tcl_Obj *objPtr) /* Window object with internal rep to free. */ { |
︙ | |||
1124 1125 1126 1127 1128 1129 1130 | 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | - - - - - + + + + + - - + + - - - + + + - - - - - - + + + + | /* * Check for a common case where a single object would otherwise be * shimmered between a list and a pixel spec. */ if (specObj->typePtr == &pixelObjType) { |
︙ | |||
1202 1203 1204 1205 1206 1207 1208 | 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | - + + | * * Registers Tk's Tcl_ObjType structures with the Tcl run-time. * * Results: * None * * Side effects: |
Changes to generic/tkOldConfig.c.
︙ | |||
8 9 10 11 12 13 14 | 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-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. */ |
︙ | |||
72 73 74 75 76 77 78 | 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 | - + - + - + - + - - + - - + + - + - + - + - + - - + - - + + + + - + + - - - - + + + + + + - + + - - + + + | */ int Tk_ConfigureWidget( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Window tkwin, /* Window containing widget (needed to set up * X resources). */ |
︙ | |||
238 239 240 241 242 243 244 | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + - - + + | */ static Tk_ConfigSpec * FindConfigSpec( Tcl_Interp *interp, /* Used for reporting errors. */ Tk_ConfigSpec *specs, /* Pointer to table of configuration * specifications for a widget. */ |
︙ | |||
270 271 272 273 274 275 276 | 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 | - - - + + - - + - - - - + + - - | continue; } if (specPtr->argvName[length] == 0) { matchPtr = specPtr; goto gotMatch; } if (matchPtr != NULL) { |
︙ | |||
340 341 342 343 344 345 346 | 335 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 | - + - + - + | Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Window tkwin, /* Window containing widget (needed to set up * X resources). */ Tk_ConfigSpec *specPtr, /* Specifier to apply. */ Tk_Uid value, /* Value to use to fill in widgRec. */ int valueIsUid, /* Non-zero means value is a Tk_Uid; zero * means it's an ordinary string. */ |
︙ | |||
376 377 378 379 380 381 382 | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | - + | break; case TK_CONFIG_STRING: { char *oldStr, *newStr; if (nullValue) { newStr = NULL; } else { |
︙ | |||
545 546 547 548 549 550 551 | 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 | - - + + + - - - - + + + + + + | return TCL_ERROR; } } *((Tk_Window *) ptr) = tkwin2; break; } case TK_CONFIG_CUSTOM: |
︙ | |||
593 594 595 596 597 598 599 | 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 | - + - + - + - + - + - + - + - + - + - - + - + | *-------------------------------------------------------------- */ int Tk_ConfigureInfo( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Window tkwin, /* Window corresponding to widgRec. */ |
︙ | |||
686 687 688 689 690 691 692 | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | - + - + - + | */ static char * FormatConfigInfo( Tcl_Interp *interp, /* Interpreter to use for things like * floating-point precision. */ Tk_Window tkwin, /* Window corresponding to widget. */ |
︙ | |||
721 722 723 724 725 726 727 | 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | - + - + | } if (argv[4] == NULL) { argv[4] = ""; } result = Tcl_Merge(5, argv); if (freeProc != NULL) { if ((freeProc == TCL_DYNAMIC) || (freeProc == (Tcl_FreeProc *) free)) { |
︙ | |||
749 750 751 752 753 754 755 | 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 | - + - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + - + + - - + + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
904 905 906 907 908 909 910 | 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 | - + - + - + - + - + - + - + - + | *---------------------------------------------------------------------- */ int Tk_ConfigureValue( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Window tkwin, /* Window corresponding to widgRec. */ |
︙ | |||
970 971 972 973 974 975 976 977 978 | 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 | + - + - + | * Notes: * Since this is not looking anything up, this uses the static version of * the config specs. * *---------------------------------------------------------------------- */ /* ARGSUSED */ void Tk_FreeOptions( |
︙ | |||
1072 1073 1074 1075 1076 1077 1078 | 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 | - + - + - + - + - + - + | * copies of the widget specs are stored in. In effect, this is * self-initializing code. */ specCacheTablePtr = (Tcl_HashTable *) Tcl_GetAssocData(interp, "tkConfigSpec.threadTable", NULL); if (specCacheTablePtr == NULL) { |
︙ | |||
1129 1130 1131 1132 1133 1134 1135 | 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 | - + | } if (specPtr->defValue != NULL) { specPtr->defValue = Tk_GetUid(specPtr->defValue); } } } } else { |
︙ | |||
1155 1156 1157 1158 1159 1160 1161 | 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 | - + - + - + - + | * *-------------------------------------------------------------- */ static void DeleteSpecCacheTable( ClientData clientData, |
Changes to generic/tkOldTest.c.
︙ | |||
12 13 14 15 16 17 18 | 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 | - - - - - - - - + - - + + - + - + - + - + - - - - - + + + + - + - + - - - - + + - + - - + + - - - + + - + - + - - - + + + - + + - + - - + + - + - - + + + - - - - + + + + - - - - - - + + + + + + - + - + | * Contributions by Don Porter, NIST, 2007. (not subject to US copyright) * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #define USE_OLD_IMAGE |
︙ | |||
259 260 261 262 263 264 265 | 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 | - + - + - + - - + + - + | *---------------------------------------------------------------------- */ static ClientData ImageGet( Tk_Window tkwin, /* Token for window in which image will be * used. */ |
︙ | |||
308 309 310 311 312 313 314 | 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 | - + - + - - - - + + + + - - + + | int imageX, int imageY, /* Origin of area to redraw, relative to * origin of image. */ int width, int height, /* Dimensions of area to redraw. */ int drawableX, int drawableY) /* Coordinates in drawable corresponding to * imageX and imageY. */ { |
︙ | |||
353 354 355 356 357 358 359 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | - + - - - + + + - + | */ static void ImageFree( ClientData clientData, /* Pointer to TImageInstance for instance. */ Display *display) /* Display where image was to be drawn. */ { |
︙ | |||
383 384 385 386 387 388 389 | 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 | - + - + - + - + - | * Information about the image is deleted. * *---------------------------------------------------------------------- */ static void ImageDelete( |
Changes to generic/tkOption.c.
︙ | |||
172 173 174 175 176 177 178 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + | * level. */ int bases[NUM_STACKS]; /* For each stack, index of first element on * stack corresponding to this level (used to * restore "numUsed" fields when popping out * of a level. */ } StackLevel; |
︙ | |||
217 218 219 220 221 222 223 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + - + | static ElArray * ExtendArray(ElArray *arrayPtr, Element *elPtr); static void ExtendStacks(ElArray *arrayPtr, int leaf); static int GetDefaultOptions(Tcl_Interp *interp, TkWindow *winPtr); static ElArray * NewArray(int numEls); static void OptionThreadExitProc(ClientData clientData); static void OptionInit(TkMainInfo *mainPtr); |
︙ | |||
242 243 244 245 246 247 248 | 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 | - - + + - - + + - - + + - + | *-------------------------------------------------------------- */ void Tk_AddOption( Tk_Window tkwin, /* Window token; option will be associated * with main window for this window. */ |
︙ | |||
307 308 309 310 311 312 313 | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | - + | while ((*p != 0) && (*p != '.') && (*p != '*')) { p++; } length = p - field; if (length > TMP_SIZE) { length = TMP_SIZE; } |
︙ | |||
396 397 398 399 400 401 402 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | - - + + - - + + | *-------------------------------------------------------------- */ Tk_Uid Tk_GetOption( Tk_Window tkwin, /* Token for window that option is associated * with. */ |
︙ | |||
471 472 473 474 475 476 477 | 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 | - - + + - - + + - - + + - - + + - - - + + + - - + - - + + - + | } /* * Probe the stacks for matches. */ for (elPtr = tsdPtr->stacks[EXACT_LEAF_NAME]->els, |
︙ | |||
609 610 611 612 613 614 615 | 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | - + - + + - + + - - + + - - + + | */ int Tk_OptionObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of Tcl_Obj arguments. */ |
︙ | |||
686 687 688 689 690 691 692 | 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | - + | window = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), tkwin); if (window == NULL) { return TCL_ERROR; } value = Tk_GetOption(window, Tcl_GetString(objv[3]), Tcl_GetString(objv[4])); if (value != NULL) { |
︙ | |||
734 735 736 737 738 739 740 | 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | - + | * Option-related resources are freed. See code below for details. * *-------------------------------------------------------------- */ void TkOptionDeadWindow( |
︙ | |||
847 848 849 850 851 852 853 | 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 | - + | * *---------------------------------------------------------------------- */ static int ParsePriority( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ |
︙ | |||
873 874 875 876 877 878 879 | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 | - - - - + + + - | return TK_INTERACTIVE_PRIO; } else { char *end; priority = strtoul(string, &end, 0); if ((end == string) || (*end != 0) || (priority < 0) || (priority > 100)) { |
︙ | |||
918 919 920 921 922 923 924 | 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 | - + + | * this window's main window. */ char *string, /* String containing option specifiers. */ int priority) /* Priority level to use for options in this * string, such as TK_USER_DEFAULT_PRIO or * TK_INTERACTIVE_PRIO. Must be between 0 and * TK_MAX_PRIO. */ { |
︙ | |||
959 960 961 962 963 964 965 | 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 | + - - - + + + | * Parse off the option name, collapsing out backslash-newline * sequences of course. */ dst = name = src; while (*src != ':') { if ((*src == '\0') || (*src == '\n')) { char buf[32 + TCL_INTEGER_SPACE]; |
︙ | |||
992 993 994 995 996 997 998 | 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 | - - - + + + - - - - + + + - - - + + + - + | * Skip white space between the name and the value. */ src++; while ((*src == ' ') || (*src == '\t')) { src++; } |
︙ | |||
1072 1073 1074 1075 1076 1077 1078 | 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 | - + - - - + + + - - - - + + + - - + + + + + + - - - - - + + + + + + + + + + + + + + - - - + + + - - + + | */ static int ReadOptionFile( Tcl_Interp *interp, /* Interpreter to use for reporting results. */ Tk_Window tkwin, /* Token for window: options are entered for * this window's main window. */ |
︙ | |||
1146 1147 1148 1149 1150 1151 1152 | 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 | - + + | *-------------------------------------------------------------- */ static ElArray * NewArray( int numEls) /* How many elements of space to allocate. */ { |
︙ | |||
1173 1174 1175 1176 1177 1178 1179 | 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 | - - + + - + - - - + + + + + + + + | * Memory may be allocated or freed. * *-------------------------------------------------------------- */ static ElArray * ExtendArray( |
︙ | |||
1220 1221 1222 1223 1224 1225 1226 | 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 | - + - - - + + - + | SetupStacks( TkWindow *winPtr, /* Window for which information is to be * cached. */ int leaf) /* Non-zero means this is the leaf window * being probed. Zero means this is an * ancestor of the desired leaf. */ { |
︙ | |||
1301 1302 1303 1304 1305 1306 1307 | 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 | - + - + + - + | /* * Step 4: create a new stack level; grow the level array if we've run out * of levels. Clear the stacks for EXACT_LEAF_NAME and EXACT_LEAF_CLASS * (anything that was there is of no use any more). */ if (tsdPtr->curLevel >= tsdPtr->numLevels) { |
︙ | |||
1328 1329 1330 1331 1332 1333 1334 | 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 | - + | /* * Step 5: scan the current stack level looking for matches to this * window's name or class; where found, add new information to the stacks. */ for (iPtr = searchOrder; *iPtr != -1; iPtr++) { |
︙ | |||
1383 1384 1385 1386 1387 1388 1389 | 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 | - - + + | static void ExtendStacks( ElArray *arrayPtr, /* Array of elements to copy onto stacks. */ int leaf) /* If zero, then don't copy exact leaf * elements. */ { |
︙ | |||
1416 1417 1418 1419 1420 1421 1422 | 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 | - + - + - + | * Option-related data structures get freed. * *-------------------------------------------------------------- */ static void OptionThreadExitProc( |
︙ | |||
1450 1451 1452 1453 1454 1455 1456 | 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 | - + - + + - + | * Option-related data structures get initialized. * *-------------------------------------------------------------- */ static void OptionInit( |
︙ | |||
1518 1519 1520 1521 1522 1523 1524 | 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 | - + - + | */ static void ClearOptionTree( ElArray *arrayPtr) /* Array of options; delete everything * referred to recursively by this. */ { |
︙ |
Changes to generic/tkPack.c.
︙ | |||
10 11 12 13 14 15 16 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | - + - - - - + + + + - + - - - - - - + + + + + + - + - + - + - + - + - + - - - - + - + - - - + + + - - + - - - + + - + - + - + - + - - + + - + - - - + - - + - - + + - - + - + - + - + - - - - + + + + - - + - - - - - + - + - - + - - + + + - - + + - - - - + + + - - + - - + + - - + + - + - - + + - - - + + + - - - + + - + - - - + + - - + - - + + - + - - - - - - + + + + + + + - - + + - - + + - - + - - - - + + + + - - + - - - - - - - - + + + + + + - - + - - + - - + - - + - - - - + + + + - - - + - - + + - + - + - + - - - - - - - - - - - + - - + + - - + + - - - + + + - - - - - + - + - - - + + - - + - - - - - + + + + - - - - - - + + + + - + - - + - + + - + - + - + - + - + - + - + - + - + + - - + + - + - + - - + + - - + + - + - + - + - + - - + + - + - + + - + - - - + - - + + - + - + - + - + - + - - - - + + + + - - - - - - - - - + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - + - + - - - - - - + + + + + + - + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - + - - - - + + + + - + - + - - - + + + - + - - - + + + - - - + + + - + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" typedef enum {TOP, BOTTOM, LEFT, RIGHT} Side; |
︙ | |||
829 830 831 832 833 834 835 | 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 | - - + + - + - + - + - - - - - + + + + + - - + + - - + + - - + + - + - - + + - + - + - + - - - - + + + + - - - - + + + - - + - - - - + + + - - + - + - + - - - - + + + + - - - - + + + - - + - - - - + + + - - + - + - + - + - + - + - + - + - + - + - + - - - + + - + - + + - - - - + + + - + - + - - - + + - - + | case TK_ANCHOR_CENTER: x = frameX + (borderLeft + frameWidth - width - borderRight)/2; y = frameY + (borderTop + frameHeight - height - borderBtm)/2; break; default: Tcl_Panic("bad frame factor in ArrangePacking"); } |
︙ | |||
1176 1177 1178 1179 1180 1181 1182 | 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | - - + - + - + - + - + - + - - - + + - | packPtr->padX = packPtr->padY = 0; packPtr->padLeft = packPtr->padTop = 0; packPtr->iPadX = packPtr->iPadY = 0; packPtr->flags &= ~(FILLX|FILLY|EXPAND); packPtr->flags |= OLD_STYLE; for (index = 0 ; index < optionCount; index++) { Tcl_Obj *curOptPtr = options[index]; |
︙ | |||
1234 1235 1236 1237 1238 1239 1240 | 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | - + - - - + + - - - - - + + + - - - + - - - + + + - + - + - + - - + + - - + + - - - - - - - + - - + - - - - + - - + + - - - + + + - - + - + - + - + - - + + - - + + - + - - - + + + - - + + - + - - - - - - - - - - - - - - - | return TCL_ERROR; } packPtr->padY /= 2; packPtr->padTop /= 2; packPtr->iPadY = 0; index++; } else if ((c == 'f') && (length > 1) |
︙ | |||
1401 1402 1403 1404 1405 1406 1407 | 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 | - + - + - - + - + - + - + - + - + - + - - + + - + - + - - - - - - - + + + + + + + + - + - + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - - - + + - - - - + + + + - + - + - - - + + + - - - - + + - + - - - - - - - + + + + + + + - + - - - + + - - + + - + - + - - + - - + - + - + - + - - + + - + - + - + - + - + - + - - - + + - - - + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + - + - - + + - - + + - - + + - + - + - - + + - + - - + + - + - - + + - - + + - - + + - - - + + - - - - + + + - - - - - - - - - - - - - - - - - - - - + - - - - - - + + + + + + - + - + - - - + + - - + + - - + + - - - - - - - - - - - + - - + + - - - + + + | * Everything associated with the packer is freed up. * *---------------------------------------------------------------------- */ static void DestroyPacker( |
Changes to generic/tkPanedWindow.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - + + | * Copyright (c) 1997 Sun Microsystems, Inc. * 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. */ |
︙ | |||
66 67 68 69 70 71 72 | 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 | - + - + - + - + - + - - + + - + - + - + - + - + | (((stretch) == STRETCH_ALWAYS) || \ ((stretch) == STRETCH_FIRST && (index) == (first)) || \ ((stretch) == STRETCH_LAST && (index) == (last)) || \ ((stretch) == STRETCH_MIDDLE && (index) != (first) && (index) != (last))) typedef struct { Tk_OptionTable pwOptions; /* Token for paned window option table. */ |
︙ | |||
147 148 149 150 151 152 153 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - - - + + + | GC gc; /* Graphics context for copying from * off-screen pixmap onto screen. */ int proxyx, proxyy; /* Proxy x,y coordinates. */ Tk_3DBorder proxyBackground;/* Background color used to draw proxy. If NULL, use background. */ Tcl_Obj *proxyBorderWidthPtr; /* Tcl_Obj rep for proxyBorderWidth */ int proxyBorderWidth; /* Borderwidth used to draw proxy. */ int proxyRelief; /* Relief used to draw proxy, if TK_RELIEF_NULL then use relief. */ |
︙ | |||
196 197 198 199 200 201 202 | 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 329 330 331 332 333 334 335 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 | - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - - + + - + - - - + + + - + - + - + - - + + - + - + - + - + - - + + - + - - - + + + | XEvent *eventPtr); static void ProxyWindowEventProc(ClientData clientData, XEvent *eventPtr); static void DisplayProxyWindow(ClientData clientData); static void PanedWindowWorldChanged(ClientData instanceData); static int PanedWindowWidgetObjCmd(ClientData clientData, Tcl_Interp *, int objc, Tcl_Obj * const objv[]); |
︙ | |||
379 380 381 382 383 384 385 | 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 416 417 418 419 420 421 422 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 | - + - + - + - + - + - + - + - - + + - + - + - + - + - + | * A new widget is created and configured. * *-------------------------------------------------------------- */ int Tk_PanedWindowObjCmd( |
︙ | |||
492 493 494 495 496 497 498 | 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 | - + - + | * set the X window save under attribute to avoid expose events as the * proxy sash is dragged across the panes. [Bug 1036963] */ Tk_SetWindowVisual(pwPtr->proxywin, Tk_Visual(tkwin), Tk_Depth(tkwin), Tk_Colormap(tkwin)); Tk_CreateEventHandler(pwPtr->proxywin, ExposureMask, ProxyWindowEventProc, |
︙ | |||
531 532 533 534 535 536 537 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | - + - + - + - + - + - + - + - + + - + - - + - - + + - - - - - - + + + + + + | static int PanedWindowWidgetObjCmd( ClientData clientData, /* Information about square widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj * const objv[]) /* Argument objects. */ { |
︙ | |||
661 662 663 664 665 666 667 | 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 | - - + + - + - - + - - + - - - + + - + - - + + - + - + + + + - - - + + + + - + - + - + - - + + - + - + - - - + + + - + | } tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), pwPtr->tkwin); if (tkwin == NULL) { result = TCL_ERROR; break; } resultObj = NULL; |
︙ | |||
796 797 798 799 800 801 802 | 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 | - - - + + + - - - + + + - - - + + - - - + + + - - - - + + - - + + - - + + - - - + + + - - + - + - + - + - - + + - + - - - - + + + + - - + + - + - - + + - + - + - - - + + + - + - - - - - + + + + + - + - - + + - + - - + + - + - - - - - + + + + + + - + - - - + + + - + - - - - + + + + - + - + - + - - + + - + - - - + + + - + - - - + + + - + - + - + | return TCL_ERROR; } else if (tkwin == pwPtr->tkwin) { /* * A panedwindow cannot manage itself. */ |
︙ | |||
1088 1089 1090 1091 1092 1093 1094 | 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 | - + - + + - - + + - - + - - - + + + - - + + - - - + + - - - + + + - - + + - - + - + - + - + - + | static int PanedWindowSashCommand( PanedWindow *pwPtr, /* Pointer to paned window information. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
1244 1245 1246 1247 1248 1249 1250 | 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 | - + - + | PanedWindow *pwPtr, /* Information about widget. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { Tk_SavedOptions savedOptions; int typemask = 0; |
︙ | |||
1290 1291 1292 1293 1294 1295 1296 | 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | - + | static void PanedWindowWorldChanged( ClientData instanceData) /* Information about the paned window. */ { XGCValues gcValues; GC newGC; |
︙ | |||
1319 1320 1321 1322 1323 1324 1325 | 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 | - + | } /* * Arrange for the window to be redrawn, if neccessary. */ if (Tk_IsMapped(pwPtr->tkwin) && !(pwPtr->flags & REDRAW_PENDING)) { |
︙ | |||
1347 1348 1349 1350 1351 1352 1353 | 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | - + - + - + - + - - - + + - - + - - + - | */ static void PanedWindowEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
1400 1401 1402 1403 1404 1405 1406 | 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 | - + | *---------------------------------------------------------------------- */ static void PanedWindowCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
1437 1438 1439 1440 1441 1442 1443 | 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 | - - + + | *-------------------------------------------------------------- */ static void DisplayPanedWindow( ClientData clientData) /* Information about window. */ { |
︙ | |||
1479 1480 1481 1482 1483 1484 1485 | 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 | - + - + - - - + + + - + - + | /* * Set up boilerplate geometry values for sashes (width, height, common * coordinates). */ if (horizontal) { |
︙ | |||
1557 1558 1559 1560 1561 1562 1563 | 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 | - + - + - - - - + + + + - - - - - + + + + + - - + + - - + + - + - + | /* * Cancel idle callbacks for redrawing the widget and for rearranging the * panes. */ if (pwPtr->flags & REDRAW_PENDING) { |
︙ | |||
1622 1623 1624 1625 1626 1627 1628 | 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 | - + - - + + - - + - + - - + + - - + + - + - + - + - - + + - + - - + + - - + + - - - - - - + + + + + + - + - + - - - + + + - + - + - + - + | *-------------------------------------------------------------- */ static void PanedWindowReqProc( ClientData clientData, /* Paned window's information about window * that got new preferred geometry. */ |
︙ | |||
1771 1772 1773 1774 1775 1776 1777 | 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 | - - + + - + - + - - - - + - - + - - - - + - - + - + - + - - + + - - - + + + - + - + - - - - - - + + + + + + - - - - + - - - - - + - - + - + | + pwPtr->sashPad; } else { sashWidth = (2 * pwPtr->sashPad) + pwPtr->sashWidth; handleOffset = ((pwPtr->sashWidth - pwPtr->handleSize) / 2) + pwPtr->sashPad; } |
︙ | |||
1894 1895 1896 1897 1898 1899 1900 | 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 | - + - + | } else { paneSize += paneDynSize - paneDynMinSize + stretchReserve; stretchReserve = paneDynMinSize - paneDynSize; } } if (horizontal) { paneWidth = paneSize; |
︙ | |||
1924 1925 1926 1927 1928 1929 1930 | 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 | - - + + - - + + - - + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - + + - - - - - + + + + + - - + + - + - + - + - + - - + + - + - - - - + + + + - + - - - + + + - - + + - - - - + + + + - + - + - + - + - + - - - + + + | if (pwWidth - sxReserve < x + paneWidth - internalBW) { paneWidth = pwWidth - sxReserve - x + internalBW; } if (pwHeight - syReserve < y + paneHeight - internalBW) { paneHeight = pwHeight - syReserve - y + internalBW; } |
︙ | |||
2120 2121 2122 2123 2124 2125 2126 | 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 | - - + + - + - - + + - + - - + + - - - + + + - + - + - + - - + + - + - + - - + + - - + + - - + + - - - - - + + + + + - - - - - + + + + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + | GetFirstLastVisiblePane( PanedWindow *pwPtr, /* Pointer to the paned window info. */ int *firstPtr, /* Returned index for first. */ int *lastPtr) /* Returned index for last. */ { int i; |
︙ | |||
2365 2366 2367 2368 2369 2370 2371 | 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 | - + - + + | * *---------------------------------------------------------------------- */ static void DestroyOptionTables( ClientData clientData, /* Pointer to the OptionTables struct */ |
︙ | |||
2389 2390 2391 2392 2393 2394 2395 | 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 | - - + + - + - - + + - + - + - + - + - + | * Creates a new Tcl_Obj. * *---------------------------------------------------------------------- */ static Tcl_Obj * GetSticky( |
︙ | |||
2437 2438 2439 2440 2441 2442 2443 | 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 | - + - + - + - - + - | * specified string was empty and that is acceptable. * *---------------------------------------------------------------------- */ static int SetSticky( |
︙ | |||
2482 2483 2484 2485 2486 2487 2488 | 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 | - - + + - - - + + | break; case 'w': case 'W': sticky |= STICK_WEST; break; case ' ': case ',': case '\t': case '\r': case '\n': break; default: |
︙ | |||
2517 2518 2519 2520 2521 2522 2523 | 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 | - - + + - - + + - + - - - + + + - - + + - - + + - - + + - + - + | * Restores the old value. * *---------------------------------------------------------------------- */ static void RestoreSticky( |
︙ | |||
2604 2605 2606 2607 2608 2609 2610 | 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 | - - + + - + - - - + + + - - + + - - + + - + - + - - + + - + - + - + - + - + - - + + - + - + - - - + + + - + - + - + - + - + - + | static void MoveSash( PanedWindow *pwPtr, int sash, int diff) { int i; |
︙ | |||
2782 2783 2784 2785 2786 2787 2788 | 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 | - + | *-------------------------------------------------------------- */ static void DisplayProxyWindow( ClientData clientData) /* Information about window. */ { |
︙ | |||
2845 2846 2847 2848 2849 2850 2851 | 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 | - + | static int PanedWindowProxyCommand( PanedWindow *pwPtr, /* Pointer to paned window information. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
2872 2873 2874 2875 2876 2877 2878 | 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 | - - - + + + | switch ((enum options) index) { case PROXY_COORD: if (objc != 3) { Tcl_WrongNumArgs(interp, 3, objv, NULL); return TCL_ERROR; } |
︙ | |||
2902 2903 2904 2905 2906 2907 2908 | 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 | - + - + - + - + - + - - - - - - + + + + + + - + - + | return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK) { return TCL_ERROR; } |
︙ | |||
2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 | 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 | + + - - + + + - + - + - - + + - - + + | *---------------------------------------------------------------------- */ static int ObjectIsEmpty( Tcl_Obj *objPtr) /* Object to test. May be NULL. */ { int length; if (objPtr == NULL) { return 1; } |
︙ | |||
3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 | 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 | + + - + | static int PanedWindowIdentifyCoords( PanedWindow *pwPtr, /* Information about the widget. */ Tcl_Interp *interp, /* Interpreter in which to store result. */ int x, int y) /* Coordinates of the point to identify. */ { Tcl_Obj *list; int i, sashHeight, sashWidth, thisx, thisy; int found, isHandle, lpad, rpad, tpad, bpad; int first, last; list = Tcl_NewObj(); if (pwPtr->orient == ORIENT_HORIZONTAL) { if (Tk_IsMapped(pwPtr->tkwin)) { sashHeight = Tk_Height(pwPtr->tkwin); } else { sashHeight = Tk_ReqHeight(pwPtr->tkwin); } |
︙ | |||
3090 3091 3092 3093 3094 3095 3096 | 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 | - + - - + + - - + + - - + + - + - + - - - + + + + - - + - | tpad = bpad = pwPtr->sashPad; } if (Tk_IsMapped(pwPtr->tkwin)) { sashWidth = Tk_Width(pwPtr->tkwin); } else { sashWidth = Tk_ReqWidth(pwPtr->tkwin); } |
Deleted generic/tkPkgConfig.c.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to generic/tkPlace.c.
︙ | |||
13 14 15 16 17 18 19 | 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 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | - + - - + + - + - + - + - + - - + + - + - + - + - + - - - - - - - + + + + + + + - + - + - - - - - - - - - - - + + + + + + + + + + + - + - + - - - - + + + + - + - + - + - + - + - + - + - + - - - - - - + + + + + + - + - + - + - - + + - - + + - - - - + - - - + + + + - - + + - + + - - + + - - + + - - + + - - - - - - - - - - + + - + - + - - + + - - - + + + - - - - - - + + + + + + - + - + - - + - - + + - - - - + + + + - + - + - + - + - - - + + + - + - + - + - + - - - - - - - - - - - + + + + + + + + + + + - + - + - - + + - - - + + + - + - + - + - - - + + + + - + - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - - + + + - + - + - + - + - + - - - + + + - + - + - - - - - - - - + + + + + + + + - + - + - + - + - + - - - + + + + - + - + + - + - + - + - + - + - - + + - - - - + + - - + - - + + - + - - - - + + + + + - - - + + - - + + - - + + - + - + - + - + - + - - + + - - + + - - - + + + - - - - + + + - - + - - + + + - - + + - - - + - - - - - - + + - - - + + + + + - + - - - - - - - - - - - - - - - - - + - - - + + + - + - - - - - + + + + + - + - - - + + + | #include "tkInt.h" /* * Border modes for relative placement: * * BM_INSIDE: relative distances computed using area inside all |
︙ | |||
803 804 805 806 807 808 809 | 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 | + - + - - - + + - - + - - + - - + + - - - - - + + + + + + + + + + - + - - + + + - - + - - + + + - + - + - - + + - + - - - - + + + + - + - + - - + + - + + - - + + - - + + - - + + - + - + - - + + - + - - + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - + - + - + - - + + - + - + - - + + - + - - + + - + - + - - + + - - + + - + | */ static int PlaceInfoCommand( Tcl_Interp *interp, /* Interp into which to place result. */ Tk_Window tkwin) /* Token for the window to get info on. */ { char buffer[32 + TCL_INTEGER_SPACE]; |
︙ | |||
1018 1019 1020 1021 1022 1023 1024 | 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 | - - + + - - - + + + - - - - - - + + + + + + - - + + - - + + - - + + - + - - + + - + - + - + - - + + - - - + + + - + - - - - - + + + + - - - - - - - + + + + + + - - - - + + + + - - - + + + - + - - + - - + + - - - - + + + + - - + - + - - - + + + - - + - + - - + + - - + + - - + + - - - + + + - + + - - + + - - + + - - + + - - - - - - - - + + - - - + + + - + - + - + + - - + + - + - - + + - - + + - - - - - - + + + + + + | /* * Step 4: adjust width and height again to reflect inside dimensions * of window rather than outside. Also make sure that the width and * height aren't zero. */ |
Changes to generic/tkPlatDecls.h.
︙ | |||
19 20 21 22 23 24 25 | 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 270 271 272 273 274 275 276 277 278 | - - - - - + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - + + + + - + - - + + - - - - - - + + + + + + - + - + - + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + - - + + + + - + + + + + + + + + - + - - - + + - - - - + + + + + - - + + + - + - - - - - - - | /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made * in the generic/tk.decls script. */ |
Changes to generic/tkPointer.c.
︙ | |||
10 11 12 13 14 15 16 | 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 | - + + + + + + + + + + + + + + - + - + - + | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" |
︙ | |||
220 221 222 223 224 225 226 | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | - - + + - | { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); TkWindow *winPtr = (TkWindow *)tkwin; TkWindow *targetWinPtr; XPoint pos; XEvent event; |
︙ | |||
250 251 252 253 254 255 256 | 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 | - - + + - + | } /* * Generate ButtonPress/ButtonRelease events based on the differences * between the current button state and the last known button state. */ |
︙ | |||
422 423 424 425 426 427 428 | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - - - - - - - | int keyboard_mode, Window confine_to, Cursor cursor, Time time) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); |
︙ | |||
464 465 466 467 468 469 470 | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 | - | int XUngrabPointer( Display *display, Time time) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); |
︙ | |||
507 508 509 510 511 512 513 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - - - - - - - - + - | if (winPtr == tsdPtr->grabWinPtr) { tsdPtr->grabWinPtr = NULL; } if (winPtr == tsdPtr->restrictWinPtr) { tsdPtr->restrictWinPtr = NULL; } if (!(tsdPtr->restrictWinPtr || tsdPtr->grabWinPtr)) { |
︙ | |||
586 587 588 589 590 591 592 | 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 | - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | int XDefineCursor( Display *display, Window w, Cursor cursor) { |
Changes to generic/tkPort.h.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - + + - - + + - + + + + | * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #ifndef _TKPORT #define _TKPORT |
︙ |
Changes to generic/tkRectOval.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + - | /* * tkRectOval.c -- * * This file implements rectangle and oval items for canvas widgets. * * Copyright (c) 1991-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. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" |
︙ | |||
39 40 41 42 43 44 45 | 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 | - - + + + - - + + + - - + + + - - + + + - - + + + - + - + - + - + - - + + - + - + - + - - + + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - | GC fillGC; /* Graphics context for filling item. */ } RectOvalItem; /* * Information used for parsing configuration specs: */ |
︙ | |||
179 180 181 182 183 184 185 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | - - | TranslateRectOval, /* translateProc */ NULL, /* indexProc */ NULL, /* icursorProc */ NULL, /* selectionProc */ NULL, /* insertProc */ NULL, /* dTextProc */ NULL, /* nextPtr */ |
︙ | |||
204 205 206 207 208 209 210 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - - | TranslateRectOval, /* translateProc */ NULL, /* indexProc */ NULL, /* cursorProc */ NULL, /* selectionProc */ NULL, /* insertProc */ NULL, /* dTextProc */ NULL, /* nextPtr */ |
︙ | |||
235 236 237 238 239 240 241 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | - + - + | static int CreateRectOval( Tcl_Interp *interp, /* For error reporting. */ Tk_Canvas canvas, /* Canvas to hold new item. */ Tk_Item *itemPtr, /* Record to hold new item; header has been * initialized by caller. */ int objc, /* Number of arguments in objv. */ |
︙ | |||
266 267 268 269 270 271 272 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + | rectOvalPtr->fillGC = NULL; /* * Process the arguments to fill in the item record. */ for (i = 1; i < objc; i++) { |
︙ | |||
310 311 312 313 314 315 316 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 | - + - + + - - - - - + + + + + + + + + - - - + + + - - | static int RectOvalCoords( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item whose coordinates are to be read or * modified. */ int objc, /* Number of coordinates supplied in objv. */ |
︙ | |||
396 397 398 399 400 401 402 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | - + - + | static int ConfigureRectOval( Tcl_Interp *interp, /* Used for error reporting. */ Tk_Canvas canvas, /* Canvas containing itemPtr. */ Tk_Item *itemPtr, /* Rectangle item to reconfigure. */ int objc, /* Number of elements in objv. */ |
︙ | |||
475 476 477 478 479 480 481 | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | - + - + | } if (rectOvalPtr->outline.gc != NULL) { Tk_FreeGC(Tk_Display(tkwin), rectOvalPtr->outline.gc); } rectOvalPtr->outline.gc = newGC; if (state == TK_STATE_NULL) { |
︙ | |||
513 514 515 516 517 518 519 | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 | - - + + | gcValues.fill_style = FillStippled; mask = GCForeground|GCStipple|GCFillStyle; } else { mask = GCForeground; } #ifdef MAC_OSX_TK /* |
︙ | |||
575 576 577 578 579 580 581 | 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | - | static void DeleteRectOval( Tk_Canvas canvas, /* Info about overall widget. */ Tk_Item *itemPtr, /* Item that is being deleted. */ Display *display) /* Display containing window for canvas. */ { RectOvalItem *rectOvalPtr = (RectOvalItem *) itemPtr; |
︙ | |||
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | 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 644 645 646 647 648 649 650 651 652 653 | + - + - + | * * Side effects: * The fields x1, y1, x2, and y2 are updated in the header for itemPtr. * *-------------------------------------------------------------- */ /* ARGSUSED */ static void ComputeRectOvalBbox( Tk_Canvas canvas, /* Canvas that contains item. */ RectOvalItem *rectOvalPtr) /* Item whose bbox is to be recomputed. */ { int bloat, tmp; double dtmp, width; Tk_State state = rectOvalPtr->header.state; if (state == TK_STATE_NULL) { |
︙ | |||
671 672 673 674 675 676 677 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | - + - + - + | if (rectOvalPtr->outline.gc == NULL) { /* * The Win32 switch was added for 8.3 to solve a problem with ovals * leaving traces on bottom and right of 1 pixel. This may not be the * correct place to solve it, but it works. */ |
︙ | |||
748 749 750 751 752 753 754 | 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | - - - - - + - + - - + + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + | /* Describes region of canvas that must be * redisplayed (not used). */ { RectOvalItem *rectOvalPtr = (RectOvalItem *) itemPtr; short x1, y1, x2, y2; Pixmap fillStipple; Tk_State state = itemPtr->state; |
︙ | |||
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 | + - + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static double RectToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *pointPtr) /* Pointer to x and y coordinates. */ { RectOvalItem *rectPtr = (RectOvalItem *) itemPtr; double xDiff, yDiff, x1, y1, x2, y2, inc, tmp; double width; Tk_State state = itemPtr->state; if (state == TK_STATE_NULL) { |
︙ | |||
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 | + - + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static double OvalToPoint( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *pointPtr) /* Pointer to x and y coordinates. */ { RectOvalItem *ovalPtr = (RectOvalItem *) itemPtr; double width; int filled; Tk_State state = itemPtr->state; if (state == TK_STATE_NULL) { |
︙ | |||
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 | 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 | + - + - - + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int RectToArea( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against rectangle. */ double *areaPtr) /* Pointer to array of four coordinates (x1, * y1, x2, y2) describing rectangular area. */ { RectOvalItem *rectPtr = (RectOvalItem *) itemPtr; double halfWidth; double width; Tk_State state = itemPtr->state; if (state == TK_STATE_NULL) { |
︙ | |||
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 | + - + + - + - - + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int OvalToArea( Tk_Canvas canvas, /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against oval. */ double *areaPtr) /* Pointer to array of four coordinates (x1, * y1, x2, y2) describing rectangular area. */ { RectOvalItem *ovalPtr = (RectOvalItem *) itemPtr; |
︙ | |||
1282 1283 1284 1285 1286 1287 1288 | 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | && ((xDelta2 + yDelta1) < 1.0) && ((xDelta2 + yDelta2) < 1.0)) { return -1; } } return result; } |
︙ | |||
1434 1435 1436 1437 1438 1439 1440 | 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 | - + - - - - + - - - - - + - - - - - - + - - + - + | Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Canvas canvas, /* Information about overall canvas. */ Tk_Item *itemPtr, /* Item for which Postscript is wanted. */ int prepass) /* 1 means this is a prepass to collect font * information; 0 means final Postscript is * being created. */ { |
︙ | |||
1502 1503 1504 1505 1506 1507 1508 | 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 | - - - - - - - - - - - + + - - + + - - + + + + - - - - + - + - - - + + - - + - - - + + + + - - - - - - - - | fillColor = rectOvalPtr->disabledFillColor; } if (rectOvalPtr->disabledFillStipple!=None) { fillStipple = rectOvalPtr->disabledFillStipple; } } |
Changes to generic/tkScale.c.
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - - + + + - - - - | * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-2000 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ |
︙ | |||
41 42 43 44 45 46 47 | 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 | - - + + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - - + + - + - + - - + + - + - + - + - + - + - + - + - - + + - + - + - + - - + + - + - - + + - + - + - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + | static const char *const stateStrings[] = { "active", "disabled", "normal", NULL }; static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", |
︙ | |||
286 287 288 289 290 291 292 | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | - + | */ scalePtr->tkwin = tkwin; scalePtr->display = Tk_Display(tkwin); scalePtr->interp = interp; scalePtr->widgetCmd = Tcl_CreateObjCommand(interp, Tk_PathName(scalePtr->tkwin), ScaleWidgetObjCmd, |
︙ | |||
335 336 337 338 339 340 341 | 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 | - + - + - + - - - - + - - - | scalePtr->vertTroughX = 0; scalePtr->vertLabelX = 0; scalePtr->fontHeight = 0; scalePtr->cursor = NULL; scalePtr->takeFocusPtr = NULL; scalePtr->flags = NEVER_SET; |
︙ | |||
382 383 384 385 386 387 388 | 326 327 328 329 330 331 332 333 334 335 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 | - + - + - - + + - + - + - - + + + - + - - + + + - + - + | static int ScaleWidgetObjCmd( ClientData clientData, /* Information about scale widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { |
︙ | |||
448 449 450 451 452 453 454 | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 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 | - + - - + + + - + - + - - - - - + + + + + + + + + + + - - + - + | + scalePtr->borderWidth; y = TkScaleValueToPixel(scalePtr, value); } else { x = TkScaleValueToPixel(scalePtr, value); y = scalePtr->horizTroughY + scalePtr->width/2 + scalePtr->borderWidth; } |
︙ | |||
537 538 539 540 541 542 543 | 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 | - + - + - + - - - + + + | * Everything associated with the scale is freed up. * *---------------------------------------------------------------------- */ static void DestroyScale( |
︙ | |||
596 597 598 599 600 601 602 | 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 | - + - - - + + + - - - + + + | * *---------------------------------------------------------------------- */ static int ConfigureScale( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
651 652 653 654 655 656 657 | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 | - + - - - - + + + + + + - - + + - + - - + | double value; Tcl_Obj *valuePtr; valuePtr = Tcl_ObjGetVar2(interp, scalePtr->varNamePtr, NULL, TCL_GLOBAL_ONLY); if ((valuePtr != NULL) && (Tcl_GetDoubleFromObj(NULL, valuePtr, &value) == TCL_OK)) { |
︙ | |||
720 721 722 723 724 725 726 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | - - - + + + - - - + + + - + | TCL_GLOBAL_ONLY); if ((valuePtr == NULL) || (Tcl_GetDoubleFromObj(NULL, valuePtr, &varValue) != TCL_OK)) { ScaleSetVariable(scalePtr); } else { char varString[TCL_DOUBLE_SPACE], scaleString[TCL_DOUBLE_SPACE]; |
︙ | |||
764 765 766 767 768 769 770 | 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 | - + + + | static void ScaleWorldChanged( ClientData instanceData) /* Information about widget. */ { XGCValues gcValues; GC gc; |
︙ | |||
797 798 799 800 801 802 803 804 | 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - + - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - | * know how much space is needed now. */ ComputeScaleGeometry(scalePtr); TkEventuallyRedrawScale(scalePtr, REDRAW_ALL); } |
︙ | |||
977 978 979 980 981 982 983 | 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | - - - - - - + + + + - - - - - - - | fDigits = (mostSigDigit >= 0) ? mostSigDigit + afterDecimal : afterDecimal; if (afterDecimal > 0) { fDigits++; /* Decimal point. */ } if (mostSigDigit < 0) { fDigits++; /* Zero to left of decimal point. */ } |
︙ | |||
1014 1015 1016 1017 1018 1019 1020 | 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | - + - + | * gets told about the window's preferred size. * *---------------------------------------------------------------------- */ static void ComputeScaleGeometry( |
︙ | |||
1063 1064 1065 1066 1067 1068 1069 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 | - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - + - + | /* * Vertical scale: compute the amount of space needed to display the * scales value by formatting strings for the two end points; use * whichever length is longer. */ |
︙ | |||
1158 1159 1160 1161 1162 1163 1164 | 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | - + - + | */ static void ScaleEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
1206 1207 1208 1209 1210 1211 1212 | 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | - + | *---------------------------------------------------------------------- */ static void ScaleCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
1243 1244 1245 1246 1247 1248 1249 | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 | - + - + - + - - - - - + - - - - - - - - - - - - + + + - - - + + + | * be redrawn. * *-------------------------------------------------------------- */ void TkEventuallyRedrawScale( |
︙ | |||
1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 | 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | + - - + + - - - - - + - - - - + + - - - - - - - - - - - - - - - - | * The value displayed in the scale will change to match the variable's * new value. If the variable has a bogus value then it is reset to the * value of the scale. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static char * ScaleVarProc( ClientData clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* Name of variable. */ const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { |
︙ | |||
1401 1402 1403 1404 1405 1406 1407 | 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 | - + - + | valuePtr = Tcl_ObjGetVar2(interp, scalePtr->varNamePtr, NULL, TCL_GLOBAL_ONLY); result = Tcl_GetDoubleFromObj(interp, valuePtr, &value); if (result != TCL_OK) { resultStr = "can't assign non-numeric value to scale variable"; ScaleSetVariable(scalePtr); } else { |
︙ | |||
1437 1438 1439 1440 1441 1442 1443 | 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | - + - + - - - - - - - - + | * may also be invoked. The scale's slider is redrawn. * *-------------------------------------------------------------- */ void TkScaleSetValue( |
︙ | |||
1495 1496 1497 1498 1499 1500 1501 | 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 | - + - - + - - | * Other write traces on the variable will trigger. * *-------------------------------------------------------------- */ static void ScaleSetVariable( |
︙ | |||
1531 1532 1533 1534 1535 1536 1537 | 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 | - + | * None. * *---------------------------------------------------------------------- */ double TkScalePixelToValue( |
︙ | |||
1565 1566 1567 1568 1569 1570 1571 | 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 | - + | value = 0; } if (value > 1) { value = 1; } value = scalePtr->fromValue + value * (scalePtr->toValue - scalePtr->fromValue); |
︙ | |||
1589 1590 1591 1592 1593 1594 1595 | 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 | - + - - + + | * None. * *---------------------------------------------------------------------- */ int TkScaleValueToPixel( |
︙ |
Changes to generic/tkScale.h.
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + + | #ifndef _TKSCALE #define _TKSCALE #ifndef _TKINT #include "tkInt.h" #endif #ifdef BUILD_tk # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT #endif /* * Legal values for the "orient" field of TkScale records. */ enum orient { ORIENT_HORIZONTAL, ORIENT_VERTICAL }; |
︙ | |||
69 70 71 72 73 74 75 | 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 | - + - - - + | * display any tick marks. */ double resolution; /* If > 0, all values are rounded to an even * multiple of this value. */ int digits; /* Number of significant digits to print in * values. 0 means we get to choose the number * based on resolution and/or the range of the * scale. */ |
︙ | |||
212 213 214 215 216 217 218 | 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 | - - - - - - - - - + - + + + | /* * Space to leave between scale area and text, and between text and edge of * window. */ #define SPACING 2 |
Changes to generic/tkScrollbar.c.
︙ | |||
16 17 18 19 20 21 22 | 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 | - - + + + + - + - - + + - - + + - + - - + + - - - - + + + + - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + + - + - + - - - + + + | #include "tkScrollbar.h" #include "default.h" /* * Custom option for handling "-orient" */ |
︙ | |||
175 176 177 178 179 180 181 | 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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | - - - + - + - + - + - - + + - - - + + + - - - - - + - - - - - + + + - - - - - - - - - - - + - - - + + + + - - + - - - - - + + + + + + + + + - - - + + + - + + - + - + - + - + - - - - + + + + + - - + + - - - + + - + - + - - + + - - - - + + + - - + + + - - + + + - + - - + - - + + - - + + + - - + + | scrollPtr->inset = 0; scrollPtr->elementBorderWidth = -1; scrollPtr->arrowLength = 0; scrollPtr->sliderFirst = 0; scrollPtr->sliderLast = 0; scrollPtr->activeField = 0; scrollPtr->activeRelief = TK_RELIEF_RAISED; |
︙ | |||
365 366 367 368 369 370 371 | 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 416 417 418 419 420 421 422 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 | + - + - - - - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - + - - - + + + + + + + + + - - - - - - - + - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + + - + - + - - - + + - - + - + - + - + - + - + - + + + - - + + + + + - + - + | fraction = ((double) pos / (double) length); } if (fraction < 0) { fraction = 0; } else if (fraction > 1.0) { fraction = 1.0; } Tcl_PrintDouble(NULL, fraction, buf); |
︙ | |||
520 521 522 523 524 525 526 | 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 | - + - - + + - - + + - + | * *---------------------------------------------------------------------- */ static int ConfigureScrollbar( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
583 584 585 586 587 588 589 | 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | - + - + - - + + + | */ void TkScrollbarEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
648 649 650 651 652 653 654 | 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 | - + | *---------------------------------------------------------------------- */ static void ScrollbarCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
684 685 686 687 688 689 690 | 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | - + - - + + | *-------------------------------------------------------------- */ void TkScrollbarEventuallyRedraw( TkScrollbar *scrollPtr) /* Information about widget. */ { |
Changes to generic/tkScrollbar.h.
︙ | |||
89 90 91 92 93 94 95 | 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 | - + - - - + + - + - + - + - - - | /* * Information describing the application related to the scrollbar. This * information is provided by the application by invoking the "set" widget * command. This information can now be provided in two ways: the "old" * form (totalUnits, windowUnits, firstUnit, and lastUnit), or the "new" * form (firstFraction and lastFraction). FirstFraction and lastFraction * will always be valid, but the old-style information is only valid if |
︙ | |||
144 145 146 147 148 149 150 | 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 | - + - - + + - - + - - + | #define BOTTOM_ARROW 5 /* * Flag bits for scrollbars: * * REDRAW_PENDING: Non-zero means a DoWhenIdle handler has * already been queued to redraw this window. |
︙ |
Changes to generic/tkSelect.c.
︙ | |||
22 23 24 25 26 27 28 | 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 | - + - + - + + + - + - - + + - + | typedef struct { Tcl_Interp *interp; /* Interpreter in which to invoke command. */ int cmdLength; /* # of non-NULL bytes in command. */ int charOffset; /* The offset of the next char to retrieve. */ int byteOffset; /* The expected byte offset of the next * chunk. */ |
︙ | |||
121 122 123 124 125 126 127 | 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 | - + - + - + | ClientData clientData, /* Value to pass to proc. */ Atom format) /* Format in which the selection information * should be returned to the requestor. * XA_STRING is best by far, but anything * listed in the ICCCM will be tolerated * (blech). */ { |
︙ | |||
173 174 175 176 177 178 179 | 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 | - + - - + + - + | * If the user asked for a STRING handler and we understand * UTF8_STRING, we implicitly create a UTF8_STRING handler for them. */ target = winPtr->dispPtr->utf8Atom; for (selPtr = winPtr->selHandlerList; ; selPtr = selPtr->nextPtr) { if (selPtr == NULL) { |
︙ | |||
235 236 237 238 239 240 241 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - - + + | Tk_Window tkwin, /* Token for window. */ Atom selection, /* The selection whose handler is to be * removed. */ Atom target) /* The target whose selection handler is to be * removed. */ { TkWindow *winPtr = (TkWindow *) tkwin; |
︙ | |||
313 314 315 316 317 318 319 | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | - + - + | } if (selPtr->proc == HandleTclCommand) { /* * Mark the CommandInfo as deleted and free it if we can. */ |
︙ | |||
349 350 351 352 353 354 355 | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | - + - + | Tk_Window tkwin, /* Window to become new selection owner. */ Atom selection, /* Selection that window should own. */ Tk_LostSelProc *proc, /* Function to call when selection is taken * away from tkwin. */ ClientData clientData) /* Arbitrary one-word argument to pass to * proc. */ { |
︙ | |||
378 379 380 381 382 383 384 | 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 | - + - + | for (infoPtr = dispPtr->selectionInfoPtr; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { if (infoPtr->selection == selection) { break; } } if (infoPtr == NULL) { |
︙ | |||
427 428 429 430 431 432 433 | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | - + | /* * Now that we are done, we can invoke clearProc without running into * reentrancy problems. */ if (clearProc != NULL) { |
︙ | |||
456 457 458 459 460 461 462 | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | - + - + | */ void Tk_ClearSelection( Tk_Window tkwin, /* Window that selects a display. */ Atom selection) /* Selection to be cancelled. */ { |
︙ | |||
486 487 488 489 490 491 492 | 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | - + - + | } prevPtr = infoPtr; } if (infoPtr != NULL) { clearProc = infoPtr->clearProc; clearData = infoPtr->clearData; |
︙ | |||
573 574 575 576 577 578 579 | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | - + | for (infoPtr = dispPtr->selectionInfoPtr; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { if (infoPtr->selection == selection) { break; } } if (infoPtr != NULL) { |
︙ | |||
596 597 598 599 600 601 602 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 | - + - + - + - - + + - - + | if (count > TK_SEL_BYTES_AT_ONCE) { Tcl_Panic("selection handler returned too many bytes"); } if (count < 0) { goto cantget; } buffer[count] = 0; |
︙ | |||
664 665 666 667 668 669 670 | 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | - + - - + + - + - - + - + - + - - + + - - + - + - + - - + + - | int Tk_SelectionObjCmd( ClientData clientData, /* Main window associated with * interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
801 802 803 804 805 806 807 | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | - + - + - - - - - + + + + + - - + + - | } if (selName != NULL) { selection = Tk_InternAtom(tkwin, selName); } else { selection = XA_PRIMARY; } if (count > 1) { |
︙ | |||
868 869 870 871 872 873 874 | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | - + - | case HANDLE_TYPE: targetName = Tcl_GetString(objs[1]); break; } } if ((count < 2) || (count > 4)) { |
︙ | |||
896 897 898 899 900 901 902 | 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 | - + - - + + - + - - - + + + + - - + + - - + - + - + - + - + - - + + + - + + - + - - + | if (count > 3) { format = Tk_InternAtom(tkwin, Tcl_GetString(objs[3])); } else if (formatName != NULL) { format = Tk_InternAtom(tkwin, formatName); } else { format = XA_STRING; } |
︙ | |||
1088 1089 1090 1091 1092 1093 1094 | 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 | - + - - + + | * Frees up memory associated with the selection. * *---------------------------------------------------------------------- */ void TkSelDeadWindow( |
︙ | |||
1116 1117 1118 1119 1120 1121 1122 | 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 | - + - + - + - + | } } if (selPtr->proc == HandleTclCommand) { /* * Mark the CommandInfo as deleted and free it when we can. */ |
︙ | |||
1166 1167 1168 1169 1170 1171 1172 | 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 | - + - - + | */ void TkSelInit( Tk_Window tkwin) /* Window token (used to find display to * initialize). */ { |
︙ | |||
1217 1218 1219 1220 1221 1222 1223 | 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 | - + - + | * *---------------------------------------------------------------------- */ void TkSelClearSelection( Tk_Window tkwin, /* Window for which event was targeted. */ |
︙ | |||
1242 1243 1244 1245 1246 1247 1248 | 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 | - + - + - + | if (infoPtr->selection == eventPtr->xselectionclear.selection) { break; } prevPtr = infoPtr; } if (infoPtr != NULL && (infoPtr->owner == tkwin) && |
︙ | |||
1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 | 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | + - + - + - + | * Side effects: * Bytes get appended to the dynamic string pointed to by the clientData * argument. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int SelGetProc( ClientData clientData, /* Dynamic string holding partially assembled * selection. */ |
︙ | |||
1313 1314 1315 1316 1317 1318 1319 | 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 | - + - + - + - - - + + + + + - + - - - + + + - + - + + + - - + + + + + - - - + + - - + - - - - - - - + + + + - + - - + - + - - - - - + + - - - - - + + + + - - + | * * Side effects: * None except for things done by the Tcl command. * *---------------------------------------------------------------------- */ |
︙ | |||
1465 1466 1467 1468 1469 1470 1471 | 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 | - + - + - + - - + | TkSelectionInfo *infoPtr, /* Info about selection being retrieved. */ Atom target, /* Desired form of selection. */ char *buffer, /* Place to put selection characters. */ int maxBytes, /* Maximum # of bytes to store at buffer. */ Atom *typePtr) /* Store here the type of the selection, for * use in converting to proper X format. */ { |
︙ | |||
1561 1562 1563 1564 1565 1566 1567 | 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 | - - + + + - - + - + - + + - - - + + + - + + + + + - - + - | *---------------------------------------------------------------------- */ static void LostSelection( ClientData clientData) /* Pointer to LostCommand structure. */ { |
Changes to generic/tkSelect.h.
︙ | |||
21 22 23 24 25 26 27 | 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 | - - + - - - - + - - + + | * structures because a display can have multiple different selections active * at the same time. */ typedef struct TkSelectionInfo { Atom selection; /* Selection name, e.g. XA_PRIMARY. */ Tk_Window owner; /* Current owner of this selection. */ |
︙ | |||
75 76 77 78 79 80 81 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | + - + | typedef struct TkSelRetrievalInfo { Tcl_Interp *interp; /* Interpreter for error reporting. */ TkWindow *winPtr; /* Window used as requestor for selection. */ Atom selection; /* Selection being requested. */ Atom property; /* Property where selection will appear. */ Atom target; /* Desired form for selection. */ int (*proc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, |
︙ | |||
103 104 105 106 107 108 109 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + | * CLIPBOARD selection is retrieved. All buffers of a given type on the same * clipboard must have the same format. The TkClipboardTarget structure is * used to record the information about a chain of buffers of the same type. */ typedef struct TkClipboardBuffer { char *buffer; /* Null terminated data buffer. */ |
︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | + + + | MODULE_SCOPE TkSelInProgress *TkSelGetInProgress(void); MODULE_SCOPE void TkSelSetInProgress(TkSelInProgress *pendingPtr); MODULE_SCOPE void TkSelClearSelection(Tk_Window tkwin, XEvent *eventPtr); MODULE_SCOPE int TkSelDefaultSelection(TkSelectionInfo *infoPtr, Atom target, char *buffer, int maxBytes, Atom *typePtr); MODULE_SCOPE int TkSelGetSelection(Tcl_Interp *interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc *proc, ClientData clientData); #ifndef TkSelUpdateClipboard MODULE_SCOPE void TkSelUpdateClipboard(TkWindow *winPtr, TkClipboardTarget *targetPtr); #endif #endif /* _TKSELECT */ |
Changes to generic/tkSquare.c.
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - - - - - - | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #if 0 #define __NO_OLD_CONFIG #endif |
︙ | |||
62 63 64 65 66 67 68 | 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 | - - - - - - + + + + + + - + - - - + + + - - + + - + - + - + - - + + + + + - + - + - + - + - - + | /* * Information used for argv parsing. */ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", |
︙ | |||
157 158 159 160 161 162 163 | 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 | - - + + - - + + - + - + - - + + | optionTable = Tk_CreateOptionTable(interp, optionSpecs); /* * Allocate and initialize the widget record. The memset allows us to set * just the non-NULL/0 items. */ |
︙ | |||
218 219 220 221 222 223 224 | 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 | - + - + - + - + - - + + - + - + - + - + - + - + - + - + | */ static int SquareWidgetObjCmd( ClientData clientData, /* Information about square widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
315 316 317 318 319 320 321 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - + - | * for squarePtr; old resources get freed, if there were any. * *---------------------------------------------------------------------- */ static int SquareConfigure( |
︙ | |||
351 352 353 354 355 356 357 | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | - + | */ Tk_GeometryRequest(squarePtr->tkwin, 200, 150); Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->borderWidthPtr, &borderWidth); Tk_SetInternalBorder(squarePtr->tkwin, borderWidth); if (!squarePtr->updatePending) { |
︙ | |||
381 382 383 384 385 386 387 | 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 416 417 | - + - + - + - + - + | */ static void SquareObjEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
434 435 436 437 438 439 440 | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | - + | *---------------------------------------------------------------------- */ static void SquareDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
471 472 473 474 475 476 477 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + | *-------------------------------------------------------------- */ static void SquareDisplay( ClientData clientData) /* Information about window. */ { |
︙ | |||
552 553 554 555 556 557 558 | 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 | - + - + - + | * Everything associated with the square is freed up. * *---------------------------------------------------------------------- */ static void SquareDestroy( |
︙ | |||
579 580 581 582 583 584 585 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | - + | * the square in the window. * *---------------------------------------------------------------------- */ static void KeepInWindow( |
︙ |
Changes to generic/tkStubInit.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 | - + - + - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + - + + + - - - - - - + + + + + + + + + - - - + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + | /* * tkStubInit.c -- * * This file contains the initializers for the Tk stub vectors. * * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" |
︙ | |||
235 236 237 238 239 240 241 242 243 244 245 | 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 | + - + - - + - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + - - - - + + + + + + - - - - - - - - - + - + - + - - + + | # define TkWinSetWindowPos 0 # define TkWinWmCleanup 0 # define TkWinXCleanup 0 # define TkWinXInit 0 # define TkWinSetForegroundWindow 0 # define TkWinDialogDebug 0 # define TkWinGetMenuSystemDefault 0 # define TkWinGetPlatformId 0 # define TkWinSetHINSTANCE 0 # define TkWinGetPlatformTheme 0 # define TkWinChildProc 0 |
︙ | |||
361 362 363 364 365 366 367 | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + - + | TkPointerEvent, /* 69 */ TkPolygonToArea, /* 70 */ TkPolygonToPoint, /* 71 */ TkPositionInTree, /* 72 */ TkpRedirectKeyEvent, /* 73 */ TkpSetMainMenubar, /* 74 */ TkpUseWindow, /* 75 */ |
︙ | |||
398 399 400 401 402 403 404 | 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 416 417 418 419 420 421 422 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 | - - - - - - - - - - + + + + + + + + + + - - + + - + - - + + - - + + - + - - - + + + - - + + - + - - - - - - - - - - + + + + + + + + + + - + - + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - + - - - + - - - - - - + - - - - - - - - - + - - + + - + | TkGetDisplayList, /* 106 */ TkGetMainInfoList, /* 107 */ TkGetWindowFromObj, /* 108 */ TkpGetString, /* 109 */ TkpGetSubFonts, /* 110 */ TkpGetSystemDefault, /* 111 */ TkpMenuThreadInit, /* 112 */ |
︙ | |||
568 569 570 571 572 573 574 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | - - - - + + - + - + - + - - + + - + - + - + - - - + + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + | TkpSync, /* 39 */ TkUnixContainerId, /* 40 */ TkUnixDoOneXEvent, /* 41 */ TkUnixSetMenubar, /* 42 */ TkWmCleanup, /* 43 */ TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ |
︙ | |||
764 765 766 767 768 769 770 | 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | - + | XUngrabPointer, /* 74 */ XUnmapWindow, /* 75 */ XWindowEvent, /* 76 */ XDestroyIC, /* 77 */ XFilterEvent, /* 78 */ XmbLookupString, /* 79 */ TkPutImage, /* 80 */ |
︙ | |||
798 799 800 801 802 803 804 | 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + | XGrabServer, /* 108 */ XUngrabServer, /* 109 */ XFree, /* 110 */ XNoOp, /* 111 */ XSynchronize, /* 112 */ XSync, /* 113 */ XVisualIDFromVisual, /* 114 */ |
︙ | |||
936 937 938 939 940 941 942 | 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - - + + + + - + - + - - - - - - + + + + + + - + - + | XDrawPoint, /* 85 */ XDrawPoints, /* 86 */ XWarpPointer, /* 87 */ XQueryColor, /* 88 */ XQueryColors, /* 89 */ XQueryTree, /* 90 */ XSync, /* 91 */ |
︙ | |||
1146 1147 1148 1149 1150 1151 1152 | 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 | - + | Tk_GetCursor, /* 91 */ Tk_GetCursorFromData, /* 92 */ Tk_GetFont, /* 93 */ Tk_GetFontFromObj, /* 94 */ Tk_GetFontMetrics, /* 95 */ Tk_GetGC, /* 96 */ Tk_GetImage, /* 97 */ |
︙ | |||
1266 1267 1268 1269 1270 1271 1272 | 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 | - - + + | Tk_InitOptions, /* 211 */ Tk_MainEx, /* 212 */ Tk_RestoreSavedOptions, /* 213 */ Tk_SetOptions, /* 214 */ Tk_InitConsoleChannels, /* 215 */ Tk_CreateConsoleWindow, /* 216 */ Tk_CreateSmoothMethod, /* 217 */ |
︙ | |||
1322 1323 1324 1325 1326 1327 1328 | 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 | - - - - - - + + + + + + + - + - - - - - + - - - - - - | Tk_PhotoPutZoomedBlock, /* 267 */ Tk_PhotoSetSize, /* 268 */ Tk_GetUserInactiveTime, /* 269 */ Tk_ResetUserInactiveTime, /* 270 */ Tk_Interp, /* 271 */ Tk_CreateOldImageType, /* 272 */ Tk_CreateOldPhotoImageFormat, /* 273 */ |
Changes to generic/tkStubLib.c.
︙ | |||
9 10 11 12 13 14 15 | 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 | - + - + - - - - - - - - - - - + + + + + | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" |
︙ | |||
65 66 67 68 69 70 71 | 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 | - + - + - - + + - + - + - + - + - + | * * Side effects: * Sets the stub table pointers. * *---------------------------------------------------------------------- */ #undef Tk_InitStubs |
︙ |
Changes to generic/tkStyle.c.
︙ | |||
94 95 96 97 98 99 100 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + | * (by a derived element). */ } Element; /* * Thread-local data. */ |
︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - - + + - + - + | static void InitWidgetSpec(StyledWidgetSpec *widgetSpecPtr, StyledElement *elementPtr, Tk_OptionTable optionTable); static int SetStyleFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); /* * The following structure defines the implementation of the "style" Tcl |
︙ | |||
174 175 176 177 178 179 180 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - + | * Memory allocated. * *--------------------------------------------------------------------------- */ void TkStylePkgInit( |
︙ | |||
204 205 206 207 208 209 210 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | - + + | tsdPtr->defaultEnginePtr = (StyleEngine *) Tk_RegisterStyleEngine(NULL, NULL); /* * Create the default system style. */ |
︙ | |||
229 230 231 232 233 234 235 | 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 | - + - + - + - + - + | * Memory freed. * *--------------------------------------------------------------------------- */ void TkStylePkgFree( |
︙ | |||
327 328 329 330 331 332 333 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | - - + + - + | return NULL; } /* * Allocate and intitialize a new engine. */ |
︙ | |||
385 386 387 388 389 390 391 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - + | } /* * Allocate and initialize elements array. */ if (tsdPtr->nbElements > 0) { |
︙ | |||
426 427 428 429 430 431 432 | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | - + | /* * Free allocated elements. */ for (elementId = 0; elementId < tsdPtr->nbElements; elementId++) { FreeStyledElement(enginePtr->elements+elementId); } |
︙ | |||
463 464 465 466 467 468 469 | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | - + | } entryPtr = Tcl_FindHashEntry(&tsdPtr->engineTable, (name!=NULL?name:"")); if (!entryPtr) { return NULL; } |
︙ | |||
517 518 519 520 521 522 523 | 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | - + | * Memory freed. * *--------------------------------------------------------------------------- */ static void FreeElement( |
︙ | |||
574 575 576 577 578 579 580 | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | - + | /* * Free allocated widget specs. */ for (i = 0; i < elementPtr->nbWidgetSpecs; i++) { FreeWidgetSpec(elementPtr->widgetSpecs+i); } |
︙ | |||
632 633 634 635 636 637 638 | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | - + - + - + - + - + + | dot = strchr(name, '.'); if (dot) { genericId = CreateElement(dot+1, 0); } elementId = tsdPtr->nbElements++; |
︙ | |||
755 756 757 758 759 760 761 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | - + | Tk_ElementSpec *templatePtr)/* Static template information about the * element. */ { int elementId; StyledElement *elementPtr; Tk_ElementSpec *specPtr; int nbOptions; |
︙ | |||
782 783 784 785 786 787 788 | 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 | - + - + - + | /* * Initialize the styled element. */ elementPtr = ((StyleEngine *) engine)->elements+elementId; |
︙ | |||
919 920 921 922 923 924 925 | 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | - - + + | /* empty body */ } /* * Build the widget option list. */ |
︙ | |||
960 961 962 963 964 965 966 | 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 | - + | */ static void FreeWidgetSpec( StyledWidgetSpec *widgetSpecPtr) /* The widget spec to free. */ { |
︙ | |||
1004 1005 1006 1007 1008 1009 1010 | 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 | - + + | } /* * Create and initialize a new widget spec. */ i = elementPtr->nbWidgetSpecs++; |
︙ | |||
1072 1073 1074 1075 1076 1077 1078 | 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 | - + - + | */ void Tk_GetElementSize( Tk_Style style, /* The widget style. */ Tk_StyledElement element, /* The styled element, previously returned by * Tk_GetStyledElement. */ |
︙ | |||
1113 1114 1115 1116 1117 1118 1119 | 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 | - + - + | */ void Tk_GetElementBox( Tk_Style style, /* The widget style. */ Tk_StyledElement element, /* The styled element, previously returned by * Tk_GetStyledElement. */ |
︙ | |||
1155 1156 1157 1158 1159 1160 1161 | 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 | - + - + | */ int Tk_GetElementBorderWidth( Tk_Style style, /* The widget style. */ Tk_StyledElement element, /* The styled element, previously returned by * Tk_GetStyledElement. */ |
︙ | |||
1186 1187 1188 1189 1190 1191 1192 | 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 | - + - + | */ void Tk_DrawElement( Tk_Style style, /* The widget style. */ Tk_StyledElement element, /* The styled element, previously returned by * Tk_GetStyledElement. */ |
︙ | |||
1249 1250 1251 1252 1253 1254 1255 | 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 | - - - + + + - + | return NULL; } /* * Allocate and intitialize a new style. */ |
︙ | |||
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 | 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 | + - + - - + - + + + - + - + | Tcl_Interp *interp, /* Interp for error return. */ const char *name) /* Name of the style to retrieve. NULL or empty * means the default system style. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); Tcl_HashEntry *entryPtr; Style *stylePtr; /* * Search for a corresponding entry in the style table. */ entryPtr = Tcl_FindHashEntry(&tsdPtr->styleTable, (name!=NULL?name:"")); if (entryPtr == NULL) { if (interp != NULL) { |
︙ | |||
1398 1399 1400 1401 1402 1403 1404 1405 | 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 | + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + - - - - - + | Tk_Style Tk_AllocStyleFromObj( Tcl_Interp *interp, /* Interp for error return. */ Tcl_Obj *objPtr) /* Object containing name of the style to * retrieve. */ { Style *stylePtr; if (objPtr->typePtr != &styleObjType) { |
︙ |
Changes to generic/tkTest.c.
︙ | |||
10 11 12 13 14 15 16 | 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 | - - - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - + + - + - + - - - - + + - + - + + + + + + + + + + + + + + - - + + | * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ |
︙ | |||
147 148 149 150 151 152 153 | 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 | + + + + + - - - + + + + - - + + - - - + + - - - - + + + - - - - + + + - - + - - - - - - - - + + + + + + + + + + + + + + - - - - + + + - - - - + + + + + + + + + + + + + + + - + - - - - - - - - - + + - + + + + - + - + - + - + - - + - - - - - + + - - + + - + - + - + | * this widget. */ } TrivialCommandHeader; /* * Forward declarations for functions defined later in this file: */ static int CBindingEvalProc(ClientData clientData, Tcl_Interp *interp, XEvent *eventPtr, Tk_Window tkwin, KeySym keySym); static void CBindingFreeProc(ClientData clientData); int Tktest_Init(Tcl_Interp *interp); |
︙ | |||
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + | return TkplatformtestInit(interp); } /* *---------------------------------------------------------------------- * * TestcbindCmd -- * * This function implements the "testcbinding" command. It provides a set * of functions for testing C bindings in tkBind.c. * * Results: * A standard Tcl result. * * Side effects: * Depends on option; see below. * *---------------------------------------------------------------------- */ static int TestcbindCmd( ClientData clientData, /* Main window for application. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { TkWindow *winPtr; Tk_Window tkwin; ClientData object; CBinding *cbindPtr; if (argc < 4 || argc > 5) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " bindtag pattern command ?deletecommand?", NULL); return TCL_ERROR; } tkwin = (Tk_Window) clientData; if (argv[1][0] == '.') { winPtr = (TkWindow *) Tk_NameToWindow(interp, argv[1], tkwin); if (winPtr == NULL) { return TCL_ERROR; } object = (ClientData) winPtr->pathName; } else { winPtr = (TkWindow *) clientData; object = (ClientData) Tk_GetUid(argv[1]); } if (argv[3][0] == '\0') { return Tk_DeleteBinding(interp, winPtr->mainPtr->bindingTable, object, argv[2]); } cbindPtr = (CBinding *) ckalloc(sizeof(CBinding)); cbindPtr->interp = interp; cbindPtr->command = strcpy((char *) ckalloc(strlen(argv[3]) + 1), argv[3]); if (argc == 4) { cbindPtr->delete = NULL; } else { cbindPtr->delete = strcpy((char *) ckalloc(strlen(argv[4]) + 1), argv[4]); } if (TkCreateBindingProcedure(interp, winPtr->mainPtr->bindingTable, object, argv[2], CBindingEvalProc, CBindingFreeProc, (ClientData) cbindPtr) == 0) { ckfree((char *) cbindPtr->command); if (cbindPtr->delete != NULL) { ckfree((char *) cbindPtr->delete); } ckfree((char *) cbindPtr); return TCL_ERROR; } return TCL_OK; } static int CBindingEvalProc( ClientData clientData, Tcl_Interp *interp, XEvent *eventPtr, Tk_Window tkwin, KeySym keySym) { CBinding *cbindPtr; cbindPtr = (CBinding *) clientData; return Tcl_EvalEx(interp, cbindPtr->command, -1, TCL_EVAL_GLOBAL); } static void CBindingFreeProc( ClientData clientData) { CBinding *cbindPtr = (CBinding *) clientData; if (cbindPtr->delete != NULL) { Tcl_EvalEx(cbindPtr->interp, cbindPtr->delete, -1, TCL_EVAL_GLOBAL); ckfree((char *) cbindPtr->delete); } ckfree((char *) cbindPtr->command); ckfree((char *) cbindPtr); } /* *---------------------------------------------------------------------- * * TestbitmapObjCmd -- * * This function implements the "testbitmap" command, which is used to * test color resource handling in tkBitmap tmp.c. * * Results: * A standard Tcl result. * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int TestbitmapObjCmd( |
︙ | |||
361 362 363 364 365 366 367 368 369 | 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | + - + + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int TestborderObjCmd( |
︙ | |||
394 395 396 397 398 399 400 401 402 | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int TestcolorObjCmd( |
︙ | |||
427 428 429 430 431 432 433 434 435 | 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 | + - + - + - + + - - - - - + + + + + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int TestcursorObjCmd( |
︙ | |||
497 498 499 500 501 502 503 504 505 506 507 508 509 510 | 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 | + - - + + - + - + - + - + - + - - + + - - + + - + - + - + - + - + - + - - + + - - + + - + - + - - + + - + - + - + - + - + - - + + - - + + + - + - + - + - + - + + - + - + + - + - + - + - + - - + - + - + - - - + + + + - + - + + - + - + - + - - + + - + - - + + - - - - - + + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int TestobjconfigObjCmd( ClientData clientData, /* Main window for application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
860 861 862 863 864 865 866 | 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | - + - + - + - + - - + + - - + + - + - + - - + + - + - + - + - + - + - + - - + + - - + + + - + - + - + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - - + + - - + + - + - - - + + + - - + + - - + + - + - + - + - + - + - + - + - + | } InternalRecord; InternalRecord *recordPtr; static const char *const internalStringTable[] = { "one", "two", "three", "four", NULL }; static const Tk_OptionSpec internalSpecs[] = { {TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1", |
︙ | |||
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 | 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 | + - + - + - + - - + + - + - + - + - + - + - + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int TrivialConfigObjCmd( ClientData clientData, /* Main window for application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int result = TCL_OK; |
︙ | |||
1236 1237 1238 1239 1240 1241 1242 | 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | - + - - + + | *---------------------------------------------------------------------- */ static void TrivialCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
1275 1276 1277 1278 1279 1280 1281 | 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 | - + - + | */ static void TrivialEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { |
︙ | |||
1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 | 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 | + - + - + - - + + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int TestfontObjCmd( ClientData clientData, /* Main window for application. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 | + - + - - + + - - + + - - + + - + - + - - - + + + - + + - + - - + + - + - - + + + - - - - + + + + - - - - - - + + + + + + - + - + | * * Side effects: * The data structure for a new image is allocated. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int ImageCreate( Tcl_Interp *interp, /* Interpreter for application containing * image. */ |
︙ | |||
1491 1492 1493 1494 1495 1496 1497 | 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 | - + - + - + - - + + - - + | *---------------------------------------------------------------------- */ static ClientData ImageGet( Tk_Window tkwin, /* Token for window in which image will be * used. */ |
︙ | |||
1541 1542 1543 1544 1545 1546 1547 | 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 | - - + + - - - - - - - - + - - - - - - - - - - - - - - - - - - + + - - - - + + + - - - - - - - - - - - - - - - - + + - - + + - | int imageX, int imageY, /* Origin of area to redraw, relative to * origin of image. */ int width, int height, /* Dimensions of area to redraw. */ int drawableX, int drawableY) /* Coordinates in drawable corresponding to * imageX and imageY. */ { |
︙ | |||
1625 1626 1627 1628 1629 1630 1631 | 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 | - + - - - + + + - + | */ static void ImageFree( ClientData clientData, /* Pointer to TImageInstance for instance. */ Display *display) /* Display where image was to be drawn. */ { |
︙ | |||
1655 1656 1657 1658 1659 1660 1661 | 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 | - + - + - + - + - + + - + - - + + - + - - + + - + + - + - + - - + + - + - - + + + - - - + + + + - + - + - + - + - + + - + - + - - + + - - + + + - - + + + + + + + + + + + + + + + + + + - + + + + + - + + + + + - + - + + - + - - + + - + - - + + + - - + + - + | * Information about the image is deleted. * *---------------------------------------------------------------------- */ static void ImageDelete( |
︙ | |||
1903 1904 1905 1906 1907 1908 1909 | 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + - + - - + + - - + + + - - + + - + | } if (property != NULL) { XFree(property); } return TCL_OK; } |
︙ | |||
2028 2029 2030 2031 2032 2033 2034 | 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 | - + + - + - + - + - + - + - - - + + - + - + + - - - + + + - - + + - + - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * CustomOptionFree None. * * Side effects: * Depends on the function. * CustomOptionSet Sets option value to new setting. * CustomOptionGet Creates a new Tcl_Obj. * CustomOptionRestore Resets option value to original value. |
Changes to generic/tkText.c.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - - + + + | * Copyright (c) 1994-1996 Sun Microsystems, Inc. * Copyright (c) 1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ |
︙ | |||
68 69 70 71 72 73 74 | 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 | - - - - - - - - - - - + - + - - + + - - - + + - + - + - - + + - + - + - - + + - - + + - + - + - + - + - + - + - - + + - - + + - + - - + + - + - + - - - - - + - + - - + - + - + - - + + - - - + + + - - + + - + - + - + - + - - + + - - + + - + - - + + - + - + - - + - - + + - + - + | * the string table below. */ static const char *const tabStyleStrings[] = { "tabular", "wordprocessor", NULL }; |
︙ | |||
275 276 277 278 279 280 281 | 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 | - + - + - + - + | typedef ClientData SearchAddLineProc(int lineNum, struct SearchSpec *searchSpecPtr, Tcl_Obj *theLine, int *lenPtr, int *extraLinesPtr); typedef int SearchMatchProc(int lineNum, struct SearchSpec *searchSpecPtr, ClientData clientData, Tcl_Obj *theLine, |
︙ | |||
361 362 363 364 365 366 367 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | - - + + | static void TextBlinkProc(ClientData clientData); static void TextCmdDeletedProc(ClientData clientData); static int CreateWidget(TkSharedText *sharedPtr, Tk_Window tkwin, Tcl_Interp *interp, const TkText *parent, int objc, Tcl_Obj *const objv[]); static void TextEventProc(ClientData clientData, XEvent *eventPtr); |
︙ | |||
400 401 402 403 404 405 406 | 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 416 417 418 419 420 421 422 | - - - + + - + | int what); static int TextEditUndo(TkText *textPtr); static int TextEditRedo(TkText *textPtr); static Tcl_Obj * TextGetText(const TkText *textPtr, const TkTextIndex *index1, const TkTextIndex *index2, int visibleOnly); static void GenerateModifiedEvent(TkText *textPtr); |
︙ | |||
457 458 459 460 461 462 463 | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | - + - + | int Tk_TextObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
498 499 500 501 502 503 504 | 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 | - + - + - + - + - + | Tk_Window tkwin, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ const TkText *parent, /* If non-NULL then take default start, end * from this parent. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
643 644 645 646 647 648 649 | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | - + - + - + - + - + - + + | * Create the option table for this widget class. If it has already been * created, the cached pointer will be returned. */ optionTable = Tk_CreateOptionTable(interp, optionSpecs); Tk_SetClass(textPtr->tkwin, "Text"); |
︙ | |||
695 696 697 698 699 700 701 | 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 | - + - + - + - - + + - + - - + - + - - + + - + - - - - + + + + - + - - - - + + + + | static int TextWidgetObjCmd( ClientData clientData, /* Information about text widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
793 794 795 796 797 798 799 | 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | - + + + + + + - - - - - - - - - + - - - + + + - + - - + - - + - + + + + + + + + + - + - + - + - + | relation = TkTextIndexCmp(index1Ptr, index2Ptr); p = Tcl_GetString(objv[3]); if (p[0] == '<') { value = (relation < 0); if ((p[1] == '=') && (p[2] == 0)) { value = (relation <= 0); } else if (p[1] != 0) { |
︙ | |||
918 919 920 921 922 923 924 | 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 | - - + + - + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - | index = *indexFromPtr; index.byteIndex = 0; /* * We're going to count up all display lines in the logical * line of 'indexFromPtr' up to, but not including the logical * line of 'indexToPtr' (except if this line is elided), and |
︙ | |||
1121 1122 1123 1124 1125 1126 1127 | 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 | - + + - + - - + + - + | TkTextIndex *indices, *ixStart, *ixEnd, *lastStart; char *useIdx; int i; objc -= 2; objv += 2; |
︙ | |||
1213 1214 1215 1216 1217 1218 1219 | 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 | - + | * indices are preparsed above. */ DeleteIndexRange(NULL, textPtr, &indices[i], &indices[i+1], 1); } } |
︙ | |||
1235 1236 1237 1238 1239 1240 1241 | 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 | - - - - - + + + + + - + - + - + - + | result = TCL_ERROR; goto done; } if (TkTextDLineInfo(textPtr, indexPtr, &x, &y, &width, &height, &base) == 0) { Tcl_Obj *listObj = Tcl_NewListObj(0, NULL); |
︙ | |||
1391 1392 1393 1394 1395 1396 1397 | 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 | - - - - - - - - - - - + - - - + + | } case TEXT_MARK: result = TkTextMarkCmd(textPtr, interp, objc, objv); break; case TEXT_PEER: result = TextPeerCmd(textPtr, interp, objc, objv); break; |
︙ | |||
1458 1459 1460 1461 1462 1463 1464 | 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 | - + - - - - - - - - + | && (TkTextIndexCmp(indexToPtr, &index) > 0)) { /* * The insertion point is inside the range to be replaced, so * we have to do some calculations to ensure it doesn't move * unnecessarily. */ |
︙ | |||
1522 1523 1524 1525 1526 1527 1528 | 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + | break; case TEXT_SEARCH: result = TextSearchCmd(textPtr, interp, objc, objv); break; case TEXT_SEE: result = TkTextSeeCmd(textPtr, interp, objc, objv); break; |
︙ | |||
1603 1604 1605 1606 1607 1608 1609 | 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 | - + - + - + - - + + | static int SharedTextObjCmd( ClientData clientData, /* Information about shared test B-tree. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
1712 1713 1714 1715 1716 1717 1718 | 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 | - + - + - - + + - + - + - - - + - - | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = textPtr->tkwin; int index; |
︙ | |||
1950 1951 1952 1953 1954 1955 1956 | 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 | - + - + + + - + - + | * We also need to clean up widget-specific marks ('insert', 'current'), * since otherwise marks will never disappear from the B-tree. */ TkTextDeleteTag(textPtr, textPtr->selTagPtr); TkBTreeUnlinkSegment(textPtr->insertMarkPtr, textPtr->insertMarkPtr->body.mark.linePtr); |
︙ | |||
2005 2006 2007 2008 2009 2010 2011 | 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 | - + - + - + - + + - - - - - - + + | * everything in one go, more quickly. */ TkBTreeDestroy(sharedTextPtr->tree); for (hPtr = Tcl_FirstHashEntry(&sharedTextPtr->tagTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { |
︙ | |||
2071 2072 2073 2074 2075 2076 2077 | 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 | - + - + - + | * *---------------------------------------------------------------------- */ static int ConfigureText( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ | |||
2125 2126 2127 2128 2129 2130 2131 | 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 | - - - + + + | } if (textPtr->end != NULL) { end = TkBTreeLinesTo(NULL, textPtr->end); } else { end = TkBTreeNumLines(textPtr->sharedTextPtr->tree, NULL); } if (start > end) { |
︙ | |||
2160 2161 2162 2163 2164 2165 2166 | 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 | - | 0, &last); TkBTreeStartSearch(&first, &last, textPtr->selTagPtr, &search); if (!TkBTreeCharTagged(&first, textPtr->selTagPtr) && !TkBTreeNextTag(&search)) { /* Nothing tagged with "sel" */ } else { int line = TkBTreeLinesTo(NULL, search.curIndex.linePtr); |
︙ | |||
2191 2192 2193 2194 2195 2196 2197 | 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 | - - - - + + + + | } /* Indices are potentially obsolete after changing -startline and/or * -endline, therefore increase the epoch. * Also, clamp the insert and current (unshared) marks to the new * -startline/-endline range limits of the widget. All other (shared) * marks are unchanged. |
︙ | |||
2233 2234 2235 2236 2237 2238 2239 | 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 | - + - - + - - - - - + - - - - - - - + - - - - + - + - - + + | } /* * Parse tab stops. */ if (textPtr->tabArrayPtr != NULL) { |
︙ | |||
2374 2375 2376 2377 2378 2379 2380 | 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 | - + + | *--------------------------------------------------------------------------- */ static void TextWorldChangedCallback( ClientData instanceData) /* Information about widget. */ { |
︙ | |||
2420 2421 2422 2423 2424 2425 2426 | 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 | - + | Tk_GetFontMetrics(textPtr->tkfont, &fm); textPtr->charHeight = fm.linespace; if (textPtr->charHeight <= 0) { textPtr->charHeight = 1; } if (textPtr->charHeight != oldCharHeight) { |
︙ | |||
2463 2464 2465 2466 2467 2468 2469 | 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 | - + - + | * *-------------------------------------------------------------- */ static void TextEventProc( ClientData clientData, /* Information about window. */ |
︙ | |||
2525 2526 2527 2528 2529 2530 2531 | 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 | - + + - + | || eventPtr->xfocus.detail == NotifyAncestor || eventPtr->xfocus.detail == NotifyNonlinear) { Tcl_DeleteTimerHandler(textPtr->insertBlinkHandler); if (eventPtr->type == FocusIn) { textPtr->flags |= GOT_FOCUS | INSERT_ON; if (textPtr->insertOffTime != 0) { textPtr->insertBlinkHandler = Tcl_CreateTimerHandler( |
︙ | |||
2574 2575 2576 2577 2578 2579 2580 | 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 | - + | *---------------------------------------------------------------------- */ static void TextCmdDeletedProc( ClientData clientData) /* Pointer to widget record for widget. */ { |
︙ | |||
2626 2627 2628 2629 2630 2631 2632 | 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 | - + - + - + | TkTextIndex *indexPtr, /* Where to insert new characters. May be * modified if the index is not valid for * insertion (e.g. if at "end"). */ Tcl_Obj *stringPtr, /* Null-terminated string containing new * information to add to text. */ int viewUpdate) /* Update the view if set. */ { |
︙ | |||
2659 2660 2661 2662 2663 2664 2665 | 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 | + - + | * insertion. If the insertion occurs on the top line of the widget * (textPtr->topIndex), then we have to recompute topIndex after the * insertion, since the insertion could invalidate it. */ resetViewCount = 0; if (sharedTextPtr->refCount > PIXEL_CLIENTS) { lineAndByteIndex = (int *) |
︙ | |||
2721 2722 2723 2724 2725 2726 2727 | 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 | - + - + - - - - | lineAndByteIndex[resetViewCount+1], &newTop); TkTextSetYView(tPtr, &newTop, 0); } } resetViewCount += 2; } if (sharedTextPtr->refCount > PIXEL_CLIENTS) { |
︙ | |||
2773 2774 2775 2776 2777 2778 2779 | 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 | - - - - - - - - | int insert, /* 1 if insert, else delete. */ const TkTextIndex *index1Ptr, /* Index describing first location. */ const TkTextIndex *index2Ptr) /* Index describing second location. */ { TkUndoSubAtom *iAtom, *dAtom; |
︙ | |||
2840 2841 2842 2843 2844 2845 2846 | 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - + + - - - - - - - - - - - | Tcl_ListObjAppendElement(NULL, insertCmdObj, undoString); Tcl_ListObjAppendElement(NULL, deleteCmdObj, Tcl_NewStringObj("delete", 6)); Tcl_ListObjAppendElement(NULL, deleteCmdObj, index1Obj); Tcl_ListObjAppendElement(NULL, deleteCmdObj, index2Obj); |
︙ | |||
2957 2958 2959 2960 2961 2962 2963 | 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 | - + | TextUndoRedoCallback( Tcl_Interp *interp, /* Current interpreter. */ ClientData clientData, /* Passed from undo code, but contains our * shared text data structure. */ Tcl_Obj *objPtr) /* Arguments of a command to be handled by the * shared text data structure. */ { |
︙ | |||
3022 3023 3024 3025 3026 3027 3028 | 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 | - + | /* * If there's no current text widget which shows everything, then we fall * back on acting directly. This means there is no way to intercept from * the Tcl level. */ |
︙ | |||
3091 3092 3093 3094 3095 3096 3097 | 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 | - + | * Side effects: * Characters and other entities (windows, images) get deleted from the * text. * * If 'viewUpdate' is true, we may adjust the window contents' * y-position, and scrollbar setting. * |
︙ | |||
3121 3122 3123 3124 3125 3126 3127 | 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 | - - - | { int line1, line2; TkTextIndex index1, index2; TkText *tPtr; int *lineAndByteIndex; int resetViewCount; int pixels[2*PIXEL_CLIENTS]; |
︙ | |||
3169 3170 3171 3172 3173 3174 3175 | 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 | - + - + + - - - - - + + + + + + + + + - - - - + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - + + + + + - + | * deleted but tags might be removed. */ line1 = TkBTreeLinesTo(textPtr, index1.linePtr); line2 = TkBTreeLinesTo(textPtr, index2.linePtr); if (line2 == TkBTreeNumLines(sharedTextPtr->tree, textPtr)) { TkTextTag **arrayPtr; |
︙ | |||
3258 3259 3260 3261 3262 3263 3264 | 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 | - - - - - + + + + + - - - - - + + + + + - + | * Deletion range starts on top line but after topIndex. Use * the current topIndex as the new one. */ resetView = 1; line = line1; byteIndex = tPtr->topIndex.byteIndex; |
︙ | |||
3328 3329 3330 3331 3332 3333 3334 | 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 | - - - - - - - - + + + + + + + + - + - - - - - - - - - + + + + + + + + + - - - + + + - - + + - - - - + + + + - + | int line = lineAndByteIndex[resetViewCount]; if (line != -1) { int byteIndex = lineAndByteIndex[resetViewCount+1]; TkTextIndex indexTmp; if (tPtr == textPtr) { |
︙ | |||
3409 3410 3411 3412 3413 3414 3415 | 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 | - + - + - + - + - + - - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
3486 3487 3488 3489 3490 3491 3492 | 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 | - - + + - + | while (1) { if (maxBytes == 0) { goto fetchDone; } segPtr = TkTextIndexToSeg(&textPtr->selIndex, &offsetInSeg); chunkSize = segPtr->size - offsetInSeg; |
︙ | |||
3551 3552 3553 3554 3555 3556 3557 | 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 | - + - + - + | *---------------------------------------------------------------------- */ void TkTextLostSelection( ClientData clientData) /* Information about text widget. */ { |
︙ | |||
3611 3612 3613 3614 3615 3616 3617 | 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 | + - + + + + + + + + + | TkText *textPtr) { /* * Send an event that the selection changed. This is equivalent to: * event generate $textWidget <<Selection>> */ union {XEvent general; XVirtualEvent virtual;} event; |
︙ | |||
3636 3637 3638 3639 3640 3641 3642 | 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 | - + - - - - - - - - - - - + - + | *---------------------------------------------------------------------- */ static void TextBlinkProc( ClientData clientData) /* Pointer to record describing text. */ { |
︙ | |||
3749 3750 3751 3752 3753 3754 3755 | 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 | - + | oldTagArrayPtr = TkBTreeGetTags(&index1, NULL, &numTags); if (oldTagArrayPtr != NULL) { int i; for (i = 0; i < numTags; i++) { TkBTreeTag(&index1, &index2, oldTagArrayPtr[i], 0); } |
︙ | |||
3797 3798 3799 3800 3801 3802 3803 | 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 | - + - - + + - + - - - + + - + - - - + + - + - - - + + + + + - + - + - + - + - - + - + - - + + - + - + - + - + - + - + - + - - - + + - - - - + + - | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int i, argsLeft, code; SearchSpec searchSpec; |
︙ | |||
4011 4012 4013 4014 4015 4016 4017 | 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 | - + - + | static int TextSearchGetLineIndex( Tcl_Interp *interp, /* For error messages. */ Tcl_Obj *objPtr, /* Contains a textual index like "1.2" */ SearchSpec *searchSpecPtr, /* Contains other search parameters. */ int *linePosPtr, /* For returning the line number. */ |
︙ | |||
4071 4072 4073 4074 4075 4076 4077 | 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 | - + - + - - - + + - + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
4152 4153 4154 4155 4156 4157 4158 | 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 | - + | * incremented by the number of additional * logical lines which are merged into this * one by newlines being elided. */ { TkTextLine *linePtr, *thisLinePtr; TkTextIndex curIndex; TkTextSegment *segPtr; |
︙ | |||
4224 4225 4226 4227 4228 4229 4230 | 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 | - + - - + | if (searchSpecPtr->exact && searchSpecPtr->noCase) { Tcl_SetObjLength(theLine, Tcl_UtfToLower(Tcl_GetString(theLine))); } if (lenPtr != NULL) { if (searchSpecPtr->exact) { |
︙ | |||
4264 4265 4266 4267 4268 4269 4270 | 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 | - + - + - + - + - + | ClientData clientData, /* Token returned by the 'addNextLineProc', * TextSearchAddNextLine. May be NULL, in * which we case we must generate it (from * lineNum). */ Tcl_Obj *theLine, /* Text from current line, only accessed for * exact searches, and is allowed to be NULL * for regexp searches. */ |
︙ | |||
4309 4310 4311 4312 4313 4314 4315 | 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 | - + | /* * If we're using strict limits checking, ensure that the match with its * full length fits inside the given range. */ if (searchSpecPtr->strictLimits && lineNum == searchSpecPtr->stopLine) { if (searchSpecPtr->backwards ^ |
︙ | |||
4360 4361 4362 4363 4364 4365 4366 | 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 | - + | if (searchSpecPtr->exact) { matchOffset += segPtr->size; } else { matchOffset += Tcl_NumUtfChars(segPtr->body.chars, -1); } } else { if (searchSpecPtr->exact) { |
︙ | |||
4462 4463 4464 4465 4466 4467 4468 | 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 | - + | } /* * Now store the count result, if it is wanted. */ if (searchSpecPtr->varPtr != NULL) { |
︙ | |||
4505 4506 4507 4508 4509 4510 4511 | 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 | - + - + - - - + + - - + + - - - - + + | Tcl_Obj *stringPtr) /* Description of the tab stops. See the text * manual entry for details. */ { int objc, i, count; Tcl_Obj **objv; TkTextTabArray *tabArrayPtr; TkTextTab *tabPtr; |
︙ | |||
4587 4588 4589 4590 4591 4592 4593 | 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 | - - + + - - - + + + - + - - + + - + - + | if (textPtr->charWidth > 0) { tabPtr->location = (tabPtr-1)->location + textPtr->charWidth; } else { tabPtr->location = (tabPtr-1)->location + 8; } lastStop = tabPtr->location; #else |
︙ | |||
4662 4663 4664 4665 4666 4667 4668 | 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 | - + - + - - + + | * side effects). * *---------------------------------------------------------------------- */ static int TextDumpCmd( |
︙ | |||
4722 4723 4724 4725 4726 4727 4728 | 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 | - + + + + - - - - + + + - - - + + - - + + | break; case DUMP_WIN: what |= TK_DUMP_WIN; break; case DUMP_CMD: arg++; if (arg >= objc) { |
︙ | |||
4789 4790 4791 4792 4793 4794 4795 | 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 | - - + + | linePtr = index1.linePtr; } while ((linePtr = TkBTreeNextLine(textPtr, linePtr)) != NULL) { lineno++; if (lineno == lineend) { break; } |
︙ | |||
4899 4900 4901 4902 4903 4904 4905 | 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 | - + - + + - + - - - - + + - + | * To avoid modifying the string in place we copy over just * the segment that we want. Since DumpSegment can modify the * text, we could not confidently revert the modification * here. */ int length = last - first; |
︙ | |||
4954 4955 4956 4957 4958 4959 4960 | 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 | - - - + + + - - - + + + - + - - + + + | (segPtr->typePtr == &tkTextToggleOffType)) { TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, lineno, offset, &index); lineChanged = DumpSegment(textPtr, interp, "tagoff", segPtr->body.toggle.tagPtr->name, command, &index, what); } else if ((what & TK_DUMP_IMG) && |
︙ | |||
5018 5019 5020 5021 5022 5023 5024 | 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 | + + - - - + + + | newSegPtr = searchPtr; break; } searchPtr = searchPtr->nextPtr; } } segPtr = newSegPtr; if (segPtr != NULL) { segPtr = segPtr->nextPtr; |
︙ | |||
5056 5057 5058 5059 5060 5061 5062 | 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 | - + - - - - - - - + + + + + - + - - + + + + - - + + - - - - + - - - - - - - - + + + + + + | DumpSegment( TkText *textPtr, Tcl_Interp *interp, const char *key, /* Segment type key. */ const char *value, /* Segment value. */ Tcl_Obj *command, /* Script callback. */ const TkTextIndex *index, /* index with line/byte position info. */ |
︙ | |||
5114 5115 5116 5117 5118 5119 5120 | 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 | - - | */ static int TextEditUndo( TkText *textPtr) /* Overall information about text widget. */ { int status; |
︙ | |||
5139 5140 5141 5142 5143 5144 5145 | 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 | - - - - - - - - - - - - - - - - | status = TkUndoRevert(textPtr->sharedTextPtr->undoStack); if (textPtr->sharedTextPtr->dirtyMode != TK_TEXT_DIRTY_FIXED) { textPtr->sharedTextPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL; } textPtr->sharedTextPtr->undo = 1; |
︙ | |||
5180 5181 5182 5183 5184 5185 5186 | 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 | - - | */ static int TextEditRedo( TkText *textPtr) /* Overall information about text widget. */ { int status; |
︙ | |||
5204 5205 5206 5207 5208 5209 5210 | 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 | - - - - - - - - - - - - - - - - - | status = TkUndoApply(textPtr->sharedTextPtr->undoStack); if (textPtr->sharedTextPtr->dirtyMode != TK_TEXT_DIRTY_FIXED) { textPtr->sharedTextPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL; } textPtr->sharedTextPtr->undo = 1; |
︙ | |||
5248 5249 5250 5251 5252 5253 5254 | 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 | - + - - - - + + - - + - - + - - + + - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + + + - - - + + + - + - - - - - - - + + + + + + + - - - - + + + + - - + + + - - + - - - - - - - - - - - - + - - - - - + + + + + | static int TextEditCmd( TkText *textPtr, /* Information about text widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { |
︙ | |||
5430 5431 5432 5433 5434 5435 5436 | 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 | - - + + - + + - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - + + + - - + - - + - - - - + - - - - - - - - - - - - - - - + - - + - - - - - - + + + + - | TkTextMakeByteIndex(indexPtr1->tree, textPtr, TkBTreeLinesTo(textPtr, indexPtr1->linePtr), indexPtr1->byteIndex, &tmpIndex); if (TkTextIndexCmp(indexPtr1, indexPtr2) < 0) { while (1) { |
︙ | |||
5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 | 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 | + | */ static void UpdateDirtyFlag( TkSharedText *sharedTextPtr)/* Information about text widget. */ { int oldDirtyFlag; TkText *textPtr; /* * If we've been forced to be dirty, we stay dirty (until explicitly * reset, of course). */ if (sharedTextPtr->dirtyMode == TK_TEXT_DIRTY_FIXED) { |
︙ | |||
5570 5571 5572 5573 5574 5575 5576 | 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 | - + - - - + - - - - - - - - - - - - - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - | if (sharedTextPtr->dirtyMode == TK_TEXT_DIRTY_UNDO) { sharedTextPtr->isDirty--; } else { sharedTextPtr->isDirty++; } if (sharedTextPtr->isDirty == 0 || oldDirtyFlag == 0) { |
︙ | |||
5657 5658 5659 5660 5661 5662 5663 | 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 | - + - + + - + - - - - - + + + + + + + + + | * index. */ { /* * Find the starting line and starting offset (measured in Unicode chars * for regexp search, utf-8 bytes for exact search). */ |
︙ | |||
5750 5751 5752 5753 5754 5755 5756 | 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 | - + - - - - + + + | * pattern. Must have a refCount > 0. */ { /* * For exact searches these are utf-8 char* offsets, for regexp searches * they are Unicode char offsets. */ |
︙ | |||
5824 5825 5826 5827 5828 5829 5830 | 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 | - + | /* * We only need to set the matchLength once for exact searches, and we * do it here. It is also used below as the actual pattern length, so * it has dual purpose. */ |
︙ | |||
5875 5876 5877 5878 5879 5880 5881 | 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 | - - + + - + | /* * Extract the text from the line, storing its length in 'lastOffset' * (in bytes if exact, chars if regexp), since obviously the length is * the maximum offset at which it is possible to find something on * this line, which is what 'lastOffset' represents. */ |
︙ | |||
5923 5924 5925 5926 5927 5928 5929 | 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 | - + - + - + - - + - + - + - + - + - - + + | /* * Forward search and first pass, or backward search and * second pass. * * Only use the last part of the line. */ |
︙ | |||
6022 6023 6024 6025 6026 6027 6028 | 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 | - + | } else { /* * Multi-line match has only one possible match position, * because we know where the '\n' is. */ p = startOfLine + lastOffset - firstNewLine - 1; |
︙ | |||
6061 6062 6063 6064 6065 6066 6067 | 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 | - + - + - + | /* * Only add the line if we haven't already done so * already. */ if (extraLines > maxExtraLines) { |
︙ | |||
6141 6142 6143 6144 6145 6146 6147 | 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 | - - + + + - + - - - + - - + - | /* * Remember the match. */ matchOffset = p - startOfLine; if (searchSpecPtr->all && |
︙ | |||
6191 6192 6193 6194 6195 6196 6197 | 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 | - + - + - + - + - + | if (searchSpecPtr->backwards) { alreadySearchOffset = p - startOfLine - 1; if (alreadySearchOffset < 0) { break; } } else { firstOffset = p - startOfLine + |
︙ | |||
6287 6288 6289 6290 6291 6292 6293 | 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 | - + | } /* * Add next line, provided we haven't already done so. */ if (extraLines > maxExtraLines) { |
︙ | |||
6336 6337 6338 6339 6340 6341 6342 | 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 | - - - + + + - + | * This means we often add and search one more line * than might be necessary if Tcl were able to give us * a correct value of info.extendStart under all * circumstances. */ if ((match && |
︙ | |||
6406 6407 6408 6409 6410 6411 6412 | 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 | - - + + | - info.matches[0].start; if (lastNonOverlap != -1) { /* * Possible overlap or enclosure. */ |
︙ | |||
6466 6467 6468 6469 6470 6471 6472 | 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 | - - - + + + - + - + - + - - - + + + - + - + - + - + | } else { /* * Matched in a single line. */ if (lastBackwardsLineMatch != -1) { recordBackwardsMatch: |
︙ | |||
6607 6608 6609 6610 6611 6612 6613 | 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 | - - + + - + - + - + - + | * if (storeMatch[matches]<searchSpecPtr->stopOffset) * break; * * might be needed here, but no test case has been * found which would exercise such a problem. */ } |
︙ | |||
6685 6686 6687 6688 6689 6690 6691 | 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 | - + | if (searchSpecPtr->backwards) { lineNum--; if (lastBackwardsLineMatch != -1 && ((lineNum < 0) || (lineNum + 2 < lastBackwardsLineMatch))) { |
︙ | |||
6731 6732 6733 6734 6735 6736 6737 | 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 | - + - + | } Tcl_SetObjLength(theLine, 0); } searchDone: if (lastBackwardsLineMatch != -1) { |
︙ | |||
6772 6773 6774 6775 6776 6777 6778 | 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 | - - + + - + + + - | * Creates a new Tcl_Obj. * *---------------------------------------------------------------------- */ static Tcl_Obj * GetLineStartEnd( |
︙ | |||
6807 6808 6809 6810 6811 6812 6813 | 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 | - + - + - + - - + + | * that the specified string was empty and that is acceptable. * *---------------------------------------------------------------------- */ static int SetLineStartEnd( |
︙ | |||
6866 6867 6868 6869 6870 6871 6872 | 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 | - - + + | * Restores the old value. * *---------------------------------------------------------------------- */ static void RestoreLineStartEnd( |
︙ | |||
6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 | 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 | + + - - + + + - + | *---------------------------------------------------------------------- */ static int ObjectIsEmpty( Tcl_Obj *objPtr) /* Object to test. May be NULL. */ { int length; if (objPtr == NULL) { return 1; } |
︙ | |||
6925 6926 6927 6928 6929 6930 6931 | 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 | - + - - + + - + - + + + + - - - - + + + + + - - + + - - + + - + - + - - + + - + - + + + - + | * Depends on option; see below. * *---------------------------------------------------------------------- */ int TkpTesttextCmd( |
Changes to generic/tkText.h.
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 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 | + + + + + + + + + + + | #include "tk.h" #endif #ifndef _TKUNDO #include "tkUndo.h" #endif #ifdef BUILD_tk # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT #endif /* * Opaque types for structures whose guts are only needed by a single file. */ typedef struct TkTextBTree_ *TkTextBTree; /* * The data structure below defines a single logical line of text (from * newline to newline, not necessarily what appears on one display line of the * screen). */ typedef struct TkTextLine { |
︙ | |||
161 162 163 164 165 166 167 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + - + | typedef struct TkTextSegment { const struct Tk_SegType *typePtr; /* Pointer to record describing segment's * type. */ struct TkTextSegment *nextPtr; /* Next in list of segments for this line, or * NULL for end of list. */ |
︙ | |||
343 344 345 346 347 348 349 | 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 | - - - - - - - - - - - | * text line, in pixels. Only valid if * lMargin1String is non-NULL. */ char *lMargin2String; /* -lmargin2 option string (malloc-ed). NULL * means option not specified. */ int lMargin2; /* Left margin for second and later display * lines of each text line, in pixels. Only * valid if lMargin2String is non-NULL. */ |
︙ | |||
396 397 398 399 400 401 402 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | - - | int tabStyle; /* One of TABULAR or WORDPROCESSOR or NONE (if * not specified). */ char *underlineString; /* -underline option string (malloc-ed). NULL * means option not specified. */ int underline; /* Non-zero means draw underline underneath * text. Only valid if underlineString is * non-NULL. */ |
︙ | |||
485 486 487 488 489 490 491 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | - + - + | typedef struct TkTextTabArray { int numTabs; /* Number of tab stops. */ double lastTab; /* The accurate fractional pixel position of * the last tab. */ double tabIncrement; /* The accurate fractional pixel increment * between interpolated tabs we have to create * when we exceed numTabs. */ |
︙ | |||
528 529 530 531 532 533 534 | 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | - - - - - - - - - + | } TkTextState; /* * A data structure of the following type is shared between each text widget * that are peers. */ |
︙ | |||
566 567 568 569 570 571 572 | 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 603 | - + - - - - - - - - - - - - - | * image, there is no entry for it here. */ Tk_BindingTable bindingTable; /* Table of all bindings currently defined for * this widget. NULL means that no bindings * exist, so the table hasn't been created. * Each "object" used for this table is the * name of a tag. */ |
︙ | |||
745 746 747 748 749 750 751 | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | - + - - - | */ TkTextSegment *insertMarkPtr; /* Points to segment for "insert" mark. */ Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion * cursor. */ int insertWidth; /* Total width of insert cursor. */ |
︙ | |||
787 788 789 790 791 792 793 | 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 | - + - - | * horizontal scrollbar when view changes. */ char *yScrollCmd; /* Prefix of command to issue to update * vertical scrollbar when view changes. */ int flags; /* Miscellaneous flags; see below for * definitions. */ Tk_OptionTable optionTable; /* Token representing the configuration * specifications. */ |
︙ | |||
843 844 845 846 847 848 849 | 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | - + - - + + | /* * Records of the following type define segment types in terms of a collection * of procedures that may be called to manipulate segments of that type. */ typedef TkTextSegment * Tk_SegSplitProc(struct TkTextSegment *segPtr, |
︙ | |||
979 980 981 982 983 984 985 | 951 952 953 954 955 956 957 958 959 960 961 962 963 964 | - - | MODULE_SCOPE int tkBTreeDebug; MODULE_SCOPE int tkTextDebug; MODULE_SCOPE const Tk_SegType tkTextCharType; MODULE_SCOPE const Tk_SegType tkTextLeftMarkType; MODULE_SCOPE const Tk_SegType tkTextRightMarkType; MODULE_SCOPE const Tk_SegType tkTextToggleOnType; MODULE_SCOPE const Tk_SegType tkTextToggleOffType; |
︙ | |||
1013 1014 1015 1016 1017 1018 1019 | 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 | - + + + + + + - + + + - + + + + + + + - + + + + + + + + - + + + + + + - + + + + | MODULE_SCOPE void TkBTreeClientRangeChanged(TkText *textPtr, int defaultHeight); MODULE_SCOPE void TkBTreeRemoveClient(TkTextBTree tree, TkText *textPtr); MODULE_SCOPE void TkBTreeDestroy(TkTextBTree tree); MODULE_SCOPE void TkBTreeDeleteIndexRange(TkTextBTree tree, TkTextIndex *index1Ptr, TkTextIndex *index2Ptr); |
Changes to generic/tkTextBTree.c.
︙ | |||
101 102 103 104 105 106 107 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - + | */ typedef struct BTree { Node *rootPtr; /* Pointer to root of B-tree. */ int clients; /* Number of clients of this B-tree. */ int pixelReferences; /* Number of clients of this B-tree which care * about pixel heights. */ |
︙ | |||
136 137 138 139 140 141 142 | 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 | - - - - + + + + - + | int tkBTreeDebug = 0; /* * Macros that determine how much space to allocate for new segments: */ |
︙ | |||
257 258 259 260 261 262 263 | 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 | - - - - + + + + - - - + + + - + - + - + | *---------------------------------------------------------------------- */ TkTextBTree TkBTreeCreate( TkSharedText *sharedTextPtr) { |
︙ | |||
362 363 364 365 366 367 368 | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | - + | void TkBTreeAddClient( TkTextBTree tree, /* B-tree to add a client to. */ TkText *textPtr, /* Client to add. */ int defaultHeight) /* Default line height for the new client, or * -1 if no pixel heights are to be kept. */ { |
︙ | |||
474 475 476 477 478 479 480 | 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 | - - + + - + - + | * There's no need to loop over each client of the tree, calling * 'TkBTreeRemoveClient', since the 'DestroyNode' will clean everything up * itself. */ DestroyNode(treePtr->rootPtr); if (treePtr->startEnd != NULL) { |
︙ | |||
539 540 541 542 543 544 545 | 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | - + | if (treePtr->clients == 1) { /* * The last reference to the tree. */ DestroyNode(treePtr->rootPtr); |
︙ | |||
628 629 630 631 632 633 634 | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | - + + - + + - + + - + + | } if (treePtr->startEndRef[i] != textPtr) { count++; } i++; } treePtr->startEndCount = count; |
︙ | |||
721 722 723 724 725 726 727 | 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | - + - + - + | while (loopPtr != NULL) { pixelCount += AdjustPixelClient(treePtr, defaultHeight, loopPtr, start, end, useReference, newPixelReferences, counting); loopPtr = loopPtr->nextPtr; } } else { |
︙ | |||
795 796 797 798 799 800 801 | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | - - + - + - + | */ if (overwriteWithLast != -1) { nodePtr->numPixels[overwriteWithLast] = nodePtr->numPixels[treePtr->pixelReferences-1]; } if (treePtr->pixelReferences == 1) { |
︙ | |||
846 847 848 849 850 851 852 | 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 | - + - + - - + + - + - - + + | * All the storage for nodePtr and its descendants is freed. * *---------------------------------------------------------------------- */ static void DestroyNode( |
︙ | |||
896 897 898 899 900 901 902 | 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | - + - + - + | * Storage is released. * *---------------------------------------------------------------------- */ static void DeleteSummaries( |
︙ | |||
928 929 930 931 932 933 934 | 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | - + - + | * *---------------------------------------------------------------------- */ int TkBTreeAdjustPixelHeight( const TkText *textPtr, /* Client of the B-tree. */ |
︙ | |||
997 998 999 1000 1001 1002 1003 | 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | - + - - + + - + - - + + | * *---------------------------------------------------------------------- */ void TkBTreeInsertChars( TkTextBTree tree, /* Tree to insert into. */ |
︙ | |||
1040 1041 1042 1043 1044 1045 1046 | 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 | - + + - + - + - + | /* * Chop the string up into lines and create a new segment for each line, * plus a new line for the leftovers from the previous line. */ changeToLineCount = 0; if (treePtr->pixelReferences > PIXEL_CLIENTS) { |
︙ | |||
1139 1140 1141 1142 1143 1144 1145 | 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 | - + | nodePtr = nodePtr->parentPtr) { nodePtr->numLines += changeToLineCount; for (ref = 0; ref < treePtr->pixelReferences; ref++) { nodePtr->numPixels[ref] += changeToPixelCount[ref]; } } if (treePtr->pixelReferences > PIXEL_CLIENTS) { |
︙ | |||
1186 1187 1188 1189 1190 1191 1192 | 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 | - + - + - + | static TkTextSegment * SplitSeg( TkTextIndex *indexPtr) /* Index identifying position at which to * split a segment. */ { TkTextSegment *prevPtr, *segPtr; TkTextLine *linePtr; |
︙ | |||
1223 1224 1225 1226 1227 1228 1229 | 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | - - + | */ linePtr = TkBTreeNextLine(NULL, linePtr); if (linePtr == NULL) { /* * Reached end of the text. */ |
︙ | |||
1273 1274 1275 1276 1277 1278 1279 | 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 | - + | while (1) { anyChanges = 0; for (prevPtrPtr = &linePtr->segPtr, segPtr = *prevPtrPtr; segPtr != NULL; prevPtrPtr = &(*prevPtrPtr)->nextPtr, segPtr = *prevPtrPtr) { if (segPtr->typePtr->cleanupProc != NULL) { |
︙ | |||
1308 1309 1310 1311 1312 1313 1314 | 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 | - + - + | * *---------------------------------------------------------------------- */ void TkBTreeDeleteIndexRange( TkTextBTree tree, /* Tree to delete from. */ |
︙ | |||
1380 1381 1382 1383 1384 1385 1386 | 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 | - | nodePtr = nodePtr->parentPtr) { nodePtr->numLines--; for (ref = 0; ref < treePtr->pixelReferences; ref++) { nodePtr->numPixels[ref] -= curLinePtr->pixels[2*ref]; } } changeToLineCount++; |
︙ | |||
1411 1412 1413 1414 1415 1416 1417 | 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 | - - + + | if (peer->end == curLinePtr) { peer->end = nextLinePtr; } } checkCount++; } } |
︙ | |||
1436 1437 1438 1439 1440 1441 1442 | 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 | - - - + - + | Node *prevNodePtr = parentPtr->children.nodePtr; while (prevNodePtr->nextPtr != curNodePtr) { prevNodePtr = prevNodePtr->nextPtr; } prevNodePtr->nextPtr = curNodePtr->nextPtr; } parentPtr->numChildren--; |
︙ | |||
1477 1478 1479 1480 1481 1482 1483 | 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 | - + | if (index1Ptr->linePtr != index2Ptr->linePtr) { TkTextLine *prevLinePtr; for (segPtr = lastPtr; segPtr != NULL; segPtr = segPtr->nextPtr) { if (segPtr->typePtr->lineChangeProc != NULL) { |
︙ | |||
1533 1534 1535 1536 1537 1538 1539 | 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 | - - + + | if (peer->end == index2Ptr->linePtr) { peer->end = index1Ptr->linePtr; } } checkCount++; } } |
︙ | |||
1592 1593 1594 1595 1596 1597 1598 | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 | - - + + | TkTextLine * TkBTreeFindLine( TkTextBTree tree, /* B-tree in which to find line. */ const TkText *textPtr, /* Relative to this client of the B-tree. */ int line) /* Index of desired line. */ { BTree *treePtr = (BTree *) tree; |
︙ | |||
1682 1683 1684 1685 1686 1687 1688 | 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 | - - + + | TkBTreeFindPixelLine( TkTextBTree tree, /* B-tree to use. */ const TkText *textPtr, /* Relative to this client of the B-tree. */ int pixels, /* Pixel index of desired line. */ int *pixelOffset) /* Used to return offset. */ { BTree *treePtr = (BTree *) tree; |
︙ | |||
1751 1752 1753 1754 1755 1756 1757 | 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | - + - + | * *---------------------------------------------------------------------- */ TkTextLine * TkBTreeNextLine( const TkText *textPtr, /* Next line in the context of this client. */ |
︙ | |||
1807 1808 1809 1810 1811 1812 1813 | 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 | - + - - - + + + | * *---------------------------------------------------------------------- */ TkTextLine * TkBTreePreviousLine( TkText *textPtr, /* Relative to this client of the B-tree. */ |
︙ | |||
1891 1892 1893 1894 1895 1896 1897 | 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 | - - + + | */ int TkBTreePixelsTo( const TkText *textPtr, /* Relative to this client of the B-tree. */ TkTextLine *linePtr) /* Pointer to existing line in B-tree. */ { |
︙ | |||
1917 1918 1919 1920 1921 1922 1923 | 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 | - + | /* * Now work up through the levels of the tree one at a time, counting how * many pixels are in nodes preceding the current node. */ for (parentPtr = nodePtr->parentPtr ; parentPtr != NULL; nodePtr = parentPtr, parentPtr = parentPtr->parentPtr) { |
︙ | |||
1953 1954 1955 1956 1957 1958 1959 | 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 | - - + + | */ int TkBTreeLinesTo( const TkText *textPtr, /* Relative to this client of the B-tree. */ TkTextLine *linePtr) /* Pointer to existing line in B-tree. */ { |
︙ | |||
1987 1988 1989 1990 1991 1992 1993 | 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 | - + | if (nodePtr2 == NULL) { Tcl_Panic("TkBTreeLinesTo couldn't find node"); } index += nodePtr2->numLines; } } if (textPtr != NULL) { |
︙ | |||
2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 | 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 | + - + | * * Side effects: * SegPtr will be linked into its tree. * *---------------------------------------------------------------------- */ /* ARGSUSED */ void TkBTreeLinkSegment( TkTextSegment *segPtr, /* Pointer to new segment to be added to * B-tree. Should be completely initialized by * caller except for nextPtr field. */ TkTextIndex *indexPtr) /* Where to add segment: it gets linked in * just before the segment indicated here. */ { |
︙ | |||
2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 | 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 | + - + | * Side effects: * SegPtr will be unlinked from linePtr. The segment itself isn't * modified by this function. * *---------------------------------------------------------------------- */ /* ARGSUSED */ void TkBTreeUnlinkSegment( TkTextSegment *segPtr, /* Segment to be unlinked. */ TkTextLine *linePtr) /* Line that currently contains segment. */ { |
︙ | |||
2129 2130 2131 2132 2133 2134 2135 | 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 | - + - + - + | * indexes may be modified by this function. * *---------------------------------------------------------------------- */ int TkBTreeTag( |
︙ | |||
2196 2197 2198 2199 2200 2201 2202 | 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 | - + | ChangeNodeToggleCount(search.curIndex.linePtr->parentPtr, segPtr->body.toggle.tagPtr, -1); segPtr->body.toggle.inNodeCounts = 0; changed = 1; } else { changed = 0; } |
︙ | |||
2222 2223 2224 2225 2226 2227 2228 | 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 | - + | */ if (changed) { TkBTreeStartSearch(index1Ptr, index2Ptr, tagPtr, &search); } } if ((add != 0) ^ oldState) { |
︙ | |||
2279 2280 2281 2282 2283 2284 2285 | 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 | - + - - + + | * for the tag, moving it up or down the tree as needed. * *---------------------------------------------------------------------- */ static void ChangeNodeToggleCount( |
︙ | |||
2347 2348 2349 2350 2351 2352 2353 | 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 | - + - + - + | */ if (prevPtr == NULL) { nodePtr->summaryPtr = summaryPtr->nextPtr; } else { prevPtr->nextPtr = summaryPtr->nextPtr; } |
︙ | |||
2432 2433 2434 2435 2436 2437 2438 | 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 | - + | */ if (prevPtr == NULL) { node2Ptr->summaryPtr = summaryPtr->nextPtr; } else { prevPtr->nextPtr = summaryPtr->nextPtr; } |
︙ | |||
2465 2466 2467 2468 2469 2470 2471 | 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 | - - - - + + + + - + - - - - | static TkTextSegment * FindTagStart( TkTextBTree tree, /* Tree to search within. */ TkTextTag *tagPtr, /* Tag to search for. */ TkTextIndex *indexPtr) /* Return - index information. */ { |
︙ | |||
2550 2551 2552 2553 2554 2555 2556 | 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 | - - - - + + + + - + - - - - | static TkTextSegment * FindTagEnd( TkTextBTree tree, /* Tree to search within. */ TkTextTag *tagPtr, /* Tag to search for. */ TkTextIndex *indexPtr) /* Return - index information. */ { |
︙ | |||
2646 2647 2648 2649 2650 2651 2652 | 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 | - + - + | TkBTreeStartSearch( TkTextIndex *index1Ptr, /* Search starts here. Tag toggles at this * position will not be returned. */ TkTextIndex *index2Ptr, /* Search stops here. Tag toggles at this * position *will* be returned. */ TkTextTag *tagPtr, /* Tag to search for. NULL means search for * any tag. */ |
︙ | |||
2742 2743 2744 2745 2746 2747 2748 | 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 | - + - + | TkBTreeStartSearchBack( TkTextIndex *index1Ptr, /* Search starts here. Tag toggles at this * position will not be returned. */ TkTextIndex *index2Ptr, /* Search stops here. Tag toggles at this * position *will* be returned. */ TkTextTag *tagPtr, /* Tag to search for. NULL means search for * any tag. */ |
︙ | |||
2843 2844 2845 2846 2847 2848 2849 | 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 | - + - - - + + + | * search and indicate where the next tag toggle is located. * *---------------------------------------------------------------------- */ int TkBTreeNextTag( |
︙ | |||
2953 2954 2955 2956 2957 2958 2959 | 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 | - + | */ goto nextChild; } } searchPtr->linesLeft -= nodePtr->numLines; if (nodePtr->nextPtr == NULL) { |
︙ | |||
3008 3009 3010 3011 3012 3013 3014 | 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 | - + - - - - + + + + | * search and indicate where the next tag toggle is located. * *---------------------------------------------------------------------- */ int TkBTreePrevTag( |
︙ | |||
3171 3172 3173 3174 3175 3176 3177 | 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 | - + | } linesSkipped += nodePtr->numLines; keepLooking2: continue; } if (prevNodePtr == NULL) { |
︙ | |||
3226 3227 3228 3229 3230 3231 3232 | 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 | - - - + + + - + | int TkBTreeCharTagged( const TkTextIndex *indexPtr,/* Indicates a character position at which to * check for a tag. */ TkTextTag *tagPtr) /* Tag of interest. */ { |
︙ | |||
3282 3283 3284 3285 3286 3287 3288 | 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 | - - + + | * node, counting the number of toggles of the given tag in siblings that * precede that node. */ toggles = 0; for (nodePtr = indexPtr->linePtr->parentPtr; nodePtr->parentPtr != NULL; nodePtr = nodePtr->parentPtr) { |
︙ | |||
3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 | 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 | + - - - + + + - - + + + + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ TkTextTag ** TkBTreeGetTags( const TkTextIndex *indexPtr,/* Indicates a particular position in the * B-tree. */ const TkText *textPtr, /* If non-NULL, then only return tags for this * text widget (when there are peer * widgets). */ int *numTagsPtr) /* Store number of tags found at this * location. */ { |
︙ | |||
3403 3404 3405 3406 3407 3408 3409 | 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 | - - + + | /* * For each node in the ancestry of this line, record tag toggles for all * siblings that precede that node. */ for (nodePtr = indexPtr->linePtr->parentPtr; nodePtr->parentPtr != NULL; nodePtr = nodePtr->parentPtr) { |
︙ | |||
3436 3437 3438 3439 3440 3441 3442 | 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 | - + - + | if (tagTextPtr==NULL || textPtr==NULL || tagTextPtr==textPtr) { tagInfo.tagPtrs[dst] = tagInfo.tagPtrs[src]; dst++; } } } *numTagsPtr = dst; |
︙ | |||
3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 | 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 | + - - - - - - + + + + + + - + + - - + + + + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ /* ARGSUSED */ int TkTextIsElided( const TkText *textPtr, /* Overall information about text widget. */ const TkTextIndex *indexPtr,/* The character in the text for which display * information is wanted. */ TkTextElideInfo *elideInfo) /* NULL or a pointer to a structure in which * indexPtr's elide state will be stored and * returned. */ { |
︙ | |||
3583 3584 3585 3586 3587 3588 3589 | 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 | - - + + | /* * For each node in the ancestry of this line, record tag toggles for all * siblings that precede that node. */ for (nodePtr = indexPtr->linePtr->parentPtr; nodePtr->parentPtr != NULL; nodePtr = nodePtr->parentPtr) { |
︙ | |||
3625 3626 3627 3628 3629 3630 3631 | 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 | - - + + - + | } } elide = infoPtr->elide; if (elideInfo == NULL) { if (LOTSA_TAGS < infoPtr->numTags) { |
︙ | |||
3658 3659 3660 3661 3662 3663 3664 | 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 | - - + + | void TkTextFreeElideInfo( TkTextElideInfo *elideInfo) /* Free any allocated memory in this * structure. */ { if (LOTSA_TAGS < elideInfo->numTags) { |
︙ | |||
3689 3690 3691 3692 3693 3694 3695 | 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 | - + - + + - + - + - + | static void IncCount( TkTextTag *tagPtr, /* Handle for tag. */ int inc, /* Amount by which to increment tag count. */ TagInfo *tagInfoPtr) /* Holds cumulative information about tags; * increment count here. */ { |
︙ | |||
3751 3752 3753 3754 3755 3756 3757 | 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 | - - - - - + + + + + - + | */ void TkBTreeCheck( TkTextBTree tree) /* Tree to check. */ { BTree *treePtr = (BTree *) tree; |
︙ | |||
3861 3862 3863 3864 3865 3866 3867 | 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 | - + | Tcl_Panic("TkBTreeCheck: last line has bogus segment type"); } if (segPtr->nextPtr != NULL) { Tcl_Panic("TkBTreeCheck: last line has too many segments"); } if (segPtr->size != 1) { Tcl_Panic("TkBTreeCheck: last line has wrong # characters: %d", |
︙ | |||
3890 3891 3892 3893 3894 3895 3896 | 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 | - + - - - - + + + + - + - + | * panics. * *---------------------------------------------------------------------- */ static void CheckNodeConsistency( |
︙ | |||
4007 4008 4009 4010 4011 4012 4013 | 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 | - + | for (i = 0; i<references; i++) { if (numPixels[i] != nodePtr->numPixels[i]) { Tcl_Panic("CheckNodeConsistency: mismatch in numPixels (%d %d) for widget (%d)", numPixels[i], nodePtr->numPixels[i], i); } } if (references > PIXEL_CLIENTS) { |
︙ | |||
4079 4080 4081 4082 4083 4084 4085 | 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 | - + - - + + - + - + | * *---------------------------------------------------------------------- */ static void Rebalance( BTree *treePtr, /* Tree that is being rebalanced. */ |
︙ | |||
4162 4163 4164 4165 4166 4167 4168 | 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 | - + - + - - + | RecomputeNodeCounts(treePtr, nodePtr); break; } } } while (nodePtr->numChildren < MIN_CHILDREN) { |
︙ | |||
4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 | 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 | + + + + | firstChildren = totalChildren/2; if (nodePtr->children.nodePtr == NULL) { nodePtr->children = otherPtr->children; otherPtr->children.nodePtr = NULL; otherPtr->children.linePtr = NULL; } if (nodePtr->level == 0) { register TkTextLine *linePtr; for (linePtr = nodePtr->children.linePtr, i = 1; linePtr->nextPtr != NULL; linePtr = linePtr->nextPtr, i++) { if (i == firstChildren) { halfwayLinePtr = linePtr; } } linePtr->nextPtr = otherPtr->children.linePtr; while (i <= firstChildren) { halfwayLinePtr = linePtr; linePtr = linePtr->nextPtr; i++; } } else { register Node *childPtr; for (childPtr = nodePtr->children.nodePtr, i = 1; childPtr->nextPtr != NULL; childPtr = childPtr->nextPtr, i++) { if (i <= firstChildren) { if (i == firstChildren) { halfwayNodePtr = childPtr; } |
︙ | |||
4266 4267 4268 4269 4270 4271 4272 | 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 | - - + - - | */ if (totalChildren <= MAX_CHILDREN) { RecomputeNodeCounts(treePtr, nodePtr); nodePtr->nextPtr = otherPtr->nextPtr; nodePtr->parentPtr->numChildren--; DeleteSummaries(otherPtr->summaryPtr); |
︙ | |||
4314 4315 4316 4317 4318 4319 4320 | 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 | - - + + - - - - + + + + | * the childrens' parentPtr fields are made to point to nodePtr. * *---------------------------------------------------------------------- */ static void RecomputeNodeCounts( |
︙ | |||
4365 4366 4367 4368 4369 4370 4371 | 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 | - + | || !(segPtr->body.toggle.inNodeCounts)) { continue; } tagPtr = segPtr->body.toggle.tagPtr; for (summaryPtr = nodePtr->summaryPtr; ; summaryPtr = summaryPtr->nextPtr) { if (summaryPtr == NULL) { |
︙ | |||
4393 4394 4395 4396 4397 4398 4399 | 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 | - + | } childPtr->parentPtr = nodePtr; for (summaryPtr2 = childPtr->summaryPtr; summaryPtr2 != NULL; summaryPtr2 = summaryPtr2->nextPtr) { for (summaryPtr = nodePtr->summaryPtr; ; summaryPtr = summaryPtr->nextPtr) { if (summaryPtr == NULL) { |
︙ | |||
4442 4443 4444 4445 4446 4447 4448 | 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 | - + - + | * the root down to this level. */ summaryPtr->tagPtr->tagRootPtr = nodePtr; } if (summaryPtr2 != NULL) { summaryPtr2->nextPtr = summaryPtr->nextPtr; |
︙ | |||
4541 4542 4543 4544 4545 4546 4547 | 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 | - + - - + + + - + - + | * *-------------------------------------------------------------- */ static TkTextSegment * CharSplitProc( TkTextSegment *segPtr, /* Pointer to segment to split. */ |
︙ | |||
4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 | 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 | + - + - + + - - + + + - - + + - + + - + - + - + | * * Side effects: * Storage for the segments may be allocated and freed. * *-------------------------------------------------------------- */ /* ARGSUSED */ static TkTextSegment * CharCleanupProc( TkTextSegment *segPtr, /* Pointer to first of two adjacent segments * to join. */ |
︙ | |||
4703 4704 4705 4706 4707 4708 4709 | 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 | - + | TkTextSegment *segPtr, /* Segment to check. */ TkTextLine *linePtr, /* Line containing segment. */ int treeGone) /* Non-zero means the entire tree is being * deleted, so everything must get cleaned * up. */ { if (treeGone) { |
︙ | |||
4777 4778 4779 4780 4781 4782 4783 | 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 | - + - + | counts = segPtr->body.toggle.inNodeCounts + segPtr2->body.toggle.inNodeCounts; if (counts != 0) { ChangeNodeToggleCount(linePtr->parentPtr, segPtr->body.toggle.tagPtr, -counts); } prevPtr->nextPtr = segPtr2->nextPtr; |
︙ | |||
4843 4844 4845 4846 4847 4848 4849 | 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 | - + | */ static void ToggleCheckProc( TkTextSegment *segPtr, /* Segment to check. */ TkTextLine *linePtr) /* Line containing segment. */ { |
︙ |
Changes to generic/tkTextDisp.c.
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - - - - - + + | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkText.h" |
︙ | |||
135 136 137 138 139 140 141 | 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 | - - - - - - - + - - | Pixmap fgStipple; /* Stipple bitmap for text and other * foreground stuff. None means draw solid.*/ int justify; /* Justification style for text. */ int lMargin1; /* Left margin, in pixels, for first display * line of each text line. */ int lMargin2; /* Left margin, in pixels, for second and * later display lines of each text line. */ |
︙ | |||
202 203 204 205 206 207 208 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - + - - - - - - + - - - + + - - - | * precision is different (e.g. Intel) */ #define FP_EQUAL_SCALE(double1, double2, scaleFactor) \ (fabs((double1)-(double2))*((scaleFactor)+1.0) < 0.3) /* |
︙ | |||
250 251 252 253 254 255 256 | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | - - - - - - - - | * pixels. */ int spaceAbove; /* How much extra space was added to the top * of the line because of spacing options. * This is included in height and baseline. */ int spaceBelow; /* How much extra space was added to the * bottom of the line because of spacing * options. This is included in height. */ |
︙ | |||
414 415 416 417 418 419 420 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - + | * calculations, if they are out of date. */ TkTextIndex metricIndex; /* If the current metric update line wraps * into very many display lines, then this is * used to keep track of what index we've got * to so far... */ int metricPixelHeight; /* ...and this is for the height calculation * so far...*/ |
︙ | |||
436 437 438 439 440 441 442 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | - + - - + + | } TextDInfo; /* * In TkTextDispChunk structures for character segments, the clientData field * points to one of the following structures: */ |
︙ | |||
471 472 473 474 475 476 477 | 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 | - - - - + | Tcl_DString baseChars; /* Actual characters for the stretch of text * represented by this base chunk. */ int width; /* Width in pixels of the whole string, if * known, else -1. Valid during * LayoutDLine(). */ } BaseCharInfo; |
︙ | |||
548 549 550 551 552 553 554 | 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | - + | static void CharDisplayProc(TkText *textPtr, TkTextDispChunk *chunkPtr, int x, int y, int height, int baseline, Display *display, Drawable dst, int screenY); static int CharMeasureProc(TkTextDispChunk *chunkPtr, int x); static void CharUndisplayProc(TkText *textPtr, TkTextDispChunk *chunkPtr); |
︙ | |||
571 572 573 574 575 576 577 | 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 | - + - + - - + + - + - - + + - + - + - - + | static int ElideMeasureProc(TkTextDispChunk *chunkPtr, int x); static void DisplayDLine(TkText *textPtr, DLine *dlPtr, DLine *prevPtr, Pixmap pixmap); static void DisplayLineBackground(TkText *textPtr, DLine *dlPtr, DLine *prevPtr, Pixmap pixmap); static void DisplayText(ClientData clientData); static DLine * FindDLine(TkText *textPtr, DLine *dlPtr, |
︙ | |||
654 655 656 657 658 659 660 | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | - + - + - + | *---------------------------------------------------------------------- */ void TkTextCreateDInfo( TkText *textPtr) /* Overall information for text widget. */ { |
︙ | |||
713 714 715 716 717 718 719 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 | - + - + - + | *---------------------------------------------------------------------- */ void TkTextFreeDInfo( TkText *textPtr) /* Overall information for text widget. */ { |
︙ | |||
765 766 767 768 769 770 771 | 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 | - + - + - - - - - - - - - - - - - - - - - - - - - - - | * *---------------------------------------------------------------------- */ static TextStyle * GetStyle( TkText *textPtr, /* Overall information about text widget. */ |
︙ | |||
883 884 885 886 887 888 889 | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 | - - + + | reliefPrio = tagPtr->priority; } if ((tagPtr->bgStipple != None) && (tagPtr->priority > bgStipplePrio)) { styleValues.bgStipple = tagPtr->bgStipple; bgStipplePrio = tagPtr->priority; } |
︙ | |||
911 912 913 914 915 916 917 | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 | - - - - - - - - - - - - - - - | lMargin1Prio = tagPtr->priority; } if ((tagPtr->lMargin2String != NULL) && (tagPtr->priority > lMargin2Prio)) { styleValues.lMargin2 = tagPtr->lMargin2; lMargin2Prio = tagPtr->priority; } |
︙ | |||
970 971 972 973 974 975 976 | 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 | - - - - - - + - + - + | styleValues.tabStyle = tagPtr->tabStyle; tabStylePrio = tagPtr->priority; } if ((tagPtr->underlineString != NULL) && (tagPtr->priority > underlinePrio)) { styleValues.underline = tagPtr->underline; underlinePrio = tagPtr->priority; |
︙ | |||
1031 1032 1033 1034 1035 1036 1037 | 956 957 958 959 960 961 962 963 964 965 966 967 968 969 | - - - - - | gcValues.foreground = styleValues.fgColor->pixel; if (styleValues.fgStipple != None) { gcValues.stipple = styleValues.fgStipple; gcValues.fill_style = FillStippled; mask |= GCStipple|GCFillStyle; } stylePtr->fgGC = Tk_GetGC(textPtr->tkwin, mask, &gcValues); |
︙ | |||
1065 1066 1067 1068 1069 1070 1071 | 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 | - + + - + - - - - - - - + | * *---------------------------------------------------------------------- */ static void FreeStyle( TkText *textPtr, /* Information about overall widget. */ |
︙ | |||
1123 1124 1125 1126 1127 1128 1129 | 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 | - + - + | * *---------------------------------------------------------------------- */ static DLine * LayoutDLine( TkText *textPtr, /* Overall information about text widget. */ |
︙ | |||
1173 1174 1175 1176 1177 1178 1179 | 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 | - - + - + - - - - - + | int tabStyle; /* One of TABULAR or WORDPROCESSOR. */ int tabSize; /* Number of pixels consumed by current tab * stop. */ TkTextDispChunk *lastCharChunkPtr; /* Pointer to last chunk in display lines with * numBytes > 0. Used to drop 0-sized chunks * from the end of the line. */ |
︙ | |||
1335 1336 1337 1338 1339 1340 1341 | 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 | - + - + - - - - - - - + + + + + + + - + - + | * TkTextIndexToSeg for this because it won't return a segment with zero * size (such as the insertion cursor's mark). */ connectNextLogicalLine: byteOffset = curIndex.byteIndex; segPtr = curIndex.linePtr->segPtr; |
︙ | |||
1417 1418 1419 1420 1421 1422 1423 | 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 | - + - + | } /* * Code no longer needed, now that we allow logical lines to merge * into a single display line. * if (segPtr == NULL && chunkPtr != NULL) { |
︙ | |||
1471 1472 1473 1474 1475 1476 1477 | 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 | - | } else { /* * Beginning of display line. */ x = chunkPtr->stylePtr->sValuePtr->lMargin2; } |
︙ | |||
1504 1505 1506 1507 1508 1509 1510 | 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 | - + | maxBytes = (p + 1 - segPtr->body.chars) - byteOffset; gotTab = 1; break; } } } |
︙ | |||
1541 1542 1543 1544 1545 1546 1547 | 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 | - + | chunkPtr->displayProc = NULL; chunkPtr->undisplayProc = NULL; chunkPtr->measureProc = ElideMeasureProc; chunkPtr->bboxProc = ElideBboxProc; code = 1; } else { |
︙ | |||
1564 1565 1566 1567 1568 1569 1570 | 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 | - + | /* * No characters from this segment fit in the window: this means * we're at the end of the display line. */ if (chunkPtr != NULL) { |
︙ | |||
1646 1647 1648 1649 1650 1651 1652 | 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 | - + | goto connectNextLogicalLine; } } } chunkPtr = NULL; } |
︙ | |||
1693 1694 1695 1696 1697 1698 1699 | 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 | - + - + - + - - - - + + + + | chunkPtr = breakChunkPtr->nextPtr; if (chunkPtr == NULL) { break; } FreeStyle(textPtr, chunkPtr->stylePtr); breakChunkPtr->nextPtr = chunkPtr->nextPtr; if (chunkPtr->undisplayProc != NULL) { |
︙ | |||
1783 1784 1785 1786 1787 1788 1789 | 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 | - - - - - | if (wholeLine) { dlPtr->spaceBelow = sValuePtr->spacing3; } else { dlPtr->spaceBelow = sValuePtr->spacing2/2; } dlPtr->height += dlPtr->spaceAbove + dlPtr->spaceBelow; dlPtr->baseline += dlPtr->spaceAbove; |
︙ | |||
1829 1830 1831 1832 1833 1834 1835 | 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 | - - + + | *---------------------------------------------------------------------- */ static void UpdateDisplayInfo( TkText *textPtr) /* Text widget to update. */ { |
︙ | |||
1867 1868 1869 1870 1871 1872 1873 | 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 | - + | lastLinePtr = TkBTreeFindLine(textPtr->sharedTextPtr->tree, textPtr, TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr)); dlPtr = dInfoPtr->dLinePtr; prevPtr = NULL; y = dInfoPtr->y - dInfoPtr->newTopPixelOffset; maxY = dInfoPtr->maxY; while (1) { |
︙ | |||
1978 1979 1980 1981 1982 1983 1984 | 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 | - + | /* * If we switched text lines, delete any DLines left for the old text * line. */ if (index.linePtr != prevPtr->index.linePtr) { |
︙ | |||
2347 2348 2349 2350 2351 2352 2353 | 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 | - + - - + + - + - + - + - + | * *---------------------------------------------------------------------- */ static void FreeDLines( TkText *textPtr, /* Information about overall text widget. */ |
︙ | |||
2428 2429 2430 2431 2432 2433 2434 | 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 | - + - + | * *---------------------------------------------------------------------- */ static void DisplayDLine( TkText *textPtr, /* Text widget in which to draw line. */ |
︙ | |||
2474 2475 2476 2477 2478 2479 2480 | 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 | - + - - - - - - - - - - - - - - - + | * widget. */ Tk_Fill3DRectangle(textPtr->tkwin, pixmap, textPtr->border, 0, y, Tk_Width(textPtr->tkwin), dlPtr->height, 0, TK_RELIEF_FLAT); /* |
︙ | |||
2554 2555 2556 2557 2558 2559 2560 | 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 | - + | * displayProc as being off-screen to the left (the * displayProc may not be able to tell if something is off to * the right). */ x = -chunkPtr->width; } |
︙ | |||
2607 2608 2609 2610 2611 2612 2613 | 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 | - + | * *-------------------------------------------------------------- */ static void DisplayLineBackground( TkText *textPtr, /* Text widget containing line. */ |
︙ | |||
3003 3004 3005 3006 3007 3008 3009 | 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 | - + - - + + - - - - - - - - + - + - - - + - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | *---------------------------------------------------------------------- */ static void AsyncUpdateLineMetrics( ClientData clientData) /* Information about widget. */ { |
︙ | |||
3205 3206 3207 3208 3209 3210 3211 | 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 | - - - - | * lines to recalculate. If '-1' then do * everything in the range (which may take a * while). */ { TkTextLine *linePtr = NULL; int count = 0; int totalLines = TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr); |
︙ | |||
3244 3245 3246 3247 3248 3249 3250 | 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 | - + - - | } /* * If we're in the middle of a partial-line height calculation, * then we can't be done. */ |
︙ | |||
3269 3270 3271 3272 3273 3274 3275 | 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } /* * Now update the line's metrics if necessary. */ if (TkBTreeLinePixelEpoch(textPtr, linePtr) |
︙ | |||
3377 3378 3379 3380 3381 3382 3383 | 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 | - - - + + - - - | count++; if (doThisMuch != -1 && count >= doThisMuch) { break; } } if (doThisMuch == -1) { |
︙ | |||
3555 3556 3557 3558 3559 3560 3561 | 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 | - + - - - - - | /* * Now re-set the current update calculations. */ if (dInfoPtr->lineUpdateTimer == NULL) { textPtr->refCount++; dInfoPtr->lineUpdateTimer = Tcl_CreateTimerHandler(1, |
︙ | |||
3610 3611 3612 3613 3614 3615 3616 | 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 | - - - + + - - - + + - - + + - - - - + + + + - - + + - - - - - + + + + + - - + + - - - - - + + + + + - - - + + + - - - - + + + + - - + + - + - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - + + + | TkTextIndex *indexPtr, /* Index we will adjust to the display line * start or end. */ int end, /* 0 = start, 1 = end. */ int *xOffset) /* NULL, or used to store the x-pixel offset * of the original index within its display * line. */ { |
︙ | |||
3750 3751 3752 3753 3754 3755 3756 | 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 | - + | * *---------------------------------------------------------------------- */ static int CalculateDisplayLineHeight( TkText *textPtr, /* Widget record for text widget. */ |
︙ | |||
3842 3843 3844 3845 3846 3847 3848 | 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 | - + | * *---------------------------------------------------------------------- */ int TkTextIndexYPixels( TkText *textPtr, /* Widget record for text widget. */ |
︙ | |||
4135 4136 4137 4138 4139 4140 4141 | 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 | - + | sprintf(buffer, "%d %d", TkBTreeLinesTo(textPtr,linePtr), pixelHeight); LOG("tk_textNumPixels", buffer); } if (textPtr->dInfoPtr->scrollbarTimer == NULL) { textPtr->refCount++; textPtr->dInfoPtr->scrollbarTimer = Tcl_CreateTimerHandler(200, |
︙ | |||
4161 4162 4163 4164 4165 4166 4167 | 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 | - + - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + - + - + - - + + | *---------------------------------------------------------------------- */ static void DisplayText( ClientData clientData) /* Information about widget. */ { |
︙ | |||
4251 4252 4253 4254 4255 4256 4257 | 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 | - + | * scrolling (copying from other parts of the screen). We have to be * particularly careful with the top and bottom lines of the display, * since these may only be partially visible and therefore not helpful for * some scrolling purposes. */ for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL; dlPtr = dlPtr->nextPtr) { |
︙ | |||
4307 4308 4309 4310 4311 4312 4313 | 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 | - + | /* * Reduce the height of the area being copied if necessary to avoid * overwriting the border area. */ if ((y + height) > dInfoPtr->maxY) { |
︙ | |||
4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 | 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 | + | dlPtr->oldY = dlPtr->y; if (dlPtr->nextPtr == dlPtr2) { break; } dlPtr = dlPtr->nextPtr; } /* * Scan through the lines following the copied ones to see if we are * going to overwrite them with the copy operation. If so, mark them * for redisplay. */ for ( ; dlPtr2 != NULL; dlPtr2 = dlPtr2->nextPtr) { |
︙ | |||
4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 | 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 | + | */ damageRgn = TkCreateRegion(); if (TkScrollWindow(textPtr->tkwin, dInfoPtr->scrollGC, dInfoPtr->x, oldY, dInfoPtr->maxX-dInfoPtr->x, height, 0, y-oldY, damageRgn)) { TextInvalidateRegion(textPtr, damageRgn); } numCopies++; TkDestroyRegion(damageRgn); } /* * Clear the REDRAW_PENDING flag here. This is actually pretty tricky. We |
︙ | |||
4503 4504 4505 4506 4507 4508 4509 | 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - | #ifndef TK_NO_DOUBLE_BUFFERING Tk_FreePixmap(Tk_Display(textPtr->tkwin), pixmap); #endif /* TK_NO_DOUBLE_BUFFERING */ return; } dlPtr->oldY = dlPtr->y; dlPtr->flags &= ~(NEW_LAYOUT | OLD_Y_INVALID); |
︙ | |||
4572 4573 4574 4575 4576 4577 4578 | 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 | - - - - - - + | * as being off-screen to the left (the displayProc * may not be able to tell if something is off to the * right). */ x = -chunkPtr->width; } |
︙ | |||
4652 4653 4654 4655 4656 4657 4658 | 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 | - + | if (textPtr->xScrollCmd != NULL) { GetXView(textPtr->interp, textPtr, 1); } } end: |
︙ | |||
4681 4682 4683 4684 4685 4686 4687 | 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 | - + | TkText *textPtr) /* Widget record for text widget. */ { TextDInfo *dInfoPtr = textPtr->dInfoPtr; dInfoPtr->flags |= REPICK_NEEDED; if (!(dInfoPtr->flags & REDRAW_PENDING)) { dInfoPtr->flags |= REDRAW_PENDING; |
︙ | |||
4725 4726 4727 4728 4729 4730 4731 | 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 | - + | rect.height = height; TkUnionRectWithRegion(&rect, damageRgn, damageRgn); TextInvalidateRegion(textPtr, damageRgn); if (!(dInfoPtr->flags & REDRAW_PENDING)) { dInfoPtr->flags |= REDRAW_PENDING; |
︙ | |||
4751 4752 4753 4754 4755 4756 4757 | 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 | - + | */ static void TextInvalidateRegion( TkText *textPtr, /* Widget record for text widget. */ TkRegion region) /* Region of area to redraw. */ { |
︙ | |||
4819 4820 4821 4822 4823 4824 4825 | 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 | - - + + - - + + | *---------------------------------------------------------------------- */ void TkTextChanged( TkSharedText *sharedTextPtr,/* Shared widget section, or NULL. */ TkText *textPtr, /* Widget record for text widget, or NULL. */ |
︙ | |||
4864 4865 4866 4867 4868 4869 4870 | 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 | - + | * the idle handler for redisplay to be called first, so that it can * put the embedded window back on the screen again (if appropriate). * This will prevent the window from ever being unmapped, and thereby * avoid flashing. */ if (!(dInfoPtr->flags & REDRAW_PENDING)) { |
︙ | |||
5009 5010 5011 5012 5013 5014 5015 | 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 | - + | TkTextIndex *index2Ptr, /* Character just after last one to consider * for redisplay. NULL means process all the * characters in the text. */ TkTextTag *tagPtr, /* Information about tag. */ int withTag) /* 1 means redraw characters that have the * tag, 0 means redraw those without. */ { |
︙ | |||
5101 5102 5103 5104 5105 5106 5107 | 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 | - + | /* * Schedule a redisplay and layout recalculation if they aren't already * pending. This has to be done before calling FreeDLines, for the reason * given in TkTextChanged. */ if (!(dInfoPtr->flags & REDRAW_PENDING)) { |
︙ | |||
5198 5199 5200 5201 5202 5203 5204 | 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 | - - + - | TkText *textPtr, /* Widget record for text widget. */ int mask) /* OR'd collection of bits showing what has * changed. */ { TextDInfo *dInfoPtr = textPtr->dInfoPtr; GC newGC; XGCValues gcValues; |
︙ | |||
5272 5273 5274 5275 5276 5277 5278 | 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 | - + - | if (!IsStartOfNotMergedLine(textPtr, &textPtr->topIndex)) { TkTextFindDisplayLineEnd(textPtr, &textPtr->topIndex, 0, NULL); } /* * Invalidate cached scrollbar positions, so that scrollbars sliders will |
︙ | |||
5303 5304 5305 5306 5307 5308 5309 | 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 | - + - - - | */ dInfoPtr->metricEpoch = -1; if (dInfoPtr->lineUpdateTimer == NULL) { textPtr->refCount++; dInfoPtr->lineUpdateTimer = Tcl_CreateTimerHandler(1, |
︙ | |||
5349 5350 5351 5352 5353 5354 5355 | 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 | - + | * line, don't nudge it up or down by a few * pixels just to make sure it is entirely * displayed. Positive numbers indicate the * number of pixels of the index's line which * are to be off the top of the screen. */ { TextDInfo *dInfoPtr = textPtr->dInfoPtr; |
︙ | |||
5505 5506 5507 5508 5509 5510 5511 | 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 | - + | */ MeasureUp(textPtr, indexPtr, bottomY, &textPtr->topIndex, &dInfoPtr->newTopPixelOffset); scheduleUpdate: if (!(dInfoPtr->flags & REDRAW_PENDING)) { |
︙ | |||
5595 5596 5597 5598 5599 5600 5601 | 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 | - + | * *-------------------------------------------------------------- */ static void MeasureUp( TkText *textPtr, /* Text widget in which to measure. */ |
︙ | |||
5714 5715 5716 5717 5718 5719 5720 | 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 | - + | */ int TkTextSeeCmd( TkText *textPtr, /* Information about text widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
5794 5795 5796 5797 5798 5799 5800 | 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 | - + - + - + - - + + - - - - - - + + + + + + + - + | /* * Call a chunk-specific function to find the horizontal range of the * character within the chunk. chunkPtr is NULL if trying to see in elided * region. */ if (chunkPtr != NULL) { |
︙ | |||
5850 5851 5852 5853 5854 5855 5856 | 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 | - + | */ int TkTextXviewCmd( TkText *textPtr, /* Information about text widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
5903 5904 5905 5906 5907 5908 5909 | 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 | - + | dInfoPtr->newXPixelOffset += count; break; } dInfoPtr->flags |= DINFO_OUT_OF_DATE; if (!(dInfoPtr->flags & REDRAW_PENDING)) { dInfoPtr->flags |= REDRAW_PENDING; |
︙ | |||
5988 5989 5990 5991 5992 5993 5994 | 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 | - + | /* * offset = 0, so no scrolling required. */ return; } if (!(dInfoPtr->flags & REDRAW_PENDING)) { |
︙ | |||
6123 6124 6125 6126 6127 6128 6129 | 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 | - + | } textPtr->topIndex = newIdx; } } scheduleUpdate: if (!(dInfoPtr->flags & REDRAW_PENDING)) { |
︙ | |||
6151 6152 6153 6154 6155 6156 6157 | 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 | - + - + - - + + | */ int TkTextYviewCmd( TkText *textPtr, /* Information about text widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ |
︙ | |||
6312 6313 6314 6315 6316 6317 6318 | 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 | - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + | } return TCL_OK; } /* *-------------------------------------------------------------- * |
︙ | |||
6429 6430 6431 6432 6433 6434 6435 | 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 | - + - - + + - - - | dInfoPtr->scanTotalYScroll = 0; dInfoPtr->scanMarkY = y; } } dInfoPtr->flags |= DINFO_OUT_OF_DATE; if (!(dInfoPtr->flags & REDRAW_PENDING)) { dInfoPtr->flags |= REDRAW_PENDING; |
︙ | |||
6514 6515 6516 6517 6518 6519 6520 | 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 | - - - + - - - - - + | return; } dInfoPtr->xScrollFirst = first; dInfoPtr->xScrollLast = last; if (textPtr->xScrollCmd != NULL) { char buf1[TCL_DOUBLE_SPACE+1]; char buf2[TCL_DOUBLE_SPACE+1]; |
︙ | |||
6648 6649 6650 6651 6652 6653 6654 | 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 | - - + + + | TkTextPrintIndex(textPtr, &index, string); LOG("tk_textHeightCalc", string); } count -= dlPtr->height; notFirst = 1; } break; |
︙ | |||
6799 6800 6801 6802 6803 6804 6805 | 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 | - - - + - - - - - + | } dInfoPtr->yScrollFirst = first; dInfoPtr->yScrollLast = last; if (textPtr->yScrollCmd != NULL) { char buf1[TCL_DOUBLE_SPACE+1]; char buf2[TCL_DOUBLE_SPACE+1]; |
︙ | |||
6841 6842 6843 6844 6845 6846 6847 | 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 | - + - - + + | *---------------------------------------------------------------------- */ static void AsyncUpdateYScrollbar( ClientData clientData) /* Information about widget. */ { |
︙ | |||
6876 6877 6878 6879 6880 6881 6882 | 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 | - + - + | * *---------------------------------------------------------------------- */ static DLine * FindDLine( TkText *textPtr, /* Widget record for text widget. */ |
︙ | |||
6987 6988 6989 6990 6991 6992 6993 | 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 | - + | * *---------------------------------------------------------------------- */ static int IsStartOfNotMergedLine( TkText *textPtr, /* Widget record for text widget. */ |
︙ | |||
7046 7047 7048 7049 7050 7051 7052 | 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 | - + | * the character nearest to (x,y). */ int *nearest) /* If non-NULL then gets set to 0 if (x,y) is * actually over the returned index, and 1 if * it is just nearby (e.g. if x,y is on the * border of the widget). */ { TextDInfo *dInfoPtr = textPtr->dInfoPtr; |
︙ | |||
7088 7089 7090 7091 7092 7093 7094 | 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 | - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - | if (dInfoPtr->dLinePtr == NULL) { if (nearest != NULL) { *nearest = 1; } *indexPtr = textPtr->topIndex; return; |
︙ | |||
7148 7149 7150 7151 7152 7153 7154 | 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 | - + | * line. */ int x, /* Pixel x coordinate of point in widget's * window. */ TkTextIndex *indexPtr) /* This index gets filled in with the index of * the character nearest to x. */ { TextDInfo *dInfoPtr = textPtr->dInfoPtr; |
︙ | |||
7205 7206 7207 7208 7209 7210 7211 | 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 | - + | * If the chunk has more than one byte in it, ask it which character is at * the desired location. In this case we can manipulate * 'indexPtr->byteIndex' directly, because we know we're staying inside a * single logical line. */ if (chunkPtr->numBytes > 1) { |
︙ | |||
7276 7277 7278 7279 7280 7281 7282 | 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 | - + - + - + - - + + + | DlineXOfIndex( TkText *textPtr, /* Widget record for text widget. */ DLine *dlPtr, /* Display information for this display * line. */ int byteIndex) /* The byte index for which we want the * coordinate. */ { |
︙ | |||
7334 7335 7336 7337 7338 7339 7340 | 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 | - + - + - + | * *---------------------------------------------------------------------- */ int TkTextIndexBbox( TkText *textPtr, /* Widget record for text widget. */ |
︙ | |||
7401 7402 7403 7404 7405 7406 7407 | 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 | - + | /* * Call a chunk-specific function to find the horizontal range of the * character within the chunk, then fill in the vertical range. The * x-coordinate returned by bboxProc is a coordinate within a line, not a * coordinate on the screen. Translate it to reflect horizontal scrolling. */ |
︙ | |||
7480 7481 7482 7483 7484 7485 7486 | 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 | - + | * *---------------------------------------------------------------------- */ int TkTextDLineInfo( TkText *textPtr, /* Widget record for text widget. */ |
︙ | |||
7507 7508 7509 7510 7511 7512 7513 | 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 | - + | /* * Find the display line containing the desired index. */ dlPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, indexPtr); |
︙ | |||
7538 7539 7540 7541 7542 7543 7544 | 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 | - + - + - - + + - - - + + | /* * Get bounding-box information about an elided chunk. */ static void ElideBboxProc( |
︙ | |||
7597 7598 7599 7600 7601 7602 7603 | 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 | - - + + - + - + - + - + - - + - - - - + - + - - + + - + - + - - + + - + - - - - - - - - - - - - - - - - + - + | * Memory is allocated to hold additional information about the chunk. * *-------------------------------------------------------------- */ int TkTextCharLayoutProc( |
︙ | |||
7763 7764 7765 7766 7767 7768 7769 | 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 | - - - - + + + + + - + | chunkPtr->numBytes = bytesThatFit; chunkPtr->minAscent = fm.ascent + chunkPtr->stylePtr->sValuePtr->offset; chunkPtr->minDescent = fm.descent - chunkPtr->stylePtr->sValuePtr->offset; chunkPtr->minHeight = 0; chunkPtr->width = nextX - chunkPtr->x; chunkPtr->breakIndex = -1; |
︙ | |||
7803 7804 7805 7806 7807 7808 7809 | 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 | - - - - - - - - + - - - + - | */ if (wrapMode != TEXT_WRAPMODE_WORD) { chunkPtr->breakIndex = chunkPtr->numBytes; } else { for (count = bytesThatFit, p += bytesThatFit - 1; count > 0; count--, p--) { |
︙ | |||
7877 7878 7879 7880 7881 7882 7883 | 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 | - + - + - + | * for unlimited. */ int flags, /* Flags to pass to MeasureChars. */ int *nextXPtr) /* The function puts the newly calculated * right border x-position of the span * here. */ { Tk_Font tkfont = chunkPtr->stylePtr->sValuePtr->tkfont; |
︙ | |||
7918 7919 7920 7921 7922 7923 7924 | 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 | - + - + | if (bstart == ciPtr->baseOffset) { xDisplacement = startX - chunkPtr->x; } else { int widthUntilStart = 0; MeasureChars(tkfont, chars, charsLen, 0, bstart, 0, -1, 0, &widthUntilStart); |
︙ | |||
7952 7953 7954 7955 7956 7957 7958 | 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 | - + - + - + - + - + - - + + - + | * Graphics are drawn. * *-------------------------------------------------------------- */ static void CharDisplayProc( |
︙ | |||
8029 8030 8031 8032 8033 8034 8035 | 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 | - + - + - + - + - + | /* * Draw the text, underline, and overstrike for this chunk. */ if (!sValuePtr->elide && (numBytes > offsetBytes) && (stylePtr->fgGC != NULL)) { |
︙ | |||
8114 8115 8116 8117 8118 8119 8120 | 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 | - + - + - + | * Memory and other resources get freed. * *-------------------------------------------------------------- */ static void CharUndisplayProc( |
︙ | |||
8144 8145 8146 8147 8148 8149 8150 | 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 | - + | } ciPtr->baseChunkPtr = NULL; ciPtr->chars = NULL; ciPtr->numBytes = 0; #endif /* TK_LAYOUT_WITH_BASE_CHUNKS */ |
︙ | |||
8203 8204 8205 8206 8207 8208 8209 | 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 | - + - + - + | * None. * *-------------------------------------------------------------- */ static void CharBboxProc( |
︙ | |||
8383 8384 8385 8386 8387 8388 8389 | 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 | - + - + - - - - - + + + + - - - - - - + + + + + + + | decimalChunkPtr = NULL; decimal = gotDigit = 0; for (chunkPtr2 = chunkPtr->nextPtr; chunkPtr2 != NULL; chunkPtr2 = chunkPtr2->nextPtr) { if (chunkPtr2->displayProc != CharDisplayProc) { continue; } |
︙ | |||
8658 8659 8660 8661 8662 8663 8664 | 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 | - + - + - + | * *-------------------------------------------------------------- */ static int MeasureChars( Tk_Font tkfont, /* Font in which to draw characters. */ |
︙ | |||
8702 8703 8704 8705 8706 8707 8708 | 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 | - + - + + + - | * Special points at the next special character (or the end of the * string). Process characters between start and special. */ if ((maxX >= 0) && (curX >= maxX)) { break; } |
︙ | |||
8764 8765 8766 8767 8768 8769 8770 | 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 | - + - + - - + + - + - - - + + - + - - + + - + - - - - - - - - + - - - - - + | */ static int TextGetScrollInfoObj( Tcl_Interp *interp, /* Used for error reporting. */ TkText *textPtr, /* Information about the text widget. */ int objc, /* # arguments for command. */ |
︙ | |||
8874 8875 8876 8877 8878 8879 8880 | 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 | - + - + - + - + - + - + - + | * even though it may not be in the linked * list yet. Used by the LayoutProc, otherwise * NULL. */ { const char *baseChars; TkTextDispChunk *chunkPtr; CharInfo *ciPtr; |
︙ | |||
8963 8964 8965 8966 8967 8968 8969 | 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 | - + - - + - | baseCharChunkPtr = NULL; } for (chunkPtr=baseChunkPtr; chunkPtr!=NULL; chunkPtr=chunkPtr->nextPtr) { if (chunkPtr->undisplayProc != CharUndisplayProc) { continue; } |
︙ | |||
9013 9014 9015 9016 9017 9018 9019 | 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 | - + - + | StyleValues *sv1; StyleValues *sv2; if (style1 == style2) { return 1; } |
︙ | |||
9083 9084 9085 9086 9087 9088 9089 | 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 | - + - + - + - + | return; } /* * Reinstitute this base chunk for re-layout. */ |
︙ |
Changes to generic/tkTextImage.c.
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | #include "tkText.h" /* * Macro that determines the size of an embedded image segment: */ #define EI_SEG_SIZE \ |
︙ | |||
39 40 41 42 43 44 45 | 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 | - + - + - + - - + + - + - + - + - + - + + - + - + - + - + - - + + - - - + + - - + - + - - - + + - - + - | TkTextLine *linePtr, int treeGone); static void EmbImageDisplayProc(TkText *textPtr, TkTextDispChunk *chunkPtr, int x, int y, int lineHeight, int baseline, Display *display, Drawable dst, int screenY); static int EmbImageLayoutProc(TkText *textPtr, TkTextIndex *indexPtr, TkTextSegment *segPtr, |
︙ | |||
215 216 217 218 219 220 221 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - + | /* * Add a new image. Find where to put the new image, and mark that * position for redisplay. */ if (objc < 4) { |
︙ | |||
238 239 240 241 242 243 244 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | - + | lineIndex, 1000000, &index); } /* * Create the new image segment and initialize it. */ |
︙ | |||
273 274 275 276 277 278 279 | 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 | - - - - + + - - - - - - + - | TkTextInvalidateLineMetrics(textPtr->sharedTextPtr, NULL, index.linePtr, 0, TK_TEXT_INVALIDATE_ONLY); return TCL_OK; } case CMD_NAMES: { Tcl_HashSearch search; Tcl_HashEntry *hPtr; |
︙ | |||
332 333 334 335 336 337 338 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | - - + - + - + | * options. */ { Tk_Image image; Tcl_DString newName; Tcl_HashEntry *hPtr; Tcl_HashSearch search; char *name; |
︙ | |||
379 380 381 382 383 384 385 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | - - - + + + - - - + | */ name = eiPtr->body.ei.imageName; if (name == NULL) { name = eiPtr->body.ei.imageString; } if (name == NULL) { |
︙ | |||
415 416 417 418 419 420 421 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | + + + - - + + + - - + + | if (conflict) { char buf[4 + TCL_INTEGER_SPACE]; sprintf(buf, "#%d", count+1); Tcl_DStringAppend(&newName, buf, -1); } name = Tcl_DStringValue(&newName); { int dummy; |
︙ | |||
444 445 446 447 448 449 450 451 452 453 | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | + - - + + | * Side effects: * The embedded image is deleted, if it exists, and any resources * associated with it are released. * *-------------------------------------------------------------- */ /* ARGSUSED */ static int EmbImageDeleteProc( TkTextSegment *eiPtr, /* Segment being deleted. */ |
︙ | |||
479 480 481 482 483 484 485 | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + | */ Tk_FreeConfigOptions((char *) &eiPtr->body.ei, eiPtr->body.ei.optionTable, NULL); if (eiPtr->body.ei.name) { ckfree(eiPtr->body.ei.name); } |
︙ | |||
526 527 528 529 530 531 532 533 534 535 | 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 | + - + - + - + - + - + | * * Side effects: * None, except for filling in chunkPtr. * *-------------------------------------------------------------- */ /*ARGSUSED*/ static int EmbImageLayoutProc( TkText *textPtr, /* Text widget being layed out. */ |
︙ | |||
591 592 593 594 595 596 597 | 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | - + | chunkPtr->minAscent = 0; chunkPtr->minDescent = 0; chunkPtr->minHeight = height; } chunkPtr->width = width; chunkPtr->breakIndex = -1; chunkPtr->breakIndex = 1; |
︙ | |||
617 618 619 620 621 622 623 | 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 | - + - + | * *-------------------------------------------------------------- */ static void EmbImageCheckProc( TkTextSegment *eiPtr, /* Segment to check. */ |
︙ | |||
658 659 660 661 662 663 664 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | - + - + - + | * chunk (differs from the x-position in the * chunk because of scrolling). */ int y, /* Top of rectangular bounding box for line: * tells where to draw this chunk in dst * (x-position is in the chunk itself). */ int lineHeight, /* Total height of line. */ int baseline, /* Offset of baseline from y. */ |
︙ | |||
711 712 713 714 715 716 717 | 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 | - + - + - + | * None. * *-------------------------------------------------------------- */ static void EmbImageBboxProc( |
︙ | |||
792 793 794 795 796 797 798 | 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 | - + | return 0; } hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->imageTable, name); if (hPtr == NULL) { return 0; } |
︙ | |||
819 820 821 822 823 824 825 | 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 | - + - - + - - + - - + | * *-------------------------------------------------------------- */ static void EmbImageProc( ClientData clientData, /* Pointer to widget record. */ |
︙ |
Changes to generic/tkTextIndex.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 | - - - + + + - + - + - + - - - + + + + + - + - - + + - + - + - + - - + - + - + - - + - + - + - - + + + - + + + + + + + + + + + + | /* * tkTextIndex.c -- * * This module provides functions that manipulate indices for text * widgets. * * Copyright (c) 1992-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. */ |
︙ | |||
170 171 172 173 174 175 176 | 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 | - + - + - - + + - + | */ static TkTextIndex * MakeObjIndex( TkText *textPtr, /* Information about text widget. */ Tcl_Obj *objPtr, /* Object containing description of * position. */ |
︙ | |||
229 230 231 232 233 234 235 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | - - + + | return NULL; } if (objPtr->typePtr != NULL) { if (objPtr->bytes == NULL) { objPtr->typePtr->updateStringProc(objPtr); } |
︙ | |||
258 259 260 261 262 263 264 | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | - + | * *--------------------------------------------------------------------------- */ Tcl_Obj * TkTextNewIndexObj( TkText *textPtr, /* Text widget for this index */ |
︙ | |||
372 373 374 375 376 377 378 | 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 | - + - + - - + + | * None. * *--------------------------------------------------------------------------- */ TkTextIndex * TkTextMakeByteIndex( |
︙ | |||
421 422 423 424 425 426 427 | 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 | - + - + - - + + | * character on the line is guaranteed to be a '\n', we can back * up a constant sizeof(char) bytes. */ indexPtr->byteIndex = index - sizeof(char); break; } |
︙ | |||
473 474 475 476 477 478 479 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | - + - + | * to. */ TkText *textPtr, int lineIndex, /* Index of desired line (0 means first line * of text). */ int charIndex, /* Index of desired character. */ TkTextIndex *indexPtr) /* Structure to fill in. */ { |
︙ | |||
523 524 525 526 527 528 529 | 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | - + - + | end = start + segPtr->size; for (p = start; p < end; p += offset) { if (charIndex == 0) { indexPtr->byteIndex = index; return indexPtr; } charIndex--; |
︙ | |||
560 561 562 563 564 565 566 | 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | - - + + - + | * None. * *--------------------------------------------------------------------------- */ TkTextSegment * TkTextIndexToSeg( |
︙ | |||
598 599 600 601 602 603 604 | 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | - - + + - + | * None. * *--------------------------------------------------------------------------- */ int TkTextSegToOffset( |
︙ | |||
692 693 694 695 696 697 698 | 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 | - + | *--------------------------------------------------------------------------- */ int TkTextGetIndex( Tcl_Interp *interp, /* Use this for error reporting. */ TkText *textPtr, /* Information about text widget. */ |
︙ | |||
726 727 728 729 730 731 732 | 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 | - + - + | */ static int GetIndex( Tcl_Interp *interp, /* Use this for error reporting. */ TkSharedText *sharedPtr, TkText *textPtr, /* Information about text widget. */ |
︙ | |||
787 788 789 790 791 792 793 | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | - + | Tcl_DStringInit(©); p = strrchr(Tcl_DStringAppend(©, string, -1), '.'); if (p != NULL) { TkTextSearch search; TkTextTag *tagPtr; Tcl_HashEntry *hPtr = NULL; |
︙ | |||
812 813 814 815 816 817 818 | 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | - + - - + + + - - - + + + - - | tagPtr = textPtr->selTagPtr; } else { *p = 0; hPtr = Tcl_FindHashEntry(&sharedPtr->tagTable, tagName); *p = '.'; if (hPtr != NULL) { |
︙ | |||
919 920 921 922 923 924 925 | 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 | - + | *endOfBase = c; if (result != 0) { goto gotBase; } } if ((string[0] == 'e') && (strncmp(string, "end", |
︙ | |||
997 998 999 1000 1001 1002 1003 | 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | - - + + | if (indexPtr->linePtr == NULL) { Tcl_Panic("Bad index created"); } return TCL_OK; error: Tcl_DStringFree(©); |
︙ | |||
1020 1021 1022 1023 1024 1025 1026 | 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | - + - - + + | * * Side effects: * None. * *--------------------------------------------------------------------------- */ |
︙ | |||
1045 1046 1047 1048 1049 1050 1051 | 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 | - + | * Two logical lines merged into one display line through eliding * of a newline. */ linePtr = TkBTreeNextLine(NULL, linePtr); segPtr = linePtr->segPtr; } |
︙ | |||
1086 1087 1088 1089 1090 1091 1092 | 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 | - - + + | * None. * *--------------------------------------------------------------------------- */ int TkTextIndexCmp( |
︙ | |||
1139 1140 1141 1142 1143 1144 1145 | 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 | - + - + - + | * * Side effects: * None. * *--------------------------------------------------------------------------- */ |
︙ | |||
1294 1295 1296 1297 1298 1299 1300 | 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 | - - - - + - + - - - - - - + - - - - + - - - - | if (count == 0) { return p; } if (forward) { TkTextFindDisplayLineEnd(textPtr, indexPtr, 1, &xOffset); while (count-- > 0) { |
︙ | |||
1402 1403 1404 1405 1406 1407 1408 | 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 | - - + + | * None. * *--------------------------------------------------------------------------- */ int TkTextIndexForwBytes( |
︙ | |||
1474 1475 1476 1477 1478 1479 1480 | 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 | - - + + - + - + - + + | * None. * *--------------------------------------------------------------------------- */ void TkTextIndexForwChars( |
︙ | |||
1585 1586 1587 1588 1589 1590 1591 | 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 | - + - + | } } if (!elide) { if (segPtr->typePtr == &tkTextCharType) { start = segPtr->body.chars + byteOffset; end = segPtr->body.chars + segPtr->size; |
︙ | |||
1623 1624 1625 1626 1627 1628 1629 | 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 | - + | dstPtr->byteIndex = 0; segPtr = dstPtr->linePtr->segPtr; } forwardCharDone: if (infoPtr != NULL) { TkTextFreeElideInfo(infoPtr); |
︙ | |||
1647 1648 1649 1650 1651 1652 1653 | 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 | - - - + + + - - + + - + - + | * None. * *--------------------------------------------------------------------------- */ int TkTextIndexCountBytes( |
︙ | |||
1737 1738 1739 1740 1741 1742 1743 | 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 | - - + + - + - + - - + + | * None. * *--------------------------------------------------------------------------- */ int TkTextIndexCount( |
︙ | |||
1840 1841 1842 1843 1844 1845 1846 | 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 | - - + + - + - + | } byteOffset = 0; continue; } } if (segPtr->typePtr == &tkTextCharType) { |
︙ | |||
1873 1874 1875 1876 1877 1878 1879 | 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 | - + - + | count += byteLen - i; if (i) { count += Tcl_NumUtfChars(segPtr->body.chars + byteOffset + (byteLen - i), i); } } else { if (type & COUNT_INDICES) { |
︙ | |||
1904 1905 1906 1907 1908 1909 1910 | 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 | - + - + | } segPtr = linePtr1->segPtr; } countDone: if (infoPtr != NULL) { TkTextFreeElideInfo(infoPtr); |
︙ | |||
1933 1934 1935 1936 1937 1938 1939 | 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 | - - + + | * None. * *--------------------------------------------------------------------------- */ int TkTextIndexBackBytes( |
︙ | |||
2003 2004 2005 2006 2007 2008 2009 | 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 | - - + + - + - + | * None. * *--------------------------------------------------------------------------- */ void TkTextIndexBackChars( |
︙ | |||
2052 2053 2054 2055 2056 2057 2058 | 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 | - + | * Two logical lines merged into one display line through * eliding of a newline. */ linePtr = TkBTreeNextLine(NULL, linePtr); segPtr = linePtr->segPtr; } |
︙ | |||
2122 2123 2124 2125 2126 2127 2128 | 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 | - + | } } if (!elide) { if (segPtr->typePtr == &tkTextCharType) { start = segPtr->body.chars; end = segPtr->body.chars + segSize; |
︙ | |||
2188 2189 2190 2191 2192 2193 2194 | 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 | - + | segPtr = oldPtr; segSize = segPtr->size; } backwardCharDone: if (infoPtr != NULL) { TkTextFreeElideInfo(infoPtr); |
︙ | |||
2212 2213 2214 2215 2216 2217 2218 | 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 | - + - + - + - + | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
2293 2294 2295 2296 2297 2298 2299 | 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 | - + - + - + | TkTextFindDisplayLineEnd(textPtr, indexPtr, 0, NULL); } else { indexPtr->byteIndex = 0; } } else if ((*string == 'w') && (strncmp(string, "wordend", length) == 0) && (length >= 5)) { int firstChar = 1; |
︙ | |||
2336 2337 2338 2339 2340 2341 2342 | 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 | - + + - - + - + - + - + | TkTextIndexForwChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES); } } } else if ((*string == 'w') && (strncmp(string, "wordstart", length) == 0) && (length >= 5)) { int firstChar = 1; |
︙ |
Changes to generic/tkTextMark.c.
︙ | |||
9 10 11 12 13 14 15 | 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 | - - - + + - - - + + - + - + | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" #include "tkText.h" |
︙ | |||
89 90 91 92 93 94 95 | 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 | - + - + - + - - + + - - + + - + - - + - - + - + - - - + - + - - + - + - + - - + + - - + - - - - - + - - + - - + + - - - - + - + - + - + | * See the user documentation. * *-------------------------------------------------------------- */ int TkTextMarkCmd( |
︙ | |||
286 287 288 289 290 291 292 | 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 | - + - + | widgetSpecific = 2; markPtr = textPtr->currentMarkPtr; isNew = (markPtr == NULL ? 1 : 0); } else { widgetSpecific = 0; hPtr = Tcl_CreateHashEntry(&textPtr->sharedTextPtr->markTable, name, &isNew); |
︙ | |||
326 327 328 329 330 331 332 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | - + | TkTextIndexBackChars(NULL,indexPtr, 1, &insertIndex, COUNT_INDICES); indexPtr = &insertIndex; } } TkBTreeUnlinkSegment(markPtr, markPtr->body.mark.linePtr); } else { |
︙ | |||
350 351 352 353 354 355 356 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | - + | * If the mark is the insertion cursor, then update the screen at the * mark's new location. */ if (markPtr == textPtr->insertMarkPtr) { TkTextIndex index2; |
︙ | |||
442 443 444 445 446 447 448 | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | - - + + - - + | } if (!strcmp(name, "insert")) { segPtr = textPtr->insertMarkPtr; } else if (!strcmp(name, "current")) { segPtr = textPtr->currentMarkPtr; } else { |
︙ | |||
495 496 497 498 499 500 501 502 503 | 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | + - - - + + + | * Side effects: * None (even if the whole tree is being deleted we don't free up the * mark; it will be done elsewhere). * *-------------------------------------------------------------- */ /* ARGSUSED */ static int MarkDeleteProc( |
︙ | |||
554 555 556 557 558 559 560 | 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 | - + - + - + - + - + - - + + | * *-------------------------------------------------------------- */ static int MarkLayoutProc( TkText *textPtr, /* Text widget being layed out. */ |
︙ | |||
590 591 592 593 594 595 596 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | - + + - + - - + + - + - + | /* * Note: can't break a line after the insertion cursor: this prevents the * insertion cursor from being stranded at the end of a line. */ chunkPtr->breakIndex = -1; |
︙ | |||
664 665 666 667 668 669 670 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + - - + + | * As a special hack to keep the cursor visible on mono displays (or * anywhere else that the selection and insertion cursors have the same * color) write the default background in the cursor area (instead of * nothing) when the cursor isn't on. Otherwise the selection might hide * the cursor. */ |
︙ | |||
798 799 800 801 802 803 804 | 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 | - + - + - - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + | *-------------------------------------------------------------- */ static int MarkFindNext( Tcl_Interp *interp, /* For error reporting */ TkText *textPtr, /* The widget */ |
︙ | |||
889 890 891 892 893 894 895 | 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 | - + - + - - + - + | *-------------------------------------------------------------- */ static int MarkFindPrev( Tcl_Interp *interp, /* For error reporting */ TkText *textPtr, /* The widget */ |
︙ | |||
956 957 958 959 960 961 962 | 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 | - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | continue; } } prevPtr = seg2Ptr; } } if (prevPtr != NULL) { |
Changes to generic/tkTextTag.c.
︙ | |||
8 9 10 11 12 13 14 | 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 | - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + - + - - - - + - + - - - - - - - + - + - + - + - - + + - + - - - - - - + + + - - + + | * Copyright (c) 1992-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. */ |
︙ | |||
133 134 135 136 137 138 139 | 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 | - + - + - + - + - + - - + + | * See the user documentation. * *-------------------------------------------------------------- */ int TkTextTagCmd( |
︙ | |||
231 232 233 234 235 236 237 | 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 | - + - - + | * textPtr (not for other peer widget's "sel" tags) because we * cannot reach this code path with a different widget's "sel" * tag. */ if (tagPtr == textPtr->selTagPtr) { /* |
︙ | |||
270 271 272 273 274 275 276 | 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 329 330 331 332 333 334 335 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 | - + - + - - - - + + + + - + - + - + - + - + - + - + | textPtr->sharedTextPtr->bindingTable = Tk_CreateBindingTable(interp); } if (objc == 6) { int append = 0; unsigned long mask; |
︙ | |||
455 456 457 458 459 460 461 | 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 | - + - - - - - - + + + + - - + - - + - - - - - + - - - | return TCL_ERROR; } if (tagPtr->spacing3 < 0) { tagPtr->spacing3 = 0; } } if (tagPtr->tabArrayPtr != NULL) { |
︙ | |||
528 529 530 531 532 533 534 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | - - - - + - - - | || (tagPtr->tabStringPtr != NULL) || (tagPtr->tabStyle != TK_TEXT_TABSTYLE_NONE) || (tagPtr->wrapMode != TEXT_WRAPMODE_NULL)) { tagPtr->affectsDisplay = 1; tagPtr->affectsDisplayGeometry = 1; } if ((tagPtr->border != NULL) |
︙ | |||
580 581 582 583 584 585 586 | 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | - + | * Either this tag doesn't exist or it's the 'sel' tag (which * is not in the hash table). Either way we don't want to * delete it. */ continue; } |
︙ | |||
641 642 643 644 645 646 647 | 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | - - + + - + | Tcl_WrongNumArgs(interp, 3, objv, "?index?"); return TCL_ERROR; } if (objc == 3) { Tcl_HashSearch search; Tcl_HashEntry *hPtr; |
︙ | |||
675 676 677 678 679 680 681 | 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | - + - | for (i = 0; i < arraySize; i++) { tagPtr = arrayPtr[i]; Tcl_ListObjAppendElement(interp, listObj, Tcl_NewStringObj(tagPtr->name,-1)); } Tcl_SetObjResult(interp, listObj); |
︙ | |||
751 752 753 754 755 756 757 | 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | - - + - - + - - - | return TCL_OK; } gotStart: if (TkTextIndexCmp(&tSearch.curIndex, &index2) >= 0) { return TCL_OK; } |
︙ | |||
815 816 817 818 819 820 821 | 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | - + + | /* * The first character is tagged, so just add the range from * the first char to the start of the range. */ TkTextPrintIndex(textPtr, &index2, position1); TkTextPrintIndex(textPtr, &index1, position2); |
︙ | |||
865 866 867 868 869 870 871 | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 | - - - - + - - + - - | /* It's ok */ TkTextPrintIndex(textPtr, &index2, position1); } else { return TCL_OK; } } } |
︙ | |||
931 932 933 934 935 936 937 | 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | - + - + - + | TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, 0, 0, &first); TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr), 0, &last); TkBTreeStartSearch(&first, &last, tagPtr, &tSearch); if (TkBTreeCharTagged(&first, tagPtr)) { |
︙ | |||
978 979 980 981 982 983 984 | 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 | - + - + - + - + - + - - + + - + - + - + - + - - - - - - - | * *---------------------------------------------------------------------- */ TkTextTag * TkTextCreateTag( TkText *textPtr, /* Widget in which tag is being used. */ |
︙ | |||
1101 1102 1103 1104 1105 1106 1107 | 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | - + - - + + - - - + + + - + - - + + - - - | static TkTextTag * FindTag( Tcl_Interp *interp, /* Interpreter to use for error message; if * NULL, then don't record an error * message. */ TkText *textPtr, /* Widget in which tag is being used. */ |
︙ | |||
1154 1155 1156 1157 1158 1159 1160 | 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | - + | * *---------------------------------------------------------------------- */ void TkTextDeleteTag( TkText *textPtr, /* Info about overall widget. */ |
︙ | |||
1212 1213 1214 1215 1216 1217 1218 | 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 | - + - + | * *---------------------------------------------------------------------- */ void TkTextFreeTag( TkText *textPtr, /* Info about overall widget. */ |
︙ | |||
1255 1256 1257 1258 1259 1260 1261 | 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 | + - - + + - + | * refCount it holds. */ if (tagPtr->textPtr != NULL) { if (textPtr != tagPtr->textPtr) { Tcl_Panic("Tag being deleted from wrong widget"); } textPtr->refCount--; |
︙ | |||
1291 1292 1293 1294 1295 1296 1297 | 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 | - + | static void SortTags( int numTags, /* Number of tag pointers at *tagArrayPtr. */ TkTextTag **tagArrayPtr) /* Pointer to array of pointers. */ { int i, j, prio; |
︙ | |||
1338 1339 1340 1341 1342 1343 1344 | 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | - - + + | * None. * *---------------------------------------------------------------------- */ static int TagSortProc( |
︙ | |||
1375 1376 1377 1378 1379 1380 1381 | 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 | - + | static void ChangeTagPriority( TkText *textPtr, /* Information about text widget. */ TkTextTag *tagPtr, /* Tag whose priority is to be changed. */ int prio) /* New priority for tag. */ { int low, high, delta; |
︙ | |||
1408 1409 1410 1411 1412 1413 1414 | 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 | - + | if ((textPtr->selTagPtr->priority >= low) && (textPtr->selTagPtr->priority <= high)) { textPtr->selTagPtr->priority += delta; } for (hPtr = Tcl_FirstHashEntry(&textPtr->sharedTextPtr->tagTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { |
︙ | |||
1436 1437 1438 1439 1440 1441 1442 | 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 | - + - - + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + - + - + - + + - - + + | * any). * *-------------------------------------------------------------- */ void TkTextBindProc( |
︙ | |||
1525 1526 1527 1528 1529 1530 1531 | 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | - + - + - | * widget. * *-------------------------------------------------------------- */ void TkTextPickCurrent( |
︙ | |||
1594 1595 1596 1597 1598 1599 1600 | 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 | - + | textPtr->pickEvent.xcrossing.y_root = eventPtr->xmotion.y_root; textPtr->pickEvent.xcrossing.mode = NotifyNormal; textPtr->pickEvent.xcrossing.detail = NotifyNonlinear; textPtr->pickEvent.xcrossing.same_screen = eventPtr->xmotion.same_screen; textPtr->pickEvent.xcrossing.focus = False; textPtr->pickEvent.xcrossing.state = eventPtr->xmotion.state; |
︙ | |||
1629 1630 1631 1632 1633 1634 1635 | 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 | - - + + | * compare the old tags to the copy, nullifying any tags that are present * in both groups (i.e. the tags that haven't changed). */ SortTags(textPtr->numCurTags, textPtr->curTagArrayPtr); if (numNewTags > 0) { size = numNewTags * sizeof(TkTextTag *); |
︙ | |||
1671 1672 1673 1674 1675 1676 1677 | 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 | - + | * consistent, this avoids problems where the binding code will * discard NotifyInferior events. */ event.xcrossing.detail = NotifyAncestor; TagBindEvent(textPtr, &event, numOldTags, oldArrayPtr); } |
︙ | |||
1693 1694 1695 1696 1697 1698 1699 | 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 | - + | && (textPtr->tkwin != NULL) && !(textPtr->flags & DESTROYED) && !nearby) { event = textPtr->pickEvent; event.type = EnterNotify; event.xcrossing.detail = NotifyAncestor; TagBindEvent(textPtr, &event, numNewTags, copyArrayPtr); } |
︙ | |||
1723 1724 1725 1726 1727 1728 1729 | 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 | - - - + + + - + - - + | static void TagBindEvent( TkText *textPtr, /* Text widget to fire bindings in. */ XEvent *eventPtr, /* What actually happened. */ int numTags, /* Number of relevant tags. */ TkTextTag **tagArrayPtr) /* Array of relevant tags. */ { |
Changes to generic/tkTextWind.c.
︙ | |||
18 19 20 21 22 23 24 | 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 | - + - + - - + + - + - + - + - + - - + + - + - + - + - + - - + + | /* * The following structure is the official type record for the embedded window * geometry manager: */ static void EmbWinRequestProc(ClientData clientData, Tk_Window tkwin); |
︙ | |||
129 130 131 132 133 134 135 | 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 | - + - + - + - + - - + + + - - - + + - - + + - + - - - + + - - + - + | * See the user documentation. * *-------------------------------------------------------------- */ int TkTextWindowCmd( |
︙ | |||
261 262 263 264 265 266 267 | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | - + | /* * Add a new window. Find where to put the new window, and mark that * position for redisplay. */ if (objc < 4) { |
︙ | |||
284 285 286 287 288 289 290 | 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 | - + - + + | lineIndex, 1000000, &index); } /* * Create the new window segment and initialize it. */ |
︙ | |||
329 330 331 332 333 334 335 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | - - - - + + - - | TkTextInvalidateLineMetrics(textPtr->sharedTextPtr, NULL, index.linePtr, 0, TK_TEXT_INVALIDATE_ONLY); break; } case WIND_NAMES: { Tcl_HashSearch search; Tcl_HashEntry *hPtr; |
︙ | |||
397 398 399 400 401 402 403 | 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | - + - - + + | if (client != NULL) { ewPtr->body.ew.tkwin = client->tkwin; } else { ewPtr->body.ew.tkwin = NULL; } oldWindow = ewPtr->body.ew.tkwin; |
︙ | |||
437 438 439 440 441 442 443 | 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 | - - + + - - - + + - - - + - + + - + + - + | parent = Tk_Parent(ewPtr->body.ew.tkwin); for (ancestor = textPtr->tkwin; ; ancestor = Tk_Parent(ancestor)) { if (ancestor == parent) { break; } if (Tk_TopWinHierarchy(ancestor)) { |
︙ | |||
520 521 522 523 524 525 526 | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | - + | */ static void EmbWinStructureProc( ClientData clientData, /* Pointer to record describing window item. */ XEvent *eventPtr) /* Describes what just happened. */ { |
︙ | |||
567 568 569 570 571 572 573 574 575 576 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | + - + - + - + - + - + - + - - + + | * Side effects: * The size and location on the screen of the window may change, * depending on the options specified for the window item. * *-------------------------------------------------------------- */ /* ARGSUSED */ static void EmbWinRequestProc( ClientData clientData, /* Pointer to record for window item. */ |
︙ | |||
642 643 644 645 646 647 648 | 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + | ewPtr->body.ew.clients = client->next; } else { while (loop->next != client) { loop = loop->next; } loop->next = client->next; } |
︙ | |||
699 700 701 702 703 704 705 | 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | - + - + - + + - - + + | * Delete the event handler for the window before destroying the window, * so that EmbWinStructureProc doesn't get called (we'll already do * everything that it would have done, and it will just get confused). */ if (client->tkwin != NULL) { Tk_DeleteEventHandler(client->tkwin, StructureNotifyMask, |
︙ | |||
761 762 763 764 765 766 767 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | - + | Tk_FreeConfigOptions((char *) &ewPtr->body.ew, ewPtr->body.ew.optionTable, NULL); /* * Free up all memory allocated. */ |
︙ | |||
808 809 810 811 812 813 814 815 816 817 | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | + - + - + - + - + - + | * * Side effects: * None, except for filling in chunkPtr. * *-------------------------------------------------------------- */ /*ARGSUSED*/ static int EmbWinLayoutProc( TkText *textPtr, /* Text widget being layed out. */ |
︙ | |||
848 849 850 851 852 853 854 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | - + - | } if ((ewPtr->body.ew.tkwin == NULL) && (ewPtr->body.ew.create != NULL)) { int code, isNew; Tk_Window ancestor; Tcl_HashEntry *hPtr; const char *before, *string; |
︙ | |||
908 909 910 911 912 913 914 | 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 | + - + + - + - - - + + - - + - + + + + + + - + - - - - - - - - - - + - + + - + + - + | Tcl_DStringAppend(dsPtr, before, (int) (string-before)); code = Tcl_EvalEx(textPtr->interp, Tcl_DStringValue(dsPtr), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(dsPtr); } else { code = Tcl_EvalEx(textPtr->interp, ewPtr->body.ew.create, -1, TCL_EVAL_GLOBAL); } if (code != TCL_OK) { createError: |
︙ | |||
1015 1016 1017 1018 1019 1020 1021 | 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | - + | chunkPtr->minAscent = 0; chunkPtr->minDescent = 0; chunkPtr->minHeight = height; } chunkPtr->width = width; chunkPtr->breakIndex = -1; chunkPtr->breakIndex = 1; |
︙ | |||
1043 1044 1045 1046 1047 1048 1049 | 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 | - + - + | * *-------------------------------------------------------------- */ static void EmbWinCheckProc( TkTextSegment *ewPtr, /* Segment to check. */ |
︙ | |||
1078 1079 1080 1081 1082 1083 1084 | 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 | - + - - + + - + | void TkTextEmbWinDisplayProc( TkText *textPtr, /* Information about text widget. */ TkTextDispChunk *chunkPtr, /* Chunk that is to be drawn. */ int x, /* X-position in dst at which to draw this * chunk (differs from the x-position in the * chunk because of scrolling). */ |
︙ | |||
1171 1172 1173 1174 1175 1176 1177 | 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | - + - + | */ static void EmbWinUndisplayProc( TkText *textPtr, /* Overall information about text widget. */ TkTextDispChunk *chunkPtr) /* Chunk that is about to be freed. */ { |
︙ | |||
1219 1220 1221 1222 1223 1224 1225 | 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | - + - + | *-------------------------------------------------------------- */ static void EmbWinBboxProc( TkText *textPtr, /* Information about text widget. */ TkTextDispChunk *chunkPtr, /* Chunk containing desired char. */ |
︙ | |||
1296 1297 1298 1299 1300 1301 1302 | 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 | - + | *-------------------------------------------------------------- */ static void EmbWinDelayedUnmap( ClientData clientData) /* Token for the window to be unmapped. */ { |
︙ | |||
1344 1345 1346 1347 1348 1349 1350 | 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 | - + | } hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->windowTable, name); if (hPtr == NULL) { return 0; } |
︙ | |||
1375 1376 1377 1378 1379 1380 1381 | 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ |
Changes to generic/tkTrig.c.
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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 | + + + + | * Copyright (c) 1992-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. */ #include <stdio.h> #include "tkInt.h" #include "tkCanvas.h" #undef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #undef MAX #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #ifndef PI # define PI 3.14159265358979323846 #endif /* PI */ /* *-------------------------------------------------------------- * * TkLineToPoint -- * * Compute the distance from a point to a finite line segment. |
︙ | |||
278 279 280 281 282 283 284 285 286 287 288 289 290 291 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ int TkThickPolyLineToArea( double *coordPtr, /* Points to an array of coordinates for the * polyline: x0, y0, x1, y1, ... */ int numPoints, /* Total number of points at *coordPtr. */ double width, /* Width of each line segment. */ int capStyle, /* How are end-points of polyline drawn? |
︙ | |||
435 436 437 438 439 440 441 | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | - + | { double bestDist; /* Closest distance between point and any edge * in polygon. */ int intersections; /* Number of edges in the polygon that * intersect a ray extending vertically * upwards from the point to infinity. */ int count; |
︙ | |||
583 584 585 586 587 588 589 | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | - + - + | int TkPolygonToArea( double *polyPtr, /* Points to an array coordinates for closed * polygon: x0, y0, x1, y1, ... The polygon * may be self-intersecting. */ int numPoints, /* Total number of points at *polyPtr. */ |
︙ | |||
647 648 649 650 651 652 653 654 655 656 657 658 659 660 | 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | + | * * Side effects: * None. * *-------------------------------------------------------------- */ /* ARGSUSED */ double TkOvalToPoint( double ovalPtr[4], /* Pointer to array of four coordinates (x1, * y1, x2, y2) defining oval's bounding * box. */ double width, /* Width of outline for oval. */ int filled, /* Non-zero means oval should be treated as |
︙ | |||
745 746 747 748 749 750 751 | 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 | - + - + | * None. * *-------------------------------------------------------------- */ int TkOvalToArea( |
︙ | |||
861 862 863 864 865 866 867 868 869 | 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 | + - + | * * Side effects: * The boudn. * *-------------------------------------------------------------- */ /* ARGSUSED */ void TkIncludePoint( |
︙ | |||
912 913 914 915 916 917 918 | 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 | - + | void TkBezierScreenPoints( Tk_Canvas canvas, /* Canvas in which curve is to be drawn. */ double control[], /* Array of coordinates for four control * points: x0, y0, x1, y1, ... x3 y3. */ int numSteps, /* Number of curve points to generate. */ |
︙ | |||
958 959 960 961 962 963 964 | 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | - + | */ void TkBezierPoints( double control[], /* Array of coordinates for four control * points: x0, y0, x1, y1, ... x3 y3. */ int numSteps, /* Number of curve points to generate. */ |
︙ | |||
1368 1369 1370 1371 1372 1373 1374 | 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 | - + - - + - - + + | double *pointPtr, /* Array of input coordinates: x0, y0, x1, y1, * etc.. */ int numPoints) /* Number of points at pointPtr. */ { int closed, i; int numCoords = numPoints*2; double control[8]; |
︙ | |||
1426 1427 1428 1429 1430 1431 1432 | 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 | - - + + - - - | } else { control[6] = 0.5*pointPtr[0] + 0.5*pointPtr[2]; control[7] = 0.5*pointPtr[1] + 0.5*pointPtr[3]; } control[4] = 0.333*control[6] + 0.667*pointPtr[0]; control[5] = 0.333*control[7] + 0.667*pointPtr[1]; |
︙ | |||
1469 1470 1471 1472 1473 1474 1475 | 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | - + - + + - + - - + + | * being generated. */ double *pointPtr, /* Array of input coordinates: x0, y0, x1, y1, * etc.. */ int numPoints) /* Number of points at pointPtr. */ { int i; double *segPtr; |
︙ | |||
1528 1529 1530 1531 1532 1533 1534 | 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 | - + - - + + - - - | if (control[0]==control[2] && control[1]==control[3] && control[4]==control[6] && control[5]==control[7]) { /* * Straight line. */ |
︙ |
Changes to generic/tkUndo.c.
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | - + | int TkUndoInsertSeparator( TkUndoAtom **stack) { TkUndoAtom *separator; if (*stack!=NULL && (*stack)->type!=TK_UNDO_SEPARATOR) { |
︙ | |||
131 132 133 134 135 136 137 | 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 | - + - + - + | sub = elem->apply; while (sub != NULL) { TkUndoSubAtom *next = sub->next; if (sub->action != NULL) { Tcl_DecrRefCount(sub->action); } |
︙ | |||
177 178 179 180 181 182 183 | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | - + | TkUndoPushAction( TkUndoRedoStack *stack, /* An Undo or Redo stack */ TkUndoSubAtom *apply, TkUndoSubAtom *revert) { TkUndoAtom *atom; |
︙ | |||
233 234 235 236 237 238 239 | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | - + | { TkUndoSubAtom *atom; if (command == NULL && actionScript == NULL) { Tcl_Panic("NULL command and actionScript in TkUndoMakeCmdSubAtom"); } |
︙ | |||
295 296 297 298 299 300 301 | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - + | { TkUndoSubAtom *atom; if (funcPtr == NULL) { Tcl_Panic("NULL funcPtr in TkUndoMakeSubAtom"); } |
︙ | |||
337 338 339 340 341 342 343 | 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 | - + - + - + | TkUndoRedoStack * TkUndoInitStack( Tcl_Interp *interp, /* The interpreter */ int maxdepth) /* The maximum stack depth */ { TkUndoRedoStack *stack; /* An Undo/Redo stack */ |
︙ | |||
388 389 390 391 392 393 394 | 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 416 417 418 419 420 421 422 423 424 425 426 427 428 | - - + - + - + | while ((elem != NULL) && (sepNumber <= stack->maxdepth)) { if (elem->type == TK_UNDO_SEPARATOR) { sepNumber++; } prevelem = elem; elem = elem->next; } |
︙ | |||
468 469 470 471 472 473 474 | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | */ void TkUndoFreeStack( TkUndoRedoStack *stack) /* An Undo/Redo stack */ { TkUndoClearStacks(stack); |
︙ | |||
540 541 542 543 544 545 546 | 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | - + | void TkUndoInsertUndoSeparator( TkUndoRedoStack *stack) { if (TkUndoInsertSeparator(&stack->undoStack)) { stack->depth++; |
︙ | |||
583 584 585 586 587 588 589 | 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | - + | elem = TkUndoPopStack(&stack->undoStack); if (elem == NULL) { return TCL_ERROR; } if (elem->type == TK_UNDO_SEPARATOR) { |
︙ | |||
645 646 647 648 649 650 651 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 | - + | elem = TkUndoPopStack(&stack->redoStack); if (elem == NULL) { return TCL_ERROR; } if (elem->type == TK_UNDO_SEPARATOR) { |
︙ | |||
697 698 699 700 701 702 703 | 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 | - + | TkUndoSubAtom *action) /* Head of linked list of action steps to * perform. */ { int result = TCL_OK; while (action != NULL) { if (action->funcPtr != NULL) { |
︙ |
Changes to generic/tkUndo.h.
︙ | |||
12 13 14 15 16 17 18 19 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + + - + | #ifndef _TKUNDO #define _TKUNDO #ifndef _TKINT #include "tkInt.h" #endif #ifdef BUILD_tk # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT #endif /* |
︙ | |||
92 93 94 95 96 97 98 | 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 | - + - - + + + | MODULE_SCOPE void TkUndoClearStack(TkUndoAtom **stack); /* * Functions for working on an undo/redo stack. */ MODULE_SCOPE TkUndoRedoStack *TkUndoInitStack(Tcl_Interp *interp, int maxdepth); |
Changes to generic/tkUtil.c.
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | #include "tkInt.h" /* * The structure below defines the implementation of the "statekey" Tcl * object, used for quickly finding a mapping in a TkStateMap. */ |
︙ | |||
44 45 46 47 48 49 50 | 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 | - + - + - - + + - + | *-------------------------------------------------------------- */ int TkStateParseProc( ClientData clientData, /* some flags.*/ Tcl_Interp *interp, /* Used for reporting errors. */ |
︙ | |||
80 81 82 83 84 85 86 | 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 | - - - - + + + + - - + + - - + + - + - - | return TCL_OK; } if ((c == 'h') && (flags&2) && (strncmp(value, "hidden", length) == 0)) { *statePtr = TK_STATE_HIDDEN; return TCL_OK; } |
︙ | |||
119 120 121 122 123 124 125 | 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 | - + - - + + - - + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
165 166 167 168 169 170 171 | 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 | - + - + - + + - + - + - - + + - - | * indicated in the value argument. * *-------------------------------------------------------------- */ int TkOrientParseProc( |
︙ | |||
221 222 223 224 225 226 227 | 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 | - + - - + + - - + + - + | * * Side effects: * None. * *-------------------------------------------------------------- */ |
︙ | |||
258 259 260 261 262 263 264 | 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 | - + - - + | int TkOffsetParseProc( ClientData clientData, /* not used */ Tcl_Interp *interp, /* Interpreter to send results back to */ Tk_Window tkwin, /* Window on same display as tile */ const char *value, /* Name of image */ char *widgRec, /* Widget structure record */ |
︙ | |||
337 338 339 340 341 342 343 | 333 334 335 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 416 417 418 419 420 | - - - - - - + - - + - + - + - + - + - + - + - - - + - - + + - + - + | case 'c': if (strncmp(value, "center", strlen(value)) != 0) { goto badTSOffset; } tsoffset.flags = TK_OFFSET_CENTER|TK_OFFSET_MIDDLE; goto goodTSOffset; } |
︙ | |||
448 449 450 451 452 453 454 | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | - + | return "sw"; } else if (offsetPtr->flags & TK_OFFSET_CENTER) { return "s"; } else if (offsetPtr->flags & TK_OFFSET_RIGHT) { return "se"; } } |
︙ | |||
470 471 472 473 474 475 476 | 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 | - + - + - - + - - + - - + + - + - + | * *---------------------------------------------------------------------- */ int TkPixelParseProc( ClientData clientData, /* If non-NULL, negative values are allowed as |
︙ | |||
648 649 650 651 652 653 654 | 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | - - - + + - - - - - + + - - + - - - + + - - - + + - - | * scroll, if any. */ { int c = argv[2][0]; size_t length = strlen(argv[2]); if ((c == 'm') && (strncmp(argv[2], "moveto", length) == 0)) { if (argc != 4) { |
︙ | |||
726 727 728 729 730 731 732 | 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 | - - + + + + - + - - - + - + - - - - + - - + - - + + - - - + + - | int objc, /* # arguments for command. */ Tcl_Obj *const objv[], /* Arguments for command. */ double *dblPtr, /* Filled in with argument "moveto" option, if * any. */ int *intPtr) /* Filled in with number of pages or lines to * scroll, if any. */ { |
︙ | |||
874 875 876 877 878 879 880 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 | - + - + | * * Side effects. * None. * *--------------------------------------------------------------------------- */ |
︙ | |||
933 934 935 936 937 938 939 | 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | - - - - + + - - + + + - - | /* * Not there. Generate an error message (if we can) and return the * default. */ if (interp != NULL) { |
︙ | |||
972 973 974 975 976 977 978 | 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 | - + - + - - - - - + + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | return PTR2INT(keyPtr->internalRep.twoPtrValue.ptr2); } /* * Not there. Look in the state map. */ |
Changes to generic/tkVisual.c.
︙ | |||
16 17 18 19 20 21 22 | 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 | - - + + - + - + - + - + | /* * The table below maps from symbolic names for visual classes to the * associated X class symbols. */ typedef struct VisualDictionary { |
︙ | |||
82 83 84 85 86 87 88 | 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 | - + - + - + - - + + | *---------------------------------------------------------------------- */ Visual * Tk_GetVisual( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which visual will be used. */ |
︙ | |||
133 134 135 136 137 138 139 | 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 | - + - - - - - - - + + + + + + + | * allocated here). */ *colormapPtr = Tk_Colormap(tkwin2); for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->colormap == *colormapPtr) { |
︙ | |||
169 170 171 172 173 174 175 | 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 | - - - + + + - + - - + + - - + + + - + - - - + + - - - + + - - + - - - - + + + + + - + - + - - + - + - + | int visualId; /* * This is a visual ID. */ if (Tcl_GetInt(interp, string, &visualId) == TCL_ERROR) { |
︙ | |||
281 282 283 284 285 286 287 | 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 329 330 331 332 333 334 | - + - + - - + - + | == DefaultVisualOfScreen(Tk_Screen(tkwin))) { prio++; } if (bestPtr == NULL) { goto newBest; } if (visInfoList[i].depth < bestPtr->depth) { |
︙ | |||
365 366 367 368 369 370 371 | 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 | - + - + | *---------------------------------------------------------------------- */ Colormap Tk_GetColormap( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window where colormap will be used. */ |
︙ | |||
401 402 403 404 405 406 407 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | - - + + - - - + + - - + | */ other = Tk_NameToWindow(interp, string, tkwin); if (other == NULL) { return None; } if (Tk_Screen(other) != Tk_Screen(tkwin)) { |
︙ | |||
471 472 473 474 475 476 477 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | + - + - + | dispPtr = TkGetDisplay(display); if (dispPtr == NULL) { Tcl_Panic("unknown display passed to Tk_FreeColormap"); } for (prevPtr = NULL, cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; prevPtr = cmapPtr, cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->colormap == colormap) { cmapPtr->refCount -= 1; |
︙ | |||
528 529 530 531 532 533 534 | 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | - + | dispPtr = TkGetDisplay(display); if (dispPtr == NULL) { Tcl_Panic("unknown display passed to Tk_PreserveColormap"); } for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->colormap == colormap) { |
Changes to generic/tkWindow.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - + + | * 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. */ #include "tkInt.h" |
︙ | |||
33 34 35 36 37 38 39 | 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 | - + + + + + + + | typedef struct TkHalfdeadWindow { int flags; struct TkWindow *winPtr; struct TkHalfdeadWindow *nextPtr; } TkHalfdeadWindow; |
︙ | |||
87 88 89 90 91 92 93 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | + - + - - - - + + - | /* * The following structure defines all of the commands supported by Tk, and * the C functions that execute them. */ #define ISSAFE 1 #define PASSMAINWINDOW 2 #define NOOBJPROC 4 |
︙ | |||
117 118 119 120 121 122 123 | 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 | - + - + - - + | {"font", Tk_FontObjCmd, PASSMAINWINDOW|ISSAFE}, {"grab", Tk_GrabObjCmd, PASSMAINWINDOW}, {"grid", Tk_GridObjCmd, PASSMAINWINDOW|ISSAFE}, {"image", Tk_ImageObjCmd, PASSMAINWINDOW|ISSAFE}, {"lower", Tk_LowerObjCmd, PASSMAINWINDOW|ISSAFE}, {"option", Tk_OptionObjCmd, PASSMAINWINDOW|ISSAFE}, {"pack", Tk_PackObjCmd, PASSMAINWINDOW|ISSAFE}, |
︙ | |||
166 167 168 169 170 171 172 | 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 | - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + | {"::tk::labelframe",Tk_LabelframeObjCmd, ISSAFE}, {"::tk::listbox", Tk_ListboxObjCmd, ISSAFE}, {"::tk::menubutton",Tk_MenubuttonObjCmd, ISSAFE}, {"::tk::message", Tk_MessageObjCmd, ISSAFE}, {"::tk::panedwindow",Tk_PanedWindowObjCmd, ISSAFE}, {"::tk::radiobutton",Tk_RadiobuttonObjCmd, ISSAFE}, {"::tk::scale", Tk_ScaleObjCmd, ISSAFE}, |
︙ | |||
247 248 249 250 251 252 253 | 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 | - - + - + | Tcl_DeleteHashTable(&dispPtr->nameTable); Tcl_DeleteHashTable(&dispPtr->atomTable); dispPtr->atomInit = 0; } if (dispPtr->errorPtr != NULL) { TkErrorHandler *errorPtr; |
︙ | |||
301 302 303 304 305 306 307 | 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 | - + - + - - + + - - - - + - | static Tk_Window CreateTopLevelWindow( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window parent, /* Token for logical parent of new window * (used for naming, options, etc.). May be * NULL. */ |
︙ | |||
377 378 379 380 381 382 383 | 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | - + | winPtr->flags |= TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED; if (parent != NULL) { if (NameWindow(interp, winPtr, (TkWindow *) parent, name) != TCL_OK) { Tk_DestroyWindow((Tk_Window) winPtr); |
︙ | |||
409 410 411 412 413 414 415 | 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 | - + - - + + - - - + + + | * *---------------------------------------------------------------------- */ static TkDisplay * GetScreen( Tcl_Interp *interp, /* Place to leave error message. */ |
︙ | |||
458 459 460 461 462 463 464 | 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 | - - - + + + - + - + + + + - - - + + + | /* * The private function zeros out dispPtr when it is created, so * we only need to initialize the non-zero items. */ dispPtr = TkpOpenDisplay(screenName); if (dispPtr == NULL) { |
︙ | |||
614 615 616 617 618 619 620 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 | - + + | TkAllocWindow( TkDisplay *dispPtr, /* Display associated with new window. */ int screenNum, /* Index of screen for new window. */ TkWindow *parentPtr) /* Parent from which this window should * inherit visual information. NULL means use * screen defaults instead of inheriting. */ { |
︙ | |||
648 649 650 651 652 653 654 | 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 | - + + - - | winPtr->atts.colormap = parentPtr->atts.colormap; } else { winPtr->atts.colormap = DefaultColormap(dispPtr->display, screenNum); } winPtr->dirtyAtts = CWEventMask|CWColormap|CWBitGravity; winPtr->flags = 0; winPtr->handlerList = NULL; |
︙ | |||
693 694 695 696 697 698 699 | 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 | - + - + | * *---------------------------------------------------------------------- */ static int NameWindow( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ |
︙ | |||
733 734 735 736 737 738 739 740 741 742 743 744 745 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 | + + + + + + - - - + + + - - - - - - - - + - + - - + + - - + | * now. */ if (winPtr->flags & TK_ANONYMOUS_WINDOW) { return TCL_OK; } /* * For non-anonymous windows, set up the window name. */ winPtr->nameUid = Tk_GetUid(name); /* * Don't permit names that start with an upper-case letter: this will just * cause confusion with class names in the option database. */ if (isupper(UCHAR(name[0]))) { |
︙ | |||
815 816 817 818 819 820 821 | 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 | - + - + - - - + + + - + - + | * *---------------------------------------------------------------------- */ Tk_Window TkCreateMainWindow( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ |
︙ | |||
889 890 891 892 893 894 895 | 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | - + - | Tcl_ResetResult(interp); } mainPtr->nextPtr = tsdPtr->mainWindowList; tsdPtr->mainWindowList = mainPtr; winPtr->mainPtr = mainPtr; hPtr = Tcl_CreateHashEntry(&mainPtr->nameTable, ".", &dummy); Tcl_SetHashValue(hPtr, winPtr); |
︙ | |||
914 915 916 917 918 919 920 | 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 | - - + - - + - - - + - - + - + - - + + + + - - + + + + + - + - - + + | */ isSafe = Tcl_IsSafe(interp); for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) { if (cmdPtr->objProc == NULL) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } |
︙ | |||
980 981 982 983 984 985 986 | 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 | - + - + + - - - - + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + - | Tk_Window Tk_CreateWindow( Tcl_Interp *interp, /* Interpreter to use for error reporting. * the interp's result is assumed to be * initialized by the caller. */ Tk_Window parent, /* Token for parent of new window. */ |
︙ | |||
1046 1047 1048 1049 1050 1051 1052 | 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 | - + + - - - - + + + - - - - - + + + + + - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - | Tk_Window Tk_CreateAnonymousWindow( Tcl_Interp *interp, /* Interpreter to use for error reporting. * the interp's result is assumed to be * initialized by the caller. */ Tk_Window parent, /* Token for parent of new window. */ |
︙ | |||
1115 1116 1117 1118 1119 1120 1121 | 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 | - + - + - + - + - - - + + - + - + - + - - + + - + - - - + + + - | Tk_Window Tk_CreateWindowFromPath( Tcl_Interp *interp, /* Interpreter to use for error reporting. * the interp's result is assumed to be * initialized by the caller. */ Tk_Window tkwin, /* Token for any window in application that is * to contain new window. */ |
︙ | |||
1255 1256 1257 1258 1259 1260 1261 | 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 | - + | */ if (tsdPtr->halfdeadWindowList && (tsdPtr->halfdeadWindowList->flags & HD_CLEANUP) && (tsdPtr->halfdeadWindowList->winPtr == winPtr)) { halfdeadPtr = tsdPtr->halfdeadWindowList; } else { |
︙ | |||
1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 | 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 | + - - + + | * Recursively destroy children. Note that this child window block may * need to be run multiple times in the case where a child window has a * Destroy binding that calls exit. */ if (!(halfdeadPtr->flags & HD_DESTROY_COUNT)) { halfdeadPtr->flags |= HD_DESTROY_COUNT; dispPtr->destroyCount++; } while (winPtr->childList != NULL) { |
︙ | |||
1348 1349 1350 1351 1352 1353 1354 | 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 | - - + + | * in-line here, for the same reasons we delete children in-line * (otherwise, for example, the Tk window may appear to exist even * though its X window is gone; this could cause errors). Special * note: it's possible that the embedded window has already been * deleted, in which case TkpGetOtherWindow will return NULL. */ |
︙ | |||
1399 1400 1401 1402 1403 1404 1405 | 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 | - + - + + + - + + + + - + - - - + + + - - - - - + + - - + + - + - - + + - - + + - + - - + - + | halfdeadPtr != NULL; ) { if (halfdeadPtr->winPtr == winPtr) { if (prev_halfdeadPtr == NULL) { tsdPtr->halfdeadWindowList = halfdeadPtr->nextPtr; } else { prev_halfdeadPtr->nextPtr = halfdeadPtr->nextPtr; } |
︙ | |||
1577 1578 1579 1580 1581 1582 1583 | 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 | - + - + | /* * Found and spliced it out, now actually do the cleanup. */ TkCloseDisplay(dispPtr); } |
︙ | |||
1638 1639 1640 1641 1642 1643 1644 | 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 | - + | event.type = MapNotify; event.xmap.serial = LastKnownRequestProcessed(winPtr->display); event.xmap.send_event = False; event.xmap.display = winPtr->display; event.xmap.event = winPtr->window; event.xmap.window = winPtr->window; event.xmap.override_redirect = winPtr->atts.override_redirect; |
︙ | |||
1665 1666 1667 1668 1669 1670 1671 | 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 | - + | *-------------------------------------------------------------- */ void Tk_MakeWindowExist( Tk_Window tkwin) /* Token for window. */ { |
︙ | |||
1687 1688 1689 1690 1691 1692 1693 | 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 | - + | Tk_MakeWindowExist((Tk_Window) winPtr->parentPtr); } parent = winPtr->parentPtr->window; } createProc = Tk_GetClassProc(winPtr->classProcsPtr, createProc); if (createProc != NULL && parent != None) { |
︙ | |||
1715 1716 1717 1718 1719 1720 1721 | 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 | - | */ for (winPtr2 = winPtr->nextPtr; winPtr2 != NULL; winPtr2 = winPtr2->nextPtr) { if ((winPtr2->window != None) && !(winPtr2->flags & (TK_TOP_HIERARCHY|TK_REPARENTED))) { XWindowChanges changes; |
︙ | |||
1774 1775 1776 1777 1778 1779 1780 | 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 | - + | *-------------------------------------------------------------- */ void Tk_UnmapWindow( Tk_Window tkwin) /* Token for window to unmap. */ { |
︙ | |||
1800 1801 1802 1803 1804 1805 1806 | 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 | - + - + - + - + - + - + - + - + - + | event.type = UnmapNotify; event.xunmap.serial = LastKnownRequestProcessed(winPtr->display); event.xunmap.send_event = False; event.xunmap.display = winPtr->display; event.xunmap.event = winPtr->window; event.xunmap.window = winPtr->window; event.xunmap.from_configure = False; |
︙ | |||
1990 1991 1992 1993 1994 1995 1996 | 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 | - + - + - + - + - + + + + + - + | void Tk_SetWindowBackground( Tk_Window tkwin, /* Window to manipulate. */ unsigned long pixel) /* Pixel value to use for window's * background. */ { |
︙ | |||
2125 2126 2127 2128 2129 2130 2131 | 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 | - + | int Tk_SetWindowVisual( Tk_Window tkwin, /* Window to manipulate. */ Visual *visual, /* New visual for window. */ int depth, /* New depth for window. */ Colormap colormap) /* An appropriate colormap for the visual. */ { |
︙ | |||
2168 2169 2170 2171 2172 2173 2174 | 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 | - + | * An event is generated and processed by Tk_HandleEvent. * *---------------------------------------------------------------------- */ void TkDoConfigureNotify( |
︙ | |||
2212 2213 2214 2215 2216 2217 2218 | 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 | - + - + | * *---------------------------------------------------------------------- */ void Tk_SetClass( Tk_Window tkwin, /* Token for window to assign class. */ |
︙ | |||
2244 2245 2246 2247 2248 2249 2250 | 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 | - + - + | * *---------------------------------------------------------------------- */ void Tk_SetClassProcs( Tk_Window tkwin, /* Token for window to modify. */ |
︙ | |||
2276 2277 2278 2279 2280 2281 2282 | 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 | - + - + - - - + - - + - + | * *---------------------------------------------------------------------- */ Tk_Window Tk_NameToWindow( Tcl_Interp *interp, /* Where to report errors. */ |
︙ | |||
2344 2345 2346 2347 2348 2349 2350 | 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 | - - - + - - + - + - + | if (dispPtr == NULL) { return NULL; } if (dispPtr->display == display) { break; } } |
︙ | |||
2399 2400 2401 2402 2403 2404 2405 | 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 | - - + + | *---------------------------------------------------------------------- */ Tcl_Interp * Tk_Interp( Tk_Window tkwin) { |
︙ | |||
2558 2559 2560 2561 2562 2563 2564 | 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 | - + + | * Notify the X server of the change. If winPtr hasn't yet been created * then there's no need to tell the X server now, since the stacking order * will be handled properly when the window is finally created. */ if (winPtr->window != None) { XWindowChanges changes; |
︙ | |||
2610 2611 2612 2613 2614 2615 2616 | 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 | - + + - - + - | return NULL; } #ifdef USE_TCL_STUBS if (tclStubsPtr == NULL) { return NULL; } #endif |
︙ | |||
2680 2681 2682 2683 2684 2685 2686 | 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 | - + + - + - + | #ifdef USE_TCL_STUBS if (tclStubsPtr == NULL) { return 0; } #endif |
︙ | |||
2738 2739 2740 2741 2742 2743 2744 | 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 | - + - + - + - + - + - - - - - - - - - - - - | static void DeleteWindowsExitProc( ClientData clientData) /* tsdPtr when handler was created. */ { TkDisplay *dispPtr, *nextPtr; Tcl_Interp *interp; |
︙ | |||
2813 2814 2815 2816 2817 2818 2819 | 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 | - + - - - + + + - - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + - + - | } tsdPtr->numMainWindows = 0; tsdPtr->mainWindowList = NULL; tsdPtr->initialized = 0; } |
︙ | |||
2888 2889 2890 2891 2892 2893 2894 | 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 | - + - + - - - + + + - + | *---------------------------------------------------------------------- */ int Tk_Init( Tcl_Interp *interp) /* Interpreter to initialize. */ { |
︙ | |||
2955 2956 2957 2958 2959 2960 2961 | 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 | - + - + - + - - - - + + + - + - + - - + - - - - - - - - - - - - - - - - - - - + + + + - - - + - - - + - - + - - - - - - - - - - - - - - - - - - + - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + + + - + - + - - - - + + + + - - - + + + + + + - + - + + - + - + - - - + + - - + + - - + - - + + + + - + + + + + + - + - + - + - + - - - - - + - - - + - - + + + + - - + + + + + - - + + - - + - - - - - - - - - - - + + + - - + - - - - - + + + + + + + - - - - - + + - - - + - - - + + - - - - - - - - - + + + + + + + + + - + - - - - - + + + + + - - - - + + + + + - - - - + + + + + - - + + - - + - - + + - - + + - - + - - - - - - + | * - Wm is unsafe because (if toplevels are allowed, in the future) it can * be used to remove decorations, move windows around, cover the entire * screen etc etc. * * Current risks: * * - No CPU time limit, no memory allocation limits, no color limits. |
︙ | |||
3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 | 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 | + + + + + + + + + + - + - + - + + + - - - + + + | * loop function in Tcl to our main loop proc. This will cause tclsh to be * event-aware when Tk is dynamically loaded. This will have no effect in * wish, which already is prepared to run the event loop. */ Tcl_SetMainLoop(Tk_MainLoop); #if !defined(_WIN32) && !defined(STATIC_BUILD) /* On Windows, this has no added value. */ # undef Tk_InitStubs Tk_InitStubs(interp, TK_VERSION, 1); #endif /* * Initialized the themed widget set */ code = Ttk_Init(interp); if (code != TCL_OK) { goto done; } /* * Invoke platform-specific initialization. Unlock mutex before entering * TkpInit, as that may run through the Tk_Init routine again for the * console window interpreter. */ Tcl_MutexUnlock(&windowMutex); if (argv != NULL) { ckfree((char *) argv); } code = TkpInit(interp); if (code == TCL_OK) { /* * In order to find tk.tcl during initialization, we evaluate the * following script. It calls on the Tcl command [tcl_findLibrary] * to perform the search. See the docs for that command for details * on where it looks. * * Note that this entire search mechanism can be bypassed by defining * an alternate [tkInit] command before calling Tk_Init(). */ |
︙ | |||
3371 3372 3373 3374 3375 3376 3377 | 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 | - + - + - + - + - + - + - | * * Side effects: * None. * *---------------------------------------------------------------------- */ |
Changes to generic/ttk/ttk.decls.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - + | Tcl_Interp *interp, void *deleteData, Ttk_CleanupProc *cleanupProc) } declare 5 { int Ttk_RegisterElementSpec( Ttk_Theme theme, const char *elementName, |
︙ | |||
68 69 70 71 72 73 74 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + | } declare 13 { Tcl_Obj *Ttk_StateMapLookup( Tcl_Interp *interp, Ttk_StateMap map, Ttk_State state) } declare 14 { int Ttk_StateTableLookup( |
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 | - + | declare 35 { Tcl_Obj *Ttk_NewBoxObj(Ttk_Box box) } # # Utilities. # |
Changes to generic/ttk/ttkBlink.c.
︙ | |||
10 11 12 13 14 15 16 | 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 | - + - + - - - + - + - + - + | * to display the cursor or not (e.g., readonly or disabled states); * TtkBlinkCursor() does not account for this. * * TODO: * Add script-level access to configure application-wide blink rate. */ |
︙ |
Changes to generic/ttk/ttkButton.c.
1 2 3 4 5 6 | 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 | + - + - | /* * Copyright (c) 2003, Joe English * * label, button, checkbutton, radiobutton, and menubutton widgets. */ #include <string.h> |
︙ | |||
50 51 52 53 54 55 56 | 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 | - + - - - - + - + - + - + - + - + - - + - + - + - + - + - + - - - + - - - - - - - - + | typedef struct { WidgetCore core; BasePart base; } Base; |
︙ | |||
199 200 201 202 203 204 205 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | - + - + - - | TtkCheckStateOption(&basePtr->core, basePtr->base.stateObj); } return TCL_OK; } static int |
︙ | |||
237 238 239 240 241 242 243 | 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 | - + - + - + - + - + - + - + - + - + - + | typedef struct { WidgetCore core; BasePart base; LabelPart label; } Label; |
︙ | |||
320 321 322 323 324 325 326 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 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 | - + - + - - + + - + - + - + - + | BasePart base; ButtonPart button; } Button; /* * Option specifications: */ |
︙ | |||
430 431 432 433 434 435 436 | 415 416 417 418 419 420 421 422 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 | - + - + - + - + - + - + | BasePart base; CheckbuttonPart checkbutton; } Checkbutton; /* * Option specifications: */ |
︙ | |||
476 477 478 479 480 481 482 | 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 | - + - + - + - - - + + - - - - - + + + + - - - + - - + - + - - - - - - - + + + + - + | TtkWidgetChangeState(&checkPtr->core, 0, TTK_STATE_SELECTED); } } static void CheckbuttonInitialize(Tcl_Interp *interp, void *recordPtr) { |
︙ | |||
638 639 640 641 642 643 644 | 615 616 617 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 644 645 646 647 648 649 650 651 | - + - + - + - + - + | BasePart base; RadiobuttonPart radiobutton; } Radiobutton; /* * Option specifications: */ |
︙ | |||
682 683 684 685 686 687 688 | 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | - + - + | TtkWidgetChangeState(&radioPtr->core, 0, TTK_STATE_SELECTED); } } static void RadiobuttonCleanup(void *recordPtr) { |
︙ | |||
714 715 716 717 718 719 720 | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 | - + - + | return TCL_OK; } static int RadiobuttonPostConfigure(Tcl_Interp *interp, void *recordPtr, int mask) { |
︙ | |||
767 768 769 770 771 772 773 | 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | - + | { "instate", TtkWidgetInstateCommand,0 }, { "state", TtkWidgetStateCommand,0 }, { "identify", TtkWidgetIdentifyCommand,0 }, /* MISSING: select, deselect */ { 0,0,0 } }; |
︙ | |||
813 814 815 816 817 818 819 | 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 | - + - + - - + + - + - + | /* * Option specifications: */ static const char *const directionStrings[] = { "above", "below", "left", "right", "flush", NULL }; |
︙ |
Changes to generic/ttk/ttkCache.c.
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + - + | * @@@ BUGS/TODO: Need distinct caches for each combination * of display, visual, and colormap. * * @@@ Colormap flashing on PseudoColor visuals is still possible, * but this will be a transient effect. */ #include <stdio.h> /* for sprintf */ |
︙ | |||
71 72 73 74 75 76 77 | 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 | - + - + - + - + | Tcl_HashEntry *entryPtr; /* * Free fonts: */ entryPtr = Tcl_FirstHashEntry(&cache->fontTable, &search); while (entryPtr != NULL) { |
︙ | |||
149 150 151 152 153 154 155 | 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 | - + - + - + | Tcl_DeleteHashTable(&cache->imageTable); /* * Free named colors: */ entryPtr = Tcl_FirstHashEntry(&cache->namedColors, &search); while (entryPtr != NULL) { |
︙ | |||
212 213 214 215 216 217 218 | 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 | - + - + | sprintf(nameBuf, "#%04X%04X%04X", colorPtr->red, colorPtr->green, colorPtr->blue); colorNameObj = Tcl_NewStringObj(nameBuf, -1); Tcl_IncrRefCount(colorNameObj); entryPtr = Tcl_CreateHashEntry(&cache->namedColors, colorName, &newEntry); if (!newEntry) { |
︙ | |||
253 254 255 256 257 258 259 | 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 | - + - + | { int newEntry; Tcl_HashEntry *entryPtr = Tcl_CreateHashEntry(table,Tcl_GetString(objPtr),&newEntry); Tcl_Obj *cacheObj; if (!newEntry) { |
︙ | |||
310 311 312 313 314 315 316 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | - + - + - - - - - - - - - + - + | &cache->borderTable,(Allocator)Tk_Alloc3DBorderFromObj, tkwin, objPtr); } /* NullImageChanged -- * Tk_ImageChangedProc for Ttk_UseImage */ |
Changes to generic/ttk/ttkClamTheme.c.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - - + + - + | /* * Copyright (C) 2004 Joe English * * "clam" theme; inspired by the XFCE family of Gnome themes. */ |
︙ | |||
102 103 104 105 106 107 108 | 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 | - + - + - + - + - + - - + + - - + + - + - - - - - + - + - - | Tcl_Obj *borderColorObj; Tcl_Obj *lightColorObj; Tcl_Obj *darkColorObj; Tcl_Obj *reliefObj; Tcl_Obj *borderWidthObj; /* See <<NOTE-BORDERWIDTH>> */ } BorderElement; |
︙ | |||
179 180 181 182 183 184 185 | 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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | - + - + - + - + - + - - + + - + - - - - - - - + - + - - - + - + - + - + - + - + - + - + - + - - + + - + - + - - - - + - + - - + - + - - | outer = upper = lower = border->borderColorObj; break; } DrawSmoothBorder(tkwin, d, b, outer, upper, lower); } |
︙ | |||
391 392 393 394 395 396 397 | 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 416 417 418 419 420 421 422 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 | - + - + - + - + - + - + - + - + - + - - - - + - + - - - + + + + + - + - + - + - - + + - - + + - - - + - - + + - - + - + | s-=w, q-=w; XDrawLine(display, d, gcf, p, s, r, q); XDrawLine(display, d, gcf, p+1, s, r, q+1); XDrawLine(display, d, gcf, p, s-1, r-1, q); } } |
︙ | |||
574 575 576 577 578 579 580 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | - + - + - + - + - + - + - + - + - + - + - - + + - + - + - - - - + - + - + - - - - - + - - + + - - - - + - + - + - + - - + + - - - - + - + | Tcl_Obj *darkColorObj; Tcl_Obj *arrowColorObj; Tcl_Obj *arrowSizeObj; Tcl_Obj *gripCountObj; Tcl_Obj *sliderlengthObj; } ScrollbarElement; |
︙ | |||
739 740 741 742 743 744 745 | 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | - + - + - - - + - + - + + + - + - + - - - - - - + + - - + - + - + - - + + - + - + - + - + - - + + - + - - - - - - - + - + - | widthPtr, heightPtr, paddingPtr); *paddingPtr = Ttk_UniformPadding(2); *widthPtr += 4; *heightPtr += 4; } static void PbarElementDraw( |
︙ | |||
895 896 897 898 899 900 901 | 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 | - + - + - - - - - - - + - + - - - + - + | XDrawLine(display,d,gc, x1+1,y1, x2-1+w,y1); gc=Ttk_GCForColor(tkwin,tab->lightColorObj,d); XDrawLine(display,d,gc, x1+1,y1+1, x1+1,y2-1+dh+w); XDrawLine(display,d,gc, x1+1,y1+1, x2-1+w,y1+1); } |
︙ | |||
989 990 991 992 993 994 995 | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 | - + - + - + - + - + - + | Ttk_RegisterElement(interp, theme, "Combobox.field", &ComboboxFieldElementSpec, NULL); Ttk_RegisterElement(interp, theme, "trough", &TroughElementSpec, NULL); Ttk_RegisterElement(interp, theme, "thumb", &ThumbElementSpec, NULL); Ttk_RegisterElement(interp, |
Changes to generic/ttk/ttkClassicTheme.c.
1 2 3 4 5 6 7 | 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 | - + + + - + - + - - + + - + - + - - - - - + - + - - - - + - + - + - - - - - - - - - + + + + + + + + + - + - - + + - - - - - + - + - + - + - - | /* * Copyright (c) 2004, Joe English * * "classic" theme; implements the classic Motif-like Tk look. * */ |
︙ | |||
179 180 181 182 183 184 185 | 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 | - + + - + - + - + - + - - + + - + - + - - - - + + - | if (border && borderWidth > 0) { Tk_Draw3DRectangle(tkwin, d, border, b.x+inset, b.y+inset, b.width - 2*inset, b.height - 2*inset, borderWidth,relief); } } |
︙ | |||
277 278 279 280 281 282 283 | 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 329 330 331 332 333 334 335 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 | - + - + - + + + + + - - - - - + + + + + - - - + + + - + - - + + - + - + - - - + - + - + - - + - + - + - + - + - + | points[2].x = b.x; points[2].y = b.y + size; break; } Tk_Fill3DPolygon(tkwin, d, border, points, 3, borderWidth, relief); } |
︙ | |||
449 450 451 452 453 454 455 | 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | - + | TTK_NODE("Radiobutton.indicator", TTK_PACK_LEFT) TTK_NODE("Radiobutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH))))) TTK_LAYOUT("TMenubutton", TTK_GROUP("Menubutton.highlight", TTK_FILL_BOTH, TTK_GROUP("Menubutton.border", TTK_FILL_BOTH, TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT) |
︙ | |||
493 494 495 496 497 498 499 | 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 | - + - + - + - + - + - - + + - + | Ttk_RegisterElement(interp, theme, "highlight", &HighlightElementSpec, NULL); Ttk_RegisterElement(interp, theme, "Button.border", &ButtonBorderElementSpec, NULL); Ttk_RegisterElement(interp, theme, "uparrow", |
Changes to generic/ttk/ttkDecls.h.
︙ | |||
9 10 11 12 13 14 15 | 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 | - + - - - - - - - - - - + - + - + - - - + + + - - - + + + - + - + - + - + | extern const char *TtkInitializeStubs( Tcl_Interp *, const char *version, int epoch, int revision); #define Ttk_InitStubs(interp) TtkInitializeStubs( \ interp, TTK_VERSION, TTK_STUBS_EPOCH, TTK_STUBS_REVISION) #else |
︙ | |||
135 136 137 138 139 140 141 | 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 | - - + - + - + - - - - - - + + + + + + - + | /* 35 */ TTKAPI Tcl_Obj * Ttk_NewBoxObj(Ttk_Box box); /* Slot 36 is reserved */ /* Slot 37 is reserved */ /* Slot 38 is reserved */ /* Slot 39 is reserved */ /* 40 */ |
︙ | |||
185 186 187 188 189 190 191 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + | Ttk_Box (*ttk_ExpandBox) (Ttk_Box b, Ttk_Padding p); /* 33 */ Ttk_Box (*ttk_PlaceBox) (Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky); /* 34 */ Tcl_Obj * (*ttk_NewBoxObj) (Ttk_Box box); /* 35 */ void (*reserved36)(void); void (*reserved37)(void); void (*reserved38)(void); void (*reserved39)(void); |
︙ |
Changes to generic/ttk/ttkDefaultTheme.c.
1 2 3 4 5 6 | 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) 2003, Joe English * * Tk alternate theme, intended to match the MSUE and Gtk's (old) default theme */ |
︙ | |||
112 113 114 115 116 117 118 119 120 121 122 123 124 | 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 | + + - + - + - + - + - + - + | break; } } /* Alternate shadow colors for entry fields: * NOTE: FLAT color is normally white, and the LITE color is a darker shade. */ static int fieldShadowColors[4] = { DARK, BRDR, LITE, FLAT }; static void DrawFieldBorder( Tk_Window tkwin, Drawable d, Tk_3DBorder border, XColor *borderColor, Ttk_Box b) { GC borderGC = Tk_GCForColor(borderColor, d); DrawCorner(tkwin, d, border, borderGC, |
︙ | |||
180 181 182 183 184 185 186 | 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 | - + - + - + - + - - - - + - + - - - | } points[3].x = points[0].x; points[3].y = points[0].y; } /*public*/ |
︙ | |||
238 239 240 241 242 243 244 | 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 | - - + + - - + + - + - + - + - + - + - + - - - - - + - + - + - - | Tcl_Obj *borderObj; Tcl_Obj *borderColorObj; /* Extra border color */ Tcl_Obj *borderWidthObj; Tcl_Obj *reliefObj; Tcl_Obj *defaultStateObj; /* for buttons */ } BorderElement; |
︙ | |||
307 308 309 310 311 312 313 | 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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | - + - - + + - + - + - + - - - - - - - + - + - - - + | /* Space for default ring: */ b = Ttk_PadBox(b, Ttk_UniformPadding(1)); } DrawBorder(tkwin, d, border, borderColor, b, borderWidth, relief); } |
︙ | |||
383 384 385 386 387 388 389 | 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 | - + - + | * Indicator bitmap descriptor: */ typedef struct { int width; /* Width of each image */ int height; /* Height of each image */ int nimages; /* #images / row */ const char *const *pixels; /* array[height] of char[width*nimage] */ |
︙ | |||
433 434 435 436 437 438 439 | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | - + | static IndicatorSpec checkbutton_spec = { 13, 13, 4, /* width, height, nimages */ checkbutton_pixels, checkbutton_states }; |
︙ | |||
473 474 475 476 477 478 479 | 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 | - + - + - + - + - + - + - + - - + + - - + + - - - - + + - + | Tcl_Obj *colorObj; Tcl_Obj *lightColorObj; Tcl_Obj *shadeColorObj; Tcl_Obj *borderColorObj; Tcl_Obj *marginObj; } IndicatorElement; |
︙ | |||
559 560 561 562 563 564 565 | 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - + + + - - - - - - - - - - - - + - - + - + - - - - - - - - - - - - - - + + - + - + - + - + - + - - + + - + - - + + - - - + + - - + - + - + - + - + - - + + - + - + - + - - - - + - + - - - - + + - + | imgColors[5 /*F*/] = frameColor->pixel; imgColors[6 /*G*/] = fgColor->pixel; imgColors[7 /*H*/] = fgColor->pixel; /* * Create a scratch buffer to store the image: */ |
︙ | |||
836 837 838 839 840 841 842 | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | - + - + - + - + - + - - + + - + - + - - - - + - + - + - - - - + - + | Tcl_Obj *colorObj; Tcl_Obj *borderWidthObj; Tcl_Obj *reliefObj; Tcl_Obj *grooveWidthObj; Tcl_Obj *orientObj; } TroughElement; |
︙ | |||
922 923 924 925 926 927 928 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 | - - + + - + - + - - - + + + - + - - + + - - - - - + - + - + - - - + | Tcl_Obj *lastObj; Tcl_Obj *borderObj; Tcl_Obj *borderColorObj; Tcl_Obj *reliefObj; Tcl_Obj *orientObj; } ThumbElement; |
︙ | |||
1011 1012 1013 1014 1015 1016 1017 | 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 | - - + + - + - + - + - + - + - + - + - + - + - - + - - - + - + - + - - - + - + - + - + - - + + - + - + - - - + - + - | Tcl_Obj *reliefObj; /* Relief for this object */ Tcl_Obj *borderObj; /* Border / background color */ Tcl_Obj *borderColorObj; /* Additional border color */ Tcl_Obj *borderWidthObj; Tcl_Obj *orientObj; /* Orientation of overall slider */ } SliderElement; |
︙ | |||
1157 1158 1159 1160 1161 1162 1163 | 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | - + | if (!(state & TTK_STATE_OPEN)) { /* turn '-' into a '+' */ XDrawLine(Tk_Display(tkwin), d, gc, cx, b.y+2, cx, b.y+b.height-3+w); } } |
︙ | |||
1193 1194 1195 1196 1197 1198 1199 | 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 | - + - + - + - + - + + + + | Ttk_RegisterElement(interp, theme, "field", &FieldElementSpec, NULL); Ttk_RegisterElement(interp, theme, "trough", &TroughElementSpec, NULL); Ttk_RegisterElement(interp, theme, "thumb", &ThumbElementSpec, NULL); Ttk_RegisterElement(interp, theme, "slider", &SliderElementSpec, NULL); Ttk_RegisterElement(interp, theme, "uparrow", |
Changes to generic/ttk/ttkElements.c.
1 2 3 4 5 6 7 | 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 | + - + + - + - + - - - - - - - + - - - - - - | /* * Copyright (c) 2003, Joe English * * Default implementation for themed elements. * */ #include <tcl.h> |
︙ | |||
64 65 66 67 68 69 70 | 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 | - + - - + + - + - + - - - - - + - + - + - + - + - - + + - + - + - - - - - - + - + - - - + - + - + - - + + - + - + - - - - - + - + - - - + | * Ttk_GetLayout() automatically includes a background element. */ typedef struct { Tcl_Obj *backgroundObj; } BackgroundElement; |
︙ | |||
245 246 247 248 249 250 251 | 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 | - + - + - + - - + + - + - + - - - - + | typedef struct { Tcl_Obj *paddingObj; Tcl_Obj *reliefObj; Tcl_Obj *shiftreliefObj; } PaddingElement; |
︙ | |||
314 315 316 317 318 319 320 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - + - + - - + + - + - + - - - - - + - + - - + - + - + - - + + - + - - - - - - + - + - - - + - + - - - - + + - - + - + - + - + - + - - + + - + - - - - - - + - + - - - + | mask = GCForeground | GCLineStyle | GCDashList | GCDashOffset | GCLineWidth; gc = Tk_GetGC(tkwin, mask, &gcvalues); XDrawRectangle(Tk_Display(tkwin), d, gc, b.x, b.y, b.width-1, b.height-1); Tk_FreeGC(Tk_Display(tkwin), gc); } |
︙ | |||
541 542 543 544 545 546 547 | 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 | - + - + - + - + - + - + - - + + - + - + - - - - + - + - - - + - + - - - - + - + - - | Tcl_Obj *reliefObj; Tcl_Obj *colorObj; Tcl_Obj *diameterObj; Tcl_Obj *marginObj; Tcl_Obj *borderWidthObj; } IndicatorElement; |
︙ | |||
661 662 663 664 665 666 667 | 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | - + - + | points[3].x = b.x + radius; points[3].y = b.y; Tk_Fill3DPolygon(tkwin,d,interior,points,4,borderWidth,TK_RELIEF_FLAT); Tk_Draw3DPolygon(tkwin,d,border,points,4,borderWidth,relief); } |
︙ | |||
697 698 699 700 701 702 703 | 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 | - + - + - + - + - + - + - - + + - + - + - - - - + - + - - - + + - + - + - + - + - + - - + + - + - - + + - - - + + - - - + + - + - + - + - + - + - - + + - + - + - - - - + - + - - - + | Tcl_Obj *widthObj; Tcl_Obj *heightObj; Tcl_Obj *borderWidthObj; Tcl_Obj *reliefObj; Tcl_Obj *marginObj; } MenuIndicatorElement; |
︙ | |||
908 909 910 911 912 913 914 | 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 | - + - + - + - + - + - - + + - + - + - - + - - - + - + - + - - - + | Tcl_Obj *orientObj; Tcl_Obj *thicknessObj; Tcl_Obj *reliefObj; Tcl_Obj *borderObj; Tcl_Obj *borderWidthObj; } ThumbElement; |
︙ | |||
984 985 986 987 988 989 990 | 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 | - - + + - + - + - + - + - + - + - + - + - - + - - - + - + - + - + - - - - + | Tcl_Obj *lengthObj; /* slider length */ Tcl_Obj *thicknessObj; /* slider thickness */ Tcl_Obj *reliefObj; /* the relief for this object */ Tcl_Obj *borderObj; /* the background color */ Tcl_Obj *borderWidthObj; /* the size of the border */ } SliderElement; |
︙ | |||
1072 1073 1074 1075 1076 1077 1078 | 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 | - + | Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC), b.x+borderWidth, b.y, b.x+b.width-borderWidth, b.y); } } } } |
︙ | |||
1101 1102 1103 1104 1105 1106 1107 | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 | - - + + - + - + - + - + - + - + - + - + - - + - - - + - + - + - - - + - + - + - - + + - + - + - - - - - + - + - | Tcl_Obj *thicknessObj; /* the height/width of the bar */ Tcl_Obj *lengthObj; /* default width/height of the bar */ Tcl_Obj *reliefObj; /* border relief for this object */ Tcl_Obj *borderObj; /* background color */ Tcl_Obj *borderWidthObj; /* thickness of the border */ } PbarElement; |
︙ | |||
1235 1236 1237 1238 1239 1240 1241 | 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 | - + - + - + - + - - - + - + - - - - - + | pts[n].x = b.x + b.width-1; pts[n].y = b.y + cut; ++n; pts[n].x = b.x + b.width-1; pts[n].y = b.y + b.height; ++n; XFillPolygon(Tk_Display(tkwin), d, Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC), pts, 6, Convex, CoordModeOrigin); |
︙ | |||
1341 1342 1343 1344 1345 1346 1347 | 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 | - + - + - + - + - + | &RadiobuttonIndicatorElementSpec, NULL); Ttk_RegisterElement(interp, theme, "Menubutton.indicator", &MenuIndicatorElementSpec, NULL); Ttk_RegisterElement(interp, theme, "indicator", &ttkNullElementSpec,NULL); Ttk_RegisterElement(interp, theme, "uparrow", |
︙ | |||
1371 1372 1373 1374 1375 1376 1377 | 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 | - + | Ttk_RegisterElement(interp, theme, "tab", &TabElementSpec, NULL); Ttk_RegisterElement(interp, theme, "client", &ClientElementSpec, NULL); /* * Register "default" as a user-loadable theme (for now): */ |
Changes to generic/ttk/ttkEntry.c.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + + + + + | /* * DERIVED FROM: tk/generic/tkEntry.c r1.35. * * Copyright (c) 1990-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 2000 Ajuba Solutions. * Copyright (c) 2002 ActiveState Corporation. * Copyright (c) 2004 Joe English */ |
︙ | |||
65 66 67 68 69 70 71 | 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 | - - - + + - - - + + + | * displayString points to string if showChar == NULL, * or to malloc'ed storage if showChar != NULL. */ /* Style parameters: */ typedef struct { |
︙ | |||
111 112 113 114 115 116 117 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - - | Tk_Justify justify; /* Text justification */ EntryStyleData styleData; /* Display style data (widget options) */ EntryStyleData styleDefaults;/* Style defaults (fallback values) */ Tcl_Obj *stateObj; /* Compatibility option -- see CheckStateObj */ |
︙ | |||
142 143 144 145 146 147 148 | 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 | - - + + - - - - - + + + + - + - + - + - + - + - - - - + - + - + - - + + - + - + - + - - - - + - + - - + - - | #define STATE_CHANGED (0x100) /* -state option changed */ #define TEXTVAR_CHANGED (0x200) /* -textvariable option changed */ #define SCROLLCMD_CHANGED (0x400) /* -xscrollcommand option changed */ /* * Default option values: */ |
︙ | |||
258 259 260 261 262 263 264 | 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 329 330 331 332 333 334 335 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 416 417 418 419 420 421 422 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 | - - - - + + - - - + + + - - + - - - - + - - - - - - - - - + - + - - + + - + - - + - - - + + + - + - + - + - - + - - - + + + - + - + - + - + - - - + + + - - - + + + - + - + - + - + | /* Initialize to fallback values: */ *es = entryPtr->entry.styleDefaults; # define INIT(member, name) \ if ((tmp=Ttk_QueryOption(entryPtr->core.layout,name,state))) \ es->member=tmp; |
︙ | |||
524 525 526 527 528 529 530 | 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 | - + - - - + + + - + | * Build and evaluate an entry validation script. * If the script raises an error, disable validation * by setting '-validate none' */ static int RunValidationScript( Tcl_Interp *interp, /* Interpreter to use */ Entry *entryPtr, /* Entry being validated */ |
︙ | |||
579 580 581 582 583 584 585 | 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 | - + - - + + - + - + | /* EntryValidateChange -- * Validate a proposed change to the entry widget's value if required. * Call the -invalidcommand if validation fails. * * Returns: * TCL_OK if the change is accepted * TCL_BREAK if the change is rejected |
︙ | |||
652 653 654 655 656 657 658 | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | - + - - - - - - + + - | /* EntryRevalidate -- * Revalidate the current value of an entry widget, * update the TTK_STATE_INVALID bit. * * Returns: * TCL_OK if valid, TCL_BREAK if invalid, TCL_ERROR on error. */ |
︙ | |||
716 717 718 719 720 721 722 | 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 | - - + + - + - + | int g = nChars > 0; /* left gravity adjustment */ e->insertPos = AdjustIndex(e->insertPos, index, nChars); e->selectFirst = AdjustIndex(e->selectFirst, index, nChars); e->selectLast = AdjustIndex(e->selectLast, index+g, nChars); e->xscroll.first= AdjustIndex(e->xscroll.first, index+g, nChars); |
︙ | |||
784 785 786 787 788 789 790 | 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 | - - + + - + - + - + - + - - - - + + + + - + - + - + - - + + - + - + - + - + - - - + + + - + - + - + - + | EntryStoreValue(entryPtr, value); if (entryPtr->entry.textVariableObj) { const char *textVarName = Tcl_GetString(entryPtr->entry.textVariableObj); if (textVarName && *textVarName) { entryPtr->core.flags |= SYNCING_VARIABLE; |
︙ | |||
946 947 948 949 950 951 952 | 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 | - + - + - - + - + - - + + - + | } /*------------------------------------------------------------------------ * +++ Initialization and cleanup. */ static void |
︙ | |||
998 999 1000 1001 1002 1003 1004 | 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 | - + - + | } /* EntryConfigure -- * Configure hook for Entry widgets. */ static int EntryConfigure(Tcl_Interp *interp, void *recordPtr, int mask) { |
︙ | |||
1025 1026 1027 1028 1029 1030 1031 | 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 | - + - | if (entryPtr->entry.textVariableTrace) Ttk_UntraceVariable(entryPtr->entry.textVariableTrace); entryPtr->entry.textVariableTrace = vt; } /* Claim the selection, in case we've suddenly started exporting it. */ |
︙ | |||
1062 1063 1064 1065 1066 1067 1068 | 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | - + - + - - + - + | EntryUpdateTextLayout(entryPtr); return TCL_OK; } /* EntryPostConfigure -- * Post-configuration hook for entry widgets. */ |
︙ | |||
1191 1192 1193 1194 1195 1196 1197 | 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 | - + - + - - + - - + + - - - - + + + + + - + - + | } /* EntryDisplay -- * Redraws the contents of an entry window. */ static void EntryDisplay(void *clientData, Drawable d) { |
︙ | |||
1269 1270 1271 1272 1273 1274 1275 | 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 | - - - - - - - - - + - + + - - - - - - - - - - - - - - - + - - - - - - - - - + + + + - - - - - - - - - + + - - + + + - - - - - - - - - - | #ifdef HAVE_XFT TkUnixSetXftClipRegion(clipRegion); #endif /* Draw cursor: */ if (showCursor) { |
︙ | |||
1382 1383 1384 1385 1386 1387 1388 | 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 | - + - - + + - + - - + - - - - - - - - + - - - - + + + + - | * error occurs then an error message is left in the interp's result. */ static int EntryIndex( Tcl_Interp *interp, /* For error messages. */ Entry *entryPtr, /* Entry widget to query */ Tcl_Obj *indexObj, /* Symbolic index name */ |
︙ | |||
1434 1435 1436 1437 1438 1439 1440 | 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 | - - + - + + - + + + + + + + - - + + - - + - + - + - - + + - + - + - + - + - - + + - + - - + + - + - + - + - + - - + + - + - - + + | if (x > maxWidth) { x = maxWidth; roundUp = 1; } *indexPtr = Tk_PointToChar(entryPtr->entry.textLayout, x - entryPtr->entry.layoutX, 0); |
︙ | |||
1678 1679 1680 1681 1682 1683 1684 | 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 | - + - + | /* $entry set $value * Sets the value of an entry widget. */ static int EntrySetCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { |
︙ | |||
1716 1717 1718 1719 1720 1721 1722 | 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 | - + - + - + | } /* $entry xview -- horizontal scrolling interface */ static int EntryXViewCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { |
︙ | |||
1750 1751 1752 1753 1754 1755 1756 | 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 | - + | { 0,0,0 } }; /*------------------------------------------------------------------------ * +++ Entry widget definition. */ |
︙ | |||
1773 1774 1775 1776 1777 1778 1779 | 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 | - + - + - + - + - + - + - + - + - - + + - + - - + + - + - + - + - + - - + - - - - - - - - + + + - - - - + + + - + | * +++ Combobox widget record. */ typedef struct { Tcl_Obj *postCommandObj; Tcl_Obj *valuesObj; Tcl_Obj *heightObj; |
︙ | |||
1916 1917 1918 1919 1920 1921 1922 | 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 | - + | { "state", TtkWidgetStateCommand,0 }, { "set", EntrySetCommand,0 }, { "validate", EntryValidateCommand,0 }, { "xview", EntryXViewCommand,0 }, { 0,0,0 } }; |
︙ | |||
1953 1954 1955 1956 1957 1958 1959 | 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 | - + - + - + - + - + - + - + - + - + - + | typedef struct { WidgetCore core; EntryPart entry; SpinboxPart spinbox; } Spinbox; |
︙ | |||
2028 2029 2030 2031 2032 2033 2034 | 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 | - + | { "state", TtkWidgetStateCommand,0 }, { "set", EntrySetCommand,0 }, { "validate", EntryValidateCommand,0 }, { "xview", EntryXViewCommand,0 }, { 0,0,0 } }; |
︙ | |||
2055 2056 2057 2058 2059 2060 2061 | 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 | - + - + - - + + - + - + - - - + - + | */ typedef struct { Tcl_Obj *fontObj; Tcl_Obj *widthObj; } TextareaElement; |
︙ |
Changes to generic/ttk/ttkFrame.c.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - + + | /* * Copyright (c) 2004, Joe English * * ttk::frame and ttk::labelframe widgets. */ |
︙ | |||
22 23 24 25 26 27 28 | 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 | - + - + - + - + - + - + | } FramePart; typedef struct { WidgetCore core; FramePart frame; } Frame; |
︙ | |||
84 85 86 87 88 89 90 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + - - - | return margins; } /* FrameSize procedure -- * The frame doesn't request a size of its own by default, * but it does have an internal border. See also <<NOTE-SIZE>> */ |
︙ | |||
144 145 146 147 148 149 150 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + | if ((width > 0 || height > 0) && (mask & GEOMETRY_CHANGED)) { Tk_GeometryRequest(framePtr->core.tkwin, width, height); } return TtkCoreConfigure(interp, recordPtr, mask); } |
︙ | |||
204 205 206 207 208 209 210 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | + - - - + + + | } *anchorPtr = flags; return TCL_OK; error: if (interp) { Tcl_ResetResult(interp); |
︙ | |||
246 247 248 249 250 251 252 | 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 | - + - + - + - + - + | WidgetCore core; FramePart frame; LabelframePart label; } Labelframe; #define LABELWIDGET_CHANGED 0x100 |
︙ | |||
336 337 338 339 340 341 342 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | - + - - - | } /* * LabelframeSize -- * Like the frame, this doesn't request a size of its own * but it does have internal padding and a minimum size. */ |
︙ | |||
457 458 459 460 461 462 463 | 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 | - + - + - + - + - - + + - + - - - - - + - + - - - + - - + - + - + - - | * Place border and label: */ Ttk_PlaceLayout(corePtr->layout, corePtr->state, borderParcel); if (lframePtr->label.labelLayout) { Ttk_PlaceLayout( lframePtr->label.labelLayout, corePtr->state, labelParcel); } |
︙ | |||
601 602 603 604 605 606 607 | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 | - - + + - + - + | if (FrameConfigure(interp, recordPtr, mask) != TCL_OK) { return TCL_ERROR; } /* Update -labelwidget changes, if any: */ if (mask & LABELWIDGET_CHANGED) { |
︙ |
Added generic/ttk/ttkGenStubs.tcl.