GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-split-reg2.h
1 /********************************************************************\
2  * gnc-split-reg2.h -- A widget for the common register look-n-feel.*
3  * Copyright (C) 1997 Robin D. Clark *
4  * Copyright (C) 1997-1998 Linas Vepstas <[email protected]> *
5  * Copyright (C) 1998 Rob Browning <[email protected]> *
6  * Copyright (C) 1999-2000 Dave Peticolas <[email protected]> *
7  * Copyright (C) 2001 Gnumatic, Inc. *
8  * Copyright (C) 2002,2006 Joshua Sled <[email protected]> *
9  * Copyright (C) 2012 Robert Fewell *
10  * *
11  * This program is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU General Public License as *
13  * published by the Free Software Foundation; either version 2 of *
14  * the License, or (at your option) any later version. *
15  * *
16  * This program is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19  * GNU General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU General Public License*
22  * along with this program; if not, contact: *
23  * *
24  * Free Software Foundation Voice: +1-617-542-5942 *
25  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
26  * Boston, MA 02110-1301, USA [email protected] *
27 \********************************************************************/
28 
29 
30 #ifndef GNC_SPLIT_REG2_H
31 #define GNC_SPLIT_REG2_H
32 
33 #include "gnc-ledger-display2.h"
34 #include "gnc-split-reg.h"
35 #include "gnc-tree-view-split-reg.h"
36 
37 #define GNC_SPLIT_REG2(obj) G_TYPE_CHECK_INSTANCE_CAST( obj, gnc_split_reg2_get_type(), GNCSplitReg2 )
38 #define GNC_SPLIT_REG2_CLASS(klass) G_TYPE_CHECK_CLASS_CAST( klass, gnc_split_reg2_get_type(), GNCSplitReg2Class )
39 #define IS_GNC_SPLIT_REG2(obj) G_TYPE_CHECK_INSTANCE_TYPE( obj, gnc_split_reg2_get_type() )
40 
41 typedef struct _GNCSplitReg2 GNCSplitReg2;
43 
45 {
46  /* The "parent" widget. */
47  GtkVBox vbox;
48 
49  /* The containing window. */
50  GtkWidget *window;
51  GtkWidget *scroll_bar;
52  GtkAdjustment *scroll_adj;
53 
54  GtkWidget *toolbar;
55  GtkWidget *summarybar;
56 
57  /* Summary Bar Labels */
58  GtkWidget *balance_label;
59  GtkWidget *cleared_label;
60  GtkWidget *reconciled_label;
61  GtkWidget *future_label;
62  GtkWidget *projectedminimum_label;
63  GtkWidget *shares_label;
64  GtkWidget *value_label;
65 
68 
69  gint numRows;
70 
71  gboolean read_only;
72 };
73 
75 {
76  GtkVBoxClass parent_class;
77 
78  /* Signal defaults */
79  void (*help_changed) (GNCSplitReg2 *w, gpointer user_data);
80 };
81 
82 /*FIXME Note sure about this == Coming from original gnc-split-reg.h */
83 typedef GNC_SPLIT_REG_ITEM GNC_SPLIT_REG2_ITEM;
84 
88 GType gnc_split_reg2_get_type (void);
89 
97 GtkWidget* gnc_split_reg2_new (GNCLedgerDisplay2 *ld,
98  GtkWindow *parent,
99  gint numberOfLines,
100  gboolean read_only);
101 
105 GncTreeViewSplitReg *gnc_split_reg2_get_register (GNCSplitReg2 *gsr);
106 
110 GtkWidget *gnc_split_reg2_create_summary_bar (GNCSplitReg2 *gsr);
111 
115 void gnc_split_reg2_change_style (GNCSplitReg2 *gsr, SplitRegisterStyle2 style);
116 
120 GtkWidget *gnc_split_reg2_get_summarybar (GNCSplitReg2 *gsr);
121 
125 void gnc_split_reg2_jump_to_split (GNCSplitReg2 *gsr, Split *split);
126 
130 void gnc_split_reg2_jump_to_split_amount (GNCSplitReg2 *gsr, Split *split);
131 
132 
136 void gnc_split_reg2_raise (GNCSplitReg2 *gsr);
137 
143 gboolean gnc_split_reg2_get_read_only (GNCSplitReg2 *gsr);
144 
145 /*
146  * Create a transaction entry with given amount and date. One account is
147  * specified, the other is undefined i.e. it defaults to orphan account.
148  * Jump to the transaction entry in the register.
149  * The purpose of this function to create an adjustment entry from the reconcile
150  * window.
151  */
152 void gnc_split_reg2_balancing_entry (GNCSplitReg2 *gsr, Account *account,
153  time64 statement_date, gnc_numeric balancing_amount);
154 
155 
156 void gnc_split_reg2_set_moved_cb (GNCSplitReg2 *gsr, GFunc cb, gpointer cb_data);
157 
158 #endif /* GNC_SPLIT_REG2_H */
GNCLedgerDisplay2 * ledger
Definition: SplitP.h:71
gint64 time64
Definition: gnc-date.h:83