TKE
3.6
Advanced code editor for programmers
|
Functions | |
get_index interp pname txt position args | |
delete interp pname txt startpos endpos copy | |
toggle_case interp pname txt startpos endpos | |
lower_case interp pname txt startpos endpos | |
upper_case interp pname txt startpos endpos | |
rot13 interp pname txt startpos endpos | |
title_case interp pname txt startpos endpos | |
join_lines interp pname txt ?num? | |
bubble_up interp pname txt | |
bubble_down interp pname txt | |
comment interp pname txt | |
uncomment interp pname txt | |
toggle_comment interp pname txt | |
indent interp pname txt ?startpos? ?endpos? | |
unindent interp pname txt ?startpos? ?endpos? | |
move_cursor interp pname txt position args | |
format interp pname txt type | |
unformat interp pname txt | |
api::edit::bubble_down | interp pname txt | ||
Moves the current line down by one (unless the current line is the last line in the buffer. If any text is selected, lines containing a selection will be moved down by one line.
txt | Text widget to change. |
api::edit::bubble_up | interp pname txt | ||
Moves the current line up by one (unless the current line is the first line in the buffer. If any text is selected, lines containing a selection will be moved up by one line.
txt | Text widget to change. |
api::edit::comment | interp pname txt | ||
Comments the currently selected lines.
txt | Text widget to comment. |
api::edit::delete | interp pname txt startpos endpos copy | ||
Deletes all characters between startpos and endpos-1, inclusive.
txt | Pathname of text widget to delete text from. |
startpos | Text widget index to begin deleting from. |
endpos | Text widget index to stop deleting from. |
copy | Copies deleted text to the clipboard. |
Definition at line 565 of file api.tcl.
api::edit::format | interp pname txt type | ||
Adds text formatting to current word of the given type. If text is currently selected, the formatting will be applied to all of the selected text.
txt | Text widget to apply formatting to. |
type | Type of formatting to apply. The available formats supported by the current syntax are allowed. The legal values for this parameter are as follows:
|
api::edit::get_index | interp pname txt position args | ||
txt | Pathname of text widget to get index of. |
position | The specifies the visible cursor position to lookup. The values that can be used for this option are as follows:
|
args | Modifier arguments based on position value. -dir Specifies direction from starting position (values are "next" or "prev"). Defaults to "next". -startpos Specifies the starting index of calculation. Defaults to "insert". -num Specifies the number to apply. Defaults to 1. -char Used with "findchar" position type. Specifies the character to find. -exclusive If set to 1, returns character position before calculated index. Defaults to 0. -column Specifies the name of a variable containing the column to use for "up" and "down" positions. -adjust Adjusts the calculated index by the given value before returning the result. |
Definition at line 552 of file api.tcl.
api::edit::indent | interp pname txt ?startpos? ?endpos? | ||
Indents the given range of text between startpos and endpos-1, inclusive, by one level of indentation. If text is currently selected, the selected text is indented instead.
txt | Text widget to indent. |
startpos | Starting position of range to indent. |
endpos | Ending position of range to indent. |
Definition at line 717 of file api.tcl.
api::edit::join_lines | interp pname txt ?num? | ||
Joins the given number of lines, guaranteeing that on a single space separates the text of each joined line, starting at the current insertion cursor position. If text is selected, any line that contains a selection will be joined together.
txt | Text widget to modify. |
num | Number of lines to join below current line. |
Definition at line 649 of file api.tcl.
api::edit::lower_case | interp pname txt startpos endpos | ||
Transforms all text in the given range of startpos to endpos-1, inclusive, to lower case. If text is seelected, the selected text is transformed instead of the given range.
txt | Text widget to modify. |
startpos | Starting index of range to modify. |
endpos | Ending index of range to modify. |
Definition at line 593 of file api.tcl.
api::edit::move_cursor | interp pname txt position args | ||
Moves the cursor to the given cursor position. The value of position and args are the same as those of the api::edit::get_index.
txt | Text widget to change the cursor of. |
position | Position to move the cursor to (see api::edit::get_index) |
args | List of arguments based on position value (see api::edit::get_index) |
Definition at line 744 of file api.tcl.
api::edit::rot13 | interp pname txt startpos endpos | ||
Transforms all text in the given range of startpos to endpos-1, inclusive, to its rot13 equivalent. If text is selected, the selected text is transformed instead of the given range.
txt | Text widget to modify. |
startpos | Starting index of range to modify. |
endpos | Ending index of range to modify. |
Definition at line 621 of file api.tcl.
api::edit::title_case | interp pname txt startpos endpos | ||
Transforms all text in the given range of startpos to endpos-1, inclusive, to title case (first character of each word is capitalized while the rest of the characters are set to lowercase).
txt | Text widget to modify. |
startpos | Starting index of range to modify. |
endpos | Ending index of range to modify. |
Definition at line 635 of file api.tcl.
api::edit::toggle_case | interp pname txt startpos endpos | ||
Toggles the case of all characters in the range of startpos to endpos-1, inclusive. If text is selected, the selected text is toggled instead of the given range.
txt | Text widget to modify. |
startpos | Starting index of range to modify. |
endpos | Ending index of range to modify. |
Definition at line 579 of file api.tcl.
api::edit::toggle_comment | interp pname txt | ||
api::edit::uncomment | interp pname txt | ||
Uncomments the currently selected lines.
txt | Text widget to uncomment. |
api::edit::unformat | interp pname txt | ||
Removes any formatting that is applied to the selected text.
txt | Text widget to unformat. |
api::edit::unindent | interp pname txt ?startpos? ?endpos? | ||
Unindents the given range of text between startpos and endpos-1, inclusive, by one level of indentation. If text is currently selected, the selected text is unindented instead.
txt | Text widget to unindent. |
startpos | Starting position of range to unindent. |
endpos | Ending position of range to unindent. |
Definition at line 731 of file api.tcl.
api::edit::upper_case | interp pname txt startpos endpos | ||
Transforms all text in the given range of startpos to endpos-1, inclusive, to upper case. If text is selected, the selected text is transformed instead of the given range.
txt | Text widget to modify. |
startpos | Starting index of range to modify. |
endpos | Ending index of range to modify. |
Definition at line 607 of file api.tcl.