/usr/share/doc/tk-tile/html/dialog.html is in tk-tile 0.8.2-2.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | <html>
<head>
<link rel="stylesheet" href="manpage.css"><title>Tile package reference: dialog</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.12 $">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid8221fd8">NAME</a> · <a href="#SECTid8222050">SYNOPSIS</a> · <a href="#SECTid82221e0">DESCRIPTION</a> · <a href="#SECTid82222a8">OPTIONS</a> · <a href="#SECTid8222cf8">WIDGET COMMANDS</a> · <a href="#SECTid8222e38">PREDEFINED DIALOG TYPES</a> · <a href="#SECTid8222f78">STOCK BUTTONS</a> · <a href="#SECTid8223108">EXAMPLE</a> · <a href="#SECTid8223180">SEE ALSO</a>
</div><hr class="navsep">
</div><div class="body">
<h2><a name="SECTid8221fd8">NAME</a></h2><p class="namesection">
<b class="names">ttk::dialog - </b><br>create a dialog box</p>
<h2><a name="SECTid8222050">SYNOPSIS</a></h2><pre class="syntax">
<b>package require ttk::dialog</b> ?<i class="m">0.8</i>?
<b>ttk::dialog</b> <i class="m">pathname</i> ?<i class="m">options...</i>?
<b>ttk::dialog::define</b> <i class="m">dialogType</i> ?<i class="m">options...</i>?
</pre>
<h2><a name="SECTid82221e0">DESCRIPTION</a></h2><p>A dialog box is a transient top-level window
containing an icon, a short message, an optional, longer, detail message,
and a row of command buttons.
When the user presses any of the buttons,
a callback function is invoked
and then the dialog is destroyed.
</p><p>Additional widgets may be added in the dialog <i>client frame</i>.
</p>
<h2><a name="SECTid82222a8">OPTIONS</a></h2><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="option_-title">-title</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies a string to use as the window manager title.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-message">-message</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies the message to display in this dialog.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-detail">-detail</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies a longer auxiliary message.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-command">-command</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies a command prefix to be invoked when the user presses
one of the command buttons.
The symbolic name of the button is passed as an additional argument
to the command.
The dialog is dismissed after invoking the command.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-parent">-parent</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies a toplevel window for which the dialog is transient.
If omitted, the default is the nearest ancestor toplevel.
If set to the empty string, the dialog will not be a transient window.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-type">-type</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies a built-in or user-defined dialog type.
See <a href="#SECTid8222e38">PREDEFINED DIALOG TYPES</a>, below.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-icon">-icon</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies one of the stock dialog icons,
<b>info</b>, <b>question</b>, <b>warning</b>, <b>error</b>,
<b>auth</b>, or <b>busy</b>.
If set to the empty string (the default), no icon is displayed.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-buttons">-buttons</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A list of symbolic button names.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-labels">-labels</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A dictionary mapping symbolic button names to textual labels.
May be omitted if all the buttons are predefined.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-default">-default</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">The symbolic name of the default button.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="option_-cancel">-cancel</a></td><td width="40%" align="left">n/a</td><td width="40%" align="left">n/a</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">The symbolic name of the "cancel" button.
The cancel button is invoked if the user presses the Escape key
and when the dialog is closed from the window manager.
If <b>-cancel</b> is not specified,
the dialog ignores window manager close commands (WM_DELETE_WINDOW).
</td>
</tr>
</table></div>
<h2><a name="SECTid8222cf8">WIDGET COMMANDS</a></h2><dl>
<dt>
<b>ttk::dialog::clientframe</b> <i class="m">dlg</i>
</dt>
<dd>Returns the widget path of the client frame.
Other widgets may be added to the client frame.
The client frame appears between the detail message and the command buttons.
</dd>
</dl>
<h2><a name="SECTid8222e38">PREDEFINED DIALOG TYPES</a></h2><p>The <b>-type</b> option, if present, specifies default values
for other options. <b>ttk::dialog::define</b> <i>type options...</i>
specifies a new stock dialog <i>type</i>.
The following stock dialog types are predefined:
</p><pre class="example">
ttk::dialog::define ok \
-icon info -buttons {ok} -default ok
ttk::dialog::define okcancel \
-icon info -buttons {ok cancel} -default ok -cancel cancel
ttk::dialog::define yesno \
-icon question -buttons {yes no}
ttk::dialog::define yesnocancel \
-icon question -buttons {yes no cancel} -cancel cancel
ttk::dialog::define retrycancel \
-icon question -buttons {retry cancel} -cancel cancel
</pre>
<h2><a name="SECTid8222f78">STOCK BUTTONS</a></h2><p>The following ``stock'' symbolic button names have predefined labels:
<b>yes</b>, <b>no</b>, <b>ok</b>, <b>cancel</b>, and <b>retry</b>.
</p><p>It is not necessary to list these in the <b>-labels</b> dictionary.
</p>
<h2><a name="SECTid8223108">EXAMPLE</a></h2><pre class="example">
proc saveFileComplete {button} {
switch -- $button {
yes { # save file ... }
no { exit }
cancel { # no-op }
}
}
ttk::dialog .saveFileDialog \
-title "Save file?" \
-icon question \
-message "Save file before closing?" \
-detail "If you do not save the file, your work will be lost" \
-buttons [list yes no cancel] \
-labels [list yes "Save file" no "Don't save"] \
-command saveFileComplete \
;
</pre>
<h2><a name="SECTid8223180">SEE ALSO</a></h2><p class="seealso">tk_messageBox(n), wm(n), toplevel(n)</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
</div>
</body>
</html>
|