|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * gnucash-date-picker.h -- A popup date picker using gtk_calendar * 00003 * * 00004 * This program is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU General Public License as * 00006 * published by the Free Software Foundation; either version 2 of * 00007 * the License, or (at your option) any later version. * 00008 * * 00009 * This program is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU General Public License* 00015 * along with this program; if not, contact: * 00016 * * 00017 * Free Software Foundation Voice: +1-617-542-5942 * 00018 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00019 * Boston, MA 02110-1301, USA gnu@gnu.org * 00020 * * 00021 \********************************************************************/ 00022 00023 #ifndef GNUCASH_DATE_PICKER_H 00024 #define GNUCASH_DATE_PICKER_H 00025 00026 #include <gnome.h> 00027 00028 #define GNC_DATE_PICKER(obj) (GTK_CHECK_CAST((obj), gnc_date_picker_get_type (), GNCDatePicker)) 00029 #define GNC_DATE_PICKER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), gnc_date_picker_get_type (), GNCDatePickerClass)) 00030 #define IS_GNC_DATE_PICKER(o) (GTK_CHECK_TYPE((o), gnc_date_picker_get_type ())) 00031 00032 00033 typedef struct 00034 { 00035 GnomeCanvasWidget canvas_widget; 00036 00037 GtkCalendar *calendar; 00038 } GNCDatePicker; 00039 00040 00041 GType gnc_date_picker_get_type (void); 00042 00043 GnomeCanvasItem *gnc_date_picker_new (GnomeCanvasGroup *parent); 00044 00045 /* days are 1-31, mon is 0-11, year 1900 == 1900 */ 00046 void gnc_date_picker_set_date (GNCDatePicker *date_picker, 00047 guint day, guint mon, guint year); 00048 00049 void gnc_date_picker_get_date (GNCDatePicker *date_picker, 00050 guint *day, guint *mon, guint *year); 00051 00052 typedef struct 00053 { 00054 GnomeCanvasWidgetClass parent_class; 00055 00056 void (*date_selected) (GNCDatePicker *date_picker); 00057 00058 void (*date_picked) (GNCDatePicker *date_picker); 00059 00060 void (*key_press_event) (GNCDatePicker *date_picker, 00061 GdkEventKey *event); 00062 00063 } GNCDatePickerClass; 00064 00065 00066 #endif /* GNUCASH_DATE_PICKER_H */
1.7.4