GnuCash  5.6-150-g038405b370+
gnc-period-select.h
Go to the documentation of this file.
1 /*
2  * gnc-period-select.h -- Accounting period selection widget
3  *
4  * Copyright (c) 2005 David Hampton <hampton@employees.org>
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 gnu@gnu.org
23  */
24 
32 #ifndef GNC_PERIOD_SELECT_H
33 #define GNC_PERIOD_SELECT_H
34 
35 #include "gnc-accounting-period.h"
36 
37 G_BEGIN_DECLS
38 
39 #define GNC_TYPE_PERIOD_SELECT (gnc_period_select_get_type())
40 G_DECLARE_FINAL_TYPE (GncPeriodSelect, gnc_period_select, GNC, PERIOD_SELECT, GtkBox)
41 
42 
54 GtkWidget *gnc_period_select_new (gboolean starting_labels);
55 
56 
64 GtkWidget * gnc_period_select_new_glade (gchar *widget_name,
65  gchar *string1, gchar *string2,
66  gint int1, gint int2);
83 void gnc_period_select_set_fy_end (GncPeriodSelect *period, const GDate *fy_end);
84 
85 
96 GDate *gnc_period_select_get_fy_end (GncPeriodSelect *period);
97 
98 
102 gboolean
103 gnc_period_select_get_show_date (GncPeriodSelect *period);
104 
105 
110 void gnc_period_select_set_show_date (GncPeriodSelect *period, const gboolean show_date);
111 
112 
113 GDate *gnc_period_select_get_date_base (GncPeriodSelect *period);
114 
115 /* Set the base date used by a GncPeriodSelect widget. All example
116  * dates presented by the widget will be computed from this date.
117  */
118 void gnc_period_select_set_date_base (GncPeriodSelect *period, const GDate *sample_base);
119 
131 void gnc_period_select_set_active (GncPeriodSelect *period, GncAccountingPeriod which);
132 
133 
142 GncAccountingPeriod gnc_period_select_get_active (GncPeriodSelect *period);
143 
144 
152 GDate *gnc_period_select_get_date (GncPeriodSelect *period);
153 
154 G_END_DECLS
155 
156 #endif /* GNC_PERIOD_SELECT_H */
157 
GncAccountingPeriod gnc_period_select_get_active(GncPeriodSelect *period)
Get the currently selected accounting period from a GncPeriodSelect widget.
void gnc_period_select_set_show_date(GncPeriodSelect *period, const gboolean show_date)
Set the "show sample" setting on a GncPeriodSelect widget.
GDate * gnc_period_select_get_date(GncPeriodSelect *period)
Get the currently selected accounting period choice from a GncPeriodSelect widget.
General utilities for dealing with accounting periods.
GncAccountingPeriod
This specifies a time interval.
GDate * gnc_period_select_get_fy_end(GncPeriodSelect *period)
Get the current value of the fiscal year end setting from a GncPeriodSelect widget.
void gnc_period_select_set_fy_end(GncPeriodSelect *period, const GDate *fy_end)
Set the fiscal year end on a GncPeriodSelect widget.
gboolean gnc_period_select_get_show_date(GncPeriodSelect *period)
Get the current value of the "show sample" setting from a GncPeriodSelect widget. ...
GtkWidget * gnc_period_select_new_glade(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
Create a new GncPeriodSelect widget from a glade file.
GtkWidget * gnc_period_select_new(gboolean starting_labels)
Create a new GncPeriodSelect widget which is used to select a accounting period like "previous month"...
void gnc_period_select_set_active(GncPeriodSelect *period, GncAccountingPeriod which)
Set which item in the GncPeriodSelect is initially selected.