FLTK 1.3.2
|
This widget can be used to display a program-supplied time. More...
#include <Fl_Clock.H>
Public Member Functions | |
Fl_Clock_Output (int X, int Y, int W, int H, const char *L=0) | |
Create a new Fl_Clock_Output widget with the given position, size and label. | |
int | hour () const |
Returns the displayed hour (0 to 23). | |
int | minute () const |
Returns the displayed minute (0 to 59). | |
int | second () const |
Returns the displayed second (0 to 60, 60=leap second). | |
void | value (ulong v) |
Set the displayed time. | |
void | value (int H, int m, int s) |
Set the displayed time. | |
ulong | value () const |
Returns the displayed time. | |
Protected Member Functions | |
void | draw () |
Draw clock with current position and size. | |
void | draw (int X, int Y, int W, int H) |
Draw clock with the given position and size. |
This widget can be used to display a program-supplied time.
The time shown on the clock is not updated. To display the current time, use Fl_Clock instead.
![]() | ![]() |
Fl_Clock_Output::Fl_Clock_Output | ( | int | X, |
int | Y, | ||
int | W, | ||
int | H, | ||
const char * | L = 0 |
||
) |
Create a new Fl_Clock_Output widget with the given position, size and label.
The default boxtype is FL_NO_BOX
.
[in] | X,Y,W,H | position and size of the widget |
[in] | L | widget label, default is no label |
void Fl_Clock_Output::draw | ( | int | X, |
int | Y, | ||
int | W, | ||
int | H | ||
) | [protected] |
Draw clock with the given position and size.
[in] | X,Y,W,H | position and size |
int Fl_Clock_Output::hour | ( | ) | const [inline] |
int Fl_Clock_Output::minute | ( | ) | const [inline] |
int Fl_Clock_Output::second | ( | ) | const [inline] |
void Fl_Clock_Output::value | ( | ulong | v | ) |
Set the displayed time.
Set the time in seconds since the UNIX epoch (January 1, 1970).
[in] | v | seconds since epoch |
void Fl_Clock_Output::value | ( | int | H, |
int | m, | ||
int | s | ||
) |
ulong Fl_Clock_Output::value | ( | ) | const [inline] |
Returns the displayed time.
Returns the time in seconds since the UNIX epoch (January 1, 1970).