OSDN Git Service

touched all sources to ease next import
[pf3gnuchains/pf3gnuchains3x.git] / itcl / iwidgets3.0.0 / demos / html / shell.n.html
1 <TITLE>shell - Create and manipulate a shell widget</TITLE>
2 <H1>shell - Create and manipulate a shell widget</H1>
3
4 </pre><H2>SYNOPSIS</H2>
5 <B>shell<I> <I>pathName </I>?<I>options</I>?
6 </pre><H2>INHERITANCE</H2>
7 itk::Toplevel &lt;- shell
8 </pre><H2>STANDARD OPTIONS</H2>
9 <P>
10 <table cellpadding=5>
11 <td valign=top>
12 <B>background</B><br>
13 </td>
14 <td valign=top>
15 <B>cursor</B><br>
16 </td>
17 <td valign=top>
18 <B>foreground</B><br>
19 </td>
20 <td valign=top>
21 </td>
22 </table>
23 <P>
24 See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/options.n.html"> "options" </A> manual entry for details on the standard options.
25 </pre><H2>INHERITED OPTIONS</H2>
26 <P>
27 <table cellpadding=5>
28 <td valign=top>
29 <B>title</B><br>
30 </td>
31 <td valign=top>
32 </td>
33 <td valign=top>
34 </td>
35 <td valign=top>
36 </td>
37 </table>
38 <P>
39 See the "Toplevel" manual entry for details on the above inherited options.
40
41 </pre><H2>WIDGET-SPECIFIC OPTIONS</H2>
42 <P>
43 <pre>
44 Name:                   <B>height</B>
45 Class:                  <B>Height</B>
46 Command-Line Switch:    <B>-height</B>
47 </pre>
48 <UL>
49 Specifies the height of the shell.  The value may be specified in 
50 any of the forms acceptable to <B>Tk_GetPixels</B>.  A value of zero 
51 causes the height to be adjusted to the required value based on 
52 the size requests of the components placed in the childsite.  
53 Otherwise, the height is fixed.  The default is zero.  NOTE: This
54 may cause some amount of flickering on slower machines.  To prevent it
55 simply set the width and height to a appropriate value.
56 </UL>
57 <P>
58 <pre>
59 Name:                   <B>master</B>
60 Class:                  <B>Window</B>
61 Command-Line Switch:    <B>-master</B>
62 </pre>
63 <UL>
64 Defines the shell as being a transient window with the master window
65 given by the master option.  The master window should be either another
66 existing toplevel window or {} for no master.  The default is {} for 
67 shells and "." for dialogs.
68 </UL>
69 <P>
70 <pre>
71 Name:                   <B>modality</B>
72 Class:                  <B>Modality</B>
73 Command-Line Switch:    <B>-modality</B>
74 </pre>
75 <UL>
76 Allows the shell to grab control of the screen in one of three different ways:
77 <B>application</B>, <B>system</B>, or <B>none</B>.
78 Application modal prevents any other toplevel windows within the application
79 which are direct children of '.' from gaining focus.  System modal locks 
80 the screen and prevents all windows from gaining focus regardless of 
81 application.  A modality of none performs no grabs at all.  The default 
82 is none.
83 </UL>
84 <P>
85 <pre>
86 Name:                   <B>padX</B>
87 Class:                  <B>Pad</B>
88 Command-Line Switch:    <B>-padx</B>
89 </pre>
90 <UL>
91 Specifies a padding distance for the childsite in the X-direction in
92 any of the forms acceptable to <B>Tk_GetPixels</B>.  The default is 10.
93 </UL>
94 <P>
95 <pre>
96 Name:                   <B>padY</B>
97 Class:                  <B>Pad</B>
98 Command-Line Switch:    <B>-pady</B>
99 </pre>
100 <UL>
101 Specifies a padding distance for the childsite in the Y-direction in
102 any of the forms acceptable to <B>Tk_GetPixels</B>.  The default is 10.
103 </UL>
104 <P>
105 <pre>
106 Name:                   <B>width</B>
107 Class:                  <B>Width</B>
108 Command-Line Switch:    <B>-width</B>
109 </pre>
110 <UL>
111 Specifies the width of the shell.  The value may be specified in 
112 any of the forms acceptable to <B>Tk_GetPixels</B>.  A value of zero 
113 causes the width to be adjusted to the required value based on 
114 the size requests of the components placed in the childsite.  
115 Otherwise, the width is fixed.  The default is zero.  NOTE: This
116 may cause some amount of flickering on slower machines.  To prevent it
117 simply set the width and height to a appropriate value.
118 </UL>
119 </pre><HR>
120
121 </pre><H2>DESCRIPTION</H2>
122 <P>
123 The <B>shell</B> command creates a shell which is a top 
124 level widget which supports modal operation.
125
126 </pre><H2>METHODS</H2>
127 <P>
128 The <B>shell</B> command create a new Tcl command whose
129 name is <I>pathName</I>.  This command may be used to invoke various
130 operations on the widget.  It has the following general form:
131 <pre>
132 <I>pathName option </I>?<I>arg arg ...</I>?
133 </pre>
134 <I>Option</I> and the <I>arg</I>s
135 determine the exact behavior of the command.  The following
136 commands are possible for shell widgets:
137 </pre><H2>WIDGET-SPECIFIC METHODS</H2>
138 <DL>
139 <DT> <I>pathName <B>activate</B>
140 </I></B>
141 <DD> Display the shell and wait based on the modality.  For application
142 and system modal activations, perform a grab operation, and wait
143 for the result.  The result may be returned via an argument to the
144 <B>deactivate</B> method.
145 </DL>
146 <DL>
147 <DT> <I>pathName <B>center</B> <I>?widget?</I>
148 </I></B>
149 <DD> Centers the shell with respect to another widget.  The widget argument
150 is optional.  If provided, it should be the path of another widget with
151 to center upon.  If absent, then the shell will be centered on the screen
152 as a whole.
153 </DL>
154 <DL>
155 <DT> <I>pathName <B>cget</B> <I>option</I>
156 </I></B>
157 <DD> Returns the current value of the configuration option given
158 by <I>option</I>.
159 <I>Option</I> may have any of the values accepted by the <B>shell</B>
160 command.
161 </DL>
162 <DL>
163 <DT> <I>pathName <B>childsite</B>
164 </I></B>
165 <DD> Returns the pathname of the child site widget.
166 </DL>
167 <DL>
168 <DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?
169 </I></B>
170 <DD> Query or modify the configuration options of the widget.
171 If no <I>option</I> is specified, returns a list describing all of
172 the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for
173 information on the format of this list).  If <I>option</I> is specified
174 with no <I>value</I>, then the command returns a list describing the
175 one named option (this list will be identical to the corresponding
176 sublist of the value returned if no <I>option</I> is specified).  If
177 one or more <I>option-value</I> pairs are specified, then the command
178 modifies the given widget option(s) to have the given value(s);  in
179 this case the command returns an empty string.
180 <I>Option</I> may have any of the values accepted by the <B>shell</B>
181 command.
182 </DL>
183 <DL>
184 <DT> <I>pathName <B>deactivate</B> ?<I>arg</I>?
185 </I></B>
186 <DD> Deactivate the display of the shell.  The method takes an optional
187 argument to be passed to the <B>activate</B> method which returns the value.
188 The optional argument is only effective for application and system 
189 modal dialogs.
190
191 </DL>
192 </pre><H2>COMPONENTS</H2>
193 <P>
194 <pre>
195 Name:                   <B>shellchildsite</B>
196 Class:                  <B>frame</B>
197 </pre>
198 <UL>
199 The shellchildsite component is the user child site for the shell.  See 
200 the "frame" widget manual entry for details on the shellchildsite 
201 component item.
202 </UL>
203 </table>
204
205 </pre><H2>EXAMPLE</H2>
206 <pre>
207  shell .sh -modality application -padx 20 -pady 20 -title Shell
208
209  pack [label [.sh childsite].l -text SHELL]
210
211  .sh center
212  .sh activate
213 </pre>
214 </pre><H2>AUTHOR</H2>
215 <A HREF="mailto:mulferts@spd.dsccc.com">Mark L. Ulferts</A>
216 </pre>
217 Kris Raney
218 <P>
219 </pre><H2>KEYWORDS</H2>
220 shell, widget