diff options
Diffstat (limited to 'doc/text.n')
-rw-r--r-- | doc/text.n | 58 |
1 files changed, 30 insertions, 28 deletions
@@ -1056,7 +1056,7 @@ The \fBtext\fR command creates a new Tcl command whose name is the same as the path name of the text's window. This command may be used to invoke various operations on the widget. It has the following general form: .CS -\fIpathName option \fR?\fIarg arg ...\fR? +\fIpathName option \fR?\fIarg ...\fR? .CE \fIPathName\fR is the name of the command, which is the same as the text widget's path name. \fIOption\fR and the \fIarg\fRs determine the exact @@ -1285,7 +1285,7 @@ must have a create script.) In this case an empty string is returned, and you must query the window by its index position to get more information. .RE .TP -\fIpathName \fBedit \fIoption \fR?\fIarg arg ...\fR? +\fIpathName \fBedit \fIoption \fR?\fIarg ...\fR? . This command controls the undo mechanism and the modified flag. The exact behavior of the command depends on the \fIoption\fR argument that follows the @@ -1313,8 +1313,9 @@ of the widget to \fIboolean\fR. \fIpathName \fBedit redo\fR . When the \fB\-undo\fR option is true, reapplies the last undone edits provided -no other edits were done since then. Generates an error when the redo stack is -empty. Does nothing when the \fB\-undo\fR option is false. +no other edits were done since then, and returns a list of indices indicating +what ranges were changed by the redo operation. Generates an error when the +redo stack is empty. Does nothing when the \fB\-undo\fR option is false. .TP \fIpathName \fBedit reset\fR . @@ -1327,9 +1328,10 @@ Inserts a separator (boundary) on the undo stack. Does nothing when the .TP \fIpathName \fBedit undo\fR . -Undoes the last edit action when the \fB\-undo\fR option is true. An edit -action is defined as all the insert and delete commands that are recorded on -the undo stack in between two separators. Generates an error when the undo +Undoes the last edit action when the \fB\-undo\fR option is true, and returns a +list of indices indicating what ranges were changed by the undo operation. An +edit action is defined as all the insert and delete commands that are recorded +on the undo stack in between two separators. Generates an error when the undo stack is empty. Does nothing when the \fB\-undo\fR option is false. .RE .TP @@ -1351,7 +1353,7 @@ given, then, within each range, only those characters which are not elided will be returned. This may have the effect that some of the returned ranges are empty strings. .TP -\fIpathName \fBimage \fIoption \fR?\fIarg arg ...\fR? +\fIpathName \fBimage \fIoption \fR?\fIarg ...\fR? . This command is used to manipulate embedded images. The behavior of the command depends on the \fIoption\fR argument that follows the \fBimage\fR @@ -1416,7 +1418,7 @@ effect as if a separate \fIpathName \fBinsert\fR widget command had been issued for each pair, in order. The last \fItagList\fR argument may be omitted. .TP -\fIpathName \fBmark \fIoption \fR?\fIarg arg ...\fR? +\fIpathName \fBmark \fIoption \fR?\fIarg ...\fR? . This command is used to manipulate marks. The exact behavior of the command depends on the \fIoption\fR argument that follows the \fBmark\fR argument. The @@ -1696,7 +1698,7 @@ calculations, the scheduling is immediate. The command returns the empty string. \fBbgerror\fR is called on \fIcommand\fR failure. .RE .TP -\fIpathName \fBtag \fIoption \fR?\fIarg arg ...\fR? +\fIpathName \fBtag \fIoption \fR?\fIarg ...\fR? . This command is used to manipulate tags. The exact behavior of the command depends on the \fIoption\fR argument that follows the \fBtag\fR argument. The @@ -1735,8 +1737,8 @@ all the sequences for which bindings have been defined for \fItagName\fR. .RS .PP The only events for which bindings may be specified are those related to the -mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR, \fBButtonPress\fR, -\fBMotion\fR, and \fBKeyPress\fR) or virtual events. Mouse and keyboard event +mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR, \fBButton\fR, +\fBMotion\fR, and \fBKey\fR) or virtual events. Mouse and keyboard event bindings for a text widget respectively use the \fBcurrent\fR and \fBinsert\fR marks described under \fBMARKS\fR above. An \fBEnter\fR event triggers for a tag when the tag first becomes present on the @@ -1865,7 +1867,7 @@ file or \fIindex2\fR is less than or equal to \fIindex1\fR) then the command has no effect. This command returns an empty string. .RE .TP -\fIpathName \fBwindow \fIoption \fR?\fIarg arg ...\fR? +\fIpathName \fBwindow \fIoption \fR?\fIarg ...\fR? . This command is used to manipulate embedded windows. The behavior of the command depends on the \fIoption\fR argument that follows the \fBwindow\fR @@ -1934,18 +1936,18 @@ and 1. \fIpathName \fBxview scroll \fInumber what\fR . This command shifts the view in the window left or right according to -\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBunits\fR, \fBpages\fR or -\fBpixels\fR. If \fIwhat\fR is \fBunits\fR or \fBpages\fR then \fInumber\fR -must be an integer, otherwise number may be specified in any of the forms -acceptable to \fBTk_GetPixels\fR, such as +\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBpages\fR, +\fBpixels\fR, or \fBunits\fR. If \fIwhat\fR is \fBpages\fR or +\fBunits\fR then \fInumber\fR must be an integer, otherwise number may be +specified in any of the forms acceptable to \fBTk_GetPixels\fR, such as .QW 2.0c or .QW 1i (the result is rounded to the nearest integer value. If no units are given, -pixels are assumed). If \fIwhat\fR is \fBunits\fR, the view adjusts left or -right by \fInumber\fR average-width characters on the display; if it is -\fBpages\fR then the view adjusts by \fInumber\fR screenfuls; if it is -\fBpixels\fR then the view adjusts by \fInumber\fR pixels. If \fInumber\fR is +pixels are assumed). If \fIwhat\fR is \fBpages\fR then the view adjusts by +\fInumber\fR screenfuls; if it is \fBpixels\fR then the view adjusts by +\fInumber\fR pixels; if it is \fBunits\fR, the view adjusts left or +right by \fInumber\fR average-width characters on the display. If \fInumber\fR is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible. .RE @@ -1982,10 +1984,10 @@ the bottom of the window, and some other pixel is at the top. \fIpathName \fByview scroll \fInumber what\fR . This command adjust the view in the window up or down according to -\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBunits\fR, \fBpages\fR or -\fBpixels\fR. If \fIwhat\fR is \fBunits\fR or \fBpages\fR then \fInumber\fR -must be an integer, otherwise number may be specified in any of the forms -acceptable to \fBTk_GetPixels\fR, such as +\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBpages\fR, +\fBpixels\fR, or \fBunits\fR. If \fIwhat\fR is \fBunits\fR or \fBpages\fR then +\fInumber\fR must be an integer, otherwise number may be specified in any of +the forms acceptable to \fBTk_GetPixels\fR, such as .QW 2.0c or .QW 1i @@ -2163,11 +2165,11 @@ insertion cursor without moving the insertion cursor. Meta-backspace and Meta-Delete delete the word to the left of the insertion cursor. .IP [30] -Control-x deletes whatever is selected in the text widget after copying it to -the clipboard. -.IP [31] Control-t reverses the order of the two characters to the right of the insertion cursor. +.IP [31] +Control-x deletes whatever is selected in the text widget after copying it to +the clipboard. .IP [32] Control-z undoes the last edit action if the \fB\-undo\fR option is true. Does nothing otherwise. |