1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1995 DSC Technologies Corporation
|
3 |
|
|
'\"
|
4 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
5 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
6 |
|
|
'\"
|
7 |
|
|
'\" @(#) dialog.n 1.21 94/12/17 16:04:44
|
8 |
|
|
'/"
|
9 |
|
|
.so man.macros
|
10 |
|
|
.HS dialog iwid
|
11 |
|
|
.BS
|
12 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
13 |
|
|
.SH NAME
|
14 |
|
|
dialog \- Create and manipulate a dialog widget
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
\fBdialog\fI \fIpathName \fR?\fIoptions\fR?
|
17 |
|
|
.SH "INHERITANCE"
|
18 |
|
|
itk::Toplevel <- Shell <- Dialogshell <- Dialog
|
19 |
|
|
.SH "STANDARD OPTIONS"
|
20 |
|
|
.LP
|
21 |
|
|
.nf
|
22 |
|
|
.ta 4c 8c 12c
|
23 |
|
|
\fBbackground\fR \fBcursor\fR \fBforeground\fR
|
24 |
|
|
.fi
|
25 |
|
|
.LP
|
26 |
|
|
See the "options" manual entry for details on the standard options.
|
27 |
|
|
.SH "INHERITED OPTIONS"
|
28 |
|
|
.LP
|
29 |
|
|
.nf
|
30 |
|
|
.ta 4c 8c 12c
|
31 |
|
|
\fBbuttonBoxPadX\fR \fBbuttonBoxPadY\fR \fBbuttonBoxPos\fR \fBpadX\fR
|
32 |
|
|
\fBpadY\fR \fBseparator\fR \fBthickness\fR
|
33 |
|
|
.fi
|
34 |
|
|
.LP
|
35 |
|
|
See the "dialogshell" manual entry for details on the above inherited options.
|
36 |
|
|
.LP
|
37 |
|
|
.nf
|
38 |
|
|
.ta 4c 8c 12c
|
39 |
|
|
\fBheight\fR \fBmaster\fR \fBmodality\fR \fBwidth\fR
|
40 |
|
|
.fi
|
41 |
|
|
.LP
|
42 |
|
|
See the "shell" manual entry for details on the above inherited options.
|
43 |
|
|
.LP
|
44 |
|
|
.nf
|
45 |
|
|
.ta 4c 8c 12c
|
46 |
|
|
\fBtitle\fR
|
47 |
|
|
.fi
|
48 |
|
|
.LP
|
49 |
|
|
See the "Toplevel" manual entry for details on the above inherited options.
|
50 |
|
|
.BE
|
51 |
|
|
|
52 |
|
|
.SH DESCRIPTION
|
53 |
|
|
.PP
|
54 |
|
|
The \fBdialog\fR command creates a dialog box providing standard
|
55 |
|
|
buttons and a child site for use in derived classes. The buttons
|
56 |
|
|
include ok, apply, cancel, and help. Methods and Options exist to
|
57 |
|
|
configure the buttons and their containing box.
|
58 |
|
|
|
59 |
|
|
.SH "METHODS"
|
60 |
|
|
.PP
|
61 |
|
|
The \fBdialog\fR command creates a new Tcl command whose
|
62 |
|
|
name is \fIpathName\fR. This
|
63 |
|
|
command may be used to invoke various
|
64 |
|
|
operations on the widget. It has the following general form:
|
65 |
|
|
.DS C
|
66 |
|
|
\fIpathName option \fR?\fIarg arg ...\fR?
|
67 |
|
|
.DE
|
68 |
|
|
\fIOption\fR and the \fIarg\fRs
|
69 |
|
|
determine the exact behavior of the command. The following
|
70 |
|
|
commands are possible for dialog widgets:
|
71 |
|
|
.SH "INHERITED METHODS"
|
72 |
|
|
.LP
|
73 |
|
|
.nf
|
74 |
|
|
.ta 4c 8c 12c
|
75 |
|
|
\fBadd\fR \fBbuttonconfigure\fR \fBdefault\fR \fBhide\fR
|
76 |
|
|
\fBindex\fR \fBinsert\fR \fBinvoke\fR \fBshow\fR
|
77 |
|
|
.fi
|
78 |
|
|
.LP
|
79 |
|
|
See the "buttonbox" manual entry for details on the above inherited methods.
|
80 |
|
|
.LP
|
81 |
|
|
.nf
|
82 |
|
|
.ta 4c 8c 12c
|
83 |
|
|
\fBchildsite\fR
|
84 |
|
|
.fi
|
85 |
|
|
.LP
|
86 |
|
|
See the "dialogshell" manual entry for details on the above inherited methods.
|
87 |
|
|
.LP
|
88 |
|
|
.nf
|
89 |
|
|
.ta 4c 8c 12c
|
90 |
|
|
\fBactivate\fR \fBcenter\fR \fBdeactivate\fR
|
91 |
|
|
.fi
|
92 |
|
|
.LP
|
93 |
|
|
See the "shell" manual entry for details on the above inherited methods.
|
94 |
|
|
|
95 |
|
|
.SH "WIDGET-SPECIFIC METHODS"
|
96 |
|
|
.TP
|
97 |
|
|
\fIpathName \fBcget\fR \fIoption\fR
|
98 |
|
|
Returns the current value of the configuration option given
|
99 |
|
|
by \fIoption\fR.
|
100 |
|
|
\fIOption\fR may have any of the values accepted by the \fBdialog\fR
|
101 |
|
|
command.
|
102 |
|
|
.TP
|
103 |
|
|
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
104 |
|
|
Query or modify the configuration options of the widget.
|
105 |
|
|
If no \fIoption\fR is specified, returns a list describing all of
|
106 |
|
|
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
|
107 |
|
|
information on the format of this list). If \fIoption\fR is specified
|
108 |
|
|
with no \fIvalue\fR, then the command returns a list describing the
|
109 |
|
|
one named option (this list will be identical to the corresponding
|
110 |
|
|
sublist of the value returned if no \fIoption\fR is specified). If
|
111 |
|
|
one or more \fIoption\-value\fR pairs are specified, then the command
|
112 |
|
|
modifies the given widget option(s) to have the given value(s); in
|
113 |
|
|
this case the command returns an empty string.
|
114 |
|
|
\fIOption\fR may have any of the values accepted by the \fBdialog\fR
|
115 |
|
|
command.
|
116 |
|
|
|
117 |
|
|
.SH EXAMPLE
|
118 |
|
|
.DS
|
119 |
|
|
dialog .d -modality global
|
120 |
|
|
.d buttonconfigure OK -command {puts OK; .d deactivate 1}
|
121 |
|
|
.d buttonconfigure Apply -command {puts Apply}
|
122 |
|
|
.d buttonconfigure Cancel -command {puts Cancel; .d deactivate 0}
|
123 |
|
|
.d buttonconfigure Help -command {puts Help}
|
124 |
|
|
|
125 |
|
|
listbox [.d childsite].lb -relief sunken
|
126 |
|
|
pack [.d childsite].lb -expand yes -fill both
|
127 |
|
|
|
128 |
|
|
if {[.d activate]} {
|
129 |
|
|
puts "Exit via OK button"
|
130 |
|
|
} else {
|
131 |
|
|
puts "Exit via Cancel button"
|
132 |
|
|
}
|
133 |
|
|
.DE
|
134 |
|
|
.SH AUTHOR
|
135 |
|
|
Mark L. Ulferts
|
136 |
|
|
.DE
|
137 |
|
|
Bret A. Schuhmacher
|
138 |
|
|
.SH KEYWORDS
|
139 |
|
|
dialog, dialogshell, shell, widget
|