📄 shell.n
字号:
'\"'\" Copyright (c) 1995 DSC Technologies Corporation'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\"'\" @(#) shell.n 1.21 94/12/17 16:04:44'/" .so man.macros.HS shell iwid.BS'\" Note: do not modify the .SH NAME line immediately below!.SH NAMEshell \- Create and manipulate a shell widget.SH SYNOPSIS\fBshell\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Toplevel <- shell.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBbackground\fR \fBcursor\fR \fBforeground\fR.fi.LPSee the "options" manual entry for details on the standard options..SH "INHERITED OPTIONS".LP.nf.ta 4c 8c 12c\fBtitle\fR .fi.LPSee the "Toplevel" manual entry for details on the above inherited options..SH "WIDGET-SPECIFIC OPTIONS".LP.nfName: \fBheight\fRClass: \fBHeight\fRCommand-Line Switch: \fB-height\fR.fi.IPSpecifies the height of the shell. The value may be specified in any of the forms acceptable to \fBTk_GetPixels\fR. A value of zero causes the height to be adjusted to the required value based on the size requests of the components placed in the childsite. Otherwise, the height is fixed. The default is zero. NOTE: Thismay cause some amount of flickering on slower machines. To prevent itsimply set the width and height to a appropriate value..LP.nfName: \fBmaster\fRClass: \fBWindow\fRCommand-Line Switch: \fB-master\fR.fi.IPDefines the shell as being a transient window with the master windowgiven by the master option. The master window should be either anotherexisting toplevel window or {} for no master. The default is {} for shells and "." for dialogs..LP.nfName: \fBmodality\fRClass: \fBModality\fRCommand-Line Switch: \fB-modality\fR.fi.IPAllows the shell to grab control of the screen in one of three different ways:\fBapplication\fR, \fBsystem\fR, or \fBnone\fR.Application modal prevents any other toplevel windows within the applicationwhich are direct children of '.' from gaining focus. System modal locks the screen and prevents all windows from gaining focus regardless of application. A modality of none performs no grabs at all. The default is none..LP.nfName: \fBpadX\fRClass: \fBPad\fRCommand-Line Switch: \fB-padx\fR.fi.IPSpecifies a padding distance for the childsite in the X-direction inany of the forms acceptable to \fBTk_GetPixels\fR. The default is 10..LP.nfName: \fBpadY\fRClass: \fBPad\fRCommand-Line Switch: \fB-pady\fR.fi.IPSpecifies a padding distance for the childsite in the Y-direction inany of the forms acceptable to \fBTk_GetPixels\fR. The default is 10..LP.nfName: \fBwidth\fRClass: \fBWidth\fRCommand-Line Switch: \fB-width\fR.fi.IPSpecifies the width of the shell. The value may be specified in any of the forms acceptable to \fBTk_GetPixels\fR. A value of zero causes the width to be adjusted to the required value based on the size requests of the components placed in the childsite. Otherwise, the width is fixed. The default is zero. NOTE: Thismay cause some amount of flickering on slower machines. To prevent itsimply set the width and height to a appropriate value..BE.SH DESCRIPTION.PPThe \fBshell\fR command creates a shell which is a top level widget which supports modal operation..SH "METHODS".PPThe \fBshell\fR command create a new Tcl command whosename is \fIpathName\fR. This command may be used to invoke variousoperations on the widget. It has the following general form:.DS C\fIpathName option \fR?\fIarg arg ...\fR?.DE\fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command. The followingcommands are possible for shell widgets:.SH "WIDGET-SPECIFIC METHODS".TP\fIpathName \fBactivate\fRDisplay the shell and wait based on the modality. For applicationand system modal activations, perform a grab operation, and waitfor the result. The result may be returned via an argument to the\fBdeactivate\fR method..TP\fIpathName \fBcenter\fR \fI?widget?\fRCenters the shell with respect to another widget. The widget argumentis optional. If provided, it should be the path of another widget withto center upon. If absent, then the shell will be centered on the screenas a whole..TP\fIpathName \fBcget\fR \fIoption\fRReturns the current value of the configuration option givenby \fIoption\fR.\fIOption\fR may have any of the values accepted by the \fBshell\fRcommand..TP\fIpathName \fBchildsite\fRReturns the pathname of the child site widget..TP\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?Query or modify the configuration options of the widget.If no \fIoption\fR is specified, returns a list describing all ofthe available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list). If \fIoption\fR is specifiedwith no \fIvalue\fR, then the command returns a list describing theone named option (this list will be identical to the correspondingsublist of the value returned if no \fIoption\fR is specified). Ifone or more \fIoption\-value\fR pairs are specified, then the commandmodifies the given widget option(s) to have the given value(s); inthis case the command returns an empty string.\fIOption\fR may have any of the values accepted by the \fBshell\fRcommand..TP\fIpathName \fBdeactivate\fR ?\fIarg\fR?Deactivate the display of the shell. The method takes an optionalargument to be passed to the \fBactivate\fR method which returns the value.The optional argument is only effective for application and system modal dialogs..SH "COMPONENTS".LP.nfName: \fBshellchildsite\fRClass: \fBframe\fR.fi.IPThe shellchildsite component is the user child site for the shell. See the "frame" widget manual entry for details on the shellchildsite component item..fi.SH EXAMPLE.DS shell .sh -modality application -padx 20 -pady 20 -title Shell pack [label [.sh childsite].l -text SHELL] .sh center .sh activate.DE.SH AUTHORMark L. Ulferts.DEKris Raney.LP.SH KEYWORDSshell, widget
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -