GnuCash  5.6-150-g038405b370+
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 <derek@ihtfp.com> *
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 gnu@gnu.org *
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 
47 enum
48 {
49  REC_POINTER, //0
50  REC_DATE, //1
51  REC_NUM, //2
52  REC_DESC, //3
53  REC_AMOUNT, //4
54  REC_RECN, //5
55 };
56 
58 {
59  GNCQueryView qview;
60 
61  GHashTable *reconciled;
62  Account *account;
63  GList *column_list;
64 
65  time64 statement_date;
66 
67  GNCReconcileView *sibling;
68  GNCReconcileViewType view_type;
69  gboolean no_toggle;
70 
71  GtkTreeRowReference *rowref;
72 };
73 
74 typedef struct
75 {
76  GtkTreeViewClass parent_class;
77 
78  void (*toggle_reconciled) (GNCReconcileView *view, Split *split);
79  void (*line_selected) (GNCReconcileView *view, gpointer item);
80  void (*double_click_split) (GNCReconcileView *view, Split *split);
82 
83 #define GNC_PREFS_GROUP_RECONCILE "dialogs.reconcile"
84 
85 /***********************************************************
86  * public functions *
87  ***********************************************************/
88 
89 GType gnc_reconcile_view_get_type (void);
90 
91 GtkWidget * gnc_reconcile_view_new (Account * account,
92  GNCReconcileViewType type,
93  time64 date);
94 
95 gint gnc_reconcile_view_get_num_splits (GNCReconcileView *view);
96 
97 gint gnc_reconcile_view_num_selected (GNCReconcileView *view );
98 
99 Split * gnc_reconcile_view_get_current_split (GNCReconcileView *view);
100 
101 void gnc_reconcile_view_set_list (GNCReconcileView *view, gboolean reconcile);
102 
103 void gnc_reconcile_view_refresh (GNCReconcileView *view);
104 
105 gnc_numeric gnc_reconcile_view_reconciled_balance (GNCReconcileView *view);
106 
107 void gnc_reconcile_view_commit (GNCReconcileView *view, time64 date);
108 
109 void gnc_reconcile_view_postpone (GNCReconcileView *view);
110 
111 void gnc_reconcile_view_unselect_all (GNCReconcileView *view);
112 
113 gboolean gnc_reconcile_view_changed (GNCReconcileView *view);
114 
115 void gnc_reconcile_view_add_padding (GNCReconcileView *view, gint column, gint xpadding);
116 
117 gint gnc_reconcile_view_get_column_width (GNCReconcileView *view, gint column);
118 
119 G_END_DECLS
120 
121 #endif /* GNC_RECONCILE_VIEW_H */
STRUCTS.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87