Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

AgeColor Class Reference

#include <colorpicker.h>

Inheritance diagram for AgeColor:

Inheritance graph
[legend]
Collaboration diagram for AgeColor:

Collaboration graph
[legend]
List of all members.

Public Methods

 AgeColor ()
virtual Gdk_Color operator() (EntryRect const &er)

Constructor & Destructor Documentation

AgeColor::AgeColor   [inline]
 

00063       :
00064    curtime(time(NULL))
00065    {
00066       oldest=60*60*24*365; 
00067    }
   virtual Gdk_Color operator() (EntryRect const &er)


Member Function Documentation

virtual Gdk_Color AgeColor::operator() EntryRect const &    er [inline, virtual]
 

Reimplemented from ColorPicker.

00069    {
00070       //const long yearsec=60*60*24*365;
00071       Gdk_Color agecolor;
00072       float age=curtime-er.get_EnTree().getATime();
00073       gint red=static_cast<gint>(age/oldest*65535);
00074 
00075       //gint green=er.get_EnTree().getMTime();
00076       //green=green%65535;
00077       agecolor.set_rgb(red, 65535-red, 0);
00078       return agecolor;
00079    }


The documentation for this class was generated from the following file:
Generated on Mon Apr 7 19:43:01 2003 for DuTree by doxygen1.2.18