#include <colorpicker.h>
Inheritance diagram for AgeColor:


Public Methods | |
| AgeColor () | |
| virtual Gdk_Color | operator() (EntryRect const &er) |
|
|
00063 : 00064 curtime(time(NULL)) 00065 { 00066 oldest=60*60*24*365; 00067 } virtual Gdk_Color operator() (EntryRect const &er) |
|
|
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 }
|
1.2.18