|
GnuCash 2.4.99
|
00001 /* 00002 * gnc-date-format.c -- Date formator widget 00003 * 00004 * Copyright (C) 2003 Derek Atkins <derek@ihtfp.com> 00005 * All rights reserved. 00006 * 00007 * GnuCash is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU Library General Public License as 00009 * published by the Free Software Foundation; either version 2 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * Gnucash is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Library General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, contact: 00019 * 00020 * Free Software Foundation Voice: +1-617-542-5942 00021 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 00022 * Boston, MA 02110-1301, USA gnu@gnu.org 00023 * */ 00024 /* 00025 @NOTATION@ 00026 */ 00027 00028 00029 #ifndef GNC_DATE_FORMAT_H 00030 #define GNC_DATE_FORMAT_H 00031 00032 #include "qof.h" 00033 00034 #define GNC_TYPE_DATE_FORMAT (gnc_date_format_get_type ()) 00035 #define GNC_DATE_FORMAT(obj) GTK_CHECK_CAST (obj, gnc_date_format_get_type(), GNCDateFormat) 00036 #define GNC_DATE_FORMAT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gnc_date_format_get_type(), GNCDateFormatClass) 00037 #define GNC_IS_DATE_FORMAT(obj) GTK_CHECK_TYPE (obj, gnc_date_format_get_type ()) 00038 00041 typedef struct 00042 { 00043 GtkHBox hbox; 00044 } GNCDateFormat; 00045 00046 typedef struct 00047 { 00048 GtkHBoxClass hbox_class; 00049 void (*format_changed) (GNCDateFormat *gdf); 00050 } GNCDateFormatClass; 00051 00052 GType gnc_date_format_get_type (void); 00053 00054 GtkWidget *gnc_date_format_new (void); 00055 GtkWidget *gnc_date_format_new_without_label (void); 00056 GtkWidget *gnc_date_format_new_with_label (const char *label); 00057 00058 void gnc_date_format_set_format (GNCDateFormat *gdf, QofDateFormat format); 00059 QofDateFormat gnc_date_format_get_format (GNCDateFormat *gdf); 00060 00061 void gnc_date_format_set_months (GNCDateFormat *gdf, 00062 GNCDateMonthFormat months); 00063 GNCDateMonthFormat gnc_date_format_get_months (GNCDateFormat *gdf); 00064 00065 void gnc_date_format_set_years (GNCDateFormat *gdf, 00066 gboolean include_century); 00067 gboolean gnc_date_format_get_years (GNCDateFormat *gdf); 00068 00069 void gnc_date_format_set_custom (GNCDateFormat *gdf, const char *format); 00070 const char* gnc_date_format_get_custom (GNCDateFormat *gdf); 00071 00072 void gnc_date_format_refresh (GNCDateFormat *gdf); 00073 00074 #endif
1.7.4