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