ClockOutput Class Reference

Inherits Widget.

Inherited by Clock.

List of all members.

Public Types

enum  { SQUARE, ANALOG, ROUND, DIGITAL }

Public Member Functions

 ClockOutput (int x, int y, int w, int h, const char *l=0)
void value (unsigned long v)
void value (int, int, int)
unsigned long value () const
int hour () const
int minute () const
int second () const

Protected Member Functions

void draw (int, int, int, int)
void draw ()


Detailed Description

Base class of Clock, this one does not move, it just displays whatever time you set into it. The include file is <fltk/Clock.h>

type() may be set to SQUARE, ROUND, or DIGITAL (nyi).


Member Function Documentation

int ClockOutput::hour  )  const [inline]
 

Return the hour sent to the last call to value().

int ClockOutput::minute  )  const [inline]
 

Return the minute sent to the last call to value().

int ClockOutput::second  )  const [inline]
 

Return the second sent to the last call to value().

unsigned long ClockOutput::value  )  const [inline]
 

Return the last Unix timestamp the clock was set to.

void ClockOutput::value int  h,
int  m,
int  s
 

Set the hour, minute, and second to display. The hour is effectively taken modulus 12 and the minute and second modulus 60 to figure out where to place the hands. Redraw happens only if different.

This does not set the unsigned long value() member, as it can't because it does not know the date.

void ClockOutput::value unsigned long  v  ) 
 

Set the clock to a Unix timestamp. The value is passed through the localtime() library function and used to get the hour, minute, and second.


The documentation for this class was generated from the following files:
Sun Jan 7 00:55:17 2007. FLTK ©2006 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.