|
GnuCash 2.4.99
|
00001 /* 00002 * gnc-period-select.h -- Accounting period selection widget 00003 * 00004 * Copyright (c) 2005 David Hampton <hampton@employees.org> 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 00032 #ifndef GNC_PERIOD_SELECT_H 00033 #define GNC_PERIOD_SELECT_H 00034 00035 #include "gnc-accounting-period.h" 00036 00037 G_BEGIN_DECLS 00038 00039 #define GNC_TYPE_PERIOD_SELECT (gnc_period_select_get_type()) 00040 #define GNC_PERIOD_SELECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_PERIOD_SELECT, GncPeriodSelect)) 00041 #define GNC_PERIOD_SELECT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_PERIOD_SELECT, GncPeriodSelectClass)) 00042 #define GNC_IS_PERIOD_SELECT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_PERIOD_SELECT)) 00043 00044 /* typedefs & structures */ 00045 typedef struct 00046 { 00047 GtkHBox hbox; 00048 } GncPeriodSelect; 00049 00050 typedef struct 00051 { 00052 GtkHBoxClass hbox; 00053 00054 /* Signals */ 00055 void (*changed) (GncPeriodSelect *period); 00056 00057 } GncPeriodSelectClass; 00058 00059 00065 GType gnc_period_select_get_type (void); 00066 00067 00073 void gnc_period_select_changed (GncPeriodSelect *period); 00074 00075 00085 GtkWidget *gnc_period_select_new (gboolean starting_labels); 00086 00087 00095 GtkWidget * gnc_period_select_new_glade (gchar *widget_name, 00096 gchar *string1, gchar *string2, 00097 gint int1, gint int2); 00114 void gnc_period_select_set_fy_end (GncPeriodSelect *period, const GDate *fy_end); 00115 00116 00127 GDate *gnc_period_select_get_fy_end (GncPeriodSelect *period); 00128 00129 00133 gboolean 00134 gnc_period_select_get_show_date (GncPeriodSelect *period); 00135 00136 00141 void gnc_period_select_set_show_date (GncPeriodSelect *period, const gboolean show_date); 00142 00143 00144 GDate *gnc_period_select_get_date_base (GncPeriodSelect *period); 00145 00146 /* Set the base date used by a GncPeriodSelect widget. All example 00147 * dates presented by the widget will be computed from this date. 00148 */ 00149 void gnc_period_select_set_date_base (GncPeriodSelect *period, const GDate *sample_base); 00150 00162 void gnc_period_select_set_active (GncPeriodSelect *period, GncAccountingPeriod which); 00163 00164 00173 GncAccountingPeriod gnc_period_select_get_active (GncPeriodSelect *period); 00174 00175 00183 GDate *gnc_period_select_get_date (GncPeriodSelect *period); 00184 00194 time_t gnc_period_select_get_time (GncPeriodSelect *period); 00195 00196 G_END_DECLS 00197 00198 #endif /* GNC_PERIOD_SELECT_H */ 00199
1.7.4