{<name>:} clock
Clock sub-panel, analogue or digital.
Panel window
Tab window
<name>
A name to be given to the sub-panel for reference purposes.
-bc=<color>
The background color for the clock.
-df=<num>
The format of the digital display. <num>
should have one of the values permitted for the system identifier date_mode. This switch is ignored for analogue clocks.
The default is 3, English Verbose. A value of 0 may be used to indicate
a time-only format, i.e. without a date.
-dig
Display a digital clock. The default behavior is to display a circular
analogue clock.
-dim=<screen_xy>
Define the dimensions of the clock in pixels. This is usually redundant
because clocks are by default created sized-to-fit, but is useful when
the size needs to be overridden. This is a two-element numeric array providing
width and height. If only one is required, the other can be set to -1
and will be ignored.
-fo=<font>
The font to be used for digital clock text. This must be a fixed font. If
omitted the clock inherits the font of its parent row or column.
-fra
Enclose the clock by a frame. The default behavior is not to.
-gh
The sub-panel should be initially ghosted, i.e. insensitive to user
interaction.
-h=<num>
The height of the clock in pixels. For analogue clocks the default height is 100
pixels, for digital clocks the default height is derived from the font
height.
-icol=<color>
The color of the clock hands. If omitted, the text color is used (-tc).
-inv
Make the sub-panel invisible on creation.
-j=<just>
The justification of the clock within its parent row or column. Within a parent row the
value should be one of L, M, R. Within a parent column the value should
be one of T, M or B. The default in both cases is M.
-link=<text>
The resize linkage for the panel.
This ties panel edges to one or more edges of the parent
window, with the result that when the parent window gets resized, the
panel gets automatically resized as well. <text>
is a combination of the characters L, R, T, B and M. A value of "LRTB"
means that the left, right, top and bottom edges of a sub-panel are linked
to its parent. The default value is "TL",
which links the left and top edges to the parent window but does no resizing
because its right and bottom edges are not linked. Note that the linkage
is to edges of the parent window, not to column/row extremities. More
complicated linkage requirements should be done via the window.resize
callback on the parent window.
-off=<num>
Offset the time displayed by <num>
seconds to permit a different time-zone to be shown.
-pj=<just>
The position justification of the sub-panel within the panel window. This combined
with the -x and -y switches can be used to position the sub-panel by one
of its corners. The default is ’TL’. It also defines the control point
to be used when repositioning the sub-panel after creation.
-tc=<color>
The color for text in a digital or tick marks in an analogue clock. If omitted
the parent window "other color" is used.
-w=<num>
The width of the sub-panel in pixels. For analogue clocks the default width is 100
pixels, for digital clocks the default width is derived from the text
width and font size.
-x=<num>
The x position of the clock relative to the top-left corner of its parent row
or column. If omitted, the clock is placed adjacent to the previously
defined sub-panel.
-y=<num>
The y position of the clock relative to the top-left corner of its parent row
or column. If omitted, the clock is placed below the previously defined
sub-panel.
None
Create a panel window containing a simple analog clock of default size.
window w = wpanel { clock }
Create a panel window containing a framed digital clock of specified font and text color.
window w = wpanel { clock -dig,-tc=red,-fra,-fo=big_xfont }
Create a panel window containing a framed analog clock of specified colors and size.
window w = wpanel { clock -bc=yellow,-dim=<200,200>,-fra,-tc=blue,-icol=red }