fltk::Clock Class Reference

Inherits fltk::ClockOutput.

List of all members.

Public Member Functions

 Clock (int x, int y, int w, int h, const char *l=0)
int handle (int)
void update ()

Static Public Attributes

static NamedStyledefault_style = &::style

Detailed Description

This widget provides a round analog clock display and is provided for Forms compatibility. It installs a 1-second timeout callback using fltk::add_timeout().

The color() fills the background. The selectioncolor() (which defaults to GRAY85) fills the hands. The textcolor() is used to color in the tick marks and outline the hands.

type() may be set to SQUARE, ROUND, or DIGITAL (nyi). See the base class ClockOutput for some other methods.


Design credits: Original clock display written by Paul Haeberli at SGI.
Modifications by Mark Overmars for Forms
Further changes by Bill Spitzak for fltk

Constructor & Destructor Documentation

Clock::Clock ( int  x,
int  y,
int  w,
int  h,
const char *  l = 0 

The default constructor handballs to ClockOutput()

xThe x position of the Clock, relative to the Group
yThe y position of the Clock, relative to the Group
wThe width of the Clock
hThe height of the Clock
lThe label of the Clock

Member Function Documentation

int Clock::handle ( int  event) [virtual]

The Clock's handle routine This only reads SHOW, HIDE and TIMEOUT events, otherwise it throws back to ClockOutput::handle

eventThe event to handle
1 if the event was successfully handled,
0 otherwise

Reimplemented from fltk::Widget.

void fltk::Clock::update ( )

This looks NYI and, really, pretty useless. It's going to be removed from the API unless I can find a really good reason to keep it

Member Data Documentation

NamedStyle * Clock::default_style = &::style [static]

The default_style for Clock reverts selection_color_ to GRAY85, which is the colour used to fill the hands. Everything else is inherited

Reimplemented from fltk::Widget.

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