ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



iwidgets::watch(1)                             [incr Widgets]                             iwidgets::watch(1)



____________________________________________________________________________________________________________

NAME
       iwidgets::watch - Create and manipulate time with a watch widgets

SYNOPSIS
       iwidgets::watch pathName ?options?

INHERITANCE
       itk::Widget <- iwidgets::Watch


STANDARD OPTIONS
       background      cursor         foreground      relief

       See the "options" manual entry for details on the standard options.

ASSOCIATED OPTIONS
       See the "Canvas" manual entry for details on the above associated options.


WIDGET-SPECIFIC OPTIONS
       Name:           clockColor
       Class:          ColorfR
       Command-Line Switch:           -clockcolor

              Fill  color  for  the  main  oval  encapsulating  the watch, in any of the forms acceptable to
              Tk_GetColor.  The default is "White".

       Name:           clockStipple
       Class:          BitmapfR
       Command-Line Switch:           -clockstipple

              Bitmap for the main oval encapsulating the watch, in any of the forms  acceptable  to  Tk_Get-
              Bitmap.  The default is "".

       Name:           height
       Class:          Height
       Command-Line Switch:           -height

              Specifies  the height of the watch widget in any of the forms acceptable to Tk_GetPixels.  The
              default height is 175 pixels.

       Name:           hourColor
       Class:          ColorfR
       Command-Line Switch:           -hourcolor

              Fill color for the hour hand, in any of the forms acceptable to Tk_GetColor.  The  default  is
              "Red".

       Name:           hourRadius
       Class:          Radius
       Command-Line Switch:           -hourradius

              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:           minuteColor
       Class:          ColorfR
       Command-Line Switch:           -minutecolor

              Fill color for the minute hand, in any of the forms acceptable to Tk_GetColor.  The default is
              "Yellow".

       Name:           minuteRadius
       Class:          Radius
       Command-Line Switch:           -minuteradius

              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:           pivotColor
       Class:          ColorfR
       Command-Line Switch:           -pivotcolor

              Fill color for the circle in which the watch hands rotate in any of the  forms  acceptable  to
              Tk_GetColor.  The default is "White".

       Name:           pivotRadius
       Class:          Radius
       Command-Line Switch:           -pivotradius

              Specifies  the  radius  of  the  circle in which the watch hands rotate as a percentage of the
              radius.  The value must be a fraction <= 1.  The default is ".1".

       Name:           secondColor
       Class:          ColorfR
       Command-Line Switch:           -secondcolor

              Fill color for the second hand, in any of the forms acceptable to Tk_GetColor.  The default is
              "Black".

       Name:           secondRadius
       Class:          Radius
       Command-Line Switch:           -secondradius

              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:           showAmPm
       Class:          ShosAmPm
       Command-Line Switch:           -showampm

              Specifies whether the AM/PM radiobuttons should be displayed, in any of the  forms  acceptable
              to Tcl_GetBoolean.  The default is yes.

       Name:           state
       Class:          State
       Command-Line Switch:           -state

              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 normal, and disabled.  The
              defult is normal.

       Name:           tickColor
       Class:          ColorfR
       Command-Line Switch:           -tickcolor

              Fill  color for the 60 ticks around the perimeter of the watch, in any of the forms acceptable
              to Tk_GetColor.  The default is "Black".

       Name:           width
       Class:          Width
       Command-Line Switch:           -width

              Specifies the width of the watch widget in any of the forms acceptable to  Tk_GetPixels.   The
              default height is 155 pixels.
____________________________________________________________________________________________________________


DESCRIPTION
       The  iwidgets::watch  command  creates a watch with hour, minute, and second hands modifying the time
       value.


METHODS
       The iwidgets::watch 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:


WIDGET-SPECIFIC METHODS
       pathName cget option
              Returns the current value of the configuration option given by option.  Option may have any of
              the values accepted by the iwidgets::watch command.

       pathName configure ?option? ?value option value ...?
              Query or modify the configuration options of the widget.  If no option is specified, returns a
              list describing all of the available options for pathName (see Tk_ConfigureInfo  for  informa-
              tion  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 correspond-ing corresponding
              ing  sublist  of  the  value returned if no option is specified).  If one or more 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 val-ues values
              ues accepted by the iwidgets::watch command.

       pathName get ?format?
              Returns the current time of the watch in a format of string or as an integer clock value using
              the -string and -clicks format options respectively.  The default is by string.  Reference the
              clock command for more information on obtaining time and its formats.

       pathName show time
              Changes the currently displayed time to be that of the time argument.  The time may be  speci-fied specified
              fied  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 watch ?args?
              Evaluates the specifieds args against the canvas component.


COMPONENTS
       Name:           canvas
       Class:          Canvas

              The canvas component is the where the clock is drawn.  See the Canvas widget manual entry  for
              details.

       Name:           frame
       Class:          Frame

              The  frame component is the where the "AM" and "PM" radiobuttons are displayed.  See the Frame
              widget manual entry for details.

       Name:           am
       Class:          Radiobutton

              The am component indicates whether on not the time is relative to "AM".  See  the  Radiobutton
              widget manual entry for details.

       Name:           pm
       Class:          Radiobutton

              The  pm  component indicates whether on not the time is relative to "PM".  See the Radiobutton
              widget manual entry for details.


EXAMPLE
              package require Iwidgets 4.0
              iwidgets::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

KEYWORDS
       watch, hand, ticks, pivot, widget




Tk                                                                                        iwidgets::watch(1)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.