vdk 2.4.0
vdkgnomededit.h
1 /*
2  * ===========================
3  * VDK Visual Develeopment Kit
4  * Version 1.0.4
5  * December 1999
6  * ===========================
7  *
8  * Copyright (C) 1998, Mario Motta
9  * Developed by Mario Motta <mmotta@guest.net>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24  * 02111-1307, USA.
25  */
26 
27 #ifndef GNOME_DATE_EDIT_H
28 #define GNOME_DATE_EDIT_H
29 
30 #if HAVE_GNOME
31 #include <vdk/vdkobj.h>
32 #include <vdk/vdkdate.h>
33 #include <gnome.h>
34 class VDKForm;
46 class VDKGnomeDateEdit: public VDKObject
47 {
48  protected:
49  VDKObjectSignal s_activated;
50  void ConnectSignals();
51  static int FocusInEvent(GtkWidget *,
52  GdkEventFocus *,
53  gpointer wid);
54  static int FocusOutEvent(GtkWidget *,
55  GdkEventFocus *,
56  gpointer wid);
57  static void HandleDateChange(GtkWidget *wid, gpointer gp);
58  static void HandleTimeChange(GtkWidget *wid, gpointer gp);
59  // either mmddyyyy or ddmmyyyy
60  // reserved for future use,
61  // doesn't work now, waiting for i18n
62  // of gnome date edit widget.
63  int mode;
64  public:
68  VDKReadWriteValueProp<VDKGnomeDateEdit, time_t> AbsoluteTime;
72  VDKReadWriteValueProp<VDKGnomeDateEdit, calendardate> Date;
80  VDKGnomeDateEdit(VDKForm* owner,
81  time_t the_time = (time_t) NULL,
82  bool show_time = false,
83  bool format24 = true,
84  int mode = mmddyyyy);
94  VDKGnomeDateEdit(VDKForm* owner,
95  char* the_date = NULL,
96  bool show_time = false,
97  bool format24 = true,
98  int mode = mmddyyyy);
102  virtual ~VDKGnomeDateEdit();
107  void SetAbsoluteTime(time_t t)
108  {
109  gnome_date_edit_set_time (GNOME_DATE_EDIT(Widget()), t);
110  }
114  time_t GetAbsoluteTime()
115  {
116  return gnome_date_edit_get_date (GNOME_DATE_EDIT(Widget()));
117  }
122  void SetDate(calendardate d);
126  calendardate GetDate();
127 };
128 #endif
129 
130 #endif
Definition: vdkobj.h:137
VDKForm widgets, generally the outermost widget container.
Definition: forms.h:68
virtual GtkWidget * Widget()
Definition: vdkobj.cc:49
Definition: vdkobj.h:62
provides a date object
Definition: vdkdate.h:52