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. |
| 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. |
| 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-2006 by Cogent Real-Time Systems, Inc. All rights reserved.