NAME
iwidgets::watch - Create and manipulate time with a watch widgets
SYNOPSIS
iiwwiiddggeettss::::wwaattcchh pathName ?options? IINNHHEERRIITTAANNCCEEitk::Widget <- iwidgets::Watch
SSTTAANNDDAARRDD OOPPTTIIOONNSS bbaacckkggrroouunndd ccuurrssoorr ffoorreeggrroouunndd rreelliieeff See the "options" manual entry for details on the standard options. AASSSSOOCCIIAATTEEDD OOPPTTIIOONNSS See the "Canvas" manual entry for details on the above associated options.WWIIDDGGEETT-SSPPEECCIIFFIICC OOPPTTIIOONNSS
Name: cclloocckkCCoolloorr Class: CCoolloorrffRRCCoommmmaanndd-LLiinnee SSwwiittcchh:: -cclloocckkccoolloorr
Fill color for the main oval encapsulating the watch, in any of the forms acceptable to TTkkGGeettCCoolloorr. The default is "White". Name: cclloocckkSSttiippppllee Class: BBiittmmaappffRRCCoommmmaanndd-LLiinnee SSwwiittcchh:: -cclloocckkssttiippppllee
Bitmap for the main oval encapsulating the watch, in any of the forms acceptable to TTkkGGeettBBiittmmaapp. The default is "". Name: hheeiigghhtt Class: HHeeiigghhttCommand-Line Switch: -hheeiigghhtt
Specifies the height of the watch widget in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default height is 175 pixels. Name: hhoouurrCCoolloorr Class: CCoolloorrffRRCCoommmmaanndd-LLiinnee SSwwiittcchh:: -hhoouurrccoolloorr
Fill color for the hour hand, in any of the forms acceptable to TTkkGGeettCCoolloorr. The default is "Red". Name: hhoouurrRRaaddiiuuss Class: RRaaddiiuussCommand-Line Switch: -hhoouurrrraaddiiuuss
Specifies the radius of the hour hand as a percentage of the radius from the center to the out perimeter of the clock. The value must be a fraction <= 1. The default is ".5". Name: mmiinnuutteeCCoolloorr Class: CCoolloorrffRRCCoommmmaanndd-LLiinnee SSwwiittcchh:: -mmiinnuutteeccoolloorr
Fill color for the minute hand, in any of the forms acceptable to TTkkGGeettCCoolloorr. The default is "Yellow". Name: mmiinnuutteeRRaaddiiuuss Class: RRaaddiiuussCommand-Line Switch: -mmiinnuutteerraaddiiuuss
Specifies the radius of the minute hand as a percentage of the radius from the center to the out perimeter of the clock. The value must be a fraction <= 1. The default is ".8". Name: ppiivvoottCCoolloorr Class: CCoolloorrffRRCCoommmmaanndd-LLiinnee SSwwiittcchh:: -ppiivvoottccoolloorr
Fill color for the circle in which the watch hands rotate in any of the forms acceptable to TTkkGGeettCCoolloorr. The default is "White". Name: ppiivvoottRRaaddiiuuss Class: RRaaddiiuussCommand-Line Switch: -ppiivvoottrraaddiiuuss
Specifies the radius of the circle in which the watch handsrotate as a percentage of the radius. The value must be a frac-
tion <= 1. The default is ".1". Name: sseeccoonnddCCoolloorr Class: CCoolloorrffRRCCoommmmaanndd-LLiinnee SSwwiittcchh:: -sseeccoonnddccoolloorr
Fill color for the second hand, in any of the forms acceptable to TTkkGGeettCCoolloorr. The default is "Black". Name: sseeccoonnddRRaaddiiuuss Class: RRaaddiiuussCommand-Line Switch: -sseeccoonnddrraaddiiuuss
Specifies the radius of the second hand as a percentage of the radius from the center to the out perimeter of the clock. The value must be a fraction <= 1. The default is ".9". Name: sshhoowwAAmmPPmm Class: SShhoossAAmmPPmmCommand-Line Switch: -sshhoowwaammppmm
Specifies whether the AM/PM radiobuttons should be displayed, in any of the forms acceptable to TTccllGGeettBBoooolleeaann. The default is yes. Name: ssttaattee Class: SSttaatteeCommand-Line Switch: -ssttaattee
Specifies the editable state for the hands on the watch. In a normal state, the user can select and move the hands via mouse button 1. The valid values are nnoorrmmaall, and ddiissaabblleedd. The defult is normal. Name: ttiicckkCCoolloorr Class: CCoolloorrffRRCCoommmmaanndd-LLiinnee SSwwiittcchh:: -ttiicckkccoolloorr
Fill color for the 60 ticks around the perimeter of the watch, in any of the forms acceptable to TTkkGGeettCCoolloorr. The default is "Black". Name: wwiiddtthh Class: WWiiddtthhCommand-Line Switch: -wwiiddtthh
Specifies the width of the watch widget in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default height is 155 pixels.DESCRIPTION
The iiwwiiddggeettss::::wwaattcchh command creates a watch with hour, minute, and sec-
ond hands modifying the time value. MMEETTHHOODDSS The iiwwiiddggeettss::::wwaattcchh command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for watch widgets:WWIIDDGGEETT-SSPPEECCIIFFIICC MMEETTHHOODDSS
pathName ccggeett option Returns the current value of the configuration option given byoption. Option may have any of the values accepted by the iiwwiidd-
ggeettss::::wwaattcchh command. pathName ccoonnffiigguurree ?option? ?value option value ...? Query or modify the configuration options of the widget. If nooption is specified, returns a list describing all of the avail-
able options for pathName (see TTkkCCoonnffiigguurreeIInnffoo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one ormore option-value pairs are specified, then the command modifies
the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iiwwiiddggeettss::::wwaattcchh command. pathName ggeett ?ffoorrmmaatt? Returns the current time of the watch in a format of string oras an integer clock value using the -ssttrriinngg and -cclliicckkss format
options respectively. The default is by string. Reference the clock command for more information on obtaining time and its formats. pathName sshhooww time Changes the currently displayed time to be that of the time argument. The time may be specified either as a string, an integer clock value or the keyword "now". Reference the clock command for more information on obtaining time and its format. pathName wwaattcchh ?aarrggss? Evaluates the specifieds aarrggss against the canvas component. CCOOMMPPOONNEENNTTSS Name: ccaannvvaass Class: CCaannvvaass The canvas component is the where the clock is drawn. See the Canvas widget manual entry for details. Name: ffrraammee Class: FFrraammee The frame component is the where the "AM" and "PM" radiobuttons are displayed. See the Frame widget manual entry for details. Name: aamm Class: RRaaddiioobbuuttttoonn The am component indicates whether on not the time is relative to "AM". See the Radiobutton widget manual entry for details. Name: ppmm Class: RRaaddiioobbuuttttoonn The pm component indicates whether on not the time is relative to "PM". See the Radiobutton widget manual entry for details. EEXXAAMMPPLLEE package require Iwidgets 4.0iwidgets::watch .w -state disabled -showampm no -width 155 -height 155
pack .w -padx 10 -pady 10 -fill both -expand yes
while {1} { after 1000 .w show update } AUTHOR John Tucker Mark L. Ulferts KKEEYYWWOORRDDSS watch, hand, ticks, pivot, widget Tk iwidgets::watch(1)