arcadia 0.12.2 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
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,634 @@
1
+ <html>
2
+ <head>
3
+ <title>The wmarkentry Widget</title>
4
+ </head>
5
+ <body bgcolor="#FFFFFF">
6
+ <div align="center">
7
+ <h1>The <code><b>wmarkentry</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>wmarkentry::wmarkentry</code> - Create and manipulate wmarkentry widgets</dd>
21
+
22
+ <dt><br><a href="#synopsis">SYNOPSIS</a></dt>
23
+ <dd>
24
+ <dl>
25
+ <dt><code><b>wmarkentry::wmarkentry</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>-justify</b></code></dt>
47
+ <dt><code><b>-relief</b></code></dt>
48
+ <dt><code><b>-selectbackground</b></code></dt>
49
+ <dt><code><b>-selectborderwidth</b></code></dt>
50
+ <dt><code><b>-selectforeground</b></code></dt>
51
+ <dt><code><b>-takefocus</b></code></dt>
52
+ <dt><code><b>-textvariable</b></code></dt>
53
+ <dt><code><b>-xscrollcommand</b></code></dt>
54
+ </dl>
55
+ </dd>
56
+
57
+ <dt><a href="#entry_options">ENTRY-SPECIFIC OPTIONS</a>
58
+ <dd>
59
+ <dl>
60
+ <dt><code><b>-disabledbackground</b></code></dt>
61
+ <dt><code><b>-disabledforeground</b></code></dt>
62
+ <dt><code><b>-invalidcommand</b> or <b>-invcmd</b></code></dt>
63
+ <dt><code><b>-readonlybackground</b></code></dt>
64
+ <dt><code><b>-show</b></code></dt>
65
+ <dt><code><b>-state</b></code></dt>
66
+ <dt><code><b>-validate</b></code></dt>
67
+ <dt><code><b>-validatecommand</b> or <b>-vcmd</b></code></dt>
68
+ <dt><code><b>-width</b></code></dt>
69
+ </dl>
70
+ </dd>
71
+ </dt>
72
+
73
+ <dt><a href="#wdgt_options">WIDGET-SPECIFIC OPTIONS</a>
74
+ <dd>
75
+ <dl>
76
+ <dt><code><b><a href="#watermark">-watermark</a></b> <i>text</i></code></dt>
77
+ <dt><code><b><a href="#watermarkforeground">-watermarkforeground</a></b> <i>color</i></code></dt>
78
+ </dl>
79
+ </dd>
80
+
81
+ <dt><a href="#description">DESCRIPTION</a></dt><br>
82
+
83
+ <dt><a href="#wdgt_command">WIDGET COMMANDS</a></dt><br>
84
+
85
+ <dd><code><i>pathName</i> <b><a href="#bbox">bbox</a></b>
86
+ <i>index</i></code></dd>
87
+
88
+ <dd><code><i>pathName</i> <b><a href="#cget">cget</a></b>
89
+ <i>option</i></code></dd>
90
+
91
+ <dd><code><i>pathName</i> <b><a href="#configure">configure</a></b>
92
+ <i>?option? ?value option value ...?</i></code></dd>
93
+
94
+ <dd><code><i>pathName</i> <b><a href="#delete">delete</a></b>
95
+ <i>first ?last?</i></code></dd>
96
+
97
+ <dd><code><i>pathName</i> <b><a href="#get">get</a></b></code></dd>
98
+
99
+ <dd><code><i>pathName</i> <b><a href="#icursor">icursor</a></b>
100
+ <i>index</i></code></dd>
101
+
102
+ <dd><code><i>pathName</i> <b><a href="#index">index</a></b>
103
+ <i>index</i></code></dd>
104
+
105
+ <dd><code><i>pathName</i> <b><a href="#insert">insert</a></b>
106
+ <i>index string</i></code></dd>
107
+
108
+ <dd>
109
+ <code><i>pathName</i> <b><a href="#scan">scan</a></b>
110
+ <i>option args</i></code>
111
+ <dl>
112
+ <dd><code><i>pathName</i> <b>scan mark</b>
113
+ <i>x</i></code></dd>
114
+ <dd><code><i>pathName</i> <b>scan dragto</b>
115
+ <i>x</i></code></dd>
116
+ </dl>
117
+ </dd>
118
+
119
+ <dd>
120
+ <code><i>pathName</i> <b><a href="#selection">selection</a></b>
121
+ <i>option arg</i></code>
122
+ <dl>
123
+ <dd><code><i>pathName</i> <b>selection adjust</b>
124
+ <i>index</i></code></dd>
125
+ <dd><code><i>pathName</i> <b>selection clear</b></code></dd>
126
+ <dd><code><i>pathName</i> <b>selection from</b>
127
+ <i>index</i></code></dd>
128
+ <dd><code><i>pathName</i> <b>selection present</b></code></dd>
129
+ <dd><code><i>pathName</i> <b>selection range</b>
130
+ <i>start end</i></code></dd>
131
+ <dd><code><i>pathName</i> <b>selection to</b>
132
+ <i>index</i></code></dd>
133
+ </dl>
134
+ </dd>
135
+
136
+ <dd>
137
+ <code><i>pathName</i> <b><a href="#validate">validate</a></b></code></dd>
138
+
139
+ <dd>
140
+ <code><i>pathName</i> <b><a href="#xview">xview</a></b>
141
+ <i>args</i></code>
142
+ <dl>
143
+ <dd><code><i>pathName</i> <b>xview</b></code></dd>
144
+ <dd><code><i>pathName</i> <b>xview</b> <i>index</i></code></dd>
145
+ <dd><code><i>pathName</i> <b>xview moveto</b> <i>fraction</i></code></dd>
146
+ <dd><code><i>pathName</i> <b>xview scroll</b> <i>number what</i></code></dd>
147
+ </dl>
148
+ </dd>
149
+
150
+ <dt><a href="#default_bindings">DEFAULT BINDINGS</a></dt><br>
151
+
152
+ <dt><a href="#keywords">KEYWORDS</a></dt>
153
+
154
+ </dl>
155
+
156
+ <h2><a name="detailed_ref"></a><b>Detailed Reference</b></h2>
157
+
158
+ <dl>
159
+
160
+ <dt><a name="name"></a><b>NAME</b></dt>
161
+ <dd><code>wmarkentry::wmarkentry</code> - Create and manipulate wmarkentry widgets</dd>
162
+
163
+ <dt><br><a name="synopsis"></a><b>SYNOPSIS</b></dt>
164
+ <dd>
165
+ <pre>
166
+ <b>wmarkentry::wmarkentry</b> <i>pathName</i> ?<i>options</i>?
167
+ </pre>
168
+ </dd>
169
+
170
+ <dt><a name="std_options"></a><b>STANDARD_OPTIONS</b></dt>
171
+ <dd>
172
+ <dl>
173
+ <dt><code><b>-background</b> or <b>-bg</b></code></dt>
174
+ <dt><code><b>-borderwidth</b> or <b>-bd</b></code></dt>
175
+ <dt><code><b>-cursor</b></code></dt>
176
+ <dt><code><b>-exportselection</b></code></dt>
177
+ <dt><code><b>-font</b></code></dt>
178
+ <dt><code><b>-foreground</b> or <b>-fg</b></code></dt>
179
+ <dt><code><b>-highlightbackground</b></code></dt>
180
+ <dt><code><b>-highlightcolor</b></code></dt>
181
+ <dt><code><b>-highlightthickness</b></code></dt>
182
+ <dt><code><b>-insertbackground</b></code></dt>
183
+ <dt><code><b>-insertborderwidth</b></code></dt>
184
+ <dt><code><b>-insertofftime</b></code></dt>
185
+ <dt><code><b>-insertontime</b></code></dt>
186
+ <dt><code><b>-insertwidth</b></code></dt>
187
+ <dt><code><b>-justify</b></code></dt>
188
+ <dt><code><b>-relief</b></code></dt>
189
+ <dt><code><b>-selectbackground</b></code></dt>
190
+ <dt><code><b>-selectborderwidth</b></code></dt>
191
+ <dt><code><b>-selectforeground</b></code></dt>
192
+ <dt><code><b>-takefocus</b></code></dt>
193
+ <dt><code><b>-textvariable</b></code></dt>
194
+ <dt><code><b>-xscrollcommand</b></code></dt>
195
+ </dl>
196
+ </dd>
197
+ <dd>
198
+ See the <b>options</b> manual entry for details on the standard options.
199
+ </dd>
200
+
201
+ <dt><br><a name="entry_options"></a><b>ENTRY-SPECIFIC OPTIONS</b></dt>
202
+ <dd>
203
+ <dl>
204
+ <dt><code><b>-disabledbackground</b></code></dt>
205
+ <dt><code><b>-disabledforeground</b></code></dt>
206
+ <dt><code><b>-invalidcommand</b> or <b>-invcmd</b></code></dt>
207
+ <dt><code><b>-readonlybackground</b></code></dt>
208
+ <dt><code><b>-show</b></code></dt>
209
+ <dt><code><b>-state</b></code></dt>
210
+ <dt><code><b>-validate</b></code></dt>
211
+ <dt><code><b>-validatecommand</b> or <b>-vcmd</b></code></dt>
212
+ <dt><code><b>-width</b></code></dt>
213
+ </dl>
214
+ </dd>
215
+
216
+ <dt><br><a name="wdgt_options"></a><b>WIDGET-SPECIFIC OPTIONS</b></dt><br>
217
+
218
+ <dd>
219
+ <a name="watermark"></a>
220
+ <table border="0" cellpadding="0" cellspacing="0">
221
+ <tr>
222
+ <td>Command-Line Name:&nbsp;</td>
223
+ <td><code><b>-watermark</b></code></td>
224
+ </tr>
225
+ <tr>
226
+ <td>Database Name:</td>
227
+ <td><code><b>&nbsp;watermark</b></code></td>
228
+ </tr>
229
+ <tr>
230
+ <td>Database Class:</td>
231
+ <td><code><b>&nbsp;Watermark</b></code></td>
232
+ </tr>
233
+ </table>
234
+ <blockquote>
235
+ <p>
236
+ Specifies a textual string that will be used as a watermark in the entry field. The
237
+ watermark string cannot be copied or selected and only is visible when the entry
238
+ field is empty. Once the user begins to type in the entry field, the watermark
239
+ string is cleared and the user's input data is visible. By default, no watermark
240
+ is displayed in the entry field. The watermark can be cleared by setting this option
241
+ to the empty string.
242
+ </p>
243
+ </blockquote>
244
+ </dd>
245
+
246
+ <dd>
247
+ <a name="watermarkforeground"></a>
248
+ <table border="0" cellpadding="0" cellspacing="0">
249
+ <tr>
250
+ <td>Command-Line Name:&nbsp;</td>
251
+ <td><code><b>-watermarkforeground</b></code></td>
252
+ </tr>
253
+ <tr>
254
+ <td>Database Name:</td>
255
+ <td><code><b>&nbsp;watermarkForeground</b></code></td>
256
+ </tr>
257
+ <tr>
258
+ <td>Database Class:</td>
259
+ <td><code><b>&nbsp;Foreground</b></code></td>
260
+ </tr>
261
+ </table>
262
+ <blockquote>
263
+ <p>
264
+ Specifies the foreground color to use when a watermark is to be displayed in the
265
+ entry field.
266
+ </p>
267
+ </blockquote>
268
+ </dd>
269
+
270
+ <dt><a name="description"></a><b>DESCRIPTION</b></dt>
271
+ <dd><br>
272
+ The <code><b>wmarkentry::wmarkentry</b></code> command creates a new window named
273
+ <code><i>pathName</i></code> and of the class <code><b>WMarkEntry</b></code>, and makes it
274
+ into a <b>wmarkentry</b> widget.&nbsp; Additional options, described above, may be
275
+ specified on the command-line or in the option database to configure aspects of the
276
+ tokenentry sucah as its colors, font, and sizing.&nbsp; The
277
+ <code><b>wmarkentry::wmarkentry</b></code> command returns its <code><i>pathName</i></code>
278
+ argument.&nbsp; At the time this command is invoked, there must not exist a window named
279
+ <code><i>pathName</i></code>, but <code><i>pathName</i></code>'s parent must exist.
280
+ </dd>
281
+ <dd><br>
282
+ The wmarkentry widget is an entry widget that provides the additional capability of a
283
+ watermark within the widget when no user data has been entered. The watermark can be any
284
+ text string and it can also be given its own foreground color. Watermark text is not
285
+ selectable or copyable, not returned as text when the entry get command is invoked, not
286
+ navigable (via the insertion cursor), automatically disappears when user text is entered,
287
+ and automatically reappears when user text is completely removed from the widget. In all
288
+ other ways, the widget behaves the same as the standard entry widget in Tk.
289
+ </dd>
290
+
291
+ <dt><br>
292
+ <a name="wdgt_command"></a><b>WIDGET COMMANDS</b></dt>
293
+ <dd><br>
294
+ The <code><b>wmarkentry::wmarkentry</b></code> command creates a new Tcl command whose
295
+ name is <code><i>pathName</i></code>.&nbsp; This command may be used to invoke various
296
+ operations on the widget.&nbsp; It has the following general form:
297
+ <blockquote>
298
+ <pre>
299
+ <i>pathName</i> <i>option ?arg arg ...?</i>
300
+ </pre>
301
+ </blockquote>
302
+ </dd>
303
+ <dd>
304
+ <code><i>option</i></code> and the <code><i>arg</i></code> determine the exact behavior
305
+ of the command.&nbsp; The following commands are possible for tokenentry widgets:
306
+ </dd>
307
+ <dd>
308
+ <dl>
309
+ <dt><a name="bbox"></a>
310
+ <code><i>pathName</i> <b>bbox</b> <i>index</i></code></dt>
311
+ <dd>
312
+ Returns a list of four numbers describing the bounding box of the character given by
313
+ <i>index</i>. The first two elements of the list give the x and y coordinates of the
314
+ upper-left corner of the screen area covered by the character (in pixels relative to
315
+ the widget) and the last two elements give the width and height of the character, in
316
+ pixels. The bounding box may refer to a region outside the visible area of the window.
317
+ </dd>
318
+ <dt><br><a name="cget"></a>
319
+ <code><i>pathName</i> <b>cget</b> <i>option</i></code></dt>
320
+ <dd>
321
+ Returns the current value of the configuration option given by <i>option</i>.
322
+ <i>Option</i> may have any of the values accepted by the Tk <b>entry</b> command.
323
+ </dd>
324
+ <dt><br><a name="configure"></a>
325
+ <code><i>pathName</i> <b>configure</b> <i>?option? ?value option value ...?</i></code></dt>
326
+ <dd>
327
+ Query or modify the configuration options of the widget. If no <i>option</i> is
328
+ specified, returns a list describing all of the available options for <i>pathName</i>
329
+ (see Tk_ConfigureInfo for information on the format of this list). If <i>option</i> is
330
+ specified with no <i>value</i>, then the command returns a list describing the one
331
+ named option (this list will be identical to the corresponding sublist of the value
332
+ returned if no <i>option</i> is specified). If one or more <i>option-value</i> pairs
333
+ are specified, then the command modifies the given widget option(s) to have the given
334
+ value(s); in this case the command returns an empty string. <i>Option</i> may have any
335
+ of the values accepted by the Tk <b>entry</b> command.
336
+ </dd>
337
+ <dt><br><a name="delete"></a>
338
+ <code><i>pathName</i> <b>delete</b> <i>first ?last?</i></code></dt>
339
+ <dd>
340
+ Delete one or more elements of the entry. <i>First</i> is the index of the first
341
+ character to delete, and <i>last</i> is the index of the character just after the last
342
+ one to delete. If <i>last</i> is not specified it defaults to <i>first</i>+1, i.e. a
343
+ single character is deleted. This command returns an empty string.
344
+ </dd>
345
+ <dt><br><a name="get"></a>
346
+ <code><i>pathName</i> <b>get</b></code></dt>
347
+ <dd>
348
+ Returns the entry's string.
349
+ </dd>
350
+ <dt><br><a name="icursor"></a>
351
+ <code><i>pathName</i> <b>icursor</b> <i>index</i></code></dt>
352
+ <dd>
353
+ Arrange for the insertion cursor to be displayed just before the character given by
354
+ <i>index</i>. Returns an empty string.
355
+ </dd>
356
+ <dt><br><a name="index"></a>
357
+ <code><i>pathName</i> <b>index</b> <i>index</i></code></dt>
358
+ <dd>
359
+ Returns the numerical index corresponding to <i>index</i>.
360
+ </dd>
361
+ <dt><br><a name="insert"></a>
362
+ <code><i>pathName</i> <b>insert</b> <i>index string</i></code></dt>
363
+ <dd>
364
+ Insert the characters of <i>string</i> just before the character indicated by
365
+ <i>index</i>. Returns an empty string.
366
+ </dd>
367
+ <dt><br><a name="scan"></a>
368
+ <code><i>pathName</i> <b>scan</b> <i>option args</i></code></dt>
369
+ <dd>
370
+ This command is used to implement scanning on entries. It has two forms, depending on
371
+ <i>option</i>:
372
+ <dl>
373
+ <dt>
374
+ <code><i>pathName</i> <b>scan mark</b> <i>x</i></code></dt>
375
+ <dd>
376
+ Records <i>x</i> and the current view in the entry window; used in conjunction with
377
+ later <b>scan dragto</b> commands. Typically this command is associated with a
378
+ mouse button press in the widget. It returns an empty string.
379
+ </dd>
380
+ <dt>
381
+ <code><i>pathName</i> <b>scan dragto</b> <i>x</i></code></dt>
382
+ <dd>
383
+ This command computes the difference between its <i>x</i> argument and the <i>x</i>
384
+ argument to the last <b>scan mark</b> command for the widget. It then adjusts the
385
+ view left or right by 10 times the difference in x-coordinates. This command is
386
+ typically associated with mouse motion events in the widget, to produce the effect
387
+ of dragging the entry at high speed through the window. The return value is an
388
+ empty string.
389
+ </dd>
390
+ </dl>
391
+ </dd>
392
+ <dt><a name="selection"></a>
393
+ <code><i>pathName</i> <b>selection</b> <i>option arg</i></code></dt>
394
+ <dd>
395
+ This command is used to adjust the selection within an entry. It has several forms,
396
+ depending on <i>option</i>:
397
+ <dl>
398
+ <dt>
399
+ <code><i>pathName</i> <b>selection adjust</b> <i>index</i></code></dt>
400
+ <dd>
401
+ Locate the end of the selection nearest to the character given by <i>index</i>, and
402
+ adjust that end of the selection to be at <i>index</i> (i.e. including but not going
403
+ beyond <i>index</i>). The other end of the selection is made the anchor point for
404
+ future <b>select to</b> commands. If the selection is not currently in the entry,
405
+ then a new selection is created to include the characters between <i>index</i> and
406
+ the most recent selection anchor point, inclusive. Returns an empty string.
407
+ </dd>
408
+ <dt><br>
409
+ <code><i>pathName</i> <b>selection clear</b></code></dt>
410
+ <dd>
411
+ Clear the selection if it is currently in this widget. If the selection is not in
412
+ this widget then the command has no effect. Returns an empty string.
413
+ </dd>
414
+ <dt><br>
415
+ <code><i>pathName</i> <b>selection from</b> <i>index</i></code></dt>
416
+ <dd>
417
+ Set the selection anchor point to just before the character given by <i>index</i>.
418
+ Does not change the selection. Returns an empty string.
419
+ </dd>
420
+ <dt><br>
421
+ <code><i>pathName</i> <b>selection present</b></code></dt>
422
+ <dd>
423
+ Returns 1 if there is are characters selected in the entry, 0 if nothing is selected.
424
+ </dd>
425
+ <dt><br>
426
+ <code><i>pathName</i> <b>selection range</b> <i>start end</i></code></dt>
427
+ <dd>
428
+ Sets the selection to include the characters starting with the one indexed by
429
+ <i>start</i> and ending with the one just before <i>end</i>. If <i>end</i> refers
430
+ to the same character as <i>start</i> or an earlier one, then the entry's selection
431
+ is cleared.
432
+ </dd>
433
+ <dt><br>
434
+ <code><i>pathName</i> <b>selection to</b> <i>index</i></code></dt>
435
+ <dd>
436
+ If <i>index</i> is before the anchor point, set the selection to the characters
437
+ from <i>index</i> up to but not including the anchor point. If <i>index</i> is the
438
+ same as the anchor point, do nothing. If <i>index</i> is after the anchor point, set
439
+ the selection to the characters from the anchor point up to but not including
440
+ <i>index</i>. The anchor point is determined by the most recent <b>select from</b>
441
+ or <b>select adjust</b> command in this widget. If the selection is not in this
442
+ widget then a new selection is created using the most recent anchor point specified
443
+ for the widget. Returns an empty string.
444
+ </dd>
445
+ </dl>
446
+ </dd>
447
+ <dt><a name="validate"></a>
448
+ <code><i>pathName</i> <b>validate</b></code></dt>
449
+ <dd>
450
+ This command is used to force an evaluation of the <b>validateCommand</b> independent
451
+ of the conditions specified by the <b>validate</b> option. This is done by temporarily
452
+ setting the <b>validate</b> option to <b>all</b>. It returns 0 or 1.
453
+ </dd>
454
+ <dt><br><a name="xview"></a>
455
+ <code><i>pathName</i> <b>xview</b> <i>args</i></code></dt>
456
+ <dd>
457
+ This command is used to query and change the horizontal position of the text in the
458
+ widget's window. It can take any of the following forms:
459
+ <dl>
460
+ <dt>
461
+ <code><i>pathName</i> <b>xview</b></code></dt>
462
+ <dd>
463
+ Returns a list containing two elements. Each element is a real fraction between 0
464
+ and 1; together they describe the horizontal span that is visible in the window.
465
+ For example, if the first element is .2 and the second element is .6, 20% of the
466
+ entry's text is off-screen to the left, the middle 40% is visible in the window, and
467
+ 40% of the text is off-screen to the right. These are the same values passed to
468
+ scrollbars via the <b>-xscrollcommand</b> option.
469
+ </dd>
470
+ <dt><br>
471
+ <code><i>pathName</i> <b>xview</b> <i>index</i></code></dt>
472
+ <dd>
473
+ Adjusts the view in the window so that the character given by <i>index</i> is
474
+ displayed at the left edge of the window.
475
+ </dd>
476
+ <dt><br>
477
+ <code><i>pathName</i> <b>xview moveto</b> <i>fraction</i></code></dt>
478
+ <dd>
479
+ Adjusts the view in the window so that the character <i>fraction</i> of the way
480
+ through the text appears at the left edge of the window. <i>Fraction</i> must be a
481
+ fraction between 0 and 1.
482
+ </dd>
483
+ <dt><br>
484
+ <code><i>pathName</i> <b>xview scroll</b> <i>number what</i></code></dt>
485
+ <dd>
486
+ This command shifts the view in the window left or right according to <i>number</i>
487
+ and <i>what</i>. Number must be an integer. <i>What</i> must be either <b>units</b>
488
+ or <b>pages</b> or an abbreviation of one of these. If <i>what</i> is <b>units</b>,
489
+ the view adjusts left or right by <i>number</i> average-width characters on the
490
+ display; if it is <b>pages</b> then the view adjusts by <i>number</i> screenfuls. If
491
+ <i>number</i> is negative then characters farther to the left become visible; if it
492
+ is positive then characters farther to the right become visible.
493
+ </dd>
494
+ </dl>
495
+ </dd>
496
+ </dl>
497
+ </dd>
498
+
499
+ <dt><a name="default_bindings"></a><b>DEFAULT BINDINGS</b></dt>
500
+ <dd><br>
501
+ Tk automatically creates class bindings for entries that give them the following default
502
+ behavior. In the descriptions below, “word” refers to a contiguous group of letters, digits,
503
+ or “_” characters, or any single character other than these.
504
+ <ol>
505
+ <li>
506
+ Clicking mouse button 1 positions the insertion cursor just before the character
507
+ underneath the mouse cursor, sets the input focus to this widget, and clears any
508
+ selection in the widget. Dragging with mouse button 1 strokes out a selection between
509
+ the insertion cursor and the character under the mouse.
510
+ </li><br>
511
+ <li>
512
+ Double-clicking with mouse button 1 selects the word under the mouse and positions the
513
+ insertion cursor at the end of the word. Dragging after a double click will stroke out
514
+ a selection consisting of whole words.
515
+ </li><br>
516
+ <li>
517
+ Triple-clicking with mouse button 1 selects all of the text in the entry and positions
518
+ the insertion cursor at the end of the line.
519
+ </li><br>
520
+ <li>
521
+ The ends of the selection can be adjusted by dragging with mouse button 1 while the
522
+ Shift key is down; this will adjust the end of the selection that was nearest to the
523
+ mouse cursor when button 1 was pressed. If the button is double-clicked before dragging
524
+ then the selection will be adjusted in units of whole words.
525
+ </li><br>
526
+ <li>
527
+ Clicking mouse button 1 with the Control key down will position the insertion cursor in
528
+ the entry without affecting the selection.
529
+ </li><br>
530
+ <li>
531
+ If any normal printing characters are typed in an entry, they are inserted at the point
532
+ of the insertion cursor.
533
+ </li><br>
534
+ <li>
535
+ The view in the entry can be adjusted by dragging with mouse button 2. If mouse button 2
536
+ is clicked without moving the mouse, the selection is copied into the entry at the
537
+ position of the mouse cursor.
538
+ </li><br>
539
+ <li>
540
+ If the mouse is dragged out of the entry on the left or right sides while button 1 is
541
+ pressed, the entry will automatically scroll to make more text visible (if there is more
542
+ text off-screen on the side where the mouse left the window).
543
+ </li><br>
544
+ <li>
545
+ The Left and Right keys move the insertion cursor one character to the left or right;
546
+ they also clear any selection in the entry and set the selection anchor. If Left or
547
+ Right is typed with the Shift key down, then the insertion cursor moves and the
548
+ selection is extended to include the new character. Control-Left and Control-Right move
549
+ the insertion cursor by words, and Control-Shift-Left and Control-Shift-Right move the
550
+ insertion cursor by words and also extend the selection. Control-b and Control-f behave
551
+ the same as Left and Right, respectively. Meta-b and Meta-f behave the same as
552
+ Control-Left and Control-Right, respectively.
553
+ </li><br>
554
+ <li>
555
+ The Home key, or Control-a, will move the insertion cursor to the beginning of the
556
+ entry and clear any selection in the entry. Shift-Home moves the insertion cursor to the
557
+ beginning of the entry and also extends the selection to that point.
558
+ </li><br>
559
+ <li>
560
+ The End key, or Control-e, will move the insertion cursor to the end of the entry and
561
+ clear any selection in the entry. Shift-End moves the cursor to the end and extends the
562
+ selection to that point.
563
+ </li><br>
564
+ <li>
565
+ The Select key and Control-Space set the selection anchor to the position of the
566
+ insertion cursor. They do not affect the current selection. Shift-Select and
567
+ Control-Shift-Space adjust the selection to the current position of the insertion
568
+ cursor, selecting from the anchor to the insertion cursor if there was not any selection
569
+ previously.
570
+ </li><br>
571
+ <li>
572
+ Control-/ selects all the text in the entry.
573
+ </li><br>
574
+ <li>
575
+ Control-\ clears any selection in the entry.
576
+ </li><br>
577
+ <li>
578
+ The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in
579
+ the widget to the clipboard, if there is a selection.
580
+ </li><br>
581
+ <li>
582
+ The F20 key (labelled Cut on many Sun workstations) or Control-w copies the selection in
583
+ the widget to the clipboard and deletes the selection. If there is no selection in the
584
+ widget then these keys have no effect.
585
+ </li><br>
586
+ <li>
587
+ The F18 key (labelled Paste on many Sun workstations) or Control-y inserts the contents
588
+ of the clipboard at the position of the insertion cursor.
589
+ </li><br>
590
+ <li>
591
+ The Delete key deletes the selection, if there is one in the entry. If there is no
592
+ selection, it deletes the character to the right of the insertion cursor.
593
+ </li><br>
594
+ <li>
595
+ The BackSpace key and Control-h delete the selection, if there is one in the entry. If
596
+ there is no selection, it deletes the character to the left of the insertion cursor.
597
+ </li><br>
598
+ <li>
599
+ Control-d deletes the character to the right of the insertion cursor.
600
+ </li><br>
601
+ <li>
602
+ Meta-d deletes the word to the right of the insertion cursor.
603
+ </li><br>
604
+ <li>
605
+ Control-k deletes all the characters to the right of the insertion cursor.
606
+ </li><br>
607
+ <li>
608
+ Control-t reverses the order of the two characters to the right of the insertion cursor.
609
+ </li>
610
+ </ol>
611
+ </dd>
612
+ <dd>
613
+ If the entry is empty and only the watermark is displayed, the bindings will work as if
614
+ the entry is empty.
615
+ </dd>
616
+ <dd><br>
617
+ If the entry is disabled using the <b>-state</b> option, then the entry's view can still be
618
+ adjusted and text in the entry can still be selected, but no insertion cursor will be
619
+ displayed and no text modifications will take place except if the entry is linked to a
620
+ variable using the <b>-textvariable</b> option, in which case any changes to the variable
621
+ are reflected by the entry whatever the value of its <b>-state</b> option.
622
+ </dd>
623
+ <dd><br>
624
+ The behavior of entries can be changed by defining new bindings for individual widgets or
625
+ by redefining the class bindings.
626
+ </dd>
627
+
628
+ <dt><br><a name="keywords"></a><b>KEYWORDS</b></dt>
629
+ <dd>
630
+ entry, widget
631
+ </dd>
632
+ </dl>
633
+ </body>
634
+ </html>