|
fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |
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) | |
| void | value (ulong v) |
| void | value (int H, int m, int s) |
| ulong | value () const |
| int | hour () const |
| int | minute () const |
| int | second () const |
Protected Member Functions | |
| void | draw () |
| void | draw (int X, int Y, int W, int H) |
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.
| | |
Definition at line 63 of file Fl_Clock.H.
| 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 |
Definition at line 157 of file Fl_Clock.cxx.
References Fl_Widget::align(), Fl_Widget::box(), FL_ALIGN_BOTTOM, fl_gray_ramp(), FL_UP_BOX, and Fl_Widget::selection_color().
| void Fl_Clock_Output::draw | ( | void | ) | [protected, virtual] |
Draw clock with current position and size.
Implements Fl_Widget.
Definition at line 117 of file Fl_Clock.cxx.
References Fl_Widget::draw_label(), Fl_Widget::h(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().
| 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 |
Definition at line 81 of file Fl_Clock.cxx.
References Fl_Widget::active_r(), Fl_Widget::box(), Fl_Widget::color(), Fl_Widget::draw_box(), fl_begin_loop(), fl_begin_polygon(), FL_BLACK, fl_circle(), fl_color(), fl_color_average(), fl_end_loop(), fl_end_polygon(), FL_FOREGROUND_COLOR, FL_GRAY, fl_inactive(), fl_pop_matrix(), fl_push_matrix(), fl_rotate(), FL_ROUND_CLOCK, fl_scale(), fl_translate(), rect(), Fl_Widget::selection_color(), and Fl_Widget::type().
| int Fl_Clock_Output::hour | ( | ) | const [inline] |
Returns the displayed hour (0 to 23).
Definition at line 89 of file Fl_Clock.H.
| int Fl_Clock_Output::minute | ( | ) | const [inline] |
Returns the displayed minute (0 to 59).
Definition at line 95 of file Fl_Clock.H.
| int Fl_Clock_Output::second | ( | ) | const [inline] |
Returns the displayed second (0 to 60, 60=leap second).
Definition at line 101 of file Fl_Clock.H.
| void Fl_Clock_Output::value | ( | int | H, |
| int | m, | ||
| int | s | ||
| ) |
Set the displayed time. Set the time in hours, minutes, and seconds.
| [in] | H,m,s | displayed time |
Definition at line 128 of file Fl_Clock.cxx.
References Fl_Widget::damage(), FL_DAMAGE_CHILD, H, and m.
| 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 |
Definition at line 142 of file Fl_Clock.cxx.
| ulong Fl_Clock_Output::value | ( | ) | const [inline] |
Returns the displayed time. Returns the time in seconds since the UNIX epoch (January 1, 1970).
Definition at line 83 of file Fl_Clock.H.
Referenced by value().