GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-date-format.h
1 /*
2  * gnc-date-format.c -- Date formator widget
3  *
4  * Copyright (C) 2003 Derek Atkins <[email protected]>
5  * All rights reserved.
6  *
7  * GnuCash is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Library General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * Gnucash is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, contact:
19  *
20  * Free Software Foundation Voice: +1-617-542-5942
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
22  * Boston, MA 02110-1301, USA [email protected]
23  * */
24 /*
25  @NOTATION@
26  */
27 
28 
29 #ifndef GNC_DATE_FORMAT_H
30 #define GNC_DATE_FORMAT_H
31 
32 #include "qof.h"
33 
34 #define GNC_TYPE_DATE_FORMAT (gnc_date_format_get_type ())
35 #define GNC_DATE_FORMAT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gnc_date_format_get_type(), GNCDateFormat)
36 #define GNC_DATE_FORMAT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gnc_date_format_get_type(), GNCDateFormatClass)
37 #define GNC_IS_DATE_FORMAT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gnc_date_format_get_type ())
38 
41 typedef struct
42 {
43  GtkHBox hbox;
45 
46 typedef struct
47 {
48  GtkHBoxClass hbox_class;
49  void (*format_changed) (GNCDateFormat *gdf);
51 
52 GType gnc_date_format_get_type (void);
53 
54 GtkWidget *gnc_date_format_new (void);
55 GtkWidget *gnc_date_format_new_without_label (void);
56 GtkWidget *gnc_date_format_new_with_label (const char *label);
57 
58 void gnc_date_format_set_format (GNCDateFormat *gdf, QofDateFormat format);
59 QofDateFormat gnc_date_format_get_format (GNCDateFormat *gdf);
60 
61 void gnc_date_format_set_months (GNCDateFormat *gdf,
62  GNCDateMonthFormat months);
63 GNCDateMonthFormat gnc_date_format_get_months (GNCDateFormat *gdf);
64 
65 void gnc_date_format_set_years (GNCDateFormat *gdf,
66  gboolean include_century);
67 gboolean gnc_date_format_get_years (GNCDateFormat *gdf);
68 
69 void gnc_date_format_set_custom (GNCDateFormat *gdf, const char *format);
70 const char* gnc_date_format_get_custom (GNCDateFormat *gdf);
71 
72 void gnc_date_format_refresh (GNCDateFormat *gdf);
73 
74 #endif
GNCDateMonthFormat
Definition: gnc-date.h:150
QofDateFormat
Definition: gnc-date.h:121