Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Scrollutil: Made sure that the Migration Tool for Tcl 9 won't output any warnings or notes; bumped the version to 2.3.2. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c047bc155da9d5573ef26e68ef760fc9 |
User & Date: | csaba 2024-09-29 12:47:05.394 |
Context
2024-10-15
| ||
16:32 | Tablelist: Optimizations in the themepatch package; eliminated a potential error message caused by the handling of <TouchpadScroll> events. check-in: e8922b9c46 user: csaba tags: trunk | |
2024-09-29
| ||
12:47 | Scrollutil: Made sure that the Migration Tool for Tcl 9 won't output any warnings or notes; bumped the version to 2.3.2. check-in: c047bc155d user: csaba tags: trunk | |
12:10 | Tablelist: Made sure that the Migration Tool for Tcl 9 won't output any warnings or notes; bumped the version to 7.3.1. check-in: 32d945971e user: csaba tags: trunk | |
Changes
Changes to examples/scrollutil/PagesManDemo.tcl.
︙ | ︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # # Populates a given plainnotebook widget with panes that display the contents # of the files of the specified suffix within the current working directory # proc populateNotebook {nb sfx} { set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] foreach fileName [lsort -dictionary [glob *.$sfx]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName] if {$sfx eq "gif"} { set canv [canvas $sa.canv -background #c0c0c0] set img [image create photo -file $fileName -format gif] $canv create image 15p 15p -anchor nw -image $img | > | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # # Populates a given plainnotebook widget with panes that display the contents # of the files of the specified suffix within the current working directory # proc populateNotebook {nb sfx} { set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] ##nagelfar ignore foreach fileName [lsort -dictionary [glob *.$sfx]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName] if {$sfx eq "gif"} { set canv [canvas $sa.canv -background #c0c0c0] set img [image create photo -file $fileName -format gif] $canv create image 15p 15p -anchor nw -image $img |
︙ | ︙ |
Changes to examples/scrollutil/PlainNotebookDemo.tcl.
︙ | ︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # set f [ttk::frame .f] set nb [scrollutil::plainnotebook $f.nb -closabletabs 1 \ -forgetcommand condCopySel -leavecommand saveSel] set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] cd [expr {[info exists ttk::library] ? $ttk::library : $tile::library}] foreach fileName [lsort [glob *.tcl]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName -lockinterval 10] if {$currentTheme eq "vista"} { $sa configure -relief solid } set txt [text $sa.txt -font TkFixedFont -height 30 -takefocus 1 -wrap none] | > | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # set f [ttk::frame .f] set nb [scrollutil::plainnotebook $f.nb -closabletabs 1 \ -forgetcommand condCopySel -leavecommand saveSel] set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] cd [expr {[info exists ttk::library] ? $ttk::library : $tile::library}] ##nagelfar ignore foreach fileName [lsort [glob *.tcl]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName -lockinterval 10] if {$currentTheme eq "vista"} { $sa configure -relief solid } set txt [text $sa.txt -font TkFixedFont -height 30 -takefocus 1 -wrap none] |
︙ | ︙ |
Changes to examples/scrollutil/ScrolledNotebookDemo.tcl.
︙ | ︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # set f [ttk::frame .f] set nb [scrollutil::scrollednotebook $f.nb -style My.TNotebook \ -forgetcommand condCopySel -leavecommand saveSel] set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] cd [expr {[info exists ttk::library] ? $ttk::library : $tile::library}] foreach fileName [lsort [glob *.tcl]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName -lockinterval 10] if {$currentTheme eq "vista"} { $sa configure -relief solid } set txt [text $sa.txt -font TkFixedFont -takefocus 1 -wrap none] | > | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # set f [ttk::frame .f] set nb [scrollutil::scrollednotebook $f.nb -style My.TNotebook \ -forgetcommand condCopySel -leavecommand saveSel] set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] cd [expr {[info exists ttk::library] ? $ttk::library : $tile::library}] ##nagelfar ignore foreach fileName [lsort [glob *.tcl]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName -lockinterval 10] if {$currentTheme eq "vista"} { $sa configure -relief solid } set txt [text $sa.txt -font TkFixedFont -takefocus 1 -wrap none] |
︙ | ︙ |
Changes to examples/scrollutil/TtkNotebookDemo.tcl.
︙ | ︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # widgets displaying the contents of the Ttk library files # set f [ttk::frame .f] set nb [ttk::notebook $f.nb -style My.TNotebook] set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] cd [expr {[info exists ttk::library] ? $ttk::library : $tile::library}] foreach fileName [lsort [glob *.tcl]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName -lockinterval 10] if {$currentTheme eq "vista"} { $sa configure -relief solid } set txt [text $sa.txt -font TkFixedFont -takefocus 1 -wrap none] | > | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # widgets displaying the contents of the Ttk library files # set f [ttk::frame .f] set nb [ttk::notebook $f.nb -style My.TNotebook] set currentTheme [styleutil::getCurrentTheme] set panePadding [expr {$currentTheme eq "aqua" ? 0 : "7p"}] cd [expr {[info exists ttk::library] ? $ttk::library : $tile::library}] ##nagelfar ignore foreach fileName [lsort [glob *.tcl]] { set baseName [string range $fileName 0 end-4] set sa [scrollutil::scrollarea $nb.sa_$baseName -lockinterval 10] if {$currentTheme eq "vista"} { $sa configure -relief solid } set txt [text $sa.txt -font TkFixedFont -takefocus 1 -wrap none] |
︙ | ︙ |
Changes to modules/scrollutil/CHANGES.txt.
|
| | > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | What is new in Scrollutil 2.3.2? -------------------------------- 1. Made sure that the Migration Tool for Tcl 9 won't output any warnings or notes. What was new in Scrollutil 2.3.1? --------------------------------- 1. Reverted the implementation of the "scrollutil::getscrollarea" command to its version contained in Scrollutil 2.2, thus eliminating two potentially critical bugs introduced in Scrollutil 2.3 (thanks to Nicolas Bats and Paul Obermeier for their bug reports). What was new in Scrollutil 2.3? |
︙ | ︙ |
Changes to modules/scrollutil/COPYRIGHT.txt.
|
| | | 1 2 3 4 5 6 7 8 | Scrolling utilities package Scrollutil 2.3.2 Copyright (c) 2019-2024 Csaba Nemethi (E-mail: [email protected]) This library is free software; you can use, modify, and redistribute it for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. |
︙ | ︙ |
Changes to modules/scrollutil/README.txt.
︙ | ︙ | |||
41 42 43 44 45 46 47 | How to Get It? -------------- Scrollutil is available for free download from the Web page https://www.nemethi.de | | | | | | | | | | 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 | How to Get It? -------------- Scrollutil is available for free download from the Web page https://www.nemethi.de The distribution file is "scrollutil2.3.2.tar.gz" for UNIX and "scrollutil2_3_2.zip" for Windows. These files contain the same information, except for the additional carriage return character preceding the linefeed at the end of each line in the text files for Windows. Scrollutil is also included in tklib, which has the address https://core.tcl.tk/tklib How to Install It? ------------------ Install the package as a subdirectory of one of the directories given by the "auto_path" variable. For example, you can install it as a directory at the same level as the Tcl and Tk script libraries. The locations of these library directories are given by the "tcl_library" and "tk_library" variables, respectively. To install Scrollutil on UNIX, "cd" to the desired directory and unpack the distribution file "scrollutil2.3.2.tar.gz": gunzip -c scrollutil2.3.2.tar.gz | tar -xf - On most UNIX systems this can be replaced with tar -zxf scrollutil2.3.2.tar.gz Both commands will create a directory named "scrollutil2.3.2", with the subdirectories "demos", "doc", and "scripts". On Windows, use WinZip or some other program capable of unpacking the distribution file "scrollutil2_3_2.zip" into the directory "scrollutil2.3.2", with the subdirectories "demos", "doc", and "scripts". How to Use It? -------------- The Scrollutil distribution provides two packages, called Scrollutil and Scrollutil_tile. The main difference between the two is that |
︙ | ︙ |
Changes to modules/scrollutil/doc/scrollutil.html.
︙ | ︙ | |||
315 316 317 318 319 320 321 | <blockquote> <address> <a href="https://www.nemethi.de">https://www.nemethi.de</a> </address> </blockquote> | | | | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | <blockquote> <address> <a href="https://www.nemethi.de">https://www.nemethi.de</a> </address> </blockquote> <p>The distribution file is <code>scrollutil2.3.2.tar.gz</code> for UNIX and <code>scrollutil2_3_2.zip</code> for Windows. These files contain the same information, except for the additional carriage return character preceding the linefeed at the end of each line in the text files for Windows.</p> <p>Scrollutil is also included in tklib, which has the address</p> <blockquote> |
︙ | ︙ | |||
340 341 342 343 344 345 346 | a directory at the same level as the Tcl and Tk script libraries. The locations of these library directories are given by the <code>tcl_library</code> and <code>tk_library</code> variables, respectively.</p> <p>To install Scrollutil <i>on UNIX</i>, <code>cd</code> to the desired directory and unpack the distribution file | | | | | | | | 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 | a directory at the same level as the Tcl and Tk script libraries. The locations of these library directories are given by the <code>tcl_library</code> and <code>tk_library</code> variables, respectively.</p> <p>To install Scrollutil <i>on UNIX</i>, <code>cd</code> to the desired directory and unpack the distribution file <code>scrollutil2.3.2.tar.gz</code>:</p> <blockquote> <pre> gunzip -c scrollutil2.3.2.tar.gz | tar -xf - </pre> </blockquote> <p>On most UNIX systems this can be replaced with</p> <blockquote> <pre> tar -zxf scrollutil2.3.2.tar.gz </pre> </blockquote> <p>Both commands will create a directory named <code>scrollutil2.3.2</code>, with the subdirectories <code>demos</code>, <code>doc</code>, and <code>scripts</code>.</p> <p><i>On Windows</i>, use WinZip or some other program capable of unpacking the distribution file <code>scrollutil2_3_2.zip</code> into the directory <code>scrollutil2.3.2</code>, with the subdirectories <code>demos</code>, <code>doc</code>, and <code>scripts</code>.</p> <p>Notice that in tklib the Scrollutil <code>demos</code> directory is replaced with the subdirectory <code>scrollutil</code> of the <code>examples</code> directory. Please take this into account when reading the <a href="#examples">examples</a> below.</p> |
︙ | ︙ |
Changes to modules/scrollutil/pkgIndex.tcl.
1 2 3 4 5 6 7 8 9 | #============================================================================== # Scrollutil and Scrollutil_tile package index file. # # Copyright (c) 2019-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Regular packages: # | | | | | | | | | 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 | #============================================================================== # Scrollutil and Scrollutil_tile package index file. # # Copyright (c) 2019-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Regular packages: # package ifneeded scrollutil 2.3.2 \ [list source [file join $dir scrollutil.tcl]] package ifneeded scrollutil_tile 2.3.2 \ [list source [file join $dir scrollutil_tile.tcl]] # # Aliases: # package ifneeded Scrollutil 2.3.2 \ [list package require -exact scrollutil 2.3.2] package ifneeded Scrollutil_tile 2.3.2 \ [list package require -exact scrollutil_tile 2.3.2] # # Code common to all packages: # package ifneeded scrollutil::common 2.3.2 \ [list source [file join $dir scrollutilCommon.tcl]] |
Changes to modules/scrollutil/scripts/pagesman.tcl.
︙ | ︙ | |||
439 440 441 442 443 444 445 446 447 448 449 450 451 452 | forget { if {$argCount != 2} { mwutil::wrongNumArgs "$win $cmd pageIndex" } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set widget [lindex $data(pageList) $pageIdx] if {[set forgetCmd $data(-forgetcommand)] ne "" && | > | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | forget { if {$argCount != 2} { mwutil::wrongNumArgs "$win $cmd pageIndex" } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set widget [lindex $data(pageList) $pageIdx] if {[set forgetCmd $data(-forgetcommand)] ne "" && |
︙ | ︙ | |||
499 500 501 502 503 504 505 506 507 508 509 510 511 512 | haspageattrib - unsetpageattrib { if {$argCount != 3} { mwutil::wrongNumArgs "$win $cmd pageIndex name" } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set first [string first "page" $cmd] set last [expr {$first + 3}] | > | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | haspageattrib - unsetpageattrib { if {$argCount != 3} { mwutil::wrongNumArgs "$win $cmd pageIndex name" } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set first [string first "page" $cmd] set last [expr {$first + 3}] |
︙ | ︙ | |||
535 536 537 538 539 540 541 542 543 544 545 546 547 548 | insert { if {$argCount < 3} { mwutil::wrongNumArgs \ "$win $cmd pageIndex window ?option value option value ...?" } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg set widget [lindex $args 2] if {![winfo exists $widget]} { return -code error "bad window path name \"$widget\"" } | > | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | insert { if {$argCount < 3} { mwutil::wrongNumArgs \ "$win $cmd pageIndex window ?option value option value ...?" } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg set widget [lindex $args 2] if {![winfo exists $widget]} { return -code error "bad window path name \"$widget\"" } |
︙ | ︙ | |||
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 | pageattrib { if {$argCount < 2} { mwutil::wrongNumArgs \ "$win $cmd pageIndex ?name ?value name value ...??" } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set widget [lindex $data(pageList) $pageIdx] return [::scrollutil::attribSubCmd $win $widget \ [lrange $args 2 end]] } pagecget { if {$argCount != 3} { mwutil::wrongNumArgs "$win $cmd pageIndex option" } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } variable pageConfigSpecs set opt [mwutil::fullConfigOpt [lindex $args 2] pageConfigSpecs] return [doPageCget $pageIdx $win $opt] } pageconfigure { if {$argCount < 2} { mwutil::wrongNumArgs \ "$win $cmd pageIndex ?option ?value option value ...??" } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } variable pageConfigSpecs return [mwutil::configureSubCmd $win pageConfigSpecs \ | > > > | 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 | pageattrib { if {$argCount < 2} { mwutil::wrongNumArgs \ "$win $cmd pageIndex ?name ?value name value ...??" } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set widget [lindex $data(pageList) $pageIdx] return [::scrollutil::attribSubCmd $win $widget \ [lrange $args 2 end]] } pagecget { if {$argCount != 3} { mwutil::wrongNumArgs "$win $cmd pageIndex option" } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } variable pageConfigSpecs set opt [mwutil::fullConfigOpt [lindex $args 2] pageConfigSpecs] return [doPageCget $pageIdx $win $opt] } pageconfigure { if {$argCount < 2} { mwutil::wrongNumArgs \ "$win $cmd pageIndex ?option ?value option value ...??" } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } variable pageConfigSpecs return [mwutil::configureSubCmd $win pageConfigSpecs \ |
︙ | ︙ | |||
651 652 653 654 655 656 657 658 659 660 661 662 663 664 | } if {$argCount == 1} { return $data(currentPage) } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set widget [lindex $data(pageList) $pageIdx] if {[lsearch -exact $data(pageList) $data(currentPage)] >= 0} { | > | 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | } if {$argCount == 1} { return $data(currentPage) } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } set widget [lindex $data(pageList) $pageIdx] if {[lsearch -exact $data(pageList) $data(currentPage)] >= 0} { |
︙ | ︙ | |||
694 695 696 697 698 699 700 701 702 703 704 705 706 707 | window { if {$argCount != 2} { mwutil::wrongNumArgs "$win $cmd pageIndex" } set pageIdx [lindex $args 1] set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } return [lindex $data(pageList) $pageIdx] } | > | 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 | window { if {$argCount != 2} { mwutil::wrongNumArgs "$win $cmd pageIndex" } set pageIdx [lindex $args 1] ##nagelfar ignore set pageIdx [format "%d" $pageIdx] ;# integer check with error msg if {$pageIdx < 0 || $pageIdx >= $data(pageCount)} { return -code error "page index $pageIdx out of bounds" } return [lindex $data(pageList) $pageIdx] } |
︙ | ︙ |
Changes to modules/scrollutil/scripts/plainnotebook.tcl.
︙ | ︙ | |||
623 624 625 626 627 628 629 630 631 632 633 634 635 636 | $win.nb configure $opt $val set data($opt) [$win.nb cget $opt] } w { switch -- $opt { -caller { if {![string is integer -strict $val]} { return -code error "bad page index $val" } if {$val >= 0} { set pm [winfo parent $win] if {[winfo class $pm] ne "Pagesman"} { return -code error \ | > | 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | $win.nb configure $opt $val set data($opt) [$win.nb cget $opt] } w { switch -- $opt { -caller { ##nagelfar ignore if {![string is integer -strict $val]} { return -code error "bad page index $val" } if {$val >= 0} { set pm [winfo parent $win] if {[winfo class $pm] ne "Pagesman"} { return -code error \ |
︙ | ︙ | |||
766 767 768 769 770 771 772 773 774 775 776 777 778 779 | } set pm [winfo parent $win] if {[winfo class $pm] ne "Pagesman"} { return -code error "\"$pm\" is not a pagesman widget" } foreach {pageIdx text img} $argList {} if {![string is integer -strict $pageIdx] || $pageIdx < 0} { return -code error "bad page index $pageIdx" } if {$img ne "" && [lsearch -exact [image names] $img] < 0} { return -code error "image \"$img\" doesn't exist" } | > | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | } set pm [winfo parent $win] if {[winfo class $pm] ne "Pagesman"} { return -code error "\"$pm\" is not a pagesman widget" } foreach {pageIdx text img} $argList {} ##nagelfar ignore if {![string is integer -strict $pageIdx] || $pageIdx < 0} { return -code error "bad page index $pageIdx" } if {$img ne "" && [lsearch -exact [image names] $img] < 0} { return -code error "image \"$img\" doesn't exist" } |
︙ | ︙ | |||
953 954 955 956 957 958 959 960 961 962 963 964 965 966 | index { if {$argCount != 2} { mwutil::wrongNumArgs "$win $cmd tab" } set tabId [lindex $args 1] if {[scan $tabId "@%d,%d%n" x y count] == 3 && $count == [string length $tabId]} { set cf $data(cf) incr x [expr {[winfo rootx $win] - [winfo rootx $cf]}] incr y [expr {[winfo rooty $win] - [winfo rooty $cf]}] if {$x < 0 || $x >= [winfo width $cf] || $y < 0 || $y >= [winfo height $cf]} { | > | 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 | index { if {$argCount != 2} { mwutil::wrongNumArgs "$win $cmd tab" } set tabId [lindex $args 1] ##nagelfar ignore if {[scan $tabId "@%d,%d%n" x y count] == 3 && $count == [string length $tabId]} { set cf $data(cf) incr x [expr {[winfo rootx $win] - [winfo rootx $cf]}] incr y [expr {[winfo rooty $win] - [winfo rooty $cf]}] if {$x < 0 || $x >= [winfo width $cf] || $y < 0 || $y >= [winfo height $cf]} { |
︙ | ︙ | |||
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 | return -code error "tab index $pos out of bounds" } set pm [winfo parent $win] if {[winfo class $pm] ne "Pagesman"} { return -code error "\"$pm\" is not a pagesman widget" } foreach {pageIdx text img} [lrange $args 2 end] {} if {![string is integer -strict $pageIdx] || $pageIdx < 0} { return -code error "bad page index $pageIdx" } if {$img ne "" && [lsearch -exact [image names] $img] < 0} { return -code error "image \"$img\" doesn't exist" } | > | 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 | return -code error "tab index $pos out of bounds" } set pm [winfo parent $win] if {[winfo class $pm] ne "Pagesman"} { return -code error "\"$pm\" is not a pagesman widget" } foreach {pageIdx text img} [lrange $args 2 end] {} ##nagelfar ignore if {![string is integer -strict $pageIdx] || $pageIdx < 0} { return -code error "bad page index $pageIdx" } if {$img ne "" && [lsearch -exact [image names] $img] < 0} { return -code error "image \"$img\" doesn't exist" } |
︙ | ︙ |
Changes to modules/scrollutil/scripts/scrollableframe.tcl.
︙ | ︙ | |||
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 | set argCount [llength $argList] if {$argCount < 3} { mwutil::wrongNumArgs "$win scan mark|dragto x y ?dragGain?" } variable scanOpts set opt [mwutil::fullOpt "option" [lindex $argList 0] $scanOpts] set x [format "%d" [lindex $argList 1]] set y [format "%d" [lindex $argList 2]] upvar ::scrollutil::ns${win}::data data if {$opt eq "mark"} { if {$argCount != 3} { mwutil::wrongNumArgs "$win scan mark x y" } set data(scanX) $x set data(scanY) $y set data(scanXOffset) $data(xOffset) set data(scanYOffset) $data(yOffset) } else { if {$argCount == 3} { set gain 10 } elseif {$argCount == 4} { set gain [format "%d" [lindex $argList 3]] } else { mwutil::wrongNumArgs "$win scan dragto x y ?gain?" } set xOffset [expr {$data(scanXOffset) - $gain * ($x - $data(scanX))}] applyOffset $win x $xOffset 0 | > > > | 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 | set argCount [llength $argList] if {$argCount < 3} { mwutil::wrongNumArgs "$win scan mark|dragto x y ?dragGain?" } variable scanOpts set opt [mwutil::fullOpt "option" [lindex $argList 0] $scanOpts] ##nagelfar ignore set x [format "%d" [lindex $argList 1]] ##nagelfar ignore set y [format "%d" [lindex $argList 2]] upvar ::scrollutil::ns${win}::data data if {$opt eq "mark"} { if {$argCount != 3} { mwutil::wrongNumArgs "$win scan mark x y" } set data(scanX) $x set data(scanY) $y set data(scanXOffset) $data(xOffset) set data(scanYOffset) $data(yOffset) } else { if {$argCount == 3} { set gain 10 } elseif {$argCount == 4} { ##nagelfar ignore set gain [format "%d" [lindex $argList 3]] } else { mwutil::wrongNumArgs "$win scan dragto x y ?gain?" } set xOffset [expr {$data(scanXOffset) - $gain * ($x - $data(scanX))}] applyOffset $win x $xOffset 0 |
︙ | ︙ | |||
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | #------------------------------------------------------------------------------ proc scrollutil::sf::seerectSubCmd {win argList} { set argCount [llength $argList] if {$argCount < 4 || $argCount > 5} { mwutil::wrongNumArgs "$win seerect x1 y1 x2 y2 ?nw|ne|sw|se?" } set x1 [format "%d" [lindex $argList 0]] set y1 [format "%d" [lindex $argList 1]] set x2 [format "%d" [lindex $argList 2]] set y2 [format "%d" [lindex $argList 3]] if {$x1 > $x2} { set tmp $x1; set x1 $x2; set x2 $temp } if {$y1 > $y2} { set tmp $y1; set y1 $y2; set y2 $temp } | > > > > | 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | #------------------------------------------------------------------------------ proc scrollutil::sf::seerectSubCmd {win argList} { set argCount [llength $argList] if {$argCount < 4 || $argCount > 5} { mwutil::wrongNumArgs "$win seerect x1 y1 x2 y2 ?nw|ne|sw|se?" } ##nagelfar ignore set x1 [format "%d" [lindex $argList 0]] ##nagelfar ignore set y1 [format "%d" [lindex $argList 1]] ##nagelfar ignore set x2 [format "%d" [lindex $argList 2]] ##nagelfar ignore set y2 [format "%d" [lindex $argList 3]] if {$x1 > $x2} { set tmp $x1; set x1 $x2; set x2 $temp } if {$y1 > $y2} { set tmp $y1; set y1 $y2; set y2 $temp } |
︙ | ︙ | |||
847 848 849 850 851 852 853 854 855 856 857 858 859 860 | return [list $first $last] } 1 { # # Command: $win xview <units> # set units [format "%d" [lindex $argList 0]] set xScrlIncr $data(-xscrollincrement) if {$xScrlIncr > 0} { set xOffset [expr {$units * $xScrlIncr}] } else { set xOffset [expr {int($units * 0.1 * $mfWidth)}] } | > | 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | return [list $first $last] } 1 { # # Command: $win xview <units> # ##nagelfar ignore set units [format "%d" [lindex $argList 0]] set xScrlIncr $data(-xscrollincrement) if {$xScrlIncr > 0} { set xOffset [expr {$units * $xScrlIncr}] } else { set xOffset [expr {int($units * 0.1 * $mfWidth)}] } |
︙ | ︙ | |||
920 921 922 923 924 925 926 927 928 929 930 931 932 933 | return [list $first $last] } 1 { # # Command: $win yview <units> # set units [format "%d" [lindex $argList 0]] set yScrlIncr $data(-yscrollincrement) if {$yScrlIncr > 0} { set yOffset [expr {$units * $yScrlIncr}] } else { set yOffset [expr {int($units * 0.1 * $mfWidth)}] } | > | 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 | return [list $first $last] } 1 { # # Command: $win yview <units> # ##nagelfar ignore set units [format "%d" [lindex $argList 0]] set yScrlIncr $data(-yscrollincrement) if {$yScrlIncr > 0} { set yOffset [expr {$units * $yScrlIncr}] } else { set yOffset [expr {int($units * 0.1 * $mfWidth)}] } |
︙ | ︙ |
Changes to modules/scrollutil/scripts/scrollarea.tcl.
︙ | ︙ | |||
443 444 445 446 447 448 449 450 451 452 453 454 455 456 | obscureScrollbars $win } } else { unobscureScrollbars $win } } -lockinterval { set val [format "%d" $val] ;# integer check with error msg if {$val < 0} { set val 0 } set data($opt) $val } -respectheader { | > | 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | obscureScrollbars $win } } else { unobscureScrollbars $win } } -lockinterval { ##nagelfar ignore set val [format "%d" $val] ;# integer check with error msg if {$val < 0} { set val 0 } set data($opt) $val } -respectheader { |
︙ | ︙ |
Changes to modules/scrollutil/scripts/scrollednotebook.tcl.
︙ | ︙ | |||
1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 | # If the scrollednotebook tab identifier tabId is of the form “@x,y” then # returns a tab identifier of the same form, in which x is relative to the # internal ttk::notebook widget; otherwise returns tabId unchanged. #------------------------------------------------------------------------------ proc scrollutil::snb::snbTabIdToNbTabId {win tabId} { upvar ::scrollutil::ns${win}::data data if {[scan $tabId "@%d,%d%n" x y count] == 3 && $count == [string length $tabId]} { foreach {first last} [$data(sf) xview] {} set cfWidth [winfo width $data(cf)] incr x [expr {int($first * $cfWidth + 0.5)}] return "@$x,$y" } else { | > | 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 | # If the scrollednotebook tab identifier tabId is of the form “@x,y” then # returns a tab identifier of the same form, in which x is relative to the # internal ttk::notebook widget; otherwise returns tabId unchanged. #------------------------------------------------------------------------------ proc scrollutil::snb::snbTabIdToNbTabId {win tabId} { upvar ::scrollutil::ns${win}::data data ##nagelfar ignore if {[scan $tabId "@%d,%d%n" x y count] == 3 && $count == [string length $tabId]} { foreach {first last} [$data(sf) xview] {} set cfWidth [winfo width $data(cf)] incr x [expr {int($first * $cfWidth + 0.5)}] return "@$x,$y" } else { |
︙ | ︙ |
Changes to modules/scrollutil/scripts/utils/pkgIndex.tcl.
1 2 3 4 5 6 | #============================================================================== # mwutil, scaleutil, and themepatch package index file. # # Copyright (c) 2020-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== | | | | | 1 2 3 4 5 6 7 8 9 | #============================================================================== # mwutil, scaleutil, and themepatch package index file. # # Copyright (c) 2020-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package ifneeded mwutil 2.23 [list source [file join $dir mwutil.tcl]] package ifneeded scaleutil 1.14.1 [list source [file join $dir scaleutil.tcl]] package ifneeded themepatch 1.7 [list source [file join $dir themepatch.tcl]] |
Changes to modules/scrollutil/scripts/utils/scaleutil.tcl.
︙ | ︙ | |||
18 19 20 21 22 23 24 | # ======================== # namespace eval scaleutil { # # Public variables: # | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # ======================== # namespace eval scaleutil { # # Public variables: # variable version 1.14.1 variable library [file dirname [file normalize [info script]]] # # Public procedures: # namespace export scalingPercentage scale |
︙ | ︙ | |||
138 139 140 141 142 143 144 145 146 147 148 149 150 151 | # } elseif {[catch {exec ps -e | grep gnome-session}] == 0 && [catch {exec gsettings get \ org.gnome.settings-daemon.plugins.xsettings overrides} \ result] == 0 && [set idx \ [string first "'Gdk/WindowScalingFactor'" $result]] >= 0} { scan [string range $result $idx end] "%*s <%d>" winScalingFactor } # # Get the scaling percentage # if {$winScalingFactor >= 2} { | > | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | # } elseif {[catch {exec ps -e | grep gnome-session}] == 0 && [catch {exec gsettings get \ org.gnome.settings-daemon.plugins.xsettings overrides} \ result] == 0 && [set idx \ [string first "'Gdk/WindowScalingFactor'" $result]] >= 0} { ##nagelfar ignore scan [string range $result $idx end] "%*s <%d>" winScalingFactor } # # Get the scaling percentage # if {$winScalingFactor >= 2} { |
︙ | ︙ | |||
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 | set str [read $chan] close $chan set idx [string first "courier" $str] set str [string range $str $idx end] set idx [string first "size" $str] scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 9 : $size}] ;# -12 -> 9, else 10 foreach font {TkDefaultFont TkTextFont TkHeadingFont TkIconFont TkMenuFont} { font configure $font -size [expr {$factor * $points}] } set idx [string first "ttsize" $str] scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 8 : $size}] ;# -10 -> 8, else 9 foreach font {TkTooltipFont TkSmallCaptionFont} { font configure $font -size [expr {$factor * $points}] } set idx [string first "capsize" $str] scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 11 : $size}] ;# -14 -> 11, else 12 font configure TkCaptionFont -size [expr {$factor * $points}] set idx [string first "fixedsize" $str] scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 9 : $size}] ;# -12 -> 9, else 10 font configure TkFixedFont -size [expr {$factor * $points}] } #------------------------------------------------------------------------------ # scaleutil::scaleStyles_alt | > > > > | 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 | set str [read $chan] close $chan set idx [string first "courier" $str] set str [string range $str $idx end] set idx [string first "size" $str] ##nagelfar ignore scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 9 : $size}] ;# -12 -> 9, else 10 foreach font {TkDefaultFont TkTextFont TkHeadingFont TkIconFont TkMenuFont} { font configure $font -size [expr {$factor * $points}] } set idx [string first "ttsize" $str] ##nagelfar ignore scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 8 : $size}] ;# -10 -> 8, else 9 foreach font {TkTooltipFont TkSmallCaptionFont} { font configure $font -size [expr {$factor * $points}] } set idx [string first "capsize" $str] ##nagelfar ignore scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 11 : $size}] ;# -14 -> 11, else 12 font configure TkCaptionFont -size [expr {$factor * $points}] set idx [string first "fixedsize" $str] ##nagelfar ignore scan [string range $str $idx end] "%*s %d" size set points [expr {$size < 0 ? 9 : $size}] ;# -12 -> 9, else 10 font configure TkFixedFont -size [expr {$factor * $points}] } #------------------------------------------------------------------------------ # scaleutil::scaleStyles_alt |
︙ | ︙ |
Changes to modules/scrollutil/scripts/wheelEvent.tcl.
︙ | ︙ | |||
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | # # The rest is for scrollable widget containers. # foreach event $eventList { if {[string match <*Button-?> $event]} { bind WheeleventRedir $event [format { if {![scrollutil::hasFocus %%W] || ![scrollutil::isCompatible %s %%W]} { event generate [winfo toplevel %%W] %s \ -rootx %%X -rooty %%Y break } } $event $event] } else { bind WheeleventRedir $event [format { if {![scrollutil::hasFocus %%W] || ![scrollutil::isCompatible %s %%W]} { event generate [winfo toplevel %%W] %s \ -rootx %%X -rooty %%Y -delta %%D break } | > > | 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 | # # The rest is for scrollable widget containers. # foreach event $eventList { if {[string match <*Button-?> $event]} { ##nagelfar ignore bind WheeleventRedir $event [format { if {![scrollutil::hasFocus %%W] || ![scrollutil::isCompatible %s %%W]} { event generate [winfo toplevel %%W] %s \ -rootx %%X -rooty %%Y break } } $event $event] } else { ##nagelfar ignore bind WheeleventRedir $event [format { if {![scrollutil::hasFocus %%W] || ![scrollutil::isCompatible %s %%W]} { event generate [winfo toplevel %%W] %s \ -rootx %%X -rooty %%Y -delta %%D break } |
︙ | ︙ |
Changes to modules/scrollutil/scrollutil.tcl.
1 2 3 4 5 6 | #============================================================================== # Main Scrollutil package module. # # Copyright (c) 2019-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #============================================================================== # Main Scrollutil package module. # # Copyright (c) 2019-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require -exact scrollutil::common 2.3.2 package provide scrollutil $::scrollutil::version package provide Scrollutil $::scrollutil::version ::scrollutil::useTile 0 ::scrollutil::sa::createBindings |
︙ | ︙ |
Changes to modules/scrollutil/scrollutilCommon.tcl.
︙ | ︙ | |||
8 9 10 11 12 13 14 | proc - {} { return [expr {$::tcl_version >= 8.5 ? "-" : ""}] } package require Tk 8.4[-] # # Public variables: # | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | proc - {} { return [expr {$::tcl_version >= 8.5 ? "-" : ""}] } package require Tk 8.4[-] # # Public variables: # variable version 2.3.2 variable library [file dirname [file normalize [info script]]] # # Creates a new scrollarea/scrollsync/scrollableframe/pagesman widget: # namespace export scrollarea scrollsync scrollableframe pagesman |
︙ | ︙ | |||
91 92 93 94 95 96 97 | if {[catch {package present mwutil} version] == 0 && [package vcompare $version 2.23] < 0} { package forget mwutil } package require mwutil 2.23[-] if {[catch {package present scaleutil} version] == 0 && | | | | 91 92 93 94 95 96 97 98 99 100 101 102 103 | if {[catch {package present mwutil} version] == 0 && [package vcompare $version 2.23] < 0} { package forget mwutil } package require mwutil 2.23[-] if {[catch {package present scaleutil} version] == 0 && [package vcompare $version 1.14.1] < 0} { package forget scaleutil } package require scaleutil 1.14.1[-] } ::scrollutil::loadUtils |
Changes to modules/scrollutil/scrollutil_tile.tcl.
1 2 3 4 5 6 | #============================================================================== # Main Scrollutil_tile package module. # # Copyright (c) 2019-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #============================================================================== # Main Scrollutil_tile package module. # # Copyright (c) 2019-2024 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require -exact scrollutil::common 2.3.2 if {$::tk_version < 8.5 || [regexp {^8\.5a[1-5]$} $::tk_patchLevel]} { package require tile 0.6[::scrollutil::-] } package provide scrollutil_tile $::scrollutil::version package provide Scrollutil_tile $::scrollutil::version |
︙ | ︙ |