GnuCash  5.6-150-g038405b370+
gnc-budget-view.h
Go to the documentation of this file.
1 /* Copyright (C) 2013 Phil Longstaff <phil.longstaff@yahoo.ca>
2  *
3  * gnc-budget-view.h --
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of
8  * the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, contact:
17  *
18  * Free Software Foundation Voice: +1-617-542-5942
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
20  * Boston, MA 02110-1301, USA gnu@gnu.org
21  */
22 
29 #ifndef __GNC_BUDGET_VIEW_H
30 #define __GNC_BUDGET_VIEW_H
31 
32 #include <gtk/gtk.h>
33 
34 #if 0
35 #include "gnc-plugin-page.h"
36 #endif
37 #include "gnc-budget.h"
38 #include "gnc-tree-view-account.h"
39 
40 G_BEGIN_DECLS
41 
42 /* type macros */
43 #define GNC_TYPE_BUDGET_VIEW (gnc_budget_view_get_type ())
44 #define GNC_BUDGET_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_BUDGET_VIEW, GncBudgetView))
45 #define GNC_BUDGET_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_BUDGET_VIEW, GncBudgetViewClass))
46 #define GNC_IS_BUDGET_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_BUDGET_VIEW))
47 #define GNC_IS_BUDGET_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_BUDGET_VIEW))
48 #define GNC_BUDGET_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_BUDGET_VIEW, GncBudgetViewClass))
49 
50 #define GNC_BUDGET_VIEW_NAME "GncBudgetView"
51 
52 /* typedefs & structures */
53 typedef struct _GncBudgetView GncBudgetView;
54 typedef struct _GncBudgetViewClass GncBudgetViewClass;
55 
56 /* function prototypes */
57 GType gnc_budget_view_get_type (void);
58 
63 GncBudgetView *gnc_budget_view_new (GncBudget *budget, AccountFilterDialog *fd);
64 void gnc_budget_view_save (GncBudgetView *budget_view, GKeyFile *key_file, const gchar *group_name);
65 void gnc_budget_view_refresh (GncBudgetView *budget_view);
66 void gnc_budget_view_delete_budget (GncBudgetView *budget_view);
67 void gnc_budget_view_save_account_filter (GncBudgetView *budget_view);
68 gboolean gnc_budget_view_restore (GncBudgetView *budget_view, GKeyFile *key_file, const gchar *group_name);
69 GtkTreeSelection* gnc_budget_view_get_selection (GncBudgetView *budget_view);
70 Account* gnc_budget_view_get_account_from_path (GncBudgetView *budget_view, GtkTreePath *path);
71 GList* gnc_budget_view_get_selected_accounts (GncBudgetView *budget_view);
72 GtkWidget *gnc_budget_view_get_account_tree_view (GncBudgetView *budget_view);
73 void gnc_budget_view_set_show_account_code (GncBudgetView *budget_view, gboolean show_account_code);
74 gboolean gnc_budget_view_get_show_account_code (GncBudgetView *budget_view);
75 void gnc_budget_view_set_show_account_description (GncBudgetView *budget_view, gboolean show_account_desc);
76 gboolean gnc_budget_view_get_show_account_description (GncBudgetView *budget_view);
77 
78 G_END_DECLS
79 
80 #endif /* __GNC_BUDGET_VIEW_H */
81 
STRUCTS.
GnuCash Budgets.
GtkTreeSelection * gnc_budget_view_get_selection(GncBudgetView *budget_view)
returns the current selection in the gnc budget view.
GtkTreeView implementation for gnucash account tree.
GncBudgetView * gnc_budget_view_new(GncBudget *budget, AccountFilterDialog *fd)
Create new gnc budget view.
Functions for adding plugins to a GnuCash window.
void gnc_budget_view_refresh(GncBudgetView *budget_view)
refreshes the current budget view