GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
reconcile-view.h
1 /********************************************************************\
2  * reconcile-view.h -- GNOME reconcile view functions *
3  * Copyright (C) 1998,1999 Linas Vepstas *
4  * Copyright (C) 2003 Derek Atkins <[email protected]> *
5  * Copyright (C) 2012 Robert Fewell *
6  * *
7  * This program is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU 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  * This program 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 *
15  * GNU 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 #ifndef GNC_RECONCILE_VIEW_H
26 #define GNC_RECONCILE_VIEW_H
27 
28 #include "gnc-query-view.h"
29 #include "qof.h"
30 
31 G_BEGIN_DECLS
32 
33 #define GNC_TYPE_RECONCILE_VIEW (gnc_reconcile_view_get_type ())
34 #define GNC_RECONCILE_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_RECONCILE_VIEW, GNCReconcileView))
35 #define GNC_RECONCILE_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_RECONCILE_VIEW, GNCReconcileViewClass))
36 #define GNC_IS_RECONCILE_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_RECONCILE_VIEW))
37 #define GNC_IS_RECONCILE_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_RECONCILE_VIEW))
38 
39 typedef struct GNCReconcileView GNCReconcileView;
40 
41 typedef enum
42 {
43  RECLIST_DEBIT,
44  RECLIST_CREDIT
45 } GNCReconcileViewType;
46 
48 {
49  GNCQueryView qview;
50 
51  GHashTable *reconciled;
52  Account *account;
53  GList *column_list;
54 
55  time64 statement_date;
56 
57  GNCReconcileView *sibling;
58  GNCReconcileViewType view_type;
59  gboolean no_toggle;
60 };
61 
62 typedef struct
63 {
64  GtkTreeViewClass parent_class;
65 
66  void (*toggle_reconciled) (GNCReconcileView *view, Split *split);
67  void (*line_selected) (GNCReconcileView *view, gpointer item);
68  void (*double_click_split) (GNCReconcileView *view, Split *split);
70 
71 #define GNC_PREFS_GROUP_RECONCILE "dialogs.reconcile"
72 
73 /***********************************************************
74  * public functions *
75  ***********************************************************/
76 
77 GType gnc_reconcile_view_get_type (void);
78 
79 GtkWidget * gnc_reconcile_view_new (Account * account,
80  GNCReconcileViewType type,
81  time64 date);
82 
83 gint gnc_reconcile_view_get_num_splits (GNCReconcileView *view);
84 
85 gint gnc_reconcile_view_num_selected (GNCReconcileView *view );
86 
87 Split * gnc_reconcile_view_get_current_split (GNCReconcileView *view);
88 
89 void gnc_reconcile_view_set_list (GNCReconcileView *view, gboolean reconcile);
90 
91 void gnc_reconcile_view_refresh (GNCReconcileView *view);
92 
93 gnc_numeric gnc_reconcile_view_reconciled_balance (GNCReconcileView *view);
94 
95 void gnc_reconcile_view_commit (GNCReconcileView *view, time64 date);
96 
97 void gnc_reconcile_view_postpone (GNCReconcileView *view);
98 
99 void gnc_reconcile_view_unselect_all (GNCReconcileView *view);
100 
101 gboolean gnc_reconcile_view_changed (GNCReconcileView *view);
102 
103 G_END_DECLS
104 
105 #endif /* GNC_RECONCILE_VIEW_H */
Definition: SplitP.h:71
gint64 time64
Definition: gnc-date.h:83