Commit of 3.99.0 version

This commit is contained in:
Erick Gallesio
2019-10-31 11:59:06 +01:00
parent 831a9f5c47
commit 5f74a25a3c
719 changed files with 81792 additions and 61853 deletions
+48 -38
View File
@@ -1,4 +1,5 @@
<HTML><HEAD><TITLE>Tk Built-In Commands - entry manual page</TITLE></HEAD>
<BR>
<BODY bgcolor = #c3c3ff>
<H2><IMG ALIGN=BOTTOM SRC="./Img/ManPageBlue.gif"> entry</H2>
<I>Create and manipulate entry widgets</I><P><IMG ALIGN=TOP SRC="./Img/line-red.gif">
@@ -21,9 +22,18 @@
<H3><A NAME="M26">WIDGET-SPECIFIC OPTIONS</A></H3>
<DL>
<P>
<DT><I>Name</I>: <B>environment</B>
<DT><I>Class</I>: <B>Environment</B>
<DT><I>Option keyword</I>: <B><A NAME="M27">:environment</A></B>
<DT><I>STklos slot name</I>: <B>environment</B>
<DD>Specifies the environment in which the <B>:textvariable</B> must be taken.
By convention, the value <B>#f</B> denotes the
STk global environment (the default value of this option is false).
<P>
<P>
<DT><I>Name</I>: <B>show</B>
<DT><I>Class</I>: <B>Show</B>
<DT><I>Option keyword</I>: <B><A NAME="M27">:show</A></B>
<DT><I>Option keyword</I>: <B><A NAME="M28">:show</A></B>
<DT><I>STklos slot name</I>: <B>show</B>
<DD>If this option is specified, then the true contents of the entry
are not displayed in the window.
@@ -38,7 +48,7 @@ of the entry.
<P>
<DT><I>Name</I>: <B>state</B>
<DT><I>Class</I>: <B>State</B>
<DT><I>Option keyword</I>: <B><A NAME="M28">:state</A></B>
<DT><I>Option keyword</I>: <B><A NAME="M29">:state</A></B>
<DT><I>STklos slot name</I>: <B>state</B>
<DD>Specifies one of two states for the entry: <B>normal</B> or <B>disabled</B>.
If the entry is disabled then the value may not be changed using widget
@@ -48,7 +58,7 @@ in the widget.
<P>
<DT><I>Name</I>: <B>width</B>
<DT><I>Class</I>: <B>Width</B>
<DT><I>Option keyword</I>: <B><A NAME="M29">:width</A></B>
<DT><I>Option keyword</I>: <B><A NAME="M30">:width</A></B>
<DT><I>STklos slot name</I>: <B>width</B>
<DD>Specifies an integer value indicating the desired width of the entry window,
in average-size characters of the widget's font.
@@ -56,7 +66,7 @@ If the value is less than or equal to zero, the widget picks a
size just large enough to hold its current text.
<P>
</DL>
<H3><A NAME="M30">DESCRIPTION</A></H3>
<H3><A NAME="M31">DESCRIPTION</A></H3>
The <B>entry</B> procedure creates a new window (given by the
<I>widget-name</I> argument) and makes it into an entry widget.
Additional options, described above, may be specified on the
@@ -88,7 +98,7 @@ the standard <B>xScrollCommand</B> mechanism for interacting with
scrollbars (see the description of the <B>xScrollCommand</B> option
for details). They also support scanning, as described below.
<H3><A NAME="M31">WIDGET PROCEDURE</A></H3>
<H3><A NAME="M32">WIDGET PROCEDURE</A></H3>
The <B>entry</B> procedure creates a new STk procedure whose
name is <I>widget-name</I>. This
procedure may be used to invoke various
@@ -102,33 +112,33 @@ arguments. An index specifies a particular character in the entry's
string, in any of the following ways:
<P>
<DL>
<DT><A NAME="M32"><I>number</I></A><DD>
<DT><A NAME="M33"><I>number</I></A><DD>
Specifies the character as a numerical index, where 0 corresponds
to the first character in the string.
<P>
<DT><A NAME="M33"><B>anchor</B></A><DD>
<DT><A NAME="M34"><B>anchor</B></A><DD>
Indicates the anchor point for the selection, which is set with the
<B>select from</B> and <B>select adjust</B> widget procedures.
<P>
<DT><A NAME="M34"><B>end</B></A><DD>
<DT><A NAME="M35"><B>end</B></A><DD>
Indicates the character just after the last one in the entry's string.
This is equivalent to specifying a numerical index equal to the length
of the entry's string.
<P>
<DT><A NAME="M35"><B>insert</B></A><DD>
<DT><A NAME="M36"><B>insert</B></A><DD>
Indicates the character adjacent to and immediately following the
insertion cursor.
<P>
<DT><A NAME="M36"><B>sel.first</B></A><DD>
<DT><A NAME="M37"><B>sel.first</B></A><DD>
Indicates the first character in the selection. It is an error to
use this form if the selection isn't in the entry window.
<P>
<DT><A NAME="M37"><B>sel.last</B></A><DD>
<DT><A NAME="M38"><B>sel.last</B></A><DD>
Indicates the character just after the last one in the selection.
It is an error to use this form if the selection isn't in the
entry window.
<P>
<DT><A NAME="M38"><B>@</B><I>number</I></A><DD>
<DT><A NAME="M39"><B>@</B><I>number</I></A><DD>
In this form, <I>number</I> is treated as an x-coordinate in the
entry's window; the character spanning that x-coordinate is used.
For example, ``<B>@0</B>'' indicates the left-most character in the
@@ -143,7 +153,7 @@ rounded to the nearest legal value.
The following procedures are possible for entry widgets:
<P>
<DL>
<DT><A NAME="M39">(<I>widget-name '</I><B>bbox </B><I>index</I>)</A><DD>
<DT><A NAME="M40">(<I>widget-name '</I><B>bbox </B><I>index</I>)</A><DD>
Returns a list of four numbers describing the bounding box of the
character given by <I>index</I>.
The first two elements of the list give the x and y coordinates of
@@ -153,13 +163,13 @@ the width and height of the character, in pixels.
The bounding box may refer to a region outside the visible area
of the window.
<P>
<DT><A NAME="M40">(<I>widget-name '</I><B>cget</B> <I>option</I>)</A><DD>
<DT><A NAME="M41">(<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>entry</B>
procedure.
<P>
<DT><A NAME="M41">(<I>widget-name '</I><B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?)</A><DD>
<DT><A NAME="M42">(<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
@@ -173,8 +183,8 @@ this case the procedure returns an empty string.
<I>Option</I> may have any of the values accepted by the <B>entry</B>
procedure.
<P>
<DT><A NAME="M42">(<I>widget-name '</I><B>delete </B><I>first</I>)</A><DD>
<DT><A NAME="M43">(<I>widget-name '</I><B>delete </B><I>first </I><I>last</I>)</A><DD>
<DT><A NAME="M43">(<I>widget-name '</I><B>delete </B><I>first</I>)</A><DD>
<DT><A NAME="M44">(<I>widget-name '</I><B>delete </B><I>first </I><I>last</I>)</A><DD>
Delete one or more elements of the entry.
<I>First</I> is the index of the first character to delete, and
<I>last</I> is the index of the character just after the last
@@ -183,33 +193,33 @@ If <I>last</I> isn't specified it defaults to <I>first</I>+1,
i.e. a single character is deleted.
This procedure returns an empty string.
<P>
<DT><A NAME="M44">(<I>widget-name '</I><B>get</B>)</A><DD>
<DT><A NAME="M45">(<I>widget-name '</I><B>get</B>)</A><DD>
Returns the entry's string.
<P>
<DT><A NAME="M45">(<I>widget-name '</I><B>icursor </B><I>index</I>)</A><DD>
<DT><A NAME="M46">(<I>widget-name '</I><B>icursor </B><I>index</I>)</A><DD>
Arrange for the insertion cursor to be displayed just before the character
given by <I>index</I>. Returns an empty string.
<P>
<DT><A NAME="M46">(<I>widget-name '</I><B>index</B><I> index</I>)</A><DD>
<DT><A NAME="M47">(<I>widget-name '</I><B>index</B><I> index</I>)</A><DD>
Returns the numerical index corresponding to <I>index</I>.
<P>
<DT><A NAME="M47">(<I>widget-name '</I><B>insert </B><I>index string</I>)</A><DD>
<DT><A NAME="M48">(<I>widget-name '</I><B>insert </B><I>index string</I>)</A><DD>
Insert the characters of <I>string</I> just before the character
indicated by <I>index</I>. Returns an empty string.
<P>
<DT><A NAME="M48">(<I>widget-name '</I><B>scan</B> <I>option args</I>)</A><DD>
<DT><A NAME="M49">(<I>widget-name '</I><B>scan</B> <I>option args</I>)</A><DD>
This procedure is used to implement scanning on entries. It has
two forms, depending on <I>option</I>:
<P>
<P>
<DL>
<DT><A NAME="M49">(<I>widget-name '</I><B>scan 'mark </B><I>x</I>)</A><DD>
<DT><A NAME="M50">(<I>widget-name '</I><B>scan 'mark </B><I>x</I>)</A><DD>
Records <I>x</I> and the current view in the entry window; used 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="M50">(<I>widget-name '</I><B>scan 'dragto </B><I>x</I>)</A><DD>
<DT><A NAME="M51">(<I>widget-name '</I><B>scan 'dragto </B><I>x</I>)</A><DD>
This procedure computes the difference between its <I>x</I> argument
and the <I>x</I> argument to the last <B>scan mark</B> procedure for
the widget. It then adjusts the view left or right by 10 times the
@@ -219,13 +229,13 @@ dragging the entry at high speed through the window. The return
value is an empty string.
<P>
</DL>
<DT><A NAME="M51">(<I>widget-name '</I><B>selection </B><I>option arg</I>)</A><DD>
<DT><A NAME="M52">(<I>widget-name '</I><B>selection </B><I>option arg</I>)</A><DD>
This procedure is used to adjust the selection within an entry. It
has several forms, depending on <I>option</I>:
<P>
<P>
<DL>
<DT><A NAME="M52">(<I>widget-name '</I><B>selection 'adjust </B><I>index</I>)</A><DD>
<DT><A NAME="M53">(<I>widget-name '</I><B>selection 'adjust </B><I>index</I>)</A><DD>
Locate the end of the selection nearest to the character given by
<I>index</I>, and adjust that end of the selection to be at <I>index</I>
(i.e including but not going beyond <I>index</I>). The other
@@ -236,28 +246,28 @@ include the characters between <I>index</I> and the most recent
selection anchor point, inclusive.
Returns an empty string.
<P>
<DT><A NAME="M53">(<I>widget-name '</I><B>selection 'clear</B>)</A><DD>
<DT><A NAME="M54">(<I>widget-name '</I><B>selection 'clear</B>)</A><DD>
Clear the selection if it is currently in this widget. If the
selection isn't in this widget then the procedure has no effect.
Returns an empty string.
<P>
<DT><A NAME="M54">(<I>widget-name '</I><B>selection 'from </B><I>index</I>)</A><DD>
<DT><A NAME="M55">(<I>widget-name '</I><B>selection 'from </B><I>index</I>)</A><DD>
Set the selection anchor point to just before the character
given by <I>index</I>. Doesn't change the selection.
Returns an empty string.
<P>
<DT><A NAME="M55">(<I>widget-name '</I><B>selection 'present</B>)</A><DD>
<DT><A NAME="M56">(<I>widget-name '</I><B>selection 'present</B>)</A><DD>
Returns <B>#t</B> if there is are characters selected in the entry,
<B>#f</B> if nothing is selected.
<P>
<DT><A NAME="M56">(<I>widget-name '</I><B>selection 'range </B><I>start</I> <I>end</I>)</A><DD>
<DT><A NAME="M57">(<I>widget-name '</I><B>selection 'range </B><I>start</I> <I>end</I>)</A><DD>
Sets the selection to include the characters starting with
the one indexed by <I>start</I> and ending with the one just
before <I>end</I>.
If <I>end</I> refers to the same character as <I>start</I> or an
earlier one, then the entry's selection is cleared.
<P>
<DT><A NAME="M57">(<I>widget-name '</I><B>selection 'to </B><I>index</I>)</A><DD>
<DT><A NAME="M58">(<I>widget-name '</I><B>selection 'to </B><I>index</I>)</A><DD>
If <I>index</I> is before the anchor point, set the selection
to the characters from <I>index</I> up to but not including
the anchor point.
@@ -272,14 +282,14 @@ created using the most recent anchor point specified for the widget.
Returns an empty string.
<P>
</DL>
<DT><A NAME="M58">(<I>widget-name '</I><B>xview </B><I>args</I>)</A><DD>
<DT><A NAME="M59">(<I>widget-name '</I><B>xview </B><I>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="M59">(<I>widget-name '</I><B>xview</B>)</A><DD>
<DT><A NAME="M60">(<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 horizontal span that is visible in the window.
@@ -289,16 +299,16 @@ in the window, and 40% of the text is off-screen to the right.
These are the same values passed to scrollbars via the <B>:xscrollcommand</B>
option.
<P>
<DT><A NAME="M60">(<I>widget-name '</I><B>xview</B> <I>index</I>)</A><DD>
<DT><A NAME="M61">(<I>widget-name '</I><B>xview</B> <I>index</I>)</A><DD>
Adjusts the view in the window so that the character given by <I>index</I>
is displayed at the left edge of the window.
<P>
<DT><A NAME="M61">(<I>widget-name '</I><B>xview 'moveto</B><I> fraction</I>)</A><DD>
<DT><A NAME="M62">(<I>widget-name '</I><B>xview 'moveto</B><I> fraction</I>)</A><DD>
Adjusts the view in the window so that the character <I>fraction</I> of the
way through the text appears at the left edge of the window.
<I>Fraction</I> must be a fraction between 0 and 1.
<P>
<DT><A NAME="M62">(<I>widget-name '</I><B>xview 'scroll </B><I>number what</I>)</A><DD>
<DT><A NAME="M63">(<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.
@@ -313,7 +323,7 @@ become visible.
<P>
</DL>
</DL>
<H3><A NAME="M63">DEFAULT BINDINGS</A></H3>
<H3><A NAME="M64">DEFAULT BINDINGS</A></H3>
Tk automatically creates class bindings for entries that give them
the following default behavior.
In the descriptions below, ``word'' refers to a contiguous group
@@ -431,6 +441,6 @@ take place.
The behavior of entries can be changed by defining new bindings for
individual widgets or by redefining the class bindings.
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif">
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif"><P>
<A HREF=./STk-hlp.html><IMG ALIGN=BOTTOM SRC="./Img/RefBookBlue.gif"> Back to the <B>STk</B> main page</A>
</BODY></HTML>