|
CmdWidget
|
Home
Documentation
Screenshots
Binary distributions
Source distribution
subclass of Widget
CmdWidget creates a window in which Tcl commands can be typed.
The command will be executed when the Enter key is pressed
with the cursor positioned at the end of the command currently
being edited, and the command is complete Tcl command.
The output of the commands will be redirected to the cmd widget.
Previous commands can be gotten and edited before execution using
Alt-Up (default keypress, can be changed).
Classy::cmd
is a convience function that pops up a toplevel containing a
CmdWidget with a scroll bar.
CmdWidget specific options
- Command-Line Name: -prompt
- Database Name: prompt
- Database Class: Prompt
-
This is the prompt that wil be displayed. It is run through subst
first, so you can use something like {[pwd] % } as prompt.
CmdWidget specific methods
-
pathname do
-
execute the command currently being edited
-
pathname display args
-
insert args into CmdWidget
-
pathname complete ?what?
-
If what (default is file) is set to
- file
- try to complete the word at the cursor to a complete available file
- var
- try to complete the word at the cursor to a complete available variable
- cmd
- try to complete the word at the cursor to a complete available command
-
pathname insert index chars ?tags?
-
-
pathname delete ?index? ?index?
-
-
pathname undo
-
-
pathname redo
-
-
pathname clearundo
-
-
pathname cut
-
-
pathname copy
-
-
pathname paste
-
-
pathname clear
-
remove command being edited
-
pathname clearall
-
clear the entire cmd widget
-
pathname historyup
-
-
pathname historydown
-
-
pathname save file
-
save the contents of the CmdWidget to file
-
pathname select mode
-
-
pathname move mode
-
-
pathname backspace
-
-
pathname textdelete
-
-
pathname position index
-
-
pathname connect ?name?
-
connect to a different Tk application with name name using send.
if name is not given, returns the current connected application