arcadia 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +25 -14
- data/conf/LC/en-UK.LANG +3 -1
- data/conf/arcadia.conf +10 -0
- data/conf/arcadia.res.rb +29 -1
- data/ext/ae-editor/ae-editor.rb +239 -48
- data/ext/ae-file-history/ae-file-history.conf +11 -1
- data/ext/ae-file-history/ae-file-history.rb +120 -2
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +6 -5
- data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +7 -3
- data/ext/ae-term/ae-term.rb +1 -1
- data/lib/a-commons.rb +72 -56
- data/lib/a-contracts.rb +23 -1
- data/lib/a-core.rb +136 -41
- data/lib/a-tkcommons.rb +127 -36
- data/tcl/fsdialog/fsdialog.tcl +2 -2
- data/tcl/ptwidgets-1.1.0/COPYRIGHT +10 -0
- data/tcl/ptwidgets-1.1.0/ChangeLog +194 -0
- data/tcl/ptwidgets-1.1.0/README +50 -0
- data/tcl/ptwidgets-1.1.0/common/stacktrace.tcl +29 -0
- data/tcl/ptwidgets-1.1.0/common/tokenframe.tcl +200 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_off.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_on.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokenentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example2.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/wmarkentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/toggleswitch.html +402 -0
- data/tcl/ptwidgets-1.1.0/doc/tokenentry.html +1366 -0
- data/tcl/ptwidgets-1.1.0/doc/tokensearch.html +1549 -0
- data/tcl/ptwidgets-1.1.0/doc/wmarkentry.html +634 -0
- data/tcl/ptwidgets-1.1.0/library/toggleswitch.tcl +432 -0
- data/tcl/ptwidgets-1.1.0/library/tokenentry.tcl +2208 -0
- data/tcl/ptwidgets-1.1.0/library/tokensearch.tcl +2488 -0
- data/tcl/ptwidgets-1.1.0/library/wmarkentry.tcl +630 -0
- data/tcl/ptwidgets-1.1.0/pkgIndex.tcl +10 -0
- data/tcl/ptwidgets-1.1.0/test/Makefile +3 -0
- data/tcl/ptwidgets-1.1.0/test/run.tcl +3 -0
- data/tcl/ptwidgets-1.1.0/test/test.tcl +89 -0
- data/tcl/ptwidgets-1.1.0/test/toggleswitch.test +562 -0
- data/tcl/ptwidgets-1.1.0/test/tokenentry.test +1023 -0
- data/tcl/ptwidgets-1.1.0/test/tokensearch.test +1023 -0
- data/tcl/ptwidgets-1.1.0/test/wmarkentry.test +1325 -0
- data/tcl/themes/altTheme.tcl +101 -0
- data/tcl/themes/aquaTheme.tcl +59 -0
- data/tcl/themes/clamTheme.tcl +140 -0
- data/tcl/themes/classicTheme.tcl +108 -0
- data/tcl/themes/pkgIndex.tcl +3 -0
- data/tcl/themes/ttk.tcl +176 -0
- data/tcl/themes/vistaTheme.tcl +224 -0
- data/tcl/themes/winTheme.tcl +80 -0
- data/tcl/themes/xpTheme.tcl +65 -0
- data/tcl/tkfbox/folder.gif +0 -0
- data/tcl/tkfbox/textfile.gif +0 -0
- data/tcl/tkfbox/tkfbox.tcl +1 -0
- data/tcl/tkfbox/tkfbox.tcl~ +1 -0
- data/tcl/tkfbox/updir.xbm +1 -0
- metadata +43 -2
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,402 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>The toggleswitch Widget</title>
|
4
|
+
</head>
|
5
|
+
<body bgcolor="#FFFFFF">
|
6
|
+
<div align="center">
|
7
|
+
<h1>The <code><b>toggleswitch</b></code> Widget</h1>
|
8
|
+
<h3>by</h3>
|
9
|
+
<h2>Trevor Williams</h2>
|
10
|
+
<address>
|
11
|
+
<a href="mailto:phase1geo@gmail.com">phase1geo@gmail.com</a>
|
12
|
+
</address>
|
13
|
+
</div>
|
14
|
+
<hr>
|
15
|
+
<h2><a name="reference"></a>Reference</h2>
|
16
|
+
|
17
|
+
<dl>
|
18
|
+
|
19
|
+
<dt><a href="#name">NAME</a></dt>
|
20
|
+
<dd><code>toggleswitch::toggleswitch</code> - Create and manipulate toggleswitch widgets</dd>
|
21
|
+
|
22
|
+
<dt><br><a href="#synopsis">SYNOPSIS</a></dt>
|
23
|
+
<dd>
|
24
|
+
<dl>
|
25
|
+
<dt><code><b>toggleswitch::toggleswitch</b> <i>pathName ?options?</i></code></dt>
|
26
|
+
</dl>
|
27
|
+
</dd>
|
28
|
+
|
29
|
+
<dt><a href="#std_options">STANDARD OPTIONS</a></dt>
|
30
|
+
<dd>
|
31
|
+
<dl>
|
32
|
+
<dt><code><b>-borderwidth</b></code></dt>
|
33
|
+
<dt><code><b>-cursor</b></code></dt>
|
34
|
+
<dt><code><b>-font</b></code></dt>
|
35
|
+
<dt><code><b>-relief</b></code></dt>
|
36
|
+
<dt><code><b>-state</b></code></dt>
|
37
|
+
<dt><code><b>-takefocus</b></code></dt>
|
38
|
+
<dt><code><b>-variable</b></code></dt>
|
39
|
+
</dl>
|
40
|
+
</dd>
|
41
|
+
|
42
|
+
<dt><a href="#entry_options">WIDGET-SPECIFIC OPTIONS</a>
|
43
|
+
<dd>
|
44
|
+
<dl>
|
45
|
+
<dt><code><b><a href="#command">-command</a></b> <i>name</i></code></dt>
|
46
|
+
<dt><code><b><a href="#offbackground">-offbackground</a></b> <i>color</i></code></dt>
|
47
|
+
<dt><code><b><a href="#offforeground">-offforeground</a></b> <i>color</i></code></dt>
|
48
|
+
<dt><code><b><a href="#offvalue">-offvalue</a></b> <i>variable</i></code></dt>
|
49
|
+
<dt><code><b><a href="#onbackground">-onbackground</a></b> <i>color</i></code></dt>
|
50
|
+
<dt><code><b><a href="#onforeground">-onforeground</a></b> <i>color</i></code></dt>
|
51
|
+
<dt><code><b><a href="#onvalue">-onvalue</a></b> <i>variable</i></code></dt>
|
52
|
+
</dl>
|
53
|
+
</dd>
|
54
|
+
</dt>
|
55
|
+
|
56
|
+
<dt><a href="#description">DESCRIPTION</a></dt><br>
|
57
|
+
|
58
|
+
<dt><a href="#wdgt_command">WIDGET COMMANDS</a></dt><br>
|
59
|
+
|
60
|
+
<dd><code><i>pathName</i> <b><a href="#cget">cget</a></b>
|
61
|
+
<i>option</i></code></dd>
|
62
|
+
|
63
|
+
<dd><code><i>pathName</i> <b><a href="#configure">configure</a></b>
|
64
|
+
<i>?option? ?value option value ...?</i></code></dd>
|
65
|
+
|
66
|
+
<dd><code><i>pathName</i> <b><a href="#invoke">invoke</a></b></code></dd>
|
67
|
+
|
68
|
+
<dd><code><i>pathName</i> <b><a href="#switchoff">switchoff</a></b></code></dd>
|
69
|
+
|
70
|
+
<dd><code><i>pathName</i> <b><a href="#switchon">switchon</a></b></code></dd>
|
71
|
+
|
72
|
+
<dd><code><i>pathName</i> <b><a href="#toggle">toggle</a></b></code></dd><br>
|
73
|
+
|
74
|
+
<dt><a href="#default_bindings">DEFAULT BINDINGS</a></dt><br>
|
75
|
+
|
76
|
+
<dt><a href="#keywords">KEYWORDS</a></dt>
|
77
|
+
|
78
|
+
</dl>
|
79
|
+
|
80
|
+
<h2><a name="detailed_ref"></a><b>Detailed Reference</b></h2>
|
81
|
+
|
82
|
+
<dl>
|
83
|
+
|
84
|
+
<dt><a name="name"></a><b>NAME</b></dt>
|
85
|
+
<dd><code>toggleswitch::toggleswitch</code> - Create and manipulate toggleswitch widgets</dd>
|
86
|
+
|
87
|
+
<dt><br><a name="synopsis"></a><b>SYNOPSIS</b></dt>
|
88
|
+
<dd>
|
89
|
+
<pre>
|
90
|
+
<b>toggleswitch::toggleswitch</b> <i>pathName</i> ?<i>options</i>?
|
91
|
+
</pre>
|
92
|
+
</dd>
|
93
|
+
|
94
|
+
<dt><a name="std_options"></a><b>STANDARD_OPTIONS</b></dt>
|
95
|
+
<dd>
|
96
|
+
<dl>
|
97
|
+
<dt><code><b>-borderwidth</b></code></dt>
|
98
|
+
<dt><code><b>-cursor</b></code></dt>
|
99
|
+
<dt><code><b>-font</b></code></dt>
|
100
|
+
<dt><code><b>-relief</b></code></dt>
|
101
|
+
<dt><code><b>-state</b></code></dt>
|
102
|
+
<dt><code><b>-takefocus</b></code></dt>
|
103
|
+
<dt><code><b>-variable</b></code></dt>
|
104
|
+
</dl>
|
105
|
+
</dd>
|
106
|
+
<dd>
|
107
|
+
See the <b>options</b> manual entry for details on the standard options.
|
108
|
+
</dd>
|
109
|
+
|
110
|
+
<dt><br><a name="wdgt_options"></a><b>WIDGET-SPECIFIC OPTIONS</b></dt><br>
|
111
|
+
|
112
|
+
<dd>
|
113
|
+
<a name="command"></a>
|
114
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
115
|
+
<tr>
|
116
|
+
<td>Command-Line Name: </td>
|
117
|
+
<td><code><b>-command</b></code></td>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td>Database Name:</td>
|
121
|
+
<td><code><b> command</b></code></td>
|
122
|
+
</tr>
|
123
|
+
<tr>
|
124
|
+
<td>Database Class:</td>
|
125
|
+
<td><code><b> Command</b></code></td>
|
126
|
+
</tr>
|
127
|
+
</table>
|
128
|
+
<blockquote>
|
129
|
+
<p>
|
130
|
+
A Tcl script to execute whenever the widget is invoked. The widget's global
|
131
|
+
variable (<b>-variable</b> option) will be updated before the command is
|
132
|
+
invoked.
|
133
|
+
</p>
|
134
|
+
</blockquote>
|
135
|
+
</dd>
|
136
|
+
|
137
|
+
<dd>
|
138
|
+
<a name="offbackground"></a>
|
139
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
140
|
+
<tr>
|
141
|
+
<td>Command-Line Name: </td>
|
142
|
+
<td><code><b>-offbackground</b></code></td>
|
143
|
+
</tr>
|
144
|
+
<tr>
|
145
|
+
<td>Database Name:</td>
|
146
|
+
<td><code><b> offBackground</b></code></td>
|
147
|
+
</tr>
|
148
|
+
<tr>
|
149
|
+
<td>Database Class:</td>
|
150
|
+
<td><code><b> Background</b></code></td>
|
151
|
+
</tr>
|
152
|
+
</table>
|
153
|
+
<blockquote>
|
154
|
+
<p>
|
155
|
+
Specifies the background color to use for the off side of the widget.
|
156
|
+
</p>
|
157
|
+
</blockquote>
|
158
|
+
</dd>
|
159
|
+
|
160
|
+
<dd>
|
161
|
+
<a name="offforeground"></a>
|
162
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
163
|
+
<tr>
|
164
|
+
<td>Command-Line Name: </td>
|
165
|
+
<td><code><b>-offforeground</b></code></td>
|
166
|
+
</tr>
|
167
|
+
<tr>
|
168
|
+
<td>Database Name:</td>
|
169
|
+
<td><code><b> offForeground</b></code></td>
|
170
|
+
</tr>
|
171
|
+
<tr>
|
172
|
+
<td>Database Class:</td>
|
173
|
+
<td><code><b> Foreground</b></code></td>
|
174
|
+
</tr>
|
175
|
+
</table>
|
176
|
+
<blockquote>
|
177
|
+
<p>
|
178
|
+
Specifies the foreground color to use for the off side of the widget.
|
179
|
+
</p>
|
180
|
+
</blockquote>
|
181
|
+
</dd>
|
182
|
+
|
183
|
+
<dd>
|
184
|
+
<a name="offvalue"></a>
|
185
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
186
|
+
<tr>
|
187
|
+
<td>Command-Line Name: </td>
|
188
|
+
<td><code><b>-offvalue</b></code></td>
|
189
|
+
</tr>
|
190
|
+
<tr>
|
191
|
+
<td>Database Name:</td>
|
192
|
+
<td><code><b> offValue</b></code></td>
|
193
|
+
</tr>
|
194
|
+
<tr>
|
195
|
+
<td>Database Class:</td>
|
196
|
+
<td><code><b> Value</b></code></td>
|
197
|
+
</tr>
|
198
|
+
</table>
|
199
|
+
<blockquote>
|
200
|
+
<p>
|
201
|
+
Specifies value to store in the widget's associated variable whenever this
|
202
|
+
widget is set to the off position. Defaults to "0".
|
203
|
+
</p>
|
204
|
+
</blockquote>
|
205
|
+
</dd>
|
206
|
+
|
207
|
+
<dd>
|
208
|
+
<a name="onbackground"></a>
|
209
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
210
|
+
<tr>
|
211
|
+
<td>Command-Line Name: </td>
|
212
|
+
<td><code><b>-onbackground</b></code></td>
|
213
|
+
</tr>
|
214
|
+
<tr>
|
215
|
+
<td>Database Name:</td>
|
216
|
+
<td><code><b> onBackground</b></code></td>
|
217
|
+
</tr>
|
218
|
+
<tr>
|
219
|
+
<td>Database Class:</td>
|
220
|
+
<td><code><b> Background</b></code></td>
|
221
|
+
</tr>
|
222
|
+
</table>
|
223
|
+
<blockquote>
|
224
|
+
<p>
|
225
|
+
Specifies the background color to use for the on side of the widget.
|
226
|
+
</p>
|
227
|
+
</blockquote>
|
228
|
+
</dd>
|
229
|
+
|
230
|
+
<dd>
|
231
|
+
<a name="onforeground"></a>
|
232
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
233
|
+
<tr>
|
234
|
+
<td>Command-Line Name: </td>
|
235
|
+
<td><code><b>-onforeground</b></code></td>
|
236
|
+
</tr>
|
237
|
+
<tr>
|
238
|
+
<td>Database Name:</td>
|
239
|
+
<td><code><b> onForeground</b></code></td>
|
240
|
+
</tr>
|
241
|
+
<tr>
|
242
|
+
<td>Database Class:</td>
|
243
|
+
<td><code><b> Foreground</b></code></td>
|
244
|
+
</tr>
|
245
|
+
</table>
|
246
|
+
<blockquote>
|
247
|
+
<p>
|
248
|
+
Specifies the foreground color to use for the on side of the widget.
|
249
|
+
</p>
|
250
|
+
</blockquote>
|
251
|
+
</dd>
|
252
|
+
|
253
|
+
<dd>
|
254
|
+
<a name="onvalue"></a>
|
255
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
256
|
+
<tr>
|
257
|
+
<td>Command-Line Name: </td>
|
258
|
+
<td><code><b>-onvalue</b></code></td>
|
259
|
+
</tr>
|
260
|
+
<tr>
|
261
|
+
<td>Database Name:</td>
|
262
|
+
<td><code><b> onValue</b></code></td>
|
263
|
+
</tr>
|
264
|
+
<tr>
|
265
|
+
<td>Database Class:</td>
|
266
|
+
<td><code><b> Value</b></code></td>
|
267
|
+
</tr>
|
268
|
+
</table>
|
269
|
+
<blockquote>
|
270
|
+
<p>
|
271
|
+
Specifies value to store in the widget's associated variable whenever this
|
272
|
+
widget is set to the on position. Defaults to "1".
|
273
|
+
</p>
|
274
|
+
</blockquote>
|
275
|
+
</dd>
|
276
|
+
|
277
|
+
<dt><a name="description"></a><b>DESCRIPTION</b></dt>
|
278
|
+
<dd><br>
|
279
|
+
The <code><b>toggleswitch::toggleswitch</b></code> command creates a new window named
|
280
|
+
<code><i>pathName</i></code> and of the class <code><b>ToggleSwitch</b></code>, and makes it
|
281
|
+
into a toggleswitch widget. Additional options, described above, may be
|
282
|
+
specified on the command-line or in the option database to configure aspects of the
|
283
|
+
toggleswitch. The <code><b>toggleswitch::toggleswitch</b></code> command
|
284
|
+
returns its <code><i>pathName</i></code> argument. At the time this command
|
285
|
+
is invoked, there must not exist a window named <code><i>pathName</i></code>, but
|
286
|
+
<code><i>pathName</i></code>'s parent must exist.
|
287
|
+
</dd>
|
288
|
+
<dd><br>
|
289
|
+
The toggleswitch widget is a widget that looks like an on/off switch. The widget
|
290
|
+
acts like a checkbutton widget in all other aspects. The user can switch the
|
291
|
+
widget to the on/off state by either left-clicking on the on/off sides of the widget
|
292
|
+
or by sliding the slider to either side.
|
293
|
+
</dd>
|
294
|
+
|
295
|
+
<dt><br>
|
296
|
+
<a name="wdgt_command"></a><b>WIDGET COMMANDS</b></dt>
|
297
|
+
<dd><br>
|
298
|
+
The <code><b>toggleswitch::toggleswitch</b></code> command creates a new Tcl command whose
|
299
|
+
name is <code><i>pathName</i></code>. This command may be used to invoke various
|
300
|
+
operations on the widget. It has the following general form:
|
301
|
+
<blockquote>
|
302
|
+
<pre>
|
303
|
+
<i>pathName</i> <i>option ?arg arg ...?</i>
|
304
|
+
</pre>
|
305
|
+
</blockquote>
|
306
|
+
</dd>
|
307
|
+
<dd>
|
308
|
+
<code><i>option</i></code> and the <code><i>arg</i></code> determine the exact behavior
|
309
|
+
of the command. The following commands are possible for tokenentry widgets:
|
310
|
+
</dd>
|
311
|
+
<dd>
|
312
|
+
<dl>
|
313
|
+
<dt><br><a name="cget"></a>
|
314
|
+
<code><i>pathName</i> <b>cget</b> <i>option</i></code></dt>
|
315
|
+
<dd>
|
316
|
+
Returns the current value of the configuration option given by <i>option</i>.
|
317
|
+
<i>Option</i> may have any of the values accepted by the Tk <b>entry</b> command.
|
318
|
+
</dd>
|
319
|
+
<dt><br><a name="configure"></a>
|
320
|
+
<code><i>pathName</i> <b>configure</b> <i>?option? ?value option value ...?</i></code></dt>
|
321
|
+
<dd>
|
322
|
+
Query or modify the configuration options of the widget. If no <i>option</i> is
|
323
|
+
specified, returns a list describing all of the available options for <i>pathName</i>
|
324
|
+
(see Tk_ConfigureInfo for information on the format of this list). If <i>option</i> is
|
325
|
+
specified with no <i>value</i>, then the command returns a list describing the one
|
326
|
+
named option (this list will be identical to the corresponding sublist of the value
|
327
|
+
returned if no <i>option</i> is specified). If one or more <i>option-value</i> pairs
|
328
|
+
are specified, then the command modifies the given widget option(s) to have the given
|
329
|
+
value(s); in this case the command returns an empty string. <i>Option</i> may have any
|
330
|
+
of the values accepted by the Tk <b>entry</b> command.
|
331
|
+
</dd>
|
332
|
+
<dt><br><a name="invoke"></a>
|
333
|
+
<code><i>pathName</i> <b>invoke</b></code></dt>
|
334
|
+
<dd>
|
335
|
+
Does just what would have happend if the user invoked the toggleswitch with the
|
336
|
+
mouse: toggle the on/off state of the widget and invoke the Tcl command associated
|
337
|
+
with the toggleswitch, if there is one. The return value is the return value
|
338
|
+
from the Tcl command, or an empty string if there is no command associated
|
339
|
+
with the toggleswitch. This command is ignored if the toggleswitch's state
|
340
|
+
is <b>disabled</b>.
|
341
|
+
</dd>
|
342
|
+
<dt><br><a name="switchoff"></a>
|
343
|
+
<code><i>pathName</i> <b>switchoff</b></code></dt>
|
344
|
+
<dd>
|
345
|
+
Switches the widget to the "off" position and sets the associated variable to its
|
346
|
+
"off" value.
|
347
|
+
</dd>
|
348
|
+
<dt><br><a name="switchon"></a>
|
349
|
+
<code><i>pathName</i> <b>switchon</b></code></dt>
|
350
|
+
<dd>
|
351
|
+
Switches the widget to the "on" position and sets the associated variable to
|
352
|
+
its "on" value.
|
353
|
+
</dd>
|
354
|
+
<dt><br><a name="toggle"></a>
|
355
|
+
<code><i>pathName</i> <b>toggle</b></code></dt>
|
356
|
+
<dd>
|
357
|
+
Toggles the on/off value of the widget, redisplaying it and modifying its
|
358
|
+
associated variable to reflect the new state.
|
359
|
+
</dd>
|
360
|
+
</dl>
|
361
|
+
</dd>
|
362
|
+
|
363
|
+
<dt><a name="default_bindings"></a><b>DEFAULT BINDINGS</b></dt>
|
364
|
+
<dd><br>
|
365
|
+
Tk automatically creates class bindings for entries that give them the following default
|
366
|
+
behavior. In the descriptions below, "word" refers to a contiguous group of letters, digits,
|
367
|
+
or "_" characters, or any single character other than these.
|
368
|
+
<ol>
|
369
|
+
<li>
|
370
|
+
Clicking mouse button 1 on the "ON" text will slide the slider to the left,
|
371
|
+
switching the value of the toggleswitch to the "off" value, revealing the
|
372
|
+
"OFF" text.
|
373
|
+
</li><br>
|
374
|
+
<li>
|
375
|
+
Clicking mouse button 1 on the "OFF" text will slide the slider to the right,
|
376
|
+
switching the value of the toggleswitch to the "on" value, revealing the "ON"
|
377
|
+
text.
|
378
|
+
</li><br>
|
379
|
+
<li>
|
380
|
+
Pressing mouse button 1 on the switch slider and moving the mouse with mouse
|
381
|
+
button 1 pressed will move the toggleswitch slider under the mouse position.
|
382
|
+
Releasing mouse button 1 will move the slider to the on or off position
|
383
|
+
depending on the position of the slider's midpoint.
|
384
|
+
</li><br>
|
385
|
+
<li>
|
386
|
+
Pressing the space bar while the widget has focus will toggle the value of
|
387
|
+
the toggleswitch.
|
388
|
+
</li><br>
|
389
|
+
<li>
|
390
|
+
When the toggleswitch loses focus, the focus is given to the next item that
|
391
|
+
has its -takefocus value set to a value of 1.
|
392
|
+
</li>
|
393
|
+
</ol>
|
394
|
+
</dd>
|
395
|
+
|
396
|
+
<dt><a name="keywords"></a><b>KEYWORDS</b></dt><br>
|
397
|
+
<dd>
|
398
|
+
checkbutton, widget
|
399
|
+
</dd>
|
400
|
+
</dl>
|
401
|
+
</body>
|
402
|
+
</html>
|
@@ -0,0 +1,1366 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>The tokenentry Widget</title>
|
4
|
+
</head>
|
5
|
+
<body bgcolor="#FFFFFF">
|
6
|
+
<div align="center">
|
7
|
+
<h1>The <code><b>tokenentry</b></code> Widget</h1>
|
8
|
+
<h3>by</h3>
|
9
|
+
<h2>Trevor Williams</h2>
|
10
|
+
<address>
|
11
|
+
<a href="mailto:phase1geo@gmail.com">phase1geo@gmail.com</a>
|
12
|
+
</address>
|
13
|
+
</div>
|
14
|
+
<hr>
|
15
|
+
<h2><a name="reference"></a>Reference</h2>
|
16
|
+
|
17
|
+
<dl>
|
18
|
+
|
19
|
+
<dt><a href="#name">NAME</a></dt>
|
20
|
+
<dd><code>tokenentry::tokenentry</code> - Create and manipulate tokenentry widgets</dd>
|
21
|
+
|
22
|
+
<dt><br><a href="#synopsis">SYNOPSIS</a></dt>
|
23
|
+
<dd>
|
24
|
+
<dl>
|
25
|
+
<dt><code><b>tokenentry::tokenentry</b> <i>pathName ?options?</i></code></dt>
|
26
|
+
</dl>
|
27
|
+
</dd>
|
28
|
+
|
29
|
+
<dt><a href="#std_options">STANDARD OPTIONS</a></dt>
|
30
|
+
<dd>
|
31
|
+
<dl>
|
32
|
+
<dt><code><b>-background</b> or <b>-bg</b></code></dt>
|
33
|
+
<dt><code><b>-borderwidth</b> or <b>-bd</b></code></dt>
|
34
|
+
<dt><code><b>-cursor</b></code></dt>
|
35
|
+
<dt><code><b>-exportselection</b></code></dt>
|
36
|
+
<dt><code><b>-font</b></code></dt>
|
37
|
+
<dt><code><b>-foreground</b> or <b>-fg</b></code></dt>
|
38
|
+
<dt><code><b>-highlightbackground</b></code></dt>
|
39
|
+
<dt><code><b>-highlightcolor</b></code></dt>
|
40
|
+
<dt><code><b>-highlightthickness</b></code></dt>
|
41
|
+
<dt><code><b>-insertbackground</b></code></dt>
|
42
|
+
<dt><code><b>-insertborderwidth</b></code></dt>
|
43
|
+
<dt><code><b>-insertofftime</b></code></dt>
|
44
|
+
<dt><code><b>-insertontime</b></code></dt>
|
45
|
+
<dt><code><b>-insertwidth</b></code></dt>
|
46
|
+
<dt><code><b>-padx</b></code></dt>
|
47
|
+
<dt><code><b>-pady</b></code></dt>
|
48
|
+
<dt><code><b>-relief</b></code></dt>
|
49
|
+
<dt><code><b>-selectbackground</b></code></dt>
|
50
|
+
<dt><code><b>-selectborderwidth</b></code></dt>
|
51
|
+
<dt><code><b>-selectforeground</b></code></dt>
|
52
|
+
<dt><code><b>-setgrid</b></code></dt>
|
53
|
+
<dt><code><b>-takefocus</b></code></dt>
|
54
|
+
<dt><code><b>-xscrollcommand</b></code></dt>
|
55
|
+
<dt><code><b>-yscrollcommand</b></code></dt>
|
56
|
+
</dl>
|
57
|
+
</dd>
|
58
|
+
|
59
|
+
<dt><a href="#wdgt_options">WIDGET-SPECIFIC OPTIONS</a>
|
60
|
+
<dd>
|
61
|
+
<dl>
|
62
|
+
<dt><code><b><a href="#dropdownformatstring">-dropdownformatstring</a></b> <i>string</i></code></dt>
|
63
|
+
<dt><code><b><a href="#dropdownheight">-dropdownheight</a></b> <i>numlines</i></code></dt>
|
64
|
+
<dt><code><b><a href="#dropdownmaxheight">-dropdownmaxheight</a></b> <i>numlines</i></code></dt>
|
65
|
+
<dt><code><b><a href="#height">-height</a></b> <i>numlines</i></code></dt>
|
66
|
+
<dt><code><b><a href="#listvar">-listvar</a></b> <i>variable</i></code></dt>
|
67
|
+
<dt><code><b><a href="#matchcase">-matchcase</a></b> <i>bool</i></code></dt>
|
68
|
+
<dt><code><b><a href="#matchdisplayindex">-matchdisplayindex</a></b> <i>index</i></code></dt>
|
69
|
+
<dt><code><b><a href="#matchindex">-matchindex</a></b> <i>index</i></code></dt>
|
70
|
+
<dt><code><b><a href="#matchmode">-matchmode</a> glob|regexp</b></code></dt>
|
71
|
+
<dt><code><b><a href="#state">-state</a> normal|disabled</b></code></dt>
|
72
|
+
<dt><code><b><a href="#tokenbg">-tokenbg</a></b> <i>color</i></code></dt>
|
73
|
+
<dt><code><b><a href="#tokenbordercolor">-tokenbordercolor</a></b> <i>color</i></code></dt>
|
74
|
+
<dt><code><b><a href="#tokenfg">-tokenfg</a></b> <i>color</i></code></dt>
|
75
|
+
<dt><code><b><a href="#tokenselectbg">-tokenselectbg</a></b> <i>color</i></code></dt>
|
76
|
+
<dt><code><b><a href="#tokenselectfg">-tokenselectfg</a></b> <i>color</i></code></dt>
|
77
|
+
<dt><code><b><a href="#tokenselectbordercolor">-tokenselectbordercolor</a></b> <i>color</i></code></dt>
|
78
|
+
<dt><code><b><a href="#tokenshape">-tokenshape</a></b> <i>shape(s)</i></code></dt>
|
79
|
+
<dt><code><b><a href="#tokenvar">-tokenvar</a></b> <i>variable</i></code></dt>
|
80
|
+
<dt><code><b><a href="#watermark">-watermark</a></b> <i>text</i></code></dt>
|
81
|
+
<dt><code><b><a href="#watermarkfg">-watermarkfg</a></b> <i>color</i></code></dt>
|
82
|
+
<dt><code><b><a href="#width">-width</a></b> <i>characters</i></code></dt>
|
83
|
+
<dt><code><b><a href="#wrap">-wrap</a></b> <i>bool</i></code></dt>
|
84
|
+
</dl>
|
85
|
+
</dd>
|
86
|
+
|
87
|
+
<dt><a href="#description">DESCRIPTION</a></dt><br>
|
88
|
+
|
89
|
+
<dt><a href="#token_options">TOKEN CONFIGURATION OPTIONS</a></dt>
|
90
|
+
<dd>
|
91
|
+
<dl>
|
92
|
+
<dt><code><b><a href="#token_bg">-background</a></b> <i>color</i></code></dt>
|
93
|
+
<dt><code><b><a href="#token_bg">-bg</a></b> <i>color</i></code></dt>
|
94
|
+
<dt><code><b><a href="#token_bordercolor">-bordercolor</a></b> <i>color</i></code></dt>
|
95
|
+
<dt><code><b><a href="#token_fg">-foreground</a></b> <i>color</i></code></dt>
|
96
|
+
<dt><code><b><a href="#token_fg">-fg</a></b> <i>color</i></code></dt>
|
97
|
+
<dt><code><b><a href="#token_selectbg">-selectbackground</a></b> <i>color</i></code></dt>
|
98
|
+
<dt><code><b><a href="#token_selectbg">-selectbg</a></b> <i>color</i></code></dt>
|
99
|
+
<dt><code><b><a href="#token_selectbordercolor">-selectbordercolor</a></b> <i>color</i></code></dt>
|
100
|
+
<dt><code><b><a href="#token_selectfg">-selectforeground</a></b> <i>color</i></code></dt>
|
101
|
+
<dt><code><b><a href="#token_selectfg">-selectfg</a></b> <i>color</i></code></dt>
|
102
|
+
<dt><code><b><a href="#token_shape">-shape</a></b> <i>shape(s)</i></code></dt>
|
103
|
+
<dt><code><b><a href="#token_text">-text</a></b> <i>text</i></code></dt>
|
104
|
+
</dl>
|
105
|
+
</dd>
|
106
|
+
|
107
|
+
<dt><a href="#wdgt_command">WIDGET COMMANDS</a></dt><br>
|
108
|
+
|
109
|
+
<dd><code><i>pathName</i> <b><a href="#cget">cget</a></b>
|
110
|
+
<i>option</i></code></dd>
|
111
|
+
|
112
|
+
<dd><code><i>pathName</i> <b><a href="#configure">configure</a></b>
|
113
|
+
<i>?option? ?value option value ...?</i></code></dd>
|
114
|
+
|
115
|
+
<dd><code><i>pathName</i> <b><a href="#entryget">entryget</a></b></code></dd>
|
116
|
+
|
117
|
+
<dd><code><i>pathName</i> <b><a href="#see">see</a></b>
|
118
|
+
<i>index</i></code></dd>
|
119
|
+
|
120
|
+
<dd><code><i>pathName</i> <b><a href="#tokencget">tokencget</a></b>
|
121
|
+
<i>option</i></code></dd>
|
122
|
+
|
123
|
+
<dd><code><i>pathName</i> <b><a href="#tokenconfigure">tokenconfigure</a></b>
|
124
|
+
<i>?option? ?value option value ...?</i></code></dd>
|
125
|
+
|
126
|
+
<dd><code><i>pathName</i> <b><a href="#tokendelete">tokendelete</a></b>
|
127
|
+
<i>firstIndex ?lastIndex?</i></code></dd>
|
128
|
+
|
129
|
+
<dd><code><i>pathName</i> <b><a href="#tokenget">tokenget</a></b></code></dd>
|
130
|
+
|
131
|
+
<dd><code><i>pathName</i> <b><a href="#tokenindex">tokenindex</a></b>
|
132
|
+
<i>name</i></code></dd>
|
133
|
+
|
134
|
+
<dd><code><i>pathName</i> <b><a href="#tokeninsert">tokeninsert</a></b>
|
135
|
+
<i>index names</i></code></dd>
|
136
|
+
|
137
|
+
<dd>
|
138
|
+
<code><i>pathName</i> <b><a href="#tokenselection">tokenselection</a></b>
|
139
|
+
<i>option args</i></code>
|
140
|
+
<dl>
|
141
|
+
<dd><code><i>pathName</i> <b>tokenselection clear</b>
|
142
|
+
<i>firstIndex ?lastIndex</i></code></dd>
|
143
|
+
<dd><code><i>pathName</i> <b>tokenselection get</b></code></dd>
|
144
|
+
<dd><code><i>pathName</i> <b>tokenselection set</b>
|
145
|
+
<i>firstIndex ?lastIndex</i></code></dd>
|
146
|
+
</dl>
|
147
|
+
</dd>
|
148
|
+
|
149
|
+
<dd>
|
150
|
+
<code><i>pathName</i> <b><a href="#xview">xview</a></b>
|
151
|
+
<i>args</i></code>
|
152
|
+
<dl>
|
153
|
+
<dd><code><i>pathName</i> <b>xview</b></code></dd>
|
154
|
+
<dd><code><i>pathName</i> <b>xview moveto</b> <i>fraction</i></code></dd>
|
155
|
+
<dd><code><i>pathName</i> <b>xview scroll</b> <i>number what</i></code></dd>
|
156
|
+
</dl>
|
157
|
+
</dd>
|
158
|
+
|
159
|
+
<dd>
|
160
|
+
<code><i>pathName</i> <b><a href="#yview">yview</a></b>
|
161
|
+
<i>args</i></code>
|
162
|
+
<dl>
|
163
|
+
<dd><code><i>pathName</i> <b>yview</b></code></dd>
|
164
|
+
<dd><code><i>pathName</i> <b>yview moveto</b> <i>fraction</i></code></dd>
|
165
|
+
<dd><code><i>pathName</i> <b>yview scroll</b> <i>number what</i></code></dd>
|
166
|
+
</dl>
|
167
|
+
</dd>
|
168
|
+
|
169
|
+
<dt><a href="#default_bindings">DEFAULT BINDINGS</a></dt><br>
|
170
|
+
|
171
|
+
<dt><a href="#default_token_bindings">DEFAULT TOKEN BINDINGS</a></dt><br>
|
172
|
+
|
173
|
+
<dt><a href="#keywords">KEYWORDS</a></dt>
|
174
|
+
|
175
|
+
</dl>
|
176
|
+
|
177
|
+
<h2><a name="detailed_ref"></a><b>Detailed Reference</b></h2>
|
178
|
+
|
179
|
+
<dl>
|
180
|
+
|
181
|
+
<dt><a name="name"></a><b>NAME</b></dt>
|
182
|
+
<dd><code>tokenentry::tokenentry</code> - Create and manipulate tokenentry widgets</dd>
|
183
|
+
|
184
|
+
<dt><br><a name="synopsis"></a><b>SYNOPSIS</b></dt>
|
185
|
+
<dd>
|
186
|
+
<pre>
|
187
|
+
<b>tokenentry::tokenentry</b> <i>pathName</i> ?<i>options</i>?
|
188
|
+
</pre>
|
189
|
+
</dd>
|
190
|
+
|
191
|
+
<dt><a name="std_options"></a><b>STANDARD_OPTIONS</b></dt>
|
192
|
+
<dd>
|
193
|
+
<dl>
|
194
|
+
<dt><code><b>-background</b> or <b>-bg</b></code></dt>
|
195
|
+
<dt><code><b>-borderwidth</b> or <b>-bd</b></code></dt>
|
196
|
+
<dt><code><b>-exportselection</b></code></dt>
|
197
|
+
<dt><code><b>-font</b></code></dt>
|
198
|
+
<dt><code><b>-foreground</b> or <b>-fg</b></code></dt>
|
199
|
+
<dt><code><b>-highlightbackground</b></code></dt>
|
200
|
+
<dt><code><b>-highlightcolor</b></code></dt>
|
201
|
+
<dt><code><b>-highlightthickness</b></code></dt>
|
202
|
+
<dt><code><b>-insertbackground</b></code></dt>
|
203
|
+
<dt><code><b>-insertborderwidth</b></code></dt>
|
204
|
+
<dt><code><b>-insertofftime</b></code></dt>
|
205
|
+
<dt><code><b>-insertontime</b></code></dt>
|
206
|
+
<dt><code><b>-insertwidth</b></code></dt>
|
207
|
+
<dt><code><b>-padx</b></code></dt>
|
208
|
+
<dt><code><b>-pady</b></code></dt>
|
209
|
+
<dt><code><b>-relief</b></code></dt>
|
210
|
+
<dt><code><b>-selectbackground</b></code></dt>
|
211
|
+
<dt><code><b>-selectborderwidth</b></code></dt>
|
212
|
+
<dt><code><b>-selectforeground</b></code></dt>
|
213
|
+
<dt><code><b>-setgrid</b></code></dt>
|
214
|
+
<dt><code><b>-takefocus</b></code></dt>
|
215
|
+
<dt><code><b>-xscrollcommand</b></code></dt>
|
216
|
+
<dt><code><b>-yscrollcommand</b></code></dt>
|
217
|
+
</dl>
|
218
|
+
</dd>
|
219
|
+
<dd>
|
220
|
+
See the <b>options</b> manual entry for details on the standard options.
|
221
|
+
</dd>
|
222
|
+
|
223
|
+
<dt><br><a name="wdgt_options"></a><b>WIDGET-SPECIFIC OPTIONS</b></dt><br>
|
224
|
+
|
225
|
+
<dd>
|
226
|
+
<a name="dropdownformatstring"></a>
|
227
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
228
|
+
<tr>
|
229
|
+
<td>Command-Line Name: </td>
|
230
|
+
<td><code><b>-dropdownformatstring</b></code></td>
|
231
|
+
</tr>
|
232
|
+
<tr>
|
233
|
+
<td>Database Name:</td>
|
234
|
+
<td><code><b> dropDownFormatString</b></code></td>
|
235
|
+
</tr>
|
236
|
+
<tr>
|
237
|
+
<td>Database Class:</td>
|
238
|
+
<td><code><b> DropDownFormatString</b></code></td>
|
239
|
+
</tr>
|
240
|
+
</table>
|
241
|
+
<blockquote>
|
242
|
+
<p>
|
243
|
+
Specifies the format string to use when displaying each entry in the
|
244
|
+
<code><i>-listvar</i></code> list. By default, the formatstring is set to {%s}. The
|
245
|
+
value of the format string can be value that is legal to the <code><b>format</b></code>
|
246
|
+
Tcl command.
|
247
|
+
</p>
|
248
|
+
</blockquote>
|
249
|
+
</dd>
|
250
|
+
|
251
|
+
<dd>
|
252
|
+
<a name="dropdownheight"></a>
|
253
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
254
|
+
<tr>
|
255
|
+
<td>Command-Line Name: </td>
|
256
|
+
<td><code><b>-dropdownheight</b></code></td>
|
257
|
+
</tr>
|
258
|
+
<tr>
|
259
|
+
<td>Database Name:</td>
|
260
|
+
<td><code><b> dropDownHeight</b></code></td>
|
261
|
+
</tr>
|
262
|
+
<tr>
|
263
|
+
<td>Database Class:</td>
|
264
|
+
<td><code><b> DropDownHeight</b></code></td>
|
265
|
+
</tr>
|
266
|
+
</table>
|
267
|
+
<blockquote>
|
268
|
+
<p>
|
269
|
+
Specifies the number of text lines to display in the drop-down listbox that pops up
|
270
|
+
when the user enters text into token entry text field. If the value is set to 0,
|
271
|
+
the drop-down listbox will be set to the lesser of the number of elements in the
|
272
|
+
<code><b>-listvar</b></code> list or the value specified by
|
273
|
+
<code><b>-dropdownmaxheight</b></code>. By default, the drop-down height is set to a
|
274
|
+
value of 0.
|
275
|
+
</p>
|
276
|
+
</blockquote>
|
277
|
+
</dd>
|
278
|
+
|
279
|
+
<dd>
|
280
|
+
<a name="dropdownmaxheight"></a>
|
281
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
282
|
+
<tr>
|
283
|
+
<td>Command-Line Name: </td>
|
284
|
+
<td><code><b>-dropdownmaxheight</b></code></td>
|
285
|
+
</tr>
|
286
|
+
<tr>
|
287
|
+
<td>Database Name:</td>
|
288
|
+
<td><code><b> dropDownMaxHeight</b></code></td>
|
289
|
+
</tr>
|
290
|
+
<tr>
|
291
|
+
<td>Database Class:</td>
|
292
|
+
<td><code><b> DropDownMaxHeight</b></code></td>
|
293
|
+
</tr>
|
294
|
+
</table>
|
295
|
+
<blockquote>
|
296
|
+
<p>
|
297
|
+
If the value of <code><b>-dropdownheight</b></code> is set to a value of 0, this value
|
298
|
+
determines the maximum number of lines that will be displayed in the drop-down listbox.
|
299
|
+
By default, this value is set to 5.
|
300
|
+
</p>
|
301
|
+
</blockquote>
|
302
|
+
</dd>
|
303
|
+
|
304
|
+
<dd>
|
305
|
+
<a name="height"></a>
|
306
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
307
|
+
<tr>
|
308
|
+
<td>Command-Line Name: </td>
|
309
|
+
<td><code><b>-height</b></code></td>
|
310
|
+
</tr>
|
311
|
+
<tr>
|
312
|
+
<td>Database Name:</td>
|
313
|
+
<td><code><b> height</b></code></td>
|
314
|
+
</tr>
|
315
|
+
<tr>
|
316
|
+
<td>Database Class:</td>
|
317
|
+
<td><code><b> Height</b></code></td>
|
318
|
+
</tr>
|
319
|
+
</table>
|
320
|
+
<blockquote>
|
321
|
+
<p>
|
322
|
+
Specifies the number of lines that can be displayed in the widget without scrolling.
|
323
|
+
The widget does allow scrolling via the <code><b>-xscrollcommand</b></code> and
|
324
|
+
<code><b>-yscrollcommand</b></code> commands. By default, this is set to a value of 1.
|
325
|
+
</p>
|
326
|
+
</blockquote>
|
327
|
+
</dd>
|
328
|
+
|
329
|
+
<dd>
|
330
|
+
<a name="listvar"></a>
|
331
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
332
|
+
<tr>
|
333
|
+
<td>Command-Line Name: </td>
|
334
|
+
<td><code><b>-listvar</b></code></td>
|
335
|
+
</tr>
|
336
|
+
<tr>
|
337
|
+
<td>Database Name:</td>
|
338
|
+
<td><code><b> listVar</b></code></td>
|
339
|
+
</tr>
|
340
|
+
<tr>
|
341
|
+
<td>Database Class:</td>
|
342
|
+
<td><code><b> ListVar</b></code></td>
|
343
|
+
</tr>
|
344
|
+
</table>
|
345
|
+
<blockquote>
|
346
|
+
<p>
|
347
|
+
Specifies a variable which contains a Tcl list containing the names of available token
|
348
|
+
names that will be matched against user-specified text and displayed in a drop-down
|
349
|
+
listbox for quick and accurate selection. If this option is not specified, no
|
350
|
+
drop-down listbox will be displayed as the user enters text into the widget. The given
|
351
|
+
variable must be a reference to a global variable.
|
352
|
+
</p>
|
353
|
+
<p>
|
354
|
+
The Tcl list can contain sublists. This makes it possible to store values like
|
355
|
+
e-mail addresses where each element in the list could be comprised of both an e-mail
|
356
|
+
address and a name where the user could either type a part of the e-mail address or
|
357
|
+
the person's name and get a match in the drop-down list box. However, when the user
|
358
|
+
selects a name in the drop-down listbox, the token could show just the e-mail address
|
359
|
+
or the name.
|
360
|
+
</p>
|
361
|
+
<p>
|
362
|
+
If a multi-dimensional Tcl list is used, the user will want to configure the
|
363
|
+
<code><b>-matchmode</b></code>, <code><b>-matchindex</b></code>,
|
364
|
+
<code><b>-matchcase</b></code> and <code><b>-matchdisplayindex</b></code> options to
|
365
|
+
control the matching process.
|
366
|
+
</p>
|
367
|
+
</blockquote>
|
368
|
+
</dd>
|
369
|
+
|
370
|
+
<dd>
|
371
|
+
<a name="matchcase"></a>
|
372
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
373
|
+
<tr>
|
374
|
+
<td>Command-Line Name: </td>
|
375
|
+
<td><code><b>-matchcase</b></code></td>
|
376
|
+
</tr>
|
377
|
+
<tr>
|
378
|
+
<td>Database Name:</td>
|
379
|
+
<td><code><b> matchCase</b></code></td>
|
380
|
+
</tr>
|
381
|
+
<tr>
|
382
|
+
<td>Database Class:</td>
|
383
|
+
<td><code><b> MatchCase</b></code></td>
|
384
|
+
</tr>
|
385
|
+
</table>
|
386
|
+
<blockquote>
|
387
|
+
<p>
|
388
|
+
Specifies whether case matching should be used or not when matching the user-input string
|
389
|
+
to the values in the <code><b>-values</b></code> list. This option should be set to a
|
390
|
+
boolean value. By default, this option is set to false.
|
391
|
+
</p>
|
392
|
+
</blockquote>
|
393
|
+
</dd>
|
394
|
+
|
395
|
+
<dd>
|
396
|
+
<a name="matchdisplayindex"></a>
|
397
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
398
|
+
<tr>
|
399
|
+
<td>Command-Line Name: </td>
|
400
|
+
<td><code><b>-matchdisplayindex</b></code></td>
|
401
|
+
</tr>
|
402
|
+
<tr>
|
403
|
+
<td>Database Name:</td>
|
404
|
+
<td><code><b> matchDisplayIndex</b></code></td>
|
405
|
+
</tr>
|
406
|
+
<tr>
|
407
|
+
<td>Database Class:</td>
|
408
|
+
<td><code><b> MatchDisplayIndex</b></code></td>
|
409
|
+
</tr>
|
410
|
+
</table>
|
411
|
+
<blockquote>
|
412
|
+
<p>
|
413
|
+
When an item in the drop-down listbox is selected by the user, this option specifies the
|
414
|
+
path of indices (like that used by the <code><b>lindex</b></code> or <code><b>lset</b></code>
|
415
|
+
commands) that leads to the element to display in the token.
|
416
|
+
</p>
|
417
|
+
<p>
|
418
|
+
For example, suppose we have the following tokenentry widget:
|
419
|
+
<blockquote>
|
420
|
+
<pre>
|
421
|
+
tokenentry::tokenentry .te -values {{{John} {john@example.comd}} {{Alice} {alice@example.com}} {{Chris} {chris@example.com}}} -matchdisplayindex 0
|
422
|
+
</pre>
|
423
|
+
</blockquote>
|
424
|
+
If the user, chose the entry for Alice, the token would be populated with the string "Alice". However, if we appended
|
425
|
+
the following code:
|
426
|
+
<blockquote>
|
427
|
+
<pre>
|
428
|
+
.te configure -matchdisplayindex 1
|
429
|
+
</pre>
|
430
|
+
</blockquote>
|
431
|
+
If Alice was selected from the drop-down listbox again, the string "alice@example.com" would be displayed in the token.
|
432
|
+
</p>
|
433
|
+
</blockquote>
|
434
|
+
</dd>
|
435
|
+
|
436
|
+
<dd>
|
437
|
+
<a name="matchindex"></a>
|
438
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
439
|
+
<tr>
|
440
|
+
<td>Command-Line Name: </td>
|
441
|
+
<td><code><b>-matchindex</b></code></td>
|
442
|
+
</tr>
|
443
|
+
<tr>
|
444
|
+
<td>Database Name:</td>
|
445
|
+
<td><code><b> matchIndex</b></code></td>
|
446
|
+
</tr>
|
447
|
+
<tr>
|
448
|
+
<td>Database Class:</td>
|
449
|
+
<td><code><b> MatchIndex</b></code></td>
|
450
|
+
</tr>
|
451
|
+
</table>
|
452
|
+
<blockquote>
|
453
|
+
<p>
|
454
|
+
If this option is specified, specifies a path of indices (like that used by the
|
455
|
+
<code><b>lindex</b></code> or <code><b>lset</b></code> commands) within each element
|
456
|
+
in the <code><b>-values</b></code> list to allow the location of the term being matched
|
457
|
+
against. By default, all fields within each list item will be matched against.
|
458
|
+
</p>
|
459
|
+
</blockquote>
|
460
|
+
</dd>
|
461
|
+
|
462
|
+
<dd>
|
463
|
+
<a name="matchmode"></a>
|
464
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
465
|
+
<tr>
|
466
|
+
<td>Command-Line Name: </td>
|
467
|
+
<td><code><b>-matchmode</b></code></td>
|
468
|
+
</tr>
|
469
|
+
<tr>
|
470
|
+
<td>Database Name:</td>
|
471
|
+
<td><code><b> matchMode</b></code></td>
|
472
|
+
</tr>
|
473
|
+
<tr>
|
474
|
+
<td>Database Class:</td>
|
475
|
+
<td><code><b> MatchMode</b></code></td>
|
476
|
+
</tr>
|
477
|
+
</table>
|
478
|
+
<blockquote>
|
479
|
+
<p>
|
480
|
+
Specifies the mode used to match the results of the user-entered text to the contents of the
|
481
|
+
<code><b>-listvar</b></code> list. The allowed values are: <b>glob</b> and
|
482
|
+
<b>regexp</b>. If <b>glob</b> is specified, then glob-style pattern
|
483
|
+
matching is used using the same rules as the <code><b>string match</b></code> command. If
|
484
|
+
<b>regexp</b> is specified, then regular expression pattern matching is used using
|
485
|
+
the rules described in the <code><b>re_syntax</b></code> reference page. By default, the match
|
486
|
+
mode is set to <b>glob</b>.
|
487
|
+
</p>
|
488
|
+
</blockquote>
|
489
|
+
</dd>
|
490
|
+
|
491
|
+
<dd>
|
492
|
+
<a name="state"></a>
|
493
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
494
|
+
<tr>
|
495
|
+
<td>Command-Line Name: </td>
|
496
|
+
<td><code><b>-state</b></code></td>
|
497
|
+
</tr>
|
498
|
+
<tr>
|
499
|
+
<td>Database Name:</td>
|
500
|
+
<td><code><b> state</b></code></td>
|
501
|
+
</tr>
|
502
|
+
<tr>
|
503
|
+
<td>Database Class:</td>
|
504
|
+
<td><code><b> State</b></code></td>
|
505
|
+
</tr>
|
506
|
+
</table>
|
507
|
+
<blockquote>
|
508
|
+
<p>
|
509
|
+
Specifies the current state of the widget: <b>normal</b> or <b>disabled</b>. If the widget state is <b>normal</b> the user
|
510
|
+
may fully interact with the widget. If the state is <b>disabled</b>, the widget will be viewable only, but any interactions
|
511
|
+
with the tokens or entry portion of the widget will be turned off.
|
512
|
+
</p>
|
513
|
+
</blockquote>
|
514
|
+
</dd>
|
515
|
+
|
516
|
+
<dd>
|
517
|
+
<a name="tokenbg"></a>
|
518
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
519
|
+
<tr>
|
520
|
+
<td>Command-Line Name: </td>
|
521
|
+
<td><code><b>-tokenbg</b></code></td>
|
522
|
+
</tr>
|
523
|
+
<tr>
|
524
|
+
<td>Database Name:</td>
|
525
|
+
<td><code><b> tokenBackground</b></code></td>
|
526
|
+
</tr>
|
527
|
+
<tr>
|
528
|
+
<td>Database Class:</td>
|
529
|
+
<td><code><b> TokenBackground</b></code></td>
|
530
|
+
</tr>
|
531
|
+
</table>
|
532
|
+
<blockquote>
|
533
|
+
<p>
|
534
|
+
Specifies the color to use for the background of the token when it is not selected.
|
535
|
+
</p>
|
536
|
+
</blockquote>
|
537
|
+
</dd>
|
538
|
+
|
539
|
+
<dd>
|
540
|
+
<a name="tokenbordercolor"></a>
|
541
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
542
|
+
<tr>
|
543
|
+
<td>Command-Line Name: </td>
|
544
|
+
<td><code><b>-tokenbordercolor</b></code></td>
|
545
|
+
</tr>
|
546
|
+
<tr>
|
547
|
+
<td>Database Name:</td>
|
548
|
+
<td><code><b> tokenBorderColor</b></code></td>
|
549
|
+
</tr>
|
550
|
+
<tr>
|
551
|
+
<td>Database Class:</td>
|
552
|
+
<td><code><b> TokenBorderColor</b></code></td>
|
553
|
+
</tr>
|
554
|
+
</table>
|
555
|
+
<blockquote>
|
556
|
+
<p>
|
557
|
+
Specifies the color to use for the border of the token when it is not selected.
|
558
|
+
</p>
|
559
|
+
</blockquote>
|
560
|
+
</dd>
|
561
|
+
|
562
|
+
<dd>
|
563
|
+
<a name="tokenfg"></a>
|
564
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
565
|
+
<tr>
|
566
|
+
<td>Command-Line Name: </td>
|
567
|
+
<td><code><b>-tokenfg</b></code></td>
|
568
|
+
</tr>
|
569
|
+
<tr>
|
570
|
+
<td>Database Name:</td>
|
571
|
+
<td><code><b> tokenForeground</b></code></td>
|
572
|
+
</tr>
|
573
|
+
<tr>
|
574
|
+
<td>Database Class:</td>
|
575
|
+
<td><code><b> TokenForeground</b></code></td>
|
576
|
+
</tr>
|
577
|
+
</table>
|
578
|
+
<blockquote>
|
579
|
+
<p>
|
580
|
+
Specifies the color to use for the token text when the token is not selected.
|
581
|
+
</p>
|
582
|
+
</blockquote>
|
583
|
+
</dd>
|
584
|
+
|
585
|
+
<dd>
|
586
|
+
<a name="tokenselectbg"></a>
|
587
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
588
|
+
<tr>
|
589
|
+
<td>Command-Line Name: </td>
|
590
|
+
<td><code><b>-tokenselectbg</b></code></td>
|
591
|
+
</tr>
|
592
|
+
<tr>
|
593
|
+
<td>Database Name:</td>
|
594
|
+
<td><code><b> tokenSelectBackground</b></code></td>
|
595
|
+
</tr>
|
596
|
+
<tr>
|
597
|
+
<td>Database Class:</td>
|
598
|
+
<td><code><b> TokenSelectBackground</b></code></td>
|
599
|
+
</tr>
|
600
|
+
</table>
|
601
|
+
<blockquote>
|
602
|
+
<p>
|
603
|
+
Specifies the color to use for the background of the token when it is selected.
|
604
|
+
</p>
|
605
|
+
</blockquote>
|
606
|
+
</dd>
|
607
|
+
|
608
|
+
<dd>
|
609
|
+
<a name="tokenselectbordercolor"></a>
|
610
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
611
|
+
<tr>
|
612
|
+
<td>Command-Line Name: </td>
|
613
|
+
<td><code><b>-tokenselectbordercolor</b></code></td>
|
614
|
+
</tr>
|
615
|
+
<tr>
|
616
|
+
<td>Database Name:</td>
|
617
|
+
<td><code><b> tokenSelectBorderColor</b></code></td>
|
618
|
+
</tr>
|
619
|
+
<tr>
|
620
|
+
<td>Database Class:</td>
|
621
|
+
<td><code><b> TokenSelectBorderColor</b></code></td>
|
622
|
+
</tr>
|
623
|
+
</table>
|
624
|
+
<blockquote>
|
625
|
+
<p>
|
626
|
+
Specifies the color to use for the border of the token when it is selected.
|
627
|
+
</p>
|
628
|
+
</blockquote>
|
629
|
+
</dd>
|
630
|
+
|
631
|
+
<dd>
|
632
|
+
<a name="tokenselectfg"></a>
|
633
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
634
|
+
<tr>
|
635
|
+
<td>Command-Line Name: </td>
|
636
|
+
<td><code><b>-tokenselectfg</b></code></td>
|
637
|
+
</tr>
|
638
|
+
<tr>
|
639
|
+
<td>Database Name:</td>
|
640
|
+
<td><code><b> tokenSelectForeground</b></code></td>
|
641
|
+
</tr>
|
642
|
+
<tr>
|
643
|
+
<td>Database Class:</td>
|
644
|
+
<td><code><b> TokenSelectForeground</b></code></td>
|
645
|
+
</tr>
|
646
|
+
</table>
|
647
|
+
<blockquote>
|
648
|
+
<p>
|
649
|
+
Specifies the color to use for the token text when the token is selected.
|
650
|
+
</p>
|
651
|
+
</blockquote>
|
652
|
+
</dd>
|
653
|
+
|
654
|
+
<dd>
|
655
|
+
<a name="tokenshape"></a>
|
656
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
657
|
+
<tr>
|
658
|
+
<td>Command-Line Name: </td>
|
659
|
+
<td><code><b>-tokenshape</b></code></td>
|
660
|
+
</tr>
|
661
|
+
<tr>
|
662
|
+
<td>Database Name:</td>
|
663
|
+
<td><code><b> tokenShape</b></code></td>
|
664
|
+
</tr>
|
665
|
+
<tr>
|
666
|
+
<td>Database Class:</td>
|
667
|
+
<td><code><b> TokenShape</b></code></td>
|
668
|
+
</tr>
|
669
|
+
</table>
|
670
|
+
<blockquote>
|
671
|
+
<p>
|
672
|
+
Specifies shape(s) to use for the left and right side of the token. See
|
673
|
+
the token <code><i><a href="#token_shape">-shape</a></i></code> option for an
|
674
|
+
explanation of the legal shape values and their usage.
|
675
|
+
</p>
|
676
|
+
</blockquote>
|
677
|
+
</dd>
|
678
|
+
|
679
|
+
<dd>
|
680
|
+
<a name="tokenvar"></a>
|
681
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
682
|
+
<tr>
|
683
|
+
<td>Command-Line Name: </td>
|
684
|
+
<td><code><b>-tokenvar</b></code></td>
|
685
|
+
</tr>
|
686
|
+
<tr>
|
687
|
+
<td>Database Name:</td>
|
688
|
+
<td><code><b> tokenVar</b></code></td>
|
689
|
+
</tr>
|
690
|
+
<tr>
|
691
|
+
<td>Database Class:</td>
|
692
|
+
<td><code><b> TokenVar</b></code></td>
|
693
|
+
</tr>
|
694
|
+
</table>
|
695
|
+
<blockquote>
|
696
|
+
<p>
|
697
|
+
Specifies a variable in which the tokenentry widget will automatically store the token
|
698
|
+
values when they are modified. The variable must reference a global variable.
|
699
|
+
</p>
|
700
|
+
</blockquote>
|
701
|
+
</dd>
|
702
|
+
|
703
|
+
<dd>
|
704
|
+
<a name="watermark"></a>
|
705
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
706
|
+
<tr>
|
707
|
+
<td>Command-Line Name: </td>
|
708
|
+
<td><code><b>-watermark</b></code></td>
|
709
|
+
</tr>
|
710
|
+
<tr>
|
711
|
+
<td>Database Name:</td>
|
712
|
+
<td><code><b> watermark</b></code></td>
|
713
|
+
</tr>
|
714
|
+
<tr>
|
715
|
+
<td>Database Class:</td>
|
716
|
+
<td><code><b> Watermark</b></code></td>
|
717
|
+
</tr>
|
718
|
+
</table>
|
719
|
+
<blockquote>
|
720
|
+
<p>
|
721
|
+
Specifies a textual string that will be used as a watermark in the entry field. The
|
722
|
+
watermark string cannot be copied or selected and only is visible when the entry
|
723
|
+
field is empty. Once the user begins to type in the entry field, the watermark
|
724
|
+
string is cleared and the user's input data is visible. By default, no watermark
|
725
|
+
is displayed in the entry field. The watermark can be cleared by setting this option
|
726
|
+
to the empty string.
|
727
|
+
</p>
|
728
|
+
</blockquote>
|
729
|
+
</dd>
|
730
|
+
|
731
|
+
<dd>
|
732
|
+
<a name="watermarkfg"></a>
|
733
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
734
|
+
<tr>
|
735
|
+
<td>Command-Line Name: </td>
|
736
|
+
<td><code><b>-watermarkfg</b></code></td>
|
737
|
+
</tr>
|
738
|
+
<tr>
|
739
|
+
<td>Database Name:</td>
|
740
|
+
<td><code><b> watermarkForeground</b></code></td>
|
741
|
+
</tr>
|
742
|
+
<tr>
|
743
|
+
<td>Database Class:</td>
|
744
|
+
<td><code><b> Foreground</b></code></td>
|
745
|
+
</tr>
|
746
|
+
</table>
|
747
|
+
<blockquote>
|
748
|
+
<p>
|
749
|
+
Specifies the foreground color to use when a watermark is to be displayed in the
|
750
|
+
entry field.
|
751
|
+
</p>
|
752
|
+
</blockquote>
|
753
|
+
</dd>
|
754
|
+
|
755
|
+
<dd>
|
756
|
+
<a name="width"></a>
|
757
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
758
|
+
<tr>
|
759
|
+
<td>Command-Line Name: </td>
|
760
|
+
<td><code><b>-width</b></code></td>
|
761
|
+
</tr>
|
762
|
+
<tr>
|
763
|
+
<td>Database Name:</td>
|
764
|
+
<td><code><b> width</b></code></td>
|
765
|
+
</tr>
|
766
|
+
<tr>
|
767
|
+
<td>Database Class:</td>
|
768
|
+
<td><code><b> Width</b></code></td>
|
769
|
+
</tr>
|
770
|
+
</table>
|
771
|
+
<blockquote>
|
772
|
+
<p>
|
773
|
+
Specifies the number of characters (based on the average character size of the currently
|
774
|
+
assigned font) that can fit in the widget without wrapping. By default, the widget width
|
775
|
+
is set to a value of 50.
|
776
|
+
</p>
|
777
|
+
</blockquote>
|
778
|
+
</dd>
|
779
|
+
|
780
|
+
<dd>
|
781
|
+
<a name="wrap"></a>
|
782
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
783
|
+
<tr>
|
784
|
+
<td>Command-Line Name: </td>
|
785
|
+
<td><code><b>-wrap</b></code></td>
|
786
|
+
</tr>
|
787
|
+
<tr>
|
788
|
+
<td>Database Name:</td>
|
789
|
+
<td><code><b> wrap</b></code></td>
|
790
|
+
</tr>
|
791
|
+
<tr>
|
792
|
+
<td>Database Class:</td>
|
793
|
+
<td><code><b> Wrap</b></code></td>
|
794
|
+
</tr>
|
795
|
+
</table>
|
796
|
+
<blockquote>
|
797
|
+
<p>
|
798
|
+
Specifies whether line wrapping should be enabled (true) or disabled (false). If line wrapping is enabled, tokens and
|
799
|
+
text will continue onto the next line (i.e., y-axis scrolling will be needed to view all tokens). Text will be wrapped
|
800
|
+
on a word basis in this mode. If line wrapping is disabled, tokens will continue on the same line (i.e., x-axis
|
801
|
+
scrolling will be needed to view all tokens). By default, this option will be set to <b>false</b>.
|
802
|
+
</p>
|
803
|
+
</blockquote>
|
804
|
+
</dd>
|
805
|
+
|
806
|
+
<dt><a name="description"></a><b>DESCRIPTION</b></dt>
|
807
|
+
<dd><br>
|
808
|
+
The <code><b>tokenentry::tokenentry</b></code> command creates a new window named
|
809
|
+
<code><i>pathName</i></code> and of the class <code><b>Tokenentry</b></code>, and makes it
|
810
|
+
into a <b>tokenentry</b> widget. Additional options, described above, may be
|
811
|
+
specified on the command-line or in the option database to configure aspects of the
|
812
|
+
tokenentry sucah as its colors, font, and sizing. The
|
813
|
+
<code><b>tokenentry::tokenentry</b></code> command returns its <code><i>pathName</i></code>
|
814
|
+
argument. At the time this command is invoked, there must not exist a window named
|
815
|
+
<code><i>pathName</i></code>, but <code><i>pathName</i></code>'s parent must exist.
|
816
|
+
</dd>
|
817
|
+
<dd><br>
|
818
|
+
The tokenentry widget is a text widget that allows users to enter bits of text separated
|
819
|
+
by commas or tabs and converts this text into a special window called a token. Each token
|
820
|
+
can be moved, deleted, modified or selected as a whole (i.e., the text within the token
|
821
|
+
cannot be altered/handled on a character-by-character basis like a typical text field).
|
822
|
+
This type of widget is usually used to handle tag or e-mail address user interaction in
|
823
|
+
modern GUI tools.
|
824
|
+
</dd>
|
825
|
+
<dd><br>
|
826
|
+
Optionally, a list of token values can be passed to the widget (via the
|
827
|
+
<code><b><a href="#listvar">-listvar</a></b></code> option). When this value list is
|
828
|
+
specified, any user-specified text entered into the widget will be matched against this
|
829
|
+
list of values and if any matches are found, they will be displayed in a drop-down listbox below the
|
830
|
+
tokenentry widget. This drop-down listbox can be used by the user to quickly and accurately
|
831
|
+
select an item to tokenize.
|
832
|
+
</dd>
|
833
|
+
|
834
|
+
<dt><br>
|
835
|
+
<a name="token_options"></a><b>TOKEN CONFIGURATION OPTIONS</b></dt>
|
836
|
+
<dd><br>
|
837
|
+
The following options are currently supported by the <code><b><a href="#tokencget">tokencget</a></b></code>
|
838
|
+
and the <code><b><a href="#tokenconfigure">tokenconfigure</a></b></code> commands:
|
839
|
+
</dd>
|
840
|
+
<dd>
|
841
|
+
<dl>
|
842
|
+
<dt>
|
843
|
+
<a name="token_bg"></a>
|
844
|
+
<code><b>-background</b> <i>color</i></code><br>
|
845
|
+
<code><b>-bg</b> <i>color</i></code>
|
846
|
+
</dt>
|
847
|
+
<dd>
|
848
|
+
Controls the color used for the unselected token background for a specific token.
|
849
|
+
</dd>
|
850
|
+
<dt><br>
|
851
|
+
<a name="token_bordercolor"></a>
|
852
|
+
<code><b>-bordercolor</b> <i>color</i></code>
|
853
|
+
</dt>
|
854
|
+
<dd>
|
855
|
+
Controls the color of the border of a token when it is in the unselected state.
|
856
|
+
</dd>
|
857
|
+
<dt><br>
|
858
|
+
<a name="token_fg"></a>
|
859
|
+
<code><b>-foreground</b> <i>color</i></code><br>
|
860
|
+
<code><b>-fg</b> <i>color</i></code>
|
861
|
+
</dt>
|
862
|
+
<dd>
|
863
|
+
Controls the color used for the unselected token foreground (i.e., text color) for a specific token.
|
864
|
+
</dd>
|
865
|
+
<dt><br>
|
866
|
+
<a name="token_selectbg"></a>
|
867
|
+
<code><b>-selectbackground</b> <i>color</i></code><br>
|
868
|
+
<code><b>-selectbg</b> <i>color</i></code>
|
869
|
+
</dt>
|
870
|
+
<dd>
|
871
|
+
Controls the color used for the selected token background for a specific token.
|
872
|
+
</dd>
|
873
|
+
<dt><br>
|
874
|
+
<a name="token_selectbordercolor"></a>
|
875
|
+
<code><b>-selectbordercolor</b> <i>color</i></code>
|
876
|
+
</dt>
|
877
|
+
<dd>
|
878
|
+
Controls the color of the border of a token when it is in the selected state.
|
879
|
+
</dd>
|
880
|
+
<dt><br>
|
881
|
+
<a name="token_selectfg"></a>
|
882
|
+
<code><b>-selectforeground</b> <i>color</i></code><br>
|
883
|
+
<code><b>-selectfg</b> <i>color</i></code>
|
884
|
+
</dt>
|
885
|
+
<dd>
|
886
|
+
Controls the color used for the selected token foreground (i.e., text color) for a specific token.
|
887
|
+
</dd>
|
888
|
+
<dt><br>
|
889
|
+
<a name="token_shape"></a>
|
890
|
+
<code><b>-shape</b> <i>shape(s)</i></code>
|
891
|
+
</dt>
|
892
|
+
<dd>
|
893
|
+
Specifies the shape to draw the tokens. The <code><i>shape(s)</i></code> list can
|
894
|
+
contain one or two shape values. The legal values for <code><i>shape(s)</i></code>
|
895
|
+
are <b>pill</b> (large rounded corners), <b>tag</b> (angled corners), <b>square</b>
|
896
|
+
(squared corners), <b>eased</b> (slightly rounded corners), and <b>ticket</b>
|
897
|
+
(concave corners). If <code><i>shape(s)</i></code> contains a single value, both the
|
898
|
+
left and right sides of the token will take on the given shape. If
|
899
|
+
<code><i>shape(s)</i></code> contains two values, the first value refers to the shape
|
900
|
+
of the left side of the token and the second value refers to the shape of the right
|
901
|
+
side of the token.
|
902
|
+
</dd>
|
903
|
+
<dd>
|
904
|
+
For example, the following creates a token whose left and right sides take on a pill
|
905
|
+
shape:
|
906
|
+
</dd>
|
907
|
+
<dd>
|
908
|
+
<pre>
|
909
|
+
tokenentry::tokenentry .te
|
910
|
+
.te insert end foobar
|
911
|
+
.te tokenconfigure 0 -shape pill</pre>
|
912
|
+
</dd>
|
913
|
+
<dd>
|
914
|
+
The following example creates a token whose left side is in the shape of a tag while
|
915
|
+
the right side is in the square shape:
|
916
|
+
</dd>
|
917
|
+
<dd>
|
918
|
+
<pre>
|
919
|
+
tokenentry::tokenentry .te
|
920
|
+
.te insert end foobar
|
921
|
+
.te tokenconfigure 0 -shape [list tag square]</pre>
|
922
|
+
</dd>
|
923
|
+
<dt><br>
|
924
|
+
<a name="token_text"></a>
|
925
|
+
<code><b>-text</b> <i>text</i></code>
|
926
|
+
</dt>
|
927
|
+
<dd>
|
928
|
+
Controls the text that is displayed on the token (i.e., the token name/value).
|
929
|
+
</dd>
|
930
|
+
</dl>
|
931
|
+
</dd>
|
932
|
+
|
933
|
+
<dt>
|
934
|
+
<a name="wdgt_command"></a><b>WIDGET COMMANDS</b></dt>
|
935
|
+
<dd><br>
|
936
|
+
The <code><b>tokenentry::tokenentry</b></code> command creates a new Tcl command whose
|
937
|
+
name is <code><i>pathName</i></code>. This command may be used to invoke various
|
938
|
+
operations on the widget. It has the following general form:
|
939
|
+
<blockquote>
|
940
|
+
<pre>
|
941
|
+
<i>pathName</i> <i>option ?arg arg ...?</i>
|
942
|
+
</pre>
|
943
|
+
</blockquote>
|
944
|
+
</dd>
|
945
|
+
<dd>
|
946
|
+
<code><i>option</i></code> and the <code><i>arg</i></code>s determine the exact behavior
|
947
|
+
of the command. The following commands are possible for tokenentry widgets:
|
948
|
+
</dd>
|
949
|
+
<dd>
|
950
|
+
<dl>
|
951
|
+
<dt><br><a name="cget"></a>
|
952
|
+
<code><i>pathName</i> <b>cget</b> <i>option</i></code></dt>
|
953
|
+
<dd>
|
954
|
+
Retrieves the value of the given widget-specific option and returns it to the calling
|
955
|
+
code. See <a href="#std_options">STANDARD OPTIONS</a> and
|
956
|
+
<a href="#wdgt_options">WIDGET-SPECIFIC OPTIONS</a> for the available options.
|
957
|
+
</dd>
|
958
|
+
<dt><br><a name="configure"></a>
|
959
|
+
<code><i>pathName</i> <b>configure</b> <i>?option? ?value option value ...?</i></code></dt>
|
960
|
+
<dd>
|
961
|
+
Query or modify the configuration options of the widget. If no <i>option</i> is
|
962
|
+
specified, returns a list describing all of the available options for <i>pathName</i>
|
963
|
+
(see Tk_ConfigureInfo for information on the format of this list). If <i>option</i>
|
964
|
+
is specified with no <i>value</i>, then the command returns a list describing the one
|
965
|
+
named option (this list will be identical to the corresponding sublist of the value
|
966
|
+
returned if <i>option</i> is specified). If one or more <i>option-value</i> pairs are
|
967
|
+
specified, then the command modifies the given widget option(s) to have the given
|
968
|
+
value(s); in this case the command returns an empty string. See
|
969
|
+
<a href="#std_options">STANDARD OPTIONS</a> and
|
970
|
+
<a href="#wdgt_options">WIDGET-SPECIFIC OPTIONS</a> for the available options.
|
971
|
+
</dd>
|
972
|
+
<dt><br><a name="entryget"></a>
|
973
|
+
<code><i>pathName</i> <b>entryget</b></code></dt>
|
974
|
+
<dd>
|
975
|
+
Returns any untokenized text currently in the widget.
|
976
|
+
</dd>
|
977
|
+
<dt><br><a name="see"></a>
|
978
|
+
<code><i>pathName</i> <b>see</b> <i>index</i></code></dt>
|
979
|
+
<dd>
|
980
|
+
Adjusts the view in the window so that the character given by <i>index</i> is completely visible.
|
981
|
+
If <i>index</i> is already visible then the command does nothing. If <i>index</i> is a short
|
982
|
+
distance out of view, the command adjusts the view just enough to make <i>index</i> visible at
|
983
|
+
the edge of the window. If <i>index</i> is far out of view, then the command centers index in
|
984
|
+
the window.
|
985
|
+
</dd>
|
986
|
+
<dt><br><a name="tokencget"></a>
|
987
|
+
<code><i>pathName</i> <b>tokencget</b> <i>index option</i></code></dt>
|
988
|
+
<dd>
|
989
|
+
Retrieves the value of the given token-specific option and returns it to the calling
|
990
|
+
code. See <a href="#token_options">TOKEN CONFIGURATION OPTIONS</a> for the available
|
991
|
+
options.
|
992
|
+
</dd>
|
993
|
+
<dt><br><a name="tokenconfigure"></a>
|
994
|
+
<code><i>pathName</i> <b>tokenconfigure</b> <i>index option value ?option value ...?</i></code></dt>
|
995
|
+
<dd>
|
996
|
+
Modifies the configuration option(s) of the token specified by <code><i>index</i></code>.
|
997
|
+
Returns the empty string. See <a href="#token_options">TOKEN CONFIGURATION OPTIONS</a>
|
998
|
+
for the available options.
|
999
|
+
</dd>
|
1000
|
+
<dt><br><a name="tokendelete"></a>
|
1001
|
+
<code><i>pathName</i> <b>tokendelete</b> <i>firstIndex ?lastIndex?</i></code></dt>
|
1002
|
+
<dd>
|
1003
|
+
If <code><i>lastIndex</i></code> is not specified, deletes the token at <code><i>firstIndex</i></code>.
|
1004
|
+
If <code><i>lastIndex</i></code> is specified, deletes the tokens between
|
1005
|
+
<code><i>firstIndex</i></code> and <code><i>lastIndex</i></code>, inclusive.
|
1006
|
+
</dd>
|
1007
|
+
<dt><br><a name="tokenget"></a>
|
1008
|
+
<code><i>pathName</i> <b>tokenget</b></code></dt>
|
1009
|
+
<dd>
|
1010
|
+
Returns a Tcl list containing all of the tokenized names within the widget. The list
|
1011
|
+
will be sorted in the same left-to-right order the tokens are currently listed in the
|
1012
|
+
widget.
|
1013
|
+
</dd>
|
1014
|
+
<dt><br><a name="tokenindex"></a>
|
1015
|
+
<code><i>pathName</i> <b>tokenindex</b> <i>name</i></code></dt>
|
1016
|
+
<dd>
|
1017
|
+
Returns the numerical index of the token associated with the given token name.
|
1018
|
+
</dd>
|
1019
|
+
<dt><br><a name="tokeninsert"></a>
|
1020
|
+
<code><i>pathName</i> <b>tokeninsert</b> <i>index names</i></code></dt>
|
1021
|
+
<dd>
|
1022
|
+
Inserts new tokens into the widget at the specified token <code><i>index</i></code>. The
|
1023
|
+
<code><i>names</i></code> is a list of token values to add. Tokens will be inserted such
|
1024
|
+
that their order will be preserved in the listed order.
|
1025
|
+
</dd>
|
1026
|
+
<dt><br><a name="tokenselection"></a>
|
1027
|
+
<code><i>pathName</i> <b>tokenselection</b> <i>option args</i></code></dt>
|
1028
|
+
<dd>
|
1029
|
+
This command is used to adjust the token selection within a tokenentry widget.
|
1030
|
+
It has several forms, depending on <code><i>option</i></code>:
|
1031
|
+
<dl>
|
1032
|
+
<dt>
|
1033
|
+
<code><i>pathName</i> <b>tokenselection clear</b> <i>firstIndex ?lastIndex?</i></code></dt>
|
1034
|
+
<dd>
|
1035
|
+
If <code><i>lastIndex</i></code> is not specified, clears the selected token at the specified index.
|
1036
|
+
If <code><i>lastIndex</i></code> is specified, clears all of the tokens between <code><i>firstIndex</i></code>
|
1037
|
+
and <code><i>lastIndex</i></code>, inclusive.
|
1038
|
+
</dd>
|
1039
|
+
<dt><br>
|
1040
|
+
<code><i>pathName</i> <b>tokenselection get</b></code></dt>
|
1041
|
+
<dd>
|
1042
|
+
Returns the indices of all tokens that are currently selected as a list.
|
1043
|
+
</dd>
|
1044
|
+
<dt><br>
|
1045
|
+
<code><i>pathName</i> <b>tokenselection set</b> <i>firstIndex ?lastIndex?</i></code></dt>
|
1046
|
+
<dd>
|
1047
|
+
If <code><i>lastIndex</i></code> is not specified, selects the token specified at the given index.
|
1048
|
+
If <code><i>lastIndex</i></code> is specified, selects all of the tokens between <code><i>firstIndex</i></code>
|
1049
|
+
and <code><i>lastIndex</i></code>, inclusive.
|
1050
|
+
</dd>
|
1051
|
+
</dl>
|
1052
|
+
</dd>
|
1053
|
+
<dt><a name="xview"></a>
|
1054
|
+
<code><i>pathName</i> <b>xview</b> <i>args</i></code></dt>
|
1055
|
+
<dd>
|
1056
|
+
This command is used to query and change the horizontal position of the information in the
|
1057
|
+
widget's window. It can take any of the following forms:
|
1058
|
+
<dl>
|
1059
|
+
<dt>
|
1060
|
+
<code><i>pathName</i> <b>xview</b></code></dt>
|
1061
|
+
<dd>
|
1062
|
+
Returns a list containing two elements. Each element is a real fraction between 0
|
1063
|
+
and 1; together they describe the horizontal span that is visible in the window.
|
1064
|
+
For example, if the first element is .2 and the second element is .6,
|
1065
|
+
20% of the tokenentry's scrollable test is off-screen to the left, the middle 40% is visible
|
1066
|
+
in the window, and 40% of the scrollable text is off-screen to the right. The fractions refer
|
1067
|
+
only to the lines that are actually visible in the window: if the lines in the window are all
|
1068
|
+
very short, so that they are entirely visible, the returned fractions will be 0 and 1, even
|
1069
|
+
if there are other lines in the widget that are much wider than the window. These are the same
|
1070
|
+
values passed to scrollbars via the <code><b>-xscrollcommand</b></code> option.
|
1071
|
+
</dd>
|
1072
|
+
<dt><br>
|
1073
|
+
<code><i>pathName</i> <b>xview moveto</b> <i>fraction</i></code></dt>
|
1074
|
+
<dd>
|
1075
|
+
Adjusts the view in the window so that <i>fraction</i> of the horizontal span of the widget
|
1076
|
+
is off-screen to the left. <i>Fraction</i> is a fraction between 0 and 1.
|
1077
|
+
</dd>
|
1078
|
+
<dt><br>
|
1079
|
+
<code><i>pathName</i> <b>xview scroll</b> <i>number what</i></code></dt>
|
1080
|
+
<dd>
|
1081
|
+
This command shifts the view in the window left or right according to <i>number</i> and
|
1082
|
+
<i>what</i>. <i>What</i> must be <b>units</b>, <b>pages</b> or <b>pixels</b>. If <i>what</i>
|
1083
|
+
is <b>units</b> or <b>pages</b> then <i>number</i> must be an integer, otherwise number may
|
1084
|
+
be specified in any of the forms acceptable to Tk_GetPixels, such as "2.0c" or "1i" (the
|
1085
|
+
result is rounded to the nearest integer value. If no units are given, pixels are assumed).
|
1086
|
+
If <i>what</i> is <b>units</b>, the view adjusts left or right by <i>number</i> average-width
|
1087
|
+
characters on the display; if it is <b>pages</b> then the view adjusts by <i>number</i>
|
1088
|
+
screenfuls; if it is <b>pixels</b> then the view adjusts by <i>number</i> pixels. If
|
1089
|
+
<i>number</i> is negative then characters farther to the left become visible; if it is
|
1090
|
+
positive then characters farther to the right become visible.
|
1091
|
+
</dd>
|
1092
|
+
</dl>
|
1093
|
+
</dd>
|
1094
|
+
<dt><a name="yview"></a>
|
1095
|
+
<code><i>pathName</i> <b>yview</b> <i>args</i></code></dt>
|
1096
|
+
<dd>
|
1097
|
+
This command is used to query and change the vertical position of the elements in the widget's
|
1098
|
+
window. It can take any of the following forms:
|
1099
|
+
<dl>
|
1100
|
+
<dt>
|
1101
|
+
<code><i>pathName</i> <b>yview</b></code></dt>
|
1102
|
+
<dd>
|
1103
|
+
Returns a list containing two elements, both of which are real fractions between 0 and 1.
|
1104
|
+
The first element gives the position of the first visible pixel of the first character (or
|
1105
|
+
token, etc) in the top line in the window, relative to the text as a whole (0.5 means it is
|
1106
|
+
halfway through the entry, for example). The second element gives the position of the first
|
1107
|
+
pixel just after the last visible one in the bottom line of the window, relative to the text
|
1108
|
+
as a whole. These are the same values passed to scrollbars via the
|
1109
|
+
<code><b>-yscrollcommand</b></code> option.
|
1110
|
+
</dd>
|
1111
|
+
<dt><br>
|
1112
|
+
<code><i>pathName</i> <b>yview moveto</b> <i>fraction</i></code></dt>
|
1113
|
+
<dd>
|
1114
|
+
Adjusts the view in the window so that the pixel given by <i>fraction</i> appears at the top
|
1115
|
+
of the top line of the window. <i>Fraction</i> is a fraction between 0 and 1; 0 indicates
|
1116
|
+
the first pixel of the first character in the text, 0.33 indicates the pixel that is one-third
|
1117
|
+
the way through the text; and so on. Values close to 1 will indicate values close to the last
|
1118
|
+
pixel in the text (1 actually refers to one pixel beyond the last pixel), but in such cases
|
1119
|
+
the widget will never scroll beyond the last pixel, and so a value of 1 will effectively be
|
1120
|
+
rounded back to whatever fraction ensures the last pixel is at the bottom of the window, and
|
1121
|
+
some other pixel is at the top.
|
1122
|
+
</dd>
|
1123
|
+
<dt><br>
|
1124
|
+
<code><i>pathName</i> <b>yview scroll</b> <i>number what</i></code></dt>
|
1125
|
+
<dd>
|
1126
|
+
This command adjust the view in the window up or down according to <i>number</i> and
|
1127
|
+
<i>what</i>. <i>What</i> must be <b>units</b>, <b>pages</b> or <b>pixels</b>. If <i>what</i>
|
1128
|
+
is <b>units</b> or <b>pages</b> then number must be an integer, otherwise number may be
|
1129
|
+
specified in any of the forms acceptable to Tk_GetPixels, such as ‘2.0c’ or
|
1130
|
+
‘1i’ (the result
|
1131
|
+
is rounded to the nearest integer value. If no units are given, pixels are assumed). If
|
1132
|
+
<i>what</i> is <b>units</b>, the view adjusts up or down by number lines on the display; if
|
1133
|
+
it is <b>pages</b> then the view adjusts by <i>number</i> screenfuls; if it is <b>pixels</b>
|
1134
|
+
then the view adjusts by <i>number</i> pixels. If <i>number</i> is negative then earlier
|
1135
|
+
positions in the text become visible; if it is positive then later positions in the text
|
1136
|
+
become visible.
|
1137
|
+
</dd>
|
1138
|
+
</dl>
|
1139
|
+
</dd>
|
1140
|
+
</dl>
|
1141
|
+
</dd>
|
1142
|
+
|
1143
|
+
<dt><a name="default_bindings"></a><b>DEFAULT BINDINGS</b></dt>
|
1144
|
+
<dd><br>
|
1145
|
+
The tokenentry widget contains several default bindings which are specified as follows:
|
1146
|
+
<ol>
|
1147
|
+
<li>
|
1148
|
+
If a non-comma key is pressed, the current text within the widget is matched against
|
1149
|
+
the values specified in the <code><b>-values</b></code> list (if this option has been
|
1150
|
+
set to a list value). Any matches (as determined by the matching options) are
|
1151
|
+
displayed in a drop-down listbox to allow the user to quickly select a token value.
|
1152
|
+
</li><br>
|
1153
|
+
<li>
|
1154
|
+
If the <code>Comma</code> or <code>Enter</code> key is pressed, the current text
|
1155
|
+
entered into the widget will immediately be replaced with a token representing the
|
1156
|
+
textual value.
|
1157
|
+
</li><br>
|
1158
|
+
<li>
|
1159
|
+
If the drop-down listbox is visible and the <code>Enter</code> key is pressed, the
|
1160
|
+
currently selected value in the drop-down listbox is used to create a token at the
|
1161
|
+
current insertion point. If any non-tokenized text exists within the widget, it is
|
1162
|
+
removed prior to the token being created for the selected value.
|
1163
|
+
</li><br>
|
1164
|
+
<li>
|
1165
|
+
If the <code>Tab</code> key is pressed, focus will be given to the next window in
|
1166
|
+
the parent window of the widget. If any text has been entered into the widget, it is
|
1167
|
+
immediately replaced with a token containing the text.
|
1168
|
+
</li><br>
|
1169
|
+
<li>
|
1170
|
+
If the drop-down listbox is visible, the <code>Down</code> key will change the selection
|
1171
|
+
in the drop-down listbox to the value immediately below the currently selected value.
|
1172
|
+
Additionally, the <code>Up</code> key will will change the selection in the drop-down
|
1173
|
+
listbox to the value immediately above the currently selected value.
|
1174
|
+
</li><br>
|
1175
|
+
<li>
|
1176
|
+
If the drop-down listbox is visible, the <code>Escape</code> key will hide the
|
1177
|
+
drop-down listbox and return focus to the entry portion of the widget.
|
1178
|
+
</li><br>
|
1179
|
+
<li>
|
1180
|
+
If the drop-down listbox is visible, left-clicking the entry field will hide the
|
1181
|
+
drop-down listbox.
|
1182
|
+
</li><br>
|
1183
|
+
<li>
|
1184
|
+
If the drop-down listbox is visible, moving the mouse over the listbox will cause the
|
1185
|
+
selection to immediately reflect the position of the cursor. Clicking the left
|
1186
|
+
button when the cursor is hovering over an element in the listbox will automatically
|
1187
|
+
choose the given value, delete any existing non-tokenized text in the widget, and
|
1188
|
+
create a new token at the cursor insertion point with the selected value.
|
1189
|
+
</li><br>
|
1190
|
+
<li>
|
1191
|
+
When the widget loses focus, any non-tokenized text will be immediately converted to
|
1192
|
+
a token and inserted at the current insertion position.
|
1193
|
+
</li><br>
|
1194
|
+
<li>
|
1195
|
+
When the entry portion of the widget receives focus, <code>Control-x</code> (or
|
1196
|
+
<code>Command-x</code> on aqua-based windowing systems) will copy the selected text to
|
1197
|
+
the clipboard and delete the selected text from the widget. If no text is currently
|
1198
|
+
selected, the key binding will copy all of the non-tokenized text to the clipboard and
|
1199
|
+
remove all non-tokenized text from the widget.
|
1200
|
+
</li><br>
|
1201
|
+
<li>
|
1202
|
+
When the entry portion of the widget receives focus, <code>Control-c</code> (or
|
1203
|
+
<code>Command-x</code> on aqua-based windowing systems) will copy the selected text to
|
1204
|
+
the clipboard. If no text is currently selected, the key binding will copy all of the
|
1205
|
+
non-tokenized text to the clipboard.
|
1206
|
+
</li><br>
|
1207
|
+
<li>
|
1208
|
+
When the entry portion of the widget receives focus, <code>Control-v</code> (or
|
1209
|
+
<code>Command-v</code> on aqua-based windowing systems) will paste the given string
|
1210
|
+
information contained in the clipboard and insert it into the entry portion of the
|
1211
|
+
widget. If the drop-down listbox is currently visible, it is hidden from view after
|
1212
|
+
the paste operation.
|
1213
|
+
</li><br>
|
1214
|
+
<li>
|
1215
|
+
When the text field has focus and the insertion cursor is to the right of a token and
|
1216
|
+
the <code>Left</code> arrow key is pressed, the token to the left of the insertion cursor is
|
1217
|
+
selected and given the focus.
|
1218
|
+
</li><br>
|
1219
|
+
<li>
|
1220
|
+
When the text field has focus and the insertion cursor is to the left of a token and the
|
1221
|
+
the <code>Right</code> arrow key is pressed, the token to the right of the insertion cursor is
|
1222
|
+
selected and given the focus.
|
1223
|
+
</li><br>
|
1224
|
+
<li>
|
1225
|
+
Whenever a token is added, removed, modified or moved, the
|
1226
|
+
<code><b><<TokenEntryModified>></b></code> event is automatically generated.
|
1227
|
+
</li><br>
|
1228
|
+
<li>
|
1229
|
+
Clicking the left-button in the entry portion of the field positions the insertion cursor
|
1230
|
+
just before the character underneath the mouse cursor, sets the input focus to this
|
1231
|
+
widget, and clears any text selection in the widget. Dragging with mouse button 1
|
1232
|
+
strokes out a selection between the insertion cursor and the character under the mouse.
|
1233
|
+
</li><br>
|
1234
|
+
<li>
|
1235
|
+
Double-clicking the left-button in the entry portion of the field selects the word under
|
1236
|
+
the mouse and positions the insertion cursor at the start of the word. Dragging after
|
1237
|
+
a double click will stroke out a selection consisting of whole words.
|
1238
|
+
</li><br>
|
1239
|
+
<li>
|
1240
|
+
Triple-clicking the left-button in the entry portion of the field selects the line under
|
1241
|
+
the mouse and positions the insertion cursor at the start of the line. Dragging after
|
1242
|
+
a triple click will stroke out a selection consisting of whole lines.
|
1243
|
+
</li><br>
|
1244
|
+
<li>
|
1245
|
+
The ends of the text selection can be adjusted by dragging with the left button while
|
1246
|
+
the <code>Shift</code> key is down; this will adjust the end of the selection that was
|
1247
|
+
nearest to the mouse when the left button was pressed. If the button id double-clicked
|
1248
|
+
before dragging then the selection will be adjusted in units of whole words; if it is
|
1249
|
+
triple-clicked then the selection will be adjusted in units of whole lines.
|
1250
|
+
</li><br>
|
1251
|
+
<li>
|
1252
|
+
Clicking the left button with the <code>Control</code> key down will reposition the
|
1253
|
+
insertion cursor without affecting the selection.
|
1254
|
+
</li><br>
|
1255
|
+
<li>
|
1256
|
+
The view in the widget can be adjusted by dragging with the middle mouse button. If
|
1257
|
+
the middle mouse button is clicked without moving the mouse, the selection is copied
|
1258
|
+
into the text at the position of the mouse cursor. The Insert key inserts the
|
1259
|
+
selection at the position of the insertion cursor.
|
1260
|
+
</li><br>
|
1261
|
+
<li>
|
1262
|
+
If the mouse is dragged out of the widget while the left button is pressed, the entry will
|
1263
|
+
automatically scroll to make more of the widget visible (if there is more text/tokens
|
1264
|
+
off-screen on the side where the mouse left the window).
|
1265
|
+
</li><br>
|
1266
|
+
<li>
|
1267
|
+
The <code>Left</code> and <code>Right</code> keys move the insertion cursor on
|
1268
|
+
character/token to th left or right; they also clear any text selection. If left or right
|
1269
|
+
is typed with the <code>Shift</code> key down, then the insertion cursor moves and the
|
1270
|
+
selection is extended to include the new character. <code>Control-Left</code> and
|
1271
|
+
<code>Control-Right</code> move the insertion cursor by words, and
|
1272
|
+
<code>Control-Shift-Left</code> and <code>Control-Shift-Right</code> move the insertion
|
1273
|
+
cursor by words and also extend the selection. <code>Control-B</code> and
|
1274
|
+
<code>Control-F</code> behave the same as left and right, respectively.
|
1275
|
+
<code>Meta-B</code> and <code>Meta-F</code> behave the same as <code>Control-Left</code>
|
1276
|
+
and <code>Control-Right</code>, respectively.
|
1277
|
+
</li><br>
|
1278
|
+
<li>
|
1279
|
+
The <code>Home</code> and <code>Control-A</code> keys move the insertion cursor to the
|
1280
|
+
beginning of its display line and clear any selection in the widget.
|
1281
|
+
<code>Shift-Home</code> moves the insertion cursor to the beginning of the display line
|
1282
|
+
and also extends the selection to that point.
|
1283
|
+
</li><br>
|
1284
|
+
<li>
|
1285
|
+
The <code>End</code> and <code>Control-E</code> keys move the insertion cursor to the
|
1286
|
+
end of the display line and clear any selection in the widget. <code>Shift-End</code>
|
1287
|
+
moves the cursor to the end of the display line and extends the selection to that point.
|
1288
|
+
</li>
|
1289
|
+
</ol>
|
1290
|
+
</dd>
|
1291
|
+
|
1292
|
+
<dt><a name="default_token_bindings"></a><b>DEFAULT TOKEN BINDINGS</b></dt>
|
1293
|
+
<dd><br>
|
1294
|
+
The individual tokens within the tokenentry widget have several default bindings which are
|
1295
|
+
the following:
|
1296
|
+
<ol>
|
1297
|
+
<li>
|
1298
|
+
When a token is left-button pressed, it becomes available for a token move operation by
|
1299
|
+
closing the drop-down listbox (if visible) and giving the entry field focus so that the
|
1300
|
+
insertion cursor can be used to indicate where the token will be moved to if the token
|
1301
|
+
is moved. If the cursor is moved while the left-button is depressed, the cursor is
|
1302
|
+
changed to indicate where the token will be moved to when the left-button is released.
|
1303
|
+
When the left-button is released, the token is moved from the original position to the
|
1304
|
+
new position.
|
1305
|
+
</li><br>
|
1306
|
+
<li>
|
1307
|
+
If the button is not moved and the left-button is released, the token is selected if
|
1308
|
+
it currently is not selected or the selected token is detokenized (token is removed
|
1309
|
+
from the widget and its value is placed into the entry field at the same position,
|
1310
|
+
the text selected, and the entry given the focus for immediate editing).
|
1311
|
+
</li><br>
|
1312
|
+
<li>
|
1313
|
+
When the cursor enters the token and the <code><b>-values</b></code> value is set to
|
1314
|
+
a non-empty Tcl list, an arrow icon will be displayed to the right of the token text
|
1315
|
+
to indicate that clicking on the arrow will display the drop-down list of all
|
1316
|
+
available values. When the cursor leaves the token, the drop-down list arrow will
|
1317
|
+
auto-hide. While the arrow is displayed, left-clicking the arrow will display the
|
1318
|
+
drop-down listbox.
|
1319
|
+
</li><br>
|
1320
|
+
<li>
|
1321
|
+
When a token is in the selected state, pressing the <code>Delete</code> key will delete
|
1322
|
+
the given token, set the focus to the entry widget, and set the insertion cursor to
|
1323
|
+
the point in the entry widget where the token previously existed.
|
1324
|
+
</li><br>
|
1325
|
+
<li>
|
1326
|
+
When a token is in the selected state, <code>Control-x</code> (or <code>Command-x</code> on
|
1327
|
+
aqua-based windowing systems) will copy the token's value to the clipboard as a string and
|
1328
|
+
the token will be deleted from the widget.
|
1329
|
+
</li><br>
|
1330
|
+
<li>
|
1331
|
+
When a token is in the selected state, <code>Control-c</code> (or <code>Command-c</code> on
|
1332
|
+
aqua-based windowing systems) will copy the token's value to the clipboard.
|
1333
|
+
</li><br>
|
1334
|
+
<li>
|
1335
|
+
When a token is selected, the <code><b><<TokenEntrySelected>></b></code>
|
1336
|
+
event is generated.
|
1337
|
+
</li><br>
|
1338
|
+
<li>
|
1339
|
+
When a token is selected and the <code>Right</code> or <code>Left</code> key is pressed,
|
1340
|
+
the token is deselected and the insertion cursor is moved to the right or left of the token.
|
1341
|
+
Additionally, if the drop-down listbox is currently shown, it is automatically closed.
|
1342
|
+
</li><br>
|
1343
|
+
<li>
|
1344
|
+
When a token is selected and the <code>Down</code> arrow key is pressed, the drop-down
|
1345
|
+
listbox (if available) is displayed and the first item in the listbox is selected.
|
1346
|
+
</li><br>
|
1347
|
+
<li>
|
1348
|
+
When a token is selected and the drop-down listbox is displayed, pressing the
|
1349
|
+
<code>Escape</code> key will cause the drop-down listbox to be closed.
|
1350
|
+
</li><br>
|
1351
|
+
<li>
|
1352
|
+
When a token is selected, the drop-down listbox is not displayed, and the
|
1353
|
+
<code>Return</code> key is pressed, the token is removed, its text is inserted into the
|
1354
|
+
text field in the same location, the text string is selected and focus is given to the
|
1355
|
+
text field for immediate value editing.
|
1356
|
+
</li>
|
1357
|
+
</ol>
|
1358
|
+
</dd>
|
1359
|
+
|
1360
|
+
<dt><a name="keywords"></a><b>KEYWORDS</b></dt>
|
1361
|
+
<dd>
|
1362
|
+
token, entry, widget
|
1363
|
+
</dd>
|
1364
|
+
</dl>
|
1365
|
+
</body>
|
1366
|
+
</html>
|