00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef GNOME_DATE_EDIT_H
00028 #define GNOME_DATE_EDIT_H
00029
00030 #if HAVE_GNOME
00031 #include <vdk/vdkobj.h>
00032 #include <vdk/vdkdate.h>
00033 #include <gnome.h>
00034 class VDKForm;
00046 class VDKGnomeDateEdit: public VDKObject
00047 {
00048 protected:
00049 VDKObjectSignal s_activated;
00050 void ConnectSignals();
00051 static int FocusInEvent(GtkWidget *,
00052 GdkEventFocus *,
00053 gpointer wid);
00054 static int FocusOutEvent(GtkWidget *,
00055 GdkEventFocus *,
00056 gpointer wid);
00057 static void HandleDateChange(GtkWidget *wid, gpointer gp);
00058 static void HandleTimeChange(GtkWidget *wid, gpointer gp);
00059
00060
00061
00062
00063 int mode;
00064 public:
00068 VDKReadWriteValueProp<VDKGnomeDateEdit, time_t> AbsoluteTime;
00072 VDKReadWriteValueProp<VDKGnomeDateEdit, calendardate> Date;
00080 VDKGnomeDateEdit(VDKForm* owner,
00081 time_t the_time = (time_t) NULL,
00082 bool show_time = false,
00083 bool format24 = true,
00084 int mode = mmddyyyy);
00094 VDKGnomeDateEdit(VDKForm* owner,
00095 char* the_date = NULL,
00096 bool show_time = false,
00097 bool format24 = true,
00098 int mode = mmddyyyy);
00102 virtual ~VDKGnomeDateEdit();
00107 void SetAbsoluteTime(time_t t)
00108 {
00109 gnome_date_edit_set_time (GNOME_DATE_EDIT(Widget()), t);
00110 }
00114 time_t GetAbsoluteTime()
00115 {
00116 return gnome_date_edit_get_date (GNOME_DATE_EDIT(Widget()));
00117 }
00122 void SetDate(calendardate d);
00126 calendardate GetDate();
00127 };
00128 #endif
00129
00130 #endif