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 |
|
|
'\" @(#) shell.n 1.21 94/12/17 16:04:44
|
8 |
|
|
'/"
|
9 |
|
|
.so man.macros
|
10 |
|
|
.HS shell iwid
|
11 |
|
|
.BS
|
12 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
13 |
|
|
.SH NAME
|
14 |
|
|
shell \- Create and manipulate a shell widget
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
\fBshell\fI \fIpathName \fR?\fIoptions\fR?
|
17 |
|
|
.SH "INHERITANCE"
|
18 |
|
|
itk::Toplevel <- shell
|
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 |
|
|
\fBtitle\fR
|
32 |
|
|
.fi
|
33 |
|
|
.LP
|
34 |
|
|
See the "Toplevel" manual entry for details on the above inherited options.
|
35 |
|
|
|
36 |
|
|
.SH "WIDGET-SPECIFIC OPTIONS"
|
37 |
|
|
.LP
|
38 |
|
|
.nf
|
39 |
|
|
Name: \fBheight\fR
|
40 |
|
|
Class: \fBHeight\fR
|
41 |
|
|
Command-Line Switch: \fB-height\fR
|
42 |
|
|
.fi
|
43 |
|
|
.IP
|
44 |
|
|
Specifies the height of the shell. The value may be specified in
|
45 |
|
|
any of the forms acceptable to \fBTk_GetPixels\fR. A value of zero
|
46 |
|
|
causes the height to be adjusted to the required value based on
|
47 |
|
|
the size requests of the components placed in the childsite.
|
48 |
|
|
Otherwise, the height is fixed. The default is zero. NOTE: This
|
49 |
|
|
may cause some amount of flickering on slower machines. To prevent it
|
50 |
|
|
simply set the width and height to a appropriate value.
|
51 |
|
|
.LP
|
52 |
|
|
.nf
|
53 |
|
|
Name: \fBmaster\fR
|
54 |
|
|
Class: \fBWindow\fR
|
55 |
|
|
Command-Line Switch: \fB-master\fR
|
56 |
|
|
.fi
|
57 |
|
|
.IP
|
58 |
|
|
Defines the shell as being a transient window with the master window
|
59 |
|
|
given by the master option. The master window should be either another
|
60 |
|
|
existing toplevel window or {} for no master. The default is {} for
|
61 |
|
|
shells and "." for dialogs.
|
62 |
|
|
.LP
|
63 |
|
|
.nf
|
64 |
|
|
Name: \fBmodality\fR
|
65 |
|
|
Class: \fBModality\fR
|
66 |
|
|
Command-Line Switch: \fB-modality\fR
|
67 |
|
|
.fi
|
68 |
|
|
.IP
|
69 |
|
|
Allows the shell to grab control of the screen in one of three different ways:
|
70 |
|
|
\fBapplication\fR, \fBsystem\fR, or \fBnone\fR.
|
71 |
|
|
Application modal prevents any other toplevel windows within the application
|
72 |
|
|
which are direct children of '.' from gaining focus. System modal locks
|
73 |
|
|
the screen and prevents all windows from gaining focus regardless of
|
74 |
|
|
application. A modality of none performs no grabs at all. The default
|
75 |
|
|
is none.
|
76 |
|
|
.LP
|
77 |
|
|
.nf
|
78 |
|
|
Name: \fBpadX\fR
|
79 |
|
|
Class: \fBPad\fR
|
80 |
|
|
Command-Line Switch: \fB-padx\fR
|
81 |
|
|
.fi
|
82 |
|
|
.IP
|
83 |
|
|
Specifies a padding distance for the childsite in the X-direction in
|
84 |
|
|
any of the forms acceptable to \fBTk_GetPixels\fR. The default is 10.
|
85 |
|
|
.LP
|
86 |
|
|
.nf
|
87 |
|
|
Name: \fBpadY\fR
|
88 |
|
|
Class: \fBPad\fR
|
89 |
|
|
Command-Line Switch: \fB-pady\fR
|
90 |
|
|
.fi
|
91 |
|
|
.IP
|
92 |
|
|
Specifies a padding distance for the childsite in the Y-direction in
|
93 |
|
|
any of the forms acceptable to \fBTk_GetPixels\fR. The default is 10.
|
94 |
|
|
.LP
|
95 |
|
|
.nf
|
96 |
|
|
Name: \fBwidth\fR
|
97 |
|
|
Class: \fBWidth\fR
|
98 |
|
|
Command-Line Switch: \fB-width\fR
|
99 |
|
|
.fi
|
100 |
|
|
.IP
|
101 |
|
|
Specifies the width of the shell. The value may be specified in
|
102 |
|
|
any of the forms acceptable to \fBTk_GetPixels\fR. A value of zero
|
103 |
|
|
causes the width to be adjusted to the required value based on
|
104 |
|
|
the size requests of the components placed in the childsite.
|
105 |
|
|
Otherwise, the width is fixed. The default is zero. NOTE: This
|
106 |
|
|
may cause some amount of flickering on slower machines. To prevent it
|
107 |
|
|
simply set the width and height to a appropriate value.
|
108 |
|
|
.BE
|
109 |
|
|
|
110 |
|
|
.SH DESCRIPTION
|
111 |
|
|
.PP
|
112 |
|
|
The \fBshell\fR command creates a shell which is a top
|
113 |
|
|
level widget which supports modal operation.
|
114 |
|
|
|
115 |
|
|
.SH "METHODS"
|
116 |
|
|
.PP
|
117 |
|
|
The \fBshell\fR command create a new Tcl command whose
|
118 |
|
|
name is \fIpathName\fR. This command may be used to invoke various
|
119 |
|
|
operations on the widget. It has the following general form:
|
120 |
|
|
.DS C
|
121 |
|
|
\fIpathName option \fR?\fIarg arg ...\fR?
|
122 |
|
|
.DE
|
123 |
|
|
\fIOption\fR and the \fIarg\fRs
|
124 |
|
|
determine the exact behavior of the command. The following
|
125 |
|
|
commands are possible for shell widgets:
|
126 |
|
|
.SH "WIDGET-SPECIFIC METHODS"
|
127 |
|
|
.TP
|
128 |
|
|
\fIpathName \fBactivate\fR
|
129 |
|
|
Display the shell and wait based on the modality. For application
|
130 |
|
|
and system modal activations, perform a grab operation, and wait
|
131 |
|
|
for the result. The result may be returned via an argument to the
|
132 |
|
|
\fBdeactivate\fR method.
|
133 |
|
|
.TP
|
134 |
|
|
\fIpathName \fBcenter\fR \fI?widget?\fR
|
135 |
|
|
Centers the shell with respect to another widget. The widget argument
|
136 |
|
|
is optional. If provided, it should be the path of another widget with
|
137 |
|
|
to center upon. If absent, then the shell will be centered on the screen
|
138 |
|
|
as a whole.
|
139 |
|
|
.TP
|
140 |
|
|
\fIpathName \fBcget\fR \fIoption\fR
|
141 |
|
|
Returns the current value of the configuration option given
|
142 |
|
|
by \fIoption\fR.
|
143 |
|
|
\fIOption\fR may have any of the values accepted by the \fBshell\fR
|
144 |
|
|
command.
|
145 |
|
|
.TP
|
146 |
|
|
\fIpathName \fBchildsite\fR
|
147 |
|
|
Returns the pathname of the child site widget.
|
148 |
|
|
.TP
|
149 |
|
|
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
150 |
|
|
Query or modify the configuration options of the widget.
|
151 |
|
|
If no \fIoption\fR is specified, returns a list describing all of
|
152 |
|
|
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
|
153 |
|
|
information on the format of this list). If \fIoption\fR is specified
|
154 |
|
|
with no \fIvalue\fR, then the command returns a list describing the
|
155 |
|
|
one named option (this list will be identical to the corresponding
|
156 |
|
|
sublist of the value returned if no \fIoption\fR is specified). If
|
157 |
|
|
one or more \fIoption\-value\fR pairs are specified, then the command
|
158 |
|
|
modifies the given widget option(s) to have the given value(s); in
|
159 |
|
|
this case the command returns an empty string.
|
160 |
|
|
\fIOption\fR may have any of the values accepted by the \fBshell\fR
|
161 |
|
|
command.
|
162 |
|
|
.TP
|
163 |
|
|
\fIpathName \fBdeactivate\fR ?\fIarg\fR?
|
164 |
|
|
Deactivate the display of the shell. The method takes an optional
|
165 |
|
|
argument to be passed to the \fBactivate\fR method which returns the value.
|
166 |
|
|
The optional argument is only effective for application and system
|
167 |
|
|
modal dialogs.
|
168 |
|
|
|
169 |
|
|
.SH "COMPONENTS"
|
170 |
|
|
.LP
|
171 |
|
|
.nf
|
172 |
|
|
Name: \fBshellchildsite\fR
|
173 |
|
|
Class: \fBframe\fR
|
174 |
|
|
.fi
|
175 |
|
|
.IP
|
176 |
|
|
The shellchildsite component is the user child site for the shell. See
|
177 |
|
|
the "frame" widget manual entry for details on the shellchildsite
|
178 |
|
|
component item.
|
179 |
|
|
.fi
|
180 |
|
|
|
181 |
|
|
.SH EXAMPLE
|
182 |
|
|
.DS
|
183 |
|
|
shell .sh -modality application -padx 20 -pady 20 -title Shell
|
184 |
|
|
|
185 |
|
|
pack [label [.sh childsite].l -text SHELL]
|
186 |
|
|
|
187 |
|
|
.sh center
|
188 |
|
|
.sh activate
|
189 |
|
|
.DE
|
190 |
|
|
.SH AUTHOR
|
191 |
|
|
Mark L. Ulferts
|
192 |
|
|
.DE
|
193 |
|
|
Kris Raney
|
194 |
|
|
.LP
|
195 |
|
|
.SH KEYWORDS
|
196 |
|
|
shell, widget
|