Commit of 3.99.3 version
This commit is contained in:
+177
-135
@@ -661,7 +661,7 @@ widget command.
|
||||
The following options are currently supported:
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M85">\fB\:align \fIwhere\fR</A><DD>
|
||||
<DT><A NAME="M85">{B:align} {IwhereR}</A><DD>
|
||||
If the image is not as tall as the line in which it is displayed,
|
||||
this option determines where the image is displayed in the line.
|
||||
<I>Where</I> must have one of the values <B>top</B> (align the top of the image
|
||||
@@ -671,23 +671,23 @@ image with the bottom of the line's area),
|
||||
or <B>baseline</B> (align the bottom of the image with the baseline
|
||||
of the line).
|
||||
<P>
|
||||
<DT><A NAME="M86">\fB\:image \fIimage\fR</A><DD>
|
||||
<DT><A NAME="M86">{B:image} {IimageR}</A><DD>
|
||||
Specifies the name of the Tk image to display in the annotation.
|
||||
If <I>image</I> is not a valid Tk image, then an error is returned.
|
||||
<P>
|
||||
<DT><A NAME="M87">\fB\:name \fIImageName\fR</A><DD>
|
||||
<DT><A NAME="M87">{B:name} {IImageNameR}</A><DD>
|
||||
Specifies the name by which this image instance may be referenced in
|
||||
the text widget. If <I>ImageName</I> is not supplied, then the
|
||||
name of the Tk image is used instead.
|
||||
If the <I>imageName</I> is already in use, <I>#nn</I> is appended to
|
||||
the end of the name as described above.
|
||||
<P>
|
||||
<DT><A NAME="M88">\fB\:padx \fIpixels\fR</A><DD>
|
||||
<DT><A NAME="M88">{B:padx} {IpixelsR}</A><DD>
|
||||
<I>Pixels</I> specifies the amount of extra space to leave on
|
||||
each side of the embedded image.
|
||||
It may have any of the usual forms defined for a screen distance.
|
||||
<P>
|
||||
<DT><A NAME="M89">\fB\:pady \fIpixels\fR</A><DD>
|
||||
<DT><A NAME="M89">{B:pady} {IpixelsR}</A><DD>
|
||||
<I>Pixels</I> specifies the amount of extra space to leave on
|
||||
the top and on the bottom of the embedded image.
|
||||
It may have any of the usual forms defined for a screen distance.
|
||||
@@ -700,19 +700,23 @@ It may have any of the usual forms defined for a screen distance.
|
||||
Selection support is implemented via tags.
|
||||
If the <B>exportSelection</B> option for the text widget is true
|
||||
then the <B>sel</B> tag will be associated with the selection:
|
||||
<OL>
|
||||
<LI>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M91">{[1]}</A><DD>
|
||||
Whenever characters are tagged with <B>sel</B> the text widget
|
||||
will claim ownership of the selection.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M92">{[2]}</A><DD>
|
||||
Attempts to retrieve the
|
||||
selection will be serviced by the text widget, returning all the
|
||||
characters with the <B>sel</B> tag.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M93">{[3]}</A><DD>
|
||||
If the selection is claimed away by another application or by another
|
||||
window within this application, then the <B>sel</B> tag will be removed
|
||||
from all characters in the text.
|
||||
</OL>
|
||||
<P>
|
||||
</DL>
|
||||
<P>
|
||||
The <B>sel</B> tag is automatically defined when a text widget is
|
||||
created, and it may not be deleted with the ``<I>widget-name </I><B>'tag 'delete</B>''
|
||||
@@ -723,7 +727,7 @@ the text widget are tied to the <B>:background</B>,
|
||||
tag: changes in either will automatically be reflected in the
|
||||
other.
|
||||
|
||||
<H3><A NAME="M91">THE INSERTION CURSOR</A></H3>
|
||||
<H3><A NAME="M94">THE INSERTION CURSOR</A></H3>
|
||||
The mark named <B>insert</B> has special significance in text widgets.
|
||||
It is defined automatically when a text widget is created and it
|
||||
may not be unset with the ``<I>widget-name </I><B>mark unset</B>'' widget
|
||||
@@ -732,7 +736,7 @@ The <B>insert</B> mark represents the position of the insertion
|
||||
cursor, and the insertion cursor will automatically be drawn at
|
||||
this point whenever the text widget has the input focus.
|
||||
|
||||
<H3><A NAME="M92">WIDGET PROCEDURE</A></H3>
|
||||
<H3><A NAME="M95">WIDGET PROCEDURE</A></H3>
|
||||
The <B>text</B> procedure creates a new STk procedure whose
|
||||
name is the same as the path name of the text's window. This
|
||||
procedure may be used to invoke various
|
||||
@@ -744,7 +748,7 @@ determine the exact behavior of the procedure. The following
|
||||
procedures are possible for text widgets:
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M93">(<I>widget-name '</I><B>bbox </B><I>index</I>)</A><DD>
|
||||
<DT><A NAME="M96">(<I>widget-name '</I><B>bbox </B><I>index</I>)</A><DD>
|
||||
Returns a list of four elements describing the screen area
|
||||
of the character given by <I>index</I>.
|
||||
The first two elements of the list give the x and y coordinates
|
||||
@@ -756,13 +760,13 @@ the return value reflects just the visible part.
|
||||
If the character is not visible on the screen then the return
|
||||
value is an empty list.
|
||||
<P>
|
||||
<DT><A NAME="M94">(<I>widget-name '</I><B>cget</B> <I>option</I>)</A><DD>
|
||||
<DT><A NAME="M97">(<I>widget-name '</I><B>cget</B> <I>option</I>)</A><DD>
|
||||
Returns the current value of the configuration option given
|
||||
by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the <B>text</B>
|
||||
procedure.
|
||||
<P>
|
||||
<DT><A NAME="M95">(<I>widget-name '</I><B>compare</B> <I>index1 op index2</I>)</A><DD>
|
||||
<DT><A NAME="M98">(<I>widget-name '</I><B>compare</B> <I>index1 op index2</I>)</A><DD>
|
||||
Compares the indices given by <I>index1</I> and <I>index2</I> according
|
||||
to the relational operator given by <I>op</I>, and returns 1 if
|
||||
the relationship is satisfied and 0 if it isn't.
|
||||
@@ -772,7 +776,7 @@ the same character, if <I>op</I> is < then 1 is returned if <I>index1</I>
|
||||
refers to an earlier character in the text than <I>index2</I>, and
|
||||
so on.
|
||||
<P>
|
||||
<DT><A NAME="M96">(<I>widget-name '</I><B>configure</B> ?<I>option</I>? <I>?value option value ...</I>?)</A><DD>
|
||||
<DT><A NAME="M99">(<I>widget-name '</I><B>configure</B> ?<I>option</I>? <I>?value option value ...</I>?)</A><DD>
|
||||
Query or modify the configuration options of the widget.
|
||||
If no <I>option</I> is specified, returns a list describing all of
|
||||
the available options for <I>widget-name</I> (see <B>Tk_ConfigureInfo</B> for
|
||||
@@ -786,8 +790,8 @@ this case the procedure returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the <B>text</B>
|
||||
procedure.
|
||||
<P>
|
||||
<DT><A NAME="M97">(<I>widget-name '</I><B>debug </B>)</A><DD>
|
||||
<DT><A NAME="M98">(<I>widget-name '</I><B>debug </B><I>boolean</I>)</A><DD>
|
||||
<DT><A NAME="M100">(<I>widget-name '</I><B>debug </B>)</A><DD>
|
||||
<DT><A NAME="M101">(<I>widget-name '</I><B>debug </B><I>boolean</I>)</A><DD>
|
||||
If <I>boolean</I> is specified, then it must have one of the true or
|
||||
false values accepted by Tcl_GetBoolean.
|
||||
If the value is a true one then internal consistency checks will be
|
||||
@@ -802,8 +806,8 @@ debugging on or off in any widget turns it on or off for all widgets.
|
||||
For widgets with large amounts of text, the consistency checks may
|
||||
cause a noticeable slow-down.
|
||||
<P>
|
||||
<DT><A NAME="M99">(<I>widget-name '</I><B>delete </B><I>index1 </I>)</A><DD>
|
||||
<DT><A NAME="M100">(<I>widget-name '</I><B>delete </B><I>index1 </I><I>index2</I>)</A><DD>
|
||||
<DT><A NAME="M102">(<I>widget-name '</I><B>delete </B><I>index1 </I>)</A><DD>
|
||||
<DT><A NAME="M103">(<I>widget-name '</I><B>delete </B><I>index1 </I><I>index2</I>)</A><DD>
|
||||
Delete a range of characters from the text.
|
||||
If both <I>index1</I> and <I>index2</I> are specified, then delete
|
||||
all the characters starting with the one given by <I>index1</I>
|
||||
@@ -817,7 +821,7 @@ It is not allowable to delete characters in a way that would leave
|
||||
the text without a newline as the last character.
|
||||
The procedure returns an empty string.
|
||||
<P>
|
||||
<DT><A NAME="M101">(<I>widget-name '</I><B>dlineinfo </B><I>index</I>)</A><DD>
|
||||
<DT><A NAME="M104">(<I>widget-name '</I><B>dlineinfo </B><I>index</I>)</A><DD>
|
||||
Returns a list with five elements describing the area occupied
|
||||
by the display line containing <I>index</I>.
|
||||
The first two elements of the list give the x and y coordinates
|
||||
@@ -836,7 +840,7 @@ by characters and embedded windows.
|
||||
If the display line containing <I>index</I> is not visible on
|
||||
the screen then the return value is an empty list.
|
||||
<P>
|
||||
<DT><A NAME="M102">(<I>widget-name </I><B>'dump </B>?<I>switches</I>? <I>index1 </I>?<I>index2</I>?)</A><DD>
|
||||
<DT><A NAME="M105">(<I>widget-name </I><B>'dump </B>?<I>switches</I>? <I>index1 </I>?<I>index2</I>?)</A><DD>
|
||||
Return the contents of the text widget from <I>index1</I> up to,
|
||||
but not including <I>index2</I>,
|
||||
including the text and
|
||||
@@ -859,24 +863,24 @@ One or more of the following switches (or abbreviations thereof)
|
||||
may be specified to control the dump:
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M103"><B>:all</B></A><DD>
|
||||
<DT><A NAME="M106"><B>:all</B></A><DD>
|
||||
Return information about all elements: text, marks, tags, and windows.
|
||||
This is the default.
|
||||
<P>
|
||||
<DT><A NAME="M104"><B>:command </B><I>closure</I></A><DD>
|
||||
<DT><A NAME="M107"><B>:command </B><I>closure</I></A><DD>
|
||||
Instead of returning the information as the result of the dump operation,
|
||||
invoke the <I>closure</I> on each element of the text widget within the range.
|
||||
The command must have three arguments: <I>key</I>, <I>value</I>, and <I>index</I>.
|
||||
<P>
|
||||
<DT><A NAME="M105"><B>:mark</B></A><DD>
|
||||
<DT><A NAME="M108"><B>:mark</B></A><DD>
|
||||
Include information about marks in the dump results.
|
||||
<P>
|
||||
<DT><A NAME="M106"><B>:tag</B></A><DD>
|
||||
<DT><A NAME="M109"><B>:tag</B></A><DD>
|
||||
Include information about tag transitions in the dump results. Tag information is
|
||||
returned as <B>tagon</B> and <B>tagoff</B> elements that indicate the
|
||||
begin and end of each range of each tag, respectively.
|
||||
<P>
|
||||
<DT><A NAME="M107"><B>:text</B></A><DD>
|
||||
<DT><A NAME="M110"><B>:text</B></A><DD>
|
||||
Include information about text in the dump results. The value is the
|
||||
text up to the next element or the end of range indicated by <I>index2</I>.
|
||||
A text element does not span newlines. A multi-line block of text that
|
||||
@@ -884,7 +888,7 @@ contains no marks or tag transitions will still be dumped as a set
|
||||
of text seqments that each end with a newline. The newline is part
|
||||
of the value.
|
||||
<P>
|
||||
<DT><A NAME="M108"><B>:window</B></A><DD>
|
||||
<DT><A NAME="M111"><B>:window</B></A><DD>
|
||||
Include information about embedded windows in the dump results.
|
||||
The value of a window is its Tk pathname, unless the window
|
||||
has not been created yet. (It must have a create script.)
|
||||
@@ -895,8 +899,8 @@ window by its index position to get more information.
|
||||
</UL>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M109">(<I>widget-name </I><B>'get </B><I>index1 </I>)</A><DD>
|
||||
<DT><A NAME="M110">(<I>widget-name </I><B>'get </B><I>index1 </I><I>index2</I>)</A><DD>
|
||||
<DT><A NAME="M112">(<I>widget-name </I><B>'get </B><I>index1 </I>)</A><DD>
|
||||
<DT><A NAME="M113">(<I>widget-name </I><B>'get </B><I>index1 </I><I>index2</I>)</A><DD>
|
||||
Return a range of characters from the text.
|
||||
The return value will be all the characters in the text starting
|
||||
with the one whose index is <I>index1</I> and ending just before
|
||||
@@ -911,7 +915,7 @@ If the specified range contains embedded windows, no information
|
||||
about them is included in the returned string.
|
||||
|
||||
<P>
|
||||
<DT><A NAME="M111">(\fwidget-name \fB'image \fIoption \fR?\fIarg arg ...\fR?)</A><DD>
|
||||
<DT><A NAME="M114">{(widget-name} {B'image} {Ioption} {R?Iarg} arg {...R?)}</A><DD>
|
||||
This command is used to manipulate embedded images.
|
||||
The behavior of the command depends on the <I>option</I> argument
|
||||
that follows the <B>tag</B> argument.
|
||||
@@ -919,13 +923,13 @@ The following forms of the command are currently supported:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M112">(\fwidget-name \fB'image 'cget\fR \fIindex option\fR)</A><DD>
|
||||
<DT><A NAME="M115">{(widget-name} {B'image} {'cgetR} {Iindex} {optionR)}</A><DD>
|
||||
Returns the value of a configuration option for an embedded image.
|
||||
<I>Index</I> identifies the embedded image, and <I>option</I>
|
||||
specifies a particular configuration option, which must be one of
|
||||
the ones listed in the section EMBEDDED IMAGES.
|
||||
<P>
|
||||
<DT><A NAME="M113">(\fwidget-name \fB'image 'configure \fIindex\fR ?\fIoption value ...\fR?)</A><DD>
|
||||
<DT><A NAME="M116">{(widget-name} {B'image} 'configure {IindexR} {?Ioption} value {...R?)}</A><DD>
|
||||
Query or modify the configuration options for an embedded image.
|
||||
If no <I>option</I> is specified, returns a list describing all of
|
||||
the available options for the embedded image at <I>index</I>
|
||||
@@ -940,7 +944,7 @@ this case the command returns an empty string.
|
||||
See EMBEDDED IMAGES for information on the options that
|
||||
are supported.
|
||||
<P>
|
||||
<DT><A NAME="M114">(\fwidget-name \fB'image 'create \fIindex\fR ?\fIoption value ...\fR?)</A><DD>
|
||||
<DT><A NAME="M117">{(widget-name} {B'image} 'create {IindexR} {?Ioption} value {...R?)}</A><DD>
|
||||
This command creates a new image annotation, which will appear
|
||||
in the text at the position given by <I>index</I>.
|
||||
Any number of <I>option-value</I> pairs may be specified to
|
||||
@@ -950,18 +954,18 @@ this image.
|
||||
See EMBEDDED IMAGES for information on the options that
|
||||
are supported, and a description of the identifier returned.
|
||||
<P>
|
||||
<DT><A NAME="M115">(\fwidget-name \fB'image 'names\fR)</A><DD>
|
||||
<DT><A NAME="M118">{(widget-name} {B'image} {'namesR)}</A><DD>
|
||||
Returns a list whose elements are the names of all image instances currently
|
||||
embedded in <I>window</I>.
|
||||
<P>
|
||||
</DL>
|
||||
<DT><A NAME="M116">(<I>widget-name '</I><B>index </B><I>index</I>)</A><DD>
|
||||
<DT><A NAME="M119">(<I>widget-name '</I><B>index </B><I>index</I>)</A><DD>
|
||||
Returns the position corresponding to <I>index</I> in the form
|
||||
<I>(line . char)</I> where <I>line</I> is the line number and <I>char</I>
|
||||
is the character number.
|
||||
<I>Index</I> may have any of the forms described under INDICES above.
|
||||
<P>
|
||||
<DT><A NAME="M117">(<I>widget-name '</I><B>insert </B><I>index chars </I>?<I>tagList chars tagList ...</I>?)</A><DD>
|
||||
<DT><A NAME="M120">(<I>widget-name '</I><B>insert </B><I>index chars </I>?<I>tagList chars tagList ...</I>?)</A><DD>
|
||||
Inserts all of the <I>chars</I> arguments just before the character at
|
||||
<I>index</I>.
|
||||
If <I>index</I> refers to the end of the text (the character after
|
||||
@@ -981,7 +985,7 @@ they produce the same effect as if a separate <B>insert</B> widget
|
||||
procedure had been issued for each pair, in order.
|
||||
The last <I>tagList</I> argument may be omitted.
|
||||
<P>
|
||||
<DT><A NAME="M118">(<I>widget-name '</I><B>mark </B><I>option </I>?<I>arg arg ...</I>?)</A><DD>
|
||||
<DT><A NAME="M121">(<I>widget-name '</I><B>mark </B><I>option </I>?<I>arg arg ...</I>?)</A><DD>
|
||||
This procedure is used to manipulate marks. The exact behavior of
|
||||
the procedure depends on the <I>option</I> argument that follows
|
||||
the <B>mark</B> argument. The following forms of the procedure
|
||||
@@ -989,19 +993,19 @@ are currently supported:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M119">(<I>widget-name '</I><B>mark 'gravity </B><I>markName</I>)</A><DD>
|
||||
<DT><A NAME="M120">(<I>widget-name '</I><B>mark 'gravity </B><I>markName</I> <I>direction</I>)</A><DD>
|
||||
<DT><A NAME="M122">(<I>widget-name '</I><B>mark 'gravity </B><I>markName</I>)</A><DD>
|
||||
<DT><A NAME="M123">(<I>widget-name '</I><B>mark 'gravity </B><I>markName</I> <I>direction</I>)</A><DD>
|
||||
If <I>direction</I> is not specified, returns <B>left</B> or <B>right</B>
|
||||
to indicate which of its adjacent characters <I>markName</I> is attached
|
||||
to.
|
||||
If <I>direction</I> is specified, it must be <B>left</B> or <B>right</B>;
|
||||
the gravity of <I>markName</I> is set to the given value.
|
||||
<P>
|
||||
<DT><A NAME="M121">(<I>widget-name '</I><B>mark 'names</B>)</A><DD>
|
||||
<DT><A NAME="M124">(<I>widget-name '</I><B>mark 'names</B>)</A><DD>
|
||||
Returns a list whose elements are the names of all the marks that
|
||||
are currently set.
|
||||
<P>
|
||||
<DT><A NAME="M122">(<I>widget-name '</I><B>mark 'next </B><I>index</I>)</A><DD>
|
||||
<DT><A NAME="M125">(<I>widget-name '</I><B>mark 'next </B><I>index</I>)</A><DD>
|
||||
Returns the name of the next mark at or after <I>index</I>.
|
||||
If <I>index</I> is specified in numerical form, then the search for
|
||||
the next mark begins at that index.
|
||||
@@ -1012,11 +1016,11 @@ there are multiple marks at the same index.
|
||||
These semantics mean that the <B>mark next</B> operation can be used to
|
||||
step through all the marks in a text widget in the same order
|
||||
as the mark information returned by the <B>dump</B> operation.
|
||||
If a mark has been set to the special <B>end index,
|
||||
then it appears to be </B><I>after</I> <B>end</B> with respect to the <B>mark next</B> operation.
|
||||
If a mark has been set to the special <B>end</B> index,
|
||||
then it appears to be <I>after</I> <B>end</B> with respect to the <B>mark next</B> operation.
|
||||
An empty list is returned if there are no marks after <I>index</I>.
|
||||
<P>
|
||||
<DT><A NAME="M123">(<I>widget-name '</I><B>mark 'previous </B><I>index</I>)</A><DD>
|
||||
<DT><A NAME="M126">(<I>widget-name '</I><B>mark 'previous </B><I>index</I>)</A><DD>
|
||||
Returns the name of the mark at or before <I>index</I>.
|
||||
If <I>index</I> is specified in numerical form, then the search for
|
||||
the previous mark begins with the character just before that index.
|
||||
@@ -1029,33 +1033,33 @@ step through all the marks in a text widget in the reverse order
|
||||
as the mark information returned by the <B>dump</B> operation.
|
||||
An empty list is returned if there are no marks before <I>index</I>.
|
||||
<P>
|
||||
<DT><A NAME="M124">(<I>widget-name '</I><B>mark 'set </B><I>markName index</I>)</A><DD>
|
||||
<DT><A NAME="M127">(<I>widget-name '</I><B>mark 'set </B><I>markName index</I>)</A><DD>
|
||||
Sets the mark named <I>markName</I> to a position just before the
|
||||
character at <I>index</I>.
|
||||
If <I>markName</I> already exists, it is moved from its old position;
|
||||
if it doesn't exist, a new mark is created.
|
||||
This procedure returns an empty string.
|
||||
<P>
|
||||
<DT><A NAME="M125">(<I>widget-name '</I><B>mark 'unset </B><I>markName </I>?<I>markName markName ...</I>?)</A><DD>
|
||||
<DT><A NAME="M128">(<I>widget-name '</I><B>mark 'unset </B><I>markName </I>?<I>markName markName ...</I>?)</A><DD>
|
||||
Remove the mark corresponding to each of the <I>markName</I> arguments.
|
||||
The removed marks will not be usable in indices and will not be
|
||||
returned by future calls to ``<I>widget-name </I><B>mark names</B>''.
|
||||
This procedure returns an empty string.
|
||||
<P>
|
||||
</DL>
|
||||
<DT><A NAME="M126">(<I>widget-name '</I><B>scan</B> <I>option args</I>)</A><DD>
|
||||
<DT><A NAME="M129">(<I>widget-name '</I><B>scan</B> <I>option args</I>)</A><DD>
|
||||
This procedure is used to implement scanning on texts. It has
|
||||
two forms, depending on <I>option</I>:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M127">(<I>widget-name '</I><B>scan 'mark </B><I>x y</I>)</A><DD>
|
||||
<DT><A NAME="M130">(<I>widget-name '</I><B>scan 'mark </B><I>x y</I>)</A><DD>
|
||||
Records <I>x</I> and <I>y</I> and the current view in the text window,
|
||||
for use in conjunction with later <B>scan dragto</B> procedures.
|
||||
Typically this procedure is associated with a mouse button press in
|
||||
the widget. It returns an empty string.
|
||||
<P>
|
||||
<DT><A NAME="M128">(<I>widget-name '</I><B>scan 'dragto </B><I>x y</I>)</A><DD>
|
||||
<DT><A NAME="M131">(<I>widget-name '</I><B>scan 'dragto </B><I>x y</I>)</A><DD>
|
||||
This procedure computes the difference between its <I>x</I> and <I>y</I>
|
||||
arguments and the <I>x</I> and <I>y</I> arguments to the last
|
||||
<B>scan mark</B> procedure for the widget.
|
||||
@@ -1066,7 +1070,7 @@ dragging the text at high speed through the window. The return
|
||||
value is an empty string.
|
||||
<P>
|
||||
</DL>
|
||||
<DT><A NAME="M129">(<I>widget-name </I><B>search </B>?<I>switches</I>? <I>pattern index </I>?<I>stopIndex</I>?)</A><DD>
|
||||
<DT><A NAME="M132">(<I>widget-name </I><B>search </B>?<I>switches</I>? <I>pattern index </I>?<I>stopIndex</I>?)</A><DD>
|
||||
Searches the text in <I>widget-name</I> starting at <I>index</I> for a range
|
||||
of characters that matches <I>pattern</I>.
|
||||
If a match is found, the index of the first character in the match is
|
||||
@@ -1076,35 +1080,37 @@ may be specified to control the search:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M130"><B>:forwards</B></A><DD>
|
||||
<DT><A NAME="M133"><B>:forwards</B></A><DD>
|
||||
The search will proceed forward through the text, finding the first
|
||||
matching range starting at or after the position given by <I>index</I>.
|
||||
This is the default.
|
||||
<P>
|
||||
<DT><A NAME="M131"><B>:backwards</B></A><DD>
|
||||
<DT><A NAME="M134"><B>:backwards</B></A><DD>
|
||||
The search will proceed backward through the text, finding the
|
||||
matching range closest to <I>index</I> whose first character
|
||||
is before <I>index</I>.
|
||||
<P>
|
||||
<DT><A NAME="M132"><B>:exact</B></A><DD>
|
||||
<DT><A NAME="M135"><B>:exact</B></A><DD>
|
||||
Use exact matching: the characters in the matching range must be
|
||||
identical to those in <I>pattern</I>.
|
||||
This is the default.
|
||||
<P>
|
||||
<DT><A NAME="M133"><B>:regexp</B></A><DD>
|
||||
<DT><A NAME="M136"><B>:regexp</B></A><DD>
|
||||
Treat <I>pattern</I> as a regular expression and match it against
|
||||
the text using the rules for regular expressions (see the <B>regexp</B>
|
||||
procedure for details).
|
||||
<P>
|
||||
<DT><A NAME="M134"><B>:nocase</B></A><DD>
|
||||
<DT><A NAME="M137"><B>:nocase</B></A><DD>
|
||||
Ignore case differences between the pattern and the text.
|
||||
<P>
|
||||
<DT><A NAME="M135"><B>:count</B><I> varName</I></A><DD>
|
||||
<DT><A NAME="M138"><B>:count</B><I> varName</I></A><DD>
|
||||
The argument following <B>:count</B> gives the name of a variable;
|
||||
if a match is found, the number of characters in the matching
|
||||
range will be stored in the variable.
|
||||
<P>
|
||||
<DT><A NAME="M136"><B>:-</B></A><DD>
|
||||
<DT><A NAME="M139"><B>:environment</B><I> env</I></A><DD>
|
||||
The argument following <B>:environment</B> gives the definition environment of the variable counting matches (i.e. the one given to the <B>:count</B> option).
|
||||
<B>:-</B>
|
||||
This switch has no effect except to terminate the list of switches:
|
||||
the next argument will be treated as <I>pattern</I> even if it starts
|
||||
with <B>:</B>.
|
||||
@@ -1126,7 +1132,7 @@ when the beginning or end of the text is reached, the search
|
||||
continues at the other end until the starting location is reached
|
||||
again; if <I>stopIndex</I> is specified, no wrap-around will occur.
|
||||
</UL>
|
||||
<DT><A NAME="M137">(<I>widget-name '</I><B>see </B><I>index</I>)</A><DD>
|
||||
<DT><A NAME="M140">(<I>widget-name '</I><B>see </B><I>index</I>)</A><DD>
|
||||
Adjusts the view in the window so that the character given by <I>index</I>
|
||||
is completely visible.
|
||||
If <I>index</I> is already visible then the procedure does nothing.
|
||||
@@ -1136,7 +1142,7 @@ edge of the window.
|
||||
If <I>index</I> is far out of view, then the procedure centers
|
||||
<I>index</I> in the window.
|
||||
<P>
|
||||
<DT><A NAME="M138">(<I>widget-name </I><B>'tag </B><I>option </I>?<I>arg arg ...</I>?)</A><DD>
|
||||
<DT><A NAME="M141">(<I>widget-name </I><B>'tag </B><I>option </I>?<I>arg arg ...</I>?)</A><DD>
|
||||
This procedure is used to manipulate tags. The exact behavior of the
|
||||
procedure depends on the <I>option</I> argument that follows the
|
||||
<B>tag</B> argument. The following forms of the procedure are currently
|
||||
@@ -1144,7 +1150,7 @@ supported:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M139">(<I>widget-name </I><B>'tag 'add </B><I>tagName index1 </I>?<I>index2 index1 index2 ...</I>?)</A><DD>
|
||||
<DT><A NAME="M142">(<I>widget-name </I><B>'tag 'add </B><I>tagName index1 </I>?<I>index2 index1 index2 ...</I>?)</A><DD>
|
||||
Associate the tag <I>tagName</I> with all of the characters starting
|
||||
with <I>index1</I> and ending just before
|
||||
<I>index2</I> (the character at <I>index2</I> isn't tagged).
|
||||
@@ -1156,9 +1162,9 @@ If there are no characters in the specified range (e.g. <I>index1</I>
|
||||
is past the end of the file or <I>index2</I> is less than or equal
|
||||
to <I>index1</I>) then the procedure has no effect.
|
||||
<P>
|
||||
<DT><A NAME="M140">(<I>widget-name </I><B>'tag 'bind </B><I>tagName</I>)</A><DD>
|
||||
<DT><A NAME="M141">(<I>widget-name </I><B>'tag 'bind </B><I>tagName</I> <I>sequence</I>)</A><DD>
|
||||
<DT><A NAME="M142">(<I>widget-name </I><B>'tag 'bind </B><I>tagName</I> <I>sequence</I> <I>script</I>)</A><DD>
|
||||
<DT><A NAME="M143">(<I>widget-name </I><B>'tag 'bind </B><I>tagName</I>)</A><DD>
|
||||
<DT><A NAME="M144">(<I>widget-name </I><B>'tag 'bind </B><I>tagName</I> <I>sequence</I>)</A><DD>
|
||||
<DT><A NAME="M145">(<I>widget-name </I><B>'tag 'bind </B><I>tagName</I> <I>sequence</I> <I>script</I>)</A><DD>
|
||||
This procedure associates <I>script</I> with the tag given by
|
||||
<I>tagName</I>.
|
||||
Whenever the event sequence given by <I>sequence</I> occurs for a
|
||||
@@ -1214,13 +1220,13 @@ tag bindings.
|
||||
The tag bindings will be invoked first, followed by bindings
|
||||
for the window as a whole.
|
||||
</UL>
|
||||
<DT><A NAME="M143">(<I>widget-name </I><B>'tag 'cget</B> <I>tagName option</I>)</A><DD>
|
||||
<DT><A NAME="M146">(<I>widget-name </I><B>'tag 'cget</B> <I>tagName option</I>)</A><DD>
|
||||
This procedure returns the current value of the option named <I>option</I>
|
||||
associated with the tag given by <I>tagName</I>.
|
||||
<I>Option</I> may have any of the values accepted by the <B>tag configure</B>
|
||||
widget procedure.
|
||||
<P>
|
||||
<DT><A NAME="M144">(<I>widget-name </I><B>'tag 'configure </B><I>tagName</I> ?<I>option</I>? ?<I>value</I>? ?<I>option value ...</I>?)</A><DD>
|
||||
<DT><A NAME="M147">(<I>widget-name </I><B>'tag 'configure </B><I>tagName</I> ?<I>option</I>? ?<I>value</I>? ?<I>option value ...</I>?)</A><DD>
|
||||
This procedure is similar to the <B>configure</B> widget procedure except
|
||||
that it modifies options associated with the tag given by <I>tagName</I>
|
||||
instead of modifying options for the overall text widget.
|
||||
@@ -1236,7 +1242,7 @@ modifies the given option(s) to have the given value(s) in <I>tagName</I>;
|
||||
in this case the procedure returns an empty list.
|
||||
See TAGS above for details on the options available for tags.
|
||||
<P>
|
||||
<DT><A NAME="M145">(<I>widget-name </I><B>'tag 'delete </B><I>tagName </I>?<I>tagName ...</I>?)</A><DD>
|
||||
<DT><A NAME="M148">(<I>widget-name </I><B>'tag 'delete </B><I>tagName </I>?<I>tagName ...</I>?)</A><DD>
|
||||
Deletes all tag information for each of the <I>tagName</I>
|
||||
arguments.
|
||||
The procedure removes the tags from all characters in the file
|
||||
@@ -1244,15 +1250,15 @@ and also deletes any other information associated with the tags,
|
||||
such as bindings and display information.
|
||||
The procedure returns an empty list.
|
||||
<P>
|
||||
<DT><A NAME="M146">(<I>widget-name</I><B>'tag 'lower </B><I>tagName </I>)</A><DD>
|
||||
<DT><A NAME="M147">(<I>widget-name</I><B>'tag 'lower </B><I>tagName </I> <I>belowThis</I>)</A><DD>
|
||||
<DT><A NAME="M149">(<I>widget-name</I><B>'tag 'lower </B><I>tagName </I>)</A><DD>
|
||||
<DT><A NAME="M150">(<I>widget-name</I><B>'tag 'lower </B><I>tagName </I> <I>belowThis</I>)</A><DD>
|
||||
Changes the priority of tag <I>tagName</I> so that it is just lower
|
||||
in priority than the tag whose name is <I>belowThis</I>.
|
||||
If <I>belowThis</I> is omitted, then <I>tagName</I>'s priority
|
||||
is changed to make it lowest priority of all tags.
|
||||
<P>
|
||||
<DT><A NAME="M148">(<I>widget-name </I><B>'tag 'names </B>)</A><DD>
|
||||
<DT><A NAME="M149">(<I>widget-name </I><B>'tag 'names </B> <I>index</I>)</A><DD>
|
||||
<DT><A NAME="M151">(<I>widget-name </I><B>'tag 'names </B>)</A><DD>
|
||||
<DT><A NAME="M152">(<I>widget-name </I><B>'tag 'names </B> <I>index</I>)</A><DD>
|
||||
Returns a list whose elements are the names of all the tags that
|
||||
are active at the character position given by <I>index</I>.
|
||||
If <I>index</I> is omitted, then the return value will describe
|
||||
@@ -1264,8 +1270,8 @@ the tag).
|
||||
The list will be sorted in order from lowest priority to highest
|
||||
priority.
|
||||
<P>
|
||||
<DT><A NAME="M150">(<I>widget-name </I><B>'tag 'nextrange </B><I>tagName index1 </I>)</A><DD>
|
||||
<DT><A NAME="M151">(<I>widget-name </I><B>'tag 'nextrange </B><I>tagName index1 </I> <I>index2</I>)</A><DD>
|
||||
<DT><A NAME="M153">(<I>widget-name </I><B>'tag 'nextrange </B><I>tagName index1 </I>)</A><DD>
|
||||
<DT><A NAME="M154">(<I>widget-name </I><B>'tag 'nextrange </B><I>tagName index1 </I> <I>index2</I>)</A><DD>
|
||||
This procedure searches the text for a range of characters tagged
|
||||
with <I>tagName</I> where the first character of the range is
|
||||
no earlier than the character at <I>index1</I> and no later than
|
||||
@@ -1280,8 +1286,8 @@ If no matching range is found then the return value is an
|
||||
empty list.
|
||||
If <I>index2</I> is not given then it defaults to the end of the text.
|
||||
<P>
|
||||
<DT><A NAME="M152">(<I>widget-name '</I><B>tag 'prevrange </B><I>tagName index1 </I>)</A><DD>
|
||||
<DT><A NAME="M153">(<I>widget-name '</I><B>tag 'prevrange </B><I>tagName index1 </I> <I>index2</I>)</A><DD>
|
||||
<DT><A NAME="M155">(<I>widget-name '</I><B>tag 'prevrange </B><I>tagName index1 </I>)</A><DD>
|
||||
<DT><A NAME="M156">(<I>widget-name '</I><B>tag 'prevrange </B><I>tagName index1 </I> <I>index2</I>)</A><DD>
|
||||
This command searches the text for a range of characters tagged
|
||||
with <I>tagName</I> where the first character of the range is
|
||||
before the character at <I>index1</I> and no earlier than
|
||||
@@ -1296,14 +1302,14 @@ If no matching range is found then the return value is an
|
||||
empty string.
|
||||
If <I>index2</I> is not given then it defaults to the beginning of the text.
|
||||
<P>
|
||||
<DT><A NAME="M154">(<I>widget-name</I><B>'tag 'raise </B><I>tagName </I>)</A><DD>
|
||||
<DT><A NAME="M155">(<I>widget-name</I><B>'tag 'raise </B><I>tagName </I> <I>aboveThis</I>)</A><DD>
|
||||
<DT><A NAME="M157">(<I>widget-name</I><B>'tag 'raise </B><I>tagName </I>)</A><DD>
|
||||
<DT><A NAME="M158">(<I>widget-name</I><B>'tag 'raise </B><I>tagName </I> <I>aboveThis</I>)</A><DD>
|
||||
Changes the priority of tag <I>tagName</I> so that it is just higher
|
||||
in priority than the tag whose name is <I>aboveThis</I>.
|
||||
If <I>aboveThis</I> is omitted, then <I>tagName</I>'s priority
|
||||
is changed to make it highest priority of all tags.
|
||||
<P>
|
||||
<DT><A NAME="M156">(<I>widget-name </I><B>'tag 'ranges </B><I>tagName</I>)</A><DD>
|
||||
<DT><A NAME="M159">(<I>widget-name </I><B>'tag 'ranges </B><I>tagName</I>)</A><DD>
|
||||
Returns a list describing all of the ranges of text that have been
|
||||
tagged with <I>tagName</I>.
|
||||
The first two elements of the list describe the first tagged range
|
||||
@@ -1316,7 +1322,7 @@ range.
|
||||
If there are no characters tagged with <I>tag</I> then an
|
||||
empty list is returned.
|
||||
<P>
|
||||
<DT><A NAME="M157">(<I>widget-name </I><B>'tag 'remove </B><I>tagName index1 </I>?<I>index2 index1 index2 ...</I>?)</A><DD>
|
||||
<DT><A NAME="M160">(<I>widget-name </I><B>'tag 'remove </B><I>tagName index1 </I>?<I>index2 index1 index2 ...</I>?)</A><DD>
|
||||
Remove the tag <I>tagName</I> from all of the characters starting
|
||||
at <I>index1</I> and ending just before
|
||||
<I>index2</I> (the character at <I>index2</I> isn't affected).
|
||||
@@ -1330,7 +1336,7 @@ to <I>index1</I>) then the procedure has no effect.
|
||||
This procedure returns an empty list.
|
||||
<P>
|
||||
</DL>
|
||||
<DT><A NAME="M158">(<I>widget-name '</I><B>window </B><I>option </I>?<I>arg arg ...</I>?)</A><DD>
|
||||
<DT><A NAME="M161">(<I>widget-name '</I><B>window </B><I>option </I>?<I>arg arg ...</I>?)</A><DD>
|
||||
This procedure is used to manipulate embedded windows.
|
||||
The behavior of the procedure depends on the <I>option</I> argument
|
||||
that follows the <B>tag</B> argument.
|
||||
@@ -1338,13 +1344,13 @@ The following forms of the procedure are currently supported:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M159">(<I>widget-name '</I><B>window 'cget</B> <I>index option</I>)</A><DD>
|
||||
<DT><A NAME="M162">(<I>widget-name '</I><B>window 'cget</B> <I>index option</I>)</A><DD>
|
||||
Returns the value of a configuration option for an embedded window.
|
||||
<I>Index</I> identifies the embedded window, and <I>option</I>
|
||||
specifies a particular configuration option, which must be one of
|
||||
the ones listed in the section EMBEDDED WINDOWS.
|
||||
<P>
|
||||
<DT><A NAME="M160">(<I>widget-name '</I><B>window 'configure </B><I>index</I> ?<I>option value ...</I>?)</A><DD>
|
||||
<DT><A NAME="M163">(<I>widget-name '</I><B>window 'configure </B><I>index</I> ?<I>option value ...</I>?)</A><DD>
|
||||
Query or modify the configuration options for an embedded window.
|
||||
If no <I>option</I> is specified, returns a list describing all of
|
||||
the available options for the embedded window at <I>index</I>
|
||||
@@ -1359,7 +1365,7 @@ this case the procedure returns an empty list.
|
||||
See EMBEDDED WINDOWS for information on the options that
|
||||
are supported.
|
||||
<P>
|
||||
<DT><A NAME="M161">(<I>widget-name '</I><B>window 'create </B><I>index</I> ?<I>option value ...</I>?)</A><DD>
|
||||
<DT><A NAME="M164">(<I>widget-name '</I><B>window 'create </B><I>index</I> ?<I>option value ...</I>?)</A><DD>
|
||||
This procedure creates a new window annotation, which will appear
|
||||
in the text at the position given by <I>index</I>.
|
||||
Any number of <I>option-value</I> pairs may be specified to
|
||||
@@ -1368,19 +1374,19 @@ See EMBEDDED WINDOWS for information on the options that
|
||||
are supported.
|
||||
Returns an empty list.
|
||||
<P>
|
||||
<DT><A NAME="M162">(<I>widget-name '</I><B>window 'names</B>)</A><DD>
|
||||
<DT><A NAME="M165">(<I>widget-name '</I><B>window 'names</B>)</A><DD>
|
||||
Returns a list whose elements are the names of all windows currently
|
||||
embedded in <I>window</I>.
|
||||
<P>
|
||||
</DL>
|
||||
<DT><A NAME="M163">(<I>widget-name '</I><B>xview </B><I>option args</I>)</A><DD>
|
||||
<DT><A NAME="M166">(<I>widget-name '</I><B>xview </B><I>option args</I>)</A><DD>
|
||||
This procedure is used to query and change the horizontal position of the
|
||||
text in the widget's window. It can take any of the following
|
||||
forms:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M164">(<I>widget-name '</I><B>xview</B>)</A><DD>
|
||||
<DT><A NAME="M167">(<I>widget-name '</I><B>xview</B>)</A><DD>
|
||||
Returns a list containing two elements.
|
||||
Each element is a real fraction between 0 and 1; together they describe
|
||||
the portion of the document's horizontal span that is visible in
|
||||
@@ -1396,12 +1402,12 @@ much wider than the window.
|
||||
These are the same values passed to scrollbars via the <B>:xscrollprocedure</B>
|
||||
option.
|
||||
<P>
|
||||
<DT><A NAME="M165">(<I>widget-name '</I><B>xview 'moveto</B><I> fraction</I>)</A><DD>
|
||||
<DT><A NAME="M168">(<I>widget-name '</I><B>xview 'moveto</B><I> fraction</I>)</A><DD>
|
||||
Adjusts the view in the window so that <I>fraction</I> of the horizontal
|
||||
span of the text is off-screen to the left.
|
||||
<I>Fraction</I> is a fraction between 0 and 1.
|
||||
<P>
|
||||
<DT><A NAME="M166">(<I>widget-name '</I><B>xview 'scroll </B><I>number what</I>)</A><DD>
|
||||
<DT><A NAME="M169">(<I>widget-name '</I><B>xview 'scroll </B><I>number what</I>)</A><DD>
|
||||
This procedure shifts the view in the window left or right according to
|
||||
<I>number</I> and <I>what</I>.
|
||||
<I>Number</I> must be an integer.
|
||||
@@ -1415,14 +1421,14 @@ become visible; if it is positive then characters farther to the right
|
||||
become visible.
|
||||
<P>
|
||||
</DL>
|
||||
<DT><A NAME="M167">(<I>widget-name '</I><B>yview </B><I>?args</I>?)</A><DD>
|
||||
<DT><A NAME="M170">(<I>widget-name '</I><B>yview </B><I>?args</I>?)</A><DD>
|
||||
This procedure is used to query and change the vertical position of the
|
||||
text in the widget's window.
|
||||
It can take any of the following forms:
|
||||
<P>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M168">(<I>widget-name '</I><B>yview</B>)</A><DD>
|
||||
<DT><A NAME="M171">(<I>widget-name '</I><B>yview</B>)</A><DD>
|
||||
Returns a list containing two elements, both of which are real fractions
|
||||
between 0 and 1.
|
||||
The first element gives the position of the first character in the
|
||||
@@ -1434,14 +1440,14 @@ relative to the text as a whole.
|
||||
These are the same values passed to scrollbars via the <B>:yscrollprocedure</B>
|
||||
option.
|
||||
<P>
|
||||
<DT><A NAME="M169">(<I>widget-name '</I><B>yview 'moveto</B><I> fraction</I>)</A><DD>
|
||||
<DT><A NAME="M172">(<I>widget-name '</I><B>yview 'moveto</B><I> fraction</I>)</A><DD>
|
||||
Adjusts the view in the window so that the character given by <I>fraction</I>
|
||||
appears on the top line of the window.
|
||||
<I>Fraction</I> is a fraction between 0 and 1; 0 indicates the first
|
||||
character in the text, 0.33 indicates the character one-third the
|
||||
way through the text, and so on.
|
||||
<P>
|
||||
<DT><A NAME="M170">(<I>widget-name '</I><B>yview 'scroll </B><I>number what</I>)</A><DD>
|
||||
<DT><A NAME="M173">(<I>widget-name '</I><B>yview 'scroll </B><I>number what</I>)</A><DD>
|
||||
This procedure adjust the view in the window up or down according to
|
||||
<I>number</I> and <I>what</I>.
|
||||
<I>Number</I> must be an integer.
|
||||
@@ -1453,34 +1459,39 @@ If <I>number</I> is negative then earlier positions in the text
|
||||
become visible; if it is positive then later positions in the text
|
||||
become visible.
|
||||
<P>
|
||||
<DT><A NAME="M171">(<I>widget-name </I><B>yview </B> <I>index</I>)</A><DD>
|
||||
<DT><A NAME="M172">(<I>widget-name </I><B>yview </B><B>:pickplace</B> <I>index</I>)</A><DD>
|
||||
<DT><A NAME="M174">(<I>widget-name </I><B>yview </B> <I>index</I>)</A><DD>
|
||||
<DT><A NAME="M175">(<I>widget-name </I><B>yview </B><B>:pickplace</B> <I>index</I>)</A><DD>
|
||||
Changes the view in the widget's window to make <I>index</I> visible.
|
||||
If the <B>:pickplace</B> option isn't specified then <I>index</I> will
|
||||
appear at the top of the window.
|
||||
If <B>:pickplace</B> is specified then the widget chooses where
|
||||
<I>index</I> appears in the window:
|
||||
<P>
|
||||
<OL>
|
||||
<LI>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M176">{[1]}</A><DD>
|
||||
If <I>index</I> is already visible somewhere in the window then the
|
||||
procedure does nothing.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M177">{[2]}</A><DD>
|
||||
If <I>index</I> is only a few lines off-screen above the window then
|
||||
it will be positioned at the top of the window.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M178">{[3]}</A><DD>
|
||||
If <I>index</I> is only a few lines off-screen below the window then
|
||||
it will be positioned at the bottom of the window.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M179">{[4]}</A><DD>
|
||||
Otherwise, <I>index</I> will be centered in the window.
|
||||
</OL>
|
||||
<P>
|
||||
</DL>
|
||||
<UL>
|
||||
<P>
|
||||
The <B>:pickplace</B> option has been obsoleted by the <B>see</B> widget
|
||||
procedure (<B>see</B> handles both x- and y-motion to make a location
|
||||
visible, whereas <B>:pickplace</B> only handles motion in y).
|
||||
</UL>
|
||||
<DT><A NAME="M173">(<I>widget-name '</I><B>yview </B><I>number</I>)</A><DD>
|
||||
<DT><A NAME="M180">(<I>widget-name '</I><B>yview </B><I>number</I>)</A><DD>
|
||||
This procedure makes the first character on the line after
|
||||
the one given by <I>number</I> visible at the top of the window.
|
||||
<I>Number</I> must be an integer.
|
||||
@@ -1488,30 +1499,34 @@ This procedure used to be used for scrolling, but now it is obsolete.
|
||||
<P>
|
||||
</DL>
|
||||
</DL>
|
||||
<H3><A NAME="M174">BINDINGS</A></H3>
|
||||
<H3><A NAME="M181">BINDINGS</A></H3>
|
||||
Tk automatically creates class bindings for texts that give them
|
||||
the following default behavior.
|
||||
In the descriptions below, ``word'' refers to a contiguous group
|
||||
of letters, digits, or ``_'' characters, or any single character
|
||||
other than these.
|
||||
<OL>
|
||||
<LI>
|
||||
<P>
|
||||
<DL>
|
||||
<DT><A NAME="M182">{[1]}</A><DD>
|
||||
Clicking mouse button 1 positions the insertion cursor
|
||||
just before the character underneath the mouse cursor, sets the
|
||||
input focus to this widget, and clears any selection in the widget.
|
||||
Dragging with mouse button 1 strokes out a selection between
|
||||
the insertion cursor and the character under the mouse.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M183">{[2]}</A><DD>
|
||||
Double-clicking with mouse button 1 selects the word under the mouse
|
||||
and positions the insertion cursor at the beginning of the word.
|
||||
Dragging after a double click will stroke out a selection consisting
|
||||
of whole words.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M184">{[3]}</A><DD>
|
||||
Triple-clicking with mouse button 1 selects the line under the mouse
|
||||
and positions the insertion cursor at the beginning of the line.
|
||||
Dragging after a triple click will stroke out a selection consisting
|
||||
of whole lines.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M185">{[4]}</A><DD>
|
||||
The ends of the selection can be adjusted by dragging with mouse
|
||||
button 1 while the Shift key is down; this will adjust the end
|
||||
of the selection that was nearest to the mouse cursor when button
|
||||
@@ -1519,24 +1534,29 @@ of the selection that was nearest to the mouse cursor when button
|
||||
If the button is double-clicked before dragging then the selection
|
||||
will be adjusted in units of whole words; if it is triple-clicked
|
||||
then the selection will be adjusted in units of whole lines.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M186">{[5]}</A><DD>
|
||||
Clicking mouse button 1 with the Control key down will reposition the
|
||||
insertion cursor without affecting the selection.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M187">{[6]}</A><DD>
|
||||
If any normal printing characters are typed, they are
|
||||
inserted at the point of the insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M188">{[7]}</A><DD>
|
||||
The view in the widget can be adjusted by dragging with mouse button 2.
|
||||
If mouse button 2 is clicked without moving the mouse, the selection
|
||||
is copied into the text at the position of the mouse cursor.
|
||||
The Insert key also inserts the selection, but at the position of
|
||||
the insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M189">{[8]}</A><DD>
|
||||
If the mouse is dragged out of the widget
|
||||
while button 1 is pressed, the entry will automatically scroll to
|
||||
make more text visible (if there is more text off-screen on the side
|
||||
where the mouse left the window).
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M190">{[9]}</A><DD>
|
||||
The Left and Right keys move the insertion cursor one character to the
|
||||
left or right; they also clear any selection in the text.
|
||||
If Left or Right is typed with the Shift key down, then the insertion
|
||||
@@ -1547,87 +1567,109 @@ by words and also extend the selection.
|
||||
Control-b and Control-f behave the same as Left and Right, respectively.
|
||||
Meta-b and Meta-f behave the same as Control-Left and Control-Right,
|
||||
respectively.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M191">{[10]}</A><DD>
|
||||
The Next and Prior keys move the insertion cursor forward or backwards
|
||||
by one screenful and clear any selection in the text.
|
||||
If the Shift key is held down while Next or Prior is typed, then
|
||||
the selection is extended to include the new character.
|
||||
Control-v moves the view down one screenful without moving the
|
||||
insertion cursor or adjusting the selection.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M192">{[11]}</A><DD>
|
||||
Control-Next and Control-Prior scroll the view right or left by one page
|
||||
without moving the insertion cursor or affecting the selection.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M193">{[12]}</A><DD>
|
||||
Home and Control-a move the insertion cursor to the
|
||||
beginning of its line and clear any selection in the widget.
|
||||
Shift-Home moves the insertion cursor to the beginning of the line
|
||||
and also extends the selection to that point.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M194">{[13]}</A><DD>
|
||||
End and Control-e move the insertion cursor to the
|
||||
end of the line and clear any selection in the widget.
|
||||
Shift-End moves the cursor to the end of the line and extends the selection
|
||||
to that point.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M195">{[14]}</A><DD>
|
||||
Control-Home and Meta-< move the insertion cursor to the beginning of
|
||||
the text and clear any selection in the widget.
|
||||
Control-Shift-Home moves the insertion cursor to the beginning of the text
|
||||
and also extends the selection to that point.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M196">{[15]}</A><DD>
|
||||
Control-End and Meta-> move the insertion cursor to the end of the
|
||||
text and clear any selection in the widget.
|
||||
Control-Shift-End moves the cursor to the end of the text and extends
|
||||
the selection to that point.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M197">{[16]}</A><DD>
|
||||
The Select key and Control-Space set the selection anchor to the position
|
||||
of the insertion cursor. They don't affect the current selection.
|
||||
Shift-Select and Control-Shift-Space adjust the selection to the
|
||||
current position of the insertion cursor, selecting from the anchor
|
||||
to the insertion cursor if there was not any selection previously.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M198">{[17]}</A><DD>
|
||||
Control-/ selects the entire contents of the widget.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M199">{[18]}</A><DD>
|
||||
Control-\ clears any selection in the widget.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M200">{[19]}</A><DD>
|
||||
The F16 key (labelled Copy on many Sun workstations) or Meta-w
|
||||
copies the selection in the widget to the clipboard, if there is a selection.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M201">{[20]}</A><DD>
|
||||
The F20 key (labelled Cut on many Sun workstations) or Control-w
|
||||
copies the selection in the widget to the clipboard and deletes
|
||||
the selection.
|
||||
If there is no selection in the widget then these keys have no effect.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M202">{[21]}</A><DD>
|
||||
The F18 key (labelled Paste on many Sun workstations) or Control-y
|
||||
inserts the contents of the clipboard at the position of the
|
||||
insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M203">{[22]}</A><DD>
|
||||
The Delete key deletes the selection, if there is one in the widget.
|
||||
If there is no selection, it deletes the character to the right of
|
||||
the insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M204">{[23]}</A><DD>
|
||||
Backspace and Control-h delete the selection, if there is one
|
||||
in the widget.
|
||||
If there is no selection, they delete the character to the left of
|
||||
the insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M205">{[24]}</A><DD>
|
||||
Control-d deletes the character to the right of the insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M206">{[25]}</A><DD>
|
||||
Meta-d deletes the word to the right of the insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M207">{[26]}</A><DD>
|
||||
Control-k deletes from the insertion cursor to the end of its line;
|
||||
if the insertion cursor is already at the end of a line, then
|
||||
Control-k deletes the newline character.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M208">{[27]}</A><DD>
|
||||
Control-o opens a new line by inserting a newline character in
|
||||
front of the insertion cursor without moving the insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M209">{[28]}</A><DD>
|
||||
Meta-backspace and Meta-Delete delete the word to the left of the
|
||||
insertion cursor.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M210">{[29]}</A><DD>
|
||||
Control-x deletes whatever is selected in the text widget.
|
||||
<LI>
|
||||
<P>
|
||||
<DT><A NAME="M211">{[30]}</A><DD>
|
||||
Control-t reverses the order of the two characters to the right of
|
||||
the insertion cursor.
|
||||
</OL>
|
||||
<P>
|
||||
</DL>
|
||||
<P>
|
||||
If the widget is disabled using the <B>:state</B> option, then its
|
||||
view can still be adjusted and text can still be selected,
|
||||
@@ -1637,7 +1679,7 @@ take place.
|
||||
The behavior of texts can be changed by defining new bindings for
|
||||
individual widgets or by redefining the class bindings.
|
||||
|
||||
<H3><A NAME="M175">PERFORMANCE ISSUES</A></H3>
|
||||
<H3><A NAME="M212">PERFORMANCE ISSUES</A></H3>
|
||||
Text widgets should run efficiently under a variety
|
||||
of conditions. The text widget uses about 2-3 bytes of
|
||||
main memory for each byte of text, so texts containing a megabyte
|
||||
|
||||
Reference in New Issue
Block a user