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)  

Fl_Clock_Output Class Reference

This widget can be used to display a program-supplied time. More...

#include <Fl_Clock.H>

Inheritance diagram for Fl_Clock_Output:
Collaboration diagram for Fl_Clock_Output:

List of all members.

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)

Detailed Description

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.


type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK
clock.png
round_clock.png

Definition at line 63 of file Fl_Clock.H.


Constructor & Destructor Documentation

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.

Parameters:
[in]X,Y,W,Hposition and size of the widget
[in]Lwidget 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().


Member Function Documentation

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]
int Fl_Clock_Output::hour ( ) const [inline]

Returns the displayed hour (0 to 23).

See also:
value(), minute(), second()

Definition at line 89 of file Fl_Clock.H.

int Fl_Clock_Output::minute ( ) const [inline]

Returns the displayed minute (0 to 59).

See also:
value(), hour(), second()

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).

See also:
value(), hour(), minute()

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.

Parameters:
[in]H,m,sdisplayed time
See also:
hour(), minute(), second()

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).

Parameters:
[in]vseconds since epoch
See also:
value()

Definition at line 142 of file Fl_Clock.cxx.

References value(), and vv.

ulong Fl_Clock_Output::value ( ) const [inline]

Returns the displayed time. Returns the time in seconds since the UNIX epoch (January 1, 1970).

See also:
value(ulong)

Definition at line 83 of file Fl_Clock.H.

Referenced by value().


The documentation for this class was generated from the following files: