FLTK 1.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions
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:

List of all members.

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

## 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

## 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,H | position and size of the widget
  [in] | L | widget label, default is no label

## Member Function Documentation

void Fl_Clock_Output::draw | ( | int | X,
|  | int | Y,
|  | int | W,
|  | int | H
| ) |  | `[protected]`

Draw clock with the given position and size.

Parameters:

  [in] | X,Y,W,H | position and size

int Fl_Clock_Output::hour | ( |  | ) | const`[inline]`

Returns the displayed hour (0 to 23).

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

int Fl_Clock_Output::minute | ( |  | ) | const`[inline]`

Returns the displayed minute (0 to 59).

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

int Fl_Clock_Output::second | ( |  | ) | const`[inline]`

Returns the displayed second (0 to 60, 60=leap second).

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

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] | v | seconds since epoch

See also:
  value()

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,s | displayed time

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

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)

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

- Fl_Clock.H
- Fl_Clock.cxx