_________________________________________________________________
NAME
cmwish - Continuous media programming/windowing shell
cmsh - Continuous media programming shell
SYNOPSIS
cmwish ?options? ?arg arg ...?
cmsh ?options? ?arg arg ...?
OPTIONS
-display display
Display (and screen) on which to display win-
dow. Only allowed in cmwish. Ignored if
-notk is specified.
-file fileName Read commands from fileName rather than stan-
dard input. The last element in fileName
will be used as the title for the application
and name of its interpreter for send commands
(unless overridden by the -name option).
-geometry geometry
Initial geometry to use for window. Only
allowed in cmwish. Ignored if -notk is
specified.
-name name Use name as the title to be displayed in the
window, and as the name of the interpreter
for send commands. Only allowed in cmwish.
Ignored if -notk is specified.
-sync Execute all X server commands synchronously,
so that errors are reported immediately.
This will result in much slower execution,
but it is useful for debugging. Only allowed
in cmwish. Ignored if -notk is specified.
-help Print a summary of the command-line options
and exit.
-nomain Do not connect to the X server. This mode is
useful for daemon/server processes. Only
available in cmwish
_________________________________________________________________
DESCRIPTION
Cmwish is a simple program consisting of the Tcl command
language, the Tk toolkit, the Tcl-DP extension, the CMT
extension, and a main program that reads commands from stan-
dard input or from a file. It creates a main window and
then processes Tcl commands. If cmwish is invoked with no
-f option then it reads Tcl commands interactively from
standard input. It will continue processing commands until
all windows have been deleted or until end-of-file is
reached on standard input.
Cmsh is a version of cmwish that contains only th Tcl com-
mand language, the Tcl-DP extension, the CMT extension, and
a main program that reads commands from standard input or
from a file. Since it is not linked with the X library or
Tk widget set, cmsh is considerably smaller than cmwish and
can run without an X server. If there exists a file .cmrc |
in the home directory of the user, cmwish (and cmsh) will |
evaluate the file as a Tcl script just before reading the |
first command from standard input.
If the -file option is provided, then cmwish (or cmsh) reads
Tcl commands from the file named in the -file option. These
commands will normally create an interactive interface con-
sisting of one or more widgets. When the end of the command
file is reached, cmwish will continue to respond to X events
until all windows have been deleted. There is no automatic |
evaluation of .cmrc in this case, but the script file can |
always source it if desired.
VARIABLES
Cmwish, and cmsh set the following Tcl variables:
argc Contains a count of the number of arg argu-
ments (0 if none), not including the options
described above.
argv Contains a Tcl list whose elements are the
arg arguments (not including the options
described above), in order, or an empty
string if there are no arg arguments.
argv0 Contains fileName if it was specified. Oth- |
erwise, contains the name by which cmwish was |
invoked. |
tcl_interactive ||
Contains 1 if cmwish is reading commands |
interactively (no -file option was specified |
and standard input is a terminal-like dev- |
ice), 0 otherwise.
SCRIPT FILES
If you create a Tcl script in a file whose first line is
#!/usr/local/bin/cmwish -f
then you can invoke the script file directly from your shell
if you mark it as executable. The same technique can be
used for cmsh.
If you create a Tcl script in a file whose first line is
#!/usr/local/bin/cmwish -nomain -f
then you can invoke the script file directly from your shell
if you mark it as executable.
The examples above assume that cmwish and cmsh have been
installed in the default location in /usr/local/bin; if
they are installed somewhere else then you'll have to modify
the above line to match.
PROMPTS
When any of the programs are invoked interactively they nor- |
mally prompt for each command with ``% ''. You can change |
the prompt by setting the variables tcl_prompt1 and |
tcl_prompt2. If variable tcl_prompt1 exists then it must |
consist of a Tcl script to output a prompt; instead of out- |
putting a prompt cmwish will evaluate the script in |
tcl_prompt1. The variable tcl_prompt2 is used in a similar |
way when a newline is typed but the current command isn't |
yet complete; if tcl_prompt2 isn't set then no prompt is |
output for incomplete commands.
KEYWORDS
shell, toolkit, Tcl-DP