GnuCash  4.11-11-ge9df8d41d2+
gnc-split-reg2.h
Go to the documentation of this file.
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 <linas@linas.org> *
5  * Copyright (C) 1998 Rob Browning <rlb@cs.utexas.edu> *
6  * Copyright (C) 1999-2000 Dave Peticolas <dave@krondo.com> *
7  * Copyright (C) 2001 Gnumatic, Inc. *
8  * Copyright (C) 2002,2006 Joshua Sled <jsled@asynchronous.org> *
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 gnu@gnu.org *
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"
42 #define GNC_SPLIT_REG2(obj) G_TYPE_CHECK_INSTANCE_CAST( obj, gnc_split_reg2_get_type(), GNCSplitReg2 )
43 #define GNC_SPLIT_REG2_CLASS(klass) G_TYPE_CHECK_CLASS_CAST( klass, gnc_split_reg2_get_type(), GNCSplitReg2Class )
44 #define IS_GNC_SPLIT_REG2(obj) G_TYPE_CHECK_INSTANCE_TYPE( obj, gnc_split_reg2_get_type() )
45 
46 typedef struct _GNCSplitReg2 GNCSplitReg2;
47 typedef struct _GNCSplitReg2Class GNCSplitReg2Class;
48 
50 {
51  /* The "parent" widget. */
52  GtkBox vbox;
53 
54  /* The containing window. */
55  GtkWidget *window;
56  GtkWidget *scroll_bar;
57  GtkAdjustment *scroll_adj;
58 
59  GtkWidget *toolbar;
60  GtkWidget *summarybar;
61 
62  /* Summary Bar Labels */
63  GtkWidget *balance_label;
64  GtkWidget *cleared_label;
65  GtkWidget *reconciled_label;
66  GtkWidget *future_label;
67  GtkWidget *projectedminimum_label;
68  GtkWidget *shares_label;
69  GtkWidget *value_label;
70 
72  GNCLedgerDisplay2 *ledger;
73 
74  gint numRows;
75 
76  gboolean read_only;
77 };
78 
80 {
81  GtkBoxClass parent_class;
82 
83  /* Signal defaults */
84  void (*help_changed) (GNCSplitReg2 *w, gpointer user_data);
85 };
86 
87 /*FIXME Note sure about this == Coming from original gnc-split-reg.h */
88 typedef GNC_SPLIT_REG_ITEM GNC_SPLIT_REG2_ITEM;
89 
93 GType gnc_split_reg2_get_type (void);
94 
102 GtkWidget* gnc_split_reg2_new (GNCLedgerDisplay2 *ld,
103  GtkWindow *parent,
104  gint numberOfLines,
105  gboolean read_only);
106 
111 
115 GtkWidget *gnc_split_reg2_create_summary_bar (GNCSplitReg2 *gsr);
116 
120 void gnc_split_reg2_change_style (GNCSplitReg2 *gsr, SplitRegisterStyle2 style);
121 
125 GtkWidget *gnc_split_reg2_get_summarybar (GNCSplitReg2 *gsr);
126 
130 void gnc_split_reg2_jump_to_split (GNCSplitReg2 *gsr, Split *split);
131 
135 void gnc_split_reg2_jump_to_split_amount (GNCSplitReg2 *gsr, Split *split);
136 
137 
141 void gnc_split_reg2_raise (GNCSplitReg2 *gsr);
142 
148 gboolean gnc_split_reg2_get_read_only (GNCSplitReg2 *gsr);
149 
150 /*
151  * Create a transaction entry with given amount and date. One account is
152  * specified, the other is undefined i.e. it defaults to orphan account.
153  * Jump to the transaction entry in the register.
154  * The purpose of this function to create an adjustment entry from the reconcile
155  * window.
156  */
157 void gnc_split_reg2_balancing_entry (GNCSplitReg2 *gsr, Account *account,
158  time64 statement_date, gnc_numeric balancing_amount);
159 
160 
161 void gnc_split_reg2_set_moved_cb (GNCSplitReg2 *gsr, GFunc cb, gpointer cb_data);
163 #endif /* GNC_SPLIT_REG2_H */
GNCLedgerDisplay2 * ledger
The current ledger display.
gboolean gnc_split_reg2_get_read_only(GNCSplitReg2 *gsr)
Callers can use this to determine if they need to reflect some "read-only" status in the window which...
GtkWidget * gnc_split_reg2_new(GNCLedgerDisplay2 *ld, GtkWindow *parent, gint numberOfLines, gboolean read_only)
Creates and returns a GNCSplitReg.
GncTreeViewSplitReg * gnc_split_reg2_get_register(GNCSplitReg2 *gsr)
Returns the GncTreeView Split Register in effect for this GNCSplitReg.
GtkWidget * gnc_split_reg2_get_summarybar(GNCSplitReg2 *gsr)
Can return NULL if the indicated subwidget was not created.
GType gnc_split_reg2_get_type(void)
GTK-related; gets an identifier for the class of GNCSplitRegs.
void gnc_split_reg2_raise(GNCSplitReg2 *gsr)
Raise an existing register window to the front.
SplitRegisterStyle2
Register styles.
void gnc_split_reg2_jump_to_split_amount(GNCSplitReg2 *gsr, Split *split)
Move the cursor to the split in the non-blank amount column.
void gnc_split_reg2_change_style(GNCSplitReg2 *gsr, SplitRegisterStyle2 style)
Gets/sets the style of the GNCSplitReg.
GtkWidget * gnc_split_reg2_create_summary_bar(GNCSplitReg2 *gsr)
Create and returns a summarybar for this GNCSplitReg.
gint64 time64
Many systems, including Microsoft Windows and BSD-derived Unixes like Darwin, are retaining the int-3...
Definition: gnc-date.h:93
Public declarations for GncLedgerDisplay2 class.
void gnc_split_reg2_jump_to_split(GNCSplitReg2 *gsr, Split *split)
Jump to split.