Tk Library Source Code

Check-in [48048ea4d3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Wcb: Updated for version 4.2. See the ChangeLog for details.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 48048ea4d301648b86c61c65991613b16e01a9b936b91add605052bc2e8189ef
User & Date: csaba 2025-05-21 18:16:56.272
Context
2025-05-21
18:28
Mentry: Updated for version 4.5. See the ChangeLog for details. check-in: f68c45cec8 user: csaba tags: trunk
18:16
Wcb: Updated for version 4.2. See the ChangeLog for details. check-in: 48048ea4d3 user: csaba tags: trunk
2025-05-17
16:33
Tsw: Updated for version 1.1. See the ChangeLog for details. check-in: 87a5b58271 user: csaba tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/wcb/CHANGES.txt.
1






2
3
4
5
6
7
8
9
What is new in Wcb 4.1.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 Wcb 4.1?
------------------------
|
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
What is new in Wcb 4.2?
-----------------------

1. Improved the documentation, mainly by extending the CSS stylesheet
   used in the HTML files.

What was new in Wcb 4.1.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 Wcb 4.1?
------------------------
Changes to modules/wcb/COPYRIGHT.txt.
1
2
3
4
5
6
7
8
9
Widget callback package Wcb, version 4.1.1
Copyright (c) 1999-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.

This software is distributed WITHOUT ANY WARRANTY; without even the
|
|







1
2
3
4
5
6
7
8
9
Widget callback package Wcb, version 4.2
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/wcb/ChangeLog.











1
2
3
4
5
6
7











2024-11-29  Csaba Nemethi <[email protected]>

	* Released Wcb 4.1.1.

2024-10-19  Csaba Nemethi <[email protected]>

	* *.tcl:         Bumped the version number to 4.1.1.
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2025-05-21  Csaba Nemethi <[email protected]>

	* *.tcl:         Bumped the version number to 4.2.
	* COPYRIGHT.txt:
	* README.txt:

	* CHANGES.txt: Updated to reflect the changes.
	* doc/*.html:

	* doc/stylesheet.css: Extended the CSS stylesheet.

2024-11-29  Csaba Nemethi <[email protected]>

	* Released Wcb 4.1.1.

2024-10-19  Csaba Nemethi <[email protected]>

	* *.tcl:         Bumped the version number to 4.1.1.
Changes to modules/wcb/README.txt.
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
How to Get It?
--------------

Wcb is available for free download from the Web page

    https://www.nemethi.de

The distribution file is "wcb4.1.1.tar.gz" for UNIX and "wcb4_1_1.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.

Wcb 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 Wcb on UNIX, "cd" to the desired directory and unpack the
distribution file "wcb4.1.1.tar.gz":

    gunzip -c wcb4.1.1.tar.gz | tar -xf -

On most UNIX systems this can be replaced with

    tar -zxf wcb4.1.1.tar.gz

Both commands will create a directory named "wcb4.1.1", with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "wcb4_1_1.zip" into the directory "wcb4.1.1", with the
subdirectories "demos", "doc", and "scripts".

How to Use It?
--------------

To be able to use the commands and variables implemented in the package
Wcb, your scripts must contain one of the lines

    package require wcb ?version?
    package require Wcb ?version?

Since the package Wcb is implemented in its own namespace called "wcb",
you must either import the procedures you need, or use qualified names
like "wcb::callback".







|
|












|
<
<


|

|



|

|



|





|
|







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
How to Get It?
--------------

Wcb is available for free download from the Web page

    https://www.nemethi.de

The distribution file is "wcb4.2.tar.gz" for UNIX and "wcb4_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.

Wcb 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 Wcb on UNIX, "cd" to the desired directory and unpack the
distribution file "wcb4.2.tar.gz":

    gunzip -c wcb4.2.tar.gz | tar -xf -

On most UNIX systems this can be replaced with

    tar -zxf wcb4.2.tar.gz

Both commands will create a directory named "wcb4.2", with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "wcb4_2.zip" into the directory "wcb4.2", with the
subdirectories "demos", "doc", and "scripts".

How to Use It?
--------------

To be able to access the commands and variables of the Wcb package, your
scripts must contain one of the lines

    package require wcb ?version?
    package require Wcb ?version?

Since the package Wcb is implemented in its own namespace called "wcb",
you must either import the procedures you need, or use qualified names
like "wcb::callback".
Changes to modules/wcb/doc/index.html.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<head>
  <title>The Widget Callback Package Wcb 4.1</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content=
  "callback, widget, entry, spinbox, listbox, tablelist, text">
</head>

<body>
  <div align="center">
    <h1>The Widget Callback Package Wcb 4.1</h1>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>



|








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<head>
  <title>The Widget Callback Package Wcb 4.2</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content=
  "callback, widget, entry, spinbox, listbox, tablelist, text">
</head>

<body>
  <div align="center">
    <h1>The Widget Callback Package Wcb 4.2</h1>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
Changes to modules/wcb/doc/stylesheet.css.
1
2










3
4
5
6
7
8
9
10
11
12

13



14
15
16
17
/* generic class defining a top margin whose height equals the font size */
.tm {margin-top: 1em}











/* background, border, border-radius, and padding for the <pre> tag */
pre {
  background: #F7F7F7;
  border: silver solid 1px;
  border-radius: 4px;
  padding: 4px;
}

/* background for the <body> tag */

body {background: #FFFFFF}




/* color for the <span> tag */
span.red {color: #E00000}
span.cmt {color: #36648b}


>
>
>
>
>
>
>
>
>
>









|
>
|
>
>
>
|
<
<
<
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



/* generic class defining a top margin whose height equals the font size */
.tm {margin-top: 1em}

/* text-align for the <div> tag */
div {text-align: center}

/* background for the <body> tag */
body {background: #FFFFFF}

/* color for the <span> tag */
span.red {color: #E00000}
span.cmt {color: #36648b}

/* background, border, border-radius, and padding for the <pre> tag */
pre {
  background: #F7F7F7;
  border: silver solid 1px;
  border-radius: 4px;
  padding: 4px;
}

/* background, border, border-radius, and padding for the <code> tag */
code {
  background: #F7F7F7;
  border: #F0F0F0 solid 1px;
  border-radius: 3px;
  padding: 2px;
}



Changes to modules/wcb/doc/wcb.html.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Wcb Programmer's Guide</h1>

    <h2>For Wcb Version 4.1</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Wcb Programmer's Guide</h1>

    <h2>For Wcb Version 4.2</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
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

  <blockquote>
    <address>
      <a href="https://www.nemethi.de">https://www.nemethi.de</a>
    </address>
  </blockquote>

  <p>The distribution file is <code>wcb4.1.1.tar.gz</code> for UNIX and
  <code>wcb4_1_1.zip</code> for Windows.&nbsp; 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>Wcb 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.&nbsp; For example, you can install it as
  a directory at the same level as the Tcl and Tk script libraries.&nbsp; 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 Wcb <i>on UNIX</i>, <code>cd</code> to the desired directory
  and unpack the distribution file <code>wcb4.1.1.tar.gz</code>:</p>

  <blockquote>
    <pre>
gunzip -c wcb4.1.1.tar.gz | tar -xf -
</pre>
  </blockquote>

  <p>On most UNIX systems this can be replaced with</p>

  <blockquote>
    <pre>
tar -zxf wcb4.1.1.tar.gz
</pre>
  </blockquote>

  <p>Both commands will create a directory named <code>wcb4.1.1</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>wcb4_1_1.zip</code> into the directory
  <code>wcb4.1.1</code>, with the subdirectories <code>demos</code>,
  <code>doc</code>, and <code>scripts</code>.</p>

  <p>Notice that in tklib the Wcb <code>demos</code> directory is replaced with
  the subdirectory <code>wcb</code> of the <code>examples</code>
  directory.&nbsp; 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>To be able to access the commands and variables defined in the package
  Wcb, your scripts must contain one of the lines</p>

  <blockquote>
    <pre>
package require wcb ?<i>version</i>?
package require Wcb ?<i>version</i>?
</pre>
  </blockquote>







|
|















|
<
<
|


|



|







|



|
|



|
|









|
|







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

  <blockquote>
    <address>
      <a href="https://www.nemethi.de">https://www.nemethi.de</a>
    </address>
  </blockquote>

  <p>The distribution file is <code>wcb4.2.tar.gz</code> for UNIX and
  <code>wcb4_2.zip</code> for Windows.&nbsp; 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>Wcb 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.&nbsp; For example, you can install it as
  a subdirectory of the <code>lib</code> directory within your Tcl/Tk


  installation.</p>

  <p>To install Wcb <i>on UNIX</i>, <code>cd</code> to the desired directory
  and unpack the distribution file <code>wcb4.2.tar.gz</code>:</p>

  <blockquote>
    <pre>
gunzip -c wcb4.2.tar.gz | tar -xf -
</pre>
  </blockquote>

  <p>On most UNIX systems this can be replaced with</p>

  <blockquote>
    <pre>
tar -zxf wcb4.2.tar.gz
</pre>
  </blockquote>

  <p>Both commands will create a directory named <code>wcb4.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>wcb4_2.zip</code> into the directory
  <code>wcb4.2</code>, with the subdirectories <code>demos</code>,
  <code>doc</code>, and <code>scripts</code>.</p>

  <p>Notice that in tklib the Wcb <code>demos</code> directory is replaced with
  the subdirectory <code>wcb</code> of the <code>examples</code>
  directory.&nbsp; 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>To be able to access the commands and variables of the Wcb package, your
  scripts must contain one of the lines</p>

  <blockquote>
    <pre>
package require wcb ?<i>version</i>?
package require Wcb ?<i>version</i>?
</pre>
  </blockquote>
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
  </blockquote>

  <p>You are free to remove one of these two lines from <code>wcb.tcl</code> if
  you want to prevent the package from making itself known under two different
  names.&nbsp; Of course, by doing so you restrict the argument of&nbsp;
  <code>package require</code>&nbsp; to a single name.</p>

  <p>Since the package Wcb is implemented in its own namespace called
  <code>wcb</code>, you must either invoke the</p>

  <blockquote>
    <pre>
namespace import wcb::<i>pattern</i> ?wcb::<i>pattern ...</i>?
</pre>
  </blockquote>







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
  </blockquote>

  <p>You are free to remove one of these two lines from <code>wcb.tcl</code> if
  you want to prevent the package from making itself known under two different
  names.&nbsp; Of course, by doing so you restrict the argument of&nbsp;
  <code>package require</code>&nbsp; to a single name.</p>

  <p>Since the Wcb package is implemented in its own namespace called
  <code>wcb</code>, you must either invoke the</p>

  <blockquote>
    <pre>
namespace import wcb::<i>pattern</i> ?wcb::<i>pattern ...</i>?
</pre>
  </blockquote>
Changes to modules/wcb/doc/wcbRef.html.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Wcb Command Reference</h1>

    <h2>For Wcb Version 4.1</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Wcb Command Reference</h1>

    <h2>For Wcb Version 4.2</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
Changes to modules/wcb/pkgIndex.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#==============================================================================
# Wcb package index file.
#
# Copyright (c) 1999-2024  Csaba Nemethi (E-mail: [email protected])
#==============================================================================

#
# Regular package:
#
package ifneeded wcb 4.1.1 [list source [file join $dir wcb.tcl]]

#
# Alias:
#
package ifneeded Wcb 4.1.1 { package require -exact wcb 4.1.1 }



|





|




|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#==============================================================================
# Wcb package index file.
#
# Copyright (c) 1999-2025  Csaba Nemethi (E-mail: [email protected])
#==============================================================================

#
# Regular package:
#
package ifneeded wcb 4.2 [list source [file join $dir wcb.tcl]]

#
# Alias:
#
package ifneeded Wcb 4.2 { package require -exact wcb 4.2 }
Changes to modules/wcb/wcb.tcl.
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 Wcb package module.
#
# Copyright (c) 1999-2024  Csaba Nemethi (E-mail: [email protected])
#==============================================================================

if {$tcl_version >= 8.5} {
    package require Tk 8.4-
} else {
    package require Tk 8.4
}

namespace eval wcb {
    #
    # Public variables:
    #
    variable version	4.1.1
    variable library	[file dirname [file normalize [info script]]]

    #
    # Basic procedures:
    #
    namespace export	callback cbappend cbprepend cancel canceled \
			extend replace pathname



|












|







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 Wcb package module.
#
# Copyright (c) 1999-2025  Csaba Nemethi (E-mail: [email protected])
#==============================================================================

if {$tcl_version >= 8.5} {
    package require Tk 8.4-
} else {
    package require Tk 8.4
}

namespace eval wcb {
    #
    # Public variables:
    #
    variable version	4.2
    variable library	[file dirname [file normalize [info script]]]

    #
    # Basic procedures:
    #
    namespace export	callback cbappend cbprepend cancel canceled \
			extend replace pathname