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> 7itk::Toplevel <- 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> 24See 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> 39See the "Toplevel" manual entry for details on the above inherited options. 40 41</pre><H2>WIDGET-SPECIFIC OPTIONS</H2> 42<P> 43<pre> 44Name: <B>height</B> 45Class: <B>Height</B> 46Command-Line Switch: <B>-height</B> 47</pre> 48<UL> 49Specifies the height of the shell. The value may be specified in 50any of the forms acceptable to <B>Tk_GetPixels</B>. A value of zero 51causes the height to be adjusted to the required value based on 52the size requests of the components placed in the childsite. 53Otherwise, the height is fixed. The default is zero. NOTE: This 54may cause some amount of flickering on slower machines. To prevent it 55simply set the width and height to a appropriate value. 56</UL> 57<P> 58<pre> 59Name: <B>master</B> 60Class: <B>Window</B> 61Command-Line Switch: <B>-master</B> 62</pre> 63<UL> 64Defines the shell as being a transient window with the master window 65given by the master option. The master window should be either another 66existing toplevel window or {} for no master. The default is {} for 67shells and "." for dialogs. 68</UL> 69<P> 70<pre> 71Name: <B>modality</B> 72Class: <B>Modality</B> 73Command-Line Switch: <B>-modality</B> 74</pre> 75<UL> 76Allows 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>. 78Application modal prevents any other toplevel windows within the application 79which are direct children of '.' from gaining focus. System modal locks 80the screen and prevents all windows from gaining focus regardless of 81application. A modality of none performs no grabs at all. The default 82is none. 83</UL> 84<P> 85<pre> 86Name: <B>padX</B> 87Class: <B>Pad</B> 88Command-Line Switch: <B>-padx</B> 89</pre> 90<UL> 91Specifies a padding distance for the childsite in the X-direction in 92any of the forms acceptable to <B>Tk_GetPixels</B>. The default is 10. 93</UL> 94<P> 95<pre> 96Name: <B>padY</B> 97Class: <B>Pad</B> 98Command-Line Switch: <B>-pady</B> 99</pre> 100<UL> 101Specifies a padding distance for the childsite in the Y-direction in 102any of the forms acceptable to <B>Tk_GetPixels</B>. The default is 10. 103</UL> 104<P> 105<pre> 106Name: <B>width</B> 107Class: <B>Width</B> 108Command-Line Switch: <B>-width</B> 109</pre> 110<UL> 111Specifies the width of the shell. The value may be specified in 112any of the forms acceptable to <B>Tk_GetPixels</B>. A value of zero 113causes the width to be adjusted to the required value based on 114the size requests of the components placed in the childsite. 115Otherwise, the width is fixed. The default is zero. NOTE: This 116may cause some amount of flickering on slower machines. To prevent it 117simply set the width and height to a appropriate value. 118</UL> 119</pre><HR> 120 121</pre><H2>DESCRIPTION</H2> 122<P> 123The <B>shell</B> command creates a shell which is a top 124level widget which supports modal operation. 125 126</pre><H2>METHODS</H2> 127<P> 128The <B>shell</B> command create a new Tcl command whose 129name is <I>pathName</I>. This command may be used to invoke various 130operations 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 135determine the exact behavior of the command. The following 136commands 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 142and system modal activations, perform a grab operation, and wait 143for 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 150is optional. If provided, it should be the path of another widget with 151to center upon. If absent, then the shell will be centered on the screen 152as 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 158by <I>option</I>. 159<I>Option</I> may have any of the values accepted by the <B>shell</B> 160command. 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. 171If no <I>option</I> is specified, returns a list describing all of 172the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for 173information on the format of this list). If <I>option</I> is specified 174with no <I>value</I>, then the command returns a list describing the 175one named option (this list will be identical to the corresponding 176sublist of the value returned if no <I>option</I> is specified). If 177one or more <I>option-value</I> pairs are specified, then the command 178modifies the given widget option(s) to have the given value(s); in 179this case the command returns an empty string. 180<I>Option</I> may have any of the values accepted by the <B>shell</B> 181command. 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 187argument to be passed to the <B>activate</B> method which returns the value. 188The optional argument is only effective for application and system 189modal dialogs. 190 191</DL> 192</pre><H2>COMPONENTS</H2> 193<P> 194<pre> 195Name: <B>shellchildsite</B> 196Class: <B>frame</B> 197</pre> 198<UL> 199The shellchildsite component is the user child site for the shell. See 200the "frame" widget manual entry for details on the shellchildsite 201component 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> 215Mark L. Ulferts 216<P> 217Kris Raney 218</pre><H2>KEYWORDS</H2> 219shell, widget 220