294 lines
8.8 KiB
HTML
294 lines
8.8 KiB
HTML
<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> -background or -bg</TD>
|
|
<TD> -homogeneous</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD> -padx</TD>
|
|
<TD> -pady</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD> -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> <A HREF="#-anchor">-anchor</A></TR>
|
|
<TD> <A HREF="#-bitmap">-bitmap</A></TR>
|
|
</TR>
|
|
<TR>
|
|
<TD> <A HREF="#-cancel">-cancel</A></TR>
|
|
<TD> <A HREF="#-default">-default</A></TR>
|
|
</TR>
|
|
<TR>
|
|
<TD> <A HREF="#-image">-image</A></TR>
|
|
<TD> <A HREF="#-modal">-modal</A></TR>
|
|
</TR>
|
|
<TR>
|
|
<TD> <A HREF="#-parent">-parent</A></TR>
|
|
<TD> <A HREF="#-separator">-separator</A></TR>
|
|
</TR>
|
|
<TR>
|
|
<TD> <A HREF="#-side">-side</A></TR>
|
|
<TD> <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>
|