1999-01-13 22:28:54 +03:00
|
|
|
<HTML><BODY>
|
2001-11-28 21:00:17 +03:00
|
|
|
<!-- NEW PAGE -->
|
1999-01-13 22:28:54 +03:00
|
|
|
<H2><A name=Fl_Clock>class Fl_Clock</A></H2>
|
|
|
|
<HR>
|
|
|
|
<H3>Class Hierarchy</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
1998-12-29 17:21:17 +03:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
+----<B>Fl_Clock</B>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Include Files</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
#include <FL/Fl_Clock.H>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Description</H3>
|
2001-11-29 22:24:00 +03:00
|
|
|
This widget provides a round analog clock display and is provided for
|
2002-01-15 05:17:19 +03:00
|
|
|
Forms compatibility. It installs a 1-second timeout callback using <A href="Fl.html#Fl.add_timeout">
|
2001-11-29 22:24:00 +03:00
|
|
|
<TT>Fl::add_timeout()</TT></A>.
|
2001-10-01 00:25:36 +04:00
|
|
|
<P ALIGN=CENTER><IMG src="clock.gif" ALT="Fl_Clock widget."> <IMG src="round_clock.gif" ALT="Fl_Clock widget."></P>
|
1999-01-13 22:28:54 +03:00
|
|
|
<H3>Methods</H3>
|
|
|
|
<UL>
|
|
|
|
<LI><A href=#Fl_Clock.Fl_Clock>Fl_Clock</A></LI>
|
|
|
|
<LI><A href=#Fl_Clock.~Fl_Clock>~Fl_Clock</A></LI>
|
|
|
|
<LI><A href=#Fl_Clock.hour>hour</A></LI>
|
|
|
|
<LI><A href=#Fl_Clock.minute>minute</A></LI>
|
|
|
|
<LI><A href=#Fl_Clock.second>second</A></LI>
|
|
|
|
<LI><A href=#Fl_Clock.value>value</A></LI>
|
|
|
|
</UL>
|
2001-11-29 22:24:00 +03:00
|
|
|
<H4><A name=Fl_Clock.Fl_Clock>Fl_Clock::Fl_Clock(int x, int y, int w,
|
1999-01-13 22:28:54 +03:00
|
|
|
int h, const char *label = 0)</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
Creates a new <TT>Fl_Clock</TT> widget using the given position, size,
|
|
|
|
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
1999-01-13 22:28:54 +03:00
|
|
|
<H4><A name=Fl_Clock.~Fl_Clock>virtual Fl_Clock::~Fl_Clock()</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
The destructor <I>also deletes all the children</I>. This allows a
|
|
|
|
whole tree to be deleted at once, without having to keep a pointer to
|
1999-01-13 22:28:54 +03:00
|
|
|
all the children in the user code. A kludge has been done so the <TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
Fl_Clock</TT> and all of it's children can be automatic (local)
|
|
|
|
variables, but you must declare the <TT>Fl_Clock</TT><I>first</I>, so
|
|
|
|
that it is destroyed last.
|
1999-01-13 22:28:54 +03:00
|
|
|
<H4><A name=Fl_Clock.hour>int Fl_Clock::hour() const</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
Returns the current hour (0 to 23).
|
1999-01-13 22:28:54 +03:00
|
|
|
<H4><A name=Fl_Clock.minute>int Fl_Clock::minute() const</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
Returns the current minute (0 to 59).
|
1999-01-13 22:28:54 +03:00
|
|
|
<H4><A name=Fl_Clock.second>int Fl_Clock::second() const</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
Returns the current second (0 to 60, 60 = leap second).
|
1999-01-13 22:28:54 +03:00
|
|
|
<H4><A name=Fl_Clock.value>void Fl_Clock::value(ulong v)
|
|
|
|
<BR> void Fl_Clock::value(int h, int m, int s)
|
|
|
|
<BR> ulong Fl_Clock::value(void)</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
The first two forms of <TT>value</TT> set the displayed time to the
|
|
|
|
given UNIX time value or specific hours, minutes, and seconds.
|
|
|
|
<P>The third form of <TT>value</TT> returns the displayed time in
|
1999-01-13 22:28:54 +03:00
|
|
|
seconds since the UNIX epoch (January 1, 1970). </P>
|
2001-10-01 00:25:36 +04:00
|
|
|
</BODY></HTML>
|