class PtClock PtBasic { clock_face_color; // color (Pt_ARG_CLOCK_FACE_COLOR) clock_face_outline_color; // color (Pt_ARG_CLOCK_FACE_OUTLINE_COLOR) clock_flags; // flag (Pt_ARG_CLOCK_FLAGS) clock_font; // string (Pt_ARG_CLOCK_FONT) clock_hour; // short (Pt_ARG_CLOCK_HOUR) clock_hour_color; // color (Pt_ARG_CLOCK_HOUR_COLOR) clock_hour_offset; // short (Pt_ARG_CLOCK_HOUR_OFFSET) clock_minute; // short (Pt_ARG_CLOCK_MINUTE) clock_minute_color; // color (Pt_ARG_CLOCK_MINUTE_COLOR) clock_minute_offset; // short (Pt_ARG_CLOCK_MINUTE_OFFSET) clock_second; // short (Pt_ARG_CLOCK_SECOND) clock_second_color; // color (Pt_ARG_CLOCK_SECOND_COLOR) clock_second_offset; // short (Pt_ARG_CLOCK_SECOND_OFFSET) clock_sep1; // string (Pt_ARG_CLOCK_SEP1) clock_sep1_color; // color (Pt_ARG_CLOCK_SEP1_COLOR) clock_sep2; // string (Pt_ARG_CLOCK_SEP2) clock_sep2_color; // color (Pt_ARG_CLOCK_SEP2_COLOR) clock_type; // short (Pt_ARG_CLOCK_TYPE) }
This widget displays a clock in one of three types: analog (with a dial and hands), digital, or LED format. The display is good for general time-keeping but is not very precise. It is updated about every second, and is prone to flickering. You can minimize this annoyance by not using a transparent fill color, by disabling the seconds, and/or by putting the clock in a PtContainer widget.
For detailed information, please refer to PtClock in the Photon documentation. |
An integer specifying the color of an analog clock face. Default is 0xffffff (white).
An integer specifying the color of the line around an analog clock face. Default is 0x0 (black).
Flags that define the clock's appearance and behavior. The default is PtCLOCK_TRACK_TIME | Pt_CLOCK_SHOW_SECONDS | Pt_CLOCK_SHOW_NUMBERS.
This instance variable may be a combination of zero or more of the following flags:
Constant | Description |
---|---|
Pt_CLOCK_TRACK_TIME | Updates the clock to current time, by the second. |
Pt_CLOCK_SHOW_SECONDS | Shows the seconds of the time. |
Pt_CLOCK_24_HOUR | Makes a 24-hour display, instead of 12-hour. |
Pt_CLOCK_SHOW_NUMBERS | Sets an analog clock to display numbers instead of hands. |
Pt_CLOCK_SHOW_AMPM | Adds an AM/PM display to digital and LED clocks. |
Pt_CLOCK_PAD_HOURS | Adds a leading zero to one-digit hour displays in digital and LED clocks. |
A string specifying the font for numbers on analog clocks, and for the whole display for digital clocks.
An integer indicating the current hour, minute, or second setting of the clock, in 24-hour format. The default for each of these is Pt_CLOCK_CURRENT, which sets to system time when the widget is realized.
An integer specifying the color for the hour, minute, or second display. The defaults are 0x0 (black), 0x0 , and 0xff0000 (red) respectively.
An integer specifying the number of hours, minutes, or seconds to offset the respective field in the display, if desired.
A string and a number specifying the character and color of the separator between the hours and the minutes on a digital clock. The defaults are 0x0 (black) and ":".
A string and a number specifying the character and color of the separator between the minutes and the seconds on a digital clock. The defaults are 0x0 (black) and ":".
This instance variable specifies the type of clock, and may have one of the following values:
Constant | Description |
---|---|
Pt_CLOCK_DIGITAL | The clock has a digital display that uses system fonts. |
Pt_CLOCK_ANALOG | The clock has an analog display: a dial with hands. |
Pt_CLOCK_LED | The clock has a display similar to an LED or LCD clock, which can be scaled. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.