NAME

lcdclock - A Dmhwidget for time and date display

SYNOPSIS

dmhwidgets::clock pathName ?options?

INHERITANCE

itk::Widget <- dmhwidgets::Lcdclock

STANDARD OPTIONS

background cursor foreground height

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

INHERITED OPTIONS

aspect

See the lcdigit manual entry.

WIDGET-SPECIFIC OPTIONS

Name: date  Class: Date  Command-Line Switch: -date  Default value: 0

The value is used as a boolean to determine if the date should be displayed.

Name: dateformat  Class: Dateformat  Command-Line Switch: -dateformat  Default value: "%A %B %d, %Y"

This value is used with with the Tcl clock command as a format specification for the displayed date.

Name: hours  Class: Hours  Command-Line Switch: -hours  Default value: 12

The value can be set to 12 or 24 to specify whether the clock should display hours as 1..12 or as 0..23.

Name: seconds  Class: Seconds  Command-Line Switch: -seconds  Default value: 0

The value is used as a boolean to specify whether the seconds digits are to be displayed.

Name: tilt  Class: Tilt  Command-Line Switch: -tilt  Default value: 0

The value is used as a non-negative integer specifying the percentage that the digits should be tilted clockwise. When the -tilt value is non-zero, an italic font is used for the date display.

Name: utc  Class: Utc  Command-Line Switch: -utc  Default value: 0

The value is used as a boolean to specify whether the display is for the Universal Coordinated Timezone (UTC), or for the local timezone.

DESCRIPTION

The lcdclock command creates a clock image widget drawn with 7 segment digits, and a new Tcl command whose name is pathname. The command is then used to invoke various methods of the widget. The command has the general form:

pathName option ?arg arg ... arg?

The widget resizes itself to fill the available height. The width is adjusted to keep the aspect ratio of the digits constant. The date text, if shown, is resized in proportion to the digits. The -height widget option is used as a specification for the digit height, so the overall widget height is larger if the date is displayed.

WIDGET-SPECIFIC METHODS

pathName flash
Blink the displayed time off, then on.

pathName run
Begin updating the displayed time every second. Called by the constructor.

pathName show hours minutes seconds
The widget can be used to display any time value using this method.

pathName stop
Stop updating the displayed time.

pathName update
Set the displayed time to the current time.

EXAMPLE


package require Dmhwidgets

proc testclock {{w .c}} {
    catch { destroy $w }
    toplevel $w -class Lcdclock
    wm title $w {Current Time}
    dmhwidgets::lcdclock $w.c -seconds 1 -hours 12 -height 250 -date 1
    pack $w.c -side top -expand 1 -fill both -anchor w
    frame $w.z
    pack $w.z -side top -expand 1 -fill x
    button $w.z.b -text Ok -command #
    button $w.z.x -text Exit -command exit
    pack $w.z.b $w.z.x -side left -padx 12m
    }

AUTHOR

Hume Integration Software, www.hume.com

KEYWORDS

clock, date, lcdigit, time, UTC, widget