📄 watch.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.'\"'\" @(#) watch.n'\".so man.macros.HS watch iwid.BS'\" Note: do not modify the .SH NAME line immediately below!.SH NAMEwatch \- Create and manipulate time with a watch widgets.SH SYNOPSIS\fBwatch\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Widget <- Watch.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBbackground\fR \fBcursor\fR \fBforeground\fR \fBrelief\fR.fi.LPSee the "options" manual entry for details on the standard options..SH "ASSOCIATED OPTIONS".LPSee the "Canvas" manual entry for details on the above associated options..SH "WIDGET-SPECIFIC OPTIONS".LP.nfName: \fBclockColor\fRClass: \fBColorfRCommand-Line Switch: \fB-clockcolor\fR.fi.IPFill color for the main oval encapsulating the watch, in any of the formsacceptable to \fBTk_GetColor\fR. The default is "White"..nf.LPName: \fBclockStipple\fRClass: \fBBitmapfRCommand-Line Switch: \fB-clockstipple\fR.fi.IPBitmap for the main oval encapsulating the watch, in any of the formsacceptable to \fBTk_GetBitmap\fR. The default is ""..LP.nfName: \fBheight\fRClass: \fBHeight\fRCommand-Line Switch: \fB-height\fR.fi.IPSpecifies the height of the watch widget in any of the forms acceptable to \fBTk_GetPixels\fR. The default height is 175 pixels..LP.nfName: \fBhourColor\fRClass: \fBColorfRCommand-Line Switch: \fB-hourcolor\fR.fi.IPFill color for the hour hand, in any of the forms acceptable to \fBTk_GetColor\fR.The default is "Red"..LP.nfName: \fBhourRadius\fRClass: \fBRadius\fRCommand-Line Switch: \fB-hourradius\fR.fi.IPSpecifies the radius of the hour hand as a percentage of the radiusfrom the center to the out perimeter of the clock.The value must be a fraction <= 1. The default is ".5"..LP.nfName: \fBminuteColor\fRClass: \fBColorfRCommand-Line Switch: \fB-minutecolor\fR.fi.IPFill color for the minute hand, in any of the forms acceptable to \fBTk_GetColor\fR.The default is "Yellow"..LP.nfName: \fBminuteRadius\fRClass: \fBRadius\fRCommand-Line Switch: \fB-minuteradius\fR.fi.IPSpecifies the radius of the minute hand as a percentage of the radiusfrom the center to the out perimeter of the clock.The value must be a fraction <= 1. The default is ".8"..LP.nfName: \fBpivotColor\fRClass: \fBColorfRCommand-Line Switch: \fB-pivotcolor\fR.fi.IPFill color for the circle in which the watch hands rotatein any of the forms acceptable to \fBTk_GetColor\fR.The default is "White"..LP.nfName: \fBpivotRadius\fRClass: \fBRadius\fRCommand-Line Switch: \fB-pivotradius\fR.fi.IPSpecifies the radius of the circle in which the watch hands rotateas a percentage of the radius. The value must be a fraction <= 1.The default is ".1"..LP.nfName: \fBsecondColor\fRClass: \fBColorfRCommand-Line Switch: \fB-secondcolor\fR.fi.IPFill color for the second hand, in any of the forms acceptable to \fBTk_GetColor\fR.The default is "Black"..LP.nfName: \fBsecondRadius\fRClass: \fBRadius\fRCommand-Line Switch: \fB-secondradius\fR.fi.IPSpecifies the radius of the second hand as a percentage of the radiusfrom the center to the out perimeter of the clock.The value must be a fraction <= 1. The default is ".9"..LP.nfName: \fBshowAmPm\fRClass: \fBShosAmPm\fRCommand-Line Switch: \fB-showampm\fR.fi.IPSpecifies whether the AM/PM radiobuttons should be displayed, in anyof the forms acceptable to \fBTcl_GetBoolean\fR. The default is yes..LP.nfName: \fBstate\fRClass: \fBState\fRCommand-Line Switch: \fB-state\fR.fi.IPSpecifies the editable state for the hands on the watch. In a normalstate, the user can select and move the hands via mouse button 1. The valid values are \fBnormal\fR, and \fBdisabled\fR. The defult is normal..LP.nfName: \fBtickColor\fRClass: \fBColorfRCommand-Line Switch: \fB-tickcolor\fR.fi.IPFill color for the 60 ticks around the perimeter of the watch,in any of the forms acceptable to \fBTk_GetColor\fR. The default is "Black"..LP.nfName: \fBwidth\fRClass: \fBWidth\fRCommand-Line Switch: \fB-width\fR.fi.IPSpecifies the width of the watch widget in any of the forms acceptable to \fBTk_GetPixels\fR. The default height is 155 pixels..BE.SH DESCRIPTION.PPThe \fBwatch\fR command creates a watch with hour, minute, andsecond hands modifying the time value..SH "METHODS".PPThe \fBwatch\fR command creates 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 watch widgets:.SH "WIDGET-SPECIFIC METHODS".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 \fBwatch\fRcommand..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 \fBwatch\fRcommand..TP\fIpathName \fBget\fR ?\fBformat\fR?Returns the current time of the watch in a format of string or as an integer clock value using the \fB-string\fR and \fB-clicks\fRformat options respectively. The default is by string. Reference the clock command for more information on obtaining time and its formats..TP\fIpathName \fBshow\fR \fItime\fRChanges the currently displayed time to be that of the time argument. The time may be specified either as a string, aninteger clock value or the keyword "now". Reference the clock command for more information on obtaining time and its format..TP\fIpathName \fBwatch\fR ?\fBargs\fR?Evaluates the specifieds \fBargs\fR against the canvas component..ta 4c.SH "COMPONENTS".LP.nfName: \fBcanvas\fRClass: \fBCanvas\fR.fi.IPThe canvas component is the where the clock is drawn. See the Canvas widget manual entry for details..LP.nfName: \fBframe\fRClass: \fBFrame\fR.fi.IPThe frame component is the where the "AM" and "PM" radiobuttons are displayed.See the Frame widget manual entry for details..LP.nfName: \fBam\fRClass: \fBRadiobutton\fR.fi.IPThe am component indicates whether on not the time is relative to "AM".See the Radiobutton widget manual entry for details..LP.nfName: \fBpm\fRClass: \fBRadiobutton\fR.fi.IPThe pm component indicates whether on not the time is relative to "PM".See the Radiobutton widget manual entry for details..fi.SH EXAMPLE.DSwatch .w -state disabled -showampm no -width 155 -height 155pack .w -padx 10 -pady 10 -fill both -expand yeswhile {1} { after 1000 .w show update}.DE.SH AUTHORJohn Tucker.DEMark L. Ulferts.SH KEYWORDSwatch, hand, ticks, pivot, widget
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -