Class Index | Cross Index | Namespace Index |
A small text clock widget.
Contained in: Gtk
Derived from:
Label
Derived by:
none
#include <gtk--/clock.h>
public function member index: |
||
Clock | (Type type = REALTIME); | |
static GtkType | get_type | (); |
GtkClock* | gtkobj | (); |
const GtkClock* | gtkobj | () const; |
static bool | isA | (Object* checkcast); |
void | set_format | (const Gtk::string& fmt); |
void | set_seconds | (time_t seconds); |
void | set_update_interval | (gint seconds); |
void | start | (); |
void | stop | (); |
virtual | ~Clock | (); |
protected function member index: |
||
explicit | Clock | (GtkClock* castitem); |
void | initialize_class | (); |
private function member index: |
||
Clock | (const Clock&); | |
Clock& | operator = | (const Clock&); |
Three modes of operation are supported. These are realtime - which displays the current time, count-up/increasing - which counts up from an initial value (like a stopwatch), and count-down/decreasing - which counts down from an initial value.
Note, however, that the accuracy of the gtkclock widget is limited
to 1 second.
The syntax of the string is identical to that of the function strftime(3). Further information about time strings can be found on this man page. The widget defaults to a string of "%H:%M" in realtime mode, or "%H:%M:%S" in count-up or count-down modes.
Works only in count-up and count-down modes. This function has no effect in realtime mode, as the clock time is determined by the system clock in realtime mode.
The seconds parameter is used to determine how often the time shown on the widget is updated. The default value is to update every second, but you may wish to increase this value. If you set the update interval to 0, the clock is never updated.
The clock will begin counting up or down from the time when this function is called, until gtk_clock_stop is called. This function has no effect in the realtime mode.
The clock ceases counting up or down, and the last time reached remains on the display. This function has no effect in the realtime mode (you can't start and stop real time! :-).