Убрал доки по tcl

master
Sergey Kalinin 2022-08-17 21:37:06 +03:00
parent 8fe46ab488
commit 7864685b48
493 changed files with 0 additions and 80171 deletions

View File

@ -1,16 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>about</title>
</head>
<body>
<center><h1>Документация</h1></center>
<p>Документация предоставлена компанией
<b><a href="http://www.florin.ru">DataX/FLORIN, Inc.</a></b>
<P>&copy; Все права защищены 1992-2001.
<p>Разрешается не коммерческое использование документации как целиком так и отдельных частей с разрешения авторов и с обязательной ссылкой на
<b><a href="http://www.florin.ru">DataX/FLORIN, Inc.</a></b> и на
<b><a href="http://nuk-svk.ru">Sergey Kalinin</a></b>
</body>
</html>

View File

@ -1,276 +0,0 @@
<HTML>
<HEAD><TITLE>ArrowButton</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ArrowButton</B>
- Button widget with an arrow shape.
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ArrowButton</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activebackground">-activebackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activeforeground">-activeforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-armcommand">-armcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-arrowbd">-arrowbd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-arrowrelief">-arrowrelief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-clean">-clean</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dir">-dir</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-disarmcommand">-disarmcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-ipadx">-ipadx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-ipady">-ipady</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ArrowButton can be of two types following <B>type</B> option:
for <B>button</B> type, it is standard button with an arrow drawn on it;
for <B>arrow</B> type, it is an arrow like scrollbar's arrow.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is pressed
over the ArrowButton. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive
integer, this command is repeatedly called if mouse pointer is over the button and until
mouse button 1 is released.
</DD>
</DL>
<DL><DT><A NAME="-arrowbd"><B>-arrowbd</B></A></DT>
<DD>
When ArrowButton <B>type</B> is <I>arrow</I>, specifies the border width of the
arrow. Must be 1 or 2.
</DD>
</DL>
<DL><DT><A NAME="-arrowrelief"><B>-arrowrelief</B></A></DT>
<DD>
When ArrowButton <B>type</B> is <I>arrow</I>, specifies the relief of the arrow.
Must be <B>raised</B> or <B>sunken</B>.
</DD>
</DL>
<DL><DT><A NAME="-clean"><B>-clean</B></A></DT>
<DD>
Specifies a level of quality, between 0 and 2, for the arrow.
If 0, the arrow is drawn with its maximum width and height.
If 1, the base of arrow is arranged to be odd to have same edges.
If 2, the base of arrow is arranged to be odd and the orthogonal to be (base+1)/2 to
have 'straight' diagonal for edges.
</DD>
</DL>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a Tcl command to associate with the ArrowButton. This command
is typically invoked when mouse button 1 is released over the ArrowButton
window.
</DD>
</DL>
<DL><DT><A NAME="-dir"><B>-dir</B></A></DT>
<DD>
Specifies the direction of the arrow: <B>top</B>, <B>bottom</B>, <B>left</B>
or <B>right</B>.
</DD>
</DL>
<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is released.
This command is called even if pointer is not over the ArrowButton, and always before
the command specified by <B>command</B> option.
It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
<B>repeatinterval</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the ArrowButton. The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-ipadx"><B>-ipadx</B></A></DT>
<DD>
Specifies a minimun pad between the ArrowButton border and the right and left side
of the arrow. The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-ipady"><B>-ipady</B></A></DT>
<DD>
Specifies a minimun pad between the ArrowButton border and the top and bottom side
of the arrow. The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of three states for the ArrowButton: <B>normal</B>, <B>active</B>,
or <B>disabled</B>.
<DL><DT>If ArrowButton <B>type</B> is <I>button</I>:</DT>
<DD>In normal state the ArrowButton is displayed using the
<B>foreground</B> and <B>background</B> options. The active state is
typically used when the pointer is over the ArrowButton. In active state
the ArrowButton is displayed using the <B>activeforeground</B> and
<B>activebackground</B> options. In disabled state the <B>disabledforeground</B> and
<B>background</B> options determine how the ArrowButton is displayed.
</DD>
<DT>If ArrowButton <B>type</B> is <I>arrow</I>:</DT>
<DD>Only colors of arrow change. The background of ArrowButton is always
displayed using <B>troughcolor</B> option.
In normal state the ArrowButton is displayed using the <B>background</B> option. The active
state is typically used when the pointer is over the ArrowButton. In active state
the ArrowButton is displayed using the <B>activebackground</B> option. In disabled state
the ArrowButton is displayed with a dark stipple.
</DD>
</DL>
Disabled state means that the ArrowButton
should be insensitive: the default bindings will refuse to activate
the widget and will ignore mouse button presses.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Determines the type of the ArrowButton: <B>button</B> for standard button look, or
<B>arrow</B> scrollbar's arrow look.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies a desired width for the ArrowButton. The value is in screen units.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
</DT><DD>
If ArrowButton <B>state</B> is not disabled, this invoke the commands of the button.
ArrowButton is redisplayed with active color and sunken relief, and
<B>armcommand</B> is called. Then ArrowButton is redisplayed with
normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
are called.
<P><B>invoke</B> is called when ArrowButton has input focus and user press the space bar.
</DD></DL>
</BODY></HTML>

View File

@ -1,116 +0,0 @@
<HTML>
<HEAD><TITLE>BWidget</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>BWidget</B>
- Description text
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>BWidget::<A HREF="#XLFDfont"><B>XLFDfont</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DD>
<DD>BWidget::<A HREF="#assert"><B>assert</B></A>
<I>exp</I>
?<I>msg</I>?
</DD>
<DD>BWidget::<A HREF="#clonename"><B>clonename</B></A>
<I>menu</I>
</DD>
<DD>BWidget::<A HREF="#focus"><B>focus</B></A>
<I>option</I>
<I>path</I>
</DD>
<DD>BWidget::<A HREF="#get3dcolor"><B>get3dcolor</B></A>
<I>path</I>
<I>bgcolor</I>
</DD>
<DD>BWidget::<A HREF="#getname"><B>getname</B></A>
<I>name</I>
</DD>
<DD>BWidget::<A HREF="#grab"><B>grab</B></A>
<I>option</I>
<I>path</I>
</DD>
<DD>BWidget::<A HREF="#lreorder"><B>lreorder</B></A>
<I>list</I>
<I>neworder</I>
</DD>
<DD>BWidget::<A HREF="#parsetext"><B>parsetext</B></A>
<I>text</I>
</DD>
<DD>BWidget::<A HREF="#place"><B>place</B></A>
<I>path</I>
<I>w</I>
<I>h</I>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Description text
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="XLFDfont">BWidget::<B>XLFDfont</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="assert">BWidget::<B>assert</B></A>
<I>exp</I>
?<I>msg</I>?
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="clonename">BWidget::<B>clonename</B></A>
<I>menu</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focus">BWidget::<B>focus</B></A>
<I>option</I>
<I>path</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="get3dcolor">BWidget::<B>get3dcolor</B></A>
<I>path</I>
<I>bgcolor</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="getname">BWidget::<B>getname</B></A>
<I>name</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="grab">BWidget::<B>grab</B></A>
<I>option</I>
<I>path</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="lreorder">BWidget::<B>lreorder</B></A>
<I>list</I>
<I>neworder</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="parsetext">BWidget::<B>parsetext</B></A>
<I>text</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="place">BWidget::<B>place</B></A>
<I>path</I>
<I>w</I>
<I>h</I>
?<I>arg...</I>?
</DT><DD>
Description text
</DD></DL>
</BODY></HTML>

View File

@ -1,273 +0,0 @@
<HTML>
<HEAD><TITLE>Button</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Button</B>
- Button widget with enhanced options
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Button</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activebackground">-activebackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activeforeground">-activeforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-bitmap">-bitmap</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-image">-image</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-wraplength">-wraplength</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-armcommand">-armcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-disarmcommand">-disarmcommand</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-name">-name</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-underline">-underline</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Button widget extends the Tk button with new options.
<A HREF="DynamicHelp.html">DynamicHelp</A> options,
a new relief style, callback for <B>arm</B>/<B>disarm</B>, and
<B>repeatdelay</B>/<B>repeatinterval</B> options has been added.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the Button when mouse button 1 is pressed over the
Button. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive integer,
this command is repeatedly called if mouse pointer is over the Button and until mouse
button 1 is released.
</DD>
</DL>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a Tcl command to associate with the Button. This command
is typically invoked when mouse button 1 is released over the Button
window.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>
Specifies one of three states for the default ring: <B>normal</B>, <B>active</B>,
or <B>disabled</B>. In active state, the button is drawn with the platform specific
appearance for a default button. In normal state, the button is drawn with the platform
specific appearance for a non-default button, leaving enough space to draw the default
button appearance. The normal and active states will result in buttons of the same size.
In disabled state, the button is drawn with the non-default button appearance without
leaving space for the default appearance. The disabled state may result
in a smaller button than the active state.
</DD>
</DL>
<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the Button when mouse button 1 is released.
This command is called even if pointer is not over the Button, and always before
the command specified by <B>command</B> option.
It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
<B>repeatinterval</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the Button.
If an image or bitmap is being displayed in the Button then the value is in
screen units;
for text it is in lines of text.
If this option isn't specified, the Button's desired height is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-name"><B>-name</B></A></DT>
<DD>
Specifies a standard name for the button. If the option <B>*<I>name</I>Name</B> is
found in the resources database, then <B>text</B> and <B>underline</B> options
are extracted from its value.
</DD>
</DL>
<DL><DT><A NAME="-relief"><B>-relief</B></A></DT>
<DD>
Specifies the 3-D effect desired for the widget. Acceptable values are standard values for
button relief (<B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>, <B>solid</B>, and <B>groove</B>) and <B>link</B>, which specifies that button relief is <B>flat</B> when pointer
is outside the button and <B>raised</B> when pointer is inside.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of three states for the Button: <B>normal</B>, <B>active</B>,
or <B>disabled</B>. In normal state the Button is displayed using the
<B>foreground</B> and <B>background</B> options. The active state is
typically used when the pointer is over the Button. In active state
the Button is displayed using the <B>activeforeground</B> and
<B>activebackground</B> options. Disabled state means that the Button
should be insensitive: the default bindings will refuse to activate
the widget and will ignore mouse button presses.
In this state the <B>disabledforeground</B> and
<B>background</B> options determine how the Button is displayed.
</DD>
</DL>
<DL><DT><A NAME="-underline"><B>-underline</B></A></DT>
<DD>
Specifies the integer index of a character to underline in the label of the button.
0 corresponds to the first character of the text displayed, 1 to the next character,
and so on.
<BR>The binding <B>&lt;Alt-<I>char</I>&gt;</B> is automatically set on the toplevel
of the Button to call Button::<B>setfocus</B>.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
If an image or bitmap is being displayed in the Button then the value is in
screen units;
for text it is in characters.
If this option isn't specified, the Button's desired width is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
</DT><DD>
If Button <B>state</B> is not disabled, this invoke the commands of the Button.
Button is redisplayed with active color and sunken relief, and
<B>armcommand</B> is called. Then Button is redisplayed with
normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
are called.
<P><B>invoke</B> is called when Button has input focus and user press the space bar.
</DD></DL>
</BODY></HTML>

View File

@ -1,220 +0,0 @@
<HTML>
<HEAD><TITLE>ButtonBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ButtonBox</B>
- Set of buttons with horizontal or vertical layout
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ButtonBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-orient">-orient</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-pady">-pady</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-spacing">-spacing</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ButtonBox layouts Button horizontally or vertically.
Some commands take an <I>index</I> as argument indicating on which
Button it work. This index may be specified in any of the following forms:
<P>
<DL COMPACT>
<DT>
<I>number</I>
<DD>
Specifies the Button numerically, where 0 corresponds
to the first added Button, 1 to the next, and so on.
<DT>
<B>end</B> or <B>last</B>
<DD>
Indicates the last item added.
<DT><B>default</B>
<DD>
Indicates the default Button.
</DL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-background"><B>-background</B></A></DT>
<DD>
Specifies a default background color for all added buttons and for the frame.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>
Specifies the default button of the button box. The value is an integer
referencing the n-th added button, starting from 0.
If this value is -1 (the default), all button wil be drawn with their -default
option set to disabled, and this value can not be changed. <BR>If this value is
not -1, the associated button is drawn with -default option set to active and
the others are drawn with -default option set to normal. The value can be changed
by configure.
</DD>
</DL>
<DL><DT><A NAME="-homogeneous"><B>-homogeneous (read-only)</B></A></DT>
<DD>
Specifies wether or not buttons must have the same width for horizontal layout.
</DD>
</DL>
<DL><DT><A NAME="-orient"><B>-orient (read-only)</B></A></DT>
<DD>
Specifies the orientation of the button box. If this option is <B>horizontal</B>
(the default), buttons are added from top to bottom.
If this option is <B>vertical</B>, buttons are added from left to right.
</DD>
</DL>
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
<DD>
Specifies a default value for the -padx option of all added buttons.
</DD>
</DL>
<DL><DT><A NAME="-pady"><B>-pady</B></A></DT>
<DD>
Specifies a default value for the -pady option of all added buttons.
</DD>
</DL>
<DL><DT><A NAME="-spacing"><B>-spacing</B></A></DT>
<DD>
Specifies the default spacing between buttons. This value can be changed before each
call to <B>add</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
?<I>option value...</I>?
</DT><DD>
Add a button to the button box.
<P>
See <A HREF="Button.html"><B>Button</B></A> for description of options.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>index</I>
</DT><DD>
Return the numerical index corresponding to the item.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
<I>index</I>
</DT><DD>
Invoke the Button given by <I>index</I>.
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
<I>index</I>
</DT><DD>
Set the focus to the Button given by <I>index</I>.
</DD></DL>
</BODY></HTML>

View File

@ -1,306 +0,0 @@
<HTML>
<HEAD><TITLE>ComboBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ComboBox</B>
- ComboBox widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ComboBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-state</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-command</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragenabled</TD>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragevent</TD>
<TD>&nbsp;&nbsp;-draginitcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragtype</TD>
<TD>&nbsp;&nbsp;-dropcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropenabled</TD>
<TD>&nbsp;&nbsp;-dropovercmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-droptypes</TD>
<TD>&nbsp;&nbsp;-editable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entrybg (see <B>-background</B>)</TD>
<TD>&nbsp;&nbsp;-entryfg (see <B>-foreground</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-exportselection</TD>
<TD>&nbsp;&nbsp;-font</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptext</TD>
<TD>&nbsp;&nbsp;-helptype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helpvar</TD>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertbackground</TD>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertofftime</TD>
<TD>&nbsp;&nbsp;-insertontime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertwidth</TD>
<TD>&nbsp;&nbsp;-justify</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectbackground</TD>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectforeground</TD>
<TD>&nbsp;&nbsp;-show</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-takefocus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-text</TD>
<TD>&nbsp;&nbsp;-textvariable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-width</TD>
<TD>&nbsp;&nbsp;-xscrollcommand</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="LabelFrame.html">OPTIONS from <B>LabelFrame</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptext</TD>
<TD>&nbsp;&nbsp;-helptype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helpvar</TD>
<TD>&nbsp;&nbsp;-label (see <B>-text</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelanchor (see <B>-anchor</B>)</TD>
<TD>&nbsp;&nbsp;-labelfont (see <B>-font</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelheight (see <B>-height</B>)</TD>
<TD>&nbsp;&nbsp;-labeljustify (see <B>-justify</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelwidth (see <B>-width</B>)</TD>
<TD>&nbsp;&nbsp;-name</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-relief</TD>
<TD>&nbsp;&nbsp;-side</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-underline</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-modifycmd">-modifycmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-postcommand">-postcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-values">-values</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ComboBox widget enables the user to select a value among a list given by the <B>values</B> option.
The list of possible values can be popped by pressing the ArrowButton or by clicking in the entry
when <B>editable</B> value of the ComboBox is <B>false</B>.<BR>
If <B>editable</B> value of the ComboBox is <B>true</B> and the entry has the focus, the user can
press the top and bottom arrow keys to modify its value. If the current value exactly match a value in the list,
then the previous (for top arrow key) or then next (for bottom arrow key) value in the list is displayed.
If the current value match the beginning of a value in the list, then this value is displayed.
If the current value doesnt match anything, then the first value is displayed.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the window, in lines. If zero or less, then the desired
height for the window is made just large enough to hold all the elements in the listbox.
</DD>
</DL>
<DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT>
<DD>
Specifies a Tcl command called when the user modify the value of the ComboBox by selecting it in the listbox or pressing arrow key.
</DD>
</DL>
<DL><DT><A NAME="-postcommand"><B>-postcommand</B></A></DT>
<DD>
Specifies a Tcl command called before the listbox of the ComboBox is mapped.
</DD>
</DL>
<DL><DT><A NAME="-values"><B>-values</B></A></DT>
<DD>
Specifies the values to display in the listbox of the ComboBox.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
?<I>arg...</I>?
</DT><DD>
Set bindings on the entry widget.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A>
</DT><DD>
Returns the index of the current text of the ComboBox in the list of values,
or -1 if it doesn't match any value.
</DD></DL>
<DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A>
<I>index</I>
</DT><DD>
Set the text of the ComboBox to the value indicated by <I>index</I> in the list of values.
<I>index</I> may be specified in any of the following forms:
<P>
<DL COMPACT>
<DT>
<B>last</B>
<DD>
Specifies the last element of the list of values.
<DT><B>first</B>
<DD>
Specifies the first element of the list of values.
<DT>
<B>next</B>
<DD>
Specifies the element following the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT><B>previous</B>
<DD>
Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT>
@<I>number</I>
<DD>
Specifies the integer index in the list of values.
</DL>
</DD></DL>
<HR><BR><B>BINDINGS</B><BR><BR>
When Entry of the ComboBox has the input focus, it has the following bindings, in addition
to the default Entry bindings:
<UL>
<LI>Page up set the value of the ComboBox to the first value.
<LI>Page down set the value of the ComboBox to the last value.
<LI>Arrow up set the value of the ComboBox to the previous value.
<LI>Arrow down set the value of the ComboBox to the next value.
</UL>
If the listbox is not mapped and ComboBox is not editable or disabled,
mouse button 1 on the Entry cause the listbox to popup, as if the user press the ArrowButton.
</BODY></HTML>

View File

@ -1,293 +0,0 @@
<HTML>
<HEAD><TITLE>Dialog</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Dialog</B>
- Dialog abstraction with custom buttons
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Dialog</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ButtonBox.html">OPTIONS from <B>ButtonBox</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-homogeneous</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-spacing</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-bitmap">-bitmap</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-cancel">-cancel</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-image">-image</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-modal">-modal</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-parent">-parent</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-separator">-separator</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#draw"><B>draw</B></A>
?<I>focus</I>?
</DD>
<DD><I>pathName</I> <A HREF="#enddialog"><B>enddialog</B></A>
<I>result</I>
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#withdraw"><B>withdraw</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Dialog widget enables the user to create a dialog box.
Some commands take an <I>index</I> as argument indicating on which
Button it work. This index is the same specified for equivalent ButtonBox command:
<P>
<DL COMPACT>
<DT>
<I>number</I>
<DD>
Specifies the Button numerically, where 0 corresponds
to the first added Button, 1 to the next, and so on.
<DT>
<B>end</B> or <B>last</B>
<DD>
Indicates the last item added.
<DT><B>default</B>
<DD>
Indicates the default Button.
</DL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-anchor"><B>-anchor (read-only)</B></A></DT>
<DD>
Specifies the anchor point of the ButtonBox.
Must be one of <B>w</B>, <B>e</B>, <B>n</B>, <B>s</B> or <B>c</B>.
If <B>side</B> option is set to <I>top</I> or <I>bottom</I>,
<B>anchor</B> values <I>n</I>, <I>s</I> and <I>c</I> have the same effect.
If <B>side</B> option is set to <I>left</I> or <I>right</I>,
<B>anchor</B> values <I>w</I>, <I>e</I> and <I>c</I> have the same effect.
</DD>
</DL>
<DL><DT><A NAME="-bitmap"><B>-bitmap (read-only)</B></A></DT>
<DD>
Specifies a bitmap to display at the left of the user frame.
<B>image</B> option override <B>bitmap</B>.
</DD>
</DL>
<DL><DT><A NAME="-cancel"><B>-cancel</B></A></DT>
<DD>
Specifies the number of the cancel button of the Dialog. When user press Esc in the Dialog,
this button is invoked.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>
Specifies the number of the default button of the Dialog.
When user press Return in the Dialog, this button is invoked.
</DD>
</DL>
<DL><DT><A NAME="-image"><B>-image (read-only)</B></A></DT>
<DD>
Specifies an image to display at the left of the user frame.
<B>image</B> option override <B>bitmap</B>.
</DD>
</DL>
<DL><DT><A NAME="-modal"><B>-modal</B></A></DT>
<DD>
This option must be <B>none</B>, <B>local</B> or <B>global</B>. The value of this option
specifies the grab mode of the dialog and how works Dialog::<B>draw</B>.
</DD>
</DL>
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
<DD>
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
root window.
</DD>
</DL>
<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
<DD>
Specifies wether or not to draw a separator between the user frame and the ButtonBox.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies where to draw the ButtonBox relative to the user frame. Must be one of
<B>top</B>, <B>left</B>, <B>bottom</B> or <B>right</B>.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Title of the Dialog toplevel.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
?<I>arg...</I>?
</DT><DD>
Add a button to the button box of the dialog box. Default -command option is
<I>Dialog::enddialog $path index</I> where <I>index</I> is number of button added.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="draw"><I>pathName</I> <B>draw</B></A>
?<I>focus</I>?
</DT><DD>
This command draw the Dialog, and set grab to it following <B>modal</B> option.
If <B>modal</B> option is set to <I>none</I>, the command returns immediatly
an empty string. In all other case, the command returns when Dialog::<B>enddialog</B>
is called or when Dialog is destroyed.
The return value is the result argument of Dialog::<B>enddialog</B> or -1 if it is destroyed.
<P>
By default, the focus is set to the default button referenced by <B>default</B> option,
or to the toplevel of Dialog if no default button has been set.
If <I>focus</I> is present, it must be a pathname, or an index to a button.
Initial focus is set on this pathname or corresponding button.
</DD></DL>
<DL><DT><A NAME="enddialog"><I>pathName</I> <B>enddialog</B></A>
<I>result</I>
</DT><DD>
This command is typically called within a command of a button to make Dialog::<B>draw</B>
return.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Returns the pathname of the user window.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
<I>index</I>
</DT><DD>
Invoke the Button given by <I>index</I>.
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
<I>index</I>
</DT><DD>
Set the focus to the Button given by <I>index</I>.
</DD></DL>
<DL><DT><A NAME="withdraw"><I>pathName</I> <B>withdraw</B></A>
</DT><DD>
Call this command to hide the dialog box.
</DD></DL>
</BODY></HTML>

View File

@ -1,139 +0,0 @@
<HTML>
<HEAD><TITLE>DragSite</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>DragSite</B>
- Commands set for Drag facilities
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>DragSite::<A HREF="#include"><B>include</B></A>
<I>class</I>
<I>type</I>
<I>event</I>
</DD>
<DD>DragSite::<A HREF="#register"><B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DD>
<DD>DragSite::<A HREF="#setdrag"><B>setdrag</B></A>
<I>path</I>
<I>subpath</I>
<I>initcmd</I>
<I>endcmd</I>
?<I>force</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Commands of this namespace enable user to define a BWidget or a Tk widget as a drag site.
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="include">DragSite::<B>include</B></A>
<I>class</I>
<I>type</I>
<I>event</I>
</DT><DD>
This command provides a simple way to include options relatives to a drag site into
BWidget resources definition.
It includes the options needed for <B>register</B>: <I>-dragevent</I>, initialized to
<I>event</I>, <I>-draginitcmd</I> and <I>-dragendcmd</I>, initialized to empty string,
and two new options:
<TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>-dragenabled</I><TD>Specifies wether or not drag is active (initialized to 0)
<TR><TD><I>-dragtype</I><TD>Default or alternate dragged data type (initialized to <I>type</I>)
</TABLE>
</DD></DL>
<DL><DT><A NAME="register">DragSite::<B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DT><DD>
This command is used to declare <I>path</I> as a drag site. Options are:
<P>
<DL><DT><A NAME="DragSite-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Command called when drag terminates (ie when user release drag icon).
This command is called with the following arguments:
<UL>
<LI>the pathname of the drag source (the widget itself),
<LI>the pathname of the drop target,
<LI>the operation,
<LI>the type of the dragged data,
<LI>the dragged data,
<LI>result of the drop (result of the call to <B>-dropcmd</B> of the target),
</UL>
If the drop does not occurs, the target and the operation are empty string and the result
is 0.
</DD>
</DL>
<DL><DT><A NAME="DragSite-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="DragSite-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Command called when drag initiates. When the event of option <B>dragevent</B> occurs on
<I>path</I>, this command is called with the following arguments:
<UL>
<LI>pathname of the drag source (<I>path</I>),
<LI>root x-coordinate of pointer,
<LI>root y-coordinate of pointer,
<LI>a toplevel created to represent dragged data. When returning, if it
has no children, a bitmap is automatically displayed.
</UL>
The command must return a list containing three elements:
<UL>
<LI>the type of the data,
<LI>the list of acceptable basic operations (<B>copy</B>, <B>move</B> and <B>link</B>)
<LI>and the data.
</UL>
Note that even if <B>copy</b> does not appear in the list of basic operation,
it is considered as an acceptable operation, since <B>copy</B> semantic does not modify
the drag source.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="setdrag">DragSite::<B>setdrag</B></A>
<I>path</I>
<I>subpath</I>
<I>initcmd</I>
<I>endcmd</I>
?<I>force</I>?
</DT><DD>
This command provides a simple way to call <B>register</B> during a BWidget creation or
configuration.
<UL>
<LI><I>path</I> is the pathname of the BWidget,
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
<LI><I>initcmd</I> BWidget command for <I>drag-init</I> event,
<LI><I>endcmd</I> BWidget command for <I>drag-end</I> event,
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value has
changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
</UL>
<B>setdrag</B> verifies the modification flag of options <B>dragenabled</B> and
<B>dragevent</B> and calls <B>register</B> if needed according to the options values and
<I>initcmd</I> and <I>endcmd</I> arguments. <B>draginitcmd</B> and <B>dragendcmd</B> are not
taken from options of widget because they are considered as user command, called by
BWidget implementation of <I>drag-init</I> and <I>drag-end</I> events.
</DD></DL>
</BODY>
</HTML>

View File

@ -1,258 +0,0 @@
<HTML>
<HEAD><TITLE>DropSite</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>DropSite</B>
- Commands set for Drop facilities
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>DropSite::<A HREF="#include"><B>include</B></A>
<I>class</I>
<I>types</I>
</DD>
<DD>DropSite::<A HREF="#register"><B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DD>
<DD>DropSite::<A HREF="#setcursor"><B>setcursor</B></A>
<I>cursor</I>
</DD>
<DD>DropSite::<A HREF="#setdrop"><B>setdrop</B></A>
<I>path</I>
<I>subpath</I>
<I>dropover</I>
<I>drop</I>
?<I>force</I>?
</DD>
<DD>DropSite::<A HREF="#setoperation"><B>setoperation</B></A>
<I>op</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Commands of this namespace enable user to define a BWidget or a Tk widget as a drop site.
A drop site is composed of the type of object that can be dropped and associated operation,
a command called when drop occurs, and a command when an object is dragged over the widget.
A drop site must have at least one type of acceptable object and a drop command.
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="include">DropSite::<B>include</B></A>
<I>class</I>
<I>types</I>
</DT><DD>
This command provides a simple way to include options relatives to a drop site into
BWidget resources definition.
It includes the options needed for <B>register</B>, <I>-dropovercmd</I> and <I>-dropcmd</I>,
initialized to empty string, and <I>-droptypes</I>, initialized to <I>types</I>,
and one new option:
<TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>-dropenabled</I><TD>Specifies wether or not drop is active (initialized to 0)
</TABLE>
</DD></DL>
<DL><DT><A NAME="register">DropSite::<B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DT><DD>
This command is used to declare <I>path</I> as a drop site. Options are:
<P>
<DL><DT><A NAME="DropSite-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
This command is called when user release the drag icon over a valid drop target widget.
It takes the same arguments as <B>-dragovercmd</B> command. Its return values is passed
as a result to the <B>-dragendcmd</B> command of the drag source widget.
</DD>
</DL>
<DL><DT><A NAME="DropSite-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
This command can be used to provide a dynamic drag while <I>drag-over</I> events.
While a drag occurs, events &lt;Enter&gt;, &lt;Motion&gt; and &lt;Leave&gt; are catched.
Arguments passed to the command are:
<UL>
<LI>pathname of the drop target (the widget itself),
<LI>pathname of the drag source,
<LI>event over the drop target: <I>enter</I>, <I>motion</I> or <I>leave</I>,
<LI>root x-coordinate of the pointer,
<LI>root y-coordinate of the pointer,
<LI>operation,
<LI>type of the dragged data,
<LI>dragged data.
</UL>
Command must the new status of the drag:
<UL>
<LI>0 if widget refuse this drag. Command will not be recalled on motion/leave event.
<LI>1 if widget accept this drag. Command will not be recalled on motion/leave event.
<LI>2 if widget refuse this drag. Command will be recalled on each motion event to reevaluate.
<LI>3 if widget accept this drag. Command will be recalled on each motion event to reevaluate.
</UL>
Here is a list of events and associated actions on a DropSite widget. This example
assumes that dragged data type is valid for the drop target.
<B>status</B> is the status of the drag on a DropSite. Its value is:
<BR><BR>
<TABLE BORDER CELLSPACING=1 CELLPADDING=4>
<TR><TD WIDTH="18%" VALIGN="TOP">
<P ALIGN="CENTER"><FONT SIZE=2>Event</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P ALIGN="CENTER">Old status</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P ALIGN="CENTER">Action</FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P ALIGN="CENTER">New status</FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>&lt;Enter&gt;</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>-</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>if DropSite has <B>dropovercmd</B>, call it with <I>enter</I></FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>result of <B>dropovercmd</B></FONT></TD>
</TR>
<TR><TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>else</FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>1</FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>&lt;Motion&gt;</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>0 or 1</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">&nbsp;</TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>unchanged</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>2 or 3</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropovercmd</B> with <I>motion</I></FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>result of <B>dropovercmd</B></FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>&lt;Leave&gt;</P>
</FONT><P>&nbsp;</TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>0 or 1</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">&nbsp;</TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>-</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>2 or 3</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropovercmd</B> with <I>leave</I></FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>-</FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=4>
<FONT SIZE=2><P>&lt;Drop&gt;</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>0</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dragendcmd</B> of drag source</FONT></TD>
<TD WIDTH="24%" VALIGN="TOP" ROWSPAN=4>
<FONT SIZE=2><P>-</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>1</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>2</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropovercmd</B> with <I>leave</I> and call <B>dragendcmd</B> of drag source</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>3</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
</TR>
</TABLE>
<BR>
</DD>
</DL>
<DL><DT><A NAME="DropSite-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list {<I>type</I> <I>oplist</I> ?<I>type</I> <I>oplist</I>? ...} of acceptable
types and associated operations for the drop target.
For each type, <I>oplist</I> is a list
{<I>descops</I> <I>mod</I> ?<I>descops</I> <I>mod</I>? ...} describing operations and
modifier keys for these operations.
<I>descops</I> describe an operation. It can be a predefined operations (<B>copy</B>,
<B>move</B> or <B>link</B>) or a new user defined operation, of the form {<I>subop</I>
<B>baseop</I> ?<I>bitmap</I>?}.
<I>subop</I> is the name given to the sub operation, <I>baseop</I> is the name of the
base operation (<B>copy</B>, <B>move</B> or <B>link</B>) and <I>bitmap</I> is a bitmap
to display for the operation.
<BR>If <I>bitmap</I> is empty, the default bitmap of the base operation is used for the
sub operation.
<BR><I>subop</I> can be a base operation, in order to change the bitmap of a base operation.
In this case, <I>baseop</I> must be empty or equal to <I>subop</I>.
<BR><I>mod</I> is the modifer key for the operation. It can be:
<UL>
<LI><B>none</B> to specify that no modifier key is pressed. This modifier can only be used
with a sub operation named <B>default</B> (and vice versa), which has the behaviour of not
display any bitmap operation. For all type, if the modifier <B>none</B> is not given, it is
automatically associated to the <B>default</B> sub operation of a <B>copy</B> base operation.
<LI><B>program</B> to specifies a sub operation accessible only by <B>DropSite::setoperation</B>.
<LI>A list combining <B>shift</B>, <B>control</B> and <B>alt</B>, which means their
corresponding key.
</UL>
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="setcursor">DropSite::<B>setcursor</B></A>
<I>cursor</I>
</DT><DD>
This command can be used within the script <B>dragovercmd</B>. It is usefull to provide
visual effect about the state of the drag.
</DD></DL>
<DL><DT><A NAME="setdrop">DropSite::<B>setdrop</B></A>
<I>path</I>
<I>subpath</I>
<I>dropover</I>
<I>drop</I>
?<I>force</I>?
</DT><DD>
This command provides a simple way to call <B>register</B> during a BWidget creation or
configuration.
<UL>
<LI><I>path</I> is the pathname of the BWidget,
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
<LI><I>dropover</I> is a command for <I>drag-over</I> event,
<LI><I>drop</I> is a command for <I>drop</I> event,
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value
has changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
</UL>
<B>setdrop</B> verifies the modification flag of options <B>dropenabled</B> and
<B>droptypes</B> and calls <B>register</B> if needed according to the options values and
<I>dropover</I> and <I>drop</I> arguments. <B>dropovercmd</B> and <B>dropcmd</B> are not
taken from options of widget because they are considered as user command, called by
BWidget implementation of <I>drag-over</I> and <I>drop</I> events.
</DD></DL>
<DL><DT><A NAME="setoperation">DropSite::<B>setoperation</B></A>
<I>op</I>
</DT><DD>
Description text
</DD></DL>
</BODY></HTML>

View File

@ -1,126 +0,0 @@
<HTML>
<HEAD><TITLE>DynamicHelp</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>DynamicHelp</B>
- Provide help to Tk widget or BWidget
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>DynamicHelp::<A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD>DynamicHelp::<A HREF="#include"><B>include</B></A>
<I>class</I>
<I>type</I>
</DD>
<DD>DynamicHelp::<A HREF="#register"><B>register</B></A>
<I>path</I>
<I>type</I>
?<I>arg...</I>?
</DD>
<DD>DynamicHelp::<A HREF="#sethelp"><B>sethelp</B></A>
<I>path</I>
<I>subpath</I>
?<I>force</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Description text
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="configure">DynamicHelp::<B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command configure the ballon help.
<P>
<DL><DT><A NAME="DynamicHelp-borderwidth"><B>-borderwidth</B></A></DT>
<DD>
Width of the black border around the balloon.
</DD>
</DL>
<DL><DT><A NAME="DynamicHelp-delay"><B>-delay</B></A></DT>
<DD>
Define the delay in millisecond of mouse inactivity before displaying
the balloon.
</DD>
</DL>
<BR>Other standard options are:
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
</TR>
</TABLE></DD>
</DD></DL>
<DL><DT><A NAME="include">DynamicHelp::<B>include</B></A>
<I>class</I>
<I>type</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="register">DynamicHelp::<B>register</B></A>
<I>path</I>
<I>type</I>
?<I>arg...</I>?
</DT><DD>
Register a help text to the widget <I>path</I>.
<I>type</I> determines the type of the help or the type of the widget.
Depending on <I>type</I>, other options must be provided.
<BR>
<TABLE CELLSPACING=5 CELLPADDING=0 BORDER=0>
<TR><TD><B> type </B></TD><TD><B> options </B></TD></TR>
<TR><TD><B><I> balloon </I></B></TD><TD><I> text </I></TD></TR>
<TR><TD><B><I> variable </I></B></TD><TD><I> varName text </I></TD></TR>
<TR><TD><B><I> menu </I></B></TD><TD><I> varName </I></TD></TR>
<TR><TD><B><I> menuentry </I></B></TD><TD><I> index text </I></TD></TR>
</TABLE>
<BR>If one of the option is missing or is empty, help is removed for this widget.
<BR>For type other than <I>balloon</I>, <I>varName</I> is typically a variable
linked to a label.
<BR>For menu, balloon type help is not available. To declare a help for menu,
you first declare the menu, and then entries of this menu.
<BR>For example:
<BR><BR>
<CENTER>
<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
<TR><TD><PRE>
<FONT COLOR=red><I># create menu</I></FONT>
menu .m -type menubar
<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
. configure -menu .m
.m add cascade -label "File" -menu .m.file
menu .m.file
.m.file add command -label "Open..."
.m.file add command -label "Quit"
<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
label .l -textvariable varinfo
<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
DynamicHelp::register .m.file menu varinfo
<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
DynamicHelp::register .m.file menuentry 0 "Detach menu"
DynamicHelp::register .m.file menuentry 1 "Open a file"
DynamicHelp::register .m.file menuentry 2 "Exit demo"
</PRE></TD></TR></TABLE></CENTER>
<BR>
<BR>Notice that if popup menu is owned by a menubar, you must associate first the menubar
to its toplevel. In this case, when you create a menu popup, its clone window is also
created, and DynamicHelp::register detects the exitence of the clone window and maps
events to it.
</DD></DL>
<DL><DT><A NAME="sethelp">DynamicHelp::<B>sethelp</B></A>
<I>path</I>
<I>subpath</I>
?<I>force</I>?
</DT><DD>
Description text
</DD></DL>
</BODY></HTML>

View File

@ -1,340 +0,0 @@
<HTML>
<HEAD><TITLE>Entry</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Entry</B>
- Entry widget with <B>state</B> option, dynamic help and drag and drop facilities
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Entry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-exportselection">-exportselection</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertbackground">-insertbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertborderwidth">-insertborderwidth</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertofftime">-insertofftime</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertontime">-insertontime</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertwidth">-insertwidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectbackground">-selectbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectborderwidth">-selectborderwidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectforeground">-selectforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-editable">-editable</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-show">-show</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
The <B>Entry</B> widget extends the default Tk entry. Options have been added to provide
visual effect depending on the state of the Entry,
<A HREF="DynamicHelp.html">DynamicHelp</A> options,
and <A HREF="DragSite.html">Drag</A> and
<A HREF="DropSite.html">Drop</A>.
Entry behaves much like a Label, with <B>text</B> option to set its contents.
<BR>Tk entry command can also be used on Entry widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command when user press &lt;Return&gt; in the Entry.
</DD>
</DL>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>If <B>dragendcmd</B> is empty, the internal <I>dragend</I> command updates the entry
following the operation (<B>move</B> or <B>copy</B>) and the dragged data
(whole or selected part of the entry).
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Specifies a command to be called when <B>dragevent</B> occurs on widget.
<B>draginitcmd</B> must be a command conforming to the description of the
option <B>draginitcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>if <B>draginitcmd</B> is empty, the command refuse the drag if entry is empty or if
portion of text is selected and event doesn't occur above the selection. In all other cases,
the command returns:
<UL>
<LI>as the data type, the value of option <B>dragtype</B> or <I>TEXT</I> if empty,
<LI>as the operations, <I>{copy move}</I> if <B>state</B> is normal and <B>editable</B>
is true, or <I>{copy}</I> only in other cases,
<LI>as the data, the whole content or the selected portion of the entry.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
Entry has a command wrapper for <I>drop</I> events. This command stops auto scrolling
and extract current position.
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the Entry,
<LI>the pathname of the drag source,
<LI>the numeric index in the entry designated by the cursor,
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
and must return a value conforming to <B>dropcmd</B> option described in
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
If <B>dropcmd</B> is empty, the wrapper updates the entry following the type of data:
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>COLOR</I> or <I>FGCOLOR</I></TD>
<TD>reconfigure the <B>foreground</B> of the Entry</TD>
<TR><TD><I>BGCOLOR</I></TD>
<TD>reconfigure the <B>background</B> of the Entry</TD>
<TR><TD><I>TEXT</I>,<BR>or any other tag</TD>
<TD>reconfigure the Entry to display the associated string.</TD>
</TABLE></DL>
and returns 1.
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
Entry has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
and position extraction during the <I>drag-over</I>.
<BR>If <B>dropovercmd</B> is empty, the wrapper accepts the drop if <B>editable</b> option is
true and <B>state</B> option is normal.
<BR>If <B>dropovercmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the Entry,
<LI>the pathname of the drag source,
<LI>the event,
<LI>the numeric index in the entry designated by the cursor,
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
and must return a value conforming to <B>dropovercmd</B> option described in
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
Default accepts <I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I> and <I>TEXT</I>,
all with <B>copy</B> and <B>move</B> operations.
</DD>
</DL>
<DL><DT><A NAME="-editable"><B>-editable</B></A></DT>
<DD>
Specifies whether the Entry is editable by the user. Equivalent to the <B>state</B> option
of the Tk entry widget.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-show"><B>-show</B></A></DT>
<DD>
If this option is specified, then the true contents of the entry are not displayed in the
window. Instead, each character in the entry's value will be displayed as the first character
in the value of this option, such as ``*''. This is useful, for example, if the entry is to
be used to enter a password. If characters in the entry are selected and copied elsewhere, the
information copied will be what is displayed, not the true contents of the entry.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of two states for the Entry: <B>normal</B> or <B>disabled</B>.
In normal state the text of the Entry is displayed using the <B>foreground</B> option.
In disabled state the text of the Entry is displayed using the <B>disabledforeground</B>
option. If the entry is disabled then the value may not be changed by user input
and no insertion cursor will be displayed, even if the input focus is in the widget.
Disabled state is the same as not editable with visual effect.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies an integer value indicating the desired width of the entry window, in average-size
characters of the widget's font. If the value is less than or equal to zero, the widget picks
a size just large enough to hold its current text.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
</DT><DD>
Calls the command specified by the option <B>-command</B>.
</DD></DL>
</BODY></HTML>

View File

@ -1,331 +0,0 @@
<HTML>
<HEAD><TITLE>Label</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Label</B>
- Label widget with <B>state</B> option, dynamic help and drag and drop facilities
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Label</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-bitmap">-bitmap</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-image">-image</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-wraplength">-wraplength</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-focus">-focus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-name">-name</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-underline">-underline</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
The <B>Label</B> widget extends the default Tk label. Options have been added to provide
visual effect depending on the state of the Label, <A HREF="DynamicHelp.html">DynamicHelp</A> options, and <A HREF="DragSite.html">Drag
</A> and <A HREF="DropSite.html">Drop</A>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Specifies a command to be called when <B>dragevent</B> occurs on widget.
<B>draginitcmd</B> must be a command conforming to the description of the
option <B>draginitcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>If <B>draginitcmd</B> is empty, the internal <B>draginitcmd</B> command is used instead
and returns:
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
<TR><TD valign=top><I>IMAGE&nbsp;{copy}&nbsp;&lt;image&nbsp;name&gt;</I>
<TD>if an image is displayed.
<TR><TD valign=top><I>BITMAP&nbsp;{copy}&nbsp;&lt;bitmap&nbsp;name&gt;</I>
<TD>if a bitmap is displayed.
<TR><TD valign=top><I>TEXT&nbsp;{copy}&nbsp;&lt;text&gt;</I>
<TD>if a text is displayed.
</TABLE></DL>
Note that if <B>dragtype</B> option is not empty, its value is used instead of those above.
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
Specifies a command to be called when drop occurs on the widget.
<B>dropcmd</B> must be a command conforming to the description of the
option <B>dropcmd</B> of <B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
<BR>If <B>dropcmd</B> is empty, the command updates the label following the type of the data:
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>COLOR</I> or <I>FGCOLOR</I></TD>
<TD>reconfigure the <B>foreground</B> of the Label.</TD>
<TR><TD><I>BGCOLOR</I></TD>
<TD>reconfigure the <B>background</B> of the Label.</TD>
<TR><TD><I>IMAGE</I></TD>
<TD>reconfigure the Label to display the associated image.</TD>
<TR><TD><I>BITMAP</I></TD>
<TD>reconfigure the Label to display the associated bitmap.
<B>image</B> option is set to empty.</TD>
<TR><TD><I>TEXT</I>,<BR>or any other tag</TD>
<TD>reconfigure the Label to display the associated string.
<B>image</B> and <B>bitmap</B> options are set to empty.</TD>
</TABLE></DL>
and returns 1.
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
Specifies a command to be called when drag icon is over the widget.
<B>dropovercmd</B> must be a command conforming to the description of the
option <B>dropovercmd</B> of <B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
<BR>If <B>dropovercmd</B> is empty, Label always accepts the drop if data type is
<I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I>, and accepts all other data type only if
<B>state</B> is normal.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
Default accepts <I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I>, <I>TEXT</I>, <I>BITMAP</I>
and <I>IMAGE</I>, all with <B>copy</B> and <B>move</B> operations.
</DD>
</DL>
<DL><DT><A NAME="-focus"><B>-focus</B></A></DT>
<DD>
Specifies a pathname to set the focus on for Label::<B>setfocus</B> command.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the label.
If an image or bitmap is being displayed in the label then the value is in
screen units, for text it is in lines of text.
If this option isn't specified, the label's desired height is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-name"><B>-name</B></A></DT>
<DD>
Specifies a standard name for the label. If the option <B>*<I>name</I>Name</B> is
found in the resource database, then <B>text</B> and <B>underline</B> options
are extracted from its value.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of two states for the Label: <B>normal</B> or <B>disabled</B>.
In normal state the text of the Label is displayed using the <B>foreground</B> option.
In disabled state the text of the Label is displayed using the <B>disabledforeground</B> option.
</DD>
</DL>
<DL><DT><A NAME="-underline"><B>-underline</B></A></DT>
<DD>
Specifies the integer index of a character to underline in the label.
0 corresponds to the first character of the text displayed, 1 to the next character,
and so on.
<BR>The binding <B>&lt;Alt-<I>char</I>&gt;</B> is automatically set on the toplevel
of the Label to call Label::<B>setfocus</B>.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies a desired width for the label.
If an image or bitmap is being displayed in the label then the value is in
screen units, for text it is in characters.
If this option isn't specified, the label's desired width is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
</DT><DD>
Set the focus on the pathname given by <B>-focus</B> option if <B>-state</B> is <I>normal</I>.
</DD></DL>
</BODY></HTML>

View File

@ -1,194 +0,0 @@
<HTML>
<HEAD><TITLE>LabelEntry</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>LabelEntry</B>
-
LabelFrame containing an Entry widget.
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>LabelEntry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
<TD>&nbsp;&nbsp;-command</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-dragenabled</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
<TD>&nbsp;&nbsp;-dragevent</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-draginitcmd</TD>
<TD>&nbsp;&nbsp;-dragtype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropcmd</TD>
<TD>&nbsp;&nbsp;-dropenabled</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropovercmd</TD>
<TD>&nbsp;&nbsp;-droptypes</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-editable</TD>
<TD>&nbsp;&nbsp;-entrybg (see <B>-background</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entryfg (see <B>-foreground</B>)</TD>
<TD>&nbsp;&nbsp;-exportselection</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-font</TD>
<TD>&nbsp;&nbsp;-helptext</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-helpvar</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
<TD>&nbsp;&nbsp;-insertbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
<TD>&nbsp;&nbsp;-insertofftime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertontime</TD>
<TD>&nbsp;&nbsp;-insertwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-justify</TD>
<TD>&nbsp;&nbsp;-relief</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectbackground</TD>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectforeground</TD>
<TD>&nbsp;&nbsp;-show</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-takefocus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-text</TD>
<TD>&nbsp;&nbsp;-textvariable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-width</TD>
<TD>&nbsp;&nbsp;-xscrollcommand</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="LabelFrame.html">OPTIONS from <B>LabelFrame</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-helptext</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-helpvar</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-label (see <B>-text</B>)</TD>
<TD>&nbsp;&nbsp;-labelanchor (see <B>-anchor</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelfont (see <B>-font</B>)</TD>
<TD>&nbsp;&nbsp;-labelheight (see <B>-height</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labeljustify (see <B>-justify</B>)</TD>
<TD>&nbsp;&nbsp;-labelwidth (see <B>-width</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-name</TD>
<TD>&nbsp;&nbsp;-padx</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-pady</TD>
<TD>&nbsp;&nbsp;-side</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-underline</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
LabelEntry is a widget composed of <A HREF="LabelFrame.html">LabelFrame</A> widget
containing an <A HREF="Entry.html">Entry</A> widget.
Tk entry command can also be used on LabelEntry widget.
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
?<I>arg...</I>?
</DT><DD>
Set bindings on the entry widget.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

View File

@ -1,139 +0,0 @@
<HTML>
<HEAD><TITLE>LabelFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>LabelFrame</B>
- Frame with a Label
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>LabelFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Label.html">OPTIONS from <B>Label</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-anchor</TD>
<TD>&nbsp;&nbsp;-background or -bg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-focus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-font</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-height</TD>
<TD>&nbsp;&nbsp;-helptext</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-helpvar</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-justify</TD>
<TD>&nbsp;&nbsp;-name</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-text</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-underline</TD>
<TD>&nbsp;&nbsp;-width</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD>LabelFrame::<A HREF="#align"><B>align</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
LabelFrame enables user to create a frame with a
<A HREF="Label.html">Label</A> positionned at any side.
LabelFrame is used by <A HREF="ComboBox.html">ComboBox</A>
and <A HREF="SpinBox.html">SpinBox</A>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies where to position the Label relative to the user frame: <B>top</B>, <B>bottom</B>, <B>left</B> or <B>right</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="align">LabelFrame::<B>align</B></A>
?<I>arg...</I>?
</DT><DD>
This command align label of all widget given by <I>args</I> of class LabelFrame
(or "derived") by setting their width to the max one +1
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the frame where the user can create any other widget.
</DD></DL>
</BODY></HTML>

View File

@ -1,608 +0,0 @@
<HTML>
<HEAD><TITLE>ListBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ListBox</B>
- ListBox widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ListBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectbackground">-selectbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectforeground">-selectforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltax">-deltax</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltay">-deltay</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovermode">-dropovermode</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-multicolumn">-multicolumn</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-redraw">-redraw</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bindImage"><B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#bindText"><B>bindText</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#edit"><B>edit</B></A>
<I>item</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DD>
<DD><I>pathName</I> <A HREF="#exists"><B>exists</B></A>
<I>item</I>
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>item</I>
</DD>
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
<I>index</I>
<I>item</I>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#item"><B>item</B></A>
<I>first</I>
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>item</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>item</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#items"><B>items</B></A>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
<I>item</I>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#reorder"><B>reorder</B></A>
<I>neworder</I>
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>item</I>
</DD>
<DD><I>pathName</I> <A HREF="#selection"><B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
<B>ListBox</B> widget uses canvas to display a list of items.
Each item is composed of a label with its own font and foreground attributes, and an optional
image or window. Each item is drawn in a single line, whose height is defined by the
<B>deltay</B> option, so they must have at most this height.
A item is uniquely identified by a string given at creation (by the
<B>insert</B> command). The ListBox can have one or more columns, depending on
<B>multicolumn</B> option. The user do not handle columns; the number of columns
is determined following the height of the ListBox in order to see each item vertically.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT>
<DD>
Specifies horizontal pad between each columns.
</DD>
</DL>
<DL><DT><A NAME="-deltay"><B>-deltay</B></A></DT>
<DD>
Specifies vertical size of the items.
</DD>
</DL>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
ListBox has a command wrapper for <I>drag-init</I> events. This command refused the drag
if no item is designated. In other cases:
<BR>If <B>draginitcmd</B> is empty, it returns:
<UL>
<LI>the value of option <B>dragtype</B> or <I>LISTBOX_ITEM</I> if empty as the data type,
<LI><I>{move copy link}</I> as the operations,
<LI>the item identifier as the data.
</UL>
If <B>draginitcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the listbox,
<LI>the identifier of the dragged item,
<LI>the toplevel created to represent dragged data.
</UL>
and must return a value conforming to <B>draginitcmd</B> option described in
<B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
ListBox has a command wrapper for <I>drop</I> events. This command stops auto scrolling
and extract item and position.
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the listbox,
<LI>the pathname of the drag source,
<LI>a list describing where the drop occurs. It can be:
<UL>
<LI><I>{</I><B>widget</B><I>}</I>,
<LI><I>{</I><B>item</B> <I>item}</I> or
<LI><I>{</I><B>position</B> <I>index}</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
LsitBox has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
and position extraction during the <I>drag-over</I>.
If <B>dropovercmd</B> is not empty, the command is called with the following aguments:
<UL>
<LI>the pathname of the listbox,
<LI>the pathname of the drag source,
<LI>a list describing where the drop can occur, whose elements are:
<UL>
<LI>the string <I>widget</I> if <B>dropovertype</B> option contains <I>w</I>, else empty string.
<LI>the targeted item if drag icon points an item and <B>dropovertype</B> option contains
<I>i</I>, else empty string.
<LI>an index within two items where drag icon points to if <B>dropovertype</B> option
contains <I>p</I>, else empty string.
<LI>optionally, the preferred method if drop can occur both inside an item and between two
items. The value is <I>position</I> or <I>item</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
The command must return a list with two elements:
<UL>
<LI>the drop status, conforming to those described in <B>dropovercmd</B> option of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>,
<LI>the choosen method: <I>widget</I>, <I>item</I> or <I>position</I>.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropovermode"><B>-dropovermode</B></A></DT>
<DD>
Specifies the type of <I>drop-over</I> interaction. Must be a combination of
<B>w</B>, which specifies that drop can occurs everywhere on widget,
<B>p</B>, which specifies that drop can occurs between two items,
and <B>i</B>, which specifies that drop occurs inside items.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
<BR>Default is <I>LISTBOX_ITEM</I> with operations <B>copy</B> and <B>move</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the listbox in units of <B>deltay</B> pixels.
</DD>
</DL>
<DL><DT><A NAME="-multicolumn"><B>-multicolumn</B></A></DT>
<DD>
Specifies wether or not ListBox layouts items in order to see each one vertically.
</DD>
</DL>
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
<DD>
Specifies distance between image or window and text of the items.
</DD>
</DL>
<DL><DT><A NAME="-redraw"><B>-redraw</B></A></DT>
<DD>
Specifies wether or not the listbox should be redrawn when entering idle.
Set it to false if you call <B>update</B> while modifying the listbox.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the listbox in units of 8 pixels.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bindImage"><I>pathName</I> <B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the image of a item.
The item idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="bindText"><I>pathName</I> <B>bindText</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the label of a item.
The item idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
?<I>arg...</I>?
</DT><DD>
Deletes all items in <I>arg</I>. <I>arg</I> can be a list
of items or a list of list of items.
To delete all items, do <I>$pathName delete [$pathName items]</I>.
</DD></DL>
<DL><DT><A NAME="edit"><I>pathName</I> <B>edit</B></A>
<I>item</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DT><DD>
Provides a way for the user to edit in place the label of an item.
<BR>The command takes the initial text as argument and does not modify the label of the
edited node, but returns an empty string if edition is canceled, or the typed text
if edition is accepted.
<BR>When editing, the user can cancel by pressing Escape, or accept by pressing Return.
<BR><I>clickres</I> specifies what to do if the user click outside the editable area.
If <I>clickres</I> is 0 (the default), the edition is canceled.
If <I>clickres</I> is 1, the edition is accepted.
In all other case, the edition continues.
<BR>If edition is accepted and <I>modifycmd</I> is not empty, then it is called with
the new text as argument and must return 1 to accept the new text, 0 to refuse it
and continue edition.
<BR><I>select</I> specifies wether or not the initial text should be selected. Default is 1.
</DD></DL>
<DL><DT><A NAME="exists"><I>pathName</I> <B>exists</B></A>
<I>item</I>
</DT><DD>
Returns 1 if <I>item</I> exists in the listbox, else 0.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>item</I>
</DT><DD>
Returns the position of <I>item</I> in the list.
</DD></DL>
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
<I>index</I>
<I>item</I>
?<I>option value...</I>?
</DT><DD>
Inserts a new item identified by <I>item</I> in the list at position <I>index</I>.
<P>
<DL><DT><A NAME="Item-data"><B>-data</B></A></DT>
<DD>
User data associated to the item.
</DD>
</DL>
<DL><DT><A NAME="Item-fill"><B>-fill</B></A></DT>
<DD>
Specifies the foreground color of the label of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-font"><B>-font</B></A></DT>
<DD>
Specifies a font for the label of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-image"><B>-image</B></A></DT>
<DD>
Specifies an image to display at the left of the label of the item.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
<DL><DT><A NAME="Item-indent"><B>-indent</B></A></DT>
<DD>
Specifies the amount of extra space in pixels at the left of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-text"><B>-text</B></A></DT>
<DD>
Specifies the label of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-window"><B>-window</B></A></DT>
<DD>
Specifies a pathname to display at the left of the label of the item.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="item"><I>pathName</I> <B>item</B></A>
<I>first</I>
?<I>last</I>?
</DT><DD>
<B>Its use is deprecated. Use <I>items</I> instead.</B><BR>
If <I>last</I> is omitted, returns the item at index <I>first</I> in the list,
or an empty string if <I>first</I> refers to a non-existent element.
If <I>last</I> is specified, the command returns a list whose elements are all
of the items between <I>first</I> and <I>last</I>, inclusive.
Both <I>first</I> and <I>last</I> may have any of the standard forms for indices.
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>item</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>item</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="items"><I>pathName</I> <B>items</B></A>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
If <I>first</I> and <I>last</I> are omitted, returns the list of all items.
If <I>first</I> is specified and <I>last</I> omitted, returns the item at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the items between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
<I>item</I>
<I>index</I>
</DT><DD>
Moves <I>item</I> at position <I>index</I> in the list.
</DD></DL>
<DL><DT><A NAME="reorder"><I>pathName</I> <B>reorder</B></A>
<I>neworder</I>
</DT><DD>
Modifies the order of items in the listbox given by <I>neworder</I>. Items that do not
appear in <I>neworder</I> are no moved.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>item</I>
</DT><DD>
Arrange the scrolling area to make <I>item</I> visible.
</DD></DL>
<DL><DT><A NAME="selection"><I>pathName</I> <B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DT><DD>
Modifies the list of selected items following <I>cmd</I>:
<DL>
<DT><B>clear</B>
<DD>remove all items of the selection.
<DT><B>set</B>
<DD>set the selection to all items in <I>arg</I>
<DT><B>add</B>
<DD>add all items of <I>arg</I> in the selection
<DT><B>remove</B>
<DD>remove all items of <I>arg</I> of the selection
<DT><B>get</B>
<DD>return the current selected items
</DL>
</DD></DL>
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable horizontal scrolling of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable vertical scrolling of <I>pathName</I>.
</DD></DL>
</BODY></HTML>

View File

@ -1,283 +0,0 @@
<HTML>
<HEAD><TITLE>MainFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>MainFrame</B>
- Manage toplevel with menu, toolbar and statusbar
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>MainFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ProgressBar.html">OPTIONS from <B>ProgressBar</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-progressfg (see <B>-foreground</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-progressmax (see <B>-maximum</B>)</TD>
<TD>&nbsp;&nbsp;-progresstype (see <B>-type</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-progressvar (see <B>-variable</B>)</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-menu">-menu</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-separator">-separator</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-textvariable">-textvariable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#addindicator"><B>addindicator</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#addtoolbar"><B>addtoolbar</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#getindicator"><B>getindicator</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#getmenu"><B>getmenu</B></A>
<I>menuid</I>
</DD>
<DD><I>pathName</I> <A HREF="#gettoolbar"><B>gettoolbar</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#setmenustate"><B>setmenustate</B></A>
<I>tag</I>
<I>state</I>
</DD>
<DD><I>pathName</I> <A HREF="#showstatusbar"><B>showstatusbar</B></A>
<I>name</I>
</DD>
<DD><I>pathName</I> <A HREF="#showtoolbar"><B>showtoolbar</B></A>
<I>index</I>
<I>bool</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
MainFrame manage toplevel to have:<BR>
<UL>
<LI>simple menu creation, with automatic accelerator bindings and
<A HREF="DynamicHelp.html">DynamicHelp</A> association,
<LI>one or more toolbar that user can hide,
<LI>a status bar, displaying a user message or a menu description, and optionnaly a
<A HREF="ProgressBar.html">ProgressBar</A>.
</UL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the user frame in any of the forms acceptable to
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
will not request any size at all.
</DD>
</DL>
<DL><DT><A NAME="-menu"><B>-menu (read-only)</B></A></DT>
<DD>
This option describes the menu. This is a list whose each five elements describe
one cascad menu. It has the following form:
{<I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>...}
where <I>menuentries</I> is a list where each element describe one menu entry, which can be:
<UL>
<LI>for a separator:<BR>
{<B>separator</B>}
<LI>for a command:<BR>
{<B>command</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}
<LI>for a check button:<BR>
{<B>checkbutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}
<LI>for a radio button:<BR>
{<B>radiobutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I> ?<I>option</I> <I>value</I>? ...}
<LI>for a cascad menu:<BR>
{<B>cascad</B> <I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>}
</UL>
where:
<UL>
<LI><I>menuname</I> is the name of the menu. If it contains a &amp;, the following character
is automatically converted to the corresponding <B>-underline</B> option of <B>menu add</B>
command.
<LI><I>tags</I> is the tags list for the entry, used for enabling or disabling menu
entries with <B>MainFrame::setmenustate</B>.
<LI><I>menuId</I> is an id for the menu, from which you can get menu pathname with
<B>MainFrame::getmenu</B>.
<LI><I>tearoff</I> specifies if menu has tearoff entry.
<LI><I>description</I> specifies a string for <A HREF=\"DynamicHelp.html\">DynamicHelp</A>.
<LI><I>accelerator</I> specifies a key sequence. It is a list of two elements, where the first
is one of <B>Ctrl</B>, <B>Alt</B> or <B>CtrlAlt</B>, and the second as letter or a digit.
An accelerator string is build and corresponding binding set on the toplevel to invoke the
menu entry.
<LI><I>option value</I> specifies additionnal options for the entry (see <B>menu add</B>
command).
</UL>
Each value enclosed by ? are optional and defaulted to empty string, but must be
provided if one or more following options is not empty.
<BR>Example:
<PRE>
set descmenu {
"&File" {} {} 0 {
{command "&New" {} "Create a new document" {Ctrl n} -command Menu::new}
{command "&Open..." {} "Open an existing document" {Ctrl o} -command Menu::open}
{command "&Save" open "Save the document" {Ctrl s} -command Menu::save}
{cascad "&Export" {} export 0 {
{command "Format &1" open "Export document to format 1" {} -command {Menu::export 1}}
{command "Format &2" open "Export document to format 2" {} -command {Menu::export 2}}
}}
{separator}
{cascad "&Recent files" {} recent 0 {}}
{separator}
{command "E&xit" {} "Exit the application" {} -command Menu::exit}
}
"&Options" {} {} 0 {
{checkbutton "Toolbar" {} "Show/hide toolbar" {}
-variable Menu::_drawtoolbar
-command {$Menu::_mainframe showtoolbar toolbar $Menu::_drawtoolbar}
}
}
}
</PRE>
</DD>
</DL>
<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
<DD>
Specifies if separator should be drawn at the top and/or at the bottom of the user window.
Must be one of the values <B>none</B>, <B>top</B>, <B>bottom</B> or <B>both</B>.
It depends on the relief of subwidgets of user window.
</DD>
</DL>
<DL><DT><A NAME="-textvariable"><B>-textvariable</B></A></DT>
<DD>
Specifies the textvariable option for the label of the status bar.
<A HREF="DynamicHelp.html">DynamicHelp</A> description
of menu entries are mapped to this variable at the creation of the MainFrame.
If this variable is changed by MainFrame::configure, menu description will
not be available.
<BR>You change the text of the label by modifying the value of the variable.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the user frame in any of the forms acceptable to
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
will not request any size at all.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="addindicator"><I>pathName</I> <B>addindicator</B></A>
?<I>arg...</I>?
</DT><DD>
Add an indicator box at the right of the status bar. Each indicator are added from left
to right. An indicator is a Tk label widget configured with option-value pair
given by ?<I>arg...</I>?. <B>-relief</B> and <B>-borderwidth</B> options are respetively
defaulted to <I>sunken</I> and 1. Returns the pathname of the created label.
</DD></DL>
<DL><DT><A NAME="addtoolbar"><I>pathName</I> <B>addtoolbar</B></A>
</DT><DD>
Add a toolbar to the MainFrame. Returns the pathname of the new window where to place
toolbar items.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Returns the pathname of the user window.
</DD></DL>
<DL><DT><A NAME="getindicator"><I>pathName</I> <B>getindicator</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added indicator.
</DD></DL>
<DL><DT><A NAME="getmenu"><I>pathName</I> <B>getmenu</B></A>
<I>menuid</I>
</DT><DD>
Returns the pathname of the menu whose id is <I>menuid</I>.
</DD></DL>
<DL><DT><A NAME="gettoolbar"><I>pathName</I> <B>gettoolbar</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added toolbar.
</DD></DL>
<DL><DT><A NAME="setmenustate"><I>pathName</I> <B>setmenustate</B></A>
<I>tag</I>
<I>state</I>
</DT><DD>
Set the <B>-state</B> option value of all the menu entries that have the tag <I>tag</I>
to <I>state</I>.
</DD></DL>
<DL><DT><A NAME="showstatusbar"><I>pathName</I> <B>showstatusbar</B></A>
<I>name</I>
</DT><DD>
<I>name</I> is one of <B>none</B>, <B>status</B> or <B>progression</B>.
Use <B>none</B> to hide the status bar, <B>status</B> to display the label only, or
<B>progression</B> to display the label and the
<A HREF="ProgressBar.html">ProgressBar</A>.
</DD></DL>
<DL><DT><A NAME="showtoolbar"><I>pathName</I> <B>showtoolbar</B></A>
<I>index</I>
<I>bool</I>
</DT><DD>
Hide if <I>bool</I> is 0, or show if <I>bool</I> is 1 the <I>index</I>th added toolbar.
To prevent your toplevel from resizing while hiding/showing toolbar,
do [wm geometry $top [wm geometry $top]] when it is managed.
</DD></DL>
</BODY></HTML>

View File

@ -1,208 +0,0 @@
<HTML>
<HEAD><TITLE>MessageDlg</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>MessageDlg</B>
- Message dialog box
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>MessageDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-cancel</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-default</TD>
<TD>&nbsp;&nbsp;-parent</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-aspect">-aspect</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-buttons">-buttons</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-icon">-icon</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-justify">-justify</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-message">-message</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
MessageDlg provides a simple way to display a message dialog.
MessageDlg::<B>create</B> creates the message dialog, displays
it and return the index of the pressed button, or -1 if it is destroyed.
When returning, the dialog no longer exists.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-aspect"><B>-aspect</B></A></DT>
<DD>
Specifies a non-negative integer value indicating desired
aspect ratio for the text. The aspect ratio is specified as
100*width/height. 100 means the text should
be as wide as it is tall, 200 means the text should
be twice as wide as it is tall, 50 means the text should
be twice as tall as it is wide, and so on.
Used to choose line length for text if <B>width</B> option
isn't specified.
Defaults to 150.
</DD>
</DL>
<DL><DT><A NAME="-buttons"><B>-buttons</B></A></DT>
<DD>
Specifies a list of buttons to display when <B>type</B> option is <I>user</I>.
If a button has a symbolic name, its associated text will be displayed.
</DD>
</DL>
<DL><DT><A NAME="-icon"><B>-icon</B></A></DT>
<DD>
Specifies an icon to display. Must be one of the following: <B>error</B>, <B>info</B>,
<B>question</B> or <B>warning</B>.
</DD>
</DL>
<DL><DT><A NAME="-justify"><B>-justify</B></A></DT>
<DD>
Specifies how to justify lines of text.
Must be one of <B>left</B>, <B>center</B>, or <B>right</B>. Defaults
to <B>left</B>.
This option works together with the <B>anchor</B>, <B>aspect</B>,
<B>padx</B>, <B>pady</B>, and <B>width</B> options to provide a variety
of arrangements of the text within the window.
The <B>aspect</B> and <B>width</B> options determine the amount of
screen space needed to display the text.
The <B>anchor</B>, <B>padx</B>, and <B>pady</B> options determine where this
rectangular area is displayed within the widget's window, and the
<B>justify</B> option determines how each line is displayed within that
rectangular region.
For example, suppose <B>anchor</B> is <B>e</B> and <B>justify</B> is
<B>left</B>, and that the message window is much larger than needed
for the text.
The the text will displayed so that the left edges of all the lines
line up and the right edge of the longest line is <B>padx</B> from
the right side of the window; the entire text block will be centered
in the vertical span of the window.
</DD>
</DL>
<DL><DT><A NAME="-message"><B>-message</B></A></DT>
<DD>
Specifies the message to display in this message box.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Specifies a string to display as the title of the message box.
If the value is empty (the default), a default title will be set corresponding
to the <B>icon</B> option.
The default associated title is in english, and can be modified to set it in
another language by specifying the resource:
<PRE> *MessageDlg.<I>name</I>Title: <I>value</I></PRE>
or the equivalent tcl command:
<PRE> option add *MessageDlg.<I>name</I>Title <I>value</I></PRE>
where <I>name</I> is the name of an icon as defined in the <B>icon</B> option.
<BR>For example, for french language, you can specify for a warning dialog:
<PRE> option add *MessageDlg.warningTitle "Attention"</PRE>
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies a set of buttons to be displayed. The following values are possible:
<DD>
<P>
<DL COMPACT>
<DT>
<B>abortretryignore</B>
<DD>
Displays three buttons whose symbolic names are <B>abort</B>,
<B>retry</B> and <B>ignore</B>.<P>
<DT>
<B>ok</B>
<DD>
Displays one button whose symbolic name is <B>ok</B>.<P>
<DT>
<B>okcancel</B>
<DD>
Displays two buttons whose symbolic names are <B>ok</B> and <B>cancel</B>.<P>
<DT>
<B>retrycancel</B>
<DD>
Displays two buttons whose symbolic names are <B>retry</B> and <B>cancel</B>.<P>
<DT>
<B>yesno</B>
<DD>
Displays two buttons whose symbolic names are <B>yes</B> and <B>no</B>.<P>
<DT>
<B>yesnocancel</B>
<DD>
Displays three buttons whose symbolic names are <B>yes</B>, <B>no</B>
and <B>cancel</B>.
<P>
<DT>
<B>user</B>
<DD>
Displays buttons of <B>-buttons</B> option.<P>
<DT>
</DL COMPACT>
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the length of lines in the window.
If this option has a value greater than zero then the <B>aspect</B>
option is ignored and the <B>width</B> option determines the line
length.
If this option has a value less than or equal to zero, then
the <B>aspect</B> option determines the line length.
</DD>
</DL>
</BODY></HTML>

View File

@ -1,343 +0,0 @@
<HTML>
<HEAD><TITLE>NoteBook</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>NoteBook</B>
- Notebook manager widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>NoteBook</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-activebackground</TD>
<TD>&nbsp;&nbsp;-activeforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-repeatdelay</TD>
<TD>&nbsp;&nbsp;-repeatinterval</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bindtabs"><B>bindtabs</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#compute_size"><B>compute_size</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
<I>page</I>
?<I>destroyframe</I>?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
<I>index</I>
<I>page</I>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>page</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>page</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
<I>page</I>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#page"><B>page</B></A>
<I>first</I>
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#pages"><B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#raise"><B>raise</B></A>
?<I>page</I>?
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>page</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
NoteBook widget manage a set of pages and displays one of them.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call NoteBook::<B>compute_size</B> to make NoteBook larger
enough to contains the largest page.
</DD>
</DL>
<DL><DT><A NAME="-homogeneous"><B>-homogeneous</B></A></DT>
<DD>
Specifies wether or not the label of the pages must have the same width.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies the side where to place the label of the pages. Must be one
of <B>top</B> or <B>bottom</B>.
Only <B>top</B> is implemented for the moment.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call NoteBook::<B>compute_size</B> to make NoteBook larger
enough to contains the largest page.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bindtabs"><I>pathName</I> <B>bindtabs</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on a tabs. The page idenfier on which
the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="compute_size"><I>pathName</I> <B>compute_size</B></A>
</DT><DD>
This command can be called to make the NoteBook large enough to contain the largest page.
Note that if all pages use -createcmd, they will have no requested size.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
<I>page</I>
?<I>destroyframe</I>?
</DT><DD>
Deletes the page <I>page</I>. If <I>destroyframe</I> is 1 (the default), the frame
associated to <I>page</I> is destroyed. If <I>destroyframe</I> is 0, the frame is not
destroyed and is reused by further call to <B>insert</B> with the same <I>page</I>.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
<I>page</I>
</DT><DD>
Returns the pathname of the page <I>page</I>.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>page</I>
</DT><DD>
Return the numerical index corresponding to the item.
</DD></DL>
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
<I>index</I>
<I>page</I>
?<I>option value...</I>?
</DT><DD>
Insert a new page idendified by <I>page</I> at position <I>index</I> in the pages list.
<I>index</I> must be numeric or <B>end</B>. The pathname of the new page is returned.
<P>
<DL><DT><A NAME="Page-createcmd"><B>-createcmd</B></A></DT>
<DD>
Specifies a command to be called the first time the page is raised.
</DD>
</DL>
<DL><DT><A NAME="Page-image"><B>-image</B></A></DT>
<DD>
Specifies an image to display for the page at the left of the label
</DD>
</DL>
<DL><DT><A NAME="Page-leavecmd"><B>-leavecmd</B></A></DT>
<DD>
Specifies a command to be called when a page is about to be leaved.
The command must return 0 if the page can not be leaved, or 1 if it can.
</DD>
</DL>
<DL><DT><A NAME="Page-raisecmd"><B>-raisecmd</B></A></DT>
<DD>
Specifies a command to be called each time the page is raised.
</DD>
</DL>
<DL><DT><A NAME="Page-state"><B>-state</B></A></DT>
<DD>
Specifies the state of the page. Must be <B>normal</B> or <B>disabled</B>.
</DD>
</DL>
<DL><DT><A NAME="Page-text"><B>-text</B></A></DT>
<DD>
Specifies a label to display for the page.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>page</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>page</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
<I>page</I>
<I>index</I>
</DT><DD>
Moves <I>page</I> tab to index <I>index</I>.
</DD></DL>
<DL><DT><A NAME="page"><I>pathName</I> <B>page</B></A>
<I>first</I>
?<I>last</I>?
</DT><DD>
<B>Its use is deprecated. Use <I>pages</I> instead.</B><BR>
If <I>last</I> is omitted, returns the page at index <I>first</I>, or an empty string if
<I>first</I> refers to a non-existent element. If <I>last</I> is specified, the command
returns a list whose elements are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="pages"><I>pathName</I> <B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
If <I>first</I> and <I>last</I> are omitted, returns the list of all pages.
If <I>first</I> is specified and <I>last</I> omitted, returns the page at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="raise"><I>pathName</I> <B>raise</B></A>
?<I>page</I>?
</DT><DD>
Raise the page <I>page</I>, or return the raised page if <I>page</I> is omitted.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>page</I>
</DT><DD>
Scrolls labels to make the label of the page <I>page</I> visible.
</DD></DL>
</BODY></HTML>

View File

@ -1,174 +0,0 @@
<HTML>
<HEAD><TITLE>PagesManager</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>PagesManager</B>
- Pages manager widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>PagesManager</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#compute_size"><B>compute_size</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#page"><B>page</B></A>
<I>first</I>
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#pages"><B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#raise"><B>raise</B></A>
?<I>page</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
PagesManager widget manage a set of pages and displays one of them.
PagesManager does not provide any user access method, as NoteBook does,
so it can be done through a listbox, a menu, radiobutton, or whatever.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call PagesManager::<B>compute_size</B> to make PagesManager
larger enough to contains the largest page.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call PagesManager::<B>compute_size</B> to make PagesManager
larger enough to contains the largest page.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
<I>page</I>
</DT><DD>
Add a new page idendified by <I>page</I>. The pathname of the new page
is returned.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="compute_size"><I>pathName</I> <B>compute_size</B></A>
</DT><DD>
This command can be called to make the PagesManager large enough to contain the largest page.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
<I>page</I>
</DT><DD>
Deletes the page <I>page</I>.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
<I>page</I>
</DT><DD>
Returns the pathname of the page <I>page</I>.
</DD></DL>
<DL><DT><A NAME="page"><I>pathName</I> <B>page</B></A>
<I>first</I>
?<I>last</I>?
</DT><DD>
<B>Its use is deprecated. Use <I>pages</I> instead.</B><BR>
If <I>last</I> is omitted, returns the page at index <I>first</I>, or an empty string if
<I>first</I> refers to a non-existent element. If <I>last</I> is specified, the command
returns a list whose elements are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="pages"><I>pathName</I> <B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
If <I>first</I> and <I>last</I> are omitted, returns the list of all pages.
If <I>first</I> is specified and <I>last</I> omitted, returns the page at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="raise"><I>pathName</I> <B>raise</B></A>
?<I>page</I>?
</DT><DD>
Raise the page <I>page</I>, or return the raised page if <I>page</I> is omitted.
</DD></DL>
</BODY></HTML>

View File

@ -1,130 +0,0 @@
<HTML>
<HEAD><TITLE>PanedWindow</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>PanedWindow</B>
- Tiled layout manager widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>PanedWindow</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-pad">-pad</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
PanedWindow is a widget that lays out children in
a vertically or horizontally tiled format.
The user can adjust the size of the panes, with a pane control sash created
between children.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-pad"><B>-pad (read-only)</B></A></DT>
<DD>
Specifies additional space between the button of the sash and children.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies the side of the sash, which implies the layout: <B>top</B> or <B>bottom</B>
(horizontal layout), <B>left</B> or <B>right</B> (vertical layout).
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width (read-only)</B></A></DT>
<DD>
Specifies the width of the button of the sash.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
?<I>option value...</I>?
</DT><DD>
This command add a new pane. The new pane is placed below the previous pane for vertical
layout or at right for horizontal layout. This command returns a frame where user can place
its widget. Valid options are:
<P>
<DL><DT><A NAME="Pane-minsize"><B>-minsize</B></A></DT>
<DD>
Specifies the minimum size requested for the pane.
See the <B>grid</B> command for more information.
</DD>
</DL>
<DL><DT><A NAME="Pane-weight"><B>-weight</B></A></DT>
<DD>
Specifies the relative weight for apportioning any extra spaces among panes.
See the <B>grid</B> command for more information.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added pane.
</DD></DL>
</BODY></HTML>

View File

@ -1,214 +0,0 @@
<HTML>
<HEAD><TITLE>PasswdDlg</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>PasswdDlg</B>
- Login/Password dialog box
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>PasswdDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-anchor</TD>
<TD>&nbsp;&nbsp;-background or -bg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-homogeneous</TD>
<TD>&nbsp;&nbsp;-modal</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-parent</TD>
<TD>&nbsp;&nbsp;-spacing</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-title</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="LabelEntry.html">OPTIONS from <B>LabelEntry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-entrybg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entryfg</TD>
<TD>&nbsp;&nbsp;-exportselection</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-font</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertbackground</TD>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertofftime</TD>
<TD>&nbsp;&nbsp;-insertontime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertwidth</TD>
<TD>&nbsp;&nbsp;-labelanchor</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelfont</TD>
<TD>&nbsp;&nbsp;-labelheight</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labeljustify</TD>
<TD>&nbsp;&nbsp;-labelwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-loginhelptext (see <B>-helptext</B>)</TD>
<TD>&nbsp;&nbsp;-loginhelpvar (see <B>-helpvar</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-loginlabel (see <B>-label</B>)</TD>
<TD>&nbsp;&nbsp;-logintext (see <B>-text</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-logintextvariable (see <B>-textvariable</B>)</TD>
<TD>&nbsp;&nbsp;-loginunderline (see <B>-underline</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdeditable (see <B>-editable</B>)</TD>
<TD>&nbsp;&nbsp;-passwdhelptext (see <B>-helptext</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdhelpvar (see <B>-helpvar</B>)</TD>
<TD>&nbsp;&nbsp;-passwdlabel (see <B>-label</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdstate (see <B>-state</B>)</TD>
<TD>&nbsp;&nbsp;-passwdtext (see <B>-text</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdtextvariable (see <B>-textvariable</B>)</TD>
<TD>&nbsp;&nbsp;-passwdunderline (see <B>-underline</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-relief</TD>
<TD>&nbsp;&nbsp;-selectbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
<TD>&nbsp;&nbsp;-selectforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
PasswdDlg provides a simple way to display a login/password dialog.
PasswdDlg::<B>create</B> creates the dialog, displays it, and return the value of login
and password in a list, or an empty list if it is destroyed or user press cancel.
When returning, the dialog no longer exists.
<BR>Additionnal resources can be set to modify other text:
<PRE>
*loginName Label for login LabelEntry
*passwordName Label for password LabelEntry
</PRE>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command to call when user press ok button.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies a set of buttons to be displayed. The following values are possible:
<DD>
<P>
<DL COMPACT>
<DT>
<B>ok</B>
<DD>
Displays one button whose symbolic name is <B>ok</B>.<P>
<DT>
<B>okcancel</B>
<DD>
Displays two buttons whose symbolic names are <B>ok</B> and <B>cancel</B>.<P>
</DL COMPACT>
</DD>
</DL>
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<HR>
<ADRESS>Stephane Lavirotte <A HREF="mailto:Stephane.Lavirotte@sophia.inria.fr">(Stephane.Lavirotte@sophia.inria.fr)</A></ADRESS>
</BODY></HTML>

View File

@ -1,136 +0,0 @@
<HTML>
<HEAD><TITLE>ProgressBar</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ProgressBar</B>
- Progress indicator widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ProgressBar</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-orient">-orient</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-maximum">-maximum</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-variable">-variable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ProgressBar widget indicates the user the progress of a lengthly operation.
It is used by <A HREF="MainFrame.html">MainFrame</A>
and <A HREF="ProgressDlg.html">ProgressDlg</A>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the progress indicator.
</DD>
</DL>
<DL><DT><A NAME="-maximum"><B>-maximum</B></A></DT>
<DD>
Specifies the maximum value of the variable.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies the type of the ProgressBar. Must be one of <B>normal</B>, <B>incremental</B> or
<B>infinite</B>.
<BR>If <B>type</B> is <I>normal</I>, the progress indicator is drawn proportional
to the variable value and <B>maximum</B> option each time the variable is set.
<BR>If <B>type</B> is <I>incremental</I>, the value of the progress indicator is maintained internally,
and incremented each time the variable is set by its value. The progress indicator is drawn proportional
to the internal value and <B>maximum</B> option.
<BR>If <B>type</B> is <I>infinite</I>, the value of the progress indicator is maintained internally,
and incremented each time the variable is set by its value. The progress indicator grow from left to
right if internal value (modulo <B>maximum</B>) is less than <B>maximum</B>/2, and from right to left if
internal value is greater than <B>maximum</B>/2.
<BR>See <B>-variable</B> option for special case of its value,
</DD>
</DL>
<DL><DT><A NAME="-variable"><B>-variable</B></A></DT>
<DD>
Specifies the variable attached to the progress indicator.
Progress indicator is updated when the value of the variable changes.
If the value of the variable is negative, the progress indicator is not
displayed (it is drawn flat with <B>background</B> color
- usefull for ProgressDlg to make it invisible). If its value 0, progress indicator
is reinitialized.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the progress indicator.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

View File

@ -1,143 +0,0 @@
<HTML>
<HEAD><TITLE>ProgressDlg</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ProgressDlg</B>
- Progress indicator dialog box
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ProgressDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-parent</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-separator</TD>
<TD>&nbsp;&nbsp;-title</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="ProgressBar.html">OPTIONS from <B>ProgressBar</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-maximum</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-relief</TD>
<TD>&nbsp;&nbsp;-troughcolor</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-type</TD>
<TD>&nbsp;&nbsp;-variable</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-stop">-stop</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ProgressDlg provides a simple way to display a progress indicator dialog.
ProgressDlg::<B>create</B> creates the dialog, displays it, set a local
grab to it and immediatly return. The dialog is updated by modifying the
value of the variable of options <B>-textvariable</B> and <B>-variable</B>.
You have to destroy the dialog after use.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command to call when user press stop button.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the label in lines of text.
</DD>
</DL>
<DL><DT><A NAME="-stop"><B>-stop</B></A></DT>
<DD>
Specifies the text of the button typically used to stop process. If empty, no button will
be drawn. This can be a symbolic name.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies a desired width for the label in characters.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

View File

@ -1,130 +0,0 @@
<HTML>
<HEAD><TITLE>ScrollView</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ScrollView</B>
- Display the visible area of a scrolled window
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ScrollView</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-fill">-fill</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-window">-window</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ScrollView displays the visible area of a scrolled window within
its scroll region.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-fill"><B>-fill</B></A></DT>
<DD>
Specifies the fill color of the rectangle.
</DD>
</DL>
<DL><DT><A NAME="-foreground"><B>-foreground</B></A></DT>
<DD>
Specifies the color of the border of the rectangle.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the ScrollView.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the ScrollView.
</DD>
</DL>
<DL><DT><A NAME="-window"><B>-window</B></A></DT>
<DD>
Specifies the window to view. This widget must have <B>-xscrollcommand</B> and
<B>-yscrollcommand</B> options, and respond to <B>xview</B> and <B>yview</B> command.
In order to make ScrollView working with other scrollbar, <B>-xscrollcommand</B> and
<B>-yscrollcommand</B> options of the widget must be set before the widget is passed to
the <B>-window</B> option of the ScrollView (for example, if the widget is handled by
a ScrolledWindow, call <B>setwidget</B> before setting <B>-window</B> option).
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<HR><BR><B>BINDINGS</B><BR><BR>
<DL><DT>If mouse button 1 is pressed and dragged over the ScrollView, the top left corner of
the visible area of the scrolled window is moved proportionally to the mouse displacement.
</DT></DL>
<DL><DT>If mouse button 3 is pressed over the ScrollView, the top left corner of the visible
area is proportionally set to this point.
</DT></DL>
</BODY></HTML>

View File

@ -1,191 +0,0 @@
<HTML>
<HEAD><TITLE>ScrollableFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ScrollableFrame</B>
- Scrollable frame containing widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ScrollableFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-areaheight">-areaheight</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-areawidth">-areawidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-constrainedheight">-constrainedheight</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-constrainedwidth">-constrainedwidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-xscrollincrement">-xscrollincrement</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-yscrollincrement">-yscrollincrement</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>widget</I>
?<I>vert</I>?
?<I>horz</I>?
</DD>
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ScrollableFrame widget containing widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-areaheight"><B>-areaheight</B></A></DT>
<DD>
Specifies the height for the scrollable area. If zero, then the height
of the scrollable area is made just large enough to hold all its children.
</DD>
</DL>
<DL><DT><A NAME="-areawidth"><B>-areawidth</B></A></DT>
<DD>
Specifies the width for the scrollable area. If zero, then the width
of the scrollable area window is made just large enough to hold all its children.
</DD>
</DL>
<DL><DT><A NAME="-constrainedheight"><B>-constrainedheight</B></A></DT>
<DD>
Specifies whether or not the scrollable area should have the same height of the
scrolled window. If true, vertical scrollbar is not needed.
</DD>
</DL>
<DL><DT><A NAME="-constrainedwidth"><B>-constrainedwidth</B></A></DT>
<DD>
Specifies whether or not the scrollable area should have the same width of the
scrolled window. If true, horizontal scrollbar is not needed.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the window in pixels.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the window in pixels.
</DD>
</DL>
<DL><DT><A NAME="-xscrollincrement"><B>-xscrollincrement</B></A></DT>
<DD>
See <B>xscrollincrement</B> option of <B>canvas</B> widget.
</DD>
</DL>
<DL><DT><A NAME="-yscrollincrement"><B>-yscrollincrement</B></A></DT>
<DD>
See <B>yscrollincrement</B> option of <B>canvas</B> widget.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the pathname of the scrolled frame where widget should be created.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>widget</I>
?<I>vert</I>?
?<I>horz</I>?
</DT><DD>
Arrange scrollable area to make <I>widget</I> visible in the window.
<I>vert</I> and <I>horz</I> specify which part of <I>widget</I> must be preferably
visible, in case where <I>widget</I> is too tall or too large to be entirely visible.
<I>vert</I> must be <B>top</B> (the default) or <B>bottom</B>,
and <I>horz</I> must be <B>left</B> (the default) or <B>right</B>.
If <I>vert</I> or <I>horz</I> is not a valid value, area is not scrolled in this direction.
</DD></DL>
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable horizontal scrolling of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable vertical scrolling of <I>pathName</I>.
</DD></DL>
</BODY></HTML>

View File

@ -1,115 +0,0 @@
<HTML>
<HEAD><TITLE>ScrolledWindow</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ScrolledWindow</B>
- Generic scrolled widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ScrolledWindow</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-auto">-auto</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-scrollbar">-scrollbar</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#setwidget"><B>setwidget</B></A>
<I>widget</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ScrolledWindow enables user to create easily a widget with its scrollbar.
Scrollbars are created by ScrolledWindow and scroll commands are automatically associated to
a scrollable widget with <B>ScrolledWindow::setwidget</B>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-auto"><B>-auto</B></A></DT>
<DD>
Specifies the desired auto managed scrollbar:
<LI><B>none</B> means scrollbar are always drawn
<LI><B>horizontal</B> means horizontal scrollbar is drawn as needed
<LI><B>vertical</B> means vertical scrollbar is drawn as needed
<LI><B>both</B> means horizontal and vertical scrollbars are drawn as needed
<LI><B>horizontal</B> means horizontal scrollbar is drawn as needed
</DD>
</DL>
<DL><DT><A NAME="-scrollbar"><B>-scrollbar (read-only)</B></A></DT>
<DD>
Specifies the desired scrollbar: <B>none</B>, <B>horizontal</B>, <B>vertical</B>
or <B>both</B>. This option is not modifiable with <B>ScrolledWindow::configure</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the pathname of the frame where the scrolled widget should be created. This command
is no longer needed. You can directly create the scrolled widget as the child
of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="setwidget"><I>pathName</I> <B>setwidget</B></A>
<I>widget</I>
</DT><DD>
Associate <I>widget</I> to the the scrollbars. <I>widget</I> is packed
in with option <B>expand</B> to <I>yes</I> and <B>fill</B> to <I>both</I>.
<I>widget</I> must be a scrollable widget, i.e. have the options
<B>xscrollcommand</B>/<B>yscrollcommand</B> and the command <B>xview</B>/<B>yview</B>,
such as canvas or text.
</DD></DL>
</BODY></HTML>

View File

@ -1,152 +0,0 @@
<HTML>
<HEAD><TITLE>SelectColor</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>SelectColor</B>
- Color selection widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>SelectColor</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-color">-color</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-parent">-parent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-variable">-variable</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD>SelectColor::<A HREF="#setcolor"><B>setcolor</B></A>
<I>index</I>
<I>color</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
SelectColor provides a simple way to select color. It can be displayed
as a dialog box or as a menubutton.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-color"><B>-color</B></A></DT>
<DD>
Specifies the color value of the widget.
</DD>
</DL>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
When <B>type</B> is <I>menubutton</I>,
specifies a command to call when user select a color.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
When <B>type</B> is <I>menubutton</I>, specifies the desired height for the button.
</DD>
</DL>
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
<DD>
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
root window.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Title of the Dialog toplevel.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type (read-only)</B></A></DT>
<DD>
Specifies the type of the SelectColor widget. Must be <B>dialog</B> or <B>menubutton</B>.
<BR>If <B>type</B> option is <I>dialog</I>, SelectColor::<B>create</B> directly creates the
dialog, displays it and return an empty string if cancel button is pressed or if dialog is
destroyed, and the selected color if ok button is pressed. In all cases, dialog is destroyed.
<BR>If <B>type</B> option is <I>menubutton</I>, SelectColor::<B>create</B> returns the
pathname of the widget created. It is composed of a button from which user can access a menu
displaying predefined colors.
</DD>
</DL>
<DL><DT><A NAME="-variable"><B>-variable</B></A></DT>
<DD>
Specifies a variable to link to the color value of the widget.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
When <B>type</B> is <I>menubutton</I>, specifies the desired width for the button.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setcolor">SelectColor::<B>setcolor</B></A>
<I>index</I>
<I>color</I>
</DT><DD>
Set the value of user predefined color at index <I>index</I> to <I>color</I>.
<I>index</I> must be between 1 and 5.
</DD></DL>
</BODY></HTML>

View File

@ -1,132 +0,0 @@
<HTML>
<HEAD><TITLE>SelectFont</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>SelectFont</B>
- Font selection widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>SelectFont</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-parent">-parent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-sampletext">-sampletext</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD>SelectFont::<A HREF="#loadfont"><B>loadfont</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
SelectFont provides a simple way to choose font. It can be displayed
as a dialog box or as a toolbar.
<BR>Textual items in Dialog box uses <B>-name</B> options so they
can be translated to any language. Symbolic name used are
<B>ok</B>, <B>cancel</B>, <B>font</B>, <B>size</B>, <B>style</B>,
<B>bold</B>, <B>italic</B>, <B>underline</B> and <B>overstrike</B>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command to call when user select a new font when SelectFont <B>type</B>
option is <I>toolbar</I>.
</DD>
</DL>
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
<DD>
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
root window.
</DD>
</DL>
<DL><DT><A NAME="-sampletext"><B>-sampletext</B></A></DT>
<DD>
Specifies the text displayed in the preview area.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Title of the Dialog toplevel.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies the type of the SelectFont widget. Must be <B>dialog</B> or <B>toolbar</B>.
<BR>If <B>type</B> option is <I>dialog</I>, SelectFont::<B>create</B> directly creates the
dialog, displays it and return an empty string if cancel button is pressed or if dialog is
destroyed, and the selected font if ok button is pressed. In all cases, dialog is destroyed.
<BR>If <B>type</B> option is <I>toolbar</I>, SelectFont::<B>create</B> returns the pathname
of the widget created.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="loadfont">SelectFont::<B>loadfont</B></A>
</DT><DD>
Load the font available in the system.
</DD></DL>
</BODY></HTML>

View File

@ -1,77 +0,0 @@
<HTML>
<HEAD><TITLE>Separator</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Separator</B>
- 3D separator widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Separator</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-orient">-orient</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-relief">-relief</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Separator is a widget that display an horizontal or vertical 3-D line.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-relief"><B>-relief</B></A></DT>
<DD>
Specifies the relief of the Separator. Must be <B>groove</B> (the default) or <B>ridge</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

View File

@ -1,250 +0,0 @@
<HTML>
<HEAD><TITLE>SpinBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>SpinBox</B>
- SpinBox widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>SpinBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-repeatdelay</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-repeatinterval</TD>
<TD>&nbsp;&nbsp;-state</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-command</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragenabled</TD>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragevent</TD>
<TD>&nbsp;&nbsp;-draginitcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragtype</TD>
<TD>&nbsp;&nbsp;-dropcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropenabled</TD>
<TD>&nbsp;&nbsp;-dropovercmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-droptypes</TD>
<TD>&nbsp;&nbsp;-editable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entrybg (see <B>-background</B>)</TD>
<TD>&nbsp;&nbsp;-entryfg (see <B>-foreground</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-exportselection</TD>
<TD>&nbsp;&nbsp;-font</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptext</TD>
<TD>&nbsp;&nbsp;-helptype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helpvar</TD>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertbackground</TD>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertofftime</TD>
<TD>&nbsp;&nbsp;-insertontime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertwidth</TD>
<TD>&nbsp;&nbsp;-justify</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectbackground</TD>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectforeground</TD>
<TD>&nbsp;&nbsp;-show</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-takefocus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-text</TD>
<TD>&nbsp;&nbsp;-textvariable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-width</TD>
<TD>&nbsp;&nbsp;-xscrollcommand</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-modifycmd">-modifycmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-range">-range</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-values">-values</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
SpinBox widget enables the user to select a value among a list given by the <B>values</B>
option or a set of values defined by a mininum, a maximum and an increment.
Notice that <B>range</B> option defines a list of values, so <B>getvalue</B> and
<B>setvalue</B> work with both values and range.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT>
<DD>
Specifies a Tcl command called when the user modify the value of the SpinBox.
</DD>
</DL>
<DL><DT><A NAME="-range"><B>-range</B></A></DT>
<DD>
Specifies a list of three intergers (or real) describing the minimum, maximum and increment
of the SpinBox.
</DD>
</DL>
<DL><DT><A NAME="-values"><B>-values</B></A></DT>
<DD>
Specifies the values accepted by the SpinBox. This option takes precedence over
<B>range</B> option.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
?<I>arg...</I>?
</DT><DD>
Set bindings on the entry widget.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A>
</DT><DD>
Returns the index of the current text of the SpinBox in the list of values,
or -1 if it doesn't match any value.
</DD></DL>
<DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A>
<I>index</I>
</DT><DD>
Set the text of the SpinBox to the value indicated by <I>index</I> in the list of values.
<I>index</I> may be specified in any of the following forms:
<P>
<DL COMPACT>
<DT>
<B>last</B>
<DD>
Specifies the last element of the list of values.
<DT><B>first</B>
<DD>
Specifies the first element of the list of values.
<DT>
<B>next</B>
<DD>
Specifies the element following the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT><B>previous</B>
<DD>
Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT>
@<I>number</I>
<DD>
Specifies the integer index in the list of values.
</DL>
</DD></DL>
<HR><BR><B>BINDINGS</B><BR><BR>
When Entry of the SpinBox has the input focus, it has the following bindings, in addition
to the default Entry bindings:
<UL>
<LI>Page up set the value of the SpinBox to the last value.
<LI>Page down set the value of the SpinBox to the first value.
<LI>Arrow up set the value of the SpinBox to the next value.
<LI>Arrow down set the value of the SpinBox to the previous value.
</UL>
</BODY></HTML>

View File

@ -1,107 +0,0 @@
<HTML>
<HEAD><TITLE>TitleFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>TitleFrame</B>
- Frame with a title
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>TitleFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-baseline">-baseline</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-ipad">-ipad</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
TitleFrame enables user to create a frame with a title like XmFrame Motif widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-baseline"><B>-baseline</B></A></DT>
<DD>
Specifies the vertical alignment of the title: <B>top</B>, <B>center</B> or <B>bottom</B>.
</DD>
</DL>
<DL><DT><A NAME="-ipad"><B>-ipad</B></A></DT>
<DD>
Specifies a pad between the border of the frame and the user frame.
The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side</B></A></DT>
<DD>
Specifies the horizontal alignment of the title: <B>left</B>, <B>center</B> or <B>right</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the frame where the user can create any other widget.
</DD></DL>
</BODY></HTML>

View File

@ -1,696 +0,0 @@
<HTML>
<HEAD><TITLE>Tree</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Tree</B>
- Tree widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Tree</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectbackground">-selectbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectforeground">-selectforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-closecmd">-closecmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltax">-deltax</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltay">-deltay</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovermode">-dropovermode</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-linesfill">-linesfill</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-linestipple">-linestipple</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-opencmd">-opencmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-redraw">-redraw</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-showlines">-showlines</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bindImage"><B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#bindText"><B>bindText</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#closetree"><B>closetree</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#edit"><B>edit</B></A>
<I>node</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DD>
<DD><I>pathName</I> <A HREF="#exists"><B>exists</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
<I>index</I>
<I>parent</I>
<I>node</I>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>node</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>node</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
<I>parent</I>
<I>node</I>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#nodes"><B>nodes</B></A>
<I>node</I>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#opentree"><B>opentree</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#parent"><B>parent</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#reorder"><B>reorder</B></A>
<I>node</I>
<I>neworder</I>
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#selection"><B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#visible"><B>visible</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
<B>Tree</B> widget uses canvas to display a hierarchical list of items (called nodes).
Each node is composed of a label with its own font and foreground attributes, and an optional
image or window. Each node can have a list of subnodes, which can be collapsed or expanded.
Each node is drawn in a single line, whose height is defined by the
<B>deltay</B> option, so they must have at most this height.
A node is uniquely identified by a string given at creation (by the
<B>insert</B> command). The node named <I>root</I> is the root of
the tree and is not drawn.
The tree structure is directly maintained by the widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-closecmd"><B>-closecmd</B></A></DT>
<DD>
Specifies a command to be called when user close a node. The
closed node is appended to the command.
</DD>
</DL>
<DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT>
<DD>
Specifies horizontal indentation between a node and its children.
</DD>
</DL>
<DL><DT><A NAME="-deltay"><B>-deltay</B></A></DT>
<DD>
Specifies vertical size of the nodes.
</DD>
</DL>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Tree has a command wrapper for <I>drag-init</I> events. This command refused the drag
if no node is designated. In other cases:
<BR>If <B>draginitcmd</B> is empty, it returns:
<UL>
<LI>the value of option <B>dragtype</B> or <I>TREE_NODE</I> if empty as the data type,
<LI><I>{copy move link}</I> as the operations,
<LI>the node identifier as the data.
</UL>
If <B>draginitcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the tree,
<LI>the identifier of the dragged node,
<LI>the toplevel created to represent dragged data.
</UL>
and must return a value conforming to <B>draginitcmd</B> option described in
<B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
Tree has a command wrapper for <I>drop</I> events. This command stops auto scrolling
and extract node and position.
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the tree,
<LI>the pathname of the drag source,
<LI>a list describing where the drop occurs. It can be:
<UL>
<LI><I>{</I><B>widget</B><I>}</I>,
<LI><I>{</I><B>node</B> <I>node}</I> or
<LI><I>{</I><B>position</B> <I>node index}</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
Tree has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
and position extraction during the <I>drag-over</I>.
If <B>dropovercmd</B> is not empty, the command is called with the following aguments:
<UL>
<LI>the pathname of the tree,
<LI>the pathname of the drag source,
<LI>a list describing where the drop can occur, whose elements are:
<UL>
<LI>the string <I>widget</I> if <B>dropovertype</B> option contains <I>w</I>, else empty string.
<LI>the targeted node if drag icon points a node and <B>dropovertype</B> option contains <I>n</I>, else empty string.
<LI>a list containing a node and the position within the children of the node where drag
icon points to if <B>dropovertype</B> option contains <I>p</I>, else empty string.
<LI>optionally, the preferred method if drop can occur both inside a node and between two
nodes. The value is <I>position</I> or <I>node</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
The command must return a list with two elements:
<UL>
<LI>the drop status, conforming to those described in <B>dropovercmd</B> option of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>,
<LI>the choosen method: <I>widget</I>, <I>node</I> or <I>position</I>.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropovermode"><B>-dropovermode</B></A></DT>
<DD>
Specifies the type of <I>drop-over</I> interaction. Must be a combination of
<B>w</B>, which specifies that drop can occurs everywhere on widget,
<B>p</B>, which specifies that drop can occurs between two nodes,
and <B>n</B>, which specifies that drop occurs inside nodes.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
<BR>Default is <I>TREE_NODE</I> with operations <B>copy</B> and <B>move</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the tree in units of <B>deltay</B> pixels.
</DD>
</DL>
<DL><DT><A NAME="-linesfill"><B>-linesfill</B></A></DT>
<DD>
Specifies a foreground color for the lines between nodes.
</DD>
</DL>
<DL><DT><A NAME="-linestipple"><B>-linestipple</B></A></DT>
<DD>
Specifies a stipple bitmap for the lines between nodes.
</DD>
</DL>
<DL><DT><A NAME="-opencmd"><B>-opencmd</B></A></DT>
<DD>
Specifies a command to be called when user open a node. The
opened node is appended to the command.
</DD>
</DL>
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
<DD>
Specifies distance between image or window and text of the nodes.
</DD>
</DL>
<DL><DT><A NAME="-redraw"><B>-redraw</B></A></DT>
<DD>
Specifies wether or not the tree should be redrawn when entering idle.
Set it to false if you call <B>update</B> while modifying the tree.
</DD>
</DL>
<DL><DT><A NAME="-showlines"><B>-showlines</B></A></DT>
<DD>
Specifies whether or not lines should be drawn between nodes.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the tree in units of 8 pixels.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bindImage"><I>pathName</I> <B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the image of a node.
The node idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="bindText"><I>pathName</I> <B>bindText</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the label of a node.
The node idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><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 creation command.
</DD></DL>
<DL><DT><A NAME="closetree"><I>pathName</I> <B>closetree</B></A>
<I>node</I>
</DT><DD>
This command close all the subtree given by <I>node</I> (recurse
through the tree starting at <I>node</I> and set <B>open</B> option to 0)
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><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>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
?<I>arg...</I>?
</DT><DD>
Deletes all nodes (and children of them) in <I>arg</I>. <I>arg</I> can be a list
of nodes or a list of list of nodes.
To delete all the tree, do <I>$pathName delete [$pathName nodes root]</I>.
</DD></DL>
<DL><DT><A NAME="edit"><I>pathName</I> <B>edit</B></A>
<I>node</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DT><DD>
Provides a way for the user to edit in place the label of a node. This is
possible only if <I>node</I> is visible (all its parents are open).
<BR>The command takes the initial text as argument and does not modify the label of the
edited node, but returns an empty string if edition is canceled, or the typed text
if edition is accepted.
<BR>When editing, the user can cancel by pressing Escape, or accept by pressing Return.
<BR><I>clickres</I> specifies what to do if the user click outside the editable area.
If <I>clickres</I> is 0 (the default), the edition is canceled.
If <I>clickres</I> is 1, the edition is accepted.
In all other case, the edition continues.
<BR>If edition is accepted and <I>modifycmd</I> is not empty, then it is called with
the new text as argument and must return 1 to accept the new text, 0 to refuse it
and continue edition.
<BR><I>select</I> specifies wether or not the initial text should be selected. Default is 1.
</DD></DL>
<DL><DT><A NAME="exists"><I>pathName</I> <B>exists</B></A>
<I>node</I>
</DT><DD>
Returns whether or not <I>node</I> exists in the tree.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>node</I>
</DT><DD>
Returns the position of <I>node</I> in its parent.
</DD></DL>
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
<I>index</I>
<I>parent</I>
<I>node</I>
?<I>option value...</I>?
</DT><DD>
Inserts a new node identified by <I>node</I> in the children list of <I>parent</I>
at position <I>index</I>.
<P>
<DL><DT><A NAME="Node-data"><B>-data</B></A></DT>
<DD>
User data associated to the node.
</DD>
</DL>
<DL><DT><A NAME="Node-drawcross"><B>-drawcross</B></A></DT>
<DD>
Specifies how the cross used to expand or collapse the children of a node
should be drawn.
Must be one of <B>auto</B>, <B>allways</B> or <B>never</B>.
<BR>If <B>auto</B>, the cross is drawn only if the node has children.
If <B>allways</B>, the cross is always drawn.
If <B>never</B>, the cross is never drawn.
</DD>
</DL>
<DL><DT><A NAME="Node-fill"><B>-fill</B></A></DT>
<DD>
Specifies the foreground color of the label of the node.
</DD>
</DL>
<DL><DT><A NAME="Node-font"><B>-font</B></A></DT>
<DD>
Specifies a font for the label of the node.
</DD>
</DL>
<DL><DT><A NAME="Node-image"><B>-image</B></A></DT>
<DD>
Specifies an image to display at the left of the label of the node.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
<DL><DT><A NAME="Node-open"><B>-open</B></A></DT>
<DD>
Specifies wether or not the children of the node should be drawn.
</DD>
</DL>
<DL><DT><A NAME="Node-text"><B>-text</B></A></DT>
<DD>
Specifies the label of the node.
</DD>
</DL>
<DL><DT><A NAME="Node-window"><B>-window</B></A></DT>
<DD>
Specifies a pathname to display at the left of the label of the node.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>node</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>node</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
<I>parent</I>
<I>node</I>
<I>index</I>
</DT><DD>
Moves <I>node</I> to the children list of <I>parent</I> at position <I>index</I>.
<I>parent</I> can not be a descendant of <I>node</I>.
</DD></DL>
<DL><DT><A NAME="nodes"><I>pathName</I> <B>nodes</B></A>
<I>node</I>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
Returns parts of the children of <I>node</I>, following <I>first</I> and <I>last</I>.<BR>
If <I>first</I> and <I>last</I> are omitted, returns the list of all children.
If <I>first</I> is specified and <I>last</I> omitted, returns the child at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the children between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="opentree"><I>pathName</I> <B>opentree</B></A>
<I>node</I>
</DT><DD>
This command open all the subtree given by <I>node</I> (recurse
through the tree starting at <I>node</I> and set <B>open</B> option to 1)
</DD></DL>
<DL><DT><A NAME="parent"><I>pathName</I> <B>parent</B></A>
<I>node</I>
</DT><DD>
Returns the parent of <I>node</I>.
</DD></DL>
<DL><DT><A NAME="reorder"><I>pathName</I> <B>reorder</B></A>
<I>node</I>
<I>neworder</I>
</DT><DD>
Modifies the order of children of <I>node</I> given by <I>neworder</I>. Children of
<I>node</I> that do not appear in <I>neworder</I> are no moved.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>node</I>
</DT><DD>
Arrange the scrolling area to make <I>node</I> visible.
</DD></DL>
<DL><DT><A NAME="selection"><I>pathName</I> <B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DT><DD>
Modifies the list of selected nodes following <I>cmd</I>:
<DL>
<DT><B>clear</B>
<DD>remove all nodes of the selection.
<DT><B>set</B>
<DD>set the selection to all nodes in <I>arg</I>
<DT><B>add</B>
<DD>add all nodes of <I>arg</I> in the selection
<DT><B>remove</B>
<DD>remove all nodes of <I>arg</I> of the selection
<DT><B>get</B>
<DD>return the current selected nodes
</DL>
</DD></DL>
<DL><DT><A NAME="visible"><I>pathName</I> <B>visible</B></A>
<I>node</I>
</DT><DD>
Returns whether or not <I>node</I> is visible (all its parents are open).
</DD></DL>
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable horizontal scrolling of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable vertical scrolling of <I>pathName</I>.
</DD></DL>
</BODY></HTML>

View File

@ -1,409 +0,0 @@
<HTML>
<HEAD><TITLE>Widget</TITLE></HEAD>
<BODY BGCOLOR=white>
<IMG SRC="constr.gif" WIDTH="40" HEIGHT="40"> Under construction ...<BR>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Widget</B>
- The Widget base class
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>Widget::<A HREF="#addmap"><B>addmap</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#bwinclude"><B>bwinclude</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
?<I>arg...</I>?
</DD>
<DD>Widget::<A HREF="#cget"><B>cget</B></A>
<I>path</I>
<I>option</I>
</DD>
<DD>Widget::<A HREF="#configure"><B>configure</B></A>
<I>path</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#declare"><B>declare</B></A>
<I>class</I>
<I>optlist</I>
</DD>
<DD>Widget::<A HREF="#destroy"><B>destroy</B></A>
<I>path</I>
</DD>
<DD>Widget::<A HREF="#focusNext"><B>focusNext</B></A>
<I>w</I>
</DD>
<DD>Widget::<A HREF="#focusOK"><B>focusOK</B></A>
<I>w</I>
</DD>
<DD>Widget::<A HREF="#focusPrev"><B>focusPrev</B></A>
<I>w</I>
</DD>
<DD>Widget::<A HREF="#generate-doc"><B>generate-doc</B></A>
<I>dir</I>
<I>widgetlist</I>
</DD>
<DD>Widget::<A HREF="#generate-widget-doc"><B>generate-widget-doc</B></A>
<I>class</I>
<I>iscmd</I>
<I>file</I>
</DD>
<DD>Widget::<A HREF="#getoption"><B>getoption</B></A>
<I>path</I>
<I>option</I>
</DD>
<DD>Widget::<A HREF="#hasChanged"><B>hasChanged</B></A>
<I>path</I>
<I>option</I>
<I>pvalue</I>
</DD>
<DD>Widget::<A HREF="#init"><B>init</B></A>
<I>class</I>
<I>path</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#setoption"><B>setoption</B></A>
<I>path</I>
<I>option</I>
<I>value</I>
</DD>
<DD>Widget::<A HREF="#subcget"><B>subcget</B></A>
<I>path</I>
<I>subwidget</I>
</DD>
<DD>Widget::<A HREF="#syncoptions"><B>syncoptions</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#tkinclude"><B>tkinclude</B></A>
<I>class</I>
<I>tkwidget</I>
<I>subpath</I>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
The <B>Widget</B> namespace handle data associated to all BWidget and provide commands
to easily define BWidget.
<BR>For commands can be used to define a BWidget:
<B>tkinclude</B>, <B>bwinclude</B>, <B>declare</B>, <B>addmap</B> and <B>syncoptions</B>.
Here is the definition of <A HREF="ComboBox.html">ComboBox</A> widget:
<BR><BR>
<CENTER>
<TABLE BORDER=2 CELSPACING=2 WIDTH=80%>
<TR><TD><PRE>
namespace eval ComboBox {
<FONT COLOR=red><I># We're using ArrowButton, Entry and LabelFrame</I></FONT>
ArrowButton::use
Entry::use
LabelFrame::use
<FONT COLOR=red><I># Include resources of LabelFrame</I></FONT>
Widget::bwinclude ComboBox LabelFrame .labf \
rename {-text -label} \
remove {-focus} \
prefix {label -justify -width -anchor -height -font} \
initialize {-relief sunken -borderwidth 2}
<FONT COLOR=red><I># Include resources of Entry</I></FONT>
Widget::bwinclude ComboBox Entry .e \
remove {-relief -bd -borderwidth -bg -fg} \
rename {-foreground -entryfg -background -entrybg}
<FONT COLOR=red><I># Declare new resources</I></FONT>
Widget::declare ComboBox {
{-height TkResource 0 0 listbox}
{-values String "" 0}
{-modifycmd String "" 0}
{-postcommand String "" 0}
}
<FONT COLOR=red><I># Map resources to subwidget</I></FONT>
Widget::addmap ComboBox "" :cmd {-background {}}
Widget::addmap ComboBox ArrowButton .a \
{-foreground {} -background {} -disabledforeground {} -state {}}
<FONT COLOR=red><I># Synchronize subwidget options</I></FONT>
Widget::syncoptions ComboBox Entry .e {-text {}}
Widget::syncoptions ComboBox LabelFrame .labf {-label -text -underline {}}
proc use {} {}
}</PRE>
</TD></TR>
</TABLE></CENTER>
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="addmap">Widget::<B>addmap</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DT><DD>
This command map some resources to subwidget.
Mapped resources automatically configure subwidget when widget is configured.
<UL>
<LI><I>class</I> is the class of the new BWidget
<LI><I>subclass</I> is the class the subwidget (BWidget class, e.g Entry, or empty for Tk widget)
<LI><I>subpath</I> is the path of the subwidget
<LI><I>options</I> is the list <I>{option realres ...}</I> of options to map to subwidget
</UL>
</DD></DL>
<DL><DT><A NAME="bwinclude">Widget::<B>bwinclude</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
?<I>arg...</I>?
</DT><DD>
This command includes into a new BWidget the resources of another BWidget.
Arguments are:
<UL>
<LI><I>class</I> class of the new widget
<LI><I>subclass</I> class name of the BWidget to be included
<LI><I>subpath</I> path of the widget to configure when BWidget is configured
<LI><I>options</I> is:
<UL>
<LI><I><B>include</B> {option option ...}</I>
<BR>list of options to include (all if not defined)
<LI><I><B>remove</B> {option option ...}</I>
<BR> list of options to remove
<LI><I><B>rename</B> {option name option name ...}</I>
<BR>list of options to rename
<LI><I><B>prefix</B> {prefix option option ...}</I>
<BR>pefix all <I>option</I> by <I>prefix</I>
<LI><I><B>initialize</B> {option value option value ...}</I>
<BR>default value of options
<LI><I><B>readonly</B> {option value option value ...}</I>
<BR>new readonly flag
</UL></UL>
</DD></DL>
<DL><DT><A NAME="cget">Widget::<B>cget</B></A>
<I>path</I>
<I>option</I>
</DT><DD>
Returns the value of <I>option</I> of BWidget <I>path</I>. <B>cget</B> tests the option
existence and takes care of synchronization with subwidget.
Typically called by the BWidget <B>cget</B> command.
</DD></DL>
<DL><DT><A NAME="configure">Widget::<B>configure</B></A>
<I>path</I>
<I>options</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="declare">Widget::<B>declare</B></A>
<I>class</I>
<I>optlist</I>
</DT><DD>
This command declare new resources for a BWidget.
<UL>
<LI><I>class</I> is class of the new widget
<LI><I>options</I> is the list describing new options. Each new option is a list
<B>{option type value ro ?args?}</B> where:
<UL>
<LI><I>option</I> is the name of the option
<LI><I>type</I> is the type of the option
<LI><I>value</I> is the default value of the option
<LI><I>ro</I> is the readonly flag of the option
<LI><I>args</I> depends on type
</UL></UL>
<BR>
<I>type</I> can be:
<BR>
<DL>
<DT><B>TkResource</B></DT>
<DD>
<I>value</I> of <I>option</I> denotes a resource of a Tk widget. <I>args</I> must be <I>class</I> or
<I>{class realoption}</I>. <I>class</I> is the creation command of the Tk widget, e.g.
<B>entry</B>.
The second form must be used if <I>option</I> has not the same name in Tk widget,
but <I>realoption</I>.
<BR>If <I>value</I> is empty, it is initialized to the default value of the Tk widget.
</DD>
<DT><B>BwResource</B></DT>
<DD>
<I>value</I> of <I>option</I> denotes a resource of a BWidget. <I>args</I> must be <I>class</I> or
<I>{class realoption}</I>. <I>class</I> is the name of the namespace of the BWidget, e.g.
<B>LabelFrame</B>.
The second form must be used if <I>option</I> has not the same name in BWidget,
but <I>realoption</I>.
<BR>If <I>value</I> is empty, it is initialized to the default value of the BWidget.
</DD>
<DT><B>Int</B></DT>
<DD><I>value</I> of <I>option</I> is an integer.
<I>args</I> can be <I>{?min? ?max?}</I> to force it to be in a range. The test is
<I>[expr $option>$min] && [expr $option<$max]</I> so
if args is <I>{0 10}</I>, value must be beetween 0 and 10 exclude,
if <I>args</I> is <I>{=0 =10}</I> , value must be beetween 0 and 10 include.
</DD>
<DT><B>Boolean</B></DT>
<DD><I>value</I> of <I>option</I> is a boolean. True values can be <B>1</B>, <B>true</B> or <B>yes</B>.
False values can be <B>0</B>, <B>false</B> or <B>no</B>. <B>Widget::cget</B> always return
0 or 1.
</DD>
<DT><B>Enum</B></DT>
<DD>
<I>value</I> of <I>option</I> is a element of a enumeration. <I>args</I> must be the list
of enumeration, e.g. <I>{top left bottom right}</I>.
</DD>
<DT><B>Flag</B></DT>
<DD>
<I>value</I> of <I>option</I> is a combination of a set of chars. <I>args</I> must be a
string defining the set.
</DD>
<DT><B>String</B></DT>
<DD>
<DD><I>value</I> of <I>option</I> is any uncontrolled string.
</DD>
<DT><B>Synonym</B></DT>
<DD>
<DD><I>option</I> is a synonym of option <I>args</I>. <I>value</I> has no effect here.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="destroy">Widget::<B>destroy</B></A>
<I>path</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focusNext">Widget::<B>focusNext</B></A>
<I>w</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focusOK">Widget::<B>focusOK</B></A>
<I>w</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focusPrev">Widget::<B>focusPrev</B></A>
<I>w</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="generate-doc">Widget::<B>generate-doc</B></A>
<I>dir</I>
<I>widgetlist</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="generate-widget-doc">Widget::<B>generate-widget-doc</B></A>
<I>class</I>
<I>iscmd</I>
<I>file</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="getoption">Widget::<B>getoption</B></A>
<I>path</I>
<I>option</I>
</DT><DD>
Returns the value of <I>option</I> of BWidget <I>path</I>. This command does not test
option existence, does not handle synonym and does not take care of synchronization with
subwidget.
</DD></DL>
<DL><DT><A NAME="hasChanged">Widget::<B>hasChanged</B></A>
<I>path</I>
<I>option</I>
<I>pvalue</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="init">Widget::<B>init</B></A>
<I>class</I>
<I>path</I>
<I>options</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="setoption">Widget::<B>setoption</B></A>
<I>path</I>
<I>option</I>
<I>value</I>
</DT><DD>
Set the value of <I>option</I> of BWidget <I>path</I> without option test, subwidget mapping,
synonym handling and does not set the modification flag.
</DD></DL>
<DL><DT><A NAME="subcget">Widget::<B>subcget</B></A>
<I>path</I>
<I>subwidget</I>
</DT><DD>
Returns the list of all option/value of BWidget <I>path</I> that are mapped to <I>subwidget</I>.
</DD></DL>
<DL><DT><A NAME="syncoptions">Widget::<B>syncoptions</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DT><DD>
This command synchronize options value of a subwidget.
Used when an option of a subwidget is modified out of the BWidget <B>configure</B> command.
<UL>
<LI><I>class</I> is the class of the new BWidget
<LI><I>subclass</I> is the class the subwidget (BWidget class, e.g Entry, or empty for Tk widget)
<LI><I>subpath</I> is the path of the subwidget
<LI><I>options</I> is the list <I>{option realres ...}</I> of options to synchronize
with subwidget
</UL>
</DD></DL>
<DL><DT><A NAME="tkinclude">Widget::<B>tkinclude</B></A>
<I>class</I>
<I>tkwidget</I>
<I>subpath</I>
?<I>arg...</I>?
</DT><DD>
This command includes into a new BWidget the resources of a Tk widget.
Arguments are:
<UL>
<LI><I>class</I> class of the new widget
<LI><I>tkwidger</I> command name of the Tk widget to be included
<LI><I>subpath</I> path of the widget to configure when BWidget is configured
<LI><I>options</I> is:
<UL>
<LI><I><B>include</B> {option option ...}</I>
<BR>list of options to include (all if not defined)
<LI><I><B>remove</B> {option option ...}</I>
<BR>list of options to remove
<LI><I><B>rename</B> {option name option name ...}</I>
<BR>list of options to rename
<LI><I><B>prefix</B> {prefix option option ...}</I>
<BR>pefix all <I>option</I> by <I>prefix</I>
<LI><I><B>initialize</B> {option value option value ...}</I>
<BR>default value of options
<LI><I><B>readonly</B> {option value option value ...}</I>
<BR>new readonly flag
</UL></UL>
</DD></DL>
</BODY></HTML>

View File

@ -1,34 +0,0 @@
<title>BWidget</title>
<a href="Label.html">Label</a><br>
<a href="Entry.html">Entry</a><br>
<a href="Button.html">Button</a><br>
<a href="ArrowButton.html">ArrowButton</a><br>
<a href="ProgressBar.html">ProgressBar</a><br>
<a href="ScrollView.html">ScrollView</a><br>
<a href="Separator.html">Separator</a><br>
<a href="MainFrame.html">MainFrame</a><br>
<a href="LabelFrame.html">LabelFrame</a><br>
<a href="TitleFrame.html">TitleFrame</a><br>
<a href="ScrolledWindow.html">ScrolledWindow</a><br>
<a href="ScrollableFrame.html">ScrollableFrame</a><br>
<a href="PanedWindow.html">PanedWindow</a><br>
<a href="ButtonBox.html">ButtonBox</a><br>
<a href="PagesManager.html">PagesManager</a><br>
<a href="NoteBook.html">NoteBook</a><br>
<a href="Dialog.html">Dialog</a><br>
<a href="LabelEntry.html">LabelEntry</a><br>
<a href="ComboBox.html">ComboBox</a><br>
<a href="SpinBox.html">SpinBox</a><br>
<a href="Tree.html">Tree</a><br>
<a href="ListBox.html">ListBox</a><br>
<a href="MessageDlg.html">MessageDlg</a><br>
<a href="ProgressDlg.html">ProgressDlg</a><br>
<a href="PasswdDlg.html">PasswdDlg</a><br>
<a href="SelectFont.html">SelectFont</a><br>
<a href="SelectColor.html">SelectColor</a><br>
<a href="Widget.html">Widget</a><br>
<a href="DynamicHelp.html">DynamicHelp</a><br>
<a href="DragSite.html">DragSite</a><br>
<a href="DropSite.html">DropSite</a><br>
<a href="BWidget.html">BWidget</a><br>

View File

@ -1,39 +0,0 @@
<HTML><BODY BGCOLOR=white>
<FONT SIZE=1><STRONG><A HREF="contents.html" TARGET=Manual>Brief description</A></STRONG></FONT><BR>
<FONT SIZE=1><STRONG>Simple Widgets</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Label.html" TARGET=Manual>Label</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Entry.html" TARGET=Manual>Entry</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Button.html" TARGET=Manual>Button</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ArrowButton.html" TARGET=Manual>ArrowButton</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ProgressBar.html" TARGET=Manual>ProgressBar</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ScrollView.html" TARGET=Manual>ScrollView</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Separator.html" TARGET=Manual>Separator</A></FONT><BR>
<FONT SIZE=1><STRONG>Manager Widgets</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="MainFrame.html" TARGET=Manual>MainFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="LabelFrame.html" TARGET=Manual>LabelFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="TitleFrame.html" TARGET=Manual>TitleFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ScrolledWindow.html" TARGET=Manual>ScrolledWindow</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ScrollableFrame.html" TARGET=Manual>ScrollableFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="PanedWindow.html" TARGET=Manual>PanedWindow</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ButtonBox.html" TARGET=Manual>ButtonBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="PagesManager.html" TARGET=Manual>PagesManager</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="NoteBook.html" TARGET=Manual>NoteBook</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Dialog.html" TARGET=Manual>Dialog</A></FONT><BR>
<FONT SIZE=1><STRONG>Composite Widgets</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="LabelEntry.html" TARGET=Manual>LabelEntry</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ComboBox.html" TARGET=Manual>ComboBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="SpinBox.html" TARGET=Manual>SpinBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Tree.html" TARGET=Manual>Tree</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ListBox.html" TARGET=Manual>ListBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="MessageDlg.html" TARGET=Manual>MessageDlg</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ProgressDlg.html" TARGET=Manual>ProgressDlg</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="PasswdDlg.html" TARGET=Manual>PasswdDlg</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="SelectFont.html" TARGET=Manual>SelectFont</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="SelectColor.html" TARGET=Manual>SelectColor</A></FONT><BR>
<FONT SIZE=1><STRONG>Commands Classes</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Widget.html" TARGET=Manual>Widget</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="DynamicHelp.html" TARGET=Manual>DynamicHelp</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="DragSite.html" TARGET=Manual>DragSite</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="DropSite.html" TARGET=Manual>DropSite</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="BWidget.html" TARGET=Manual>BWidget</A></FONT><BR>
</BODY></HTML>

View File

@ -1,449 +0,0 @@
<HTML><HEAD><TITLE>Tk Built-In Commands - options manual page</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL>
<DD><A HREF="options.htm#M2" NAME="L2">NAME</A>
<DL><DD>options - Standard options supported by widgets</DL>
<DD><A HREF="options.htm#M3" NAME="L3">DESCRIPTION</A>
<DL>
<DD><A HREF="options.htm#M-activebackground" NAME="L4">-activebackground, activeBackground, Foreground</A>
<DD><A HREF="options.htm#M-activeborderwidth" NAME="L5">-activeborderwidth, activeBorderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-activeforeground" NAME="L6">-activeforeground, activeForeground, Background</A>
<DD><A HREF="options.htm#M-anchor" NAME="L7">-anchor, anchor, Anchor</A>
<DD><A HREF="options.htm#M-background" NAME="L8">-background or -bg, background, Background</A>
<DD><A HREF="options.htm#M-bitmap" NAME="L9">-bitmap, bitmap, Bitmap</A>
<DD><A HREF="options.htm#M-borderwidth" NAME="L10">-borderwidth or -bd, borderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-cursor" NAME="L11">-cursor, cursor, Cursor</A>
<DD><A HREF="options.htm#M-disabledforeground" NAME="L12">-disabledforeground, disabledForeground, DisabledForeground</A>
<DD><A HREF="options.htm#M-exportselection" NAME="L13">-exportselection, exportSelection, ExportSelection</A>
<DD><A HREF="options.htm#M-font" NAME="L14">-font, font, Font</A>
<DD><A HREF="options.htm#M-foreground" NAME="L15">-foreground or -fg, foreground, Foreground</A>
<DD><A HREF="options.htm#M-highlightbackground" NAME="L16">-highlightbackground, highlightBackground, HighlightBackground</A>
<DD><A HREF="options.htm#M-highlightcolor" NAME="L17">-highlightcolor, highlightColor, HighlightColor</A>
<DD><A HREF="options.htm#M-highlightthickness" NAME="L18">-highlightthickness, highlightThickness, HighlightThickness</A>
<DD><A HREF="options.htm#M-image" NAME="L19">-image, image, Image</A>
<DD><A HREF="options.htm#M-insertbackground" NAME="L20">-insertbackground, insertBackground, Foreground</A>
<DD><A HREF="options.htm#M-insertborderwidth" NAME="L21">-insertborderwidth, insertBorderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-insertofftime" NAME="L22">-insertofftime, insertOffTime, OffTime</A>
<DD><A HREF="options.htm#M-insertontime" NAME="L23">-insertontime, insertOnTime, OnTime</A>
<DD><A HREF="options.htm#M-insertwidth" NAME="L24">-insertwidth, insertWidth, InsertWidth</A>
<DD><A HREF="options.htm#M-jump" NAME="L25">-jump, jump, Jump</A>
<DD><A HREF="options.htm#M-justify" NAME="L26">-justify, justify, Justify</A>
<DD><A HREF="options.htm#M-orient" NAME="L27">-orient, orient, Orient</A>
<DD><A HREF="options.htm#M-padx" NAME="L28">-padx, padX, Pad</A>
<DD><A HREF="options.htm#M-pady" NAME="L29">-pady, padY, Pad</A>
<DD><A HREF="options.htm#M-relief" NAME="L30">-relief, relief, Relief</A>
<DD><A HREF="options.htm#M-repeatdelay" NAME="L31">-repeatdelay, repeatDelay, RepeatDelay</A>
<DD><A HREF="options.htm#M-repeatinterval" NAME="L32">-repeatinterval, repeatInterval, RepeatInterval</A>
<DD><A HREF="options.htm#M-selectbackground" NAME="L33">-selectbackground, selectBackground, Foreground</A>
<DD><A HREF="options.htm#M-selectborderwidth" NAME="L34">-selectborderwidth, selectBorderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-selectforeground" NAME="L35">-selectforeground, selectForeground, Background</A>
<DD><A HREF="options.htm#M-setgrid" NAME="L36">-setgrid, setGrid, SetGrid</A>
<DD><A HREF="options.htm#M-takefocus" NAME="L37">-takefocus, takeFocus, TakeFocus</A>
<DD><A HREF="options.htm#M-text" NAME="L38">-text, text, Text</A>
<DD><A HREF="options.htm#M-textvariable" NAME="L39">-textvariable, textVariable, Variable</A>
<DD><A HREF="options.htm#M-troughcolor" NAME="L40">-troughcolor, troughColor, Background</A>
<DD><A HREF="options.htm#M-underline" NAME="L41">-underline, underline, Underline</A>
<DD><A HREF="options.htm#M-wraplength" NAME="L42">-wraplength, wrapLength, WrapLength</A>
<DD><A HREF="options.htm#M-xscrollcommand" NAME="L43">-xscrollcommand, xScrollCommand, ScrollCommand</A>
<DD><A HREF="options.htm#M-yscrollcommand" NAME="L44">-yscrollcommand, yScrollCommand, ScrollCommand</A>
</DL>
<DD><A HREF="options.htm#M4" NAME="L45">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
options - Standard options supported by widgets
<H3><A NAME="M3">DESCRIPTION</A></H3>
This manual entry describes the common configuration options supported
by widgets in the Tk toolkit. Every widget does not necessarily support
every option (see the manual entries for individual widgets for a list
of the standard options supported by that widget), but if a widget does
support an option with one of the names listed below, then the option
has exactly the effect described below.
<P>
In the descriptions below, ``Command-Line Name'' refers to the
switch used in class commands and <B>configure</B> widget commands to
set this value. For example, if an option's command-line switch is
<B>-foreground</B> and there exists a widget <B>.a.b.c</B>, then the
command
<PRE><B>.a.b.c configure -foreground black</B></PRE>
may be used to specify the value <B>black</B> for the option in the
the widget <B>.a.b.c</B>. Command-line switches may be abbreviated,
as long as the abbreviation is unambiguous.
``Database Name'' refers to the option's name in the option database (e.g.
in .Xdefaults files). ``Database Class'' refers to the option's class value
in the option database.
<DL>
<DT>Command-Line Name: <B><A NAME="M-activebackground">-activebackground</A></B>
<DT>Database Name: <B>activeBackground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies background color to use when drawing active elements.
An element (a widget or portion of a widget) is active if the
mouse cursor is positioned over the element and pressing a mouse button
will cause some action to occur.
If strict Motif compliance has been requested by setting the
<B>tk_strictMotif</B> variable, this option will normally be
ignored; the normal background color will be used instead.
For some elements on Windows and Macintosh systems, the active color
will only be used while mouse button 1 is pressed over the element.
<P><DT>Command-Line Name: <B><A NAME="M-activeborderwidth">-activeborderwidth</A></B>
<DT>Database Name: <B>activeBorderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating
the width of the 3-D border drawn around active elements. See above for
definition of active elements.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
This option is typically only available in widgets displaying more
than one element at a time (e.g. menus but not buttons).
<P><DT>Command-Line Name: <B><A NAME="M-activeforeground">-activeforeground</A></B>
<DT>Database Name: <B>activeForeground</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies foreground color to use when drawing active elements.
See above for definition of active elements.
<P><DT>Command-Line Name: <B><A NAME="M-anchor">-anchor</A></B>
<DT>Database Name: <B>anchor</B>
<DT>Database Class: <B>Anchor</B>
<DD>Specifies how the information in a widget (e.g. text or a bitmap)
is to be displayed in the widget.
Must be one of the values <B>n</B>, <B>ne</B>, <B>e</B>, <B>se</B>,
<B>s</B>, <B>sw</B>, <B>w</B>, <B>nw</B>, or <B>center</B>.
For example, <B>nw</B> means display the information such that its
top-left corner is at the top-left corner of the widget.
<P><DT>Command-Line Name: <B><A NAME="M-background">-background or -bg</A></B>
<DT>Database Name: <B>background</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies the normal background color to use when displaying the
widget.
<P><DT>Command-Line Name: <B><A NAME="M-bitmap">-bitmap</A></B>
<DT>Database Name: <B>bitmap</B>
<DT>Database Class: <B>Bitmap</B>
<DD>Specifies a bitmap to display in the widget, in any of the forms
acceptable to <B><A HREF="../TkLib/GetBitmap.htm">Tk_GetBitmap</A></B>.
The exact way in which the bitmap is displayed may be affected by
other options such as <B>anchor</B> or <B>justify</B>.
Typically, if this option is specified then it overrides other
options that specify a textual value to display in the widget;
the <B>bitmap</B> option may be reset to an empty string to re-enable
a text display.
In widgets that support both <B>bitmap</B> and <B>image</B> options,
<B>image</B> will usually override <B>bitmap</B>.
<P><DT>Command-Line Name: <B><A NAME="M-borderwidth">-borderwidth or -bd</A></B>
<DT>Database Name: <B>borderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating the width
of the 3-D border to draw around the outside of the widget (if such a
border is being drawn; the <B>relief</B> option typically determines
this). The value may also be used when drawing 3-D effects in the
interior of the widget.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-cursor">-cursor</A></B>
<DT>Database Name: <B>cursor</B>
<DT>Database Class: <B>Cursor</B>
<DD>Specifies the mouse cursor to be used for the widget.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetCursor.htm">Tk_GetCursor</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-disabledforeground">-disabledforeground</A></B>
<DT>Database Name: <B>disabledForeground</B>
<DT>Database Class: <B>DisabledForeground</B>
<DD>Specifies foreground color to use when drawing a disabled element.
If the option is specified as an empty string (which is typically the
case on monochrome displays), disabled elements are drawn with the
normal foreground color but they are dimmed by drawing them
with a stippled fill pattern.
<P><DT>Command-Line Name: <B><A NAME="M-exportselection">-exportselection</A></B>
<DT>Database Name: <B>exportSelection</B>
<DT>Database Class: <B>ExportSelection</B>
<DD>Specifies whether or not a selection in the widget should also be
the X selection.
The value may have any of the forms accepted by <B><A HREF="../TclLib/GetInt.htm">Tcl_GetBoolean</A></B>,
such as <B>true</B>, <B>false</B>, <B>0</B>, <B>1</B>, <B>yes</B>, or <B>no</B>.
If the selection is exported, then selecting in the widget deselects
the current X selection, selecting outside the widget deselects any
widget selection, and the widget will respond to selection retrieval
requests when it has a selection. The default is usually for widgets
to export selections.
<P><DT>Command-Line Name: <B><A NAME="M-font">-font</A></B>
<DT>Database Name: <B><A HREF="../TkCmd/font.htm">font</A></B>
<DT>Database Class: <B><A HREF="../TkCmd/font.htm">Font</A></B>
<DD>Specifies the font to use when drawing text inside the widget.
<P><DT>Command-Line Name: <B><A NAME="M-foreground">-foreground or -fg</A></B>
<DT>Database Name: <B>foreground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies the normal foreground color to use when displaying the widget.
<P><DT>Command-Line Name: <B><A NAME="M-highlightbackground">-highlightbackground</A></B>
<DT>Database Name: <B>highlightBackground</B>
<DT>Database Class: <B>HighlightBackground</B>
<DD>Specifies the color to display in the traversal highlight region when
the widget does not have the input focus.
<P><DT>Command-Line Name: <B><A NAME="M-highlightcolor">-highlightcolor</A></B>
<DT>Database Name: <B>highlightColor</B>
<DT>Database Class: <B>HighlightColor</B>
<DD>Specifies the color to use for the traversal highlight rectangle that is
drawn around the widget when it has the input focus.
<P><DT>Command-Line Name: <B><A NAME="M-highlightthickness">-highlightthickness</A></B>
<DT>Database Name: <B>highlightThickness</B>
<DT>Database Class: <B>HighlightThickness</B>
<DD>Specifies a non-negative value indicating the width of the highlight
rectangle to draw around the outside of the widget when it has the
input focus.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
If the value is zero, no focus highlight is drawn around the widget.
<P><DT>Command-Line Name: <B><A NAME="M-image">-image</A></B>
<DT>Database Name: <B>image</B>
<DT>Database Class: <B>Image</B>
<DD>Specifies an image to display in the widget, which must have been
created with the <B><A HREF="../TkCmd/image.htm">image create</A></B> command.
Typically, if the <B>image</B> option is specified then it overrides other
options that specify a bitmap or textual value to display in the widget;
the <B>image</B> option may be reset to an empty string to re-enable
a bitmap or text display.
<P><DT>Command-Line Name: <B><A NAME="M-insertbackground">-insertbackground</A></B>
<DT>Database Name: <B>insertBackground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies the color to use as background in the area covered by the
insertion cursor. This color will normally override either the normal
background for the widget (or the selection background if the insertion
cursor happens to fall in the selection).
<P><DT>Command-Line Name: <B><A NAME="M-insertborderwidth">-insertborderwidth</A></B>
<DT>Database Name: <B>insertBorderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating the width
of the 3-D border to draw around the insertion cursor.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-insertofftime">-insertofftime</A></B>
<DT>Database Name: <B>insertOffTime</B>
<DT>Database Class: <B>OffTime</B>
<DD>Specifies a non-negative integer value indicating the number of
milliseconds the insertion cursor should remain ``off'' in each blink cycle.
If this option is zero then the cursor doesn't blink: it is on
all the time.
<P><DT>Command-Line Name: <B><A NAME="M-insertontime">-insertontime</A></B>
<DT>Database Name: <B>insertOnTime</B>
<DT>Database Class: <B>OnTime</B>
<DD>Specifies a non-negative integer value indicating the number of
milliseconds the insertion cursor should remain ``on'' in each blink cycle.
<P><DT>Command-Line Name: <B><A NAME="M-insertwidth">-insertwidth</A></B>
<DT>Database Name: <B>insertWidth</B>
<DT>Database Class: <B>InsertWidth</B>
<DD>Specifies a value indicating the total width of the insertion cursor.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
If a border has been specified for the insertion
cursor (using the <B>insertBorderWidth</B> option), the border
will be drawn inside the width specified by the <B>insertWidth</B>
option.
<P><DT>Command-Line Name: <B><A NAME="M-jump">-jump</A></B>
<DT>Database Name: <B>jump</B>
<DT>Database Class: <B>Jump</B>
<DD>For widgets with a slider that can be dragged to adjust a value,
such as scrollbars, this option determines when
notifications are made about changes in the value.
The option's value must be a boolean of the form accepted by
<B><A HREF="../TclLib/GetInt.htm">Tcl_GetBoolean</A></B>.
If the value is false, updates are made continuously as the
slider is dragged.
If the value is true, updates are delayed until the mouse button
is released to end the drag; at that point a single notification
is made (the value ``jumps'' rather than changing smoothly).
<P><DT>Command-Line Name: <B><A NAME="M-justify">-justify</A></B>
<DT>Database Name: <B>justify</B>
<DT>Database Class: <B>Justify</B>
<DD>When there are multiple lines of text displayed in a widget, this
option determines how the lines line up with each other.
Must be one of <B>left</B>, <B>center</B>, or <B>right</B>.
<B>Left</B> means that the lines' left edges all line up, <B>center</B>
means that the lines' centers are aligned, and <B>right</B> means
that the lines' right edges line up.
<P><DT>Command-Line Name: <B><A NAME="M-orient">-orient</A></B>
<DT>Database Name: <B>orient</B>
<DT>Database Class: <B>Orient</B>
<DD>For widgets that can lay themselves out with either a horizontal
or vertical orientation, such as scrollbars, this option specifies
which orientation should be used. Must be either <B>horizontal</B>
or <B>vertical</B> or an abbreviation of one of these.
<P><DT>Command-Line Name: <B><A NAME="M-padx">-padx</A></B>
<DT>Database Name: <B>padX</B>
<DT>Database Class: <B>Pad</B>
<DD>Specifies a non-negative value indicating how much extra space
to request for the widget in the X-direction.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
When computing how large a window it needs, the widget will
add this amount to the width it would normally need (as determined
by the width of the things displayed in the widget); if the geometry
manager can satisfy this request, the widget will end up with extra
internal space to the left and/or right of what it displays inside.
Most widgets only use this option for padding text: if they are
displaying a bitmap or image, then they usually ignore padding
options.
<P><DT>Command-Line Name: <B><A NAME="M-pady">-pady</A></B>
<DT>Database Name: <B>padY</B>
<DT>Database Class: <B>Pad</B>
<DD>Specifies a non-negative value indicating how much extra space
to request for the widget in the Y-direction.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
When computing how large a window it needs, the widget will add
this amount to the height it would normally need (as determined by
the height of the things displayed in the widget); if the geometry
manager can satisfy this request, the widget will end up with extra
internal space above and/or below what it displays inside.
Most widgets only use this option for padding text: if they are
displaying a bitmap or image, then they usually ignore padding
options.
<P><DT>Command-Line Name: <B><A NAME="M-relief">-relief</A></B>
<DT>Database Name: <B>relief</B>
<DT>Database Class: <B>Relief</B>
<DD>Specifies the 3-D effect desired for the widget. Acceptable
values are <B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>,
<B>solid</B>, and <B>groove</B>.
The value
indicates how the interior of the widget should appear relative
to its exterior; for example, <B>raised</B> means the interior of
the widget should appear to protrude from the screen, relative to
the exterior of the widget.
<P><DT>Command-Line Name: <B><A NAME="M-repeatdelay">-repeatdelay</A></B>
<DT>Database Name: <B>repeatDelay</B>
<DT>Database Class: <B>RepeatDelay</B>
<DD>Specifies the number of milliseconds a button or key must be held
down before it begins to auto-repeat. Used, for example, on the
up- and down-arrows in scrollbars.
<P><DT>Command-Line Name: <B><A NAME="M-repeatinterval">-repeatinterval</A></B>
<DT>Database Name: <B>repeatInterval</B>
<DT>Database Class: <B>RepeatInterval</B>
<DD>Used in conjunction with <B>repeatDelay</B>: once auto-repeat
begins, this option determines the number of milliseconds between
auto-repeats.
<P><DT>Command-Line Name: <B><A NAME="M-selectbackground">-selectbackground</A></B>
<DT>Database Name: <B>selectBackground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies the background color to use when displaying selected
items.
<P><DT>Command-Line Name: <B><A NAME="M-selectborderwidth">-selectborderwidth</A></B>
<DT>Database Name: <B>selectBorderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating the width
of the 3-D border to draw around selected items.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-selectforeground">-selectforeground</A></B>
<DT>Database Name: <B>selectForeground</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies the foreground color to use when displaying selected
items.
<P><DT>Command-Line Name: <B><A NAME="M-setgrid">-setgrid</A></B>
<DT>Database Name: <B>setGrid</B>
<DT>Database Class: <B>SetGrid</B>
<DD>Specifies a boolean value that determines whether this widget controls the
resizing grid for its top-level window.
This option is typically used in text widgets, where the information
in the widget has a natural size (the size of a character) and it makes
sense for the window's dimensions to be integral numbers of these units.
These natural window sizes form a grid.
If the <B>setGrid</B> option is set to true then the widget will
communicate with the window manager so that when the user interactively
resizes the top-level window that contains the widget, the dimensions of
the window will be displayed to the user in grid units and the window
size will be constrained to integral numbers of grid units.
See the section GRIDDED GEOMETRY MANAGEMENT in the <B><A HREF="../TkCmd/wm.htm">wm</A></B> manual
entry for more details.
<P><DT>Command-Line Name: <B><A NAME="M-takefocus">-takefocus</A></B>
<DT>Database Name: <B>takeFocus</B>
<DT>Database Class: <B>TakeFocus</B>
<DD>Determines whether the window accepts the focus during keyboard
traversal (e.g., Tab and Shift-Tab).
Before setting the focus to a window, the traversal scripts
consult the value of the <B>takeFocus</B> option.
A value of <B>0</B> means that the window should be skipped entirely
during keyboard traversal.
<B>1</B> means that the window should receive the input
focus as long as it is viewable (it and all of its ancestors are mapped).
An empty value for the option means that the traversal scripts make
the decision about whether or not to focus on the window: the current
algorithm is to skip the window if it is
disabled, if it has no key bindings, or if it is not viewable.
If the value has any other form, then the traversal scripts take
the value, append the name of the window to it (with a separator space),
and evaluate the resulting string as a Tcl script.
The script must return <B>0</B>, <B>1</B>, or an empty string: a
<B>0</B> or <B>1</B> value specifies whether the window will receive
the input focus, and an empty string results in the default decision
described above.
Note: this interpretation of the option is defined entirely by
the Tcl scripts that implement traversal: the widget implementations
ignore the option entirely, so you can change its meaning if you
redefine the keyboard traversal scripts.
<P><DT>Command-Line Name: <B><A NAME="M-text">-text</A></B>
<DT>Database Name: <B><A HREF="../TkCmd/text.htm">text</A></B>
<DT>Database Class: <B><A HREF="../TkCmd/text.htm">Text</A></B>
<DD>Specifies a string to be displayed inside the widget. The way in which
the string is displayed depends on the particular widget and may be
determined by other options, such as <B>anchor</B> or <B>justify</B>.
<P><DT>Command-Line Name: <B><A NAME="M-textvariable">-textvariable</A></B>
<DT>Database Name: <B>textVariable</B>
<DT>Database Class: <B><A HREF="../TclCmd/variable.htm">Variable</A></B>
<DD>Specifies the name of a variable. The value of the variable is a text
string to be displayed inside the widget; if the variable value changes
then the widget will automatically update itself to reflect the new value.
The way in which the string is displayed in the widget depends on the
particular widget and may be determined by other options, such as
<B>anchor</B> or <B>justify</B>.
<P><DT>Command-Line Name: <B><A NAME="M-troughcolor">-troughcolor</A></B>
<DT>Database Name: <B>troughColor</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies the color to use for the rectangular trough areas
in widgets such as scrollbars and scales.
<P><DT>Command-Line Name: <B><A NAME="M-underline">-underline</A></B>
<DT>Database Name: <B>underline</B>
<DT>Database Class: <B>Underline</B>
<DD>Specifies the integer index of a character to underline in the widget.
This option is used by the default bindings to implement keyboard
traversal for menu buttons and menu entries.
0 corresponds to the first character of the text displayed in the
widget, 1 to the next character, and so on.
<P><DT>Command-Line Name: <B><A NAME="M-wraplength">-wraplength</A></B>
<DT>Database Name: <B>wrapLength</B>
<DT>Database Class: <B>WrapLength</B>
<DD>For widgets that can perform word-wrapping, this option specifies
the maximum line length.
Lines that would exceed this length are wrapped onto the next line,
so that no line is longer than the specified length.
The value may be specified in any of the standard forms for
screen distances.
If this value is less than or equal to 0 then no wrapping is done: lines
will break only at newline characters in the text.
<P><DT>Command-Line Name: <B><A NAME="M-xscrollcommand">-xscrollcommand</A></B>
<DT>Database Name: <B>xScrollCommand</B>
<DT>Database Class: <B>ScrollCommand</B>
<DD>Specifies the prefix for a command used to communicate with horizontal
scrollbars.
When the view in the widget's window changes (or
whenever anything else occurs that could change the display in a
scrollbar, such as a change in the total size of the widget's
contents), the widget will
generate a Tcl command by concatenating the scroll command and
two numbers.
Each of the numbers is a fraction between 0 and 1, which indicates
a position in the document. 0 indicates the beginning of the document,
1 indicates the end, .333 indicates a position one third the way through
the document, and so on.
The first fraction indicates the first information in the document
that is visible in the window, and the second fraction indicates
the information just after the last portion that is visible.
The command is
then passed to the Tcl interpreter for execution. Typically the
<B>xScrollCommand</B> option consists of the path name of a scrollbar
widget followed by ``set'', e.g. ``.x.scrollbar set'': this will cause
the scrollbar to be updated whenever the view in the window changes.
If this option is not specified, then no command will be executed.
<P><DT>Command-Line Name: <B><A NAME="M-yscrollcommand">-yscrollcommand</A></B>
<DT>Database Name: <B>yScrollCommand</B>
<DT>Database Class: <B>ScrollCommand</B>
<DD>Specifies the prefix for a command used to communicate with vertical
scrollbars. This option is treated in the same way as the
<B>xScrollCommand</B> option, except that it is used for vertical
scrollbars and is provided by widgets that support vertical scrolling.
See the description of <B>xScrollCommand</B> for details
on how this option is used.
</DL>
<H3><A NAME="M4">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#class">class</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/S.htm#standard option">standard option</A>, <A href="../Keywords/S.htm#switch">switch</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -1,15 +0,0 @@
<TITLE>About Tcl/Tk Project Manager</TITLE>
<center><h1>Tcl/Tk Project Manager</h1></center>
<p>Author: Sergey Kalinin <a href="mailto:banzaj28@yandex.ru">banzaj28@yandex.ru</a>
<br>Home page: <a href="http://nuk-svk.ru">http://nuk-svk.ru</a>
<p>Tcl/Tk Project Manager is a full IDE for programming in TCL/Tk.
It includes a project and file manager, a source editor with
syntax highlighting and procedure navigation, a context-sensitive
help system, and much more. Included TkDIFF+ - compare tools and TkREGEXP - a graphical front-end to write/debug regular expression.
<br>Working an Unix (Linux tested) and Windows.
<p><center>&copy; Copyright <a href="http://nuk-svk.ru">Sergey Kalinin</a>, 2002

View File

@ -1,14 +0,0 @@
<TITLE>Begin work</TITLE>
<CENTER><h1>Begin work with ProjMan</h1></center>
<p>CREAT NEW PROJECT
<p>Select "New project" for creation new project or "Open project" for opened existing project into "Projects" menu.
<p>SET ACTIVE PROJECT
<p>All operation with projects into ProjMan implemented only active project.
Click mouse on project name in tree for set active project.
Name of current (active) project You will see into status bar.
<p>DELETING PROJECT
<p>For deleting project You must select "Delete project" into "Projects" menu.
<p>EDITING FILE
<p>For editing file click twice on file name into tree.

View File

@ -1,3 +0,0 @@
<TITLE>Help system</TITLE>
<CENTER><h1>Help system manual</h1></center>
<p>Needed translate from russian language!

View File

@ -1,34 +0,0 @@
<TITLE>Hot keys</TITLE>
<center><h1>Hot keys</h1></center>
<p><b>Ctrl + A</b> - Saved file eith different name
<p><b>Ctrl + C</b> - Copy selected text into clipboard.
<p><b>Ctrl + F</b> - Search words into text.
<p><b>Ctrl + G</b> - Goto line with number
<p><b>Ctrl + J</b> - Get procedure list
<p><b>Ctrl + L</b> - Get word list
<p><b>Ctrl + M</b> - Switch editors open tabs
<p><b>Ctrl + N</b> - Create new file
<p><b>Ctrl + O</b> - Opened existing file.
<p><b>Ctrl + Q</b> - Quit from Project Manager.
<p><b>Ctrl + R</b> - Find and replacement words into text.
<p><b>Ctrl + S</b> - Saved current opened file.
<p><b>Ctrl + T</b> - Reverses the order of the two characters to the right of the insertion cursor
<p><b>Ctrl + U</b> - Jump cursor on open/close bracked
<p><b>Ctrl + V</b> - Insert text from clipboard
<p><b>Ctrl + W</b> - Close current opened file.
<p><b>Ctrl + X</b> - Cut selected text into clipboard.
<p><b>Ctrl + Z</b> - Undo last operation
<p><b>Ctrl + /</b> - Selects the entire contents of the widget
<p><b>Ctrl + \\</b> - Clears any selection in the widget
<p><b>F1</b> - Execute context-sensitive help system
<p><b>F3</b> - Repeat search
<p><b>F5</b> - Make archive. Workined with active project only.
<p><b>F6</b> - Make RPM
<p><b>F9</b> - Run current project.

View File

@ -1,81 +0,0 @@
<title>VisualREGEXP</title>
<center><h1>VisualREGEXP</h1>
<p>Copyright (c) 2000-2001 Laurent Riesterer
<br>Latest version 2.2</center>
<p><b>ABOUT</b>
<p>VisualREGEXP helps you to design, debug or more generally work with regular
expression. As it is often difficult to write the right regexp at the first
try, this tool will show you the effect of your regexp on a sample you can
choose.
<p><b>REQUIREMENTS</b>
<p>This program requires Tcl/Tk 8.3.0 or later.
<p><b>HOW TO USE</b>
<p><b>Launching the program</b>
<p>On Unix, use 'chmod +x ...' to make the program executable. You can then
integrate it with your Window Manager or put it into an executable path.
<br>On Windows, create a shortcut and invoke the script with 'wish.exe'
<p><b>Design of regexps</b>
<p>To design regexp, just type the expression in the top text widget.
Press the 'Go' button to highlight the matched part of the text in the sample
text widget.
<p>To get a quickref of the regexp syntax use the menu 'View/Show regexp help'.
<p>You can specify some options using the checkboxes (please read Tcl help to
learn the meaning of these options).
<p><b>Recursive design of regexps</b>
<p>Sometimes you will need more than one step to extract the information you want
from the sample. For example, imagine you want to retrieve information from
an HTML table inside an another HTML table :
'<html><body>
<table border=1>
<tr><td>
<table bgcolor="#FFFF00" border=1>
<tr> <td>One</td> <td>1</td> </tr>
<tr> <td>Two</td> <td>2</td> </tr>
</table>
<tr> <td>Foo</td> <td>Bar</td> </tr>
</table>
</body></html>'
<p>You cannot use one global regexp to extract the two lines "One 1" and "Two 2".
You have to use a first regexp to narrow the processed region.
Type the following regexp '<table bg[^>]*?>(.*?)<table>' and press 'Go'.
You see now that the interessing area is shown in blue. Press the Match '1'
button which will extract the blue text (the regexp to use to get this text
is then printed on the console).
Now use '<td>(.*?)</td>.*?<td>(.*?)</td>' to get the information you need.
<p><b>Optimization of regexps</b>
<p>When you need to match a list of words, use the menu
'Insert regexp/Make regexp' to design an optimized version of the word list.
<p>For example, the list 'aa aab ab ad' is optimized into 'a(ab?|b|d)'.
<p><b>Processing the sample text</b>
<p>Use can use VisualREGEXP to perform modification of a text.
Just use the menu 'Select mode/Use replace'. You can now design a regexp to
match what you want. Then use the replace text widget to enter the substitution
you want to apply (use \0, \1, \2, ... to match the subregexp, use the color
to map the number with the matched sub-expressions).
<p>After the substitution, you can save the new text using the 'File/Save ...'
menu. You can let the program choose the end-of-line format or force them for
a specific environment (Unix, Windows, Mac).
<p><b>CONTACT</b>
<p>Send your bug reports, suggestions or any feedback to:
<dir>
<p><a href="mailto:laurent.riesterer@free.fr">laurent.riesterer@free.fr</a><br>
<a href="http://laurent.riesterer.free.fr">http://laurent.riesterer.free.fr</a>
</dir>

View File

@ -1,108 +0,0 @@
<title>TkDIFF+</title>
<center><h1>TkDIFF+</h1></center>
<p>The top row contains the File, Edit, View, Mark, Merge and Help menus. The second row contains the labels which identify the contents of each text window. Below that is a toolbar which contains navigation and merge selection tools.
<p>The left-most text widget displays the contents of FILE1, the most recently checked-in revision, REV or REV1, respectively (as per the startup options described in the "On Command Line" help). The right-most widget displays the contents of FILE2, FILE or REV2, respectively. Clicking the right mouse button over either of these windows will give you a context sensitive menu with actions that will act on the window you clicked over. For example, if you click right over the right hand window and select "Edit", the file displayed on the right hand side will be loaded into a text editor.
<p>At the bottom of the display is a two line window called the "Line Comparison" window. This will show the "current line" from the left and right windows, one on top of the other. The "current line" is defined by the line that has the blinking insertion cursor, which can be set by merely clicking on any line in the display. This window may be hidden if the View menu item Show Line Comparison is deselected.
<p>All difference regions (DRs) are highlighted to set them apart from the surrounding text. The current difference region, or CDR, is further set apart so that it can be correlated to its partner in the other text widget (that is, the CDR on the left matches the CDR on the right).
<p>Changing the CDR
<p>The CDR can be changed in a sequential manner by means of the Next and Previous buttons. The First and Last buttons allow you to quickly navigate to the first or last CDR, respectively. For random access to the DRs, use the dropdown listbox in the toolbar or the diff map, described below.
<p>By clicking right over a window and using the popup menu you can select Find Nearest Diff to find the diff record nearest the point where you clicked.
<p>You may also select any highlighted diff region as the current diff region by double-clicking on it.
<p>Operations
<p>1. From the File menu:
<p>The New... button displays a dialog where you may choose two files to compare. Selecting "Ok" from the dialog will diff the two files. The Recompute Diffs button recomputes the differences between the two files whose names appear at the top of the TkDiff window. The Write Report... lets you create a report file that contains the information visible in the windows. Lastly, the Exit button terminates TkDiff.
<p>2. From the Edit menu:
<p>Copy copies the currently selected text to the system clipboard. Find pops up a dialog to let you search either text window for a specified text string. Edit File 1 and Edit File 2 launch an editor on the files displayed in the left- and right-hand panes. Preferences pops up a dialog box from which display (and other) options can be
changed and saved.
<p>3. From the View menu:
<p>Show Line Numbers toggles the display of line numbers in the text widgets. If Synchronize Scrollbars is on, the left and right text widgets are synchronized i.e. scrolling one of the windows scrolls the other. If Auto Center is on, pressing the Next or Prev buttons centers the new CDR automatically. Show Diff Map toggles the display of the diff map (see below) on or off. Show Merge Preview shows or hides the merge preview (see below). Show Line Comparison toggles the display of the "line comparison" window at the bottom of the display.
<p>4. From the Mark menu:
The Mark Current Diff creates a new toolbar button that will jump to the current diff region. The Clear Current Diff Mark will remove the toolbar mark button associated with the current diff region, if one exists.
<p>5. From the Merge menu:
The Show Merge Window button pops up a window with the current merged version of the two files. The Write Merge File button will allow you to save the contents of that window to a file.
<p>6. From the Help menu:
The About TkDiff button displays copyright and author information. The On GUI button generates this window. The On Command Line button displays help on the TkDiff command line options. The On Preferences button displays help on the user-settable preferences.
<p>7. From the toolbar:
The first tool is a dropdown list of all of the differences in a standard diff-type format. You may use this list to go directly to any diff record. The Next and Previous buttons take you to the "next" and "previous" DR, respectively. The First and Last buttons take you to the "first" and "last" DR. The Center button centers the CDRs in their respective text windows. You can set Auto Center in Preferences to do this automatically for you as you navigate through the diff records.
<p>Keyboard Navigation
<p>When a text widget has the focus, you may use the following shortcut keys:
<dir>
f First diff
c Center current diff
l Last diff
n Next diff
p Previous diff
1 Merge Choice 1
2 Merge Choice 2
u Switch back to directories view
</dir>
<p>The cursor, Home, End, PageUp and PageDown keys work as expected, adjusting the view in whichever text window has the focus. Note that if Synchronize Scrollbars is set in Preferences, both windows will scroll at the same time.
<p>Scrolling
<p>To scroll the text widgets independently, make sure Synchronize Scrollbars in Preferences is off. If it is on, scrolling any text widget scrolls all others. Scrolling does not change the current diff record (CDR).
<p>Diff Marks
<p>You can set "markers" at specific diff regions for easier navigation. To do this, click on the Set Mark button. It will create a new toolbar button that will jump back to this diff region. To clear a diff mark, go to that diff record and click on the Clear Mark button.
<p>Diff Map
<p>The diff map is a map of all the diff regions. It is shown in the middle of the main window if "Diff Map" on the View menu is on. The map is a miniature of the file's diff regions from top to bottom. Each diff region is rendered as a patch of color, Delete as red, Insert as green and Change as blue. In the case of a 3-way merge, overlap regions are marked in yellow. The height of each patch corresponds to the relative size of the diff region. A thumb lets you interact with the map as if it were a scrollbar.
All diff regions are drawn on the map even if too small to be visible. For large files with small diff regions, this may result in patches overwriting each other.
<p>Merging
<p>To merge the two files, go through the difference regions (via "Next", "Prev" or whatever other means you prefer) and select "Left" or "Right" (next to the "Merge Choice:" label) for each. Selecting "Left" means that the the left-most file's version of the difference will be used in creating the final result; choosing "Right" means that the right-most file's difference will be used. Each choice is recorded, and can be changed arbitrarily many times. To commit the final, merged result to disk, choose "Write Merge File..." from the Merge menu.
<p>Merge Preview
<p>To see a preview of the file that would be written by "Write Merge File...", select "Show Merge Window" in the View menu. A separate window is shown containing the preview. It is updated as you change merge choices. It is synchronized with the other text widgets if "Synchronize Scrollbars" is on.
<p>Credits
<p>Thanks to Wayne Throop for beta testing, and for giving valuable suggestions (and code!) along the way. Thanks (and credit) to John Heidemann for his window tags routines, which I shamelessly stole (with permission) out of his great Tk-based Solitaire game, Klondike. Thanks to D. Elson (author of tkCVS) for writing the code that extends the RCS support to include CVS. Thanks to John Brown for writing the code that extends the revision control support to SCCS.
<p>Major thanks to Warren Jones (wjones@tc.fluke.com) and Peter Brandstrom (qraprbm@era-lvk.ericsson.se) for going way above and beyond the call. Warren added support for NT and cleaned up the Unix code as well. Peter, independently, did the same thing and then added the new interface. The end result was the 2.x series... Many, many thanks to you both!
<p>Major thanks also to Bryan Oakley (boakley@vignette.com), who made the GUI even more appealing... Bryan did a ton of work, the result of which was the 3.x series. Dorothy Robinson provided helpful comments and patches for 3.x, too. Thanks, Bryan and Dorothy!
<p>Thanks to Dean Jones (dean@gallant.com) for permission to use his icons in the toolbar.
<p>Thanks to Laurent Riesterer (laurent.riesterer@free.fr) for adding support to display the differences between files in directories.
<p>Many, many thanks also to the many others who have written and provided ideas and encouragement and code since TkDiff was first released! I haven't done much coding since the 1.x series; almost every new feature that has come about since then has been the result of volunteer efforts. Thanks, folks!
<p>Author
<br>John M. Klassa
<p>Comments
<p>Questions and comments should be sent to the TkDiff mailing list at
<a href="http://www.accurev.com/free/tkdiff">http://www.accurev.com/free/tkdiff</a>.
<p>To get it, please visit:
<br><a href="http://www.gnu.org/gnulist/production/diffutils.html">http://www.gnu.org/gnulist/production/diffutils.html

View File

@ -1,12 +0,0 @@
<title>Tcl/Tk Project Manager</title>
<a href="pmabout.html">About</a><br>
<a href="pmbegin.html">Working with projman</a><br>
<a href="pmhelp.html">Help system</a> <br>
<a href="pmregexp.html">Working with VisualREGEXP</a><br>
<a href="pmtkdiff.html">Working with TkDIFF+</a><br>
<a href="pmkeys.html">Hot keys</a><br>
<a href="gpl.en">License</a><br>

View File

@ -1,194 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - Tcl manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="Tcl.htm#M2" NAME="L2">NAME</A>
<DL><DD>Tcl - Summary of Tcl language syntax.</DL>
<DD><A HREF="Tcl.htm#M3" NAME="L3">DESCRIPTION</A>
<DL>
<DL>
<DD><A HREF="Tcl.htm#M4" NAME="L4"><B>$</B><I>name</I></A>
<DD><A HREF="Tcl.htm#M5" NAME="L5"><B>$</B><I>name</I><B>(</B><I>index</I><B>)</B></A>
<DD><A HREF="Tcl.htm#M6" NAME="L6"><B>${</B><I>name</I><B>}</B></A>
</DL>
<DL>
<DD><A HREF="Tcl.htm#M7" NAME="L7">&#92;<B>a</B></A>
<DD><A HREF="Tcl.htm#M8" NAME="L8">&#92;<B>b</B></A>
<DD><A HREF="Tcl.htm#M9" NAME="L9">&#92;<B>f</B></A>
<DD><A HREF="Tcl.htm#M10" NAME="L10">&#92;<B>n</B></A>
<DD><A HREF="Tcl.htm#M11" NAME="L11">&#92;<B>r</B></A>
<DD><A HREF="Tcl.htm#M12" NAME="L12">&#92;<B>t</B></A>
<DD><A HREF="Tcl.htm#M13" NAME="L13">&#92;<B>v</B></A>
<DD><A HREF="Tcl.htm#M14" NAME="L14">&#92;<B>&lt;newline&gt;</B><I>whiteSpace</I></A>
<DD><A HREF="Tcl.htm#M15" NAME="L15">&#92;&#92;</A>
<DD><A HREF="Tcl.htm#M16" NAME="L16">&#92;<I>ooo</I></A>
<DD><A HREF="Tcl.htm#M17" NAME="L17">&#92;<B>x</B><I>hh</I></A>
<DD><A HREF="Tcl.htm#M18" NAME="L18">&#92;<B>u</B><I>hhhh</I></A>
</DL>
</DL>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
Tcl - Summary of Tcl language syntax.
<H3><A NAME="M3">DESCRIPTION</A></H3>
The following rules define the syntax and semantics of the Tcl language:
<P>
<DL>
<P><DT>[1]<DD>
A Tcl script is a string containing one or more commands.
Semi-colons and newlines are command separators unless quoted as
described below.
Close brackets are command terminators during command substitution
(see below) unless quoted.
<P><DT>[2]<DD>
A command is evaluated in two steps.
First, the Tcl interpreter breaks the command into <I>words</I>
and performs substitutions as described below.
These substitutions are performed in the same way for all
commands.
The first word is used to locate a command procedure to
carry out the command, then all of the words of the command are
passed to the command procedure.
The command procedure is free to interpret each of its words
in any way it likes, such as an integer, variable name, list,
or Tcl script.
Different commands interpret their words differently.
<P><DT>[3]<DD>
Words of a command are separated by white space (except for
newlines, which are command separators).
<P><DT>[4]<DD>
If the first character of a word is double-quote (``&quot;'') then
the word is terminated by the next double-quote character.
If semi-colons, close brackets, or white space characters
(including newlines) appear between the quotes then they are treated
as ordinary characters and included in the word.
Command substitution, variable substitution, and backslash substitution
are performed on the characters between the quotes as described below.
The double-quotes are not retained as part of the word.
<P><DT>[5]<DD>
If the first character of a word is an open brace (``{'') then
the word is terminated by the matching close brace (``}'').
Braces nest within the word: for each additional open
brace there must be an additional close brace (however,
if an open brace or close brace within the word is
quoted with a backslash then it is not counted in locating the
matching close brace).
No substitutions are performed on the characters between the
braces except for backslash-newline substitutions described
below, nor do semi-colons, newlines, close brackets,
or white space receive any special interpretation.
The word will consist of exactly the characters between the
outer braces, not including the braces themselves.
<P><DT>[6]<DD>
If a word contains an open bracket (``['') then Tcl performs
<I>command substitution</I>.
To do this it invokes the Tcl interpreter recursively to process
the characters following the open bracket as a Tcl script.
The script may contain any number of commands and must be terminated
by a close bracket (``]'').
The result of the script (i.e. the result of its last command) is
substituted into the word in place of the brackets and all of the
characters between them.
There may be any number of command substitutions in a single word.
Command substitution is not performed on words enclosed in braces.
<P><DT>[7]<DD>
If a word contains a dollar-sign (``$'') then Tcl performs <I>variable
substitution</I>: the dollar-sign and the following characters are
replaced in the word by the value of a variable.
Variable substitution may take any of the following forms:
<P>
<DL>
<P><DT><A NAME="M4"><B>$</B><I>name</I></A><DD>
<I>Name</I> is the name of a scalar variable; the name is terminated
by any character that isn't a letter, digit, or underscore.
<P><DT><A NAME="M5"><B>$</B><I>name</I><B>(</B><I>index</I><B>)</B></A><DD>
<I>Name</I> gives the name of an array variable and <I>index</I> gives
the name of an element within that array.
<I>Name</I> must contain only letters, digits, and underscores.
Command substitutions, variable substitutions, and backslash
substitutions are performed on the characters of <I>index</I>.
<P><DT><A NAME="M6"><B>${</B><I>name</I><B>}</B></A><DD>
<I>Name</I> is the name of a scalar variable. It may contain any
characters whatsoever except for close braces.
</DL><P>There may be any number of variable substitutions in a single word.
Variable substitution is not performed on words enclosed in braces.<DL>
<P></DL>
<P><DT>[8]<DD>
If a backslash (``&#92;'') appears within a word then
<I>backslash substitution</I> occurs.
In all cases but those described below the backslash is dropped and
the following character is treated as an ordinary
character and included in the word.
This allows characters such as double quotes, close brackets,
and dollar signs to be included in words without triggering
special processing.
The following table lists the backslash sequences that are
handled specially, along with the value that replaces each sequence.
<P>
<DL>
<P><DT><A NAME="M7">&#92;<B>a</B></A><DD>
Audible alert (bell) (0x7).
<P><DT><A NAME="M8">&#92;<B>b</B></A><DD>
Backspace (0x8).
<P><DT><A NAME="M9">&#92;<B>f</B></A><DD>
Form feed (0xc).
<P><DT><A NAME="M10">&#92;<B>n</B></A><DD>
Newline (0xa).
<P><DT><A NAME="M11">&#92;<B>r</B></A><DD>
Carriage-return (0xd).
<P><DT><A NAME="M12">&#92;<B>t</B></A><DD>
Tab (0x9).
<P><DT><A NAME="M13">&#92;<B>v</B></A><DD>
Vertical tab (0xb).
<P><DT><A NAME="M14">&#92;<B>&lt;newline&gt;</B><I>whiteSpace</I></A><DD>
A single space character replaces the backslash, newline, and all spaces
and tabs after the newline. This backslash sequence is unique in that it
is replaced in a separate pre-pass before the command is actually parsed.
This means that it will be replaced even when it occurs between braces,
and the resulting space will be treated as a word separator if it isn't
in braces or quotes.
<P><DT><A NAME="M15">&#92;&#92;</A><DD>
Backslash (``&#92;'').
<P><DT><A NAME="M16">&#92;<I>ooo</I></A><DD>
The digits <I>ooo</I> (one, two, or three of them) give an eight-bit octal
value for the Unicode character that will be inserted. The upper bits of the
Unicode character will be 0.
<P><DT><A NAME="M17">&#92;<B>x</B><I>hh</I></A><DD>
The hexadecimal digits <I>hh</I> give an eight-bit hexadecimal value for the
Unicode character that will be inserted. Any number of hexadecimal digits
may be present; however, all but the last two are ignored (the result is
always a one-byte quantity). The upper bits of the Unicode character will
be 0.
<P><DT><A NAME="M18">&#92;<B>u</B><I>hhhh</I></A><DD>
The hexadecimal digits <I>hhhh</I> (one, two, three, or four of them) give a
sixteen-bit hexadecimal value for the Unicode character that will be
inserted.
</DL><P>Backslash substitution is not performed on words enclosed in braces,
except for backslash-newline as described above.<DL>
<P></DL>
<P><DT>[9]<DD>
If a hash character (``#'') appears at a point where Tcl is
expecting the first character of the first word of a command,
then the hash character and the characters that follow it, up
through the next newline, are treated as a comment and ignored.
The comment character only has significance when it appears
at the beginning of a command.
<P><DT>[10]<DD>
Each character is processed exactly once by the Tcl interpreter
as part of creating the words of a command.
For example, if variable substitution occurs then no further
substitutions are performed on the value of the variable; the
value is inserted into the word verbatim.
If command substitution occurs then the nested command is
processed entirely by the recursive call to the Tcl interpreter;
no substitutions are performed before making the recursive
call and no additional substitutions are performed on the result
of the nested script.
<P><DT>[11]<DD>
Substitutions do not affect the word boundaries of a command.
For example, during variable substitution the entire value of
the variable becomes part of a single word, even if the variable's
value contains spaces.
<P></DL>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,114 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - after manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="after.htm#M2" NAME="L19">NAME</A>
<DL><DD>after - Execute a command after a time delay</DL>
<DD><A HREF="after.htm#M3" NAME="L20">SYNOPSIS</A>
<DL>
<DD><B>after </B><I>ms</I>
<DD><B>after </B><I>ms </I>?<I>script script script ...</I>?
<DD><B>after cancel </B><I>id</I>
<DD><B>after cancel </B><I>script script script ...</I>
<DD><B>after idle </B>?<I>script script script ...</I>?
<DD><B>after info </B>?<I>id</I>?
</DL>
<DD><A HREF="after.htm#M4" NAME="L21">DESCRIPTION</A>
<DL>
<DD><A HREF="after.htm#M5" NAME="L22"><B>after </B><I>ms</I></A>
<DD><A HREF="after.htm#M6" NAME="L23"><B>after </B><I>ms </I>?<I>script script script ...</I>?</A>
<DD><A HREF="after.htm#M7" NAME="L24"><B>after cancel </B><I>id</I></A>
<DD><A HREF="after.htm#M8" NAME="L25"><B>after cancel </B><I>script script ...</I></A>
<DD><A HREF="after.htm#M9" NAME="L26"><B>after idle </B><I>script </I>?<I>script script ...</I>?</A>
<DD><A HREF="after.htm#M10" NAME="L27"><B>after info </B>?<I>id</I>?</A>
</DL>
<DD><A HREF="after.htm#M11" NAME="L28">SEE ALSO</A>
<DD><A HREF="after.htm#M12" NAME="L29">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
after - Execute a command after a time delay
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>after </B><I>ms</I><BR>
<B>after </B><I>ms </I>?<I>script script script ...</I>?<BR>
<B>after cancel </B><I>id</I><BR>
<B>after cancel </B><I>script script script ...</I><BR>
<B>after idle </B>?<I>script script script ...</I>?<BR>
<B>after info </B>?<I>id</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is used to delay execution of the program or to execute
a command in background sometime in the future. It has several forms,
depending on the first argument to the command:
<P>
<DL>
<P><DT><A NAME="M5"><B>after </B><I>ms</I></A><DD>
<I>Ms</I> must be an integer giving a time in milliseconds.
The command sleeps for <I>ms</I> milliseconds and then returns.
While the command is sleeping the application does not respond to
events.
<P><DT><A NAME="M6"><B>after </B><I>ms </I>?<I>script script script ...</I>?</A><DD>
In this form the command returns immediately, but it arranges
for a Tcl command to be executed <I>ms</I> milliseconds later as an
event handler.
The command will be executed exactly once, at the given time.
The delayed command is formed by concatenating all the <I>script</I>
arguments in the same fashion as the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command.
The command will be executed at global level (outside the context
of any Tcl procedure).
If an error occurs while executing the delayed command then the
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B> mechanism is used to report the error.
The <B>after</B> command returns an identifier that can be used
to cancel the delayed command using <B>after cancel</B>.
<P><DT><A NAME="M7"><B>after cancel </B><I>id</I></A><DD>
Cancels the execution of a delayed command that
was previously scheduled.
<I>Id</I> indicates which command should be canceled; it must have
been the return value from a previous <B>after</B> command.
If the command given by <I>id</I> has already been executed then
the <B>after cancel</B> command has no effect.
<P><DT><A NAME="M8"><B>after cancel </B><I>script script ...</I></A><DD>
This command also cancels the execution of a delayed command.
The <I>script</I> arguments are concatenated together with space
separators (just as in the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command).
If there is a pending command that matches the string, it is
cancelled and will never be executed; if no such command is
currently pending then the <B>after cancel</B> command has no effect.
<P><DT><A NAME="M9"><B>after idle </B><I>script </I>?<I>script script ...</I>?</A><DD>
Concatenates the <I>script</I> arguments together with space
separators (just as in the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command), and arranges
for the resulting script to be evaluated later as an idle callback.
The script will be run exactly once, the next time the event
loop is entered and there are no events to process.
The command returns an identifier that can be used
to cancel the delayed command using <B>after cancel</B>.
If an error occurs while executing the script then the
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B> mechanism is used to report the error.
<P><DT><A NAME="M10"><B>after info </B>?<I>id</I>?</A><DD>
This command returns information about existing event handlers.
If no <I>id</I> argument is supplied, the command returns
a list of the identifiers for all existing
event handlers created by the <B>after</B> command for this
interpreter.
If <I>id</I> is supplied, it specifies an existing handler;
<I>id</I> must have been the return value from some previous call
to <B>after</B> and it must not have triggered yet or been cancelled.
In this case the command returns a list with two elements.
The first element of the list is the script associated
with <I>id</I>, and the second element is either
<B>idle</B> or <B>timer</B> to indicate what kind of event
handler it is.
<P></DL>
<P>
The <B>after </B><I>ms</I> and <B>after idle</B> forms of the command
assume that the application is event driven: the delayed commands
will not be executed unless the application enters the event loop.
In applications that are not normally event-driven, such as
<B><A HREF="../UserCmd/tclsh.htm">tclsh</A></B>, the event loop can be entered with the <B><A HREF="../TkCmd/vwait.htm">vwait</A></B>
and <B><A HREF="../TkCmd/update.htm">update</A></B> commands.
<H3><A NAME="M11">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B>, <B><A HREF="../TkCmd/concat.htm">concat</A></B>, <B><A HREF="../TkCmd/update.htm">update</A></B>, <B><A HREF="../TkCmd/vwait.htm">vwait</A></B>
<H3><A NAME="M12">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#cancel">cancel</A>, <A href="../Keywords/D.htm#delay">delay</A>, <A href="../Keywords/I.htm#idle callback">idle callback</A>, <A href="../Keywords/S.htm#sleep">sleep</A>, <A href="../Keywords/T.htm#time">time</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,24 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - append manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
append - Append to variable
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>append </B><I>varName </I>?<I>value value value ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Append all of the <I>value</I> arguments to the current value
of variable <I>varName</I>. If <I>varName</I> doesn't exist,
it is given a value equal to the concatenation of all the
<I>value</I> arguments.
This command provides an efficient way to build up long
variables incrementally.
For example, ``<B>append a $b</B>'' is much more efficient than
``<B>set a $a$b</B>'' if <B>$a</B> is long.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/concat.htm">concat</A></B>, <B><A HREF="../TkCmd/lappend.htm">lappend</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#append">append</A>, <A href="../Keywords/V.htm#variable">variable</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,128 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - array manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="array.htm#M2" NAME="L35">NAME</A>
<DL><DD>array - Manipulate array variables</DL>
<DD><A HREF="array.htm#M3" NAME="L36">SYNOPSIS</A>
<DL>
<DD><B>array </B><I>option arrayName</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="array.htm#M4" NAME="L37">DESCRIPTION</A>
<DL>
<DD><A HREF="array.htm#M5" NAME="L38"><B>array anymore </B><I>arrayName searchId</I></A>
<DD><A HREF="array.htm#M6" NAME="L39"><B>array donesearch </B><I>arrayName searchId</I></A>
<DD><A HREF="array.htm#M7" NAME="L40"><B>array exists </B><I>arrayName</I></A>
<DD><A HREF="array.htm#M8" NAME="L41"><B>array get </B><I>arrayName</I> ?<I>pattern</I>?</A>
<DD><A HREF="array.htm#M9" NAME="L42"><B>array names </B><I>arrayName</I> ?<I>pattern</I>?</A>
<DD><A HREF="array.htm#M10" NAME="L43"><B>array nextelement </B><I>arrayName searchId</I></A>
<DD><A HREF="array.htm#M11" NAME="L44"><B>array set </B><I>arrayName list</I></A>
<DD><A HREF="array.htm#M12" NAME="L45"><B>array size </B><I>arrayName</I></A>
<DD><A HREF="array.htm#M13" NAME="L46"><B>array startsearch </B><I>arrayName</I></A>
<DD><A HREF="array.htm#M14" NAME="L47"><B>array unset </B><I>arrayName</I> ?<I>pattern</I>?</A>
</DL>
<DD><A HREF="array.htm#M15" NAME="L48">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
array - Manipulate array variables
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>array </B><I>option arrayName</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command performs one of several operations on the
variable given by <I>arrayName</I>.
Unless otherwise specified for individual commands below,
<I>arrayName</I> must be the name of an existing array variable.
The <I>option</I> argument determines what action is carried
out by the command.
The legal <I>options</I> (which may be abbreviated) are:
<P>
<DL>
<P><DT><A NAME="M5"><B>array anymore </B><I>arrayName searchId</I></A><DD>
Returns 1 if there are any more elements left to be processed
in an array search, 0 if all elements have already been
returned.
<I>SearchId</I> indicates which search on <I>arrayName</I> to
check, and must have been the return value from a previous
invocation of <B>array startsearch</B>.
This option is particularly useful if an array has an element
with an empty name, since the return value from
<B>array nextelement</B> won't indicate whether the search
has been completed.
<P><DT><A NAME="M6"><B>array donesearch </B><I>arrayName searchId</I></A><DD>
This command terminates an array search and destroys all the
state associated with that search. <I>SearchId</I> indicates
which search on <I>arrayName</I> to destroy, and must have
been the return value from a previous invocation of
<B>array startsearch</B>. Returns an empty string.
<P><DT><A NAME="M7"><B>array exists </B><I>arrayName</I></A><DD>
Returns 1 if <I>arrayName</I> is an array variable, 0 if there
is no variable by that name or if it is a scalar variable.
<P><DT><A NAME="M8"><B>array get </B><I>arrayName</I> ?<I>pattern</I>?</A><DD>
Returns a list containing pairs of elements. The first
element in each pair is the name of an element in <I>arrayName</I>
and the second element of each pair is the value of the
array element. The order of the pairs is undefined.
If <I>pattern</I> is not specified, then all of the elements of the
array are included in the result.
If <I>pattern</I> is specified, then only those elements whose names
match <I>pattern</I> (using the matching rules of
<B><A HREF="../TkCmd/string.htm">string match</A></B>) are included.
If <I>arrayName</I> isn't the name of an array variable, or if
the array contains no elements, then an empty list is returned.
<P><DT><A NAME="M9"><B>array names </B><I>arrayName</I> ?<I>pattern</I>?</A><DD>
Returns a list containing the names of all of the elements in
the array that match <I>pattern</I> (using the matching
rules of <B><A HREF="../TkCmd/string.htm">string match</A></B>).
If <I>pattern</I> is omitted then the command returns all of
the element names in the array.
If there are no (matching) elements in the array, or if <I>arrayName</I>
isn't the name of an array variable, then an empty string is
returned.
<P><DT><A NAME="M10"><B>array nextelement </B><I>arrayName searchId</I></A><DD>
Returns the name of the next element in <I>arrayName</I>, or
an empty string if all elements of <I>arrayName</I> have
already been returned in this search. The <I>searchId</I>
argument identifies the search, and must have
been the return value of an <B>array startsearch</B> command.
Warning: if elements are added to or deleted from the array,
then all searches are automatically terminated just as if
<B>array donesearch</B> had been invoked; this will cause
<B>array nextelement</B> operations to fail for those searches.
<P><DT><A NAME="M11"><B>array set </B><I>arrayName list</I></A><DD>
Sets the values of one or more elements in <I>arrayName</I>.
<I>list</I> must have a form like that returned by <B>array get</B>,
consisting of an even number of elements.
Each odd-numbered element in <I>list</I> is treated as an element
name within <I>arrayName</I>, and the following element in <I>list</I>
is used as a new value for that array element.
If the variable <I>arrayName</I> does not already exist
and <I>list</I> is empty,
<I>arrayName</I> is created with an empty array value.
<P><DT><A NAME="M12"><B>array size </B><I>arrayName</I></A><DD>
Returns a decimal string giving the number of elements in the
array.
If <I>arrayName</I> isn't the name of an array then 0 is returned.
<P><DT><A NAME="M13"><B>array startsearch </B><I>arrayName</I></A><DD>
This command initializes an element-by-element search through the
array given by <I>arrayName</I>, such that invocations of the
<B>array nextelement</B> command will return the names of the
individual elements in the array.
When the search has been completed, the <B>array donesearch</B>
command should be invoked.
The return value is a
search identifier that must be used in <B>array nextelement</B>
and <B>array donesearch</B> commands; it allows multiple
searches to be underway simultaneously for the same array.
<P><DT><A NAME="M14"><B>array unset </B><I>arrayName</I> ?<I>pattern</I>?</A><DD>
Unsets all of the elements in the array that match <I>pattern</I> (using the
matching rules of <B><A HREF="../TkCmd/string.htm">string match</A></B>). If <I>arrayName</I> isn't the name
of an array variable or there are no matching elements in the array, then
an empty string is returned. If <I>pattern</I> is omitted and is it an
array variable, then the command unsets the entire array.
<P></DL>
<H3><A NAME="M15">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#array">array</A>, <A href="../Keywords/E.htm#element names">element names</A>, <A href="../Keywords/S.htm#search">search</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,68 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - bgerror manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
bgerror - Command invoked to process background errors
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>bgerror </B><I>message</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>bgerror</B> command doesn't exist as built-in part of Tcl. Instead,
individual applications or users can define a <B>bgerror</B>
command (e.g. as a Tcl procedure) if they wish to handle background
errors.
<P>
A background error is one that occurs in an event handler or some
other command that didn't originate with the application.
For example, if an error occurs while executing a command specified
with the <B><A HREF="../TkCmd/after.htm">after</A></B> command, then it is a background error.
For a non-background error, the error can simply be returned up
through nested Tcl command evaluations until it reaches the top-level
code in the application; then the application can report the error
in whatever way it wishes. When a background error occurs, the
unwinding ends in the Tcl library and there is no obvious way for Tcl
to report the error.
<P>
When Tcl detects a background error, it saves information about the
error and invokes the <B>bgerror</B> command later as an idle event
handler. Before invoking <B>bgerror</B>, Tcl restores the
<B>errorInfo</B> and <B>errorCode</B> variables to their values at the
time the error occurred, then it invokes <B>bgerror</B> with the error
message as its only argument. Tcl assumes that the application has
implemented the <B>bgerror</B> command, and that the command will
report the error in a way that makes sense for the application. Tcl
will ignore any result returned by the <B>bgerror</B> command as long
as no error is generated.
<P>
If another Tcl error occurs within the <B>bgerror</B> command (for
example, because no <B>bgerror</B> command has been defined) then Tcl
reports the error itself by writing a message to stderr.
<P>
If several background errors accumulate before <B>bgerror</B> is
invoked to process them, <B>bgerror</B> will be invoked once for each
error, in the order they occurred. However, if <B>bgerror</B> returns
with a break exception, then any remaining errors are skipped without
calling <B>bgerror</B>.
<P>
Tcl has no default implementation for <B>bgerror</B>. However, in
applications using Tk there is a default <B>bgerror</B> procedure which
posts a dialog box containing the error message and offers the user a
chance to see a stack trace showing where the error occurred. In
addition to allowing the user to view the stack trace, the dialog
provides an additional application configurable button which may be
used, for example, to save the stack trace to a file. By default,
this is the behavior associated with that button. This behavior can
be redefined by setting the option database values
<B>*ErrorDialog.function.text</B>, to specify the caption for the
function button, and <B>*ErrorDialog.function.command</B>, to specify
the command to be run. The text of the stack trace is appended to the
command when it is evaluated. If either of these options is set to
the empty string, then the additional button will not be displayed in
the dialog.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/after.htm">after</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#background error">background error</A>, <A href="../Keywords/R.htm#reporting">reporting</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,451 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - binary manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="binary.htm#M2" NAME="L54">NAME</A>
<DL><DD>binary - Insert and extract fields from binary strings</DL>
<DD><A HREF="binary.htm#M3" NAME="L55">SYNOPSIS</A>
<DL>
<DD><B>binary format </B><I>formatString </I>?<I>arg arg ...</I>?
<DD><B>binary scan </B><I>string formatString </I>?<I>varName varName ...</I>?
</DL>
<DD><A HREF="binary.htm#M4" NAME="L56">DESCRIPTION</A>
<DD><A HREF="binary.htm#M5" NAME="L57">BINARY FORMAT</A>
<DL>
<DD><A HREF="binary.htm#M6" NAME="L58"><B>a</B></A>
<DD><A HREF="binary.htm#M7" NAME="L59"><B>A</B></A>
<DD><A HREF="binary.htm#M8" NAME="L60"><B>b</B></A>
<DD><A HREF="binary.htm#M9" NAME="L61"><B>B</B></A>
<DD><A HREF="binary.htm#M10" NAME="L62"><B>h</B></A>
<DD><A HREF="binary.htm#M11" NAME="L63"><B>H</B></A>
<DD><A HREF="binary.htm#M12" NAME="L64"><B>c</B></A>
<DD><A HREF="binary.htm#M13" NAME="L65"><B>s</B></A>
<DD><A HREF="binary.htm#M14" NAME="L66"><B>S</B></A>
<DD><A HREF="binary.htm#M15" NAME="L67"><B>i</B></A>
<DD><A HREF="binary.htm#M16" NAME="L68"><B>I</B></A>
<DD><A HREF="binary.htm#M17" NAME="L69"><B>f</B></A>
<DD><A HREF="binary.htm#M18" NAME="L70"><B>d</B></A>
<DD><A HREF="binary.htm#M19" NAME="L71"><B>x</B></A>
<DD><A HREF="binary.htm#M20" NAME="L72"><B>X</B></A>
<DD><A HREF="binary.htm#M21" NAME="L73"><B>@</B></A>
</DL>
<DD><A HREF="binary.htm#M22" NAME="L74">BINARY SCAN</A>
<DL>
<DD><A HREF="binary.htm#M23" NAME="L75"><B>a</B></A>
<DD><A HREF="binary.htm#M24" NAME="L76"><B>A</B></A>
<DD><A HREF="binary.htm#M25" NAME="L77"><B>b</B></A>
<DD><A HREF="binary.htm#M26" NAME="L78"><B>B</B></A>
<DD><A HREF="binary.htm#M27" NAME="L79"><B>h</B></A>
<DD><A HREF="binary.htm#M28" NAME="L80"><B>H</B></A>
<DD><A HREF="binary.htm#M29" NAME="L81"><B>c</B></A>
<DD><A HREF="binary.htm#M30" NAME="L82"><B>s</B></A>
<DD><A HREF="binary.htm#M31" NAME="L83"><B>S</B></A>
<DD><A HREF="binary.htm#M32" NAME="L84"><B>i</B></A>
<DD><A HREF="binary.htm#M33" NAME="L85"><B>I</B></A>
<DD><A HREF="binary.htm#M34" NAME="L86"><B>f</B></A>
<DD><A HREF="binary.htm#M35" NAME="L87"><B>d</B></A>
<DD><A HREF="binary.htm#M36" NAME="L88"><B>x</B></A>
<DD><A HREF="binary.htm#M37" NAME="L89"><B>X</B></A>
<DD><A HREF="binary.htm#M38" NAME="L90"><B>@</B></A>
</DL>
<DD><A HREF="binary.htm#M39" NAME="L91">PLATFORM ISSUES</A>
<DD><A HREF="binary.htm#M40" NAME="L92">SEE ALSO</A>
<DD><A HREF="binary.htm#M41" NAME="L93">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
binary - Insert and extract fields from binary strings
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>binary format </B><I>formatString </I>?<I>arg arg ...</I>?<BR>
<B>binary scan </B><I>string formatString </I>?<I>varName varName ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command provides facilities for manipulating binary data. The
first form, <B>binary format</B>, creates a binary string from normal
Tcl values. For example, given the values 16 and 22, on a 32 bit
architecture, it might produce an 8-byte binary string consisting of
two 4-byte integers, one for each of the numbers. The second form of
the command, <B>binary scan</B>, does the opposite: it extracts data
from a binary string and returns it as ordinary Tcl string values.
<H3><A NAME="M5">BINARY FORMAT</A></H3>
The <B>binary format</B> command generates a binary string whose layout
is specified by the <I>formatString</I> and whose contents come from
the additional arguments. The resulting binary value is returned.
<P>
The <I>formatString</I> consists of a sequence of zero or more field
specifiers separated by zero or more spaces. Each field specifier is
a single type character followed by an optional numeric <I>count</I>.
Most field specifiers consume one argument to obtain the value to be
formatted. The type character specifies how the value is to be
formatted. The <I>count</I> typically indicates how many items of the
specified type are taken from the value. If present, the <I>count</I>
is a non-negative decimal integer or <B>*</B>, which normally indicates
that all of the items in the value are to be used. If the number of
arguments does not match the number of fields in the format string
that consume arguments, then an error is generated.
<P>
Each type-count pair moves an imaginary cursor through the binary
data, storing bytes at the current position and advancing the cursor
to just after the last byte stored. The cursor is initially at
position 0 at the beginning of the data. The type may be any one of
the following characters:
<P>
<DL>
<P><DT><A NAME="M6"><B>a</B></A><DD>
Stores a character string of length <I>count</I> in the output string.
If <I>arg</I> has fewer than <I>count</I> bytes, then additional zero
bytes are used to pad out the field. If <I>arg</I> is longer than the
specified length, the extra characters will be ignored. If
<I>count</I> is <B>*</B>, then all of the bytes in <I>arg</I> will be
formatted. If <I>count</I> is omitted, then one character will be
formatted. For example,
<PRE><B>binary format a7a*a alpha bravo charlie</B></PRE>
will return a string equivalent to <B>alpha&#92;000&#92;000bravoc</B>.
<P><DT><A NAME="M7"><B>A</B></A><DD>
This form is the same as <B>a</B> except that spaces are used for
padding instead of nulls. For example,
<PRE><B>binary format A6A*A alpha bravo charlie</B></PRE>
will return <B>alpha bravoc</B>.
<P><DT><A NAME="M8"><B>b</B></A><DD>
Stores a string of <I>count</I> binary digits in low-to-high order
within each byte in the output string. <I>Arg</I> must contain a
sequence of <B>1</B> and <B>0</B> characters. The resulting bytes are
emitted in first to last order with the bits being formatted in
low-to-high order within each byte. If <I>arg</I> has fewer than
<I>count</I> digits, then zeros will be used for the remaining bits.
If <I>arg</I> has more than the specified number of digits, the extra
digits will be ignored. If <I>count</I> is <B>*</B>, then all of the
digits in <I>arg</I> will be formatted. If <I>count</I> is omitted,
then one digit will be formatted. If the number of bits formatted
does not end at a byte boundary, the remaining bits of the last byte
will be zeros. For example,
<PRE><B>binary format b5b* 11100 111000011010</B></PRE>
will return a string equivalent to <B>&#92;x07&#92;x87&#92;x05</B>.
<P><DT><A NAME="M9"><B>B</B></A><DD>
This form is the same as <B>b</B> except that the bits are stored in
high-to-low order within each byte. For example,
<PRE><B>binary format B5B* 11100 111000011010</B></PRE>
will return a string equivalent to <B>&#92;xe0&#92;xe1&#92;xa0</B>.
<P><DT><A NAME="M10"><B>h</B></A><DD>
Stores a string of <I>count</I> hexadecimal digits in low-to-high
within each byte in the output string. <I>Arg</I> must contain a
sequence of characters in the set ``0123456789abcdefABCDEF''. The
resulting bytes are emitted in first to last order with the hex digits
being formatted in low-to-high order within each byte. If <I>arg</I>
has fewer than <I>count</I> digits, then zeros will be used for the
remaining digits. If <I>arg</I> has more than the specified number of
digits, the extra digits will be ignored. If <I>count</I> is
<B>*</B>, then all of the digits in <I>arg</I> will be formatted. If
<I>count</I> is omitted, then one digit will be formatted. If the
number of digits formatted does not end at a byte boundary, the
remaining bits of the last byte will be zeros. For example,
<PRE><B>binary format h3h* AB def</B></PRE>
will return a string equivalent to <B>&#92;xba&#92;x00&#92;xed&#92;x0f</B>.
<P><DT><A NAME="M11"><B>H</B></A><DD>
This form is the same as <B>h</B> except that the digits are stored in
high-to-low order within each byte. For example,
<PRE><B>binary format H3H* ab DEF</B></PRE>
will return a string equivalent to <B>&#92;xab&#92;x00&#92;xde&#92;xf0</B>.
<P><DT><A NAME="M12"><B>c</B></A><DD>
Stores one or more 8-bit integer values in the output string. If no
<I>count</I> is specified, then <I>arg</I> must consist of an integer
value; otherwise <I>arg</I> must consist of a list containing at least
<I>count</I> integer elements. The low-order 8 bits of each integer
are stored as a one-byte value at the cursor position. If <I>count</I>
is <B>*</B>, then all of the integers in the list are formatted. If
the number of elements in the list is fewer than <I>count</I>, then an
error is generated. If the number of elements in the list is greater
than <I>count</I>, then the extra elements are ignored. For example,
<PRE><B>binary format c3cc* {3 -3 128 1} 260 {2 5}</B></PRE>
will return a string equivalent to
<B>&#92;x03&#92;xfd&#92;x80&#92;x04&#92;x02&#92;x05</B>, whereas
<PRE><B>binary format c {2 5}</B></PRE>
will generate an error.
<P><DT><A NAME="M13"><B>s</B></A><DD>
This form is the same as <B>c</B> except that it stores one or more
16-bit integers in little-endian byte order in the output string. The
low-order 16-bits of each integer are stored as a two-byte value at
the cursor position with the least significant byte stored first. For
example,
<PRE><B>binary format s3 {3 -3 258 1}</B></PRE>
will return a string equivalent to
<B>&#92;x03&#92;x00&#92;xfd&#92;xff&#92;x02&#92;x01</B>.
<P><DT><A NAME="M14"><B>S</B></A><DD>
This form is the same as <B>s</B> except that it stores one or more
16-bit integers in big-endian byte order in the output string. For
example,
<PRE><B>binary format S3 {3 -3 258 1}</B></PRE>
will return a string equivalent to
<B>&#92;x00&#92;x03&#92;xff&#92;xfd&#92;x01&#92;x02</B>.
<P><DT><A NAME="M15"><B>i</B></A><DD>
This form is the same as <B>c</B> except that it stores one or more
32-bit integers in little-endian byte order in the output string. The
low-order 32-bits of each integer are stored as a four-byte value at
the cursor position with the least significant byte stored first. For
example,
<PRE><B>binary format i3 {3 -3 65536 1}</B></PRE>
will return a string equivalent to
<B>&#92;x03&#92;x00&#92;x00&#92;x00&#92;xfd&#92;xff&#92;xff&#92;xff&#92;x00&#92;x00&#92;x01&#92;x00</B>
<P><DT><A NAME="M16"><B>I</B></A><DD>
This form is the same as <B>i</B> except that it stores one or more one
or more 32-bit integers in big-endian byte order in the output string.
For example,
<PRE><B>binary format I3 {3 -3 65536 1}</B></PRE>
will return a string equivalent to
<B>&#92;x00&#92;x00&#92;x00&#92;x03&#92;xff&#92;xff&#92;xff&#92;xfd&#92;x00&#92;x01&#92;x00&#92;x00</B>
<P><DT><A NAME="M17"><B>f</B></A><DD>
This form is the same as <B>c</B> except that it stores one or more one
or more single-precision floating in the machine's native
representation in the output string. This representation is not
portable across architectures, so it should not be used to communicate
floating point numbers across the network. The size of a floating
point number may vary across architectures, so the number of bytes
that are generated may vary. If the value overflows the
machine's native representation, then the value of FLT_MAX
as defined by the system will be used instead. Because Tcl uses
double-precision floating-point numbers internally, there may be some
loss of precision in the conversion to single-precision. For example,
on a Windows system running on an Intel Pentium processor,
<PRE><B>binary format f2 {1.6 3.4}</B></PRE>
will return a string equivalent to
<B>&#92;xcd&#92;xcc&#92;xcc&#92;x3f&#92;x9a&#92;x99&#92;x59&#92;x40</B>.
<P><DT><A NAME="M18"><B>d</B></A><DD>
This form is the same as <B>f</B> except that it stores one or more one
or more double-precision floating in the machine's native
representation in the output string. For example, on a
Windows system running on an Intel Pentium processor,
<PRE><B>binary format d1 {1.6}</B></PRE>
will return a string equivalent to
<B>&#92;x9a&#92;x99&#92;x99&#92;x99&#92;x99&#92;x99&#92;xf9&#92;x3f</B>.
<P><DT><A NAME="M19"><B>x</B></A><DD>
Stores <I>count</I> null bytes in the output string. If <I>count</I> is
not specified, stores one null byte. If <I>count</I> is <B>*</B>,
generates an error. This type does not consume an argument. For
example,
<PRE><B>binary format a3xa3x2a3 abc def ghi</B></PRE>
will return a string equivalent to <B>abc&#92;000def&#92;000&#92;000ghi</B>.
<P><DT><A NAME="M20"><B>X</B></A><DD>
Moves the cursor back <I>count</I> bytes in the output string. If
<I>count</I> is <B>*</B> or is larger than the current cursor position,
then the cursor is positioned at location 0 so that the next byte
stored will be the first byte in the result string. If <I>count</I> is
omitted then the cursor is moved back one byte. This type does not
consume an argument. For example,
<PRE><B>binary format a3X*a3X2a3 abc def ghi</B></PRE>
will return <B>dghi</B>.
<P><DT><A NAME="M21"><B>@</B></A><DD>
Moves the cursor to the absolute location in the output string
specified by <I>count</I>. Position 0 refers to the first byte in the
output string. If <I>count</I> refers to a position beyond the last
byte stored so far, then null bytes will be placed in the unitialized
locations and the cursor will be placed at the specified location. If
<I>count</I> is <B>*</B>, then the cursor is moved to the current end of
the output string. If <I>count</I> is omitted, then an error will be
generated. This type does not consume an argument. For example,
<PRE><B>binary format a5@2a1@*a3@10a1 abcde f ghi j</B></PRE>
will return <B>abfdeghi&#92;000&#92;000j</B>.
<P></DL>
<H3><A NAME="M22">BINARY SCAN</A></H3>
The <B>binary scan</B> command parses fields from a binary string,
returning the number of conversions performed. <I>String</I> gives the
input to be parsed and <I>formatString</I> indicates how to parse it.
Each <I>varName</I> gives the name of a variable; when a field is
scanned from <I>string</I> the result is assigned to the corresponding
variable.
<P>
As with <B>binary format</B>, the <I>formatString</I> consists of a
sequence of zero or more field specifiers separated by zero or more
spaces. Each field specifier is a single type character followed by
an optional numeric <I>count</I>. Most field specifiers consume one
argument to obtain the variable into which the scanned values should
be placed. The type character specifies how the binary data is to be
interpreted. The <I>count</I> typically indicates how many items of
the specified type are taken from the data. If present, the
<I>count</I> is a non-negative decimal integer or <B>*</B>, which
normally indicates that all of the remaining items in the data are to
be used. If there are not enough bytes left after the current cursor
position to satisfy the current field specifier, then the
corresponding variable is left untouched and <B>binary scan</B> returns
immediately with the number of variables that were set. If there are
not enough arguments for all of the fields in the format string that
consume arguments, then an error is generated.
<P>
It is <B>important</B> to note that the <B>c</B>, <B>s</B>, and <B>S</B>
(and <B>i</B> and <B>I</B> on 64bit systems) will be scanned into
long data size values. In doing this, values that have their high
bit set (0x80 for chars, 0x8000 for shorts, 0x80000000 for ints),
will be sign extended. Thus the following will occur:
<PRE><B>set signShort [binary format s1 0x8000]</B>
<B>binary scan $signShort s1 val; </B><I># val == 0xFFFF8000</I></PRE>
If you want to produce an unsigned value, then you can mask the return
value to the desired size. For example, to produce an unsigned short
value:
<PRE><B>set val [expr {$val &amp; 0xFFFF}]; </B><I># val == 0x8000</I></PRE>
<P>
Each type-count pair moves an imaginary cursor through the binary data,
reading bytes from the current position. The cursor is initially
at position 0 at the beginning of the data. The type may be any one of
the following characters:
<P>
<DL>
<P><DT><A NAME="M23"><B>a</B></A><DD>
The data is a character string of length <I>count</I>. If <I>count</I>
is <B>*</B>, then all of the remaining bytes in <I>string</I> will be
scanned into the variable. If <I>count</I> is omitted, then one
character will be scanned. For example,
<PRE><B>binary scan abcde&#92;000fghi a6a10 var1 var2</B></PRE>
will return <B>1</B> with the string equivalent to <B>abcde&#92;000</B>
stored in <B>var1</B> and <B>var2</B> left unmodified.
<P><DT><A NAME="M24"><B>A</B></A><DD>
This form is the same as <B>a</B>, except trailing blanks and nulls are stripped from
the scanned value before it is stored in the variable. For example,
<PRE><B>binary scan &quot;abc efghi &#92;000&quot; A* var1</B></PRE>
will return <B>1</B> with <B>abc efghi</B> stored in <B>var1</B>.
<P><DT><A NAME="M25"><B>b</B></A><DD>
The data is turned into a string of <I>count</I> binary digits in
low-to-high order represented as a sequence of ``1'' and ``0''
characters. The data bytes are scanned in first to last order with
the bits being taken in low-to-high order within each byte. Any extra
bits in the last byte are ignored. If <I>count</I> is <B>*</B>, then
all of the remaining bits in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one bit will be scanned. For example,
<PRE><B>binary scan &#92;x07&#92;x87&#92;x05 b5b* var1 var2</B></PRE>
will return <B>2</B> with <B>11100</B> stored in <B>var1</B> and
<B>1110000110100000</B> stored in <B>var2</B>.
<P><DT><A NAME="M26"><B>B</B></A><DD>
This form is the same as <B>b</B>, except the bits are taken in
high-to-low order within each byte. For example,
<PRE><B>binary scan &#92;x70&#92;x87&#92;x05 B5B* var1 var2</B></PRE>
will return <B>2</B> with <B>01110</B> stored in <B>var1</B> and
<B>1000011100000101</B> stored in <B>var2</B>.
<P><DT><A NAME="M27"><B>h</B></A><DD>
The data is turned into a string of <I>count</I> hexadecimal digits in
low-to-high order represented as a sequence of characters in the set
``0123456789abcdef''. The data bytes are scanned in first to last
order with the hex digits being taken in low-to-high order within each
byte. Any extra bits in the last byte are ignored. If <I>count</I>
is <B>*</B>, then all of the remaining hex digits in <B><A HREF="../TkCmd/string.htm">string</A></B> will be
scanned. If <I>count</I> is omitted, then one hex digit will be
scanned. For example,
<PRE><B>binary scan &#92;x07&#92;x86&#92;x05 h3h* var1 var2</B></PRE>
will return <B>2</B> with <B>706</B> stored in <B>var1</B> and
<B>50</B> stored in <B>var2</B>.
<P><DT><A NAME="M28"><B>H</B></A><DD>
This form is the same as <B>h</B>, except the digits are taken in
high-to-low order within each byte. For example,
<PRE><B>binary scan &#92;x07&#92;x86&#92;x05 H3H* var1 var2</B></PRE>
will return <B>2</B> with <B>078</B> stored in <B>var1</B> and
<B>05</B> stored in <B>var2</B>.
<P><DT><A NAME="M29"><B>c</B></A><DD>
The data is turned into <I>count</I> 8-bit signed integers and stored
in the corresponding variable as a list. If <I>count</I> is <B>*</B>,
then all of the remaining bytes in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one 8-bit integer will be scanned. For
example,
<PRE><B>binary scan &#92;x07&#92;x86&#92;x05 c2c* var1 var2</B></PRE>
will return <B>2</B> with <B>7 -122</B> stored in <B>var1</B> and <B>5</B>
stored in <B>var2</B>. Note that the integers returned are signed, but
they can be converted to unsigned 8-bit quantities using an expression
like:
<PRE><B>expr ( $num + 0x100 ) % 0x100</B></PRE>
<P><DT><A NAME="M30"><B>s</B></A><DD>
The data is interpreted as <I>count</I> 16-bit signed integers
represented in little-endian byte order. The integers are stored in
the corresponding variable as a list. If <I>count</I> is <B>*</B>, then
all of the remaining bytes in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one 16-bit integer will be scanned. For
example,
<PRE><B>binary scan &#92;x05&#92;x00&#92;x07&#92;x00&#92;xf0&#92;xff s2s* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>. Note that the integers returned are signed, but
they can be converted to unsigned 16-bit quantities using an expression
like:
<PRE><B>expr ( $num + 0x10000 ) % 0x10000</B></PRE>
<P><DT><A NAME="M31"><B>S</B></A><DD>
This form is the same as <B>s</B> except that the data is interpreted
as <I>count</I> 16-bit signed integers represented in big-endian byte
order. For example,
<PRE><B>binary scan &#92;x00&#92;x05&#92;x00&#92;x07&#92;xff&#92;xf0 S2S* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>.
<P><DT><A NAME="M32"><B>i</B></A><DD>
The data is interpreted as <I>count</I> 32-bit signed integers
represented in little-endian byte order. The integers are stored in
the corresponding variable as a list. If <I>count</I> is <B>*</B>, then
all of the remaining bytes in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one 32-bit integer will be scanned. For
example,
<PRE><B>binary scan &#92;x05&#92;x00&#92;x00&#92;x00&#92;x07&#92;x00&#92;x00&#92;x00&#92;xf0&#92;xff&#92;xff&#92;xff i2i* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>. Note that the integers returned are signed and
cannot be represented by Tcl as unsigned values.
<P><DT><A NAME="M33"><B>I</B></A><DD>
This form is the same as <B>I</B> except that the data is interpreted
as <I>count</I> 32-bit signed integers represented in big-endian byte
order. For example,
<PRE><B>binary &#92;x00&#92;x00&#92;x00&#92;x05&#92;x00&#92;x00&#92;x00&#92;x07&#92;xff&#92;xff&#92;xff&#92;xf0 I2I* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>.
<P><DT><A NAME="M34"><B>f</B></A><DD>
The data is interpreted as <I>count</I> single-precision floating point
numbers in the machine's native representation. The floating point
numbers are stored in the corresponding variable as a list. If
<I>count</I> is <B>*</B>, then all of the remaining bytes in
<B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If <I>count</I> is omitted, then one
single-precision floating point number will be scanned. The size of a
floating point number may vary across architectures, so the number of
bytes that are scanned may vary. If the data does not represent a
valid floating point number, the resulting value is undefined and
compiler dependent. For example, on a Windows system running on an
Intel Pentium processor,
<PRE><B>binary scan &#92;x3f&#92;xcc&#92;xcc&#92;xcd f var1</B></PRE>
will return <B>1</B> with <B>1.6000000238418579</B> stored in
<B>var1</B>.
<P><DT><A NAME="M35"><B>d</B></A><DD>
This form is the same as <B>f</B> except that the data is interpreted
as <I>count</I> double-precision floating point numbers in the
machine's native representation. For example, on a Windows system
running on an Intel Pentium processor,
<PRE><B>binary scan &#92;x9a&#92;x99&#92;x99&#92;x99&#92;x99&#92;x99&#92;xf9&#92;x3f d var1</B></PRE>
will return <B>1</B> with <B>1.6000000000000001</B>
stored in <B>var1</B>.
<P><DT><A NAME="M36"><B>x</B></A><DD>
Moves the cursor forward <I>count</I> bytes in <I>string</I>. If
<I>count</I> is <B>*</B> or is larger than the number of bytes after the
current cursor cursor position, then the cursor is positioned after
the last byte in <I>string</I>. If <I>count</I> is omitted, then the
cursor is moved forward one byte. Note that this type does not
consume an argument. For example,
<PRE><B>binary scan &#92;x01&#92;x02&#92;x03&#92;x04 x2H* var1</B></PRE>
will return <B>1</B> with <B>0304</B> stored in <B>var1</B>.
<P><DT><A NAME="M37"><B>X</B></A><DD>
Moves the cursor back <I>count</I> bytes in <I>string</I>. If
<I>count</I> is <B>*</B> or is larger than the current cursor position,
then the cursor is positioned at location 0 so that the next byte
scanned will be the first byte in <I>string</I>. If <I>count</I>
is omitted then the cursor is moved back one byte. Note that this
type does not consume an argument. For example,
<PRE><B>binary scan &#92;x01&#92;x02&#92;x03&#92;x04 c2XH* var1 var2</B></PRE>
will return <B>2</B> with <B>1 2</B> stored in <B>var1</B> and <B>020304</B>
stored in <B>var2</B>.
<P><DT><A NAME="M38"><B>@</B></A><DD>
Moves the cursor to the absolute location in the data string specified
by <I>count</I>. Note that position 0 refers to the first byte in
<I>string</I>. If <I>count</I> refers to a position beyond the end of
<I>string</I>, then the cursor is positioned after the last byte. If
<I>count</I> is omitted, then an error will be generated. For example,
<PRE><B>binary scan &#92;x01&#92;x02&#92;x03&#92;x04 c2@1H* var1 var2</B></PRE>
will return <B>2</B> with <B>1 2</B> stored in <B>var1</B> and <B>020304</B>
stored in <B>var2</B>.
<P></DL>
<H3><A NAME="M39">PLATFORM ISSUES</A></H3>
Sometimes it is desirable to format or scan integer values in the
native byte order for the machine. Refer to the <B>byteOrder</B>
element of the <B>tcl_platform</B> array to decide which type character
to use when formatting or scanning integers.
<H3><A NAME="M40">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/format.htm">format</A></B>, <B><A HREF="../TkCmd/scan.htm">scan</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M41">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#binary">binary</A>, <A href="../Keywords/F.htm#format">format</A>, <A href="../Keywords/S.htm#scan">scan</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1997 by Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,26 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - break manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
break - Abort looping command
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>break</B><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is typically invoked inside the body of a looping command
such as <B><A HREF="../TkCmd/for.htm">for</A></B> or <B><A HREF="../TkCmd/foreach.htm">foreach</A></B> or <B><A HREF="../TkCmd/while.htm">while</A></B>.
It returns a TCL_BREAK code, which causes a break exception
to occur.
The exception causes the current script to be aborted
out to the innermost containing loop command, which then
aborts its execution and returns normally.
Break exceptions are also handled in a few other situations, such
as the <B><A HREF="../TkCmd/catch.htm">catch</A></B> command, Tk event bindings, and the outermost
scripts of procedure bodies.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/catch.htm">catch</A></B>, <B><A HREF="../TkCmd/continue.htm">continue</A></B>, <B><A HREF="../TkCmd/for.htm">for</A></B>, <B><A HREF="../TkCmd/foreach.htm">foreach</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#abort">abort</A>, <A href="../Keywords/B.htm#break">break</A>, <A href="../Keywords/L.htm#loop">loop</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,50 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - catch manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
catch - Evaluate script and trap exceptional returns
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>catch</B><I> script </I>?<I>varName</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>catch</B> command may be used to prevent errors from aborting command
interpretation. <B>Catch</B> calls the Tcl interpreter recursively to
execute <I>script</I>, and always returns without raising an error,
regardless of any errors that might occur while executing <I>script</I>.
<P>
If <I>script</I> raises an error, <B>catch</B> will return a non-zero integer
value corresponding to one of the exceptional return codes (see tcl.h
for the definitions of code values). If the <I>varName</I> argument is
given, then the variable it names is set to the error message from
interpreting <I>script</I>.
<P>
If <I>script</I> does not raise an error, <B>catch</B> will return 0
(TCL_OK) and set the variable to the value returned from <I>script</I>.
<P>
Note that <B>catch</B> catches all exceptions, including those
generated by <B><A HREF="../TkCmd/break.htm">break</A></B> and <B><A HREF="../TkCmd/continue.htm">continue</A></B> as well as errors. The
only errors that are not caught are syntax errors found when the
script is compiled. This is because the catch command only catches
errors during runtime. When the catch statement is compiled, the
script is compiled as well and any syntax errors will generate a Tcl
error.
<H3><A NAME="M5">EXAMPLES</A></H3>
The <B>catch</B> command may be used in an <B><A HREF="../TkCmd/if.htm">if</A></B> to branch based on
the success of a script.
<PRE>if { [catch {open $someFile w} fid] } {
puts stderr &quot;Could not open $someFile for writing&#92;n$fid&quot;
exit 1
}</PRE>
The <B>catch</B> command will not catch compiled syntax errors. The
first time proc <B>foo</B> is called, the body will be compiled and a
Tcl error will be generated.
<PRE>proc foo {} {
catch {expr {1 +- }}
}</PRE>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#catch">catch</A>, <A href="../Keywords/E.htm#error">error</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,20 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - cd manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
cd - Change working directory
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>cd </B>?<I>dirName</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Change the current working directory to <I>dirName</I>, or to the
home directory (as specified in the HOME environment variable) if
<I>dirName</I> is not given.
Returns an empty string.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/filename.htm">filename</A></B>, <B><A HREF="../TkCmd/glob.htm">glob</A></B>, <B><A HREF="../TkCmd/pwd.htm">pwd</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/W.htm#working directory">working directory</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,251 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - clock manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="clock.htm#M2" NAME="L109">NAME</A>
<DL><DD>clock - Obtain and manipulate time</DL>
<DD><A HREF="clock.htm#M3" NAME="L110">SYNOPSIS</A>
<DL>
<DD><B>clock </B><I>option</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="clock.htm#M4" NAME="L111">DESCRIPTION</A>
<DL>
<DD><A HREF="clock.htm#M5" NAME="L112">.VS 8.3</A>
<DD><A HREF="clock.htm#M6" NAME="L113"><B>clock format </B><I>clockValue</I> ?<B>-format </B><I>string</I>? ?<B>-gmt </B><I>boolean</I>?</A>
<DL>
<DD><A HREF="clock.htm#M7" NAME="L114"><B>%%</B></A>
<DD><A HREF="clock.htm#M8" NAME="L115"><B>%a</B></A>
<DD><A HREF="clock.htm#M9" NAME="L116"><B>%A</B></A>
<DD><A HREF="clock.htm#M10" NAME="L117"><B>%b</B></A>
<DD><A HREF="clock.htm#M11" NAME="L118"><B>%B</B></A>
<DD><A HREF="clock.htm#M12" NAME="L119"><B>%c</B></A>
<DD><A HREF="clock.htm#M13" NAME="L120"><B>%d</B></A>
<DD><A HREF="clock.htm#M14" NAME="L121"><B>%H</B></A>
<DD><A HREF="clock.htm#M15" NAME="L122"><B>%I</B></A>
<DD><A HREF="clock.htm#M16" NAME="L123"><B>%j</B></A>
<DD><A HREF="clock.htm#M17" NAME="L124"><B>%m</B></A>
<DD><A HREF="clock.htm#M18" NAME="L125"><B>%M</B></A>
<DD><A HREF="clock.htm#M19" NAME="L126"><B>%p</B></A>
<DD><A HREF="clock.htm#M20" NAME="L127"><B>%S</B></A>
<DD><A HREF="clock.htm#M21" NAME="L128"><B>%U</B></A>
<DD><A HREF="clock.htm#M22" NAME="L129"><B>%w</B></A>
<DD><A HREF="clock.htm#M23" NAME="L130"><B>%W</B></A>
<DD><A HREF="clock.htm#M24" NAME="L131"><B>%x</B></A>
<DD><A HREF="clock.htm#M25" NAME="L132"><B>%X</B></A>
<DD><A HREF="clock.htm#M26" NAME="L133"><B>%y</B></A>
<DD><A HREF="clock.htm#M27" NAME="L134"><B>%Y</B></A>
<DD><A HREF="clock.htm#M28" NAME="L135"><B>%Z</B></A>
</DL>
<DL>
<DD><A HREF="clock.htm#M29" NAME="L136"><B>%D</B></A>
<DD><A HREF="clock.htm#M30" NAME="L137"><B>%e</B></A>
<DD><A HREF="clock.htm#M31" NAME="L138"><B>%h</B></A>
<DD><A HREF="clock.htm#M32" NAME="L139"><B>%n</B></A>
<DD><A HREF="clock.htm#M33" NAME="L140"><B>%r</B></A>
<DD><A HREF="clock.htm#M34" NAME="L141"><B>%R</B></A>
<DD><A HREF="clock.htm#M35" NAME="L142"><B>%t</B></A>
<DD><A HREF="clock.htm#M36" NAME="L143"><B>%T</B></A>
</DL>
<DD><A HREF="clock.htm#M37" NAME="L144"><B>clock scan </B><I>dateString</I> ?<B>-base </B><I>clockVal</I>? ?<B>-gmt </B><I>boolean</I>?</A>
<DL>
<DD><A HREF="clock.htm#M38" NAME="L145"><I>time</I></A>
<DD><A HREF="clock.htm#M39" NAME="L146"><I>date</I></A>
<DD><A HREF="clock.htm#M40" NAME="L147"><I>ISO 8601 point-in-time</I></A>
<DD><A HREF="clock.htm#M41" NAME="L148"><I>relative time</I></A>
</DL>
<DD><A HREF="clock.htm#M42" NAME="L149"><B>clock seconds</B></A>
</DL>
<DD><A HREF="clock.htm#M43" NAME="L150">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
clock - Obtain and manipulate time
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>clock </B><I>option</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command performs one of several operations that may obtain
or manipulate strings or values that represent some notion of
time. The <I>option</I> argument determines what action is carried
out by the command. The legal <I>options</I> (which may be
abbreviated) are:
<P>
<DL>
<P><DT><A NAME="M5">.VS 8.3</A><DD>
<B>clock clicks</B> ?<B>-milliseconds</B>?
Return a high-resolution time value as a system-dependent integer
value. The unit of the value is system-dependent but should be the
highest resolution clock available on the system such as a CPU cycle
counter. If <B>-milliseconds</B> is specified, then the value is
guaranteed to be of millisecond granularity.
This value should only be used for the relative measurement
of elapsed time.
<P><DT><A NAME="M6"><B>clock format </B><I>clockValue</I> ?<B>-format </B><I>string</I>? ?<B>-gmt </B><I>boolean</I>?</A><DD>
Converts an integer time value, typically returned by
<B>clock seconds</B>, <B>clock scan</B>, or the <B>atime</B>, <B>mtime</B>,
or <B>ctime</B> options of the <B><A HREF="../TkCmd/file.htm">file</A></B> command, to human-readable
form. If the <B>-format</B> argument is present the next argument is a
string that describes how the date and time are to be formatted.
Field descriptors consist of a <B>%</B> followed by a field
descriptor character. All other characters are copied into the result.
Valid field descriptors are:
<P>
<DL>
<P><DT><A NAME="M7"><B>%%</B></A><DD>
Insert a %.
<P><DT><A NAME="M8"><B>%a</B></A><DD>
Abbreviated weekday name (Mon, Tue, etc.).
<P><DT><A NAME="M9"><B>%A</B></A><DD>
Full weekday name (Monday, Tuesday, etc.).
<P><DT><A NAME="M10"><B>%b</B></A><DD>
Abbreviated month name (Jan, Feb, etc.).
<P><DT><A NAME="M11"><B>%B</B></A><DD>
Full month name.
<P><DT><A NAME="M12"><B>%c</B></A><DD>
Locale specific date and time.
<P><DT><A NAME="M13"><B>%d</B></A><DD>
Day of month (01 - 31).
<P><DT><A NAME="M14"><B>%H</B></A><DD>
Hour in 24-hour format (00 - 23).
<P><DT><A NAME="M15"><B>%I</B></A><DD>
Hour in 12-hour format (00 - 12).
<P><DT><A NAME="M16"><B>%j</B></A><DD>
Day of year (001 - 366).
<P><DT><A NAME="M17"><B>%m</B></A><DD>
Month number (01 - 12).
<P><DT><A NAME="M18"><B>%M</B></A><DD>
Minute (00 - 59).
<P><DT><A NAME="M19"><B>%p</B></A><DD>
AM/PM indicator.
<P><DT><A NAME="M20"><B>%S</B></A><DD>
Seconds (00 - 59).
<P><DT><A NAME="M21"><B>%U</B></A><DD>
Week of year (00 - 52), Sunday is the first day of the week.
<P><DT><A NAME="M22"><B>%w</B></A><DD>
Weekday number (Sunday = 0).
<P><DT><A NAME="M23"><B>%W</B></A><DD>
Week of year (00 - 52), Monday is the first day of the week.
<P><DT><A NAME="M24"><B>%x</B></A><DD>
Locale specific date format.
<P><DT><A NAME="M25"><B>%X</B></A><DD>
Locale specific time format.
<P><DT><A NAME="M26"><B>%y</B></A><DD>
Year without century (00 - 99).
<P><DT><A NAME="M27"><B>%Y</B></A><DD>
Year with century (e.g. 1990)
<P><DT><A NAME="M28"><B>%Z</B></A><DD>
Time zone name.
<P></DL>
<P>
<DL><P><DD>
In addition, the following field descriptors may be supported on some
systems (e.g. Unix but not Windows):
<P>
<DL>
<P><DT><A NAME="M29"><B>%D</B></A><DD>
Date as %m/%d/%y.
<P><DT><A NAME="M30"><B>%e</B></A><DD>
Day of month (1 - 31), no leading zeros.
<P><DT><A NAME="M31"><B>%h</B></A><DD>
Abbreviated month name.
<P><DT><A NAME="M32"><B>%n</B></A><DD>
Insert a newline.
<P><DT><A NAME="M33"><B>%r</B></A><DD>
Time as %I:%M:%S %p.
<P><DT><A NAME="M34"><B>%R</B></A><DD>
Time as %H:%M.
<P><DT><A NAME="M35"><B>%t</B></A><DD>
Insert a tab.
<P><DT><A NAME="M36"><B>%T</B></A><DD>
Time as %H:%M:%S.
<P></DL>
</DL>
<P>
<DL><P><DD>
If the <B>-format</B> argument is not specified, the format string
&quot;<B>%a %b %d %H:%M:%S %Z %Y</B>&quot; is used. If the <B>-gmt</B> argument
is present the next argument must be a boolean which if true specifies
that the time will be formatted as Greenwich Mean Time. If false
then the local timezone will be used as defined by the operating
environment.
</DL>
<P><DT><A NAME="M37"><B>clock scan </B><I>dateString</I> ?<B>-base </B><I>clockVal</I>? ?<B>-gmt </B><I>boolean</I>?</A><DD>
Convert <I>dateString</I> to an integer clock value (see <B>clock seconds</B>).
This command can parse and convert virtually any standard date and/or time
string, which can include standard time zone mnemonics. If only a time is
specified, the current date is assumed. If the string does not contain a
time zone mnemonic, the local time zone is assumed, unless the <B>-gmt</B>
argument is true, in which case the clock value is calculated assuming
that the specified time is relative to Greenwich Mean Time.
<B>-gmt</B>, if specified, affects only the computed time value; it does not
impact the interpretation of <B>-base</B>.
<P>
If the <B>-base</B> flag is specified, the next argument should contain
an integer clock value. Only the date in this value is used, not the
time. This is useful for determining the time on a specific day or
doing other date-relative conversions.
<P>
The <I>dateString</I> consists of zero or more specifications of the
following form:
<P>
<DL>
<P><DT><A NAME="M38"><I>time</I></A><DD>
A time of day, which is of the form: <I>hh</I>?<I>:mm</I>?<I>:ss</I>??
?<I>meridian</I>? ?<I>zone</I>? or <I>hhmm </I>?<I>meridian</I>?
?<I>zone</I>?. If no meridian is specified, <I>hh</I> is interpreted on
a 24-hour clock.
<P><DT><A NAME="M39"><I>date</I></A><DD>
A specific month and day with optional year. The
acceptable formats are <I>mm/dd</I>?<I>/yy</I>?, <I>monthname dd</I>
?, <I>yy</I>?, <I>dd monthname </I>?<I>yy</I>?, <I>day, dd monthname
yy</I>, <I>?CC?yymmdd</I>, <I>?CC?yy-mm-dd</I>, <I>dd-monthname-?CC?yy</I>.
The default year is the current year. If the year is less
than 100, we treat the years 00-68 as 2000-2068 and the years 69-99
as 1969-1999. Not all platforms can represent the years 38-70, so
an error may result if these years are used.
<P><DT><A NAME="M40"><I>ISO 8601 point-in-time</I></A><DD>
An ISO 8601 point-in-time specification, such as <I>CCyymmddThhmmss</I>, where
T is the literal T, <I>CCyymmdd hhmmss</I>, or
<I>CCyymmddThh:mm:ss</I>.
<P><DT><A NAME="M41"><I>relative time</I></A><DD>
A specification relative to the current time. The format is <I>number
unit</I> acceptable units are <B>year</B>, <B>fortnight</B>, <B>month</B>, <B>week</B>, <B>day</B>,
<B>hour</B>, <B>minute</B> (or <B>min</B>), and <B>second</B> (or <B>sec</B>). The
unit can be specified as a singular or plural, as in <B>3 weeks</B>.
These modifiers may also be specified:
<B>tomorrow</B>, <B>yesterday</B>, <B>today</B>, <B>now</B>,
<B>last</B>, <B>this</B>, <B>next</B>, <B>ago</B>.
<P></DL>
<P>
<DL><P><DD>
The actual date is calculated according to the following steps.
First, any absolute date and/or time is processed and converted.
Using that time as the base, day-of-week specifications are added.
Next, relative specifications are used. If a date or day is
specified, and no absolute or relative time is given, midnight is
used. Finally, a correction is applied so that the correct hour of
the day is produced after allowing for daylight savings time
differences and the correct date is given when going from the end
of a long month to a short month.
<P>
Daylight savings time correction is applied only when the relative time
is specified in units of days or more, ie, days, weeks, fortnights, months or
years. This means that when crossing the daylight savings time boundary,
different results will be given for <B>clock scan &quot;1 day&quot;</B> and
<B>clock scan &quot;24 hours&quot;</B>:
<PRE><B>% clock scan &quot;1 day&quot; -base [clock scan 1999-10-31]
941443200
% clock scan &quot;24 hours&quot; -base [clock scan 1999-10-31]
941439600</B></PRE>
</DL>
<P><DT><A NAME="M42"><B>clock seconds</B></A><DD>
Return the current date and time as a system-dependent integer value. The
unit of the value is seconds, allowing it to be used for relative time
calculations. The value is usually defined as total elapsed time from
an ``epoch''. You shouldn't assume the value of the epoch.
<P></DL>
<H3><A NAME="M43">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#clock">clock</A>, <A href="../Keywords/D.htm#date">date</A>, <A href="../Keywords/T.htm#time">time</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1992-1995 Karl Lehenbauer and Mark Diekhans.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1998-1999 Scriptics Corporation
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,47 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - close manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
close - Close an open channel.
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>close </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Closes the channel given by <I>channelId</I>. <I>ChannelId</I> must be a
channel identifier such as the return value from a previous <B><A HREF="../TkCmd/open.htm">open</A></B>
or <B><A HREF="../TkCmd/socket.htm">socket</A></B> command.
All buffered output is flushed to the channel's output device,
any buffered input is discarded, the underlying file or device is closed,
and <I>channelId</I> becomes unavailable for use.
<P>
If the channel is blocking, the command does not return until all output
is flushed.
If the channel is nonblocking and there is unflushed output, the
channel remains open and the command
returns immediately; output will be flushed in the background and the
channel will be closed when all the flushing is complete.
<P>
If <I>channelId</I> is a blocking channel for a command pipeline then
<B>close</B> waits for the child processes to complete.
<P>
If the channel is shared between interpreters, then <B>close</B>
makes <I>channelId</I> unavailable in the invoking interpreter but has no
other effect until all of the sharing interpreters have closed the
channel.
When the last interpreter in which the channel is registered invokes
<B>close</B>, the cleanup actions described above occur. See the
<B><A HREF="../TkCmd/interp.htm">interp</A></B> command for a description of channel sharing.
<P>
Channels are automatically closed when an interpreter is destroyed and
when the process exits. Channels are switched to blocking mode, to ensure
that all output is correctly flushed before the process exits.
<P>
The command returns an empty string, and may generate an error if
an error occurs while flushing output.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/socket.htm">socket</A></B>, <B><A HREF="../TkCmd/eof.htm">eof</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/C.htm#close">close</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,28 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - concat manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
concat - Join lists together
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>concat</B><I> </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command treats each argument as a list and concatenates them
into a single list.
It also eliminates leading and trailing spaces in the <I>arg</I>'s
and adds a single separator space between <I>arg</I>'s.
It permits any number of arguments. For example,
the command
<PRE><B>concat a b {c d e} {f {g h}}</B></PRE>
will return
<PRE><B>a b c d e f {g h}</B></PRE>
as its result.
<P>
If no <I>arg</I>s are supplied, the result is an empty string.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/append.htm">append</A></B>, <B><A HREF="../TkCmd/eval.htm">eval</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#concatenate">concatenate</A>, <A href="../Keywords/J.htm#join">join</A>, <A href="../Keywords/L.htm#lists">lists</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,26 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - continue manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
continue - Skip to the next iteration of a loop
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>continue</B><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is typically invoked inside the body of a looping command
such as <B><A HREF="../TkCmd/for.htm">for</A></B> or <B><A HREF="../TkCmd/foreach.htm">foreach</A></B> or <B><A HREF="../TkCmd/while.htm">while</A></B>.
It returns a TCL_CONTINUE code, which causes a continue exception
to occur.
The exception causes the current script to be aborted
out to the innermost containing loop command, which then
continues with the next iteration of the loop.
Catch exceptions are also handled in a few other situations, such
as the <B><A HREF="../TkCmd/catch.htm">catch</A></B> command and the outermost scripts of procedure
bodies.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/break.htm">break</A></B>, <B><A HREF="../TkCmd/for.htm">for</A></B>, <B><A HREF="../TkCmd/foreach.htm">foreach</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#continue">continue</A>, <A href="../Keywords/I.htm#iteration">iteration</A>, <A href="../Keywords/L.htm#loop">loop</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,146 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - dde manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="dde.htm#M2" NAME="L166">NAME</A>
<DL><DD>dde - Execute a Dynamic Data Exchange command</DL>
<DD><A HREF="dde.htm#M3" NAME="L167">SYNOPSIS</A>
<DL>
<DD><B>package require dde 1.1</B>
<DD><B>dde </B><I>servername </I>?<I>topic</I>?
<DD><B>dde ?-async?</B> <I>command service topic </I>?<I>data</I>?
</DL>
<DD><A HREF="dde.htm#M4" NAME="L168">DESCRIPTION</A>
<DL>
<DD><A HREF="dde.htm#M5" NAME="L169"><B>-async</B></A>
</DL>
<DD><A HREF="dde.htm#M6" NAME="L170">DDE COMMANDS</A>
<DL>
<DD><A HREF="dde.htm#M7" NAME="L171"><B>dde servername </B>?<I>topic</I>?</A>
<DD><A HREF="dde.htm#M8" NAME="L172"><B>dde execute </B><I>service topic data</I></A>
<DD><A HREF="dde.htm#M9" NAME="L173"><B>dde poke </B><I>service topic item data</I></A>
<DD><A HREF="dde.htm#M10" NAME="L174"><B>dde request </B><I>service topic item</I></A>
<DD><A HREF="dde.htm#M11" NAME="L175"><B>dde services </B><I>service topic</I></A>
<DD><A HREF="dde.htm#M12" NAME="L176"><B>dde eval </B><I>topic cmd </I>?<I>arg arg ...</I>?</A>
</DL>
<DD><A HREF="dde.htm#M13" NAME="L177">DDE AND TCL</A>
<DD><A HREF="dde.htm#M14" NAME="L178">SEE ALSO</A>
<DD><A HREF="dde.htm#M15" NAME="L179">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
dde - Execute a Dynamic Data Exchange command
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>package require dde 1.1</B><BR>
<B>dde </B><I>servername </I>?<I>topic</I>?<BR>
<B>dde ?-async?</B> <I>command service topic </I>?<I>data</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command allows an application to send Dynamic Data Exchange (DDE)
command when running under Microsoft Windows. Dynamic Data Exchange is
a mechanism where applications can exchange raw data. Each DDE
transaction needs a <I>service name</I> and a <I>topic</I>. Both the
<I>service name</I> and <I>topic</I> are application defined; Tcl uses
the service name <B>TclEval</B>, while the topic name is the name of the
interpreter given by <B>dde servername</B>. Other applications have their
own <I>service names</I> and <I>topics</I>. For instance, Microsoft Excel
has the service name <B>Excel</B>.
<P>
The only option to the <B>dde</B> command is:
<P>
<DL>
<P><DT><A NAME="M5"><B>-async</B></A><DD>
Requests asynchronous invocation. This is valid only for the
<B>execute</B> subcommand. Normally, the <B>dde execute</B> subcommand
waits until the command completes, returning appropriate error
messages. When the <B>-async</B> option is used, the command returns
immediately, and no error information is available.
<P></DL>
<H3><A NAME="M6">DDE COMMANDS</A></H3>
The following commands are a subset of the full Dynamic Data Exchange
set of commands.
<P>
<DL>
<P><DT><A NAME="M7"><B>dde servername </B>?<I>topic</I>?</A><DD>
<B>dde servername</B> registers the interpreter as a DDE server with
the service name <B>TclEval</B> and the topic name specified by <I>topic</I>.
If no <I>topic</I> is given, <B>dde servername</B> returns the name
of the current topic or the empty string if it is not registered as a service.
<P><DT><A NAME="M8"><B>dde execute </B><I>service topic data</I></A><DD>
<B>dde execute</B> takes the <I>data</I> and sends it to the server
indicated by <I>service</I> with the topic indicated by
<I>topic</I>. Typically, <I>service</I> is the name of an application,
and <I>topic</I> is a file to work on. The <I>data</I> field is given
to the remote application. Typically, the application treats the
<I>data</I> field as a script, and the script is run in the
application. The command returns an error if the script did not
run. If the <B>-async</B> flag was used, the command
returns immediately with no error.
<P><DT><A NAME="M9"><B>dde poke </B><I>service topic item data</I></A><DD>
<B>dde poke</B> passes the <I>data</I> to the server indicated by
<I>service</I> using the <I>topic</I> and <I>item</I> specified. Typically,
<I>service</I> is the name of an application. <I>topic</I> is application
specific but can be a command to the server or the name of a file to work
on. The <I>item</I> is also application specific and is often not used, but
it must always be non-null. The <I>data</I> field is given to the remote
application.
<P><DT><A NAME="M10"><B>dde request </B><I>service topic item</I></A><DD>
<B>dde request</B> is typically used to get the value of something; the
value of a cell in Microsoft Excel or the text of a selection in
Microsoft Word. <I>service</I> is typically the name of an application,
<I>topic</I> is typically the name of the file, and <I>item</I> is
application-specific. The command returns the value of <I>item</I> as
defined in the application.
<P><DT><A NAME="M11"><B>dde services </B><I>service topic</I></A><DD>
<B>dde services</B> returns a list of service-topic pairs that
currently exist on the machine. If <I>service</I> and <I>topic</I> are
both null strings ({}), then all service-topic pairs currently
available on the system are returned. If <I>service</I> is null and
<I>topic</I> is not, then all services with the specified topic are
returned. If <I>service</I> is not null and <I>topic</I> is, all topics
for a given service are returned. If both are not null, if that
service-topic pair currently exists, it is returned; otherwise, null
is returned.
<P><DT><A NAME="M12"><B>dde eval </B><I>topic cmd </I>?<I>arg arg ...</I>?</A><DD>
<B>dde eval</B> evaluates a command and its arguments using the
interpreter specified by <I>topic</I>. The DDE service must be the
<B>TclEval</B> service. This command can be used to replace send on
Windows.
<P></DL>
<H3><A NAME="M13">DDE AND TCL</A></H3>
A Tcl interpreter always has a service name of <B>TclEval</B>. Each
different interpreter of all running Tcl applications must be
given a unique
name specified by <B>dde servername</B>. Each interp is available as a
DDE topic only if the <B>dde servername</B> command was used to set the
name of the topic for each interp. So a <B>dde services TclEval {}</B>
command will return a list of service-topic pairs, where each of the
currently running interps will be a topic.
<P>
When Tcl processes a <B>dde execute</B> command, the data for the
execute is run as a script in the interp named by the topic of the
<B>dde execute</B> command.
<P>
When Tcl processes a <B>dde request</B> command, it returns the value of the
variable given in the dde command in the context of the interp named by the
dde topic. Tcl reserves the variable <B>$TCLEVAL$EXECUTE$RESULT</B> for
internal use, and <B>dde request</B> commands for that variable will give
unpredictable results.
<P>
An external application which wishes to run a script in Tcl should have
that script store its result in a variable, run the <B>dde execute</B>
command, and the run <B>dde request</B> to get the value of the
variable.
<P>
When using DDE, be careful to ensure that the event queue is flushed
using either <B><A HREF="../TkCmd/update.htm">update</A></B> or <B><A HREF="../TkCmd/vwait.htm">vwait</A></B>. This happens by default
when using <B><A HREF="../UserCmd/wish.htm">wish</A></B> unless a blocking command is called (such as <B><A HREF="../TkCmd/exec.htm">exec</A></B>
without adding the <B>&amp;</B> to place the process in the background).
If for any reason the event queue is not flushed, DDE commands may
hang until the event queue is flushed. This can create a deadlock
situation.
<H3><A NAME="M14">SEE ALSO</A></H3>
<B><A HREF="../TclCmd/tk.htm">tk</A></B>, <B><A HREF="../TclCmd/winfo.htm">winfo</A></B>, <B><A HREF="../TclCmd/send.htm">send</A></B>
<H3><A NAME="M15">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#application">application</A>, <A href="../Keywords/D.htm#dde">dde</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/R.htm#remote execution">remote execution</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,83 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - encoding manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="encoding.htm#M2" NAME="L180">NAME</A>
<DL><DD>encoding - Manipulate encodings</DL>
<DD><A HREF="encoding.htm#M3" NAME="L181">SYNOPSIS</A>
<DL>
<DD><B>encoding </B><I>option</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="encoding.htm#M4" NAME="L182">INTRODUCTION</A>
<DD><A HREF="encoding.htm#M5" NAME="L183">DESCRIPTION</A>
<DL>
<DD><A HREF="encoding.htm#M6" NAME="L184"><B>encoding convertfrom ?</B><I>encoding</I>? <I>data</I></A>
<DD><A HREF="encoding.htm#M7" NAME="L185"><B>encoding convertto ?</B><I>encoding</I>? <I>string</I></A>
<DD><A HREF="encoding.htm#M8" NAME="L186"><B>encoding names</B></A>
<DD><A HREF="encoding.htm#M9" NAME="L187"><B>encoding system</B> ?<I>encoding</I>?</A>
</DL>
<DD><A HREF="encoding.htm#M10" NAME="L188">EXAMPLE</A>
<DD><A HREF="encoding.htm#M11" NAME="L189">SEE ALSO</A>
<DD><A HREF="encoding.htm#M12" NAME="L190">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
encoding - Manipulate encodings
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>encoding </B><I>option</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">INTRODUCTION</A></H3>
Strings in Tcl are encoded using 16-bit Unicode characters. Different
operating system interfaces or applications may generate strings in
other encodings such as Shift-JIS. The <B>encoding</B> command helps
to bridge the gap between Unicode and these other formats.
<H3><A NAME="M5">DESCRIPTION</A></H3>
Performs one of several encoding related operations, depending on
<I>option</I>. The legal <I>option</I>s are:
<P>
<DL>
<P><DT><A NAME="M6"><B>encoding convertfrom ?</B><I>encoding</I>? <I>data</I></A><DD>
Convert <I>data</I> to Unicode from the specified <I>encoding</I>. The
characters in <I>data</I> are treated as binary data where the lower
8-bits of each character is taken as a single byte. The resulting
sequence of bytes is treated as a string in the specified
<I>encoding</I>. If <I>encoding</I> is not specified, the current
system encoding is used.
<P><DT><A NAME="M7"><B>encoding convertto ?</B><I>encoding</I>? <I>string</I></A><DD>
Convert <I>string</I> from Unicode to the specified <I>encoding</I>.
The result is a sequence of bytes that represents the converted
string. Each byte is stored in the lower 8-bits of a Unicode
character. If <I>encoding</I> is not specified, the current
system encoding is used.
<P><DT><A NAME="M8"><B>encoding names</B></A><DD>
Returns a list containing the names of all of the encodings that are
currently available.
<P><DT><A NAME="M9"><B>encoding system</B> ?<I>encoding</I>?</A><DD>
Set the system encoding to <I>encoding</I>. If <I>encoding</I> is
omitted then the command returns the current system encoding. The
system encoding is used whenever Tcl passes strings to system calls.
<P></DL>
<H3><A NAME="M10">EXAMPLE</A></H3>
It is common practice to write script files using a text editor that
produces output in the euc-jp encoding, which represents the ASCII
characters as singe bytes and Japanese characters as two bytes. This
makes it easy to embed literal strings that correspond to non-ASCII
characters by simply typing the strings in place in the script.
However, because the <B><A HREF="../TkCmd/source.htm">source</A></B> command always reads files using the
ISO8859-1 encoding, Tcl will treat each byte in the file as a separate
character that maps to the 00 page in Unicode. The
resulting Tcl strings will not contain the expected Japanese
characters. Instead, they will contain a sequence of Latin-1
characters that correspond to the bytes of the original string. The
<B>encoding</B> command can be used to convert this string to the
expected Japanese Unicode characters. For example,
<PRE>set s [encoding convertfrom euc-jp &quot;&#92;xA4&#92;xCF&quot;]</PRE>
would return the Unicode string &quot;&#92;u306F&quot;, which is the Hiragana
letter HA.
<H3><A NAME="M11">SEE ALSO</A></H3>
<B><A HREF="../TkLib/Encoding.htm">Tcl_GetEncoding</A></B>
<H3><A NAME="M12">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#encoding">encoding</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1998 by Scriptics Corporation.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,19 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - eof manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
eof - Check for end of file condition on channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>eof </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Returns 1 if an end of file condition occurred during the most
recent input operation on <I>channelId</I> (such as <B><A HREF="../TkCmd/gets.htm">gets</A></B>),
0 otherwise.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/close.htm">close</A></B>, <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#end of file">end of file</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,48 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - error manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
error - Generate an error
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>error </B><I>message</I> ?<I>info</I>? ?<I>code</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Returns a TCL_ERROR code, which causes command interpretation to be
unwound. <I>Message</I> is a string that is returned to the application
to indicate what went wrong.
<P>
If the <I>info</I> argument is provided and is non-empty,
it is used to initialize the global variable <B>errorInfo</B>.
<B>errorInfo</B> is used to accumulate a stack trace of what
was in progress when an error occurred; as nested commands unwind,
the Tcl interpreter adds information to <B>errorInfo</B>. If the
<I>info</I> argument is present, it is used to initialize
<B>errorInfo</B> and the first increment of unwind information
will not be added by the Tcl interpreter. In other
words, the command containing the <B>error</B> command will not appear
in <B>errorInfo</B>; in its place will be <I>info</I>.
This feature is most useful in conjunction with the <B><A HREF="../TkCmd/catch.htm">catch</A></B> command:
if a caught error cannot be handled successfully, <I>info</I> can be used
to return a stack trace reflecting the original point of occurrence
of the error:
<PRE><B>catch {...} errMsg
set savedInfo $errorInfo
...
error $errMsg $savedInfo</B></PRE>
<P>
If the <I>code</I> argument is present, then its value is stored
in the <B>errorCode</B> global variable. This variable is intended
to hold a machine-readable description of the error in cases where
such information is available; see the <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B> manual
page for information on the proper format for the variable.
If the <I>code</I> argument is not
present, then <B>errorCode</B> is automatically reset to
``NONE'' by the Tcl interpreter as part of processing the
error generated by the command.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/catch.htm">catch</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#error">error</A>, <A href="../Keywords/E.htm#errorCode">errorCode</A>, <A href="../Keywords/E.htm#errorInfo">errorInfo</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,22 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - eval manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
eval - Evaluate a Tcl script
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>eval </B><I>arg </I>?<I>arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
<B>Eval</B> takes one or more arguments, which together comprise a Tcl
script containing one or more commands.
<B>Eval</B> concatenates all its arguments in the same
fashion as the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command, passes the concatenated string to the
Tcl interpreter recursively, and returns the result of that
evaluation (or any error generated by it).
<H3><A NAME="M5">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#concatenate">concatenate</A>, <A href="../Keywords/E.htm#evaluate">evaluate</A>, <A href="../Keywords/S.htm#script">script</A>
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/catch.htm">catch</A></B>, <B><A HREF="../TkCmd/concat.htm">concat</A></B>, <B><A HREF="../TkCmd/error.htm">error</A></B>, <B>subs</B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,314 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - exec manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="exec.htm#M2" NAME="L206">NAME</A>
<DL><DD>exec - Invoke subprocess(es)</DL>
<DD><A HREF="exec.htm#M3" NAME="L207">SYNOPSIS</A>
<DL>
<DD><B>exec </B>?<I>switches</I>? <I>arg </I>?<I>arg ...</I>?
</DL>
<DD><A HREF="exec.htm#M4" NAME="L208">DESCRIPTION</A>
<DL>
<DD><A HREF="exec.htm#M5" NAME="L209"><B>-keepnewline</B></A>
<DD><A HREF="exec.htm#M6" NAME="L210"><B>-&nbsp;-</B></A>
</DL>
<DL>
<DD><A HREF="exec.htm#M7" NAME="L211">|</A>
<DD><A HREF="exec.htm#M8" NAME="L212">|&amp;</A>
<DD><A HREF="exec.htm#M9" NAME="L213">&lt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M10" NAME="L214">&lt;@ <I>fileId</I></A>
<DD><A HREF="exec.htm#M11" NAME="L215">&lt;&lt; <I>value</I></A>
<DD><A HREF="exec.htm#M12" NAME="L216">&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M13" NAME="L217">2&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M14" NAME="L218">&gt;&amp; <I>fileName</I></A>
<DD><A HREF="exec.htm#M15" NAME="L219">&gt;&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M16" NAME="L220">2&gt;&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M17" NAME="L221">&gt;&gt;&amp; <I>fileName</I></A>
<DD><A HREF="exec.htm#M18" NAME="L222">&gt;@ <I>fileId</I></A>
<DD><A HREF="exec.htm#M19" NAME="L223">2&gt;@ <I>fileId</I></A>
<DD><A HREF="exec.htm#M20" NAME="L224">&gt;&amp;@ <I>fileId</I></A>
</DL>
<DD><A HREF="exec.htm#M21" NAME="L225">PORTABILITY ISSUES</A>
<DL>
<DD><A HREF="exec.htm#M22" NAME="L226"><B>Windows</B> (all versions)</A>
<DD><A HREF="exec.htm#M23" NAME="L227"><B>Windows NT</B></A>
<DD><A HREF="exec.htm#M24" NAME="L228"><B>Windows 95</B></A>
<DD><A HREF="exec.htm#M25" NAME="L229"><B>Macintosh</B></A>
<DD><A HREF="exec.htm#M26" NAME="L230"><B>Unix</B></A>
</DL>
<DD><A HREF="exec.htm#M27" NAME="L231">SEE ALSO</A>
<DD><A HREF="exec.htm#M28" NAME="L232">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
exec - Invoke subprocess(es)
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>exec </B>?<I>switches</I>? <I>arg </I>?<I>arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command treats its arguments as the specification
of one or more subprocesses to execute.
The arguments take the form of a standard shell pipeline
where each <I>arg</I> becomes one word of a command, and
each distinct command becomes a subprocess.
<P>
If the initial arguments to <B>exec</B> start with <B>-</B> then
they are treated as command-line switches and are not part
of the pipeline specification. The following switches are
currently supported:
<P>
<DL>
<P><DT><A NAME="M5"><B>-keepnewline</B></A><DD>
Retains a trailing newline in the pipeline's output.
Normally a trailing newline will be deleted.
<P><DT><A NAME="M6"><B>-&nbsp;-</B></A><DD>
Marks the end of switches. The argument following this one will
be treated as the first <I>arg</I> even if it starts with a <B>-</B>.
<P></DL>
<P>
If an <I>arg</I> (or pair of <I>arg</I>'s) has one of the forms
described below then it is used by <B>exec</B> to control the
flow of input and output among the subprocess(es).
Such arguments will not be passed to the subprocess(es). In forms
such as ``&lt; <I>fileName</I>'' <I>fileName</I> may either be in a
separate argument from ``&lt;'' or in the same argument with no
intervening space (i.e. ``&lt;<I>fileName</I>'').
<P>
<DL>
<P><DT><A NAME="M7">|</A><DD>
Separates distinct commands in the pipeline. The standard output
of the preceding command will be piped into the standard input
of the next command.
<P><DT><A NAME="M8">|&amp;</A><DD>
Separates distinct commands in the pipeline. Both standard output
and standard error of the preceding command will be piped into
the standard input of the next command.
This form of redirection overrides forms such as 2&gt; and &gt;&amp;.
<P><DT><A NAME="M9">&lt; <I>fileName</I></A><DD>
The file named by <I>fileName</I> is opened and used as the standard
input for the first command in the pipeline.
<P><DT><A NAME="M10">&lt;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
It is used as the standard input for the first command in the pipeline.
<I>FileId</I> must have been opened for reading.
<P><DT><A NAME="M11">&lt;&lt; <I>value</I></A><DD>
<I>Value</I> is passed to the first command as its standard input.
<P><DT><A NAME="M12">&gt; <I>fileName</I></A><DD>
Standard output from the last command is redirected to the file named
<I>fileName</I>, overwriting its previous contents.
<P><DT><A NAME="M13">2&gt; <I>fileName</I></A><DD>
Standard error from all commands in the pipeline is redirected to the
file named <I>fileName</I>, overwriting its previous contents.
<P><DT><A NAME="M14">&gt;&amp; <I>fileName</I></A><DD>
Both standard output from the last command and standard error from all
commands are redirected to the file named <I>fileName</I>, overwriting
its previous contents.
<P><DT><A NAME="M15">&gt;&gt; <I>fileName</I></A><DD>
Standard output from the last command is
redirected to the file named <I>fileName</I>, appending to it rather
than overwriting it.
<P><DT><A NAME="M16">2&gt;&gt; <I>fileName</I></A><DD>
Standard error from all commands in the pipeline is
redirected to the file named <I>fileName</I>, appending to it rather
than overwriting it.
<P><DT><A NAME="M17">&gt;&gt;&amp; <I>fileName</I></A><DD>
Both standard output from the last command and standard error from
all commands are redirected to the file named <I>fileName</I>,
appending to it rather than overwriting it.
<P><DT><A NAME="M18">&gt;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
Standard output from the last command is redirected to <I>fileId</I>'s
file, which must have been opened for writing.
<P><DT><A NAME="M19">2&gt;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
Standard error from all commands in the pipeline is
redirected to <I>fileId</I>'s file.
The file must have been opened for writing.
<P><DT><A NAME="M20">&gt;&amp;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
Both standard output from the last command and standard error from
all commands are redirected to <I>fileId</I>'s file.
The file must have been opened for writing.
<P></DL>
<P>
If standard output has not been redirected then the <B>exec</B>
command returns the standard output from the last command
in the pipeline.
If any of the commands in the pipeline exit abnormally or
are killed or suspended, then <B>exec</B> will return an error
and the error message will include the pipeline's output followed by
error messages describing the abnormal terminations; the
<B>errorCode</B> variable will contain additional information
about the last abnormal termination encountered.
If any of the commands writes to its standard error file and that
standard error isn't redirected,
then <B>exec</B> will return an error; the error message
will include the pipeline's standard output, followed by messages
about abnormal terminations (if any), followed by the standard error
output.
<P>
If the last character of the result or error message
is a newline then that character is normally deleted
from the result or error message.
This is consistent with other Tcl return values, which don't
normally end with newlines.
However, if <B>-keepnewline</B> is specified then the trailing
newline is retained.
<P>
If standard input isn't redirected with ``&lt;'' or ``&lt;&lt;''
or ``&lt;@'' then the standard input for the first command in the
pipeline is taken from the application's current standard input.
<P>
If the last <I>arg</I> is ``&amp;'' then the pipeline will be
executed in background.
In this case the <B>exec</B> command will return a list whose
elements are the process identifiers for all of the subprocesses
in the pipeline.
The standard output from the last command in the pipeline will
go to the application's standard output if it hasn't been
redirected, and error output from all of
the commands in the pipeline will go to the application's
standard error file unless redirected.
<P>
The first word in each command is taken as the command name;
tilde-substitution is performed on it, and if the result contains
no slashes then the directories
in the PATH environment variable are searched for
an executable by the given name.
If the name contains a slash then it must refer to an executable
reachable from the current directory.
No ``<A HREF="../TkCmd/glob.htm">glob</A>'' expansion or other shell-like substitutions
are performed on the arguments to commands.
<H3><A NAME="M21">PORTABILITY ISSUES</A></H3>
<DL>
<P><DT><A NAME="M22"><B>Windows</B> (all versions)</A><DD>
Reading from or writing to a socket, using the ``<B>@ </B><I>fileId</I>''
notation, does not work. When reading from a socket, a 16-bit DOS
application will hang and a 32-bit application will return immediately with
end-of-file. When either type of application writes to a socket, the
information is instead sent to the console, if one is present, or is
discarded.
<P>
The Tk console text widget does not provide real standard IO capabilities.
Under Tk, when redirecting from standard input, all applications will see an
immediate end-of-file; information redirected to standard output or standard
error will be discarded.
<P>
Either forward or backward slashes are accepted as path separators for
arguments to Tcl commands. When executing an application, the path name
specified for the application may also contain forward or backward slashes
as path separators. Bear in mind, however, that most Windows applications
accept arguments with forward slashes only as option delimiters and
backslashes only in paths. Any arguments to an application that specify a
path name with forward slashes will not automatically be converted to use
the backslash character. If an argument contains forward slashes as the
path separator, it may or may not be recognized as a path name, depending on
the program.
<P>
Additionally, when calling a 16-bit DOS or Windows 3.X application, all path
names must use the short, cryptic, path format (e.g., using ``applba~1.def''
instead of ``applbakery.default'').
<P>
Two or more forward or backward slashes in a row in a path refer to a
network path. For example, a simple concatenation of the root directory
<B>c:/</B> with a subdirectory <B>/windows/system</B> will yield
<B>c://windows/system</B> (two slashes together), which refers to the mount
point called <B>system</B> on the machine called <B>windows</B> (and the
<B>c:/</B> is ignored), and is not equivalent to <B>c:/windows/system</B>,
which describes a directory on the current computer. The <B><A HREF="../TkCmd/file.htm">file join</A></B>
command should be used to concatenate path components.
<P><DT><A NAME="M23"><B>Windows NT</B></A><DD>
When attempting to execute an application, <B>exec</B> first searches for the
name as it was specified. Then, in order, <B>.com</B>, <B>.exe</B>, and <B>.bat</B>
are appended to the end of the specified name and it searches for
the longer name. If a directory name was not specified as part of the
application name, the following directories are automatically searched in
order when attempting to locate the application:
<P>
<DL><P><DD>
The directory from which the Tcl executable was loaded.
<BR>
The current directory.
<BR>
The Windows NT 32-bit system directory.
<BR>
The Windows NT 16-bit system directory.
<BR>
The Windows NT home directory.
<BR>
The directories listed in the path.
</DL>
<P>
In order to execute the shell builtin commands like <B>dir</B> and <B>copy</B>,
the caller must prepend ``<B>cmd.exe /c </B>'' to the desired command.
<P>
<P><DT><A NAME="M24"><B>Windows 95</B></A><DD>
When attempting to execute an application, <B>exec</B> first searches for the
name as it was specified. Then, in order, <B>.com</B>, <B>.exe</B>, and <B>.bat</B>
are appended to the end of the specified name and it searches for
the longer name. If a directory name was not specified as part of the
application name, the following directories are automatically searched in
order when attempting to locate the application:
<P>
<DL><P><DD>
The directory from which the Tcl executable was loaded.
<BR>
The current directory.
<BR>
The Windows 95 system directory.
<BR>
The Windows 95 home directory.
<BR>
The directories listed in the path.
</DL>
<P>
In order to execute the shell builtin commands like <B>dir</B> and <B>copy</B>,
the caller must prepend ``<B>command.com /c </B>'' to the desired command.
<P>
Once a 16-bit DOS application has read standard input from a console and
then quit, all subsequently run 16-bit DOS applications will see the
standard input as already closed. 32-bit applications do not have this
problem and will run correctly, even after a 16-bit DOS application thinks
that standard input is closed. There is no known workaround for this bug
at this time.
<P>
Redirection between the <B>NUL:</B> device and a 16-bit application does not
always work. When redirecting from <B>NUL:</B>, some applications may hang,
others will get an infinite stream of ``0x01'' bytes, and some will actually
correctly get an immediate end-of-file; the behavior seems to depend upon
something compiled into the application itself. When redirecting greater than
4K or so to <B>NUL:</B>, some applications will hang. The above problems do not
happen with 32-bit applications.
<P>
All DOS 16-bit applications are run synchronously. All standard input from
a pipe to a 16-bit DOS application is collected into a temporary file; the
other end of the pipe must be closed before the 16-bit DOS application
begins executing. All standard output or error from a 16-bit DOS
application to a pipe is collected into temporary files; the application
must terminate before the temporary files are redirected to the next stage
of the pipeline. This is due to a workaround for a Windows 95 bug in the
implementation of pipes, and is how the standard Windows 95 DOS shell
handles pipes itself.
<P>
Certain applications, such as <B>command.com</B>, should not be executed
interactively. Applications which directly access the console window,
rather than reading from their standard input and writing to their standard
output may fail, hang Tcl, or even hang the system if their own private
console window is not available to them.
<P><DT><A NAME="M25"><B>Macintosh</B></A><DD>
The <B>exec</B> command is not implemented and does not exist under Macintosh.
<P><DT><A NAME="M26"><B>Unix</B></A><DD>
The <B>exec</B> command is fully functional and works as described.
<P></DL>
<H3><A NAME="M27">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/error.htm">error</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>
<H3><A NAME="M28">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#execute">execute</A>, <A href="../Keywords/P.htm#pipeline">pipeline</A>, <A href="../Keywords/R.htm#redirection">redirection</A>, <A href="../Keywords/S.htm#subprocess">subprocess</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,20 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - exit manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
exit - End the application
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>exit </B>?<I>returnCode</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Terminate the process, returning <I>returnCode</I> to the
system as the exit status.
If <I>returnCode</I> isn't specified then it defaults
to 0.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/exec.htm">exec</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#exit">exit</A>, <A href="../Keywords/P.htm#process">process</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,380 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - expr manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="expr.htm#M2" NAME="L238">NAME</A>
<DL><DD>expr - Evaluate an expression</DL>
<DD><A HREF="expr.htm#M3" NAME="L239">SYNOPSIS</A>
<DL>
<DD><B>expr </B><I>arg </I>?<I>arg arg ...</I>?
</DL>
<DD><A HREF="expr.htm#M4" NAME="L240">DESCRIPTION</A>
<DD><A HREF="expr.htm#M5" NAME="L241">OPERANDS</A>
<DL>
</DL>
<DD><A HREF="expr.htm#M6" NAME="L242">OPERATORS</A>
<DL>
<DD><A HREF="expr.htm#M7" NAME="L243"><B>- + ~ !</B></A>
<DD><A HREF="expr.htm#M8" NAME="L244"><B>* / %</B></A>
<DD><A HREF="expr.htm#M9" NAME="L245"><B>+ -</B></A>
<DD><A HREF="expr.htm#M10" NAME="L246"><B>&lt;&lt; &gt;&gt;</B></A>
<DD><A HREF="expr.htm#M11" NAME="L247"><B>&lt; &gt; &lt;= &gt;=</B></A>
<DD><A HREF="expr.htm#M12" NAME="L248"><B>== !=</B></A>
<DD><A HREF="expr.htm#M13" NAME="L249"><B>&amp;</B></A>
<DD><A HREF="expr.htm#M14" NAME="L250"><B>^</B></A>
<DD><A HREF="expr.htm#M15" NAME="L251"><B>|</B></A>
<DD><A HREF="expr.htm#M16" NAME="L252"><B>&amp;&amp;</B></A>
<DD><A HREF="expr.htm#M17" NAME="L253"><B>||</B></A>
<DD><A HREF="expr.htm#M18" NAME="L254"><I>x</I><B>?</B><I>y</I><B>:</B><I>z</I></A>
</DL>
<DD><A HREF="expr.htm#M19" NAME="L255">MATH FUNCTIONS</A>
<DL>
<DD><A HREF="expr.htm#M20" NAME="L256"><B>abs(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M21" NAME="L257"><B>acos(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M22" NAME="L258"><B>asin(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M23" NAME="L259"><B>atan(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M24" NAME="L260"><B>atan2(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M25" NAME="L261"><B>ceil(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M26" NAME="L262"><B>cos(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M27" NAME="L263"><B>cosh(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M28" NAME="L264"><B>double(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M29" NAME="L265"><B>exp(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M30" NAME="L266"><B>floor(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M31" NAME="L267"><B>fmod(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M32" NAME="L268"><B>hypot(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M33" NAME="L269"><B>int(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M34" NAME="L270"><B>log(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M35" NAME="L271"><B>log10(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M36" NAME="L272"><B>pow(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M37" NAME="L273"><B>rand()</B></A>
<DD><A HREF="expr.htm#M38" NAME="L274"><B>round(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M39" NAME="L275"><B>sin(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M40" NAME="L276"><B>sinh(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M41" NAME="L277"><B>sqrt(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M42" NAME="L278"><B>srand(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M43" NAME="L279"><B>tan(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M44" NAME="L280"><B>tanh(</B><I>arg</I><B>)</B></A>
</DL>
<DD><A HREF="expr.htm#M45" NAME="L281">TYPES, OVERFLOW, AND PRECISION</A>
<DD><A HREF="expr.htm#M46" NAME="L282">STRING OPERATIONS</A>
<DD><A HREF="expr.htm#M47" NAME="L283">PERFORMANCE CONSIDERATIONS</A>
<DD><A HREF="expr.htm#M48" NAME="L284">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
expr - Evaluate an expression
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>expr </B><I>arg </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Concatenates <I>arg</I>'s (adding separator spaces between them),
evaluates the result as a Tcl expression, and returns the value.
The operators permitted in Tcl expressions are a subset of
the operators permitted in C expressions, and they have the
same meaning and precedence as the corresponding C operators.
Expressions almost always yield numeric results
(integer or floating-point values).
For example, the expression
<PRE><B>expr 8.2 + 6</B></PRE>
evaluates to 14.2.
Tcl expressions differ from C expressions in the way that
operands are specified. Also, Tcl expressions support
non-numeric operands and string comparisons.
<H3><A NAME="M5">OPERANDS</A></H3>
A Tcl expression consists of a combination of operands, operators,
and parentheses.
White space may be used between the operands and operators and
parentheses; it is ignored by the expression's instructions.
Where possible, operands are interpreted as integer values.
Integer values may be specified in decimal (the normal case), in octal (if the
first character of the operand is <B>0</B>), or in hexadecimal (if the first
two characters of the operand are <B>0x</B>).
If an operand does not have one of the integer formats given
above, then it is treated as a floating-point number if that is
possible. Floating-point numbers may be specified in any of the
ways accepted by an ANSI-compliant C compiler (except that the
<B>f</B>, <B>F</B>, <B>l</B>, and <B>L</B> suffixes will not be permitted in
most installations). For example, all of the
following are valid floating-point numbers: 2.1, 3., 6e4, 7.91e+16.
If no numeric interpretation is possible, then an operand is left
as a string (and only a limited set of operators may be applied to
it).
<P>
Operands may be specified in any of the following ways:
<P>
<DL>
<P><DT>[1]<DD>
As an numeric value, either integer or floating-point.
<P><DT>[2]<DD>
As a Tcl variable, using standard <B>$</B> notation.
The variable's value will be used as the operand.
<P><DT>[3]<DD>
As a string enclosed in double-quotes.
The expression parser will perform backslash, variable, and
command substitutions on the information between the quotes,
and use the resulting value as the operand
<P><DT>[4]<DD>
As a string enclosed in braces.
The characters between the open brace and matching close brace
will be used as the operand without any substitutions.
<P><DT>[5]<DD>
As a Tcl command enclosed in brackets.
The command will be executed and its result will be used as
the operand.
<P><DT>[6]<DD>
As a mathematical function whose arguments have any of the above
forms for operands, such as <B>sin($x)</B>. See below for a list of defined
functions.
<P></DL>
<P>
Where substitutions occur above (e.g. inside quoted strings), they
are performed by the expression's instructions.
However, an additional layer of substitution may already have
been performed by the command parser before the expression
processor was called.
As discussed below, it is usually best to enclose expressions
in braces to prevent the command parser from performing substitutions
on the contents.
<P>
For some examples of simple expressions, suppose the variable
<B>a</B> has the value 3 and
the variable <B>b</B> has the value 6.
Then the command on the left side of each of the lines below
will produce the value on the right side of the line:
<PRE><B>expr 3.1 + $a 6.1
expr 2 + &quot;$a.$b&quot; 5.6
expr 4*[llength &quot;6 2&quot;] 8
expr {{word one} &lt; &quot;word $a&quot;} 0</B></PRE>
<H3><A NAME="M6">OPERATORS</A></H3>
The valid operators are listed below, grouped in decreasing order
of precedence:
<P>
<DL>
<P><DT><A NAME="M7"><B>- + ~ !</B></A><DD>
Unary minus, unary plus, bit-wise NOT, logical NOT. None of these operands
may be applied to string operands, and bit-wise NOT may be
applied only to integers.
<P><DT><A NAME="M8"><B>* / %</B></A><DD>
Multiply, divide, remainder. None of these operands may be
applied to string operands, and remainder may be applied only
to integers.
The remainder will always have the same sign as the divisor and
an absolute value smaller than the divisor.
<P><DT><A NAME="M9"><B>+ -</B></A><DD>
Add and subtract. Valid for any numeric operands.
<P><DT><A NAME="M10"><B>&lt;&lt; &gt;&gt;</B></A><DD>
Left and right shift. Valid for integer operands only.
A right shift always propagates the sign bit.
<P><DT><A NAME="M11"><B>&lt; &gt; &lt;= &gt;=</B></A><DD>
Boolean less, greater, less than or equal, and greater than or equal.
Each operator produces 1 if the condition is true, 0 otherwise.
These operators may be applied to strings as well as numeric operands,
in which case string comparison is used.
<P><DT><A NAME="M12"><B>== !=</B></A><DD>
Boolean equal and not equal. Each operator produces a zero/one result.
Valid for all operand types.
<P><DT><A NAME="M13"><B>&amp;</B></A><DD>
Bit-wise AND. Valid for integer operands only.
<P><DT><A NAME="M14"><B>^</B></A><DD>
Bit-wise exclusive OR. Valid for integer operands only.
<P><DT><A NAME="M15"><B>|</B></A><DD>
Bit-wise OR. Valid for integer operands only.
<P><DT><A NAME="M16"><B>&amp;&amp;</B></A><DD>
Logical AND. Produces a 1 result if both operands are non-zero,
0 otherwise.
Valid for boolean and numeric (integers or floating-point) operands only.
<P><DT><A NAME="M17"><B>||</B></A><DD>
Logical OR. Produces a 0 result if both operands are zero, 1 otherwise.
Valid for boolean and numeric (integers or floating-point) operands only.
<P><DT><A NAME="M18"><I>x</I><B>?</B><I>y</I><B>:</B><I>z</I></A><DD>
If-then-else, as in C. If <I>x</I>
evaluates to non-zero, then the result is the value of <I>y</I>.
Otherwise the result is the value of <I>z</I>.
The <I>x</I> operand must have a numeric value.
<P></DL>
<P>
See the C manual for more details on the results
produced by each operator.
All of the binary operators group left-to-right within the same
precedence level. For example, the command
<PRE><B>expr 4*2 &lt; 7</B></PRE>
returns 0.
<P>
The <B>&amp;&amp;</B>, <B>||</B>, and <B>?:</B> operators have ``lazy
evaluation'', just as in C,
which means that operands are not evaluated if they are
not needed to determine the outcome. For example, in the command
<PRE><B>expr {$v ? [a] : [b]}</B></PRE>
only one of <B>[a]</B> or <B>[b]</B> will actually be evaluated,
depending on the value of <B>$v</B>. Note, however, that this is
only true if the entire expression is enclosed in braces; otherwise
the Tcl parser will evaluate both <B>[a]</B> and <B>[b]</B> before
invoking the <B>expr</B> command.
<H3><A NAME="M19">MATH FUNCTIONS</A></H3>
Tcl supports the following mathematical functions in expressions:
<PRE><B>abs</B> <B>cosh</B> <B>log</B> <B>sqrt</B>
<B>acos</B> <B>double</B> <B>log10</B> <B>srand</B>
<B>asin</B> <B>exp</B> <B>pow</B> <B>tan</B>
<B>atan</B> <B>floor</B> <B>rand</B> <B>tanh</B>
<B>atan2</B> <B>fmod</B> <B>round</B>
<B>ceil</B> <B>hypot</B> <B>sin</B>
<B>cos</B> <B>int</B> <B>sinh</B></PRE>
<P>
<P>
<DL>
<P><DT><A NAME="M20"><B>abs(</B><I>arg</I><B>)</B></A><DD>
Returns the absolute value of <I>arg</I>. <I>Arg</I> may be either
integer or floating-point, and the result is returned in the same form.
<P><DT><A NAME="M21"><B>acos(</B><I>arg</I><B>)</B></A><DD>
Returns the arc cosine of <I>arg</I>, in the range [0,pi]
radians. <I>Arg</I> should be in the range [-1,1].
<P><DT><A NAME="M22"><B>asin(</B><I>arg</I><B>)</B></A><DD>
Returns the arc sine of <I>arg</I>, in the range [-pi/2,pi/2] radians.
<I>Arg</I> should be in the range [-1,1].
<P><DT><A NAME="M23"><B>atan(</B><I>arg</I><B>)</B></A><DD>
Returns the arc tangent of <I>arg</I>, in the range [-pi/2,pi/2] radians.
<P><DT><A NAME="M24"><B>atan2(</B><I>x, y</I><B>)</B></A><DD>
Returns the arc tangent of <I>y</I>/<I>x</I>, in the range [-pi,pi]
radians. <I>x</I> and <I>y</I> cannot both be 0.
<P><DT><A NAME="M25"><B>ceil(</B><I>arg</I><B>)</B></A><DD>
Returns the smallest integer value not less than <I>arg</I>.
<P><DT><A NAME="M26"><B>cos(</B><I>arg</I><B>)</B></A><DD>
Returns the cosine of <I>arg</I>, measured in radians.
<P><DT><A NAME="M27"><B>cosh(</B><I>arg</I><B>)</B></A><DD>
Returns the hyperbolic cosine of <I>arg</I>. If the result would cause
an overflow, an error is returned.
<P><DT><A NAME="M28"><B>double(</B><I>arg</I><B>)</B></A><DD>
If <I>arg</I> is a floating value, returns <I>arg</I>, otherwise converts
<I>arg</I> to floating and returns the converted value.
<P><DT><A NAME="M29"><B>exp(</B><I>arg</I><B>)</B></A><DD>
Returns the exponential of <I>arg</I>, defined as e**<I>arg</I>. If the
result would cause an overflow, an error is returned.
<P><DT><A NAME="M30"><B>floor(</B><I>arg</I><B>)</B></A><DD>
Returns the largest integral value not greater than <I>arg</I>.
<P><DT><A NAME="M31"><B>fmod(</B><I>x, y</I><B>)</B></A><DD>
Returns the floating-point remainder of the division of <I>x</I> by
<I>y</I>. If <I>y</I> is 0, an error is returned.
<P><DT><A NAME="M32"><B>hypot(</B><I>x, y</I><B>)</B></A><DD>
Computes the length of the hypotenuse of a right-angled triangle
(<I>x</I>*<I>x</I>+<I>y</I>*<I>y</I>).
<P><DT><A NAME="M33"><B>int(</B><I>arg</I><B>)</B></A><DD>
If <I>arg</I> is an integer value, returns <I>arg</I>, otherwise converts
<I>arg</I> to integer by truncation and returns the converted value.
<P><DT><A NAME="M34"><B>log(</B><I>arg</I><B>)</B></A><DD>
Returns the natural logarithm of <I>arg</I>. <I>Arg</I> must be a
positive value.
<P><DT><A NAME="M35"><B>log10(</B><I>arg</I><B>)</B></A><DD>
Returns the base 10 logarithm of <I>arg</I>. <I>Arg</I> must be a
positive value.
<P><DT><A NAME="M36"><B>pow(</B><I>x, y</I><B>)</B></A><DD>
Computes the value of <I>x</I> raised to the power <I>y</I>. If <I>x</I>
is negative, <I>y</I> must be an integer value.
<P><DT><A NAME="M37"><B>rand()</B></A><DD>
Returns a floating point number from zero to just less than one or,
in mathematical terms, the range [0,1). The seed comes from the
internal clock of the machine or may be set manual with the srand
function.
<P><DT><A NAME="M38"><B>round(</B><I>arg</I><B>)</B></A><DD>
If <I>arg</I> is an integer value, returns <I>arg</I>, otherwise converts
<I>arg</I> to integer by rounding and returns the converted value.
<P><DT><A NAME="M39"><B>sin(</B><I>arg</I><B>)</B></A><DD>
Returns the sine of <I>arg</I>, measured in radians.
<P><DT><A NAME="M40"><B>sinh(</B><I>arg</I><B>)</B></A><DD>
Returns the hyperbolic sine of <I>arg</I>. If the result would cause
an overflow, an error is returned.
<P><DT><A NAME="M41"><B>sqrt(</B><I>arg</I><B>)</B></A><DD>
Returns the square root of <I>arg</I>. <I>Arg</I> must be non-negative.
<P><DT><A NAME="M42"><B>srand(</B><I>arg</I><B>)</B></A><DD>
The <I>arg</I>, which must be an integer, is used to reset the seed for
the random number generator. Returns the first random number from
that seed. Each interpreter has it's own seed.
<P><DT><A NAME="M43"><B>tan(</B><I>arg</I><B>)</B></A><DD>
Returns the tangent of <I>arg</I>, measured in radians.
<P><DT><A NAME="M44"><B>tanh(</B><I>arg</I><B>)</B></A><DD>
Returns the hyperbolic tangent of <I>arg</I>.
<P></DL>
<P>
In addition to these predefined functions, applications may
define additional functions using <B><A HREF="../TkLib/CrtMathFnc.htm">Tcl_CreateMathFunc</A></B>().
<H3><A NAME="M45">TYPES, OVERFLOW, AND PRECISION</A></H3>
All internal computations involving integers are done with the C type
<I>long</I>, and all internal computations involving floating-point are
done with the C type <I>double</I>.
When converting a string to floating-point, exponent overflow is
detected and results in a Tcl error.
For conversion to integer from string, detection of overflow depends
on the behavior of some routines in the local C library, so it should
be regarded as unreliable.
In any case, integer overflow and underflow are generally not detected
reliably for intermediate results. Floating-point overflow and underflow
are detected to the degree supported by the hardware, which is generally
pretty reliable.
<P>
Conversion among internal representations for integer, floating-point,
and string operands is done automatically as needed.
For arithmetic computations, integers are used until some
floating-point number is introduced, after which floating-point is used.
For example,
<PRE><B>expr 5 / 4</B></PRE>
returns 1, while
<PRE><B>expr 5 / 4.0</B>
<B>expr 5 / ( [string length &quot;abcd&quot;] + 0.0 )</B></PRE>
both return 1.25.
Floating-point values are always returned with a ``<B>.</B>''
or an <B>e</B> so that they will not look like integer values. For
example,
<PRE><B>expr 20.0/5.0</B></PRE>
returns <B>4.0</B>, not <B>4</B>.
<H3><A NAME="M46">STRING OPERATIONS</A></H3>
String values may be used as operands of the comparison operators,
although the expression evaluator tries to do comparisons as integer
or floating-point when it can.
If one of the operands of a comparison is a string and the other
has a numeric value, the numeric operand is converted back to
a string using the C <I>sprintf</I> format specifier
<B>%d</B> for integers and <B>%g</B> for floating-point values.
For example, the commands
<PRE><B>expr {&quot;0x03&quot; &gt; &quot;2&quot;}</B>
<B>expr {&quot;0y&quot; &lt; &quot;0x12&quot;}</B></PRE>
both return 1. The first comparison is done using integer
comparison, and the second is done using string comparison after
the second operand is converted to the string <B>18</B>.
Because of Tcl's tendency to treat values as numbers whenever
possible, it isn't generally a good idea to use operators like <B>==</B>
when you really want string comparison and the values of the
operands could be arbitrary; it's better in these cases to use
the <B><A HREF="../TkCmd/string.htm">string</A></B> command instead.
<H3><A NAME="M47">PERFORMANCE CONSIDERATIONS</A></H3>
Enclose expressions in braces for the best speed and the smallest
storage requirements.
This allows the Tcl bytecode compiler to generate the best code.
<P>
As mentioned above, expressions are substituted twice:
once by the Tcl parser and once by the <B>expr</B> command.
For example, the commands
<PRE><B>set a 3</B>
<B>set b {$a + 2}</B>
<B>expr $b*4</B></PRE>
return 11, not a multiple of 4.
This is because the Tcl parser will first substitute <B>$a + 2</B> for
the variable <B>b</B>,
then the <B>expr</B> command will evaluate the expression <B>$a + 2*4</B>.
<P>
Most expressions do not require a second round of substitutions.
Either they are enclosed in braces or, if not,
their variable and command substitutions yield numbers or strings
that don't themselves require substitutions.
However, because a few unbraced expressions
need two rounds of substitutions,
the bytecode compiler must emit
additional instructions to handle this situation.
The most expensive code is required for
unbraced expressions that contain command substitutions.
These expressions must be implemented by generating new code
each time the expression is executed.
<H3><A NAME="M48">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#arithmetic">arithmetic</A>, <A href="../Keywords/B.htm#boolean">boolean</A>, <A href="../Keywords/C.htm#compare">compare</A>, <A href="../Keywords/E.htm#expression">expression</A>, <A href="../Keywords/F.htm#fuzzy comparison">fuzzy comparison</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-2000 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,22 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fblocked manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
fblocked - Test whether the last input operation exhausted all available input
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fblocked </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>fblocked</B> command returns 1 if the most recent input operation
on <I>channelId</I> returned less information than requested because all
available input was exhausted.
For example, if <B><A HREF="../TkCmd/gets.htm">gets</A></B> is invoked when there are only three
characters available for input and no end-of-line sequence, <B><A HREF="../TkCmd/gets.htm">gets</A></B>
returns an empty string and a subsequent call to <B>fblocked</B> will
return 1.
<P>
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/gets.htm">gets</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,189 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fconfigure manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="fconfigure.htm#M2" NAME="L290">NAME</A>
<DL><DD>fconfigure - Set and get options on a channel</DL>
<DD><A HREF="fconfigure.htm#M3" NAME="L291">SYNOPSIS</A>
<DL>
<DD><B>fconfigure </B><I>channelId</I>
<DD><B>fconfigure </B><I>channelId</I> <I>name</I>
<DD><B>fconfigure </B><I>channelId</I> <I>name value </I>?<I>name value ...</I>?
</DL>
<DD><A HREF="fconfigure.htm#M4" NAME="L292">DESCRIPTION</A>
<DL>
<DD><A HREF="fconfigure.htm#M5" NAME="L293"><B>-blocking</B> <I>boolean</I></A>
<DD><A HREF="fconfigure.htm#M6" NAME="L294"><B>-buffering</B> <I>newValue</I></A>
<DD><A HREF="fconfigure.htm#M7" NAME="L295"><B>-buffersize</B> <I>newSize</I></A>
<DD><A HREF="fconfigure.htm#M8" NAME="L296"><B>-encoding</B> <I>name</I></A>
<DD><A HREF="fconfigure.htm#M9" NAME="L297"><B>-eofchar</B> <I>char</I></A>
<DD><A HREF="fconfigure.htm#M10" NAME="L298"><B>-eofchar</B> <B>{</B><I>inChar outChar</I><B>}</B></A>
<DD><A HREF="fconfigure.htm#M11" NAME="L299"><B>-translation</B> <I>mode</I></A>
<DD><A HREF="fconfigure.htm#M12" NAME="L300"><B>-translation</B> <B>{</B><I>inMode outMode</I><B>}</B></A>
<DL>
<DD><A HREF="fconfigure.htm#M13" NAME="L301"><B>auto</B></A>
<DD><A HREF="fconfigure.htm#M14" NAME="L302"><B>binary</B></A>
<DD><A HREF="fconfigure.htm#M15" NAME="L303"><B>cr</B></A>
<DD><A HREF="fconfigure.htm#M16" NAME="L304"><B>crlf</B></A>
<DD><A HREF="fconfigure.htm#M17" NAME="L305"><B>lf</B></A>
</DL>
</DL>
<DD><A HREF="fconfigure.htm#M18" NAME="L306">SEE ALSO</A>
<DD><A HREF="fconfigure.htm#M19" NAME="L307">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
fconfigure - Set and get options on a channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fconfigure </B><I>channelId</I><BR>
<B>fconfigure </B><I>channelId</I> <I>name</I><BR>
<B>fconfigure </B><I>channelId</I> <I>name value </I>?<I>name value ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>fconfigure</B> command sets and retrieves options for channels.
<I>ChannelId</I> identifies the channel for which to set or query an option.
If no <I>name</I> or <I>value</I> arguments are supplied, the command
returns a list containing alternating option names and values for the channel.
If <I>name</I> is supplied but no <I>value</I> then the command returns
the current value of the given option.
If one or more pairs of <I>name</I> and <I>value</I> are supplied, the
command sets each of the named options to the corresponding <I>value</I>;
in this case the return value is an empty string.
<P>
The options described below are supported for all channels. In addition,
each channel type may add options that only it supports. See the manual
entry for the command that creates each type of channels for the options
that that specific type of channel supports. For example, see the manual
entry for the <B><A HREF="../TkCmd/socket.htm">socket</A></B> command for its additional options.
<P>
<DL>
<P><DT><A NAME="M5"><B>-blocking</B> <I>boolean</I></A><DD>
The <B>-blocking</B> option determines whether I/O operations on the
channel can cause the process to block indefinitely.
The value of the option must be a proper boolean value.
Channels are normally in blocking mode; if a channel is placed into
nonblocking mode it will affect the operation of the <B><A HREF="../TkCmd/gets.htm">gets</A></B>,
<B><A HREF="../TkCmd/read.htm">read</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/flush.htm">flush</A></B>, and <B><A HREF="../TkCmd/close.htm">close</A></B> commands;
see the documentation for those commands for details.
For nonblocking mode to work correctly, the application must be
using the Tcl event loop (e.g. by calling <B><A HREF="../TkLib/DoOneEvent.htm">Tcl_DoOneEvent</A></B> or
invoking the <B><A HREF="../TkCmd/vwait.htm">vwait</A></B> command).
<P><DT><A NAME="M6"><B>-buffering</B> <I>newValue</I></A><DD>
If <I>newValue</I> is <B>full</B> then the I/O system will buffer output
until its internal buffer is full or until the <B><A HREF="../TkCmd/flush.htm">flush</A></B> command is
invoked. If <I>newValue</I> is <B>line</B>, then the I/O system will
automatically flush output for the channel whenever a newline character
is output. If <I>newValue</I> is <B>none</B>, the I/O system will flush
automatically after every output operation. The default is for
<B>-buffering</B> to be set to <B>full</B> except for channels that
connect to terminal-like devices; for these channels the initial setting
is <B>line</B>. Additionally, <B>stdin</B> and <B>stdout</B> are
intially set to <B>line</B>, and <B>stderr</B> is set to <B>none</B>.
<P><DT><A NAME="M7"><B>-buffersize</B> <I>newSize</I></A><DD>
<I>Newvalue</I> must be an integer; its value is used to set the size of
buffers, in bytes, subsequently allocated for this channel to store input
or output. <I>Newvalue</I> must be between ten and one million, allowing
buffers of ten to one million bytes in size.
<P><DT><A NAME="M8"><B>-encoding</B> <I>name</I></A><DD>
This option is used to specify the encoding of the channel, so that the data
can be converted to and from Unicode for use in Tcl. For instance, in
order for Tcl to read characters from a Japanese file in <B>shiftjis</B>
and properly process and display the contents, the encoding would be set
to <B>shiftjis</B>. Thereafter, when reading from the channel, the bytes in
the Japanese file would be converted to Unicode as they are read.
Writing is also supported - as Tcl strings are written to the channel they
will automatically be converted to the specified encoding on output.
<P>
If a file contains pure binary data (for instance, a JPEG image), the
encoding for the channel should be configured to be <B><A HREF="../TkCmd/binary.htm">binary</A></B>. Tcl
will then assign no interpretation to the data in the file and simply read or
write raw bytes. The Tcl <B><A HREF="../TkCmd/binary.htm">binary</A></B> command can be used to manipulate this
byte-oriented data.
<P>The default encoding for newly opened channels is the same platform- and
locale-dependent system encoding used for interfacing with the operating
system.
<P><DT><A NAME="M9"><B>-eofchar</B> <I>char</I></A><DD>
<P><DT><A NAME="M10"><B>-eofchar</B> <B>{</B><I>inChar outChar</I><B>}</B></A><DD>
This option supports DOS file systems that use Control-z (&#92;x1a) as an
end of file marker. If <I>char</I> is not an empty string, then this
character signals end-of-file when it is encountered during input. For
output, the end-of-file character is output when the channel is closed.
If <I>char</I> is the empty string, then there is no special end of file
character marker. For read-write channels, a two-element list specifies
the end of file marker for input and output, respectively. As a
convenience, when setting the end-of-file character for a read-write
channel you can specify a single value that will apply to both reading
and writing. When querying the end-of-file character of a read-write
channel, a two-element list will always be returned. The default value
for <B>-eofchar</B> is the empty string in all cases except for files
under Windows. In that case the <B>-eofchar</B> is Control-z (&#92;x1a) for
reading and the empty string for writing.
<P><DT><A NAME="M11"><B>-translation</B> <I>mode</I></A><DD>
<P><DT><A NAME="M12"><B>-translation</B> <B>{</B><I>inMode outMode</I><B>}</B></A><DD>
In Tcl scripts the end of a line is always represented using a single
newline character (&#92;n). However, in actual files and devices the end of
a line may be represented differently on different platforms, or even for
different devices on the same platform. For example, under UNIX newlines
are used in files, whereas carriage-return-linefeed sequences are
normally used in network connections. On input (i.e., with <B><A HREF="../TkCmd/gets.htm">gets</A></B>
and <B><A HREF="../TkCmd/read.htm">read</A></B>) the Tcl I/O system automatically translates the external
end-of-line representation into newline characters. Upon output (i.e.,
with <B><A HREF="../TkCmd/puts.htm">puts</A></B>), the I/O system translates newlines to the external
end-of-line representation. The default translation mode, <B>auto</B>,
handles all the common cases automatically, but the <B>-translation</B>
option provides explicit control over the end of line translations.
<P>
The value associated with <B>-translation</B> is a single item for
read-only and write-only channels. The value is a two-element list for
read-write channels; the read translation mode is the first element of
the list, and the write translation mode is the second element. As a
convenience, when setting the translation mode for a read-write channel
you can specify a single value that will apply to both reading and
writing. When querying the translation mode of a read-write channel, a
two-element list will always be returned. The following values are
currently supported:
<P>
<DL>
<P><DT><A NAME="M13"><B>auto</B></A><DD>
As the input translation mode, <B>auto</B> treats any of newline
(<B>lf</B>), carriage return (<B>cr</B>), or carriage return followed by a
newline (<B>crlf</B>) as the end of line representation. The end of line
representation can even change from line-to-line, and all cases are
translated to a newline. As the output translation mode, <B>auto</B>
chooses a platform specific representation; for sockets on all platforms
Tcl chooses <B>crlf</B>, for all Unix flavors, it chooses <B>lf</B>, for the
Macintosh platform it chooses <B>cr</B> and for the various flavors of
Windows it chooses <B>crlf</B>. The default setting for
<B>-translation</B> is <B>auto</B> for both input and output.
<P><DT><A NAME="M14"><B>binary</B></A><DD>
No end-of-line translations are performed. This is nearly identical to
<B>lf</B> mode, except that in addition <B><A HREF="../TkCmd/binary.htm">binary</A></B> mode also sets the
end-of-file character to the empty string (which disables it) and sets the
encoding to <B><A HREF="../TkCmd/binary.htm">binary</A></B> (which disables encoding filtering). See the
description of <B>-eofchar</B> and <B>-encoding</B> for more information.
<P><DT><A NAME="M15"><B>cr</B></A><DD>
The end of a line in the underlying file or device is represented by a
single carriage return character. As the input translation mode,
<B>cr</B> mode converts carriage returns to newline characters. As the
output translation mode, <B>cr</B> mode translates newline characters to
carriage returns. This mode is typically used on Macintosh platforms.
<P><DT><A NAME="M16"><B>crlf</B></A><DD>
The end of a line in the underlying file or device is represented by a
carriage return character followed by a linefeed character. As the input
translation mode, <B>crlf</B> mode converts carriage-return-linefeed
sequences to newline characters. As the output translation mode,
<B>crlf</B> mode translates newline characters to carriage-return-linefeed
sequences. This mode is typically used on Windows platforms and for
network connections.
<P><DT><A NAME="M17"><B>lf</B></A><DD>
The end of a line in the underlying file or device is represented by a
single newline (linefeed) character. In this mode no translations occur
during either input or output. This mode is typically used on UNIX
platforms.
<P></DL>
<P></DL>
<P>
<H3><A NAME="M18">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/close.htm">close</A></B>, <B><A HREF="../TkCmd/flush.htm">flush</A></B>, <B><A HREF="../TkCmd/gets.htm">gets</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>, <B><A HREF="../TkCmd/socket.htm">socket</A></B>
<H3><A NAME="M19">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/B.htm#buffering">buffering</A>, <A href="../Keywords/C.htm#carriage return">carriage return</A>, <A href="../Keywords/E.htm#end of line">end of line</A>, <A href="../Keywords/F.htm#flushing">flushing</A>, <A href="../Keywords/L.htm#linemode">linemode</A>, <A href="../Keywords/N.htm#newline">newline</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/P.htm#platform">platform</A>, <A href="../Keywords/T.htm#translation">translation</A>, <A href="../Keywords/E.htm#encoding">encoding</A>, <A href="../Keywords/F.htm#filter">filter</A>, <A href="../Keywords/B.htm#byte array">byte array</A>, <A href="../Keywords/B.htm#binary">binary</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,108 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fcopy manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
fcopy - Copy data from one channel to another.
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fcopy </B><I>inchan</I> <I>outchan</I> ?<B>-size </B><I>size</I>? ?<B>-command </B><I>callback</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>fcopy</B> command copies data from one I/O channel, <I>inchan</I> to another I/O channel, <I>outchan</I>.
The <B>fcopy</B> command leverages the buffering in the Tcl I/O system to
avoid extra copies and to avoid buffering too much data in
main memory when copying large files to slow destinations like
network sockets.
<P>
The <B>fcopy</B>
command transfers data from <I>inchan</I> until end of file
or <I>size</I> bytes have been
transferred. If no <B>-size</B> argument is given,
then the copy goes until end of file.
All the data read from <I>inchan</I> is copied to <I>outchan</I>.
Without the <B>-command</B> option, <B>fcopy</B> blocks until the copy is complete
and returns the number of bytes written to <I>outchan</I>.
<P>
The <B>-command</B> argument makes <B>fcopy</B> work in the background.
In this case it returns immediately and the <I>callback</I> is invoked
later when the copy completes.
The <I>callback</I> is called with
one or two additional
arguments that indicates how many bytes were written to <I>outchan</I>.
If an error occurred during the background copy, the second argument is the
error string associated with the error.
With a background copy,
it is not necessary to put <I>inchan</I> or <I>outchan</I> into
non-blocking mode; the <B>fcopy</B> command takes care of that automatically.
However, it is necessary to enter the event loop by using
the <B><A HREF="../TkCmd/vwait.htm">vwait</A></B> command or by using Tk.
<P>
You are not allowed to do other I/O operations with
<I>inchan</I> or <I>outchan</I> during a background fcopy.
If either <I>inchan</I> or <I>outchan</I> get closed
while the copy is in progress, the current copy is stopped
and the command callback is <I>not</I> made.
If <I>inchan</I> is closed,
then all data already queued for <I>outchan</I> is written out.
<P>
Note that <I>inchan</I> can become readable during a background copy.
You should turn off any <B><A HREF="../TkCmd/fileevent.htm">fileevent</A></B> handlers during a background
copy so those handlers do not interfere with the copy.
Any I/O attempted by a <B><A HREF="../TkCmd/fileevent.htm">fileevent</A></B> handler will get a &quot;channel busy&quot; error.
<P>
<B>Fcopy</B> translates end-of-line sequences in <I>inchan</I> and <I>outchan</I>
according to the <B>-translation</B> option
for these channels.
See the manual entry for <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B> for details on the
<B>-translation</B> option.
The translations mean that the number of bytes read from <I>inchan</I>
can be different than the number of bytes written to <I>outchan</I>.
Only the number of bytes written to <I>outchan</I> is reported,
either as the return value of a synchronous <B>fcopy</B> or
as the argument to the callback for an asynchronous <B>fcopy</B>.
<H3><A NAME="M5">EXAMPLE</A></H3>
This first example shows how the callback gets
passed the number of bytes transferred.
It also uses vwait to put the application into the event loop.
Of course, this simplified example could be done without the command
callback.
<PRE>proc Cleanup {in out bytes {error {}}} {
global total
set total $bytes
close $in
close $out
if {[string length $error] != 0} {
# error occurred during the copy
}
}
set in [open $file1]
set out [socket $server $port]
fcopy $in $out -command [list Cleanup $in $out]
vwait total</PRE>
<P>
The second example copies in chunks and tests for end of file
in the command callback
<PRE>proc CopyMore {in out chunk bytes {error {}}} {
global total done
incr total $bytes
if {([string length $error] != 0) || [eof $in] {
set done $total
close $in
close $out
} else {
fcopy $in $out -command [list CopyMore $in $out $chunk] &#92;
-size $chunk
}
}
set in [open $file1]
set out [socket $server $port]
set chunk 1024
set total 0
fcopy $in $out -command [list CopyMore $in $out $chunk] -size $chunk
vwait done</PRE>
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/eof.htm">eof</A></B>, <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B>, <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#end of line">end of line</A>, <A href="../Keywords/E.htm#end of file">end of file</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/R.htm#read">read</A>, <A href="../Keywords/T.htm#translation">translation</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,307 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - file manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="file.htm#M2" NAME="L314">NAME</A>
<DL><DD>file - Manipulate file names and attributes</DL>
<DD><A HREF="file.htm#M3" NAME="L315">SYNOPSIS</A>
<DL>
<DD><B>file </B><I>option</I> <I>name</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="file.htm#M4" NAME="L316">DESCRIPTION</A>
<DL>
<DD><A HREF="file.htm#M5" NAME="L317"><B>file atime </B><I>name</I> ?<B>time</B>?</A>
<DD><A HREF="file.htm#M6" NAME="L318"><B>file attributes </B><I>name</I></A>
<DD><A HREF="file.htm#M7" NAME="L319"><B>file channels ?</B><I>pattern</I>?</A>
<DD><A HREF="file.htm#M8" NAME="L320"><B>file copy </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A>
<DD><A HREF="file.htm#M9" NAME="L321"><B>file delete </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>pathname</I> ?<I>pathname</I> ... ?</A>
<DD><A HREF="file.htm#M10" NAME="L322"><B>file dirname </B><I>name</I></A>
<DD><A HREF="file.htm#M11" NAME="L323"><B>file executable </B><I>name</I></A>
<DD><A HREF="file.htm#M12" NAME="L324"><B>file exists </B><I>name</I></A>
<DD><A HREF="file.htm#M13" NAME="L325"><B>file extension </B><I>name</I></A>
<DD><A HREF="file.htm#M14" NAME="L326"><B>file isdirectory </B><I>name</I></A>
<DD><A HREF="file.htm#M15" NAME="L327"><B>file isfile </B><I>name</I></A>
<DD><A HREF="file.htm#M16" NAME="L328"><B>file join </B><I>name</I> ?<I>name ...</I>?</A>
<DD><A HREF="file.htm#M17" NAME="L329"><B>file lstat </B><I>name varName</I></A>
<DD><A HREF="file.htm#M18" NAME="L330"><B>file mkdir </B><I>dir</I> ?<I>dir</I> ...?</A>
<DD><A HREF="file.htm#M19" NAME="L331"><B>file mtime </B><I>name</I> ?<I>time</I>?</A>
<DD><A HREF="file.htm#M20" NAME="L332"><B>file nativename </B><I>name</I></A>
<DD><A HREF="file.htm#M21" NAME="L333"><B>file owned </B><I>name</I></A>
<DD><A HREF="file.htm#M22" NAME="L334"><B>file pathtype </B><I>name</I></A>
<DD><A HREF="file.htm#M23" NAME="L335"><B>file readable </B><I>name</I></A>
<DD><A HREF="file.htm#M24" NAME="L336"><B>file readlink </B><I>name</I></A>
<DD><A HREF="file.htm#M25" NAME="L337"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A>
<DD><A HREF="file.htm#M26" NAME="L338"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> ?<I>source</I> ...? <I>targetDir</I></A>
<DD><A HREF="file.htm#M27" NAME="L339"><B>file rootname </B><I>name</I></A>
<DD><A HREF="file.htm#M28" NAME="L340"><B>file size </B><I>name</I></A>
<DD><A HREF="file.htm#M29" NAME="L341"><B>file split </B><I>name</I></A>
<DD><A HREF="file.htm#M30" NAME="L342"><B>file stat </B><I>name varName</I></A>
<DD><A HREF="file.htm#M31" NAME="L343"><B>file tail </B><I>name</I></A>
<DD><A HREF="file.htm#M32" NAME="L344"><B>file type </B><I>name</I></A>
<DD><A HREF="file.htm#M33" NAME="L345"><B>file volume</B></A>
<DD><A HREF="file.htm#M34" NAME="L346"><B>file writable </B><I>name</I></A>
</DL>
<DD><A HREF="file.htm#M35" NAME="L347">PORTABILITY ISSUES</A>
<DL>
<DD><A HREF="file.htm#M36" NAME="L348"><B>Unix</B></A>
</DL>
<DD><A HREF="file.htm#M37" NAME="L349">SEE ALSO</A>
<DD><A HREF="file.htm#M38" NAME="L350">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
file - Manipulate file names and attributes
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>file </B><I>option</I> <I>name</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command provides several operations on a file's name or attributes.
<I>Name</I> is the name of a file; if it starts with a tilde, then tilde
substitution is done before executing the command (see the manual entry for
<B><A HREF="../TkCmd/filename.htm">filename</A></B> for details). <I>Option</I> indicates what to do with the
file name. Any unique abbreviation for <I>option</I> is acceptable. The
valid options are:
<P>
<DL>
<P><DT><A NAME="M5"><B>file atime </B><I>name</I> ?<B>time</B>?</A><DD>
Returns a decimal string giving the time at which file <I>name</I> was last
accessed. If <I>time</I> is specified, it is an access time to set
for the file. The time is measured in the standard POSIX fashion as
seconds from a fixed starting time (often January 1, 1970). If the file
doesn't exist or its access time cannot be queried or set then an error is
generated. On Windows, FAT file systems do not support access time.
<P><DT><A NAME="M6"><B>file attributes </B><I>name</I></A><DD>
<BR>
<B>file attributes </B><I>name</I> ?<B><A HREF="../TclCmd/option.htm">option</A></B>?
<BR>
<B>file attributes </B><I>name</I> ?<B>option value option value...</B>?
<DL><P><DD>
This subcommand returns or sets platform specific values associated
with a file. The first form returns a list of the platform specific
flags and their values. The second form returns the value for the
specific option. The third form sets one or more of the values. The
values are as follows:
<P>
On Unix, <B>-group</B> gets or sets the group name for the file. A group id
can be given to the command, but it returns a group name. <B>-owner</B> gets
or sets the user name of the owner of the file. The command returns the
owner name, but the numerical id can be passed when setting the
owner. <B>-permissions</B> sets or retrieves the octal code that chmod(1)
uses. This command does also has limited support for setting using the
symbolic attributes for chmod(1), of the form [ugo]?[[+-=][rwxst],[...]],
where multiple symbolic attributes can be separated by commas (example:
<B>u+s,go-rw</B> add sticky bit for user, remove read and write
permissions for group and other). A simplified <B>ls</B> style string,
of the form rwxrwxrwx (must be 9 characters), is also supported
(example: <B>rwxr-xr-t</B> is equivalent to 01755).
<P>
On Windows, <B>-archive</B> gives the value or sets or clears the
archive attribute of the file. <B>-hidden</B> gives the value or sets
or clears the hidden attribute of the file. <B>-longname</B> will
expand each path element to its long version. This attribute cannot be
set. <B>-readonly</B> gives the value or sets or clears the readonly
attribute of the file. <B>-shortname</B> gives a string where every
path element is replaced with its short (8.3) version of the
name. This attribute cannot be set. <B>-system</B> gives or sets or
clears the value of the system attribute of the file.
<P>
On Macintosh, <B>-creator</B> gives or sets the Finder creator type of
the file. <B>-hidden</B> gives or sets or clears the hidden attribute
of the file. <B>-readonly</B> gives or sets or clears the readonly
attribute of the file. Note that directories can only be locked if
File Sharing is turned on. <B>-type</B> gives or sets the Finder file
type for the file.
</DL>
<P><DT><A NAME="M7"><B>file channels ?</B><I>pattern</I>?</A><DD>
If <I>pattern</I> isn't specified, returns a list of names of all
registered open channels in this interpreter. If <I>pattern</I> is
specified, only those names matching <I>pattern</I> are returned. Matching
is determined using the same rules as for <B><A HREF="../TkCmd/string.htm">string match</A></B>.
<P><DT><A NAME="M8"><B>file copy </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A><DD>
<BR>
<B>file copy </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> ?<I>source</I> ...? <I>targetDir</I>
<DL><P><DD>
The first form makes a copy of the file or directory <I>source</I> under
the pathname <I>target</I>. If <I>target</I> is an existing directory,
then the second form is used. The second form makes a copy inside
<I>targetDir</I> of each <I>source</I> file listed. If a directory is
specified as a <I>source</I>, then the contents of the directory will be
recursively copied into <I>targetDir</I>. Existing files will not be
overwritten unless the <B>-force</B> option is specified. Trying to
overwrite a non-empty directory, overwrite a directory with a file, or a
file with a directory will all result in errors even if <I>-force</I> was
specified. Arguments are processed in the order specified, halting at the
first error, if any. A <B>-&nbsp;-</B> marks the end of switches; the argument
following the <B>-&nbsp;-</B> will be treated as a <I>source</I> even if it
starts with a <B>-</B>.
</DL>
<P><DT><A NAME="M9"><B>file delete </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>pathname</I> ?<I>pathname</I> ... ?</A><DD>
Removes the file or directory specified by each <I>pathname</I> argument.
Non-empty directories will be removed only if the <B>-force</B> option is
specified. Trying to delete a non-existant file is not considered an
error. Trying to delete a read-only file will cause the file to be deleted,
even if the <B>-force</B> flags is not specified. Arguments are processed
in the order specified, halting at the first error, if any. A <B>-&nbsp;-</B>
marks the end of switches; the argument following the <B>-&nbsp;-</B> will be
treated as a <I>pathname</I> even if it starts with a <B>-</B>.
<P><DT><A NAME="M10"><B>file dirname </B><I>name</I></A><DD>
Returns a name comprised of all of the path components in <I>name</I>
excluding the last element. If <I>name</I> is a relative file name and
only contains one path element, then returns ``<B>.</B>'' (or ``<B>:</B>''
on the Macintosh). If <I>name</I> refers to a root directory, then the
root directory is returned. For example,
<PRE><B>file dirname c:/</B></PRE>
returns <B>c:/</B>.
<P>
Note that tilde substitution will only be
performed if it is necessary to complete the command. For example,
<PRE><B>file dirname ~/src/foo.c</B></PRE>
returns <B>~/src</B>, whereas
<PRE><B>file dirname ~</B></PRE>
returns <B>/home</B> (or something similar).
<P><DT><A NAME="M11"><B>file executable </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is executable by the current user,
<B>0</B> otherwise.
<P><DT><A NAME="M12"><B>file exists </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> exists and the current user has
search privileges for the directories leading to it, <B>0</B> otherwise.
<P><DT><A NAME="M13"><B>file extension </B><I>name</I></A><DD>
Returns all of the characters in <I>name</I> after and including the last
dot in the last element of <I>name</I>. If there is no dot in the last
element of <I>name</I> then returns the empty string.
<P><DT><A NAME="M14"><B>file isdirectory </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is a directory, <B>0</B> otherwise.
<P><DT><A NAME="M15"><B>file isfile </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is a regular file, <B>0</B> otherwise.
<P><DT><A NAME="M16"><B>file join </B><I>name</I> ?<I>name ...</I>?</A><DD>
Takes one or more file names and combines them, using the correct path
separator for the current platform. If a particular <I>name</I> is
relative, then it will be joined to the previous file name argument.
Otherwise, any earlier arguments will be discarded, and joining will
proceed from the current argument. For example,
<PRE><B>file join a b /foo bar</B></PRE>
returns <B>/foo/bar</B>.
<P>Note that any of the names can contain separators, and that the result
is always canonical for the current platform: <B>/</B> for Unix and
Windows, and <B>:</B> for Macintosh.
<P><DT><A NAME="M17"><B>file lstat </B><I>name varName</I></A><DD>
Same as <B>stat</B> option (see below) except uses the <I>lstat</I>
kernel call instead of <I>stat</I>. This means that if <I>name</I>
refers to a symbolic link the information returned in <I>varName</I>
is for the link rather than the file it refers to. On systems that
don't support symbolic links this option behaves exactly the same
as the <B>stat</B> option.
<P><DT><A NAME="M18"><B>file mkdir </B><I>dir</I> ?<I>dir</I> ...?</A><DD>
Creates each directory specified. For each pathname <I>dir</I> specified,
this command will create all non-existing parent directories as
well as <I>dir</I> itself. If an existing directory is specified, then
no action is taken and no error is returned. Trying to overwrite an existing
file with a directory will result in an error. Arguments are processed in
the order specified, halting at the first error, if any.
<P><DT><A NAME="M19"><B>file mtime </B><I>name</I> ?<I>time</I>?</A><DD>
Returns a decimal string giving the time at which file <I>name</I> was last
modified. If <I>time</I> is specified, it is a modification time to set for
the file (equivalent to Unix <B>touch</B>). The time is measured in the
standard POSIX fashion as seconds from a fixed starting time (often January
1, 1970). If the file doesn't exist or its modified time cannot be queried
or set then an error is generated.
<P><DT><A NAME="M20"><B>file nativename </B><I>name</I></A><DD>
Returns the platform-specific name of the file. This is useful if the
filename is needed to pass to a platform-specific call, such as exec
under Windows or AppleScript on the Macintosh.
<P><DT><A NAME="M21"><B>file owned </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is owned by the current user, <B>0</B>
otherwise.
<P><DT><A NAME="M22"><B>file pathtype </B><I>name</I></A><DD>
Returns one of <B>absolute</B>, <B>relative</B>, <B>volumerelative</B>. If
<I>name</I> refers to a specific file on a specific volume, the path type
will be <B>absolute</B>. If <I>name</I> refers to a file relative to the
current working directory, then the path type will be <B>relative</B>. If
<I>name</I> refers to a file relative to the current working directory on
a specified volume, or to a specific file on the current working volume, then
the file type is <B>volumerelative</B>.
<P><DT><A NAME="M23"><B>file readable </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is readable by the current user,
<B>0</B> otherwise.
<P><DT><A NAME="M24"><B>file readlink </B><I>name</I></A><DD>
Returns the value of the symbolic link given by <I>name</I> (i.e. the name
of the file it points to). If <I>name</I> isn't a symbolic link or its
value cannot be read, then an error is returned. On systems that don't
support symbolic links this option is undefined.
<P><DT><A NAME="M25"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A>
<DT><A NAME="M26"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> ?<I>source</I> ...? <I>targetDir</I></A><DD>
The first form takes the file or directory specified by pathname
<I>source</I> and renames it to <I>target</I>, moving the file if the
pathname <I>target</I> specifies a name in a different directory. If
<I>target</I> is an existing directory, then the second form is used. The
second form moves each <I>source</I> file or directory into the directory
<I>targetDir</I>. Existing files will not be overwritten unless the
<B>-force</B> option is specified. Trying to overwrite a non-empty
directory, overwrite a directory with a file, or a file with a directory
will all result in errors. Arguments are processed in the order specified,
halting at the first error, if any. A <B>-&nbsp;-</B> marks the end of
switches; the argument following the <B>-&nbsp;-</B> will be treated as a
<I>source</I> even if it starts with a <B>-</B>.
<P><DT><A NAME="M27"><B>file rootname </B><I>name</I></A><DD>
Returns all of the characters in <I>name</I> up to but not including the
last ``.'' character in the last component of name. If the last
component of <I>name</I> doesn't contain a dot, then returns <I>name</I>.
<P><DT><A NAME="M28"><B>file size </B><I>name</I></A><DD>
Returns a decimal string giving the size of file <I>name</I> in bytes. If
the file doesn't exist or its size cannot be queried then an error is
generated.
<P><DT><A NAME="M29"><B>file split </B><I>name</I></A><DD>
Returns a list whose elements are the path components in <I>name</I>. The
first element of the list will have the same path type as <I>name</I>.
All other elements will be relative. Path separators will be discarded
unless they are needed ensure that an element is unambiguously relative.
For example, under Unix
<PRE><B>file split /foo/~bar/baz</B></PRE>
returns <B>/ foo ./~bar baz</B> to ensure that later commands
that use the third component do not attempt to perform tilde
substitution.
<P><DT><A NAME="M30"><B>file stat </B><I>name varName</I></A><DD>
Invokes the <B>stat</B> kernel call on <I>name</I>, and uses the variable
given by <I>varName</I> to hold information returned from the kernel call.
<I>VarName</I> is treated as an array variable, and the following elements
of that variable are set: <B>atime</B>, <B>ctime</B>, <B>dev</B>, <B>gid</B>,
<B>ino</B>, <B>mode</B>, <B>mtime</B>, <B>nlink</B>, <B>size</B>, <B>type</B>,
<B>uid</B>. Each element except <B>type</B> is a decimal string with the
value of the corresponding field from the <B>stat</B> return structure;
see the manual entry for <B>stat</B> for details on the meanings of the
values. The <B>type</B> element gives the type of the file in the same
form returned by the command <B>file type</B>. This command returns an
empty string.
<P><DT><A NAME="M31"><B>file tail </B><I>name</I></A><DD>
Returns all of the characters in <I>name</I> after the last directory
separator. If <I>name</I> contains no separators then returns
<I>name</I>.
<P><DT><A NAME="M32"><B>file type </B><I>name</I></A><DD>
Returns a string giving the type of file <I>name</I>, which will be one of
<B>file</B>, <B>directory</B>, <B>characterSpecial</B>, <B>blockSpecial</B>,
<B>fifo</B>, <B>link</B>, or <B><A HREF="../TkCmd/socket.htm">socket</A></B>.
<P><DT><A NAME="M33"><B>file volume</B></A><DD>
Returns the absolute paths to the volumes mounted on the system, as a
proper Tcl list. On the Macintosh, this will be a list of the mounted
drives, both local and network. N.B. if two drives have the same name,
they will both appear on the volume list, but there is currently no way,
from Tcl, to access any but the first of these drives. On UNIX, the
command will always return &quot;/&quot;, since all filesystems are locally mounted.
On Windows, it will return a list of the available local drives
(e.g. {a:/ c:/}).
<P><DT><A NAME="M34"><B>file writable </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is writable by the current user,
<B>0</B> otherwise.
<P></DL>
<H3><A NAME="M35">PORTABILITY ISSUES</A></H3>
<DL>
<P><DT><A NAME="M36"><B>Unix</B></A><DD>
These commands always operate using the real user and group identifiers,
not the effective ones.
<P></DL>
<H3><A NAME="M37">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/filename.htm">filename</A></B>
<H3><A NAME="M38">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#attributes">attributes</A>, <A href="../Keywords/C.htm#copy files">copy files</A>, <A href="../Keywords/D.htm#delete files">delete files</A>, <A href="../Keywords/D.htm#directory">directory</A>, <A href="../Keywords/F.htm#file">file</A>, <A href="../Keywords/M.htm#move files">move files</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/R.htm#rename files">rename files</A>, <A href="../Keywords/S.htm#stat">stat</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,95 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fileevent manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
fileevent - Execute a script when a channel becomes readable or writable
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fileevent </B><I>channelId </I><B>readable </B>?<I>script</I>?<BR>
<B>fileevent </B><I>channelId </I><B>writable </B>?<I>script</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is used to create <I>file event handlers</I>. A file event
handler is a binding between a channel and a script, such that the script
is evaluated whenever the channel becomes readable or writable. File event
handlers are most commonly used to allow data to be received from another
process on an event-driven basis, so that the receiver can continue to
interact with the user while waiting for the data to arrive. If an
application invokes <B><A HREF="../TkCmd/gets.htm">gets</A></B> or <B><A HREF="../TkCmd/read.htm">read</A></B> on a blocking channel when
there is no input data available, the process will block; until the input
data arrives, it will not be able to service other events, so it will
appear to the user to ``freeze up''. With <B>fileevent</B>, the process can
tell when data is present and only invoke <B><A HREF="../TkCmd/gets.htm">gets</A></B> or <B><A HREF="../TkCmd/read.htm">read</A></B> when
they won't block.
<P>
The <I>channelId</I> argument to <B>fileevent</B> refers to an open channel,
such as the return value from a previous <B><A HREF="../TkCmd/open.htm">open</A></B> or <B><A HREF="../TkCmd/socket.htm">socket</A></B>
command.
If the <I>script</I> argument is specified, then <B>fileevent</B>
creates a new event handler: <I>script</I> will be evaluated
whenever the channel becomes readable or writable (depending on the
second argument to <B>fileevent</B>).
In this case <B>fileevent</B> returns an empty string.
The <B>readable</B> and <B>writable</B> event handlers for a file
are independent, and may be created and deleted separately.
However, there may be at most one <B>readable</B> and one <B>writable</B>
handler for a file at a given time in a given interpreter.
If <B>fileevent</B> is called when the specified handler already
exists in the invoking interpreter, the new script replaces the old one.
<P>
If the <I>script</I> argument is not specified, <B>fileevent</B>
returns the current script for <I>channelId</I>, or an empty string
if there is none.
If the <I>script</I> argument is specified as an empty string
then the event handler is deleted, so that no script will be invoked.
A file event handler is also deleted automatically whenever
its channel is closed or its interpreter is deleted.
<P>
A channel is considered to be readable if there is unread data
available on the underlying device.
A channel is also considered to be readable if there is unread
data in an input buffer, except in the special case where the
most recent attempt to read from the channel was a <B><A HREF="../TkCmd/gets.htm">gets</A></B>
call that could not find a complete line in the input buffer.
This feature allows a file to be read a line at a time in nonblocking mode
using events.
A channel is also considered to be readable if an end of file or
error condition is present on the underlying file or device.
It is important for <I>script</I> to check for these conditions
and handle them appropriately; for example, if there is no special
check for end of file, an infinite loop may occur where <I>script</I>
reads no data, returns, and is immediately invoked again.
<P>
A channel is considered to be writable if at least one byte of data
can be written to the underlying file or device without blocking,
or if an error condition is present on the underlying file or device.
<P>
Event-driven I/O works best for channels that have been
placed into nonblocking mode with the <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B> command.
In blocking mode, a <B><A HREF="../TkCmd/puts.htm">puts</A></B> command may block if you give it
more data than the underlying file or device can accept, and a
<B><A HREF="../TkCmd/gets.htm">gets</A></B> or <B><A HREF="../TkCmd/read.htm">read</A></B> command will block if you attempt to read
more data than is ready; no events will be processed while the
commands block.
In nonblocking mode <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>, and <B><A HREF="../TkCmd/gets.htm">gets</A></B> never block.
See the documentation for the individual commands for information
on how they handle blocking and nonblocking channels.
<P>
The script for a file event is executed at global level (outside the
context of any Tcl procedure) in the interpreter in which the
<B>fileevent</B> command was invoked.
If an error occurs while executing the script then the
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B> mechanism is used to report the error.
In addition, the file event handler is deleted if it ever returns
an error; this is done in order to prevent infinite loops due to
buggy handlers.
<H3><A NAME="M5">CREDITS</A></H3>
<B>fileevent</B> is based on the <B>addinput</B> command created
by Mark Diekhans.
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B>, <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B>, <B><A HREF="../TkCmd/gets.htm">gets</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#asynchronous I/O">asynchronous I/O</A>, <A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#event handler">event handler</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/R.htm#readable">readable</A>, <A href="../Keywords/S.htm#script">script</A>, <A href="../Keywords/W.htm#writable.">writable.</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,209 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - filename manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="filename.htm#M2" NAME="L357">NAME</A>
<DL><DD>filename - File name conventions supported by Tcl commands</DL>
<DD><A HREF="filename.htm#M3" NAME="L358">INTRODUCTION</A>
<DD><A HREF="filename.htm#M4" NAME="L359">PATH TYPES</A>
<DD><A HREF="filename.htm#M5" NAME="L360">PATH SYNTAX</A>
<DL>
<DD><A HREF="filename.htm#M6" NAME="L361"><B>mac</B></A>
<DL>
<DD><A HREF="filename.htm#M7" NAME="L362"><B>:</B></A>
<DD><A HREF="filename.htm#M8" NAME="L363"><B>MyFile</B></A>
<DD><A HREF="filename.htm#M9" NAME="L364"><B>MyDisk:MyFile</B></A>
<DD><A HREF="filename.htm#M10" NAME="L365"><B>:MyDir:MyFile</B></A>
<DD><A HREF="filename.htm#M11" NAME="L366"><B>::MyFile</B></A>
<DD><A HREF="filename.htm#M12" NAME="L367"><B>:::MyFile</B></A>
<DD><A HREF="filename.htm#M13" NAME="L368"><B>/MyDisk/MyFile</B></A>
<DD><A HREF="filename.htm#M14" NAME="L369"><B> ../MyFile</B></A>
</DL>
<DD><A HREF="filename.htm#M15" NAME="L370"><B>unix</B></A>
<DL>
<DD><A HREF="filename.htm#M16" NAME="L371"><B>/</B></A>
<DD><A HREF="filename.htm#M17" NAME="L372"><B>/etc/passwd</B></A>
<DD><A HREF="filename.htm#M18" NAME="L373"><B> .</B></A>
<DD><A HREF="filename.htm#M19" NAME="L374"><B>foo</B></A>
<DD><A HREF="filename.htm#M20" NAME="L375"><B>foo/bar</B></A>
<DD><A HREF="filename.htm#M21" NAME="L376"><B> ../foo</B></A>
</DL>
<DD><A HREF="filename.htm#M22" NAME="L377"><B>windows</B></A>
<DL>
<DD><A HREF="filename.htm#M23" NAME="L378"><B> &#92;&#92;Host&#92;share/file</B></A>
<DD><A HREF="filename.htm#M24" NAME="L379"><B>c:foo</B></A>
<DD><A HREF="filename.htm#M25" NAME="L380"><B>c:/foo</B></A>
<DD><A HREF="filename.htm#M26" NAME="L381"><B>foo&#92;bar</B></A>
<DD><A HREF="filename.htm#M27" NAME="L382"><B> &#92;foo</B></A>
</DL>
</DL>
<DD><A HREF="filename.htm#M28" NAME="L383">TILDE SUBSTITUTION</A>
<DD><A HREF="filename.htm#M29" NAME="L384">PORTABILITY ISSUES</A>
<DD><A HREF="filename.htm#M30" NAME="L385">KEYWORDS</A>
<DD><A HREF="filename.htm#M31" NAME="L386">SEE ALSO</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
filename - File name conventions supported by Tcl commands
<H3><A NAME="M3">INTRODUCTION</A></H3>
All Tcl commands and C procedures that take file names as arguments
expect the file names to be in one of three forms, depending on the
current platform. On each platform, Tcl supports file names in the
standard forms(s) for that platform. In addition, on all platforms,
Tcl supports a Unix-like syntax intended to provide a convenient way
of constructing simple file names. However, scripts that are intended
to be portable should not assume a particular form for file names.
Instead, portable scripts must use the <B><A HREF="../TkCmd/file.htm">file split</A></B> and <B>file
join</B> commands to manipulate file names (see the <B><A HREF="../TkCmd/file.htm">file</A></B> manual
entry for more details).
<H3><A NAME="M4">PATH TYPES</A></H3>
File names are grouped into three general types based on the starting point
for the path used to specify the file: absolute, relative, and
volume-relative. Absolute names are completely qualified, giving a path to
the file relative to a particular volume and the root directory on that
volume. Relative names are unqualified, giving a path to the file relative
to the current working directory. Volume-relative names are partially
qualified, either giving the path relative to the root directory on the
current volume, or relative to the current directory of the specified
volume. The <B><A HREF="../TkCmd/file.htm">file pathtype</A></B> command can be used to determine the
type of a given path.
<H3><A NAME="M5">PATH SYNTAX</A></H3>
The rules for native names depend on the value reported in the Tcl
array element <B>tcl_platform(platform)</B>:
<P>
<DL>
<P><DT><A NAME="M6"><B>mac</B></A><DD>
On Apple Macintosh systems, Tcl supports two forms of path names. The
normal Mac style names use colons as path separators. Paths may be
relative or absolute, and file names may contain any character other
than colon. A leading colon causes the rest of the path to be
interpreted relative to the current directory. If a path contains a
colon that is not at the beginning, then the path is interpreted as an
absolute path. Sequences of two or more colons anywhere in the path
are used to construct relative paths where <B>::</B> refers to the
parent of the current directory, <B>:::</B> refers to the parent of the
parent, and so forth.
<P>
In addition to Macintosh style names, Tcl also supports a subset of
Unix-like names. If a path contains no colons, then it is interpreted
like a Unix path. Slash is used as the path separator. The file name
<B> .</B> refers to the current directory, and <B> ..</B> refers to the
parent of the current directory. However, some names like <B>/</B> or
<B>/..</B> have no mapping, and are interpreted as Macintosh names. In
general, commands that generate file names will return Macintosh style
names, but commands that accept file names will take both Macintosh
and Unix-style names.
<P>
The following examples illustrate various forms of path names:
<P>
<DL>
<P><DT><A NAME="M7"><B>:</B></A><DD>
Relative path to the current folder.
<P><DT><A NAME="M8"><B>MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the current folder.
<P><DT><A NAME="M9"><B>MyDisk:MyFile</B></A><DD>
Absolute path to a file named <B>MyFile</B> on the device named <B>MyDisk</B>.
<P><DT><A NAME="M10"><B>:MyDir:MyFile</B></A><DD>
Relative path to a file name <B>MyFile</B> in a folder named
<B>MyDir</B> in the current folder.
<P><DT><A NAME="M11"><B>::MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the folder above the
current folder.
<P><DT><A NAME="M12"><B>:::MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the folder two levels above the
current folder.
<P><DT><A NAME="M13"><B>/MyDisk/MyFile</B></A><DD>
Absolute path to a file named <B>MyFile</B> on the device named
<B>MyDisk</B>.
<P><DT><A NAME="M14"><B> ../MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the folder above the
current folder.
<P></DL>
<P><DT><A NAME="M15"><B>unix</B></A><DD>
On Unix platforms, Tcl uses path names where the components are
separated by slashes. Path names may be relative or absolute, and
file names may contain any character other than slash. The file names
<B> .</B> and <B> ..</B> are special and refer to the current directory
and the parent of the current directory respectively. Multiple
adjacent slash characters are interpreted as a single separator.
The following examples illustrate various forms of path names:
<P>
<DL>
<P><DT><A NAME="M16"><B>/</B></A><DD>
Absolute path to the root directory.
<P><DT><A NAME="M17"><B>/etc/passwd</B></A><DD>
Absolute path to the file named <B>passwd</B> in the directory
<B>etc</B> in the root directory.
<P><DT><A NAME="M18"><B> .</B></A><DD>
Relative path to the current directory.
<P><DT><A NAME="M19"><B>foo</B></A><DD>
Relative path to the file <B>foo</B> in the current directory.
<P><DT><A NAME="M20"><B>foo/bar</B></A><DD>
Relative path to the file <B>bar</B> in the directory <B>foo</B> in the
current directory.
<P><DT><A NAME="M21"><B> ../foo</B></A><DD>
Relative path to the file <B>foo</B> in the directory above the current
directory.
<P></DL>
<P><DT><A NAME="M22"><B>windows</B></A><DD>
On Microsoft Windows platforms, Tcl supports both drive-relative and UNC
style names. Both <B>/</B> and <B>&#92;</B> may be used as directory separators
in either type of name. Drive-relative names consist of an optional drive
specifier followed by an absolute or relative path. UNC paths follow the
general form <B>&#92;&#92;servername&#92;sharename&#92;path&#92;file</B>. In both forms,
the file names <B>.</B> and <B>..</B> are special and refer to the current
directory and the parent of the current directory respectively. The
following examples illustrate various forms of path names:
<P>
<DL>
<P><DT><A NAME="M23"><B> &#92;&#92;Host&#92;share/file</B></A><DD>
Absolute UNC path to a file called <B><A HREF="../TkCmd/file.htm">file</A></B> in the root directory of
the export point <B>share</B> on the host <B>Host</B>.
<P><DT><A NAME="M24"><B>c:foo</B></A><DD>
Volume-relative path to a file <B>foo</B> in the current directory on drive
<B>c</B>.
<P><DT><A NAME="M25"><B>c:/foo</B></A><DD>
Absolute path to a file <B>foo</B> in the root directory of drive
<B>c</B>.
<P><DT><A NAME="M26"><B>foo&#92;bar</B></A><DD>
Relative path to a file <B>bar</B> in the <B>foo</B> directory in the current
directory on the current volume.
<P><DT><A NAME="M27"><B> &#92;foo</B></A><DD>
Volume-relative path to a file <B>foo</B> in the root directory of the current
volume.
<P></DL>
<P></DL>
<H3><A NAME="M28">TILDE SUBSTITUTION</A></H3>
In addition to the file name rules described above, Tcl also supports
<I>csh</I>-style tilde substitution. If a file name starts with a
tilde, then the file name will be interpreted as if the first element
is replaced with the location of the home directory for the given
user. If the tilde is followed immediately by a separator, then the
<B>$HOME</B> environment variable is substituted. Otherwise the
characters between the tilde and the next separator are taken as a
user name, which is used to retrieve the user's home directory for
substitution.
<P>
The Macintosh and Windows platforms do not support tilde substitution
when a user name follows the tilde. On these platforms, attempts to
use a tilde followed by a user name will generate an error. File
names that have a tilde without a user name will be substituted using
the <B>$HOME</B> environment variable, just like for Unix.
<H3><A NAME="M29">PORTABILITY ISSUES</A></H3>
Not all file systems are case sensitive, so scripts should avoid code
that depends on the case of characters in a file name. In addition,
the character sets allowed on different devices may differ, so scripts
should choose file names that do not contain special characters like:
<B>&lt;&gt;:&quot;/&#92;|</B>. The safest approach is to use names consisting of
alphanumeric characters only. Also Windows 3.1 only supports file
names with a root of no more than 8 characters and an extension of no
more than 3 characters.
<H3><A NAME="M30">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#current directory">current directory</A>, <A href="../Keywords/A.htm#absolute file name">absolute file name</A>, <A href="../Keywords/R.htm#relative file name">relative file name</A>, <A href="../Keywords/V.htm#volume-relative file name">volume-relative file name</A>, <A href="../Keywords/P.htm#portability">portability</A>
<H3><A NAME="M31">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/glob.htm">glob</A></B>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,24 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - flush manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
flush - Flush buffered output for a channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>flush </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Flushes any output that has been buffered for <I>channelId</I>.
<I>ChannelId</I> must be a channel identifier such as returned by a previous
<B><A HREF="../TkCmd/open.htm">open</A></B> or <B><A HREF="../TkCmd/socket.htm">socket</A></B> command, and it must have been opened for writing.
If the channel is in blocking mode the command does not return until all the
buffered output has been flushed to the channel. If the channel is in
nonblocking mode, the command may return before all buffered output has been
flushed; the remainder will be flushed in the background as fast as the
underlying file or device is able to absorb it.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/socket.htm">socket</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/B.htm#buffer">buffer</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/F.htm#flush">flush</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/O.htm#output">output</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,49 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - for manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
for - ``For'' loop
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>for </B><I>start test next body</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
<B>For</B> is a looping command, similar in structure to the C
<B>for</B> statement. The <I>start</I>, <I>next</I>, and
<I>body</I> arguments must be Tcl command strings, and <I>test</I>
is an expression string.
The <B>for</B> command first invokes the Tcl interpreter to
execute <I>start</I>. Then it repeatedly evaluates <I>test</I> as
an expression; if the result is non-zero it invokes the Tcl
interpreter on <I>body</I>, then invokes the Tcl interpreter on <I>next</I>,
then repeats the loop. The command terminates when <I>test</I> evaluates
to 0. If a <B><A HREF="../TkCmd/continue.htm">continue</A></B> command is invoked within <I>body</I> then
any remaining commands in the current execution of <I>body</I> are skipped;
processing continues by invoking the Tcl interpreter on <I>next</I>, then
evaluating <I>test</I>, and so on. If a <B><A HREF="../TkCmd/break.htm">break</A></B> command is invoked
within <I>body</I>
or <I>next</I>,
then the <B>for</B> command will
return immediately.
The operation of <B><A HREF="../TkCmd/break.htm">break</A></B> and <B><A HREF="../TkCmd/continue.htm">continue</A></B> are similar to the
corresponding statements in C.
<B>For</B> returns an empty string.
<P>
Note: <I>test</I> should almost always be enclosed in braces. If not,
variable substitutions will be made before the <B>for</B>
command starts executing, which means that variable changes
made by the loop body will not be considered in the expression.
This is likely to result in an infinite loop. If <I>test</I> is
enclosed in braces, variable substitutions are delayed until the
expression is evaluated (before
each loop iteration), so changes in the variables will be visible.
For an example, try the following script with and without the braces
around <B>$x&lt;10</B>:
<PRE>for {set x 0} {$x&lt;10} {incr x} {
puts &quot;x is $x&quot;
}</PRE>
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/break.htm">break</A></B>, <B><A HREF="../TkCmd/continue.htm">continue</A></B>, <B><A HREF="../TkCmd/foreach.htm">foreach</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/F.htm#for">for</A>, <A href="../Keywords/I.htm#iteration">iteration</A>, <A href="../Keywords/L.htm#looping">looping</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,70 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - foreach manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
foreach - Iterate over all elements in one or more lists
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>foreach </B><I>varname list body</I><BR>
<B>foreach </B><I>varlist1 list1</I> ?<I>varlist2 list2 ...</I>? <I>body</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>foreach</B> command implements a loop where the loop
variable(s) take on values from one or more lists.
In the simplest case there is one loop variable, <I>varname</I>,
and one list, <I>list</I>, that is a list of values to assign to <I>varname</I>.
The <I>body</I> argument is a Tcl script.
For each element of <I>list</I> (in order
from first to last), <B>foreach</B> assigns the contents of the
element to <I>varname</I> as if the <B><A HREF="../TkCmd/lindex.htm">lindex</A></B> command had been used
to extract the element, then calls the Tcl interpreter to execute
<I>body</I>.
<P>
In the general case there can be more than one value list
(e.g., <I>list1</I> and <I>list2</I>),
and each value list can be associated with a list of loop variables
(e.g., <I>varlist1</I> and <I>varlist2</I>).
During each iteration of the loop
the variables of each <I>varlist</I> are assigned
consecutive values from the corresponding <I>list</I>.
Values in each <I>list</I> are used in order from first to last,
and each value is used exactly once.
The total number of loop iterations is large enough to use
up all the values from all the value lists.
If a value list does not contain enough
elements for each of its loop variables in each iteration,
empty values are used for the missing elements.
<P>
The <B><A HREF="../TkCmd/break.htm">break</A></B> and <B><A HREF="../TkCmd/continue.htm">continue</A></B> statements may be
invoked inside <I>body</I>, with the same effect as in the <B><A HREF="../TkCmd/for.htm">for</A></B>
command. <B>Foreach</B> returns an empty string.
<H3><A NAME="M5">EXAMPLES</A></H3>
The following loop uses i and j as loop variables to iterate over
pairs of elements of a single list.
<PRE>set x {}
foreach {i j} {a b c d e f} {
lappend x $j $i
}
# The value of x is &quot;b a d c f e&quot;
# There are 3 iterations of the loop.</PRE>
<P>
The next loop uses i and j to iterate over two lists in parallel.
<PRE>set x {}
foreach i {a b c} j {d e f g} {
lappend x $i $j
}
# The value of x is &quot;a d b e c f {} g&quot;
# There are 4 iterations of the loop.</PRE>
<P>
The two forms are combined in the following example.
<PRE>set x {}
foreach i {a b c} {j k} {d e f g} {
lappend x $i $j $k
}
# The value of x is &quot;a d e b f g c {} {}&quot;
# There are 3 iterations of the loop.</PRE>
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/for.htm">for</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>, <B><A HREF="../TkCmd/break.htm">break</A></B>, <B><A HREF="../TkCmd/continue.htm">continue</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/F.htm#foreach">foreach</A>, <A href="../Keywords/I.htm#iteration">iteration</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/L.htm#looping">looping</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,230 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - format manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="format.htm#M2" NAME="L403">NAME</A>
<DL><DD>format - Format a string in the style of sprintf</DL>
<DD><A HREF="format.htm#M3" NAME="L404">SYNOPSIS</A>
<DL>
<DD><B>format </B><I>formatString </I>?<I>arg arg ...</I>?
</DL>
<DD><A HREF="format.htm#M4" NAME="L405">INTRODUCTION</A>
<DD><A HREF="format.htm#M5" NAME="L406">DETAILS ON FORMATTING</A>
<DL>
<DD><A HREF="format.htm#M6" NAME="L407"><B>-</B></A>
<DD><A HREF="format.htm#M7" NAME="L408"><B>+</B></A>
<DD><A HREF="format.htm#M8" NAME="L409"><I>space</I></A>
<DD><A HREF="format.htm#M9" NAME="L410"><B>0</B></A>
<DD><A HREF="format.htm#M10" NAME="L411"><B>#</B></A>
</DL>
<DL>
<DD><A HREF="format.htm#M11" NAME="L412"><B>d</B></A>
<DD><A HREF="format.htm#M12" NAME="L413"><B>u</B></A>
<DD><A HREF="format.htm#M13" NAME="L414"><B>i</B></A>
<DD><A HREF="format.htm#M14" NAME="L415"><B>o</B></A>
<DD><A HREF="format.htm#M15" NAME="L416"><B>x</B> or <B>X</B></A>
<DD><A HREF="format.htm#M16" NAME="L417"><B>c</B></A>
<DD><A HREF="format.htm#M17" NAME="L418"><B>s</B></A>
<DD><A HREF="format.htm#M18" NAME="L419"><B>f</B></A>
<DD><A HREF="format.htm#M19" NAME="L420"><B>e</B> or <B>e</B></A>
<DD><A HREF="format.htm#M20" NAME="L421"><B>g</B> or <B>G</B></A>
<DD><A HREF="format.htm#M21" NAME="L422"><B>%</B></A>
</DL>
<DD><A HREF="format.htm#M22" NAME="L423">DIFFERENCES FROM ANSI SPRINTF</A>
<DL>
</DL>
<DD><A HREF="format.htm#M23" NAME="L424">SEE ALSO</A>
<DD><A HREF="format.htm#M24" NAME="L425">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
format - Format a string in the style of sprintf
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>format </B><I>formatString </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">INTRODUCTION</A></H3>
This command generates a formatted string in the same way as the
ANSI C <B>sprintf</B> procedure (it uses <B>sprintf</B> in its
implementation).
<I>FormatString</I> indicates how to format the result, using
<B>%</B> conversion specifiers as in <B>sprintf</B>, and the additional
arguments, if any, provide values to be substituted into the result.
The return value from <B>format</B> is the formatted string.
<H3><A NAME="M5">DETAILS ON FORMATTING</A></H3>
The command operates by scanning <I>formatString</I> from left to right.
Each character from the format string is appended to the result
string unless it is a percent sign.
If the character is a <B>%</B> then it is not copied to the result string.
Instead, the characters following the <B>%</B> character are treated as
a conversion specifier.
The conversion specifier controls the conversion of the next successive
<I>arg</I> to a particular format and the result is appended to
the result string in place of the conversion specifier.
If there are multiple conversion specifiers in the format string,
then each one controls the conversion of one additional <I>arg</I>.
The <B>format</B> command must be given enough <I>arg</I>s to meet the needs
of all of the conversion specifiers in <I>formatString</I>.
<P>
Each conversion specifier may contain up to six different parts:
an XPG3 position specifier,
a set of flags, a minimum field width, a precision, a length modifier,
and a conversion character.
Any of these fields may be omitted except for the conversion character.
The fields that are present must appear in the order given above.
The paragraphs below discuss each of these fields in turn.
<P>
If the <B>%</B> is followed by a decimal number and a <B>$</B>, as in
``<B>%2$d</B>'', then the value to convert is not taken from the
next sequential argument.
Instead, it is taken from the argument indicated by the number,
where 1 corresponds to the first <I>arg</I>.
If the conversion specifier requires multiple arguments because
of <B>*</B> characters in the specifier then
successive arguments are used, starting with the argument
given by the number.
This follows the XPG3 conventions for positional specifiers.
If there are any positional specifiers in <I>formatString</I>
then all of the specifiers must be positional.
<P>
The second portion of a conversion specifier may contain any of the
following flag characters, in any order:
<P>
<DL>
<P><DT><A NAME="M6"><B>-</B></A><DD>
Specifies that the converted argument should be left-justified
in its field (numbers are normally right-justified with leading
spaces if needed).
<P><DT><A NAME="M7"><B>+</B></A><DD>
Specifies that a number should always be printed with a sign,
even if positive.
<P><DT><A NAME="M8"><I>space</I></A><DD>
Specifies that a space should be added to the beginning of the
number if the first character isn't a sign.
<P><DT><A NAME="M9"><B>0</B></A><DD>
Specifies that the number should be padded on the left with
zeroes instead of spaces.
<P><DT><A NAME="M10"><B>#</B></A><DD>
Requests an alternate output form. For <B>o</B> and <B>O</B>
conversions it guarantees that the first digit is always <B>0</B>.
For <B>x</B> or <B>X</B> conversions, <B>0x</B> or <B>0X</B> (respectively)
will be added to the beginning of the result unless it is zero.
For all floating-point conversions (<B>e</B>, <B>E</B>, <B>f</B>,
<B>g</B>, and <B>G</B>) it guarantees that the result always
has a decimal point.
For <B>g</B> and <B>G</B> conversions it specifies that
trailing zeroes should not be removed.
<P></DL>
<P>
The third portion of a conversion specifier is a number giving a
minimum field width for this conversion.
It is typically used to make columns line up in tabular printouts.
If the converted argument contains fewer characters than the
minimum field width then it will be padded so that it is as wide
as the minimum field width.
Padding normally occurs by adding extra spaces on the left of the
converted argument, but the <B>0</B> and <B>-</B> flags
may be used to specify padding with zeroes on the left or with
spaces on the right, respectively.
If the minimum field width is specified as <B>*</B> rather than
a number, then the next argument to the <B>format</B> command
determines the minimum field width; it must be a numeric string.
<P>
The fourth portion of a conversion specifier is a precision,
which consists of a period followed by a number.
The number is used in different ways for different conversions.
For <B>e</B>, <B>E</B>, and <B>f</B> conversions it specifies the number
of digits to appear to the right of the decimal point.
For <B>g</B> and <B>G</B> conversions it specifies the total number
of digits to appear, including those on both sides of the decimal
point (however, trailing zeroes after the decimal point will still
be omitted unless the <B>#</B> flag has been specified).
For integer conversions, it specifies a minimum number of digits
to print (leading zeroes will be added if necessary).
For <B>s</B> conversions it specifies the maximum number of characters to be
printed; if the string is longer than this then the trailing characters will be dropped.
If the precision is specified with <B>*</B> rather than a number
then the next argument to the <B>format</B> command determines the precision;
it must be a numeric string.
<P>
The fifth part of a conversion specifier is a length modifier,
which must be <B>h</B> or <B>l</B>.
If it is <B>h</B> it specifies that the numeric value should be
truncated to a 16-bit value before converting.
This option is rarely useful.
The <B>l</B> modifier is ignored.
<P>
The last thing in a conversion specifier is an alphabetic character
that determines what kind of conversion to perform.
The following conversion characters are currently supported:
<P>
<DL>
<P><DT><A NAME="M11"><B>d</B></A><DD>
Convert integer to signed decimal string.
<P><DT><A NAME="M12"><B>u</B></A><DD>
Convert integer to unsigned decimal string.
<P><DT><A NAME="M13"><B>i</B></A><DD>
Convert integer to signed decimal string; the integer may either be
in decimal, in octal (with a leading <B>0</B>) or in hexadecimal
(with a leading <B>0x</B>).
<P><DT><A NAME="M14"><B>o</B></A><DD>
Convert integer to unsigned octal string.
<P><DT><A NAME="M15"><B>x</B> or <B>X</B></A><DD>
Convert integer to unsigned hexadecimal string, using digits
``0123456789abcdef'' for <B>x</B> and ``0123456789ABCDEF'' for <B>X</B>).
<P><DT><A NAME="M16"><B>c</B></A><DD>
Convert integer to the Unicode character it represents.
<P><DT><A NAME="M17"><B>s</B></A><DD>
No conversion; just insert string.
<P><DT><A NAME="M18"><B>f</B></A><DD>
Convert floating-point number to signed decimal string of
the form <I>xx.yyy</I>, where the number of <I>y</I>'s is determined by
the precision (default: 6).
If the precision is 0 then no decimal point is output.
<P><DT><A NAME="M19"><B>e</B> or <B>e</B></A><DD>
Convert floating-point number to scientific notation in the
form <I>x.yyy</I><B>e&#177;</B><I>zz</I>, where the number of <I>y</I>'s is determined
by the precision (default: 6).
If the precision is 0 then no decimal point is output.
If the <B>E</B> form is used then <B>E</B> is
printed instead of <B>e</B>.
<P><DT><A NAME="M20"><B>g</B> or <B>G</B></A><DD>
If the exponent is less than -4 or greater than or equal to the
precision, then convert floating-point number as for <B>%e</B> or
<B>%E</B>.
Otherwise convert as for <B>%f</B>.
Trailing zeroes and a trailing decimal point are omitted.
<P><DT><A NAME="M21"><B>%</B></A><DD>
No conversion: just insert <B>%</B>.
<P></DL>
<P>
For the numerical conversions the argument being converted must
be an integer or floating-point string; format converts the argument
to binary and then converts it back to a string according to
the conversion specifier.
<H3><A NAME="M22">DIFFERENCES FROM ANSI SPRINTF</A></H3>
The behavior of the format command is the same as the
ANSI C <B>sprintf</B> procedure except for the following
differences:
<P>
<DL>
<P><DT>[1]<DD>
<B>%p</B> and <B>%n</B> specifiers are not currently supported.
<P><DT>[2]<DD>
For <B>%c</B> conversions the argument must be a decimal string,
which will then be converted to the corresponding character value.
<P><DT>[3]<DD>
The <B>l</B> modifier is ignored; integer values are always converted
as if there were no modifier present and real values are always
converted as if the <B>l</B> modifier were present (i.e. type
<B>double</B> is used for the internal representation).
If the <B>h</B> modifier is specified then integer values are truncated
to <B>short</B> before conversion.
<P></DL>
<H3><A NAME="M23">SEE ALSO</A></H3>
<B>sprintf</B>, <B><A HREF="../TkCmd/string.htm">string</A></B>
<H3><A NAME="M24">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#conversion specifier">conversion specifier</A>, <A href="../Keywords/F.htm#format">format</A>, <A href="../Keywords/S.htm#sprintf">sprintf</A>, <A href="../Keywords/S.htm#string">string</A>, <A href="../Keywords/S.htm#substitution">substitution</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,39 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - gets manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
gets - Read a line from a channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>gets </B><I>channelId</I> ?<I>varName</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command reads the next line from <I>channelId</I>, returns everything
in the line up to (but not including) the end-of-line character(s), and
discards the end-of-line character(s).
If <I>varName</I> is omitted the line is returned as the result of the
command.
If <I>varName</I> is specified then the line is placed in the variable by
that name and the return value is a count of the number of characters
returned.
<P>
If end of file occurs while scanning for an end of
line, the command returns whatever input is available up to the end of file.
If <I>channelId</I> is in nonblocking mode and there is not a full
line of input available, the command returns an empty string and
does not consume any input.
If <I>varName</I> is specified and an empty string is returned in
<I>varName</I> because of end-of-file or because of insufficient
data in nonblocking mode, then the return count is -1.
Note that if <I>varName</I> is not specified then the end-of-file
and no-full-line-available cases can
produce the same results as if there were an input line consisting
only of the end-of-line character(s).
The <B><A HREF="../TkCmd/eof.htm">eof</A></B> and <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B> commands can be used to distinguish
these three cases.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/eof.htm">eof</A></B>, <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#end of file">end of file</A>, <A href="../Keywords/E.htm#end of line">end of line</A>, <A href="../Keywords/L.htm#line">line</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/R.htm#read">read</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,164 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - glob manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="glob.htm#M2" NAME="L431">NAME</A>
<DL><DD>glob - Return names of files that match patterns</DL>
<DD><A HREF="glob.htm#M3" NAME="L432">SYNOPSIS</A>
<DL>
<DD><B>glob </B>?<I>switches</I>? <I>pattern </I>?<I>pattern ...</I>?
</DL>
<DD><A HREF="glob.htm#M4" NAME="L433">DESCRIPTION</A>
<DL>
<DD><A HREF="glob.htm#M5" NAME="L434"><B>-directory</B> <I>directory</I></A>
<DD><A HREF="glob.htm#M6" NAME="L435"><B>-join</B></A>
<DD><A HREF="glob.htm#M7" NAME="L436"><B>-nocomplain</B></A>
<DD><A HREF="glob.htm#M8" NAME="L437"><B>-path</B> <I>pathPrefix</I></A>
<DD><A HREF="glob.htm#M9" NAME="L438"><B>-types</B> <I>typeList</I></A>
<DD><A HREF="glob.htm#M10" NAME="L439"><B>-&nbsp;-</B></A>
</DL>
<DL>
<DD><A HREF="glob.htm#M11" NAME="L440"><B>?</B></A>
<DD><A HREF="glob.htm#M12" NAME="L441"><B>*</B></A>
<DD><A HREF="glob.htm#M13" NAME="L442"><B>[</B><I>chars</I><B>]</B></A>
<DD><A HREF="glob.htm#M14" NAME="L443"><B>&#92;</B><I>x</I></A>
<DD><A HREF="glob.htm#M15" NAME="L444"><B>{</B><I>a</I><B>,</B><I>b</I><B>,</B><I>...</I>}</A>
</DL>
<DD><A HREF="glob.htm#M16" NAME="L445">PORTABILITY ISSUES</A>
<DL>
<DD><A HREF="glob.htm#M17" NAME="L446"><B>Windows</B></A>
<DD><A HREF="glob.htm#M18" NAME="L447"><B>Macintosh</B></A>
</DL>
<DD><A HREF="glob.htm#M19" NAME="L448">SEE ALSO</A>
<DD><A HREF="glob.htm#M20" NAME="L449">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
glob - Return names of files that match patterns
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>glob </B>?<I>switches</I>? <I>pattern </I>?<I>pattern ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command performs file name ``globbing'' in a fashion similar to
the csh shell. It returns a list of the files whose names match any
of the <I>pattern</I> arguments.
<P>
If the initial arguments to <B>glob</B> start with <B>-</B> then
they are treated as switches. The following switches are
currently supported:
<P>
<DL>
<P><DT><A NAME="M5"><B>-directory</B> <I>directory</I></A><DD>
Search for files which match the given patterns starting in the given
<I>directory</I>. This allows searching of directories whose name
contains glob-sensitive characters without the need to quote such
characters explicitly. This option may not be used in conjunction with
<B>-path</B>.
<P><DT><A NAME="M6"><B>-join</B></A><DD>
The remaining pattern arguments are treated as a single pattern
obtained by joining the arguments with directory separators.
<P><DT><A NAME="M7"><B>-nocomplain</B></A><DD>
Allows an empty list to be returned without error; without this
switch an error is returned if the result list would be empty.
<P><DT><A NAME="M8"><B>-path</B> <I>pathPrefix</I></A><DD>
Search for files with the given <I>pathPrefix</I> where the rest of the name
matches the given patterns. This allows searching for files with names
similar to a given file even when the names contain glob-sensitive
characters. This option may not be used in conjunction with
<B>-directory</B>.
<P><DT><A NAME="M9"><B>-types</B> <I>typeList</I></A><DD>
Only list files or directories which match <I>typeList</I>, where the items
in the list have two forms. The first form is like the -type option of
the Unix find command:
<I>b</I> (block special file),
<I>c</I> (character special file),
<I>d</I> (directory),
<I>f</I> (plain file),
<I>l</I> (symbolic link),
<I>p</I> (named pipe),
or <I>s</I> (socket), where multiple types may be specified in the list.
<B>Glob</B> will return all files which match at least one of the types given.
<P>
The second form specifies types where all the types given must match.
These are <I>r</I>, <I>w</I>, <I>x</I> as file permissions, and
<I>readonly</I>, <I>hidden</I> as special permission cases. On the
Macintosh, MacOS types and creators are also supported, where any item
which is four characters long is assumed to be a MacOS type
(e.g. <B><A HREF="../TclCmd/text.htm">TEXT</A></B>). Items which are of the form <I>{macintosh type XXXX}</I>
or <I>{macintosh creator XXXX}</I> will match types or creators
respectively. Unrecognised types, or specifications of multiple MacOS
types/creators will signal an error.
<P>
The two forms may be mixed, so <B>-types {d f r w}</B> will find all
regular files OR directories that have both read AND write permissions.
The following are equivalent:
<PRE><B>glob -type d *</B>
<B>glob */</B></PRE>
except that the first case doesn't return the trailing ``/'' and
is more platform independent.
<P><DT><A NAME="M10"><B>-&nbsp;-</B></A><DD>
Marks the end of switches. The argument following this one will
be treated as a <I>pattern</I> even if it starts with a <B>-</B>.
<P></DL>
<P>
The <I>pattern</I> arguments may contain any of the following
special characters:
<P>
<DL>
<P><DT><A NAME="M11"><B>?</B></A><DD>
Matches any single character.
<P><DT><A NAME="M12"><B>*</B></A><DD>
Matches any sequence of zero or more characters.
<P><DT><A NAME="M13"><B>[</B><I>chars</I><B>]</B></A><DD>
Matches any single character in <I>chars</I>. If <I>chars</I>
contains a sequence of the form <I>a</I><B>-</B><I>b</I> then any
character between <I>a</I> and <I>b</I> (inclusive) will match.
<P><DT><A NAME="M14"><B>&#92;</B><I>x</I></A><DD>
Matches the character <I>x</I>.
<P><DT><A NAME="M15"><B>{</B><I>a</I><B>,</B><I>b</I><B>,</B><I>...</I>}</A><DD>
Matches any of the strings <I>a</I>, <I>b</I>, etc.
<P></DL>
<P>
As with csh, a ``.'' at the beginning of a file's name or just
after a ``/'' must be matched explicitly or with a {} construct.
In addition, all ``/'' characters must be matched explicitly.
<P>
If the first character in a <I>pattern</I> is ``~'' then it refers
to the home directory for the user whose name follows the ``~''.
If the ``~'' is followed immediately by ``/'' then the value of
the HOME environment variable is used.
<P>
The <B>glob</B> command differs from csh globbing in two ways.
First, it does not sort its result list (use the <B><A HREF="../TkCmd/lsort.htm">lsort</A></B>
command if you want the list sorted).
Second, <B>glob</B> only returns the names of files that actually
exist; in csh no check for existence is made unless a pattern
contains a ?, *, or [] construct.
<H3><A NAME="M16">PORTABILITY ISSUES</A></H3>
Unlike other Tcl commands that will accept both network and native
style names (see the <B><A HREF="../TkCmd/filename.htm">filename</A></B> manual entry for details on how
native and network names are specified), the <B>glob</B> command only
accepts native names.
<P>
<DL>
<P><DT><A NAME="M17"><B>Windows</B></A><DD>
For Windows UNC names, the servername and sharename components of the path
may not contain ?, *, or [] constructs. On Windows NT, if <I>pattern</I> is
of the form ``<B>~</B><I>username</I><B>@</B><I>domain</I>'' it refers to the home
directory of the user whose account information resides on the specified NT
domain server. Otherwise, user account information is obtained from
the local computer. On Windows 95 and 98, <B>glob</B> accepts patterns
like ``.../'' and ``..../'' for successively higher up parent directories.
<P><DT><A NAME="M18"><B>Macintosh</B></A><DD>
When using the options, <B>-dir</B>, <B>-join</B> or <B>-path</B>, glob
assumes the directory separator for the entire pattern is the standard
``:''. When not using these options, glob examines each pattern argument
and uses ``/'' unless the pattern contains a ``:''.
<P></DL>
<H3><A NAME="M19">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>
<H3><A NAME="M20">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#exist">exist</A>, <A href="../Keywords/F.htm#file">file</A>, <A href="../Keywords/G.htm#glob">glob</A>, <A href="../Keywords/P.htm#pattern">pattern</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,28 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - global manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
global - Access global variables
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>global </B><I>varname </I>?<I>varname ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is ignored unless a Tcl procedure is being interpreted.
If so then it declares the given <I>varname</I>'s to be global variables
rather than local ones.
Global variables are variables in the global namespace.
For the duration of the current procedure
(and only while executing in the current procedure),
any reference to any of the <I>varname</I>s
will refer to the global variable by the same name.
<P>
Please note that this is done by creating local variables that are
linked to the global variables, and therefore that these variables
will be listed by <B><A HREF="../TkCmd/info.htm">info locals</A></B> like all other local variables.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/namespace.htm">namespace</A></B>, <B><A HREF="../TkCmd/upvar.htm">upvar</A></B>, <B><A HREF="../TkCmd/variable.htm">variable</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/G.htm#global">global</A>, <A href="../Keywords/N.htm#namespace">namespace</A>, <A href="../Keywords/P.htm#procedure">procedure</A>, <A href="../Keywords/V.htm#variable">variable</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,114 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - history manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="history.htm#M2" NAME="L455">NAME</A>
<DL><DD>history - Manipulate the history list</DL>
<DD><A HREF="history.htm#M3" NAME="L456">SYNOPSIS</A>
<DL>
<DD><B>history </B>?<I>option</I>? ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="history.htm#M4" NAME="L457">DESCRIPTION</A>
<DL>
</DL>
<DL>
<DD><A HREF="history.htm#M5" NAME="L458"><B>history</B></A>
<DD><A HREF="history.htm#M6" NAME="L459"><B>history add</B><I> command </I>?<B>exec</B>?</A>
<DD><A HREF="history.htm#M7" NAME="L460"><B>history change</B><I> newValue</I> ?<I>event</I>?</A>
<DD><A HREF="history.htm#M8" NAME="L461"><B>history clear</B></A>
<DD><A HREF="history.htm#M9" NAME="L462"><B>history event</B> ?<I>event</I>?</A>
<DD><A HREF="history.htm#M10" NAME="L463"><B>history info </B>?<I>count</I>?</A>
<DD><A HREF="history.htm#M11" NAME="L464"><B>history keep </B>?<I>count</I>?</A>
<DD><A HREF="history.htm#M12" NAME="L465"><B>history nextid</B></A>
<DD><A HREF="history.htm#M13" NAME="L466"><B>history redo </B>?<I>event</I>?</A>
</DL>
<DD><A HREF="history.htm#M14" NAME="L467">HISTORY REVISION</A>
<DD><A HREF="history.htm#M15" NAME="L468">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
history - Manipulate the history list
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>history </B>?<I>option</I>? ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>history</B> command performs one of several operations related to
recently-executed commands recorded in a history list. Each of
these recorded commands is referred to as an ``<A HREF="../TclCmd/event.htm">event</A>''. When
specifying an event to the <B>history</B> command, the following
forms may be used:
<P>
<DL>
<P><DT>[1]<DD>
A number: if positive, it refers to the event with
that number (all events are numbered starting at 1). If the number
is negative, it selects an event relative to the current event
(<B>-1</B> refers to the previous event, <B>-2</B> to the one before that, and
so on). Event <B>0</B> refers to the current event.
<P><DT>[2]<DD>
A string: selects the most recent event that matches the string.
An event is considered to match the string either if the string is
the same as the first characters of the event, or if the string
matches the event in the sense of the <B><A HREF="../TkCmd/string.htm">string match</A></B> command.
<P></DL>
<P>
The <B>history</B> command can take any of the following forms:
<P>
<DL>
<P><DT><A NAME="M5"><B>history</B></A><DD>
Same
as <B>history info</B>, described below.
<P><DT><A NAME="M6"><B>history add</B><I> command </I>?<B>exec</B>?</A><DD>
Adds the <I>command</I> argument to the history list as a new event. If
<B>exec</B> is specified (or abbreviated) then the command is also
executed and its result is returned. If <B>exec</B> isn't specified
then an empty string is returned as result.
<P><DT><A NAME="M7"><B>history change</B><I> newValue</I> ?<I>event</I>?</A><DD>
Replaces the value recorded for an event with <I>newValue</I>. <I>Event</I>
specifies the event to replace, and
defaults to the <I>current</I> event (not event <B>-1</B>). This command
is intended for use in commands that implement new forms of history
substitution and wish to replace the current event (which invokes the
substitution) with the command created through substitution. The return
value is an empty string.
<P><DT><A NAME="M8"><B>history clear</B></A><DD>
Erase the history list. The current keep limit is retained.
The history event numbers are reset.
<P><DT><A NAME="M9"><B>history event</B> ?<I>event</I>?</A><DD>
Returns the value of the event given by <I>event</I>. <I>Event</I>
defaults to <B>-1</B>.
<P><DT><A NAME="M10"><B>history info </B>?<I>count</I>?</A><DD>
Returns a formatted string (intended for humans to read) giving
the event number and contents for each of the events in the history
list except the current event. If <I>count</I> is specified
then only the most recent <I>count</I> events are returned.
<P><DT><A NAME="M11"><B>history keep </B>?<I>count</I>?</A><DD>
This command may be used to change the size of the history list to
<I>count</I> events. Initially, 20 events are retained in the history
list. If <I>count</I> is not specified, the current keep limit is returned.
<P><DT><A NAME="M12"><B>history nextid</B></A><DD>
Returns the number of the next event to be recorded
in the history list. It is useful for things like printing the
event number in command-line prompts.
<P><DT><A NAME="M13"><B>history redo </B>?<I>event</I>?</A><DD>
Re-executes the command indicated by <I>event</I> and return its result.
<I>Event</I> defaults to <B>-1</B>. This command results in history
revision: see below for details.
<P></DL>
<H3><A NAME="M14">HISTORY REVISION</A></H3>
Pre-8.0 Tcl had a complex history revision mechanism.
The current mechanism is more limited, and the old
history operations <B>substitute</B> and <B>words</B> have been removed.
(As a consolation, the <B>clear</B> operation was added.)
<P>
The history option <B>redo</B> results in much simpler ``history revision''.
When this option is invoked then the most recent event
is modified to eliminate the history command and replace it with
the result of the history command.
If you want to redo an event without modifying history, then use
the <B><A HREF="../TclCmd/event.htm">event</A></B> operation to retrieve some event,
and the <B>add</B> operation to add it to history and execute it.
<H3><A NAME="M15">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#event">event</A>, <A href="../Keywords/H.htm#history">history</A>, <A href="../Keywords/R.htm#record">record</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,522 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - Http manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="http.htm#M2" NAME="L469">NAME</A>
<DL><DD>Http - Client-side implementation of the HTTP/1.0 protocol.</DL>
<DD><A HREF="http.htm#M3" NAME="L470">SYNOPSIS</A>
<DL>
<DD><B>package require http ?2.4?</B>
<DD><B>::http::config </B><I>?options?</I>
<DD><B>::http::geturl </B><I>url ?options?</I>
<DD><B>::http::formatQuery </B><I>list</I>
<DD><B>::http::reset </B><I>token</I>
<DD><B>::http::wait </B><I>token</I>
<DD><B>::http::status </B><I>token</I>
<DD><B>::http::size </B><I>token</I>
<DD><B>::http::code </B><I>token</I>
<DD><B>::http::ncode </B><I>token</I>
<DD><B>::http::data </B><I>token</I>
<DD><B>::http::error </B><I>token</I>
<DD><B>::http::cleanup </B><I>token</I>
<DD><B>::http::register </B><I>proto port command</I>
<DD><B>::http::unregister </B><I>proto</I>
</DL>
<DD><A HREF="http.htm#M4" NAME="L471">DESCRIPTION</A>
<DD><A HREF="http.htm#M5" NAME="L472">COMMANDS</A>
<DL>
<DD><A HREF="http.htm#M6" NAME="L473"><B>::http::config</B> ?<I>options</I>?</A>
<DL>
<DD><A HREF="http.htm#M7" NAME="L474"><B>-accept</B> <I>mimetypes</I></A>
<DD><A HREF="http.htm#M8" NAME="L475"><B>-proxyhost</B> <I>hostname</I></A>
<DD><A HREF="http.htm#M9" NAME="L476"><B>-proxyport</B> <I>number</I></A>
<DD><A HREF="http.htm#M10" NAME="L477"><B>-proxyfilter</B> <I>command</I></A>
<DD><A HREF="http.htm#M11" NAME="L478"><B>-useragent</B> <I>string</I></A>
</DL>
<DD><A HREF="http.htm#M12" NAME="L479"><B>::http::geturl</B> <I>url</I> ?<I>options</I>?</A>
<DL>
<DD><A HREF="http.htm#M13" NAME="L480"><B>-binary</B> <I>boolean</I></A>
<DD><A HREF="http.htm#M14" NAME="L481"><B>-blocksize</B> <I>size</I></A>
<DD><A HREF="http.htm#M15" NAME="L482"><B>-channel</B> <I>name</I></A>
<DD><A HREF="http.htm#M16" NAME="L483"><B>-command</B> <I>callback</I></A>
<DD><A HREF="http.htm#M17" NAME="L484"><B>-handler</B> <I>callback</I></A>
<DD><A HREF="http.htm#M18" NAME="L485"><B>-headers</B> <I>keyvaluelist</I></A>
<DD><A HREF="http.htm#M19" NAME="L486"><B>-progress</B> <I>callback</I></A>
<DD><A HREF="http.htm#M20" NAME="L487"><B>-query</B> <I>query</I></A>
<DD><A HREF="http.htm#M21" NAME="L488"><B>-queryblocksize</B> <I>size</I></A>
<DD><A HREF="http.htm#M22" NAME="L489"><B>-querychannel</B> <I>channelID</I></A>
<DD><A HREF="http.htm#M23" NAME="L490"><B>-queryprogress</B> <I>callback</I></A>
<DD><A HREF="http.htm#M24" NAME="L491"><B>-timeout</B> <I>milliseconds</I></A>
<DD><A HREF="http.htm#M25" NAME="L492"><B>-type</B> <I>mime-type</I></A>
<DD><A HREF="http.htm#M26" NAME="L493"><B>-validate</B> <I>boolean</I></A>
</DL>
<DD><A HREF="http.htm#M27" NAME="L494"><B>::http::formatQuery</B> <I>key value</I> ?<I>key value</I> ...?</A>
<DD><A HREF="http.htm#M28" NAME="L495"><B>::http::reset</B> <I>token</I> ?<I>why</I>?</A>
<DD><A HREF="http.htm#M29" NAME="L496"><B>::http::wait</B> <I>token</I></A>
<DD><A HREF="http.htm#M30" NAME="L497"><B>::http::data</B> <I>token</I></A>
<DD><A HREF="http.htm#M31" NAME="L498"><B>::http::error</B> <I>token</I></A>
<DD><A HREF="http.htm#M32" NAME="L499"><B>::http::status</B> <I>token</I></A>
<DD><A HREF="http.htm#M33" NAME="L500"><B>::http::code</B> <I>token</I></A>
<DD><A HREF="http.htm#M34" NAME="L501"><B>::http::ncode</B> <I>token</I></A>
<DD><A HREF="http.htm#M35" NAME="L502"><B>::http::size</B> <I>token</I></A>
<DD><A HREF="http.htm#M36" NAME="L503"><B>::http::cleanup</B> <I>token</I></A>
<DD><A HREF="http.htm#M37" NAME="L504"><B>::http::register</B> <I>proto port command</I></A>
<DD><A HREF="http.htm#M38" NAME="L505"><B>::http::unregister</B> <I>proto</I></A>
</DL>
<DD><A HREF="http.htm#M39" NAME="L506">ERRORS</A>
<DL>
<DD><A HREF="http.htm#M40" NAME="L507">ok</A>
<DD><A HREF="http.htm#M41" NAME="L508">eof</A>
<DD><A HREF="http.htm#M42" NAME="L509">error</A>
</DL>
<DD><A HREF="http.htm#M43" NAME="L510">STATE ARRAY</A>
<DL>
<DD><A HREF="http.htm#M44" NAME="L511"><B>body</B></A>
<DD><A HREF="http.htm#M45" NAME="L512"><B>charset</B></A>
<DD><A HREF="http.htm#M46" NAME="L513"><B>coding</B></A>
<DD><A HREF="http.htm#M47" NAME="L514"><B>currentsize</B></A>
<DD><A HREF="http.htm#M48" NAME="L515"><B>error</B></A>
<DD><A HREF="http.htm#M49" NAME="L516"><B>http</B></A>
<DD><A HREF="http.htm#M50" NAME="L517"><B>meta</B></A>
<DL>
<DD><A HREF="http.htm#M51" NAME="L518"><B>Content-Type</B></A>
<DD><A HREF="http.htm#M52" NAME="L519"><B>Content-Length</B></A>
<DD><A HREF="http.htm#M53" NAME="L520"><B>Location</B></A>
</DL>
<DD><A HREF="http.htm#M54" NAME="L521"><B>posterror</B></A>
<DD><A HREF="http.htm#M55" NAME="L522"><B>status</B></A>
<DD><A HREF="http.htm#M56" NAME="L523"><B>totalsize</B></A>
<DD><A HREF="http.htm#M57" NAME="L524"><B>type</B></A>
<DD><A HREF="http.htm#M58" NAME="L525"><B>url</B></A>
</DL>
<DD><A HREF="http.htm#M59" NAME="L526">EXAMPLE</A>
<DD><A HREF="http.htm#M60" NAME="L527">SEE ALSO</A>
<DD><A HREF="http.htm#M61" NAME="L528">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
Http - Client-side implementation of the HTTP/1.0 protocol.
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>package require http ?2.4?</B><BR>
<B>::http::config </B><I>?options?</I><BR>
<B>::http::geturl </B><I>url ?options?</I><BR>
<B>::http::formatQuery </B><I>list</I><BR>
<B>::http::reset </B><I>token</I><BR>
<B>::http::wait </B><I>token</I><BR>
<B>::http::status </B><I>token</I><BR>
<B>::http::size </B><I>token</I><BR>
<B>::http::code </B><I>token</I><BR>
<B>::http::ncode </B><I>token</I><BR>
<B>::http::data </B><I>token</I><BR>
<B>::http::error </B><I>token</I><BR>
<B>::http::cleanup </B><I>token</I><BR>
<B>::http::register </B><I>proto port command</I><BR>
<B>::http::unregister </B><I>proto</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>http</B> package provides the client side of the HTTP/1.0
protocol. The package implements the GET, POST, and HEAD operations
of HTTP/1.0. It allows configuration of a proxy host to get through
firewalls. The package is compatible with the <B>Safesock</B> security
policy, so it can be used by untrusted applets to do URL fetching from
a restricted set of hosts. This package can be extened to support
additional HTTP transport protocols, such as HTTPS, by providing
a custom <B><A HREF="../TkCmd/socket.htm">socket</A></B> command, via <B>http::register</B>.
<P>
The <B>::http::geturl</B> procedure does a HTTP transaction.
Its <I>options </I> determine whether a GET, POST, or HEAD transaction
is performed.
The return value of <B>::http::geturl</B> is a token for the transaction.
The value is also the name of an array in the ::http namespace
that contains state information about the transaction. The elements
of this array are described in the STATE ARRAY section.
<P>
If the <B>-command</B> option is specified, then
the HTTP operation is done in the background.
<B>::http::geturl</B> returns immediately after generating the
HTTP request and the callback is invoked
when the transaction completes. For this to work, the Tcl event loop
must be active. In Tk applications this is always true. For pure-Tcl
applications, the caller can use <B>::http::wait</B> after calling
<B>::http::geturl</B> to start the event loop.
<H3><A NAME="M5">COMMANDS</A></H3>
<DL>
<P><DT><A NAME="M6"><B>::http::config</B> ?<I>options</I>?</A><DD>
The <B>::http::config</B> command is used to set and query the name of the
proxy server and port, and the User-Agent name used in the HTTP
requests. If no options are specified, then the current configuration
is returned. If a single argument is specified, then it should be one
of the flags described below. In this case the current value of
that setting is returned. Otherwise, the options should be a set of
flags and values that define the configuration:
<P>
<DL>
<P><DT><A NAME="M7"><B>-accept</B> <I>mimetypes</I></A><DD>
The Accept header of the request. The default is */*, which means that
all types of documents are accepted. Otherwise you can supply a
comma separated list of mime type patterns that you are
willing to receive. For example, &quot;image/gif, image/jpeg, text/*&quot;.
<P><DT><A NAME="M8"><B>-proxyhost</B> <I>hostname</I></A><DD>
The name of the proxy host, if any. If this value is the
empty string, the URL host is contacted directly.
<P><DT><A NAME="M9"><B>-proxyport</B> <I>number</I></A><DD>
The proxy port number.
<P><DT><A NAME="M10"><B>-proxyfilter</B> <I>command</I></A><DD>
The command is a callback that is made during
<B>::http::geturl</B>
to determine if a proxy is required for a given host. One argument, a
host name, is added to <I>command</I> when it is invoked. If a proxy
is required, the callback should return a two element list containing
the proxy server and proxy port. Otherwise the filter should return
an empty list. The default filter returns the values of the
<B>-proxyhost</B> and <B>-proxyport</B> settings if they are
non-empty.
<P><DT><A NAME="M11"><B>-useragent</B> <I>string</I></A><DD>
The value of the User-Agent header in the HTTP request. The default
is <B>&quot;Tcl http client package 2.2.&quot;</B>
<P></DL>
<P><DT><A NAME="M12"><B>::http::geturl</B> <I>url</I> ?<I>options</I>?</A><DD>
The <B>::http::geturl</B> command is the main procedure in the package.
The <B>-query</B> option causes a POST operation and
the <B>-validate</B> option causes a HEAD operation;
otherwise, a GET operation is performed. The <B>::http::geturl</B> command
returns a <I>token</I> value that can be used to get
information about the transaction. See the STATE ARRAY and ERRORS section for
details. The <B>::http::geturl</B> command blocks until the operation
completes, unless the <B>-command</B> option specifies a callback
that is invoked when the HTTP transaction completes.
<B>::http::geturl</B> takes several options:
<P>
<DL>
<P><DT><A NAME="M13"><B>-binary</B> <I>boolean</I></A><DD>
Specifies whether to force interpreting the url data as binary. Normally
this is auto-detected (anything not beginning with a <B><A HREF="../TclCmd/text.htm">text</A></B> content
type or whose content encoding is <B>gzip</B> or <B>compress</B> is
considered binary data).
<P><DT><A NAME="M14"><B>-blocksize</B> <I>size</I></A><DD>
The blocksize used when reading the URL.
At most <I>size</I> bytes are read at once. After each block, a call to the
<B>-progress</B> callback is made (if that option is specified).
<P><DT><A NAME="M15"><B>-channel</B> <I>name</I></A><DD>
Copy the URL contents to channel <I>name</I> instead of saving it in
<B>state(body)</B>.
<P><DT><A NAME="M16"><B>-command</B> <I>callback</I></A><DD>
Invoke <I>callback</I> after the HTTP transaction completes.
This option causes <B>::http::geturl</B> to return immediately.
The <I>callback</I> gets an additional argument that is the <I>token</I> returned
from <B>::http::geturl</B>. This token is the name of an array that is
described in the STATE ARRAY section. Here is a template for the
callback:
<PRE>proc httpCallback {token} {
upvar #0 $token state
# Access state as a Tcl array
}</PRE>
<P><DT><A NAME="M17"><B>-handler</B> <I>callback</I></A><DD>
Invoke <I>callback</I> whenever HTTP data is available; if present, nothing
else will be done with the HTTP data. This procedure gets two additional
arguments: the socket for the HTTP data and the <I>token</I> returned from
<B>::http::geturl</B>. The token is the name of a global array that is described
in the STATE ARRAY section. The procedure is expected to return the number
of bytes read from the socket. Here is a template for the callback:
<PRE>proc httpHandlerCallback {socket token} {
upvar #0 $token state
# Access socket, and state as a Tcl array
...
(example: set data [read $socket 1000];set nbytes [string length $data])
...
return nbytes
}</PRE>
<P><DT><A NAME="M18"><B>-headers</B> <I>keyvaluelist</I></A><DD>
This option is used to add extra headers to the HTTP request. The
<I>keyvaluelist</I> argument must be a list with an even number of
elements that alternate between keys and values. The keys become
header field names. Newlines are stripped from the values so the
header cannot be corrupted. For example, if <I>keyvaluelist</I> is
<B>Pragma no-cache</B> then the following header is included in the
HTTP request:
<PRE>Pragma: no-cache</PRE>
<P><DT><A NAME="M19"><B>-progress</B> <I>callback</I></A><DD>
The <I>callback</I> is made after each transfer of data from the URL.
The callback gets three additional arguments: the <I>token</I> from
<B>::http::geturl</B>, the expected total size of the contents from the
<B>Content-Length</B> meta-data, and the current number of bytes
transferred so far. The expected total size may be unknown, in which
case zero is passed to the callback. Here is a template for the
progress callback:
<PRE>proc httpProgress {token total current} {
upvar #0 $token state
}</PRE>
<P><DT><A NAME="M20"><B>-query</B> <I>query</I></A><DD>
This flag causes <B>::http::geturl</B> to do a POST request that passes the
<I>query</I> to the server. The <I>query</I> must be a x-url-encoding
formatted query. The <B>::http::formatQuery</B> procedure can be used to
do the formatting.
<P><DT><A NAME="M21"><B>-queryblocksize</B> <I>size</I></A><DD>
The blocksize used when posting query data to the URL.
At most
<I>size</I>
bytes are written at once. After each block, a call to the
<B>-queryprogress</B>
callback is made (if that option is specified).
<P><DT><A NAME="M22"><B>-querychannel</B> <I>channelID</I></A><DD>
This flag causes <B>::http::geturl</B> to do a POST request that passes the
data contained in <I>channelID</I> to the server. The data contained in <I>channelID</I> must be a x-url-encoding
formatted query unless the <B>-type</B> option below is used.
If a Content-Length header is not specified via the <B>-headers</B> options,
<B>::http::geturl</B> attempts to determine the size of the post data
in order to create that header. If it is
unable to determine the size, it returns an error.
<P><DT><A NAME="M23"><B>-queryprogress</B> <I>callback</I></A><DD>
The <I>callback</I> is made after each transfer of data to the URL
(i.e. POST) and acts exactly like the <B>-progress</B> option (the
callback format is the same).
<P><DT><A NAME="M24"><B>-timeout</B> <I>milliseconds</I></A><DD>
If <I>milliseconds</I> is non-zero, then <B>::http::geturl</B> sets up a timeout
to occur after the specified number of milliseconds.
A timeout results in a call to <B>::http::reset</B> and to
the <B>-command</B> callback, if specified.
The return value of <B>::http::status</B> is <B>timeout</B>
after a timeout has occurred.
<P><DT><A NAME="M25"><B>-type</B> <I>mime-type</I></A><DD>
Use <I>mime-type</I> as the <B>Content-Type</B> value, instead of the
default value (<B>application/x-www-form-urlencoded</B>) during a
POST operation.
<P><DT><A NAME="M26"><B>-validate</B> <I>boolean</I></A><DD>
If <I>boolean</I> is non-zero, then <B>::http::geturl</B> does an HTTP HEAD
request. This request returns meta information about the URL, but the
contents are not returned. The meta information is available in the
<B>state(meta) </B> variable after the transaction. See the STATE
ARRAY section for details.
<P></DL>
<P><DT><A NAME="M27"><B>::http::formatQuery</B> <I>key value</I> ?<I>key value</I> ...?</A><DD>
This procedure does x-url-encoding of query data. It takes an even
number of arguments that are the keys and values of the query. It
encodes the keys and values, and generates one string that has the
proper &amp; and = separators. The result is suitable for the
<B>-query</B> value passed to <B>::http::geturl</B>.
<P><DT><A NAME="M28"><B>::http::reset</B> <I>token</I> ?<I>why</I>?</A><DD>
This command resets the HTTP transaction identified by <I>token</I>, if
any. This sets the <B>state(status)</B> value to <I>why</I>, which defaults to <B>reset</B>, and then calls the registered <B>-command</B> callback.
<P><DT><A NAME="M29"><B>::http::wait</B> <I>token</I></A><DD>
This is a convenience procedure that blocks and waits for the
transaction to complete. This only works in trusted code because it
uses <B><A HREF="../TkCmd/vwait.htm">vwait</A></B>. Also, it's not useful for the case where
<B>::http::geturl</B> is called <I>without</I> the <B>-command</B> option
because in this case the <B>::http::geturl</B> call doesn't return
until the HTTP transaction is complete, and thus there's nothing to
wait for.
<P><DT><A NAME="M30"><B>::http::data</B> <I>token</I></A><DD>
This is a convenience procedure that returns the <B>body</B> element
(i.e., the URL data) of the state array.
<P><DT><A NAME="M31"><B>::http::error</B> <I>token</I></A><DD>
This is a convenience procedure that returns the <B><A HREF="../TkCmd/error.htm">error</A></B> element
of the state array.
<P><DT><A NAME="M32"><B>::http::status</B> <I>token</I></A><DD>
This is a convenience procedure that returns the <B>status</B> element of
the state array.
<P><DT><A NAME="M33"><B>::http::code</B> <I>token</I></A><DD>
This is a convenience procedure that returns the <B>http</B> element of the
state array.
<P><DT><A NAME="M34"><B>::http::ncode</B> <I>token</I></A><DD>
This is a convenience procedure that returns just the numeric return
code (200, 404, etc.) from the <B>http</B> element of the state array.
<P><DT><A NAME="M35"><B>::http::size</B> <I>token</I></A><DD>
This is a convenience procedure that returns the <B>currentsize</B>
element of the state array, which represents the number of bytes
received from the URL in the <B>::http::geturl</B> call.
<P><DT><A NAME="M36"><B>::http::cleanup</B> <I>token</I></A><DD>
This procedure cleans up the state associated with the connection
identified by <I>token</I>. After this call, the procedures
like <B>::http::data</B> cannot be used to get information
about the operation. It is <I>strongly</I> recommended that you call
this function after you're done with a given HTTP request. Not doing
so will result in memory not being freed, and if your app calls
<B>::http::geturl</B> enough times, the memory leak could cause a
performance hit...or worse.
<P><DT><A NAME="M37"><B>::http::register</B> <I>proto port command</I></A><DD>
This procedure allows one to provide custom HTTP transport types
such as HTTPS, by registering a prefix, the default port, and the
command to execute to create the Tcl <B>channel</B>. E.g.:
<PRE>package require http
package require tls
http::register https 443 ::tls::socket
set token [http::geturl https://my.secure.site/]</PRE>
<P><DT><A NAME="M38"><B>::http::unregister</B> <I>proto</I></A><DD>
This procedure unregisters a protocol handler that was previously
registered via <B>http::register</B>.
<P></DL>
<H3><A NAME="M39">ERRORS</A></H3>
The <B>http::geturl</B> procedure will raise errors in the following cases:
invalid command line options,
an invalid URL,
a URL on a non-existent host,
or a URL at a bad port on an existing host.
These errors mean that it
cannot even start the network transaction.
It will also raise an error if it gets an I/O error while
writing out the HTTP request header.
For synchronous <B>::http::geturl</B> calls (where <B>-command</B> is
not specified), it will raise an error if it gets an I/O error while
reading the HTTP reply headers or data. Because <B>::http::geturl</B>
doesn't return a token in these cases, it does all the required
cleanup and there's no issue of your app having to call
<B>::http::cleanup</B>.
<P>
For asynchronous <B>::http::geturl</B> calls, all of the above error
situations apply, except that if there's any error while
reading the
HTTP reply headers or data, no exception is thrown. This is because
after writing the HTTP headers, <B>::http::geturl</B> returns, and the
rest of the HTTP transaction occurs in the background. The command
callback can check if any error occurred during the read by calling
<B>::http::status</B> to check the status and if it's <I>error</I>,
calling <B>::http::error</B> to get the error message.
<P>
Alternatively, if the main program flow reaches a point where it needs
to know the result of the asynchronous HTTP request, it can call
<B>::http::wait</B> and then check status and error, just as the
callback does.
<P>
In any case, you must still call
<B>http::cleanup</B> to delete the state array when you're done.
<P>
There are other possible results of the HTTP transaction
determined by examining the status from <B>http::status</B>.
These are described below.
<P>
<DL>
<P><DT><A NAME="M40">ok</A><DD>
If the HTTP transaction completes entirely, then status will be <B>ok</B>.
However, you should still check the <B>http::code</B> value to get
the HTTP status. The <B>http::ncode</B> procedure provides just
the numeric error (e.g., 200, 404 or 500) while the <B>http::code</B>
procedure returns a value like &quot;HTTP 404 File not found&quot;.
<P><DT><A NAME="M41">eof</A><DD>
If the server closes the socket without replying, then no error
is raised, but the status of the transaction will be <B><A HREF="../TkCmd/eof.htm">eof</A></B>.
<P><DT><A NAME="M42">error</A><DD>
The error message will also be stored in the <B><A HREF="../TkCmd/error.htm">error</A></B> status
array element, accessible via <B>::http::error</B>.
<P></DL>
<P>
Another error possibility is that <B>http::geturl</B> is unable to
write all the post query data to the server before the server
responds and closes the socket.
The error message is saved in the <B>posterror</B> status array
element and then <B>http::geturl</B> attempts to complete the
transaction.
If it can read the server's response
it will end up with an <B>ok</B> status, otherwise it will have
an <B><A HREF="../TkCmd/eof.htm">eof</A></B> status.
<H3><A NAME="M43">STATE ARRAY</A></H3>
The <B>::http::geturl</B> procedure returns a <I>token</I> that can be used to
get to the state of the HTTP transaction in the form of a Tcl array.
Use this construct to create an easy-to-use array variable:
<PRE>upvar #0 $token state</PRE>
Once the data associated with the url is no longer needed, the state
array should be unset to free up storage.
The <B>http::cleanup</B> procedure is provided for that purpose.
The following elements of
the array are supported:
<P>
<DL>
<P><DT><A NAME="M44"><B>body</B></A><DD>
The contents of the URL. This will be empty if the <B>-channel</B>
option has been specified. This value is returned by the <B>::http::data</B> command.
<P><DT><A NAME="M45"><B>charset</B></A><DD>
The value of the charset attribute from the <B>Content-Type</B> meta-data
value. If none was specified, this defaults to the RFC standard
<B>iso8859-1</B>, or the value of <B>$::http::defaultCharset</B>. Incoming
text data will be automatically converted from this charset to utf-8.
<P><DT><A NAME="M46"><B>coding</B></A><DD>
A copy of the <B>Content-Encoding</B> meta-data value.
<P><DT><A NAME="M47"><B>currentsize</B></A><DD>
The current number of bytes fetched from the URL.
This value is returned by the <B>::http::size</B> command.
<P><DT><A NAME="M48"><B>error</B></A><DD>
If defined, this is the error string seen when the HTTP transaction
was aborted.
<P><DT><A NAME="M49"><B>http</B></A><DD>
The HTTP status reply from the server. This value
is returned by the <B>::http::code</B> command. The format of this value is:
<PRE><I>HTTP/1.0 code string</I></PRE>
The <I>code</I> is a three-digit number defined in the HTTP standard.
A code of 200 is OK. Codes beginning with 4 or 5 indicate errors.
Codes beginning with 3 are redirection errors. In this case the
<B>Location</B> meta-data specifies a new URL that contains the
requested information.
<P><DT><A NAME="M50"><B>meta</B></A><DD>
The HTTP protocol returns meta-data that describes the URL contents.
The <B>meta</B> element of the state array is a list of the keys and
values of the meta-data. This is in a format useful for initializing
an array that just contains the meta-data:
<PRE>array set meta $state(meta)</PRE>
Some of the meta-data keys are listed below, but the HTTP standard defines
more, and servers are free to add their own.
<P>
<DL>
<P><DT><A NAME="M51"><B>Content-Type</B></A><DD>
The type of the URL contents. Examples include <B>text/html</B>,
<B>image/gif,</B> <B>application/postscript</B> and
<B>application/x-tcl</B>.
<P><DT><A NAME="M52"><B>Content-Length</B></A><DD>
The advertised size of the contents. The actual size obtained by
<B>::http::geturl</B> is available as <B>state(size)</B>.
<P><DT><A NAME="M53"><B>Location</B></A><DD>
An alternate URL that contains the requested data.
<P></DL>
<P><DT><A NAME="M54"><B>posterror</B></A><DD>
The error, if any, that occurred while writing
the post query data to the server.
<P><DT><A NAME="M55"><B>status</B></A><DD>
Either <B>ok</B>, for successful completion, <B>reset</B> for
user-reset, <B>timeout</B> if a timeout occurred before the transaction
could complete, or <B><A HREF="../TkCmd/error.htm">error</A></B> for an error condition. During the
transaction this value is the empty string.
<P><DT><A NAME="M56"><B>totalsize</B></A><DD>
A copy of the <B>Content-Length</B> meta-data value.
<P><DT><A NAME="M57"><B>type</B></A><DD>
A copy of the <B>Content-Type</B> meta-data value.
<P><DT><A NAME="M58"><B>url</B></A><DD>
The requested URL.
<P></DL>
<H3><A NAME="M59">EXAMPLE</A></H3>
<PRE># Copy a URL to a file and print meta-data
proc ::http::copy { url file {chunk 4096} } {
set out [open $file w]
set token [geturl $url -channel $out -progress ::http::Progress &#92;
-blocksize $chunk]
close $out
# This ends the line started by http::Progress
puts stderr &quot;&quot;
upvar #0 $token state
set max 0
foreach {name value} $state(meta) {
if {[string length $name] &gt; $max} {
set max [string length $name]
}
if {[regexp -nocase ^location$ $name]} {
# Handle URL redirects
puts stderr &quot;Location:$value&quot;
return [copy [string trim $value] $file $chunk]
}
}
incr max
foreach {name value} $state(meta) {
puts [format &quot;%-*s %s&quot; $max $name: $value]
}
return $token
}
proc ::http::Progress {args} {
puts -nonewline stderr . ; flush stderr
}</PRE>
<H3><A NAME="M60">SEE ALSO</A></H3>
<B>safe</B>, <B><A HREF="../TkCmd/socket.htm">socket</A></B>, <B>safesock</B>
<H3><A NAME="M61">KEYWORDS</A></H3>
<A href="../Keywords/S.htm#security policy">security policy</A>, <A href="../Keywords/S.htm#socket">socket</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1998-2000 by Ajuba Solutions.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,35 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - if manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
if - Execute scripts conditionally
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>if </B><I>expr1 </I>?<B>then</B>? <I>body1 </I><B>elseif </B><I>expr2 </I>?<B>then</B>? <I>body2</I> <B>elseif</B> ... ?<B>else</B>? ?<I>bodyN</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <I>if</I> command evaluates <I>expr1</I> as an expression (in the
same way that <B><A HREF="../TkCmd/expr.htm">expr</A></B> evaluates its argument). The value of the
expression must be a boolean
(a numeric value, where 0 is false and
anything is true, or a string value such as <B>true</B> or <B>yes</B>
for true and <B>false</B> or <B>no</B> for false);
if it is true then <I>body1</I> is executed by passing it to the
Tcl interpreter.
Otherwise <I>expr2</I> is evaluated as an expression and if it is true
then <B>body2</B> is executed, and so on.
If none of the expressions evaluates to true then <I>bodyN</I> is
executed.
The <B>then</B> and <B>else</B> arguments are optional
``noise words'' to make the command easier to read.
There may be any number of <B>elseif</B> clauses, including zero.
<I>BodyN</I> may also be omitted as long as <B>else</B> is omitted too.
The return value from the command is the result of the body script
that was executed, or an empty string
if none of the expressions was non-zero and there was no <I>bodyN</I>.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/expr.htm">expr</A></B>, <B><A HREF="../TkCmd/for.htm">for</A></B>, <B><A HREF="../TkCmd/foreach.htm">foreach</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#boolean">boolean</A>, <A href="../Keywords/C.htm#conditional">conditional</A>, <A href="../Keywords/E.htm#else">else</A>, <A href="../Keywords/F.htm#false">false</A>, <A href="../Keywords/I.htm#if">if</A>, <A href="../Keywords/T.htm#true">true</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,23 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - incr manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
incr - Increment the value of a variable
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>incr </B><I>varName </I>?<I>increment</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Increments the value stored in the variable whose name is <I>varName</I>.
The value of the variable must be an integer.
If <I>increment</I> is supplied then its value (which must be an
integer) is added to the value of variable <I>varName</I>; otherwise
1 is added to <I>varName</I>.
The new value is stored as a decimal string in variable <I>varName</I>
and also returned as result.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/expr.htm">expr</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#add">add</A>, <A href="../Keywords/I.htm#increment">increment</A>, <A href="../Keywords/V.htm#variable">variable</A>, <A href="../Keywords/V.htm#value">value</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,190 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - info manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="info.htm#M2" NAME="L539">NAME</A>
<DL><DD>info - Return information about the state of the Tcl interpreter</DL>
<DD><A HREF="info.htm#M3" NAME="L540">SYNOPSIS</A>
<DL>
<DD><B>info </B><I>option </I>?<I>arg arg ...</I>?
</DL>
<DD><A HREF="info.htm#M4" NAME="L541">DESCRIPTION</A>
<DL>
<DD><A HREF="info.htm#M5" NAME="L542"><B>info args </B><I>procname</I></A>
<DD><A HREF="info.htm#M6" NAME="L543"><B>info body </B><I>procname</I></A>
<DD><A HREF="info.htm#M7" NAME="L544"><B>info cmdcount</B></A>
<DD><A HREF="info.htm#M8" NAME="L545"><B>info commands </B>?<I>pattern</I>?</A>
<DD><A HREF="info.htm#M9" NAME="L546"><B>info complete </B><I>command</I></A>
<DD><A HREF="info.htm#M10" NAME="L547"><B>info default </B><I>procname arg varname</I></A>
<DD><A HREF="info.htm#M11" NAME="L548"><B>info exists </B><I>varName</I></A>
<DD><A HREF="info.htm#M12" NAME="L549"><B>info globals </B>?<I>pattern</I>?</A>
<DD><A HREF="info.htm#M13" NAME="L550"><B>info hostname</B></A>
<DD><A HREF="info.htm#M14" NAME="L551"><B>info level</B> ?<I>number</I>?</A>
<DD><A HREF="info.htm#M15" NAME="L552"><B>info library</B></A>
<DD><A HREF="info.htm#M16" NAME="L553"><B>info loaded </B>?<I>interp</I>?</A>
<DD><A HREF="info.htm#M17" NAME="L554"><B>info locals </B>?<I>pattern</I>?</A>
<DD><A HREF="info.htm#M18" NAME="L555"><B>info nameofexecutable</B></A>
<DD><A HREF="info.htm#M19" NAME="L556"><B>info patchlevel</B></A>
<DD><A HREF="info.htm#M20" NAME="L557"><B>info procs </B>?<I>pattern</I>?</A>
<DD><A HREF="info.htm#M21" NAME="L558"><B>info script</B></A>
<DD><A HREF="info.htm#M22" NAME="L559"><B>info sharedlibextension</B></A>
<DD><A HREF="info.htm#M23" NAME="L560"><B>info tclversion</B></A>
<DD><A HREF="info.htm#M24" NAME="L561"><B>info vars</B> ?<I>pattern</I>?</A>
</DL>
<DD><A HREF="info.htm#M25" NAME="L562">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
info - Return information about the state of the Tcl interpreter
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>info </B><I>option </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command provides information about various internals of the Tcl
interpreter.
The legal <I>option</I>'s (which may be abbreviated) are:
<P>
<DL>
<P><DT><A NAME="M5"><B>info args </B><I>procname</I></A><DD>
Returns a list containing the names of the arguments to procedure
<I>procname</I>, in order. <I>Procname</I> must be the name of a
Tcl command procedure.
<P><DT><A NAME="M6"><B>info body </B><I>procname</I></A><DD>
Returns the body of procedure <I>procname</I>. <I>Procname</I> must be
the name of a Tcl command procedure.
<P><DT><A NAME="M7"><B>info cmdcount</B></A><DD>
Returns a count of the total number of commands that have been invoked
in this interpreter.
<P><DT><A NAME="M8"><B>info commands </B>?<I>pattern</I>?</A><DD>
If <I>pattern</I> isn't specified,
returns a list of names of all the Tcl commands in the current namespace,
including both the built-in commands written in C and
the command procedures defined using the <B><A HREF="../TkCmd/proc.htm">proc</A></B> command.
If <I>pattern</I> is specified,
only those names matching <I>pattern</I> are returned.
Matching is determined using the same rules as for <B><A HREF="../TkCmd/string.htm">string match</A></B>.
<I>pattern</I> can be a qualified name like <B>Foo::print*</B>.
That is, it may specify a particular namespace
using a sequence of namespace names separated by <B>::</B>s,
and may have pattern matching special characters
at the end to specify a set of commands in that namespace.
If <I>pattern</I> is a qualified name,
the resulting list of command names has each one qualified with the name
of the specified namespace.
<P><DT><A NAME="M9"><B>info complete </B><I>command</I></A><DD>
Returns 1 if <I>command</I> is a complete Tcl command in the sense of
having no unclosed quotes, braces, brackets or array element names,
If the command doesn't appear to be complete then 0 is returned.
This command is typically used in line-oriented input environments
to allow users to type in commands that span multiple lines; if the
command isn't complete, the script can delay evaluating it until additional
lines have been typed to complete the command.
<P><DT><A NAME="M10"><B>info default </B><I>procname arg varname</I></A><DD>
<I>Procname</I> must be the name of a Tcl command procedure and <I>arg</I>
must be the name of an argument to that procedure. If <I>arg</I>
doesn't have a default value then the command returns <B>0</B>.
Otherwise it returns <B>1</B> and places the default value of <I>arg</I>
into variable <I>varname</I>.
<P><DT><A NAME="M11"><B>info exists </B><I>varName</I></A><DD>
Returns <B>1</B> if the variable named <I>varName</I> exists in the
current context (either as a global or local variable) and has been
defined by being given a value, returns <B>0</B> otherwise.
<P><DT><A NAME="M12"><B>info globals </B>?<I>pattern</I>?</A><DD>
If <I>pattern</I> isn't specified, returns a list of all the names
of currently-defined global variables.
Global variables are variables in the global namespace.
If <I>pattern</I> is specified, only those names matching <I>pattern</I>
are returned. Matching is determined using the same rules as for
<B><A HREF="../TkCmd/string.htm">string match</A></B>.
<P><DT><A NAME="M13"><B>info hostname</B></A><DD>
Returns the name of the computer on which this invocation is being
executed.
<P><DT><A NAME="M14"><B>info level</B> ?<I>number</I>?</A><DD>
If <I>number</I> is not specified, this command returns a number
giving the stack level of the invoking procedure, or 0 if the
command is invoked at top-level. If <I>number</I> is specified,
then the result is a list consisting of the name and arguments for the
procedure call at level <I>number</I> on the stack. If <I>number</I>
is positive then it selects a particular stack level (1 refers
to the top-most active procedure, 2 to the procedure it called, and
so on); otherwise it gives a level relative to the current level
(0 refers to the current procedure, -1 to its caller, and so on).
See the <B><A HREF="../TkCmd/uplevel.htm">uplevel</A></B> command for more information on what stack
levels mean.
<P><DT><A NAME="M15"><B>info library</B></A><DD>
Returns the name of the library directory in which standard Tcl
scripts are stored.
This is actually the value of the <B>tcl_library</B>
variable and may be changed by setting <B>tcl_library</B>.
See the <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B> manual entry for more information.
<P><DT><A NAME="M16"><B>info loaded </B>?<I>interp</I>?</A><DD>
Returns a list describing all of the packages that have been loaded into
<I>interp</I> with the <B><A HREF="../TkCmd/load.htm">load</A></B> command.
Each list element is a sub-list with two elements consisting of the
name of the file from which the package was loaded and the name of
the package.
For statically-loaded packages the file name will be an empty string.
If <I>interp</I> is omitted then information is returned for all packages
loaded in any interpreter in the process.
To get a list of just the packages in the current interpreter, specify
an empty string for the <I>interp</I> argument.
<P><DT><A NAME="M17"><B>info locals </B>?<I>pattern</I>?</A><DD>
If <I>pattern</I> isn't specified, returns a list of all the names
of currently-defined local variables, including arguments to the
current procedure, if any.
Variables defined with the <B><A HREF="../TkCmd/global.htm">global</A></B> and <B><A HREF="../TkCmd/upvar.htm">upvar</A></B> commands
will not be returned.
If <I>pattern</I> is specified, only those names matching <I>pattern</I>
are returned. Matching is determined using the same rules as for
<B><A HREF="../TkCmd/string.htm">string match</A></B>.
<P><DT><A NAME="M18"><B>info nameofexecutable</B></A><DD>
Returns the full path name of the binary file from which the application
was invoked. If Tcl was unable to identify the file, then an empty
string is returned.
<P><DT><A NAME="M19"><B>info patchlevel</B></A><DD>
Returns the value of the global variable <B>tcl_patchLevel</B>; see
the <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B> manual entry for more information.
<P><DT><A NAME="M20"><B>info procs </B>?<I>pattern</I>?</A><DD>
If <I>pattern</I> isn't specified, returns a list of all the
names of Tcl command procedures in the current namespace.
If <I>pattern</I> is specified,
only those procedure names in the current namespace
matching <I>pattern</I> are returned.
Matching is determined using the same rules as for
<B><A HREF="../TkCmd/string.htm">string match</A></B>.
<P><DT><A NAME="M21"><B>info script</B></A><DD>
If a Tcl script file is currently being evaluated (i.e. there is a
call to <B><A HREF="../TkLib/Eval.htm">Tcl_EvalFile</A></B> active or there is an active invocation
of the <B><A HREF="../TkCmd/source.htm">source</A></B> command), then this command returns the name
of the innermost file being processed. Otherwise the command returns an
empty string.
<P><DT><A NAME="M22"><B>info sharedlibextension</B></A><DD>
Returns the extension used on this platform for the names of files
containing shared libraries (for example, <B>.so</B> under Solaris).
If shared libraries aren't supported on this platform then an empty
string is returned.
<P><DT><A NAME="M23"><B>info tclversion</B></A><DD>
Returns the value of the global variable <B>tcl_version</B>; see
the <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B> manual entry for more information.
<P><DT><A NAME="M24"><B>info vars</B> ?<I>pattern</I>?</A><DD>
If <I>pattern</I> isn't specified,
returns a list of all the names of currently-visible variables.
This includes locals and currently-visible globals.
If <I>pattern</I> is specified, only those names matching <I>pattern</I>
are returned. Matching is determined using the same rules as for
<B><A HREF="../TkCmd/string.htm">string match</A></B>.
<I>pattern</I> can be a qualified name like <B>Foo::option*</B>.
That is, it may specify a particular namespace
using a sequence of namespace names separated by <B>::</B>s,
and may have pattern matching special characters
at the end to specify a set of variables in that namespace.
If <I>pattern</I> is a qualified name,
the resulting list of variable names
has each matching namespace variable qualified with the name
of its namespace.
<P></DL>
<H3><A NAME="M25">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#command">command</A>, <A href="../Keywords/I.htm#information">information</A>, <A href="../Keywords/I.htm#interpreter">interpreter</A>, <A href="../Keywords/L.htm#level">level</A>, <A href="../Keywords/N.htm#namespace">namespace</A>, <A href="../Keywords/P.htm#procedure">procedure</A>, <A href="../Keywords/V.htm#variable">variable</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1997 Bell Labs Innovations for Lucent Technologies
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,528 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - interp manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="interp.htm#M2" NAME="L563">NAME</A>
<DL><DD>interp - Create and manipulate Tcl interpreters</DL>
<DD><A HREF="interp.htm#M3" NAME="L564">SYNOPSIS</A>
<DL>
<DD><B>interp </B><I>option </I>?<I>arg arg ...</I>?
</DL>
<DD><A HREF="interp.htm#M4" NAME="L565">DESCRIPTION</A>
<DD><A HREF="interp.htm#M5" NAME="L566">THE INTERP COMMAND</A>
<DL>
<DD><A HREF="interp.htm#M6" NAME="L567"><B>interp</B> <B>alias</B> <I>srcPath</I> <I>srcCmd</I></A>
<DD><A HREF="interp.htm#M7" NAME="L568"><B>interp</B> <B>alias</B> <I>srcPath</I> <I>srcCmd</I> <B>{}</B></A>
<DD><A HREF="interp.htm#M8" NAME="L569"><B>interp</B> <B>alias</B> <I>srcPath</I> <I>srcCmd</I> <I>targetPath</I> <I>targetCmd </I>?<I>arg arg ...</I>?</A>
<DD><A HREF="interp.htm#M9" NAME="L570"><B>interp</B> <B>aliases </B>?<I>path</I>?</A>
<DD><A HREF="interp.htm#M10" NAME="L571"><B>interp</B> <B>create </B>?<B>-safe</B>? ?<B>-&nbsp;-</B>? ?<I>path</I>?</A>
<DD><A HREF="interp.htm#M11" NAME="L572"><B>interp</B> <B>delete </B>?<I>path ...?</I></A>
<DD><A HREF="interp.htm#M12" NAME="L573"><B>interp</B> <B>eval</B> <I>path arg </I>?<I>arg ...</I>?</A>
<DD><A HREF="interp.htm#M13" NAME="L574"><B>interp exists </B><I>path</I></A>
<DD><A HREF="interp.htm#M14" NAME="L575"><B>interp expose </B><I>path</I> <I>hiddenName</I> ?<I>exposedCmdName</I>?</A>
<DD><A HREF="interp.htm#M15" NAME="L576"><B>interp</B> <B>hide</B> <I>path</I> <I>exposedCmdName</I> ?<I>hiddenCmdName</I>?</A>
<DD><A HREF="interp.htm#M16" NAME="L577"><B>interp</B> <B>hidden</B> <I>path</I></A>
<DD><A HREF="interp.htm#M17" NAME="L578"><B>interp</B> <B>invokehidden</B> <I>path</I> ?<B>-global</B>? <I>hiddenCmdName</I> ?<I>arg ...</I>?</A>
<DD><A HREF="interp.htm#M18" NAME="L579"><B>interp issafe</B> ?<I>path</I>?</A>
<DD><A HREF="interp.htm#M19" NAME="L580"><B>interp marktrusted</B> <I>path</I></A>
<DD><A HREF="interp.htm#M20" NAME="L581"><B>interp</B> <B>share</B> <I>srcPath channelId destPath</I></A>
<DD><A HREF="interp.htm#M21" NAME="L582"><B>interp</B> <B>slaves</B> ?<I>path</I>?</A>
<DD><A HREF="interp.htm#M22" NAME="L583"><B>interp</B> <B>target</B> <I>path alias</I></A>
<DD><A HREF="interp.htm#M23" NAME="L584"><B>interp</B> <B>transfer</B> <I>srcPath channelId destPath</I></A>
</DL>
<DD><A HREF="interp.htm#M24" NAME="L585">SLAVE COMMAND</A>
<DL>
<DD><A HREF="interp.htm#M25" NAME="L586"><I>slave </I><B>aliases</B></A>
<DD><A HREF="interp.htm#M26" NAME="L587"><I>slave </I><B>alias </B><I>srcCmd</I></A>
<DD><A HREF="interp.htm#M27" NAME="L588"><I>slave </I><B>alias </B><I>srcCmd </I><B>{}</B></A>
<DD><A HREF="interp.htm#M28" NAME="L589"><I>slave </I><B>alias </B><I>srcCmd targetCmd </I>?<I>arg ..</I>?</A>
<DD><A HREF="interp.htm#M29" NAME="L590"><I>slave </I><B>eval </B><I>arg </I>?<I>arg ..</I>?</A>
<DD><A HREF="interp.htm#M30" NAME="L591"><I>slave </I><B>expose </B><I>hiddenName </I>?<I>exposedCmdName</I>?</A>
<DD><A HREF="interp.htm#M31" NAME="L592"><I>slave </I><B>hide </B><I>exposedCmdName</I> ?<I>hiddenCmdName</I>?</A>
<DD><A HREF="interp.htm#M32" NAME="L593"><I>slave </I><B>hidden</B></A>
<DD><A HREF="interp.htm#M33" NAME="L594"><I>slave </I><B>invokehidden</B> ?<B>-global</B> <I>hiddenName </I>?<I>arg ..</I>?</A>
<DD><A HREF="interp.htm#M34" NAME="L595"><I>slave </I><B>issafe</B></A>
<DD><A HREF="interp.htm#M35" NAME="L596"><I>slave </I><B>marktrusted</B></A>
</DL>
<DD><A HREF="interp.htm#M36" NAME="L597">SAFE INTERPRETERS</A>
<DD><A HREF="interp.htm#M37" NAME="L598">ALIAS INVOCATION</A>
<DD><A HREF="interp.htm#M38" NAME="L599">HIDDEN COMMANDS</A>
<DD><A HREF="interp.htm#M39" NAME="L600">CREDITS</A>
<DD><A HREF="interp.htm#M40" NAME="L601">SEE ALSO</A>
<DD><A HREF="interp.htm#M41" NAME="L602">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
interp - Create and manipulate Tcl interpreters
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>interp </B><I>option </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command makes it possible to create one or more new Tcl
interpreters that co-exist with the creating interpreter in the
same application. The creating interpreter is called the <I>master</I>
and the new interpreter is called a <I>slave</I>.
A master can create any number of slaves, and each slave can
itself create additional slaves for which it is master, resulting
in a hierarchy of interpreters.
<P>
Each interpreter is independent from the others: it has its own name
space for commands, procedures, and global variables.
A master interpreter may create connections between its slaves and
itself using a mechanism called an <I>alias</I>. An <I>alias</I> is
a command in a slave interpreter which, when invoked, causes a
command to be invoked in its master interpreter or in another slave
interpreter. The only other connections between interpreters are
through environment variables (the <B>env</B> variable), which are
normally shared among all interpreters in the application. Note that the
name space for files (such as the names returned by the <B><A HREF="../TkCmd/open.htm">open</A></B> command)
is no longer shared between interpreters. Explicit commands are provided to
share files and to transfer references to open files from one interpreter
to another.
<P>
The <B>interp</B> command also provides support for <I>safe</I>
interpreters. A safe interpreter is a slave whose functions have
been greatly restricted, so that it is safe to execute untrusted
scripts without fear of them damaging other interpreters or the
application's environment. For example, all IO channel creation
commands and subprocess creation commands are made inaccessible to safe
interpreters.
See SAFE INTERPRETERS below for more information on
what features are present in a safe interpreter.
The dangerous functionality is not removed from the safe interpreter;
instead, it is <I>hidden</I>, so that only trusted interpreters can obtain
access to it. For a detailed explanation of hidden commands, see
HIDDEN COMMANDS, below.
The alias mechanism can be used for protected communication (analogous to a
kernel call) between a slave interpreter and its master. See ALIAS
INVOCATION, below, for more details on how the alias mechanism works.
<P>
A qualified interpreter name is a proper Tcl lists containing a subset of its
ancestors in the interpreter hierarchy, terminated by the string naming the
interpreter in its immediate master. Interpreter names are relative to the
interpreter in which they are used. For example, if <B>a</B> is a slave of
the current interpreter and it has a slave <B>a1</B>, which in turn has a
slave <B>a11</B>, the qualified name of <B>a11</B> in <B>a</B> is the list
<B>a1 a11</B>.
<P>
The <B>interp</B> command, described below, accepts qualified interpreter
names as arguments; the interpreter in which the command is being evaluated
can always be referred to as <B>{}</B> (the empty list or string). Note that
it is impossible to refer to a master (ancestor) interpreter by name in a
slave interpreter except through aliases. Also, there is no global name by
which one can refer to the first interpreter created in an application.
Both restrictions are motivated by safety concerns.
<H3><A NAME="M5">THE INTERP COMMAND</A></H3>
The <B>interp</B> command is used to create, delete, and manipulate
slave interpreters, and to share or transfer
channels between interpreters. It can have any of several forms, depending
on the <I>option</I> argument:
<P>
<DL>
<P><DT><A NAME="M6"><B>interp</B> <B>alias</B> <I>srcPath</I> <I>srcCmd</I></A><DD>
Returns a Tcl list whose elements are the <I>targetCmd</I> and
<I>arg</I>s associated with the alias named <I>srcCmd</I>
(all of these are the values specified when the alias was
created; it is possible that the actual source command in the
slave is different from <I>srcCmd</I> if it was renamed).
<P><DT><A NAME="M7"><B>interp</B> <B>alias</B> <I>srcPath</I> <I>srcCmd</I> <B>{}</B></A><DD>
Deletes the alias for <I>srcCmd</I> in the slave interpreter identified by
<I>srcPath</I>.
<I>srcCmd</I> refers to the name under which the alias
was created; if the source command has been renamed, the renamed
command will be deleted.
<P><DT><A NAME="M8"><B>interp</B> <B>alias</B> <I>srcPath</I> <I>srcCmd</I> <I>targetPath</I> <I>targetCmd </I>?<I>arg arg ...</I>?</A><DD>
This command creates an alias between one slave and another (see the
<B>alias</B> slave command below for creating aliases between a slave
and its master). In this command, either of the slave interpreters
may be anywhere in the hierarchy of interpreters under the interpreter
invoking the command.
<I>SrcPath</I> and <I>srcCmd</I> identify the source of the alias.
<I>SrcPath</I> is a Tcl list whose elements select a particular
interpreter. For example, ``<B>a b</B>'' identifies an interpreter
<B>b</B>, which is a slave of interpreter <B>a</B>, which is a slave
of the invoking interpreter. An empty list specifies the interpreter
invoking the command. <I>srcCmd</I> gives the name of a new
command, which will be created in the source interpreter.
<I>TargetPath</I> and <I>targetCmd</I> specify a target interpreter
and command, and the <I>arg</I> arguments, if any, specify additional
arguments to <I>targetCmd</I> which are prepended to any arguments specified
in the invocation of <I>srcCmd</I>.
<I>TargetCmd</I> may be undefined at the time of this call, or it may
already exist; it is not created by this command.
The alias arranges for the given target command to be invoked
in the target interpreter whenever the given source command is
invoked in the source interpreter. See ALIAS INVOCATION below for
more details.
<P><DT><A NAME="M9"><B>interp</B> <B>aliases </B>?<I>path</I>?</A><DD>
This command returns a Tcl list of the names of all the source commands for
aliases defined in the interpreter identified by <I>path</I>.
<P><DT><A NAME="M10"><B>interp</B> <B>create </B>?<B>-safe</B>? ?<B>-&nbsp;-</B>? ?<I>path</I>?</A><DD>
Creates a slave interpreter identified by <I>path</I> and a new command,
called a <I>slave command</I>. The name of the slave command is the last
component of <I>path</I>. The new slave interpreter and the slave command
are created in the interpreter identified by the path obtained by removing
the last component from <I>path</I>. For example, if <I>path is </I><B>a b
c</B> then a new slave interpreter and slave command named <B>c</B> are
created in the interpreter identified by the path <B>a b</B>.
The slave command may be used to manipulate the new interpreter as
described below. If <I>path</I> is omitted, Tcl creates a unique name of the
form <B>interp</B><I>x</I>, where <I>x</I> is an integer, and uses it for the
interpreter and the slave command. If the <B>-safe</B> switch is specified
(or if the master interpreter is a safe interpreter), the new slave
interpreter will be created as a safe interpreter with limited
functionality; otherwise the slave will include the full set of Tcl
built-in commands and variables. The <B>-&nbsp;-</B> switch can be used to
mark the end of switches; it may be needed if <I>path</I> is an unusual
value such as <B>-safe</B>. The result of the command is the name of the
new interpreter. The name of a slave interpreter must be unique among all
the slaves for its master; an error occurs if a slave interpreter by the
given name already exists in this master.
<P><DT><A NAME="M11"><B>interp</B> <B>delete </B>?<I>path ...?</I></A><DD>
Deletes zero or more interpreters given by the optional <I>path</I>
arguments, and for each interpreter, it also deletes its slaves. The
command also deletes the slave command for each interpreter deleted.
For each <I>path</I> argument, if no interpreter by that name
exists, the command raises an error.
<P><DT><A NAME="M12"><B>interp</B> <B>eval</B> <I>path arg </I>?<I>arg ...</I>?</A><DD>
This command concatenates all of the <I>arg</I> arguments in the same
fashion as the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command, then evaluates the resulting string as
a Tcl script in the slave interpreter identified by <I>path</I>. The result
of this evaluation (including error information such as the <B>errorInfo</B>
and <B>errorCode</B> variables, if an error occurs) is returned to the
invoking interpreter.
<P><DT><A NAME="M13"><B>interp exists </B><I>path</I></A><DD>
Returns <B>1</B> if a slave interpreter by the specified <I>path</I>
exists in this master, <B>0</B> otherwise. If <I>path</I> is omitted, the
invoking interpreter is used.
<P><DT><A NAME="M14"><B>interp expose </B><I>path</I> <I>hiddenName</I> ?<I>exposedCmdName</I>?</A><DD>
Makes the hidden command <I>hiddenName</I> exposed, eventually bringing
it back under a new <I>exposedCmdName</I> name (this name is currently
accepted only if it is a valid global name space name without any ::),
in the interpreter
denoted by <I>path</I>.
If an exposed command with the targetted name already exists, this command
fails.
Hidden commands are explained in more detail in HIDDEN COMMANDS, below.
<P><DT><A NAME="M15"><B>interp</B> <B>hide</B> <I>path</I> <I>exposedCmdName</I> ?<I>hiddenCmdName</I>?</A><DD>
Makes the exposed command <I>exposedCmdName</I> hidden, renaming
it to the hidden command <I>hiddenCmdName</I>, or keeping the same name if
<I>hiddenCmdName</I> is not given, in the interpreter denoted
by <I>path</I>.
If a hidden command with the targetted name already exists, this command
fails.
Currently both <I>exposedCmdName</I> and <I>hiddenCmdName</I> can
not contain namespace qualifiers, or an error is raised.
Commands to be hidden by <B>interp hide</B> are looked up in the global
namespace even if the current namespace is not the global one. This
prevents slaves from fooling a master interpreter into hiding the wrong
command, by making the current namespace be different from the global one.
Hidden commands are explained in more detail in HIDDEN COMMANDS, below.
<P><DT><A NAME="M16"><B>interp</B> <B>hidden</B> <I>path</I></A><DD>
Returns a list of the names of all hidden commands in the interpreter
identified by <I>path</I>.
<P><DT><A NAME="M17"><B>interp</B> <B>invokehidden</B> <I>path</I> ?<B>-global</B>? <I>hiddenCmdName</I> ?<I>arg ...</I>?</A><DD>
Invokes the hidden command <I>hiddenCmdName</I> with the arguments supplied
in the interpreter denoted by <I>path</I>. No substitutions or evaluation
are applied to the arguments.
If the <B>-global</B> flag is present, the hidden command is invoked at the
global level in the target interpreter; otherwise it is invoked at the
current call frame and can access local variables in that and outer call
frames.
Hidden commands are explained in more detail in HIDDEN COMMANDS, below.
<P><DT><A NAME="M18"><B>interp issafe</B> ?<I>path</I>?</A><DD>
Returns <B>1</B> if the interpreter identified by the specified <I>path</I>
is safe, <B>0</B> otherwise.
<P><DT><A NAME="M19"><B>interp marktrusted</B> <I>path</I></A><DD>
Marks the interpreter identified by <I>path</I> as trusted. Does
not expose the hidden commands. This command can only be invoked from a
trusted interpreter.
The command has no effect if the interpreter identified by <I>path</I> is
already trusted.
<P><DT><A NAME="M20"><B>interp</B> <B>share</B> <I>srcPath channelId destPath</I></A><DD>
Causes the IO channel identified by <I>channelId</I> to become shared
between the interpreter identified by <I>srcPath</I> and the interpreter
identified by <I>destPath</I>. Both interpreters have the same permissions
on the IO channel.
Both interpreters must close it to close the underlying IO channel; IO
channels accessible in an interpreter are automatically closed when an
interpreter is destroyed.
<P><DT><A NAME="M21"><B>interp</B> <B>slaves</B> ?<I>path</I>?</A><DD>
Returns a Tcl list of the names of all the slave interpreters associated
with the interpreter identified by <I>path</I>. If <I>path</I> is omitted,
the invoking interpreter is used.
<P><DT><A NAME="M22"><B>interp</B> <B>target</B> <I>path alias</I></A><DD>
Returns a Tcl list describing the target interpreter for an alias. The
alias is specified with an interpreter path and source command name, just
as in <B>interp alias</B> above. The name of the target interpreter is
returned as an interpreter path, relative to the invoking interpreter.
If the target interpreter for the alias is the invoking interpreter then an
empty list is returned. If the target interpreter for the alias is not the
invoking interpreter or one of its descendants then an error is generated.
The target command does not have to be defined at the time of this invocation.
<P><DT><A NAME="M23"><B>interp</B> <B>transfer</B> <I>srcPath channelId destPath</I></A><DD>
Causes the IO channel identified by <I>channelId</I> to become available in
the interpreter identified by <I>destPath</I> and unavailable in the
interpreter identified by <I>srcPath</I>.
<P></DL>
<H3><A NAME="M24">SLAVE COMMAND</A></H3>
For each slave interpreter created with the <B>interp</B> command, a
new Tcl command is created in the master interpreter with the same
name as the new interpreter. This command may be used to invoke
various operations on the interpreter. It has the following
general form:
<PRE><I>slave command </I>?<I>arg arg ...</I>?</PRE>
<I>Slave</I> is the name of the interpreter, and <I>command</I>
and the <I>arg</I>s determine the exact behavior of the command.
The valid forms of this command are:
<P>
<DL>
<P><DT><A NAME="M25"><I>slave </I><B>aliases</B></A><DD>
Returns a Tcl list whose elements are the names of all the
aliases in <I>slave</I>. The names returned are the <I>srcCmd</I>
values used when the aliases were created (which may not be the same
as the current names of the commands, if they have been
renamed).
<P><DT><A NAME="M26"><I>slave </I><B>alias </B><I>srcCmd</I></A><DD>
Returns a Tcl list whose elements are the <I>targetCmd</I> and
<I>arg</I>s associated with the alias named <I>srcCmd</I>
(all of these are the values specified when the alias was
created; it is possible that the actual source command in the
slave is different from <I>srcCmd</I> if it was renamed).
<P><DT><A NAME="M27"><I>slave </I><B>alias </B><I>srcCmd </I><B>{}</B></A><DD>
Deletes the alias for <I>srcCmd</I> in the slave interpreter.
<I>srcCmd</I> refers to the name under which the alias
was created; if the source command has been renamed, the renamed
command will be deleted.
<P><DT><A NAME="M28"><I>slave </I><B>alias </B><I>srcCmd targetCmd </I>?<I>arg ..</I>?</A><DD>
Creates an alias such that whenever <I>srcCmd</I> is invoked
in <I>slave</I>, <I>targetCmd</I> is invoked in the master.
The <I>arg</I> arguments will be passed to <I>targetCmd</I> as additional
arguments, prepended before any arguments passed in the invocation of
<I>srcCmd</I>.
See ALIAS INVOCATION below for details.
<P><DT><A NAME="M29"><I>slave </I><B>eval </B><I>arg </I>?<I>arg ..</I>?</A><DD>
This command concatenates all of the <I>arg</I> arguments in
the same fashion as the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command, then evaluates
the resulting string as a Tcl script in <I>slave</I>.
The result of this evaluation (including error information
such as the <B>errorInfo</B> and <B>errorCode</B> variables, if an
error occurs) is returned to the invoking interpreter.
<P><DT><A NAME="M30"><I>slave </I><B>expose </B><I>hiddenName </I>?<I>exposedCmdName</I>?</A><DD>
This command exposes the hidden command <I>hiddenName</I>, eventually bringing
it back under a new <I>exposedCmdName</I> name (this name is currently
accepted only if it is a valid global name space name without any ::),
in <I>slave</I>.
If an exposed command with the targetted name already exists, this command
fails.
For more details on hidden commands, see HIDDEN COMMANDS, below.
<P><DT><A NAME="M31"><I>slave </I><B>hide </B><I>exposedCmdName</I> ?<I>hiddenCmdName</I>?</A><DD>
This command hides the exposed command <I>exposedCmdName</I>, renaming it to
the hidden command <I>hiddenCmdName</I>, or keeping the same name if the
the argument is not given, in the <I>slave</I> interpreter.
If a hidden command with the targetted name already exists, this command
fails.
Currently both <I>exposedCmdName</I> and <I>hiddenCmdName</I> can
not contain namespace qualifiers, or an error is raised.
Commands to be hidden are looked up in the global
namespace even if the current namespace is not the global one. This
prevents slaves from fooling a master interpreter into hiding the wrong
command, by making the current namespace be different from the global one.
For more details on hidden commands, see HIDDEN COMMANDS, below.
<P><DT><A NAME="M32"><I>slave </I><B>hidden</B></A><DD>
Returns a list of the names of all hidden commands in <I>slave</I>.
<P><DT><A NAME="M33"><I>slave </I><B>invokehidden</B> ?<B>-global</B> <I>hiddenName </I>?<I>arg ..</I>?</A><DD>
This command invokes the hidden command <I>hiddenName</I> with the
supplied arguments, in <I>slave</I>. No substitutions or evaluations are
applied to the arguments.
If the <B>-global</B> flag is given, the command is invoked at the global
level in the slave; otherwise it is invoked at the current call frame and
can access local variables in that or outer call frames.
For more details on hidden commands, see HIDDEN
COMMANDS, below.
<P><DT><A NAME="M34"><I>slave </I><B>issafe</B></A><DD>
Returns <B>1</B> if the slave interpreter is safe, <B>0</B> otherwise.
<P><DT><A NAME="M35"><I>slave </I><B>marktrusted</B></A><DD>
Marks the slave interpreter as trusted. Can only be invoked by a
trusted interpreter. This command does not expose any hidden
commands in the slave interpreter. The command has no effect if the slave
is already trusted.
<P></DL>
<H3><A NAME="M36">SAFE INTERPRETERS</A></H3>
A safe interpreter is one with restricted functionality, so that
is safe to execute an arbitrary script from your worst enemy without
fear of that script damaging the enclosing application or the rest
of your computing environment. In order to make an interpreter
safe, certain commands and variables are removed from the interpreter.
For example, commands to create files on disk are removed, and the
<B><A HREF="../TkCmd/exec.htm">exec</A></B> command is removed, since it could be used to cause damage
through subprocesses.
Limited access to these facilities can be provided, by creating
aliases to the master interpreter which check their arguments carefully
and provide restricted access to a safe subset of facilities.
For example, file creation might be allowed in a particular subdirectory
and subprocess invocation might be allowed for a carefully selected and
fixed set of programs.
<P>
A safe interpreter is created by specifying the <B>-safe</B> switch
to the <B>interp create</B> command. Furthermore, any slave created
by a safe interpreter will also be safe.
<P>
A safe interpreter is created with exactly the following set of
built-in commands:
<PRE><B>after append array binary
break case catch clock
close concat continue eof
error eval expr fblocked
fcopy fileevent flush for
foreach format gets global
history if incr info
interp join lappend lindex
linsert list llength lrange
lreplace lsearch lsort namespace
package pid proc puts
read regexp regsub rename
return scan seek set
split string subst switch
tell trace unset update
uplevel upvar variable vwait
while</B></PRE>
The following commands are hidden by <B>interp create</B> when it
creates a safe interpreter:
<PRE><B>cd exec exit fconfigure
file glob load open
pwd socket source vwait</B></PRE>
These commands can be recreated later as Tcl procedures or aliases, or
re-exposed by <B>interp expose</B>.
<P>
In addition, the <B>env</B> variable is not present in a safe interpreter,
so it cannot share environment variables with other interpreters. The
<B>env</B> variable poses a security risk, because users can store
sensitive information in an environment variable. For example, the PGP
manual recommends storing the PGP private key protection password in
the environment variable <I>PGPPASS</I>. Making this variable available
to untrusted code executing in a safe interpreter would incur a
security risk.
<P>
If extensions are loaded into a safe interpreter, they may also restrict
their own functionality to eliminate unsafe commands. For a discussion of
management of extensions for safety see the manual entries for
<B>Safe-Tcl</B> and the <B><A HREF="../TkCmd/load.htm">load</A></B> Tcl command.
<H3><A NAME="M37">ALIAS INVOCATION</A></H3>
The alias mechanism has been carefully designed so that it can
be used safely when an untrusted script is executing
in a safe slave and the target of the alias is a trusted
master. The most important thing in guaranteeing safety is to
ensure that information passed from the slave to the master is
never evaluated or substituted in the master; if this were to
occur, it would enable an evil script in the slave to invoke
arbitrary functions in the master, which would compromise security.
<P>
When the source for an alias is invoked in the slave interpreter, the
usual Tcl substitutions are performed when parsing that command.
These substitutions are carried out in the source interpreter just
as they would be for any other command invoked in that interpreter.
The command procedure for the source command takes its arguments
and merges them with the <I>targetCmd</I> and <I>arg</I>s for the
alias to create a new array of arguments. If the words
of <I>srcCmd</I> were ``<I>srcCmd arg1 arg2 ... argN</I>'',
the new set of words will be
``<I>targetCmd arg arg ... arg arg1 arg2 ... argN</I>'',
where <I>targetCmd</I> and <I>arg</I>s are the values supplied when the
alias was created. <I>TargetCmd</I> is then used to locate a command
procedure in the target interpreter, and that command procedure
is invoked with the new set of arguments. An error occurs if
there is no command named <I>targetCmd</I> in the target interpreter.
No additional substitutions are performed on the words: the
target command procedure is invoked directly, without
going through the normal Tcl evaluation mechanism.
Substitutions are thus performed on each word exactly once:
<I>targetCmd</I> and <I>args</I> were substituted when parsing the command
that created the alias, and <I>arg1 - argN</I> are substituted when
the alias's source command is parsed in the source interpreter.
<P>
When writing the <I>targetCmd</I>s for aliases in safe interpreters,
it is very important that the arguments to that command never be
evaluated or substituted, since this would provide an escape
mechanism whereby the slave interpreter could execute arbitrary
code in the master. This in turn would compromise the security
of the system.
<H3><A NAME="M38">HIDDEN COMMANDS</A></H3>
Safe interpreters greatly restrict the functionality available to Tcl
programs executing within them.
Allowing the untrusted Tcl program to have direct access to this
functionality is unsafe, because it can be used for a variety of
attacks on the environment.
However, there are times when there is a legitimate need to use the
dangerous functionality in the context of the safe interpreter. For
example, sometimes a program must be <B><A HREF="../TkCmd/source.htm">source</A></B>d into the interpreter.
Another example is Tk, where windows are bound to the hierarchy of windows
for a specific interpreter; some potentially dangerous functions, e.g.
window management, must be performed on these windows within the
interpreter context.
<P>
The <B>interp</B> command provides a solution to this problem in the form of
<I>hidden commands</I>. Instead of removing the dangerous commands entirely
from a safe interpreter, these commands are hidden so they become
unavailable to Tcl scripts executing in the interpreter. However, such
hidden commands can be invoked by any trusted ancestor of the safe
interpreter, in the context of the safe interpreter, using <B>interp
invoke</B>. Hidden commands and exposed commands reside in separate name
spaces. It is possible to define a hidden command and an exposed command by
the same name within one interpreter.
<P>
Hidden commands in a slave interpreter can be invoked in the body of
procedures called in the master during alias invocation. For example, an
alias for <B><A HREF="../TkCmd/source.htm">source</A></B> could be created in a slave interpreter. When it is
invoked in the slave interpreter, a procedure is called in the master
interpreter to check that the operation is allowable (e.g. it asks to
source a file that the slave interpreter is allowed to access). The
procedure then it invokes the hidden <B><A HREF="../TkCmd/source.htm">source</A></B> command in the slave
interpreter to actually source in the contents of the file. Note that two
commands named <B><A HREF="../TkCmd/source.htm">source</A></B> exist in the slave interpreter: the alias, and
the hidden command.
<P>
Because a master interpreter may invoke a hidden command as part of
handling an alias invocation, great care must be taken to avoid evaluating
any arguments passed in through the alias invocation.
Otherwise, malicious slave interpreters could cause a trusted master
interpreter to execute dangerous commands on their behalf. See the section
on ALIAS INVOCATION for a more complete discussion of this topic.
To help avoid this problem, no substitutions or evaluations are
applied to arguments of <B>interp invokehidden</B>.
<P>
Safe interpreters are not allowed to invoke hidden commands in themselves
or in their descendants. This prevents safe slaves from gaining access to
hidden functionality in themselves or their descendants.
<P>
The set of hidden commands in an interpreter can be manipulated by a trusted
interpreter using <B>interp expose</B> and <B>interp hide</B>. The <B>interp
expose</B> command moves a hidden command to the
set of exposed commands in the interpreter identified by <I>path</I>,
potentially renaming the command in the process. If an exposed command by
the targetted name already exists, the operation fails. Similarly,
<B>interp hide</B> moves an exposed command to the set of hidden commands in
that interpreter. Safe interpreters are not allowed to move commands
between the set of hidden and exposed commands, in either themselves or
their descendants.
<P>
Currently, the names of hidden commands cannot contain namespace
qualifiers, and you must first rename a command in a namespace to the
global namespace before you can hide it.
Commands to be hidden by <B>interp hide</B> are looked up in the global
namespace even if the current namespace is not the global one. This
prevents slaves from fooling a master interpreter into hiding the wrong
command, by making the current namespace be different from the global one.
<H3><A NAME="M39">CREDITS</A></H3>
This mechanism is based on the Safe-Tcl prototype implemented
by Nathaniel Borenstein and Marshall Rose.
<H3><A NAME="M40">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/load.htm">load</A></B>, <B>safe</B>, <B><A HREF="../TkLib/CrtSlave.htm">Tcl_CreateSlave</A></B>
<H3><A NAME="M41">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#alias">alias</A>, <A href="../Keywords/M.htm#master interpreter">master interpreter</A>, <A href="../Keywords/S.htm#safe interpreter">safe interpreter</A>, <A href="../Keywords/S.htm#slave interpreter">slave interpreter</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,21 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - join manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
join - Create a string by joining together list elements
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>join </B><I>list </I>?<I>joinString</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <I>list</I> argument must be a valid Tcl list.
This command returns the string
formed by joining all of the elements of <I>list</I> together with
<I>joinString</I> separating each adjacent pair of elements.
The <I>joinString</I> argument defaults to a space character.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/lappend.htm">lappend</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/J.htm#join">join</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/S.htm#separator">separator</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,27 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - lappend manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
lappend - Append list elements onto a variable
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>lappend </B><I>varName </I>?<I>value value value ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command treats the variable given by <I>varName</I> as a list
and appends each of the <I>value</I> arguments to that list as a separate
element, with spaces between elements.
If <I>varName</I> doesn't exist, it is created as a list with elements
given by the <I>value</I> arguments.
<B>Lappend</B> is similar to <B><A HREF="../TkCmd/append.htm">append</A></B> except that the <I>value</I>s
are appended as list elements rather than raw text.
This command provides a relatively efficient way to build up
large lists. For example, ``<B>lappend a $b</B>'' is much
more efficient than ``<B>set a [concat $a [list $b]]</B>'' when
<B>$a</B> is long.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/lindex.htm">lindex</A></B>, <B><A HREF="../TkCmd/linsert.htm">linsert</A></B>, <B><A HREF="../TkCmd/llength.htm">llength</A></B>, <B><A HREF="../TkCmd/lsort.htm">lsort</A></B>, <B><A HREF="../TkCmd/lrange.htm">lrange</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#append">append</A>, <A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/V.htm#variable">variable</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,320 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - library manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="library.htm#M2" NAME="L613">NAME</A>
<DL><DD>auto_execok, auto_import, auto_load, auto_mkindex, auto_mkindex_old, auto_qualify, auto_reset, tcl_findLibrary, parray, tcl_endOfWord, tcl_startOfNextWord, tcl_startOfPreviousWord, tcl_wordBreakAfter, tcl_wordBreakBefore - standard library of Tcl procedures</DL>
<DD><A HREF="library.htm#M3" NAME="L614">SYNOPSIS</A>
<DL>
<DD><B>auto_execok </B><I>cmd</I>
<DD><B>auto_import </B><I>pattern</I>
<DD><B>auto_load </B><I>cmd</I>
<DD><B>auto_mkindex </B><I>dir pattern pattern ...</I>
<DD><B>auto_mkindex_old </B><I>dir pattern pattern ...</I>
<DD><B>auto_qualify </B><I>command namespace</I>
<DD><B>auto_reset</B>
<DD><B>tcl_findLibrary </B><I>basename version patch initScript enVarName varName</I>
<DD><B>parray </B><I>arrayName</I>
<DD><B>tcl_endOfWord </B><I>str start</I>
<DD><B>tcl_startOfNextWord </B><I>str start</I>
<DD><B>tcl_startOfPreviousWord </B><I>str start</I>
<DD><B>tcl_wordBreakAfter </B><I>str start</I>
<DD><B>tcl_wordBreakBefore </B><I>str start</I>
</DL>
<DD><A HREF="library.htm#M4" NAME="L615">INTRODUCTION</A>
<DD><A HREF="library.htm#M5" NAME="L616">COMMAND PROCEDURES</A>
<DL>
<DD><A HREF="library.htm#M6" NAME="L617"><B>auto_execok </B><I>cmd</I></A>
<DD><A HREF="library.htm#M7" NAME="L618"><B>auto_import </B><I>pattern</I></A>
<DD><A HREF="library.htm#M8" NAME="L619"><B>auto_load </B><I>cmd</I></A>
<DD><A HREF="library.htm#M9" NAME="L620"><B>auto_mkindex </B><I>dir pattern pattern ...</I></A>
<DD><A HREF="library.htm#M10" NAME="L621"><B>auto_reset</B></A>
<DD><A HREF="library.htm#M11" NAME="L622"><B>auto_qualify </B><I>command namespace</I></A>
<DD><A HREF="library.htm#M12" NAME="L623"><B>tcl_findLibrary </B><I>basename version patch initScript enVarName varName</I></A>
<DD><A HREF="library.htm#M13" NAME="L624"><B>parray </B><I>arrayName</I></A>
<DD><A HREF="library.htm#M14" NAME="L625"><B>tcl_endOfWord </B><I>str start</I></A>
<DD><A HREF="library.htm#M15" NAME="L626"><B>tcl_startOfNextWord </B><I>str start</I></A>
<DD><A HREF="library.htm#M16" NAME="L627"><B>tcl_startOfPreviousWord </B><I>str start</I></A>
<DD><A HREF="library.htm#M17" NAME="L628"><B>tcl_wordBreakAfter </B><I>str start</I></A>
<DD><A HREF="library.htm#M18" NAME="L629"><B>tcl_wordBreakBefore </B><I>str start</I></A>
</DL>
<DD><A HREF="library.htm#M19" NAME="L630">VARIABLES</A>
<DL>
<DD><A HREF="library.htm#M20" NAME="L631"><B>auto_execs</B></A>
<DD><A HREF="library.htm#M21" NAME="L632"><B>auto_index</B></A>
<DD><A HREF="library.htm#M22" NAME="L633"><B>auto_noexec</B></A>
<DD><A HREF="library.htm#M23" NAME="L634"><B>auto_noload</B></A>
<DD><A HREF="library.htm#M24" NAME="L635"><B>auto_path</B></A>
<DD><A HREF="library.htm#M25" NAME="L636"><B>env(TCL_LIBRARY)</B></A>
<DD><A HREF="library.htm#M26" NAME="L637"><B>env(TCLLIBPATH)</B></A>
<DD><A HREF="library.htm#M27" NAME="L638"><B>tcl_nonwordchars</B></A>
<DD><A HREF="library.htm#M28" NAME="L639"><B>tcl_wordchars</B></A>
<DD><A HREF="library.htm#M29" NAME="L640"><B>unknown_pending</B></A>
</DL>
<DD><A HREF="library.htm#M30" NAME="L641">SEE ALSO</A>
<DD><A HREF="library.htm#M31" NAME="L642">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
auto_execok, auto_import, auto_load, auto_mkindex, auto_mkindex_old, auto_qualify, auto_reset, tcl_findLibrary, parray, tcl_endOfWord, tcl_startOfNextWord, tcl_startOfPreviousWord, tcl_wordBreakAfter, tcl_wordBreakBefore - standard library of Tcl procedures
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>auto_execok </B><I>cmd</I><BR>
<B>auto_import </B><I>pattern</I><BR>
<B>auto_load </B><I>cmd</I><BR>
<B>auto_mkindex </B><I>dir pattern pattern ...</I><BR>
<B>auto_mkindex_old </B><I>dir pattern pattern ...</I><BR>
<B>auto_qualify </B><I>command namespace</I><BR>
<B>auto_reset</B><BR>
<B>tcl_findLibrary </B><I>basename version patch initScript enVarName varName</I><BR>
<B>parray </B><I>arrayName</I><BR>
<B>tcl_endOfWord </B><I>str start</I><BR>
<B>tcl_startOfNextWord </B><I>str start</I><BR>
<B>tcl_startOfPreviousWord </B><I>str start</I><BR>
<B>tcl_wordBreakAfter </B><I>str start</I><BR>
<B>tcl_wordBreakBefore </B><I>str start</I><BR>
<H3><A NAME="M4">INTRODUCTION</A></H3>
Tcl includes a library of Tcl procedures for commonly-needed functions.
The procedures defined in the Tcl library are generic ones suitable
for use by many different applications.
The location of the Tcl library is returned by the <B><A HREF="../TkCmd/info.htm">info library</A></B>
command.
In addition to the Tcl library, each application will normally have
its own library of support procedures as well; the location of this
library is normally given by the value of the <B>$</B><I>app</I><B>_library</B>
global variable, where <I>app</I> is the name of the application.
For example, the location of the Tk library is kept in the variable
<B>$tk_library</B>.
<P>
To access the procedures in the Tcl library, an application should
source the file <B>init.tcl</B> in the library, for example with
the Tcl command
<PRE><B>source [file join [info library] init.tcl]</B></PRE>
If the library procedure <B><A HREF="../TkLib/Init.htm">Tcl_Init</A></B> is invoked from an application's
<B><A HREF="../TkLib/AppInit.htm">Tcl_AppInit</A></B> procedure, this happens automatically.
The code in <B>init.tcl</B> will define the <B><A HREF="../TkCmd/unknown.htm">unknown</A></B> procedure
and arrange for the other procedures to be loaded on-demand using
the auto-load mechanism defined below.
<H3><A NAME="M5">COMMAND PROCEDURES</A></H3>
The following procedures are provided in the Tcl library:
<P>
<DL>
<P><DT><A NAME="M6"><B>auto_execok </B><I>cmd</I></A><DD>
Determines whether there is an executable file or shell builtin
by the name <I>cmd</I>. If so, it returns a list of arguments to be
passed to <B><A HREF="../TkCmd/exec.htm">exec</A></B> to execute the executable file or shell builtin
named by <I>cmd</I>. If not, it returns an empty string. This command
examines the directories in the current search path (given by the PATH
environment variable) in its search for an executable file named
<I>cmd</I>. On Windows platforms, the search is expanded with the same
directories and file extensions as used by <B><A HREF="../TkCmd/exec.htm">exec</A></B>. <B>Auto_exec</B>
remembers information about previous searches in an array named
<B>auto_execs</B>; this avoids the path search in future calls for the
same <I>cmd</I>. The command <B>auto_reset</B> may be used to force
<B>auto_execok</B> to forget its cached information.
<P><DT><A NAME="M7"><B>auto_import </B><I>pattern</I></A><DD>
<B>Auto_import</B> is invoked during <B>namespace import</B> to see if
the imported commands specified by <I>pattern</I> reside in an
autoloaded library. If so, the commands are loaded so that they will
be available to the interpreter for creating the import links. If the
commands do not reside in an autoloaded library, <B>auto_import</B>
does nothing. The pattern matching is performed according to the
matching rules of <B>namespace import</B>.
<P><DT><A NAME="M8"><B>auto_load </B><I>cmd</I></A><DD>
This command attempts to load the definition for a Tcl command named
<I>cmd</I>. To do this, it searches an <I>auto-load path</I>, which is
a list of one or more directories. The auto-load path is given by the
global variable <B>$auto_path</B> if it exists. If there is no
<B>$auto_path</B> variable, then the TCLLIBPATH environment variable is
used, if it exists. Otherwise the auto-load path consists of just the
Tcl library directory. Within each directory in the auto-load path
there must be a file <B>tclIndex</B> that describes one or more
commands defined in that directory and a script to evaluate to load
each of the commands. The <B>tclIndex</B> file should be generated
with the <B>auto_mkindex</B> command. If <I>cmd</I> is found in an
index file, then the appropriate script is evaluated to create the
command. The <B>auto_load</B> command returns 1 if <I>cmd</I> was
successfully created. The command returns 0 if there was no index
entry for <I>cmd</I> or if the script didn't actually define <I>cmd</I>
(e.g. because index information is out of date). If an error occurs
while processing the script, then that error is returned.
<B>Auto_load</B> only reads the index information once and saves it in
the array <B>auto_index</B>; future calls to <B>auto_load</B> check for
<I>cmd</I> in the array rather than re-reading the index files. The
cached index information may be deleted with the command
<B>auto_reset</B>. This will force the next <B>auto_load</B> command to
reload the index database from disk.
<P><DT><A NAME="M9"><B>auto_mkindex </B><I>dir pattern pattern ...</I></A><DD>
Generates an index suitable for use by <B>auto_load</B>. The command
searches <I>dir</I> for all files whose names match any of the
<I>pattern</I> arguments (matching is done with the <B><A HREF="../TkCmd/glob.htm">glob</A></B>
command), generates an index of all the Tcl command procedures defined
in all the matching files, and stores the index information in a file
named <B>tclIndex</B> in <I>dir</I>. If no pattern is given a pattern of
<B>*.tcl</B> will be assumed. For example, the command
<PRE><B>auto_mkindex foo *.tcl</B></PRE>
<P>
will read all the <B>.tcl</B> files in subdirectory <B>foo</B> and
generate a new index file <B>foo/tclIndex</B>.
<P>
<B>Auto_mkindex</B> parses the Tcl scripts by sourcing them into a
slave interpreter and monitoring the proc and namespace commands that
are executed. Extensions can use the (undocumented)
auto_mkindex_parser package to register other commands that can
contribute to the auto_load index. You will have to read through
auto.tcl to see how this works.
<P><B>Auto_mkindex_old</B> parses the Tcl scripts in a relatively
unsophisticated way: if any line contains the word <B><A HREF="../TkCmd/proc.htm">proc</A></B>
as its first characters then it is assumed to be a procedure
definition and the next word of the line is taken as the
procedure's name.
Procedure definitions that don't appear in this way (e.g. they
have spaces before the <B><A HREF="../TkCmd/proc.htm">proc</A></B>) will not be indexed. If your
script contains &quot;dangerous&quot; code, such as global initialization
code or procedure names with special characters like <B>$</B>,
<B>*</B>, <B>[</B> or <B>]</B>, you are safer using auto_mkindex_old.
<P><DT><A NAME="M10"><B>auto_reset</B></A><DD>
Destroys all the information cached by <B>auto_execok</B> and
<B>auto_load</B>. This information will be re-read from disk the next
time it is needed. <B>Auto_reset</B> also deletes any procedures
listed in the auto-load index, so that fresh copies of them will be
loaded the next time that they're used.
<P><DT><A NAME="M11"><B>auto_qualify </B><I>command namespace</I></A><DD>
Computes a list of fully qualified names for <I>command</I>. This list
mirrors the path a standard Tcl interpreter follows for command
lookups: first it looks for the command in the current namespace, and
then in the global namespace. Accordingly, if <I>command</I> is
relative and <I>namespace</I> is not <B>::</B>, the list returned has
two elements: <I>command</I> scoped by <I>namespace</I>, as if it were
a command in the <I>namespace</I> namespace; and <I>command</I> as if it
were a command in the global namespace. Otherwise, if either
<I>command</I> is absolute (it begins with <B>::</B>), or
<I>namespace</I> is <B>::</B>, the list contains only <I>command</I> as
if it were a command in the global namespace.
<P>
<B>Auto_qualify</B> is used by the auto-loading facilities in Tcl, both
for producing auto-loading indexes such as <I>pkgIndex.tcl</I>, and for
performing the actual auto-loading of functions at runtime.
<P><DT><A NAME="M12"><B>tcl_findLibrary </B><I>basename version patch initScript enVarName varName</I></A><DD>
This is a standard search procedure for use by extensions during
their initialization. They call this procedure to look for their
script library in several standard directories.
The last component of the name of the library directory is
normally <I>basenameversion</I>
(e.g., tk8.0), but it might be &quot;library&quot; when in the build hierarchies.
The <I>initScript</I> file will be sourced into the interpreter
once it is found. The directory in which this file is found is
stored into the global variable <I>varName</I>.
If this variable is already defined (e.g., by C code during
application initialization) then no searching is done.
Otherwise the search looks in these directories:
the directory named by the environment variable <I>enVarName</I>;
relative to the Tcl library directory;
relative to the executable file in the standard installation
bin or bin/<I>arch</I> directory;
relative to the executable file in the current build tree;
relative to the executable file in a parallel build tree.
<P><DT><A NAME="M13"><B>parray </B><I>arrayName</I></A><DD>
Prints on standard output the names and values of all the elements
in the array <I>arrayName</I>.
<B>ArrayName</B> must be an array accessible to the caller of <B>parray</B>.
It may be either local or global.
<P><DT><A NAME="M14"><B>tcl_endOfWord </B><I>str start</I></A><DD>
Returns the index of the first end-of-word location that occurs after
a starting index <I>start</I> in the string <I>str</I>. An end-of-word
location is defined to be the first non-word character following the
first word character after the starting point. Returns -1 if there
are no more end-of-word locations after the starting point. See the
description of <B>tcl_wordchars</B> and <B>tcl_nonwordchars</B> below
for more details on how Tcl determines which characters are word
characters.
<P><DT><A NAME="M15"><B>tcl_startOfNextWord </B><I>str start</I></A><DD>
Returns the index of the first start-of-word location that occurs
after a starting index <I>start</I> in the string <I>str</I>. A
start-of-word location is defined to be the first word character
following a non-word character. Returns -1 if there are no more
start-of-word locations after the starting point.
<P><DT><A NAME="M16"><B>tcl_startOfPreviousWord </B><I>str start</I></A><DD>
Returns the index of the first start-of-word location that occurs
before a starting index <I>start</I> in the string <I>str</I>. Returns
-1 if there are no more start-of-word locations before the starting
point.
<P><DT><A NAME="M17"><B>tcl_wordBreakAfter </B><I>str start</I></A><DD>
Returns the index of the first word boundary after the starting index
<I>start</I> in the string <I>str</I>. Returns -1 if there are no more
boundaries after the starting point in the given string. The index
returned refers to the second character of the pair that comprises a
boundary.
<P><DT><A NAME="M18"><B>tcl_wordBreakBefore </B><I>str start</I></A><DD>
Returns the index of the first word boundary before the starting index
<I>start</I> in the string <I>str</I>. Returns -1 if there are no more
boundaries before the starting point in the given string. The index
returned refers to the second character of the pair that comprises a
boundary.
<P></DL>
<H3><A NAME="M19">VARIABLES</A></H3>
The following global variables are defined or used by the procedures in
the Tcl library:
<P>
<DL>
<P><DT><A NAME="M20"><B>auto_execs</B></A><DD>
Used by <B>auto_execok</B> to record information about whether
particular commands exist as executable files.
<P><DT><A NAME="M21"><B>auto_index</B></A><DD>
Used by <B>auto_load</B> to save the index information read from
disk.
<P><DT><A NAME="M22"><B>auto_noexec</B></A><DD>
If set to any value, then <B><A HREF="../TkCmd/unknown.htm">unknown</A></B> will not attempt to auto-exec
any commands.
<P><DT><A NAME="M23"><B>auto_noload</B></A><DD>
If set to any value, then <B><A HREF="../TkCmd/unknown.htm">unknown</A></B> will not attempt to auto-load
any commands.
<P><DT><A NAME="M24"><B>auto_path</B></A><DD>
If set, then it must contain a valid Tcl list giving directories to
search during auto-load operations.
This variable is initialized during startup to contain, in order:
the directories listed in the TCLLIBPATH environment variable,
the directory named by the $tcl_library variable,
the parent directory of $tcl_library,
the directories listed in the $tcl_pkgPath variable.
<P><DT><A NAME="M25"><B>env(TCL_LIBRARY)</B></A><DD>
If set, then it specifies the location of the directory containing
library scripts (the value of this variable will be
assigned to the <B>tcl_library</B> variable and therefore returned by
the command <B><A HREF="../TkCmd/info.htm">info library</A></B>). If this variable isn't set then
a default value is used.
<P><DT><A NAME="M26"><B>env(TCLLIBPATH)</B></A><DD>
If set, then it must contain a valid Tcl list giving directories to
search during auto-load operations. Directories must be specified in
Tcl format, using &quot;/&quot; as the path separator, regardless of platform.
This variable is only used when initializing the <B>auto_path</B> variable.
<P><DT><A NAME="M27"><B>tcl_nonwordchars</B></A><DD>
This variable contains a regular expression that is used by routines
like <B>tcl_endOfWord</B> to identify whether a character is part of a
word or not. If the pattern matches a character, the character is
considered to be a non-word character. On Windows platforms, spaces,
tabs, and newlines are considered non-word characters. Under Unix,
everything but numbers, letters and underscores are considered
non-word characters.
<P><DT><A NAME="M28"><B>tcl_wordchars</B></A><DD>
This variable contains a regular expression that is used by routines
like <B>tcl_endOfWord</B> to identify whether a character is part of a
word or not. If the pattern matches a character, the character is
considered to be a word character. On Windows platforms, words are
comprised of any character that is not a space, tab, or newline. Under
Unix, words are comprised of numbers, letters or underscores.
<P><DT><A NAME="M29"><B>unknown_pending</B></A><DD>
Used by <B><A HREF="../TkCmd/unknown.htm">unknown</A></B> to record the command(s) for which it is
searching.
It is used to detect errors where <B><A HREF="../TkCmd/unknown.htm">unknown</A></B> recurses on itself
infinitely.
The variable is unset before <B><A HREF="../TkCmd/unknown.htm">unknown</A></B> returns.
<P></DL>
<H3><A NAME="M30">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/info.htm">info</A></B>, <B><A HREF="../TkCmd/re_syntax.htm">re_syntax</A></B>
<H3><A NAME="M31">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#auto-exec">auto-exec</A>, <A href="../Keywords/A.htm#auto-load">auto-load</A>, <A href="../Keywords/L.htm#library">library</A>, <A href="../Keywords/U.htm#unknown">unknown</A>, <A href="../Keywords/W.htm#word">word</A>, <A href="../Keywords/W.htm#whitespace">whitespace</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1991-1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,28 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - lindex manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
lindex - Retrieve an element from a list
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>lindex </B><I>list index</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command treats <I>list</I> as a Tcl list and returns the
<I>index</I>'th element from it (0 refers to the first element of the list).
In extracting the element, <I>lindex</I> observes the same rules
concerning braces and quotes and backslashes as the Tcl command
interpreter; however, variable
substitution and command substitution do not occur.
If <I>index</I> is negative or greater than or equal to the number
of elements in <I>value</I>, then an empty
string is returned.
If <I>index</I> has the value <B>end</B>, it refers to the last element
in the list, and <B>end-</B><I>integer</I> refers to the last element in
the list minus the specified integer offset.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/lappend.htm">lappend</A></B>, <B><A HREF="../TkCmd/linsert.htm">linsert</A></B>, <B><A HREF="../TkCmd/llength.htm">llength</A></B>, <B><A HREF="../TkCmd/lsearch.htm">lsearch</A></B>, <B><A HREF="../TkCmd/lsort.htm">lsort</A></B>, <B><A HREF="../TkCmd/lrange.htm">lrange</A></B>, <B><A HREF="../TkCmd/lreplace.htm">lreplace</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/I.htm#index">index</A>, <A href="../Keywords/L.htm#list">list</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,25 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - linsert manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
linsert - Insert elements into a list
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>linsert </B><I>list index element </I>?<I>element element ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command produces a new list from <I>list</I> by inserting all of the
<I>element</I> arguments just before the <I>index</I>th element of
<I>list</I>. Each <I>element</I> argument will become a separate element of
the new list. If <I>index</I> is less than or equal to zero, then the new
elements are inserted at the beginning of the list. If <I>index</I> has the
value <B>end</B>, or if it is greater than or equal to the number of
elements in the list, then the new elements are appended to the list.
<B>end-</B><I>integer</I> refers to the last element in the list minus the
specified integer offset.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/lappend.htm">lappend</A></B>, <B><A HREF="../TkCmd/llength.htm">llength</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/I.htm#insert">insert</A>, <A href="../Keywords/L.htm#list">list</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,30 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - list manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
list - Create a list
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>list </B>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command returns a list comprised of all the <I>arg</I>s,
or an empty string if no <I>arg</I>s are specified.
Braces and backslashes get added as necessary, so that the <B>index</B> command
may be used on the result to re-extract the original arguments, and also
so that <B><A HREF="../TkCmd/eval.htm">eval</A></B> may be used to execute the resulting list, with
<I>arg1</I> comprising the command's name and the other <I>arg</I>s comprising
its arguments. <B>List</B> produces slightly different results than
<B><A HREF="../TkCmd/concat.htm">concat</A></B>: <B><A HREF="../TkCmd/concat.htm">concat</A></B> removes one level of grouping before forming
the list, while <B>list</B> works directly from the original arguments.
For example, the command
<PRE><B>list a b {c d e} {f {g h}}</B></PRE>
will return
<PRE><B>a b {c d e} {f {g h}}</B></PRE>
while <B><A HREF="../TkCmd/concat.htm">concat</A></B> with the same arguments will return
<PRE><B>a b c d e f {g h}</B></PRE>
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/lappend.htm">lappend</A></B>, <B><A HREF="../TkCmd/lindex.htm">lindex</A></B>, <B><A HREF="../TkCmd/linsert.htm">linsert</A></B>, <B><A HREF="../TkCmd/llength.htm">llength</A></B>, <B><A HREF="../TkCmd/lsearch.htm">lsearch</A></B>, <B><A HREF="../TkCmd/lsort.htm">lsort</A></B>, <B><A HREF="../TkCmd/lrange.htm">lrange</A></B>, <B><A HREF="../TkCmd/lreplace.htm">lreplace</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/L.htm#list">list</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,18 +0,0 @@
<HTML><HEAD><TITLE>Built-In Commands - llength manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
llength - Count the number of elements in a list
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>llength </B><I>list</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Treats <I>list</I> as a list and returns a decimal string giving
the number of elements in it.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/lindex.htm">lindex</A></B>, <B><A HREF="../TkCmd/lrange.htm">lrange</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/L.htm#length">length</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,130 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - load manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="load.htm#M2" NAME="L663">NAME</A>
<DL><DD>load - Load machine code and initialize new commands.</DL>
<DD><A HREF="load.htm#M3" NAME="L664">SYNOPSIS</A>
<DL>
<DD><B>load </B><I>fileName</I>
<DD><B>load </B><I>fileName packageName</I>
<DD><B>load </B><I>fileName packageName interp</I>
</DL>
<DD><A HREF="load.htm#M4" NAME="L665">DESCRIPTION</A>
<DD><A HREF="load.htm#M5" NAME="L666">PORTABILITY ISSUES</A>
<DL>
<DD><A HREF="load.htm#M6" NAME="L667"><B>Windows</B></A>
</DL>
<DD><A HREF="load.htm#M7" NAME="L668">BUGS</A>
<DD><A HREF="load.htm#M8" NAME="L669">SEE ALSO</A>
<DD><A HREF="load.htm#M9" NAME="L670">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
load - Load machine code and initialize new commands.
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>load </B><I>fileName</I><BR>
<B>load </B><I>fileName packageName</I><BR>
<B>load </B><I>fileName packageName interp</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command loads binary code from a file into the
application's address space and calls an initialization procedure
in the package to incorporate it into an interpreter. <I>fileName</I>
is the name of the file containing the code; its exact form varies
from system to system but on most systems it is a shared library,
such as a <B>.so</B> file under Solaris or a DLL under Windows.
<I>packageName</I> is the name of the package, and is used to
compute the name of an initialization procedure.
<I>interp</I> is the path name of the interpreter into which to load
the package (see the <B><A HREF="../TkCmd/interp.htm">interp</A></B> manual entry for details);
if <I>interp</I> is omitted, it defaults to the
interpreter in which the <B>load</B> command was invoked.
<P>
Once the file has been loaded into the application's address space,
one of two initialization procedures will be invoked in the new code.
Typically the initialization procedure will add new commands to a
Tcl interpreter.
The name of the initialization procedure is determined by
<I>packageName</I> and whether or not the target interpreter
is a safe one. For normal interpreters the name of the initialization
procedure will have the form <I>pkg</I><B>_Init</B>, where <I>pkg</I>
is the same as <I>packageName</I> except that the first letter is
converted to upper case and all other letters
are converted to lower case. For example, if <I>packageName</I> is
<B>foo</B> or <B>FOo</B>, the initialization procedure's name will
be <B>Foo_Init</B>.
<P>
If the target interpreter is a safe interpreter, then the name
of the initialization procedure will be <I>pkg</I><B>_SafeInit</B>
instead of <I>pkg</I><B>_Init</B>.
The <I>pkg</I><B>_SafeInit</B> function should be written carefully, so that it
initializes the safe interpreter only with partial functionality provided
by the package that is safe for use by untrusted code. For more information
on Safe-Tcl, see the <B>safe</B> manual entry.
<P>
The initialization procedure must match the following prototype:
<PRE>typedef int Tcl_PackageInitProc(<A HREF="../TkLib/Interp.htm">Tcl_Interp</A> *<I>interp</I>);</PRE>
The <I>interp</I> argument identifies the interpreter in which the
package is to be loaded. The initialization procedure must return
<B>TCL_OK</B> or <B>TCL_ERROR</B> to indicate whether or not it completed
successfully; in the event of an error it should set the interpreter's result
to point to an error message. The result of the <B>load</B> command
will be the result returned by the initialization procedure.
<P>
The actual loading of a file will only be done once for each <I>fileName</I>
in an application. If a given <I>fileName</I> is loaded into multiple
interpreters, then the first <B>load</B> will load the code and
call the initialization procedure; subsequent <B>load</B>s will
call the initialization procedure without loading the code again.
It is not possible to unload or reload a package.
<P>
The <B>load</B> command also supports packages that are statically
linked with the application, if those packages have been registered
by calling the <B><A HREF="../TkLib/StaticPkg.htm">Tcl_StaticPackage</A></B> procedure.
If <I>fileName</I> is an empty string, then <I>packageName</I> must
be specified.
<P>
If <I>packageName</I> is omitted or specified as an empty string,
Tcl tries to guess the name of the package.
This may be done differently on different platforms.
The default guess, which is used on most UNIX platforms, is to
take the last element of <I>fileName</I>, strip off the first
three characters if they are <B>lib</B>, and use any following
alphabetic and underline characters as the module name.
For example, the command <B>load libxyz4.2.so</B> uses the module
name <B>xyz</B> and the command <B>load bin/last.so {}</B> uses the
module name <B>last</B>.
<P>
If <I>fileName</I> is an empty string, then <I>packageName</I> must
be specified.
The <B>load</B> command first searches for a statically loaded package
(one that has been registered by calling the <B><A HREF="../TkLib/StaticPkg.htm">Tcl_StaticPackage</A></B>
procedure) by that name; if one is found, it is used.
Otherwise, the <B>load</B> command searches for a dynamically loaded
package by that name, and uses it if it is found. If several
different files have been <B>load</B>ed with different versions of
the package, Tcl picks the file that was loaded first.
<H3><A NAME="M5">PORTABILITY ISSUES</A></H3>
<DL>
<P><DT><A NAME="M6"><B>Windows</B></A><DD>
When a load fails with &quot;library not found&quot; error, it is also possible
that a dependent library was not found. To see the dependent libraries,
type ``dumpbin -imports &lt;dllname&gt;'' in a DOS console to see what the
library must import.
When loading a DLL in the current directory, Windows will ignore ``./'' as
a path specifier and use a search heuristic to find the DLL instead.
To avoid this, load the DLL with
<PRE>load [file join [pwd] mylib.DLL]</PRE>
<P></DL>
<H3><A NAME="M7">BUGS</A></H3>
If the same file is <B>load</B>ed by different <I>fileName</I>s, it will
be loaded into the process's address space multiple times. The
behavior of this varies from system to system (some systems may
detect the redundant loads, others may not).
<H3><A NAME="M8">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/info.htm">info sharedlibextension</A></B>, <B><A HREF="../TkLib/StaticPkg.htm">Tcl_StaticPackage</A></B>, <B>safe</B>
<H3><A NAME="M9">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#binary code">binary code</A>, <A href="../Keywords/L.htm#loading">loading</A>, <A href="../Keywords/S.htm#safe interpreter">safe interpreter</A>, <A href="../Keywords/S.htm#shared library">shared library</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,31 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - lrange manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
lrange - Return one or more adjacent elements from a list
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>lrange </B><I>list first last</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
<I>List</I> must be a valid Tcl list. This command will
return a new list consisting of elements
<I>first</I> through <I>last</I>, inclusive.
<I>First</I> or <I>last</I>
may be <B>end</B> (or any abbreviation of it) to refer to the last
element of the list.
If <I>first</I> is less than zero, it is treated as if it were zero.
If <I>last</I> is greater than or equal to the number of elements
in the list, then it is treated as if it were <B>end</B>.
If <I>first</I> is greater than <I>last</I> then an empty string
is returned.
Note: ``<B>lrange </B><I>list first first</I>'' does not always produce the
same result as ``<B>lindex </B><I>list first</I>'' (although it often does
for simple fields that aren't enclosed in braces); it does, however,
produce exactly the same results as ``<B>list [lindex </B><I>list first</I><B>]</B>''
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/lappend.htm">lappend</A></B>, <B><A HREF="../TkCmd/lindex.htm">lindex</A></B>, <B><A HREF="../TkCmd/linsert.htm">linsert</A></B>, <B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/llength.htm">llength</A></B>, <B><A HREF="../TkCmd/lreplace.htm">lreplace</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/R.htm#range">range</A>, <A href="../Keywords/S.htm#sublist">sublist</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,39 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - lreplace manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
lreplace - Replace elements in a list with new elements
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>lreplace </B><I>list first last </I>?<I>element element ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
<B>lreplace</B> returns a new list formed by replacing one or more elements of
<I>list</I> with the <I>element</I> arguments.
<I>first</I> and <I>last</I> specify the first and last index of the
range of elements to replace. 0 refers to the first element of the
list, and <B>end</B> (or any abbreviation of it) may be used to refer
to the last element of the list. If <I>list</I> is empty, then
<I>first</I> and <I>last</I> are ignored.
If <I>first</I> is less than zero, it is considered to refer to the
first element of the list. For non-empty lists, the element indicated
by <I>first</I> must exist.
If <I>last</I> is less than zero but greater than <I>first</I>, then any
specified elements will be prepended to the list. If <I>last</I> is
less than <I>first</I> then no elements are deleted; the new elements
are simply inserted before <I>first</I>.
The <I>element</I> arguments specify zero or more new arguments to
be added to the list in place of those that were deleted.
Each <I>element</I> argument will become a separate element of
the list. If no <I>element</I> arguments are specified, then the elements
between <I>first</I> and <I>last</I> are simply deleted. If <I>list</I>
is empty, any <I>element</I> arguments are added to the end of the list.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/lappend.htm">lappend</A></B>, <B><A HREF="../TkCmd/lindex.htm">lindex</A></B>, <B><A HREF="../TkCmd/linsert.htm">linsert</A></B>, <B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/llength.htm">llength</A></B>, <B><A HREF="../TkCmd/lrange.htm">lrange</A></B>, <B><A HREF="../TkCmd/lsearch.htm">lsearch</A></B>, <B><A HREF="../TkCmd/lsort.htm">lsort</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/R.htm#replace">replace</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,36 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - lsearch manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
lsearch - See if a list contains a particular element
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>lsearch </B>?<I>mode</I>? <I>list pattern</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command searches the elements of <I>list</I> to see if one
of them matches <I>pattern</I>.
If so, the command returns the index of the first matching
element.
If not, the command returns <B>-1</B>.
The <I>mode</I> argument indicates how the elements of the list are to
be matched against <I>pattern</I> and it must have one of the following
values:
<P>
<DL>
<P><DT><A NAME="M5"><B>-exact</B></A><DD>
The list element must contain exactly the same string as <I>pattern</I>.
<P><DT><A NAME="M6"><B>-glob</B></A><DD>
<I>Pattern</I> is a glob-style pattern which is matched against each list
element using the same rules as the <B><A HREF="../TkCmd/string.htm">string match</A></B> command.
<P><DT><A NAME="M7"><B>-regexp</B></A><DD>
<I>Pattern</I> is treated as a regular expression and matched against
each list element using the rules described in the <B><A HREF="../TkCmd/re_syntax.htm">re_syntax</A></B>
reference page.
<P></DL>
<P>
If <I>mode</I> is omitted then it defaults to <B>-glob</B>.
<H3><A NAME="M8">KEYWORDS</A></H3>
<A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/M.htm#match">match</A>, <A href="../Keywords/P.htm#pattern">pattern</A>, <A href="../Keywords/R.htm#regular expression">regular expression</A>, <A href="../Keywords/S.htm#search">search</A>, <A href="../Keywords/S.htm#string">string</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,160 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - lsort manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="lsort.htm#M2" NAME="L688">NAME</A>
<DL><DD>lsort - Sort the elements of a list</DL>
<DD><A HREF="lsort.htm#M3" NAME="L689">SYNOPSIS</A>
<DL>
<DD><B>lsort </B>?<I>options</I>? <I>list</I>
</DL>
<DD><A HREF="lsort.htm#M4" NAME="L690">DESCRIPTION</A>
<DL>
<DD><A HREF="lsort.htm#M5" NAME="L691"><B>-ascii</B></A>
<DD><A HREF="lsort.htm#M6" NAME="L692"><B>-dictionary</B></A>
<DD><A HREF="lsort.htm#M7" NAME="L693"><B>-integer</B></A>
<DD><A HREF="lsort.htm#M8" NAME="L694"><B>-real</B></A>
<DD><A HREF="lsort.htm#M9" NAME="L695"><B>-command </B><I>command</I></A>
<DD><A HREF="lsort.htm#M10" NAME="L696"><B>-increasing</B></A>
<DD><A HREF="lsort.htm#M11" NAME="L697"><B>-decreasing</B></A>
<DD><A HREF="lsort.htm#M12" NAME="L698"><B>-index </B><I>index</I></A>
<DD><A HREF="lsort.htm#M13" NAME="L699"><B>-unique</B></A>
</DL>
<DD><A HREF="lsort.htm#M14" NAME="L700">NOTES</A>
<DD><A HREF="lsort.htm#M15" NAME="L701">EXAMPLES</A>
<DD><A HREF="lsort.htm#M16" NAME="L702">SEE ALSO</A>
<DD><A HREF="lsort.htm#M17" NAME="L703">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
lsort - Sort the elements of a list
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>lsort </B>?<I>options</I>? <I>list</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command sorts the elements of <I>list</I>, returning a new
list in sorted order. The implementation of the <B>lsort</B> command
uses the merge-sort algorithm which is a stable sort that has O(n log
n) performance characteristics.
<P>
By default ASCII sorting is used with the result returned in
increasing order. However, any of the following options may be
specified before <I>list</I> to control the sorting process (unique
abbreviations are accepted):
<P>
<DL>
<P><DT><A NAME="M5"><B>-ascii</B></A><DD>
Use string comparison with ASCII collation order. This is the default.
<P><DT><A NAME="M6"><B>-dictionary</B></A><DD>
Use dictionary-style comparison. This is the same as <B>-ascii</B>
except (a) case is ignored except as a tie-breaker and (b) if two
strings contain embedded numbers, the numbers compare as integers,
not characters. For example, in <B>-dictionary</B> mode, <B>bigBoy</B>
sorts between <B>bigbang</B> and <B>bigboy</B>, and <B>x10y</B>
sorts between <B>x9y</B> and <B>x11y</B>.
<P><DT><A NAME="M7"><B>-integer</B></A><DD>
Convert list elements to integers and use integer comparison.
<P><DT><A NAME="M8"><B>-real</B></A><DD>
Convert list elements to floating-point values and use floating comparison.
<P><DT><A NAME="M9"><B>-command </B><I>command</I></A><DD>
Use <I>command</I> as a comparison command.
To compare two elements, evaluate a Tcl script consisting of
<I>command</I> with the two elements appended as additional
arguments. The script should return an integer less than,
equal to, or greater than zero if the first element is to
be considered less than, equal to, or greater than the second,
respectively.
<P><DT><A NAME="M10"><B>-increasing</B></A><DD>
Sort the list in increasing order (``smallest'' items first).
This is the default.
<P><DT><A NAME="M11"><B>-decreasing</B></A><DD>
Sort the list in decreasing order (``largest'' items first).
<P><DT><A NAME="M12"><B>-index </B><I>index</I></A><DD>
If this option is specified, each of the elements of <I>list</I> must
itself be a proper Tcl sublist. Instead of sorting based on whole
sublists, <B>lsort</B> will extract the <I>index</I>'th element from
each sublist and sort based on the given element. The keyword
<B>end</B> is allowed for the <I>index</I> to sort on the last sublist
element,
and <B>end-</B><I>index</I> sorts on a sublist element offset from
the end.
For example,
<PRE>lsort -integer -index 1 {{First 24} {Second 18} {Third 30}}</PRE>
returns <B>{Second 18} {First 24} {Third 30}</B>, and
<PRE>lsort -index end-1 {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}}</PRE>
returns <B>{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}</B>.
This option is much more efficient than using <B>-command</B>
to achieve the same effect.
<P><DT><A NAME="M13"><B>-unique</B></A><DD>
If this option is specified, then only the last set of duplicate
elements found in the list will be retained. Note that duplicates are
determined relative to the comparison used in the sort. Thus if
<I>-index 0</I> is used, <B>{1 a}</B> and <B>{1 b}</B> would be
considered duplicates and only the second element, <B>{1 b}</B>, would
be retained.
<P></DL>
<H3><A NAME="M14">NOTES</A></H3>
The options to <B>lsort</B> only control what sort of comparison is
used, and do not necessarily constrain what the values themselves
actually are. This distinction is only noticeable when the list to be
sorted has fewer than two elements.
<P>
The <B>lsort</B> command is reentrant, meaning it is safe to use as
part of the implementation of a command used in the <B>-command</B>
option.
<H3><A NAME="M15">EXAMPLES</A></H3>
Sorting a list using ASCII sorting:
<PRE>% lsort {a10 B2 b1 a1 a2}
B2 a1 a10 a2 b1</PRE>
<P>
Sorting a list using Dictionary sorting:
<PRE>% lsort -dictionary {a10 B2 b1 a1 a2}
a1 a2 a10 b1 B2</PRE>
<P>
Sorting lists of integers:
<PRE>% lsort -integer {5 3 1 2 11 4}
1 2 3 4 5 11
% lsort -integer {1 2 0x5 7 0 4 -1}
-1 0 1 2 4 0x5 7</PRE>
<P>
Sorting lists of floating-point numbers:
<PRE>% lsort -real {5 3 1 2 11 4}
1 2 3 4 5 11
% lsort -real {.5 0.07e1 0.4 6e-1}
0.4 .5 6e-1 0.07e1</PRE>
<P>
Sorting using indices:
<PRE>% # Note the space character before the c
% lsort {{a 5} { c 3} {b 4} {e 1} {d 2}}
{ c 3} {a 5} {b 4} {d 2} {e 1}
% lsort -index 0 {{a 5} { c 3} {b 4} {e 1} {d 2}}
{a 5} {b 4} { c 3} {d 2} {e 1}
% lsort -index 1 {{a 5} { c 3} {b 4} {e 1} {d 2}}
{e 1} {d 2} { c 3} {b 4} {a 5}</PRE>
<P>
Stripping duplicate values using sorting:
<PRE>% lsort -unique {a b c a b c a b c}
a b c</PRE>
<P>
More complex sorting using a comparison function:
<PRE>% proc compare {a b} {
set a0 [lindex $a 0]
set b0 [lindex $b 0]
if {$a0 &lt; $b0} {
return -1
} elseif {$a0 &gt; $b0} {
return 1
}
return [string compare [lindex $a 1] [lindex $b 1]]
}
% lsort -command compare &#92;
{{3 apple} {0x2 carrot} {1 dingo} {2 banana}}
{1 dingo} {2 banana} {0x2 carrot} {3 apple}</PRE>
<H3><A NAME="M16">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/lappend.htm">lappend</A></B>, <B><A HREF="../TkCmd/lindex.htm">lindex</A></B>, <B><A HREF="../TkCmd/linsert.htm">linsert</A></B>, <B><A HREF="../TkCmd/list.htm">list</A></B>, <B><A HREF="../TkCmd/llength.htm">llength</A></B>, <B><A HREF="../TkCmd/lrange.htm">lrange</A></B>, <B><A HREF="../TkCmd/lreplace.htm">lreplace</A></B>, <B><A HREF="../TkCmd/lsearch.htm">lsearch</A></B>
<H3><A NAME="M17">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/O.htm#order">order</A>, <A href="../Keywords/S.htm#sort">sort</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1999 Scriptics Corporation
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,89 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - memory manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="memory.htm#M2" NAME="L704">NAME</A>
<DL><DD>memory - Control Tcl memory debugging capabilities.</DL>
<DD><A HREF="memory.htm#M3" NAME="L705">SYNOPSIS</A>
<DL>
<DD><B>memory </B><I>option </I>?<I>arg arg ...</I>?
<DD>
</DL>
<DD><A HREF="memory.htm#M4" NAME="L706">DESCRIPTION</A>
<DL>
<DD><A HREF="memory.htm#M5" NAME="L707"><B>memory info</B></A>
<DD><A HREF="memory.htm#M6" NAME="L708"><B>memory trace [on|off]</B></A>
<DD><A HREF="memory.htm#M7" NAME="L709"><B>memory validate [on|off]</B></A>
<DD><A HREF="memory.htm#M8" NAME="L710"><B>memory trace_on_at_malloc</B> <I>count</I></A>
<DD><A HREF="memory.htm#M9" NAME="L711"><B>memory break_on_malloc</B> <I>count</I></A>
<DD><A HREF="memory.htm#M10" NAME="L712"><B> memory display</B> <I>file</I></A>
</DL>
<DD><A HREF="memory.htm#M11" NAME="L713">SEE ALSO</A>
<DD><A HREF="memory.htm#M12" NAME="L714">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
memory - Control Tcl memory debugging capabilities.
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>memory </B><I>option </I>?<I>arg arg ...</I>?<BR>
<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>memory</B> command gives the Tcl developer control of Tcl's memory
debugging capabilities. The memory command has several suboptions, which are
described below. It is only available when Tcl has been compiled with
memory debugging enabled (when <B>TCL_MEM_DEBUG</B> is defined at
compile time).
<P>
<DL>
<P><DT><A NAME="M5"><B>memory info</B></A><DD>
Produces a report containing the total allocations and frees since
Tcl began, the current packets allocated (the current
number of calls to <B>ckalloc</B> not met by a corresponding call
to <B>ckfree</B>), the current bytes allocated, and the maximum number
of packets and bytes allocated.
<P><DT><A NAME="M6"><B>memory trace [on|off]</B></A><DD>
<BR>
Turns memory tracing on or off. When memory tracing is on, every call
to <B>ckalloc</B> causes a line of trace information to be written to
<I>stderr</I>, consisting of the word <I>ckalloc</I>, followed by the
address returned, the amount of memory allocated, and the C filename
and line number of the code performing the allocation. For example:
<PRE>ckalloc 40e478 98 tclProc.c 1406</PRE>
Calls to <B>ckfree</B> are traced in the same manner.
<P><DT><A NAME="M7"><B>memory validate [on|off]</B></A><DD>
Turns memory validation on or off. When memory validation is enabled,
on every call to <B>ckalloc</B> or <B>ckfree</B>, the guard zones are
checked for every piece of memory currently in existence that was
allocated by <B>ckalloc</B>. This has a large performance impact and
should only be used when overwrite problems are strongly suspected.
The advantage of enabling memory validation is that a guard zone
overwrite can be detected on the first call to <B>ckalloc</B> or
<B>ckfree</B> after the overwrite occurred, rather than when the
specific memory with the overwritten guard zone(s) is freed, which may
occur long after the overwrite occurred.
<P><DT><A NAME="M8"><B>memory trace_on_at_malloc</B> <I>count</I></A><DD>
Enable memory tracing after <I>count</I> <B>ckalloc</B>'s have been performed.
For example, if you enter <B>memory trace_on_at_malloc 100</B>,
after the 100th call to <B>ckalloc</B>, memory trace information will begin
being displayed for all allocations and frees. Since there can be a lot
of memory activity before a problem occurs, judicious use of this option
can reduce the slowdown caused by tracing (and the amount of trace information
produced), if you can identify a number of allocations that occur before
the problem sets in. The current number of memory allocations that have
occurred since Tcl started is printed on a guard zone failure.
<P><DT><A NAME="M9"><B>memory break_on_malloc</B> <I>count</I></A><DD>
After the <B>count</B> allocations have been performed, <B>ckalloc</B>'s
output a message to this effect and that it is now attempting to enter
the C debugger. Tcl will then issue a <I>SIGINT</I> signal against itself.
If you are running Tcl under a C debugger, it should then enter the debugger
command mode.
<P><DT><A NAME="M10"><B> memory display</B> <I>file</I></A><DD>
Write a list of all currently allocated memory to the specified file.
<P></DL>
<H3><A NAME="M11">SEE ALSO</A></H3>
<B>ckalloc</B>, <B>ckfree</B>, <B><A HREF="../TkLib/DumpActiveMemory.htm">Tcl_ValidateAllMemory</A></B>, <B><A HREF="../TkLib/DumpActiveMemory.htm">Tcl_DumpActiveMemory</A></B>, <B>TCL_MEM_DEBUG</B>
<H3><A NAME="M12">KEYWORDS</A></H3>
<A href="../Keywords/M.htm#memory">memory</A>, <A href="../Keywords/D.htm#debug">debug</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1992-1999 by Karl Lehenbauer and Mark Diekhans
<A HREF="../copyright.htm">Copyright</A> &#169; 2000 by Scriptics Corporation.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,244 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - msgcat manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="msgcat.htm#M2" NAME="L715">NAME</A>
<DL><DD>msgcat - Tcl message catalog</DL>
<DD><A HREF="msgcat.htm#M3" NAME="L716">SYNOPSIS</A>
<DL>
<DD><B>::msgcat::mc </B><I>src-string</I>
<DD><B>::msgcat::mclocale </B>?<I>newLocale</I>?
<DD><B>::msgcat::mcpreferences</B>
<DD><B>::msgcat::mcload </B><I>dirname</I>
<DD><B>::msgcat::mcset </B><I>locale src-string </I>?<I>translate-string</I>?
<DD><B>::msgcat::mcunknown </B><I>locale src-string</I>
</DL>
<DD><A HREF="msgcat.htm#M4" NAME="L717">DESCRIPTION</A>
<DD><A HREF="msgcat.htm#M5" NAME="L718">COMMANDS</A>
<DL>
<DD><A HREF="msgcat.htm#M6" NAME="L719"><B>::msgcat::mc </B><I>src-string</I> ?<I>arg arg ...</I>?</A>
</DL>
<DL>
<DD><A HREF="msgcat.htm#M7" NAME="L720"><B>::msgcat::mclocale </B>?<I>newLocale</I>?</A>
<DD><A HREF="msgcat.htm#M8" NAME="L721"><B>::msgcat::mcpreferences</B></A>
<DD><A HREF="msgcat.htm#M9" NAME="L722"><B>::msgcat::mcload </B><I>dirname</I></A>
<DD><A HREF="msgcat.htm#M10" NAME="L723"><B>::msgcat::mcset </B><I>locale src-string </I>?<I>translate-string</I>?</A>
<DD><A HREF="msgcat.htm#M11" NAME="L724"><B>::msgcat::mcunknown </B><I>locale src-string</I></A>
</DL>
<DD><A HREF="msgcat.htm#M12" NAME="L725">LOCALE AND SUBLOCALE SPECIFICATION</A>
<DD><A HREF="msgcat.htm#M13" NAME="L726">NAMESPACES AND MESSAGE CATALOGS</A>
<DD><A HREF="msgcat.htm#M14" NAME="L727">LOCATION AND FORMAT OF MESSAGE FILES</A>
<DL>
</DL>
<DD><A HREF="msgcat.htm#M15" NAME="L728">RECOMMENDED MESSAGE SETUP FOR PACKAGES</A>
<DL>
</DL>
<DD><A HREF="msgcat.htm#M16" NAME="L729">POSTITIONAL CODES FOR FORMAT AND SCAN COMMANDS</A>
<DD><A HREF="msgcat.htm#M17" NAME="L730">CREDITS</A>
<DD><A HREF="msgcat.htm#M18" NAME="L731">SEE ALSO</A>
<DD><A HREF="msgcat.htm#M19" NAME="L732">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
msgcat - Tcl message catalog
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>::msgcat::mc </B><I>src-string</I><BR>
<B>::msgcat::mclocale </B>?<I>newLocale</I>?<BR>
<B>::msgcat::mcpreferences</B><BR>
<B>::msgcat::mcload </B><I>dirname</I><BR>
<B>::msgcat::mcset </B><I>locale src-string </I>?<I>translate-string</I>?<BR>
<B>::msgcat::mcunknown </B><I>locale src-string</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>msgcat</B> package provides a set of functions
that can be used to manage multi-lingual user interfaces.
Text strings are defined in a ``message catalog'' which
is independent from the application, and
which can be edited or localized without modifying
the application source code. New languages
or locales are provided by adding a new file to
the message catalog.
<P>
Use of the message catalog is optional by any application
or package, but is encouraged if the application or package
wishes to be enabled for multi-lingual applications.
<H3><A NAME="M5">COMMANDS</A></H3>
<DL>
<P><DT><A NAME="M6"><B>::msgcat::mc </B><I>src-string</I> ?<I>arg arg ...</I>?</A><DD>
Returns a translation of <I>src-string</I> according to the
user's current locale. If additional arguments past <I>src-string</I>
are given, the <B><A HREF="../TkCmd/format.htm">format</A></B> command is used to substitute the
additional arguments in the translation of <I>src-string</I>.
<B>::msgcat::mc</B> will search the messages defined
in the current namespace for a translation of <I>src-string</I>; if
none is found, it will search in the parent of the current namespace,
and so on until it reaches the global namespace. If no translation
string exists, <B>::msgcat::mcunknown</B> is called and the string
returned from <B>::msgcat::mcunknown</B> is returned.
<P></DL>
<P>
<B>::msgcat::mc</B> is the main function used to localize an
application. Instead of using an English string directly, an
applicaton can pass the English string through <B>::msgcat::mc</B> and
use the result. If an application is written for a single language in
this fashion, then it is easy to add support for additional languages
later simply by defining new message catalog entries.
<P>
<DL>
<P><DT><A NAME="M7"><B>::msgcat::mclocale </B>?<I>newLocale</I>?</A><DD>
This function sets the locale to <I>newLocale</I>. If <I>newLocale</I>
is omitted, the current locale is returned, otherwise the current locale
is set to <I>newLocale</I>.
The initial locale defaults to the locale specified in
the user's environment. See <B>LOCALE AND SUBLOCALE SPECIFICATION</B>
below for a description of the locale string format.
<P><DT><A NAME="M8"><B>::msgcat::mcpreferences</B></A><DD>
Returns an ordered list of the locales preferred by
the user, based on the user's language specification.
The list is ordered from most specific to least
preference. If the user has specified LANG=en_US_funky,
this procedure would return {en_US_funky en_US en}.
<P><DT><A NAME="M9"><B>::msgcat::mcload </B><I>dirname</I></A><DD>
Searches the specified directory for files that match
the language specifications returned by <B>::msgcat::mcpreferences</B>.
Each file located is sourced. The file extension is ``.msg''.
The number of message files which matched the specification
and were loaded is returned.
<P><DT><A NAME="M10"><B>::msgcat::mcset </B><I>locale src-string </I>?<I>translate-string</I>?</A><DD>
Sets the translation for <I>src-string</I> to <I>translate-string</I>
in the specified <I>locale</I>. If <I>translate-string</I> is not
specified, <I>src-string</I> is used for both. The function
returns <I>translate-string</I>.
<P><DT><A NAME="M11"><B>::msgcat::mcunknown </B><I>locale src-string</I></A><DD>
This routine is called by <B>::msgcat::mc</B> in the case when
a translation for <I>src-string</I> is not defined in the
current locale. The default action is to return
<I>src-string</I>. This procedure can be redefined by the
application, for example to log error messages for each unknown
string. The <B>::msgcat::mcunknown</B> procedure is invoked at the
same stack context as the call to <B>::msgcat::mc</B>. The return vaue
of <B>::msgcat::mcunknown</B> is used as the return vaue for the call
to <B>::msgcat::mc</B>.
<P></DL>
<H3><A NAME="M12">LOCALE AND SUBLOCALE SPECIFICATION</A></H3>
The locale is specified by a locale string.
The locale string consists of
a language code, an optional country code, and an optional
system-specific code, each separated by ``_''. The country and language
codes are specified in standards ISO-639 and ISO-3166.
For example, the locale ``en'' specifies English and
``en_US'' specifes U.S. English.
<P>
The locale defaults to the value in <B>env(LANG)</B> at the time the
<B>msgcat</B> package is loaded. If <B>env(LANG)</B> is not defined, then the
locale defaults to ``C''.
<P>
When a locale is specified by the user, a ``best match'' search is
performed during string translation. For example, if a user specifies
en_UK_Funky, the locales ``en_UK_Funky'', ``en_UK'', and ``en'' are
searched in order until a matching translation string is found. If no
translation string is available, then <B>::msgcat::unknown</B> is
called.
<H3><A NAME="M13">NAMESPACES AND MESSAGE CATALOGS</A></H3>
Strings stored in the message catalog are stored relative
to the namespace from which they were added. This allows
multiple packages to use the same strings without fear
of collisions with other packages. It also allows the
source string to be shorter and less prone to typographical
error.
<P>
For example, executing the code
<PRE>mcset en hello &quot;hello from ::&quot;
namespace eval foo {mcset en hello &quot;hello from ::foo&quot;}
puts [mc hello]
namespace eval foo {puts [mc hello]}</PRE>
will print
<PRE>hello from ::
hello from ::foo</PRE>
<P>
When searching for a translation of a message, the
message catalog will search first the current namespace,
then the parent of the current namespace, and so on until
the global namespace is reached. This allows child namespaces
to &quot;inherit&quot; messages from their parent namespace.
<P>
For example, executing the code
<PRE>mcset en m1 &quot;:: message1&quot;
mcset en m2 &quot;:: message2&quot;
mcset en m3 &quot;:: message3&quot;
namespace eval ::foo {
mcset en m2 &quot;::foo message2&quot;
mcset en m3 &quot;::foo message3&quot;
}
namespace eval ::foo::bar {
mcset en m3 &quot;::foo::bar message3&quot;
}
puts &quot;[mc m1]; [mc m2]; [mc m3]&quot;
namespace eval ::foo {puts &quot;[mc m1]; [mc m2]; [mc m3]&quot;}
namespace eval ::foo::bar {puts &quot;[mc m1]; [mc m2]; [mc m3]&quot;}</PRE>
will print
<PRE>:: message1; :: message2; :: message3
:: message1; ::foo message2; ::foo message3
:: message1; ::foo message2; ::foo::bar message3</PRE>
<H3><A NAME="M14">LOCATION AND FORMAT OF MESSAGE FILES</A></H3>
Message files can be located in any directory, subject
to the following conditions:
<P>
<DL>
<P><DT>[1]<DD>
All message files for a package are in the same directory.
<P><DT>[2]<DD>
The message file name is a locale specifier followed
by ``.msg''. For example:
<PRE>es.msg -- spanish
en_UK.msg -- UK English</PRE>
<P><DT>[3]<DD>
The file contains a series of calls to mcset, setting the
necessary translation strings for the language. For example:
<PRE>::msgcat::mcset es &quot;Free Beer!&quot; &quot;Cerveza Gracias!&quot;</PRE>
<P></DL>
<H3><A NAME="M15">RECOMMENDED MESSAGE SETUP FOR PACKAGES</A></H3>
If a package is installed into a subdirectory of the
<B>tcl_pkgPath</B> and loaded via <B>package require</B>, the
following procedure is recommended.
<P>
<DL>
<P><DT>[1]<DD>
During package installation, create a subdirectory
<B>msgs</B> under your package directory.
<P><DT>[2]<DD>
Copy your *.msg files into that directory.
<P><DT>[3]<DD>
Add the following command to your package
initialization script:
<PRE># load language files, stored in msgs subdirectory
::msgcat::mcload [file join [file dirname [info script]] msgs]</PRE>
<P></DL>
<H3><A NAME="M16">POSTITIONAL CODES FOR FORMAT AND SCAN COMMANDS</A></H3>
It is possible that a message string used as an argument
to <B><A HREF="../TkCmd/format.htm">format</A></B> might have positionally dependent parameters that
might need to be repositioned. For example, it might be
syntactically desirable to rearrange the sentence structure
while translating.
<PRE>format &quot;We produced %d units in location %s&quot; $num $city
format &quot;In location %s we produced %d units&quot; $city $num</PRE>
<P>
This can be handled by using the positional
parameters:
<PRE>format &quot;We produced %1&#92;$d units in location %2&#92;$s&quot; $num $city
format &quot;In location %2&#92;$s we produced %1&#92;$d units&quot; $num $city</PRE>
<P>
Similarly, positional parameters can be used with <B><A HREF="../TkCmd/scan.htm">scan</A></B> to
extract values from internationalized strings.
<H3><A NAME="M17">CREDITS</A></H3>
The message catalog code was developed by Mark Harrison.
<H3><A NAME="M18">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/format.htm">format</A></B>, <B><A HREF="../TkCmd/scan.htm">scan</A></B>, <B><A HREF="../TkCmd/namespace.htm">namespace</A></B>, <B><A HREF="../TkCmd/package.htm">package</A></B>
<H3><A NAME="M19">KEYWORDS</A></H3>
<A href="../Keywords/I.htm#internationalization">internationalization</A>, <A href="../Keywords/I.htm#i18n">i18n</A>, <A href="../Keywords/L.htm#localization">localization</A>, <A href="../Keywords/L.htm#l10n">l10n</A>, <A href="../Keywords/M.htm#message">message</A>, <A href="../Keywords/T.htm#text">text</A>, <A href="../Keywords/T.htm#translation">translation</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1998 Mark Harrison.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,532 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - namespace manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="namespace.htm#M2" NAME="L733">NAME</A>
<DL><DD>namespace - create and manipulate contexts for commands and variables</DL>
<DD><A HREF="namespace.htm#M3" NAME="L734">SYNOPSIS</A>
<DL>
<DD><B>namespace </B>?<I>option</I>? ?<I>arg ...</I>?
</DL>
<DD><A HREF="namespace.htm#M4" NAME="L735">DESCRIPTION</A>
<DL>
<DD><A HREF="namespace.htm#M5" NAME="L736"><B>namespace children </B>?<I>namespace</I>? ?<I>pattern</I>?</A>
<DD><A HREF="namespace.htm#M6" NAME="L737"><B>namespace code </B><I>script</I></A>
<DD><A HREF="namespace.htm#M7" NAME="L738"><B>namespace current</B></A>
<DD><A HREF="namespace.htm#M8" NAME="L739"><B>namespace delete </B>?<I>namespace namespace ...</I>?</A>
<DD><A HREF="namespace.htm#M9" NAME="L740"><B>namespace eval</B> <I>namespace arg</I> ?<I>arg ...</I>?</A>
<DD><A HREF="namespace.htm#M10" NAME="L741"><B>namespace export </B>?-<B>clear</B>? ?<I>pattern pattern ...</I>?</A>
<DD><A HREF="namespace.htm#M11" NAME="L742"><B>namespace forget </B>?<I>pattern pattern ...</I>?</A>
<DD><A HREF="namespace.htm#M12" NAME="L743"><B>namespace import </B>?<B>-force</B>? ?<I>pattern</I> <I>pattern ...</I>?</A>
<DD><A HREF="namespace.htm#M13" NAME="L744"><B>namespace inscope</B> <I>namespace arg</I> ?<I>arg ...</I>?</A>
<DD><A HREF="namespace.htm#M14" NAME="L745"><B>namespace origin </B><I>command</I></A>
<DD><A HREF="namespace.htm#M15" NAME="L746"><B>namespace parent</B> ?<I>namespace</I>?</A>
<DD><A HREF="namespace.htm#M16" NAME="L747"><B>namespace qualifiers</B> <I>string</I></A>
<DD><A HREF="namespace.htm#M17" NAME="L748"><B>namespace tail</B> <I>string</I></A>
<DD><A HREF="namespace.htm#M18" NAME="L749"><B>namespace which</B> ?-<B>command</B>? ?-<B>variable</B>? <I>name</I></A>
</DL>
<DD><A HREF="namespace.htm#M19" NAME="L750">WHAT IS A NAMESPACE?</A>
<DD><A HREF="namespace.htm#M20" NAME="L751">QUALIFIED NAMES</A>
<DD><A HREF="namespace.htm#M21" NAME="L752">NAME RESOLUTION</A>
<DD><A HREF="namespace.htm#M22" NAME="L753">IMPORTING COMMANDS</A>
<DD><A HREF="namespace.htm#M23" NAME="L754">EXPORTING COMMANDS</A>
<DD><A HREF="namespace.htm#M24" NAME="L755">SEE ALSO</A>
<DD><A HREF="namespace.htm#M25" NAME="L756">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
namespace - create and manipulate contexts for commands and variables
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>namespace </B>?<I>option</I>? ?<I>arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>namespace</B> command lets you create, access, and destroy
separate contexts for commands and variables.
See the section <B>WHAT IS A NAMESPACE?</B> below
for a brief overview of namespaces.
The legal <I>option</I>'s are listed below.
Note that you can abbreviate the <I>option</I>'s.
<P>
<DL>
<P><DT><A NAME="M5"><B>namespace children </B>?<I>namespace</I>? ?<I>pattern</I>?</A><DD>
Returns a list of all child namespaces that belong to the
namespace <I>namespace</I>.
If <I>namespace</I> is not specified,
then the children are returned for the current namespace.
This command returns fully-qualified names,
which start with <B>::</B>.
If the optional <I>pattern</I> is given,
then this command returns only the names that match the glob-style pattern.
The actual pattern used is determined as follows:
a pattern that starts with <B>::</B> is used directly,
otherwise the namespace <I>namespace</I>
(or the fully-qualified name of the current namespace)
is prepended onto the the pattern.
<P><DT><A NAME="M6"><B>namespace code </B><I>script</I></A><DD>
Captures the current namespace context for later execution
of the script <I>script</I>.
It returns a new script in which <I>script</I> has been wrapped
in a <B>namespace code</B> command.
The new script has two important properties.
First, it can be evaluated in any namespace and will cause
<I>script</I> to be evaluated in the current namespace
(the one where the <B>namespace code</B> command was invoked).
Second, additional arguments can be appended to the resulting script
and they will be passed to <I>script</I> as additional arguments.
For example, suppose the command
<B>set script [namespace code {foo bar}]</B>
is invoked in namespace <B>::a::b</B>.
Then <B>eval &quot;$script x y&quot;</B>
can be executed in any namespace (assuming the value of
<B>script</B> has been passed in properly)
and will have the same effect as the command
<B>namespace eval ::a::b {foo bar x y}</B>.
This command is needed because
extensions like Tk normally execute callback scripts
in the global namespace.
A scoped command captures a command together with its namespace context
in a way that allows it to be executed properly later.
See the section <B>SCOPED VALUES</B> for some examples
of how this is used to create callback scripts.
<P><DT><A NAME="M7"><B>namespace current</B></A><DD>
Returns the fully-qualified name for the current namespace.
The actual name of the global namespace is ``<A HREF="../TkLib/CrtChannel.htm"></A>''
(i.e., an empty string),
but this command returns <B>::</B> for the global namespace
as a convenience to programmers.
<P><DT><A NAME="M8"><B>namespace delete </B>?<I>namespace namespace ...</I>?</A><DD>
Each namespace <I>namespace</I> is deleted
and all variables, procedures, and child namespaces
contained in the namespace are deleted.
If a procedure is currently executing inside the namespace,
the namespace will be kept alive until the procedure returns;
however, the namespace is marked to prevent other code from
looking it up by name.
If a namespace doesn't exist, this command returns an error.
If no namespace names are given, this command does nothing.
<P><DT><A NAME="M9"><B>namespace eval</B> <I>namespace arg</I> ?<I>arg ...</I>?</A><DD>
Activates a namespace called <I>namespace</I> and evaluates some code
in that context.
If the namespace does not already exist, it is created.
If more than one <I>arg</I> argument is specified,
the arguments are concatenated together with a space between each one
in the same fashion as the <B><A HREF="../TkCmd/eval.htm">eval</A></B> command,
and the result is evaluated.
<BR>
<P>
If <I>namespace</I> has leading namespace qualifiers
and any leading namespaces do not exist,
they are automatically created.
<P><DT><A NAME="M10"><B>namespace export </B>?-<B>clear</B>? ?<I>pattern pattern ...</I>?</A><DD>
Specifies which commands are exported from a namespace.
The exported commands are those that can be later imported
into another namespace using a <B>namespace import</B> command.
Both commands defined in a namespace and
commands the namespace has previously imported
can be exported by a namespace.
The commands do not have to be defined
at the time the <B>namespace export</B> command is executed.
Each <I>pattern</I> may contain glob-style special characters,
but it may not include any namespace qualifiers.
That is, the pattern can only specify commands
in the current (exporting) namespace.
Each <I>pattern</I> is appended onto the namespace's list of export patterns.
If the -<B>clear</B> flag is given,
the namespace's export pattern list is reset to empty before any
<I>pattern</I> arguments are appended.
If no <I>pattern</I>s are given and the -<B>clear</B> flag isn't given,
this command returns the namespace's current export list.
<P><DT><A NAME="M11"><B>namespace forget </B>?<I>pattern pattern ...</I>?</A><DD>
Removes previously imported commands from a namespace.
Each <I>pattern</I> is a qualified name such as
<B>foo::x</B> or <B>a::b::p*</B>.
Qualified names contain <B>::</B>s and qualify a name
with the name of one or more namespaces.
Each <I>pattern</I> is qualified with the name of an exporting namespace
and may have glob-style special characters in the command name
at the end of the qualified name.
Glob characters may not appear in a namespace name.
This command first finds the matching exported commands.
It then checks whether any of those those commands
were previously imported by the current namespace.
If so, this command deletes the corresponding imported commands.
In effect, this un-does the action of a <B>namespace import</B> command.
<P><DT><A NAME="M12"><B>namespace import </B>?<B>-force</B>? ?<I>pattern</I> <I>pattern ...</I>?</A><DD>
Imports commands into a namespace.
Each <I>pattern</I> is a qualified name like
<B>foo::x</B> or <B>a::p*</B>.
That is, it includes the name of an exporting namespace
and may have glob-style special characters in the command name
at the end of the qualified name.
Glob characters may not appear in a namespace name.
All the commands that match a <I>pattern</I> string
and which are currently exported from their namespace
are added to the current namespace.
This is done by creating a new command in the current namespace
that points to the exported command in its original namespace;
when the new imported command is called, it invokes the exported command.
This command normally returns an error
if an imported command conflicts with an existing command.
However, if the -<B>force</B> option is given,
imported commands will silently replace existing commands.
The <B>namespace import</B> command has snapshot semantics:
that is, only requested commands that are currently defined
in the exporting namespace are imported.
In other words, you can import only the commands that are in a namespace
at the time when the <B>namespace import</B> command is executed.
If another command is defined and exported in this namespace later on,
it will not be imported.
<P><DT><A NAME="M13"><B>namespace inscope</B> <I>namespace arg</I> ?<I>arg ...</I>?</A><DD>
Executes a script in the context of a particular namespace.
This command is not expected to be used directly by programmers;
calls to it are generated implicitly when applications
use <B>namespace code</B> commands to create callback scripts
that the applications then register with, e.g., Tk widgets.
The <B>namespace inscope</B> command is much like the <B>namespace eval</B>
command except that it has <B><A HREF="../TkCmd/lappend.htm">lappend</A></B> semantics
and the namespace must already exist.
It treats the first argument as a list,
and appends any arguments after the first
onto the end as proper list elements.
<B>namespace inscope ::foo a x y z</B>
is equivalent to
<B>namespace eval ::foo [concat a [list x y z]]</B>
This <B><A HREF="../TkCmd/lappend.htm">lappend</A></B> semantics is important because many callback scripts
are actually prefixes.
<P><DT><A NAME="M14"><B>namespace origin </B><I>command</I></A><DD>
Returns the fully-qualified name of the original command
to which the imported command <I>command</I> refers.
When a command is imported into a namespace,
a new command is created in that namespace
that points to the actual command in the exporting namespace.
If a command is imported into a sequence of namespaces
<I>a, b,...,n</I> where each successive namespace
just imports the command from the previous namespace,
this command returns the fully-qualified name of the original command
in the first namespace, <I>a</I>.
If <I>command</I> does not refer to an imported command,
the command's own fully-qualified name is returned.
<P><DT><A NAME="M15"><B>namespace parent</B> ?<I>namespace</I>?</A><DD>
Returns the fully-qualified name of the parent namespace
for namespace <I>namespace</I>.
If <I>namespace</I> is not specified,
the fully-qualified name of the current namespace's parent is returned.
<P><DT><A NAME="M16"><B>namespace qualifiers</B> <I>string</I></A><DD>
Returns any leading namespace qualifiers for <I>string</I>.
Qualifiers are namespace names separated by <B>::</B>s.
For the <I>string</I> <B>::foo::bar::x</B>,
this command returns <B>::foo::bar</B>,
and for <B>::</B> it returns an empty string.
This command is the complement of the <B>namespace tail</B> command.
Note that it does not check whether the
namespace names are, in fact,
the names of currently defined namespaces.
<P><DT><A NAME="M17"><B>namespace tail</B> <I>string</I></A><DD>
Returns the simple name at the end of a qualified string.
Qualifiers are namespace names separated by <B>::</B>s.
For the <I>string</I> <B>::foo::bar::x</B>,
this command returns <B>x</B>,
and for <B>::</B> it returns an empty string.
This command is the complement of the <B>namespace qualifiers</B> command.
It does not check whether the namespace names are, in fact,
the names of currently defined namespaces.
<P><DT><A NAME="M18"><B>namespace which</B> ?-<B>command</B>? ?-<B>variable</B>? <I>name</I></A><DD>
Looks up <I>name</I> as either a command or variable
and returns its fully-qualified name.
For example, if <I>name</I> does not exist in the current namespace
but does exist in the global namespace,
this command returns a fully-qualified name in the global namespace.
If the command or variable does not exist,
this command returns an empty string. If the variable has been
created but not defined, such as with the <B><A HREF="../TkCmd/variable.htm">variable</A></B> command
or through a <B><A HREF="../TkCmd/trace.htm">trace</A></B> on the variable, this command will return the
fully-qualified name of the variable.
If no flag is given, <I>name</I> is treated as a command name.
See the section <B>NAME RESOLUTION</B> below for an explanation of
the rules regarding name resolution.
<P></DL>
<H3><A NAME="M19">WHAT IS A NAMESPACE?</A></H3>
A namespace is a collection of commands and variables.
It encapsulates the commands and variables to ensure that they
won't interfere with the commands and variables of other namespaces.
Tcl has always had one such collection,
which we refer to as the <I>global namespace</I>.
The global namespace holds all global variables and commands.
The <B>namespace eval</B> command lets you create new namespaces.
For example,
<PRE><B>namespace eval Counter {
namespace export bump
variable num 0
proc bump {} {
variable num
incr num
}
}</B></PRE>
creates a new namespace containing the variable <B>num</B> and
the procedure <B>bump</B>.
The commands and variables in this namespace are separate from
other commands and variables in the same program.
If there is a command named <B>bump</B> in the global namespace,
for example, it will be different from the command <B>bump</B>
in the <B>Counter</B> namespace.
<P>
Namespace variables resemble global variables in Tcl.
They exist outside of the procedures in a namespace
but can be accessed in a procedure via the <B><A HREF="../TkCmd/variable.htm">variable</A></B> command,
as shown in the example above.
<P>
Namespaces are dynamic.
You can add and delete commands and variables at any time,
so you can build up the contents of a
namespace over time using a series of <B>namespace eval</B> commands.
For example, the following series of commands has the same effect
as the namespace definition shown above:
<PRE><B>namespace eval Counter {
variable num 0
proc bump {} {
variable num
return [incr num]
}
}
namespace eval Counter {
proc test {args} {
return $args
}
}
namespace eval Counter {
rename test &quot;&quot;
}</B></PRE>
Note that the <B>test</B> procedure is added to the <B>Counter</B> namespace,
and later removed via the <B><A HREF="../TkCmd/rename.htm">rename</A></B> command.
<P>
Namespaces can have other namespaces within them,
so they nest hierarchically.
A nested namespace is encapsulated inside its parent namespace
and can not interfere with other namespaces.
<H3><A NAME="M20">QUALIFIED NAMES</A></H3>
Each namespace has a textual name such as
<B><A HREF="../TkCmd/history.htm">history</A></B> or <B>::safe::interp</B>.
Since namespaces may nest,
qualified names are used to refer to
commands, variables, and child namespaces contained inside namespaces.
Qualified names are similar to the hierarchical path names for
Unix files or Tk widgets,
except that <B>::</B> is used as the separator
instead of <B>/</B> or <B>.</B>.
The topmost or global namespace has the name ``<A HREF="../TkLib/CrtChannel.htm"></A>'' (i.e., an empty string),
although <B>::</B> is a synonym.
As an example, the name <B>::safe::interp::create</B>
refers to the command <B>create</B> in the namespace <B><A HREF="../TkCmd/interp.htm">interp</A></B>
that is a child of of namespace <B>::safe</B>,
which in turn is a child of the global namespace <B>::</B>.
<P>
If you want to access commands and variables from another namespace,
you must use some extra syntax.
Names must be qualified by the namespace that contains them.
From the global namespace,
we might access the <B>Counter</B> procedures like this:
<PRE><B>Counter::bump 5
Counter::Reset</B></PRE>
We could access the current count like this:
<PRE><B>puts &quot;count = $Counter::num&quot;</B></PRE>
When one namespace contains another, you may need more than one
qualifier to reach its elements.
If we had a namespace <B>Foo</B> that contained the namespace <B>Counter</B>,
you could invoke its <B>bump</B> procedure
from the global namespace like this:
<PRE><B>Foo::Counter::bump 3</B></PRE>
<P>
You can also use qualified names when you create and rename commands.
For example, you could add a procedure to the <B>Foo</B>
namespace like this:
<PRE><B>proc Foo::Test {args} {return $args}</B></PRE>
And you could move the same procedure to another namespace like this:
<PRE><B>rename Foo::Test Bar::Test</B></PRE>
<P>
There are a few remaining points about qualified names
that we should cover.
Namespaces have nonempty names except for the global namespace.
<B>::</B> is disallowed in simple command, variable, and namespace names
except as a namespace separator.
Extra <B>:</B>s in a qualified name are ignored;
that is, two or more <B>:</B>s are treated as a namespace separator.
A trailing <B>::</B> in a qualified variable or command name
refers to the variable or command named {}.
However, a trailing <B>::</B> in a qualified namespace name is ignored.
<H3><A NAME="M21">NAME RESOLUTION</A></H3>
In general, all Tcl commands that take variable and command names
support qualified names.
This means you can give qualified names to such commands as
<B><A HREF="../TkCmd/set.htm">set</A></B>, <B><A HREF="../TkCmd/proc.htm">proc</A></B>, <B><A HREF="../TkCmd/rename.htm">rename</A></B>, and <B><A HREF="../TkCmd/interp.htm">interp alias</A></B>.
If you provide a fully-qualified name that starts with a <B>::</B>,
there is no question about what command, variable, or namespace
you mean.
However, if the name does not start with a <B>::</B>
(i.e., is <I>relative</I>),
Tcl follows a fixed rule for looking it up:
Command and variable names are always resolved
by looking first in the current namespace,
and then in the global namespace.
Namespace names, on the other hand, are always resolved
by looking in only the current namespace.
<P>
In the following example,
<PRE><B>set traceLevel 0
namespace eval Debug {
printTrace $traceLevel
}</B></PRE>
Tcl looks for <B>traceLevel</B> in the namespace <B>Debug</B>
and then in the global namespace.
It looks up the command <B>printTrace</B> in the same way.
If a variable or command name is not found in either context,
the name is undefined.
To make this point absolutely clear, consider the following example:
<PRE><B>set traceLevel 0
namespace eval Foo {
variable traceLevel 3
namespace eval Debug {
printTrace $traceLevel
}
}</B></PRE>
Here Tcl looks for <B>traceLevel</B> first in the namespace <B>Foo::Debug</B>.
Since it is not found there, Tcl then looks for it
in the global namespace.
The variable <B>Foo::traceLevel</B> is completely ignored
during the name resolution process.
<P>
You can use the <B>namespace which</B> command to clear up any question
about name resolution.
For example, the command:
<PRE><B>namespace eval Foo::Debug {namespace which -variable traceLevel}</B></PRE>
returns <B>::traceLevel</B>.
On the other hand, the command,
<PRE><B>namespace eval Foo {namespace which -variable traceLevel}</B></PRE>
returns <B>::Foo::traceLevel</B>.
<P>
As mentioned above,
namespace names are looked up differently
than the names of variables and commands.
Namespace names are always resolved in the current namespace.
This means, for example,
that a <B>namespace eval</B> command that creates a new namespace
always creates a child of the current namespace
unless the new namespace name begins with a <B>::</B>.
<P>
Tcl has no access control to limit what variables, commands,
or namespaces you can reference.
If you provide a qualified name that resolves to an element
by the name resolution rule above,
you can access the element.
<P>
You can access a namespace variable
from a procedure in the same namespace
by using the <B><A HREF="../TkCmd/variable.htm">variable</A></B> command.
Much like the <B><A HREF="../TkCmd/global.htm">global</A></B> command,
this creates a local link to the namespace variable.
If necessary, it also creates the variable in the current namespace
and initializes it.
Note that the <B><A HREF="../TkCmd/global.htm">global</A></B> command only creates links
to variables in the global namespace.
It is not necessary to use a <B><A HREF="../TkCmd/variable.htm">variable</A></B> command
if you always refer to the namespace variable using an
appropriate qualified name.
<H3><A NAME="M22">IMPORTING COMMANDS</A></H3>
Namespaces are often used to represent libraries.
Some library commands are used so frequently
that it is a nuisance to type their qualified names.
For example, suppose that all of the commands in a package
like BLT are contained in a namespace called <B>Blt</B>.
Then you might access these commands like this:
<PRE><B>Blt::graph .g -background red
Blt::table . .g 0,0</B></PRE>
If you use the <B>graph</B> and <B>table</B> commands frequently,
you may want to access them without the <B>Blt::</B> prefix.
You can do this by importing the commands into the current namespace,
like this:
<PRE><B>namespace import Blt::*</B></PRE>
This adds all exported commands from the <B>Blt</B> namespace
into the current namespace context, so you can write code like this:
<PRE><B>graph .g -background red
table . .g 0,0</B></PRE>
The <B>namespace import</B> command only imports commands
from a namespace that that namespace exported
with a <B>namespace export</B> command.
<P>
Importing <I>every</I> command from a namespace is generally
a bad idea since you don't know what you will get.
It is better to import just the specific commands you need.
For example, the command
<PRE><B>namespace import Blt::graph Blt::table</B></PRE>
imports only the <B>graph</B> and <B>table</B> commands into the
current context.
<P>
If you try to import a command that already exists, you will get an
error. This prevents you from importing the same command from two
different packages. But from time to time (perhaps when debugging),
you may want to get around this restriction. You may want to
reissue the <B>namespace import</B> command to pick up new commands
that have appeared in a namespace. In that case, you can use the
<B>-force</B> option, and existing commands will be silently overwritten:
<PRE><B>namespace import -force Blt::graph Blt::table</B></PRE>
If for some reason, you want to stop using the imported commands,
you can remove them with an <B>namespace forget</B> command, like this:
<PRE><B>namespace forget Blt::*</B></PRE>
This searches the current namespace for any commands imported from <B>Blt</B>.
If it finds any, it removes them. Otherwise, it does nothing.
After this, the <B>Blt</B> commands must be accessed with the <B>Blt::</B>
prefix.
<P>
When you delete a command from the exporting namespace like this:
<PRE><B>rename Blt::graph &quot;&quot;</B></PRE>
the command is automatically removed from all namespaces that import it.
<H3><A NAME="M23">EXPORTING COMMANDS</A></H3>
You can export commands from a namespace like this:
<PRE><B>namespace eval Counter {
namespace export bump reset
variable Num 0
variable Max 100
proc bump {{by 1}} {
variable Num
incr Num $by
Check
return $Num
}
proc reset {} {
variable Num
set Num 0
}
proc Check {} {
variable Num
variable Max
if {$Num &gt; $Max} {
error &quot;too high!&quot;
}
}
}</B></PRE>
The procedures <B>bump</B> and <B>reset</B> are exported,
so they are included when you import from the <B>Counter</B> namespace,
like this:
<PRE><B>namespace import Counter::*</B></PRE>
However, the <B>Check</B> procedure is not exported,
so it is ignored by the import operation.
<P>
The <B>namespace import</B> command only imports commands
that were declared as exported by their namespace.
The <B>namespace export</B> command specifies what commands
may be imported by other namespaces.
If a <B>namespace import</B> command specifies a command
that is not exported, the command is not imported.
<H3><A NAME="M24">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/variable.htm">variable</A></B>
<H3><A NAME="M25">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#exported">exported</A>, <A href="../Keywords/I.htm#internal">internal</A>, <A href="../Keywords/V.htm#variable">variable</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1997 Bell Labs Innovations for Lucent Technologies
<A HREF="../copyright.htm">Copyright</A> &#169; 1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

View File

@ -1,275 +0,0 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - open manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="open.htm#M2" NAME="L757">NAME</A>
<DL><DD>open - Open a file-based or command pipeline channel</DL>
<DD><A HREF="open.htm#M3" NAME="L758">SYNOPSIS</A>
<DL>
<DD><B>open </B><I>fileName</I>
<DD><B>open </B><I>fileName access</I>
<DD><B>open </B><I>fileName access permissions</I>
</DL>
<DD><A HREF="open.htm#M4" NAME="L759">DESCRIPTION</A>
<DL>
<DD><A HREF="open.htm#M5" NAME="L760"><B>r</B></A>
<DD><A HREF="open.htm#M6" NAME="L761"><B>r+</B></A>
<DD><A HREF="open.htm#M7" NAME="L762"><B>w</B></A>
<DD><A HREF="open.htm#M8" NAME="L763"><B>w+</B></A>
<DD><A HREF="open.htm#M9" NAME="L764"><B>a</B></A>
<DD><A HREF="open.htm#M10" NAME="L765"><B>a+</B></A>
</DL>
<DL>
<DD><A HREF="open.htm#M11" NAME="L766"><B>RDONLY</B></A>
<DD><A HREF="open.htm#M12" NAME="L767"><B>WRONLY</B></A>
<DD><A HREF="open.htm#M13" NAME="L768"><B>RDWR</B></A>
<DD><A HREF="open.htm#M14" NAME="L769"><B>APPEND</B></A>
<DD><A HREF="open.htm#M15" NAME="L770"><B>CREAT</B></A>
<DD><A HREF="open.htm#M16" NAME="L771"><B>EXCL</B></A>
<DD><A HREF="open.htm#M17" NAME="L772"><B>NOCTTY</B></A>
<DD><A HREF="open.htm#M18" NAME="L773"><B>NONBLOCK</B></A>
<DD><A HREF="open.htm#M19" NAME="L774"><B>TRUNC</B></A>
</DL>
<DD><A HREF="open.htm#M20" NAME="L775">COMMAND PIPELINES</A>
<DD><A HREF="open.htm#M21" NAME="L776">SERIAL COMMUNICATIONS</A>
<DD><A HREF="open.htm#M22" NAME="L777">CONFIGURATION OPTIONS</A>
<DL>
<DD><A HREF="open.htm#M23" NAME="L778"><B>-mode </B><I>baud</I><B>,</B><I>parity</I><B>,</B><I>data</I><B>,</B><I>stop</I></A>
<DD><A HREF="open.htm#M24" NAME="L779"><B>-pollinterval </B><I>msec</I></A>
<DD><A HREF="open.htm#M25" NAME="L780"><B>-lasterror</B></A>
</DL>
<DD><A HREF="open.htm#M26" NAME="L781">PORTABILITY ISSUES</A>
<DL>
<DD><A HREF="open.htm#M27" NAME="L782"><B>Windows </B>(all versions)</A>
<DD><A HREF="open.htm#M28" NAME="L783"><B>Windows NT</B></A>
<DD><A HREF="open.htm#M29" NAME="L784"><B>Windows 95</B></A>
<DD><A HREF="open.htm#M30" NAME="L785"><B>Macintosh</B></A>
<DD><A HREF="open.htm#M31" NAME="L786"><B>Unix</B></A>
</DL>
<DD><A HREF="open.htm#M32" NAME="L787">SEE ALSO</A>
<DD><A HREF="open.htm#M33" NAME="L788">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
open - Open a file-based or command pipeline channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>open </B><I>fileName</I><BR>
<B>open </B><I>fileName access</I><BR>
<B>open </B><I>fileName access permissions</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command opens a file, serial port, or command pipeline and returns a
channel identifier that may be used in future invocations of commands like
<B><A HREF="../TkCmd/read.htm">read</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, and <B><A HREF="../TkCmd/close.htm">close</A></B>.
If the first character of <I>fileName</I> is not <B>|</B> then
the command opens a file:
<I>fileName</I> gives the name of the file to open, and it must conform to the
conventions described in the <B><A HREF="../TkCmd/filename.htm">filename</A></B> manual entry.
<P>
The <I>access</I> argument, if present, indicates the way in which the file
(or command pipeline) is to be accessed.
In the first form <I>access</I> may have any of the following values:
<P>
<DL>
<P><DT><A NAME="M5"><B>r</B></A><DD>
Open the file for reading only; the file must already exist. This is the
default value if <I>access</I> is not specified.
<P><DT><A NAME="M6"><B>r+</B></A><DD>
Open the file for both reading and writing; the file must
already exist.
<P><DT><A NAME="M7"><B>w</B></A><DD>
Open the file for writing only. Truncate it if it exists. If it doesn't
exist, create a new file.
<P><DT><A NAME="M8"><B>w+</B></A><DD>
Open the file for reading and writing. Truncate it if it exists.
If it doesn't exist, create a new file.
<P><DT><A NAME="M9"><B>a</B></A><DD>
Open the file for writing only. If the file doesn't exist,
create a new empty file.
Set the initial access position to the end of the file.
<P><DT><A NAME="M10"><B>a+</B></A><DD>
Open the file for reading and writing. If the file doesn't exist,
create a new empty file.
Set the initial access position to the end of the file.
<P></DL>
<P>
In the second form, <I>access</I> consists of a list of any of the
following flags, all of which have the standard POSIX meanings.
One of the flags must be either <B>RDONLY</B>, <B>WRONLY</B> or <B>RDWR</B>.
<P>
<DL>
<P><DT><A NAME="M11"><B>RDONLY</B></A><DD>
Open the file for reading only.
<P><DT><A NAME="M12"><B>WRONLY</B></A><DD>
Open the file for writing only.
<P><DT><A NAME="M13"><B>RDWR</B></A><DD>
Open the file for both reading and writing.
<P><DT><A NAME="M14"><B>APPEND</B></A><DD>
Set the file pointer to the end of the file prior to each write.
<P><DT><A NAME="M15"><B>CREAT</B></A><DD>
Create the file if it doesn't already exist (without this flag it
is an error for the file not to exist).
<P><DT><A NAME="M16"><B>EXCL</B></A><DD>
If <B>CREAT</B> is also specified, an error is returned if the
file already exists.
<P><DT><A NAME="M17"><B>NOCTTY</B></A><DD>
If the file is a terminal device, this flag prevents the file from
becoming the controlling terminal of the process.
<P><DT><A NAME="M18"><B>NONBLOCK</B></A><DD>
Prevents the process from blocking while opening the file, and
possibly in subsequent I/O operations. The exact behavior of
this flag is system- and device-dependent; its use is discouraged
(it is better to use the <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B> command to put a file
in nonblocking mode).
For details refer to your system documentation on the <B>open</B> system
call's <B>O_NONBLOCK</B> flag.
<P><DT><A NAME="M19"><B>TRUNC</B></A><DD>
If the file exists it is truncated to zero length.
<P></DL>
<P>
If a new file is created as part of opening it, <I>permissions</I>
(an integer) is used to set the permissions for the new file in
conjunction with the process's file mode creation mask.
<I>Permissions</I> defaults to 0666.
<P>
Note that if you are going to be reading or writing binary data from
the channel created by this command, you should use the
<B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B> command to change the <B>-translation</B> option of
the channel to <B><A HREF="../TkCmd/binary.htm">binary</A></B> before transferring any binary data. This
is in contrast to the ``b'' character passed as part of the equivalent
of the <I>access</I> parameter to some versions of the C library
<I>fopen()</I> function.
<H3><A NAME="M20">COMMAND PIPELINES</A></H3>
If the first character of <I>fileName</I> is ``|'' then the
remaining characters of <I>fileName</I> are treated as a list of arguments
that describe a command pipeline to invoke, in the same style as the
arguments for <B><A HREF="../TkCmd/exec.htm">exec</A></B>.
In this case, the channel identifier returned by <B>open</B> may be used
to write to the command's input pipe or read from its output pipe,
depending on the value of <I>access</I>.
If write-only access is used (e.g. <I>access</I> is <B>w</B>), then
standard output for the pipeline is directed to the current standard
output unless overridden by the command.
If read-only access is used (e.g. <I>access</I> is <B>r</B>),
standard input for the pipeline is taken from the current standard
input unless overridden by the command.
<H3><A NAME="M21">SERIAL COMMUNICATIONS</A></H3>
If <I>fileName</I> refers to a serial port, then the specified serial port
is opened and initialized in a platform-dependent manner. Acceptable
values for the <I>fileName</I> to use to open a serial port are described in
the PORTABILITY ISSUES section.
<H3><A NAME="M22">CONFIGURATION OPTIONS</A></H3>
The <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B> command can be used to query and set the following
configuration option for open serial ports:
<P>
<DL>
<P><DT><A NAME="M23"><B>-mode </B><I>baud</I><B>,</B><I>parity</I><B>,</B><I>data</I><B>,</B><I>stop</I></A><DD>
This option is a set of 4 comma-separated values: the baud rate, parity,
number of data bits, and number of stop bits for this serial port. The
<I>baud</I> rate is a simple integer that specifies the connection speed.
<I>Parity</I> is one of the following letters: <B>n</B>, <B>o</B>, <B>e</B>,
<B>m</B>, <B>s</B>; respectively signifying the parity options of ``none'',
``odd'', ``even'', ``mark'', or ``space''. <I>Data</I> is the number of
data bits and should be an integer from 5 to 8, while <I>stop</I> is the
number of stop bits and should be the integer 1 or 2.
<P><DT><A NAME="M24"><B>-pollinterval </B><I>msec</I></A><DD>
This option, available only on Windows for serial ports, is used to
set the maximum time between polling for fileevents. This affects the
time interval between checking for events throughout the Tcl
interpreter (the smallest value always wins). Use this option only if
you want to poll the serial port more often than 10 msec (the default).
<P><DT><A NAME="M25"><B>-lasterror</B></A><DD>
This option is available only on Windows for serial ports, and is
query only (will only be reported when directly requested).
In case of a serial communication error, <B><A HREF="../TkCmd/read.htm">read</A></B> or <B><A HREF="../TkCmd/puts.htm">puts</A></B>
returns a general Tcl file I/O error.
<B>fconfigure -lasterror</B> can be called to get a list
of error details (e.g. FRAME RXOVER).
<P></DL>
<H3><A NAME="M26">PORTABILITY ISSUES</A></H3>
<P>
<P>
<DL>
<P><DT><A NAME="M27"><B>Windows </B>(all versions)</A><DD>
Valid values for <I>fileName</I> to open a serial port are of the form
<B>com</B><I>X</I><B>:</B>, where <I>X</I> is a number, generally from 1 to 4.
This notation only works for serial ports from 1 to 9, if the system
happens to have more than four. An attempt to open a serial port that
does not exist or has a number greater than 9 will fail. An alternate
form of opening serial ports is to use the filename <B>&#92;&#92;.&#92;comX</B>,
where X is any number that corresponds to a serial port; please note
that this method is considerably slower on Windows 95 and Windows 98.
<P><DT><A NAME="M28"><B>Windows NT</B></A><DD>
When running Tcl interactively, there may be some strange interactions
between the real console, if one is present, and a command pipeline that uses
standard input or output. If a command pipeline is opened for reading, some
of the lines entered at the console will be sent to the command pipeline and
some will be sent to the Tcl evaluator. If a command pipeline is opened for
writing, keystrokes entered into the console are not visible until the the
pipe is closed. This behavior occurs whether the command pipeline is
executing 16-bit or 32-bit applications. These problems only occur because
both Tcl and the child application are competing for the console at
the same time. If the command pipeline is started from a script, so that Tcl
is not accessing the console, or if the command pipeline does not use
standard input or output, but is redirected from or to a file, then the
above problems do not occur.
<P><DT><A NAME="M29"><B>Windows 95</B></A><DD>
A command pipeline that executes a 16-bit DOS application cannot be opened
for both reading and writing, since 16-bit DOS applications that receive
standard input from a pipe and send standard output to a pipe run
synchronously. Command pipelines that do not execute 16-bit DOS
applications run asynchronously and can be opened for both reading and
writing.
<P>
When running Tcl interactively, there may be some strange interactions
between the real console, if one is present, and a command pipeline that uses
standard input or output. If a command pipeline is opened for reading from
a 32-bit application, some of the keystrokes entered at the console will be
sent to the command pipeline and some will be sent to the Tcl evaluator. If
a command pipeline is opened for writing to a 32-bit application, no output
is visible on the console until the the pipe is closed. These problems only
occur because both Tcl and the child application are competing for the
console at the same time. If the command pipeline is started from a script,
so that Tcl is not accessing the console, or if the command pipeline does
not use standard input or output, but is redirected from or to a file, then
the above problems do not occur.
<P>
Whether or not Tcl is running interactively, if a command pipeline is opened
for reading from a 16-bit DOS application, the call to <B>open</B> will not
return until end-of-file has been received from the command pipeline's
standard output. If a command pipeline is opened for writing to a 16-bit DOS
application, no data will be sent to the command pipeline's standard output
until the pipe is actually closed. This problem occurs because 16-bit DOS
applications are run synchronously, as described above.
<P><DT><A NAME="M30"><B>Macintosh</B></A><DD>
Opening a serial port is not currently implemented under Macintosh.
<P>
Opening a command pipeline is not supported under Macintosh, since
applications do not support the concept of standard input or output.
<P><DT><A NAME="M31"><B>Unix</B></A><DD>
Valid values for <I>fileName</I> to open a serial port are generally of the
form <B>/dev/tty</B><I>X</I>, where <I>X</I> is <B>a</B> or <B>b</B>, but the name
of any pseudo-file that maps to a serial port may be used.
<P>
When running Tcl interactively, there may be some strange interactions
between the console, if one is present, and a command pipeline that uses
standard input. If a command pipeline is opened for reading, some
of the lines entered at the console will be sent to the command pipeline and
some will be sent to the Tcl evaluator. This problem only occurs because
both Tcl and the child application are competing for the console at the
same time. If the command pipeline is started from a script, so that Tcl is
not accessing the console, or if the command pipeline does not use standard
input, but is redirected from a file, then the above problem does not occur.
<P></DL>
<P>
See the PORTABILITY ISSUES section of the <B><A HREF="../TkCmd/exec.htm">exec</A></B> command for additional
information not specific to command pipelines about executing
applications on the various platforms
<H3><A NAME="M32">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/close.htm">close</A></B>, <B><A HREF="../TkCmd/filename.htm">filename</A></B>, <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B>, <B><A HREF="../TkCmd/gets.htm">gets</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/exec.htm">exec</A></B>, <B>fopen</B>
<H3><A NAME="M33">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#access mode">access mode</A>, <A href="../Keywords/A.htm#append">append</A>, <A href="../Keywords/C.htm#create">create</A>, <A href="../Keywords/F.htm#file">file</A>, <A href="../Keywords/N.htm#non-blocking">non-blocking</A>, <A href="../Keywords/O.htm#open">open</A>, <A href="../Keywords/P.htm#permissions">permissions</A>, <A href="../Keywords/P.htm#pipeline">pipeline</A>, <A href="../Keywords/P.htm#process">process</A>, <A href="../Keywords/S.htm#serial">serial</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

Some files were not shown because too many files have changed in this diff Show More