Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Mentry: Updated for version 4.4. See the ChangeLog for details. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
07b750d88a27c3e47a224fbd781b1113 |
User & Date: | csaba 2025-03-22 16:14:08.807 |
Context
2025-03-23
| ||
16:21 | Mentry, Scrollutil, Tablelist, Tsw: Minor improvements in the documentation. check-in: 48e317665a user: csaba tags: trunk | |
2025-03-22
| ||
16:14 | Mentry: Updated for version 4.4. See the ChangeLog for details. check-in: 07b750d88a user: csaba tags: trunk | |
2025-03-21
| ||
10:06 | Scrollutil: Updated the file CHANGES.txt. check-in: 3c4c5c6f96 user: csaba tags: trunk | |
Changes
Changes to modules/mentry/CHANGES.txt.
|
| | > > > > > > > > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | What is new in Mentry 4.4? -------------------------- 1. Included the same version 2.24 of the mega-widget utility package mwutil as in the most recent Tablelist, Scrollutil, and Tsw releases. 2. Minor improvements in the documentation. What was new in Mentry 4.3.1? ----------------------------- 1. Made sure that the Migration Tool for Tcl 9 by Ashok Nadkarni won't output any warnings or notes (thanks to Andreas Kupries for his valuable input). What was new in Mentry 4.3? --------------------------- |
︙ | ︙ |
Changes to modules/mentry/COPYRIGHT.txt.
|
| | | | 1 2 3 4 5 6 7 8 9 | Multi-entry widget package Mentry, version 4.4 Copyright (c) 1999-2025 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. This software is distributed WITHOUT ANY WARRANTY; without even the |
︙ | ︙ |
Changes to modules/mentry/ChangeLog.
1 2 3 4 5 6 7 | 2024-11-29 Csaba Nemethi <[email protected]> * Released Mentry 4.3.1. 2024-10.19 Csaba Nemethi <[email protected]> * *.tcl: Bumped the version number to 4.3.1. | > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 2025-03-22 Csaba Nemethi <[email protected]> * *.tcl: Bumped the version number to 4.4. * COPYRIGHT.txt: * README.txt: * CHANGES.txt: Updated to reflect the changes. * doc/*.html: * scripts/mwutil/*.tcl: Attributes-related extensions in the mwutil package. 2024-11-29 Csaba Nemethi <[email protected]> * Released Mentry 4.3.1. 2024-10.19 Csaba Nemethi <[email protected]> * *.tcl: Bumped the version number to 4.3.1. |
︙ | ︙ |
Changes to modules/mentry/README.txt.
︙ | ︙ | |||
50 51 52 53 54 55 56 | https://www.nemethi.de How to Get It? -------------- Mentry is available for free download from the same URL as Wcb. The | | | | < < | | | | | | | | | | | | 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 | https://www.nemethi.de How to Get It? -------------- Mentry is available for free download from the same URL as Wcb. The distribution file is "mentry4.4.tar.gz" for UNIX and "mentry4_4.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. Mentry 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 subdirectory of the "lib" directory within your Tcl/Tk installation. To install Mentry on UNIX, "cd" to the desired directory and unpack the distribution file "mentry4.4.tar.gz": gunzip -c mentry4.4.tar.gz | tar -xf - On most UNIX systems this can be replaced with tar -zxf mentry4.4.tar.gz Both commands will create a directory named "mentry4.4", with the subdirectories "demos", "doc", and "scripts". On Windows, use WinZip or some other program capable of unpacking the distribution file "mentry4_4.zip" into the directory "mentry4.4", with the subdirectories "demos", "doc", and "scripts". The file "mentryThemes.tcl" in the "scripts" directory is only needed for applications using the Mentry_tile package (see next section). How to Use It? -------------- The Mentry distribution provides two packages, called Mentry and Mentry_tile. The main difference between the two is that Mentry_tile enables the tile-based, theme-specific appearance of mentry widgets; this package requires tile 0.6 or higher. It is not possible to use both packages in one and the same application, because both are implemented in the same "mentry" namespace and provide identical commands. To be able to use the commands and variables of the Mentry package, your scripts must contain one of the lines package require mentry ?version? package require Mentry ?version? Likewise, to be able to use the commands and variables of the Mentry_tile package, your scripts must contain one of the lines package require mentry_tile ?version? package require Mentry_tile ?version? Since the packages Mentry and Mentry_tile are implemented in the "mentry" namespace, you must either import the procedures you need, or use qualified names like "mentry::mentry". |
︙ | ︙ |
Changes to modules/mentry/doc/index.html.
1 2 3 | <!DOCTYPE html> <html> <head> | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <!DOCTYPE html> <html> <head> <title>The Multi-Entry Widget Package Mentry 4.4</title> <meta name="Author" content="Csaba Nemethi"> <meta name="Keywords" content="mentry, widget, entry, label"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>The Multi-Entry Widget Package Mentry 4.4</h1> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/mentry/doc/mentry.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Mentry Programmer's Guide</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Mentry Programmer's Guide</h1> <h2>For Mentry Version 4.4</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ | |||
144 145 146 147 148 149 150 | <p>you can make sure that the three entries will only accept numeric input, thus providing a comfortable and safe user interface for editing 10-digit phone numbers.</p> <h3 id="ov_get">How to Get It?</h3> <p>Mentry is available for free download from the same URL as Wcb. The | | | | < < | | | | | | | | | | | | | 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 | <p>you can make sure that the three entries will only accept numeric input, thus providing a comfortable and safe user interface for editing 10-digit phone numbers.</p> <h3 id="ov_get">How to Get It?</h3> <p>Mentry is available for free download from the same URL as Wcb. The distribution file is <code>mentry4.4.tar.gz</code> for UNIX and <code>mentry4_4.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>Mentry is also included in tklib, which has the address</p> <blockquote> <address> <a href="https://core.tcl.tk/tklib">https://core.tcl.tk/tklib</a> </address> </blockquote> <h3 id="ov_install">How to Install It?</h3> <p>Install the package as a subdirectory of one of the directories given by the <code>auto_path</code> variable. For example, you can install it as a subdirectory of the <code>lib</code> directory within your Tcl/Tk installation.</p> <p>To install Mentry <i>on UNIX</i>, <code>cd</code> to the desired directory and unpack the distribution file <code>mentry4.4.tar.gz</code>:</p> <blockquote> <pre> gunzip -c mentry4.4.tar.gz | tar -xf - </pre> </blockquote> <p>On most UNIX systems this can be replaced with</p> <blockquote> <pre> tar -zxf mentry4.4.tar.gz </pre> </blockquote> <p>Both commands will create a directory named <code>mentry4.4</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>mentry4_4.zip</code> into the directory <code>mentry4.4</code>, with the subdirectories <code>demos</code>, <code>doc</code>, and <code>scripts</code>.</p> <p>The file <code>mentryThemes.tcl</code> in the <code>scripts</code> directory is only needed for applications using the Mentry_tile package (see next section).</p> <p>Notice that in tklib the Mentry <code>demos</code> directory is replaced with the subdirectory <code>mentry</code> of the <code>examples</code> directory. Please take this into account when reading the <a href= "#examples">examples</a> below.</p> <h3 id="ov_use">How to Use It?</h3> <p>The Mentry distribution provides two packages, called <b>Mentry</b> and <b>Mentry_tile</b>. The main difference between the two is that Mentry_tile enables the tile-based, theme-specific appearance of mentry widgets; this package requires tile 0.6 or higher. It is not possible to use both packages in one and the same application, because both are implemented in the same <code>mentry</code> namespace and provide identical commands.</p> <p>To be able to access the commands and variables of the Mentry package, your scripts must contain one of the lines</p> <blockquote> <pre> package require mentry ?<i>version</i>? package require Mentry ?<i>version</i>? </pre> </blockquote> <p>You can use either one of the two statements above because the file <code>mentry.tcl</code> contains both lines</p> <blockquote> <pre> package provide mentry ... package provide Mentry ... </pre> </blockquote> <p>Likewise, to be able to access the commands and variables of the Mentry_tile package, your scripts must contain one of the lines</p> <blockquote> <pre> package require mentry_tile ?<i>version</i>? package require Mentry_tile ?<i>version</i>? </pre> </blockquote> |
︙ | ︙ | |||
283 284 285 286 287 288 289 | <li>The variable <code>mentry::version</code> holds the current version number of the Mentry package.</li> <li>The variable <code>mentry::library</code> holds the location of the Mentry installation directory.</li> <li>The read-only variable <code>mentry::usingTile</code> has the value | | | 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | <li>The variable <code>mentry::version</code> holds the current version number of the Mentry package.</li> <li>The variable <code>mentry::library</code> holds the location of the Mentry installation directory.</li> <li>The read-only variable <code>mentry::usingTile</code> has the value <code>0</code> in the Mentry package and the value <code>1</code> in Mentry_tile.</li> <li>In Mentry_tile the array <code>mentry::themeDefaults</code> holds the theme-specific default values of a series of Mentry configuration options.</li> </ul> |
︙ | ︙ | |||
305 306 307 308 309 310 311 | a mentry with their tile counterparts. Actually, the entry components of a tile-based mentry are embedded into Tk frame widgets, which in turn, together with the labels, are packed into a specially constructed tile entry rather than a frame. This somewhat complicated layout is needed because in several themes it is not possible to draw flat, borderless tile enty widgets.</p> | | | | 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 | a mentry with their tile counterparts. Actually, the entry components of a tile-based mentry are embedded into Tk frame widgets, which in turn, together with the labels, are packed into a specially constructed tile entry rather than a frame. This somewhat complicated layout is needed because in several themes it is not possible to draw flat, borderless tile enty widgets.</p> <p>From the above it follows that <b>the Mentry_tile package will only work as expected if the Tk <code>frame</code> and <code>label</code> commands haven't been overridden by using <code>namespace import -force ttk::*</code> at global scope</b>. While earlier tile releases suggested using this command at global scope for the really adventurous, in newer tile versions this is considered a Really Bad Idea, causing many things to break. Instead, <b>you should explicitly invoke <code>ttk::frame</code>, <code>ttk::label</code>, etc. whenever you want to use a tile widget</b>.</p> <p>Another restriction to be taken into account is due to the fact that in earlier tile versions the <code>(ttk::)style theme use</code> command could only be used to set the current theme, but not to retrieve it. For this reason, if the Mentry_tile package cannot get the current theme with the aid of <code>ttk::style theme use</code> then it makes use of the variable <code>ttk::currentTheme</code> or <code>tile::currentTheme</code> (depending on the tile version), which is set by the <code>ttk::setTheme</code> or <code>tile::setTheme</code> command. From this it follows that <b>if the tile version being used doesn't support the <code>ttk::style theme use</code> command without an argument then the tile-based mentry widgets will only have the |
︙ | ︙ |
Changes to modules/mentry/doc/mentryDateTime.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Multi-Entry Widgets for Date and Time</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Multi-Entry Widgets for Date and Time</h1> <h2>For Mentry Version 4.4</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/mentry/doc/mentryFixedPoint.html.
︙ | ︙ | |||
10 11 12 13 14 15 16 | </head> <body> <div> <h1>Multi-Entry Widgets for Real Numbers<br> in Fixed-Point Format</h1> | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | </head> <body> <div> <h1>Multi-Entry Widgets for Real Numbers<br> in Fixed-Point Format</h1> <h2>For Mentry Version 4.4</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/mentry/doc/mentryIPAddr.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Multi-Entry Widgets for IP Addresses</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Multi-Entry Widgets for IP Addresses</h1> <h2>For Mentry Version 4.4</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/mentry/doc/mentryIPv6Addr.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Multi-Entry Widgets for IPv6 Addresses</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Multi-Entry Widgets for IPv6 Addresses</h1> <h2>For Mentry Version 4.4</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/mentry/doc/mentryThemes.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands Related to Tile Themes</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>Commands Related to Tile Themes</h1> <h2>For Mentry Version 4.4</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/mentry/doc/mentryWidget.html.
︙ | ︙ | |||
9 10 11 12 13 14 15 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>The <code><b>mentry::mentry</b></code> Command</h1> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div> <h1>The <code><b>mentry::mentry</b></code> Command</h1> <h2>For Mentry Version 4.4</h2> <h3>by</h3> <h2>Csaba Nemethi</h2> <address> <a href="mailto:[email protected]">[email protected]</a> |
︙ | ︙ |
Changes to modules/mentry/mentry.tcl.
1 2 3 | #============================================================================== # Main Mentry package module. # | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | #============================================================================== # Main Mentry package module. # # Copyright (c) 1999-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require -exact mentry::common 4.4 package provide mentry $mentry::version package provide Mentry $mentry::version mentry::useTile 0 mentry::createBindings |
Changes to modules/mentry/mentryCommon.tcl.
1 2 3 | #============================================================================== # Main Mentry and Mentry_tile package module. # | | | | | 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 | #============================================================================== # Main Mentry and Mentry_tile package module. # # Copyright (c) 1999-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== namespace eval mentry { proc - {} { return [expr {$::tcl_version >= 8.5 ? "-" : ""}] } package require Tk 8.4[-] proc loadWcb {} { if {[catch {package require Wcb 4.0[-]} result1] && [catch {package require wcb 4.0[-]} result2] && [catch {package require Wcb 3.1[-]} result3] && [catch {package require wcb 3.1[-]} result4]} { error "$result1; $result2; $result3; $result4" } } loadWcb # # Public variables: # variable version 4.4 variable library [file dirname [file normalize [info script]]] # # Creates a new multi-entry widget: # namespace export mentry |
︙ | ︙ | |||
48 49 50 51 52 53 54 | # # Implement a multi-entry widget for IPv6 addresses: # namespace export ipv6AddrMentry putIPv6Addr getIPv6Addr } | | | | | | | | | | | | | | | | | | | 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 | # # Implement a multi-entry widget for IPv6 addresses: # namespace export ipv6AddrMentry putIPv6Addr getIPv6Addr } package provide mentry::common $mentry::version # # The following procedure, invoked in "mentry.tcl" and # "mentry_tile.tcl", sets the variable mentry::usingTile # to the given value and sets a trace on this variable. # proc mentry::useTile {bool} { variable usingTile $bool trace add variable usingTile {write unset} \ [list mentry::restoreUsingTile $bool] } # # The following trace procedure is executed whenever the variable # mentry::usingTile is written or unset. It restores the # variable to its original value, given by the first argument. # proc mentry::restoreUsingTile {origVal varName index op} { variable usingTile $origVal switch $op { write { return -code error "it is not supported to use both Mentry and\ Mentry_tile in the same application" } unset { trace add variable usingTile {write unset} \ [list mentry::restoreUsingTile $origVal] } } } proc mentry::createTkAliases {} { foreach cmd {frame entry label} { if {[llength [info commands ::tk::$cmd]] == 0} { interp alias {} tk::$cmd {} $cmd } } } mentry::createTkAliases # # Everything else needed is lazily loaded on demand, via the dispatcher # set up in the subdirectory "scripts" (see the file "tclIndex"). # lappend auto_path [file join $mentry::library scripts] # # Load the package mwutil from the directory "scripts/mwutil". Take into # account that it is also included in Scrollutil, Tablelist, and Tsw. # proc mentry::loadUtil {} { if {[catch {package present mwutil} version] == 0 && [package vcompare $version 2.24] < 0} { package forget mwutil } package require mwutil 2.24[-] } mentry::loadUtil |
Changes to modules/mentry/mentry_tile.tcl.
1 2 3 | #============================================================================== # Main Mentry_tile package module. # | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #============================================================================== # Main Mentry_tile package module. # # Copyright (c) 1999-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package require -exact mentry::common 4.4 if {$::tk_version < 8.5 || [regexp {^8\.5a[1-5]$} $::tk_patchLevel]} { package require tile 0.6[mentry::-] } package provide mentry_tile $mentry::version package provide Mentry_tile $mentry::version mentry::useTile 1 mentry::createBindings namespace eval ::mentry { # # Commands related to tile themes: # namespace export getThemes getCurrentTheme setTheme setThemeDefaults } |
Changes to modules/mentry/pkgIndex.tcl.
1 2 3 | #============================================================================== # Mentry and Mentry_tile package index file. # | | | | | | | | | | 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 | #============================================================================== # Mentry and Mentry_tile package index file. # # Copyright (c) 1999-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== # # Regular packages: # package ifneeded mentry 4.4 \ [list source [file join $dir mentry.tcl]] package ifneeded mentry_tile 4.4 \ [list source [file join $dir mentry_tile.tcl]] # # Aliases: # package ifneeded Mentry 4.4 \ [list package require -exact mentry 4.4] package ifneeded Mentry_tile 4.4 \ [list package require -exact mentry_tile 4.4] # # Code common to all packages: # package ifneeded mentry::common 4.4 \ [list source [file join $dir mentryCommon.tcl]] |
Changes to modules/mentry/scripts/mwutil/mwutil.tcl.
1 2 3 4 5 6 7 | #============================================================================== # Contains utility procedures for mega-widgets. # # Structure of the module: # - Namespace initialization # - Public utility procedures # | | | | > | 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 | #============================================================================== # Contains utility procedures for mega-widgets. # # Structure of the module: # - Namespace initialization # - Public utility procedures # # Copyright (c) 2000-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== if {[catch {package require Tk 8.4-}]} { package require Tk 8.4 } # # Namespace initialization # ======================== # namespace eval mwutil { # # Public variables: # variable version 2.24 variable library [file dirname [file normalize [info script]]] # # Public procedures: # namespace export wrongNumArgs getAncestorByClass convEventFields \ defineKeyNav processTraversal focusNext focusPrev \ configureWidget fullConfigOpt fullOpt enumOpts \ configureSubCmd attribSubCmdEx attribSubCmd \ hasattribSubCmdEx hasattribSubCmd unsetattribSubCmdEx \ unsetattribSubCmd getScrollInfo getScrollInfo2 \ isScrollable scrollByUnits genMouseWheelEvent \ containsPointer hasFocus windowingSystem currentTheme \ normalizeColor parsePadding # # Make modified versions of the procedures tk_focusNext and |
︙ | ︙ | |||
142 143 144 145 146 147 148 | # descendant of a mega-widget of the specified class. #------------------------------------------------------------------------------ proc mwutil::defineKeyNav class { foreach event {<Tab> <Shift-Tab> <<PrevWindow>>} { bind ${class}KeyNav $event \ [list mwutil::processTraversal %W $class $event] } | < < < | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | # descendant of a mega-widget of the specified class. #------------------------------------------------------------------------------ proc mwutil::defineKeyNav class { foreach event {<Tab> <Shift-Tab> <<PrevWindow>>} { bind ${class}KeyNav $event \ [list mwutil::processTraversal %W $class $event] } } #------------------------------------------------------------------------------ # mwutil::processTraversal # # Processes the given traversal event for the mega-widget of the specified # class containing the widget w if that mega-widget is not the only widget |
︙ | ︙ | |||
345 346 347 348 349 350 351 352 353 354 355 356 357 358 | # Returns a string consisting of the elements of the given list, separated by # commas and spaces. #------------------------------------------------------------------------------ proc mwutil::enumOpts optList { set optCount [llength $optList] set n 1 foreach opt $optList { if {$n == 1} { set str $opt } elseif {$n < $optCount} { append str ", $opt" } else { if {$optCount > 2} { append str "," | > | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | # Returns a string consisting of the elements of the given list, separated by # commas and spaces. #------------------------------------------------------------------------------ proc mwutil::enumOpts optList { set optCount [llength $optList] set n 1 foreach opt $optList { set opt [list $opt] if {$n == 1} { set str $opt } elseif {$n < $optCount} { append str ", $opt" } else { if {$optCount > 2} { append str "," |
︙ | ︙ | |||
407 408 409 410 411 412 413 | } } return $result } } #------------------------------------------------------------------------------ | | | < | | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | } } return $result } } #------------------------------------------------------------------------------ # mwutil::attribSubCmdEx # # This procedure is invoked to process *attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::attribSubCmdEx {rootNs win prefix argList} { upvar ::${rootNs}::ns${win}::attribs attribs set argCount [llength $argList] if {$argCount > 1} { # # Set the specified attributes to the given values # if {$argCount % 2 != 0} { |
︙ | ︙ | |||
451 452 453 454 455 456 457 458 459 460 461 462 463 464 | foreach name [lsort [array names attribs "$prefix-*"]] { set attr [string range $name $len end] lappend result [list $attr $attribs($name)] } return $result } } #------------------------------------------------------------------------------ # mwutil::hasattribSubCmd # # This procedure is invoked to process has*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::hasattribSubCmd {win prefix attr} { | > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > | > | > > > > | < | < < < < < < | 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 | foreach name [lsort [array names attribs "$prefix-*"]] { set attr [string range $name $len end] lappend result [list $attr $attribs($name)] } return $result } } #------------------------------------------------------------------------------ # mwutil::attribSubCmd # # This procedure is invoked to process *attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::attribSubCmd {win prefix argList} { set rootNs [string tolower [winfo class $win]] return [attribSubCmdEx $rootNs $win $prefix $argList] } #------------------------------------------------------------------------------ # mwutil::hasattribSubCmdEx # # This procedure is invoked to process has*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::hasattribSubCmdEx {rootNs win prefix attr} { upvar ::${rootNs}::ns${win}::attribs attribs return [info exists attribs($prefix-$attr)] } #------------------------------------------------------------------------------ # mwutil::hasattribSubCmd # # This procedure is invoked to process has*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::hasattribSubCmd {win prefix attr} { set rootNs [string tolower [winfo class $win]] return [hasattribSubCmdEx $rootNs $win $prefix $attr] } #------------------------------------------------------------------------------ # mwutil::unsetattribSubCmdEx # # This procedure is invoked to process unset*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::unsetattribSubCmdEx {rootNs win prefix attr} { upvar ::${rootNs}::ns${win}::attribs attribs set name $prefix-$attr if {[info exists attribs($name)]} { unset attribs($name) } return "" } #------------------------------------------------------------------------------ # mwutil::unsetattribSubCmd # # This procedure is invoked to process unset*attrib subcommands. #------------------------------------------------------------------------------ proc mwutil::unsetattribSubCmd {win prefix attr} { set rootNs [string tolower [winfo class $win]] return [unsetattribSubCmdEx $rootNs $win $prefix $attr] } #------------------------------------------------------------------------------ # mwutil::getScrollInfo # # Parses a list of arguments of the form "moveto <fraction>" or "scroll # <number> units|pages" and returns the corresponding list consisting of two or |
︙ | ︙ |
Changes to modules/mentry/scripts/mwutil/pkgIndex.tcl.
1 2 3 | #============================================================================== # mwutil package index file. # | | | | 1 2 3 4 5 6 7 | #============================================================================== # mwutil package index file. # # Copyright (c) 2020-2025 Csaba Nemethi (E-mail: [email protected]) #============================================================================== package ifneeded mwutil 2.24 [list source [file join $dir mwutil.tcl]] |