GnuCash c935c2f+
Loading...
Searching...
No Matches
split-register-p.h
Go to the documentation of this file.
1/********************************************************************\
2 * split-register-p.h -- private split register declarations *
3 * *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License as *
6 * published by the Free Software Foundation; either version 2 of *
7 * the License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License*
15 * along with this program; if not, contact: *
16 * *
17 * Free Software Foundation Voice: +1-617-542-5942 *
18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19 * Boston, MA 02110-1301, USA gnu@gnu.org *
20 * *
21\********************************************************************/
22
23#ifndef SPLIT_REGISTER_P_H
24#define SPLIT_REGISTER_P_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include "split-register.h"
31
39#define SPLIT_TRANS_STR _("-- Split Transaction --")
40#define STOCK_SPLIT_STR _("-- Stock Split --")
41
42#define ACTION_BUY_STR _("Buy")
43#define ACTION_SELL_STR _("Sell")
44
45typedef enum {
46 RATE_RESET_NOT_REQD = 0,
47 RATE_RESET_REQD = 1,
48 RATE_RESET_DONE = 2
49} RateReset_t;
50
51struct sr_info
52{
55
58
60 Transaction *cursor_hint_trans;
61
64
67
70
73
76
80
84
86 gboolean reg_loaded;
87
89 gboolean full_refresh;
90
93
96
99
103
105 gboolean first_pass;
106
109
113
118 RateReset_t rate_reset;
119
122
125
127 gpointer user_data;
128
131
134
136 const char *debit_str;
137 const char *credit_str;
138 char *tdebit_str;
139 char *tcredit_str;
140
143};
144
145
146SRInfo * gnc_split_register_get_info (SplitRegister *reg);
147
148GtkWidget *gnc_split_register_get_parent (SplitRegister *reg);
149
150Split * gnc_split_register_get_split (SplitRegister *reg,
151 VirtualCellLocation vcell_loc);
152
153Account * gnc_split_register_get_default_account (SplitRegister *reg);
154
155Transaction * gnc_split_register_get_trans (SplitRegister *reg,
156 VirtualCellLocation vcell_loc);
157
158Split *
159gnc_split_register_get_trans_split (SplitRegister *reg,
160 VirtualCellLocation vcell_loc,
161 VirtualCellLocation *trans_split_loc);
162
163gboolean gnc_split_register_find_split (SplitRegister *reg,
164 Transaction *trans, Split *trans_split,
165 Split *split, CursorClass cursor_class,
166 VirtualCellLocation *vcell_loc);
167
168void gnc_split_register_show_trans (SplitRegister *reg,
169 VirtualCellLocation start_loc);
170
181void gnc_split_register_set_trans_visible (SplitRegister *reg,
182 VirtualCellLocation vcell_loc,
183 gboolean visible,
184 gboolean only_blank_split);
185
186void gnc_split_register_set_cell_fractions (SplitRegister *reg, Split *split);
187
188CellBlock * gnc_split_register_get_passive_cursor (SplitRegister *reg);
189CellBlock * gnc_split_register_get_active_cursor (SplitRegister *reg);
190
191void gnc_split_register_set_last_num (SplitRegister *reg, const char *num);
192
193Account * gnc_split_register_get_account_by_name(
194 SplitRegister *reg, BasicCell * cell, const char *name);
195Account * gnc_split_register_get_account (SplitRegister *reg,
196 const char *cell_name);
197
198gboolean gnc_split_register_recn_cell_confirm (char old_flag, gpointer data);
199
200gboolean gnc_split_register_check_cell (SplitRegister *reg,
201 const char *cell_name);
202
203CursorClass gnc_split_register_cursor_name_to_class (const char *cursor_name);
204
205gnc_numeric gnc_split_register_debcred_cell_value (SplitRegister *reg);
206
211gboolean gnc_split_register_split_needs_amount(
212 SplitRegister *reg, Split *split);
213gboolean gnc_split_register_needs_conv_rate(
214 SplitRegister *reg, Transaction *txn, Account *acc);
215
216#ifdef __cplusplus
217}
218#endif
219
221#endif
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition gnc-date.h:87
GtkWidget *(* SRGetParentCallback)(gpointer user_data)
Callback function type.
SplitRegisterType
Register types.
void gnc_split_register_set_trans_visible(SplitRegister *reg, VirtualCellLocation vcell_loc, gboolean visible, gboolean only_blank_split)
Set the visibility of the split rows belonging to a transaction located at vcell_loc.
gboolean gnc_split_reg_has_rate_cell(SplitRegisterType type)
Determine if we need to perform any conversion on the splits in this transaction, and if so,...
CursorClass
Types of cursors.
API for checkbook register display area.
STRUCTS.
The type used to store guids in C.
Definition guid.h:75
GncGUID pending_trans_guid
The currently open transaction, if any.
Split * cursor_hint_split
A split used to remember where to put the cursor.
const char * debit_str
configured strings for debit/credit headers
time64 last_date_entered
The last date recorded in the blank split.
gboolean blank_split_edited
true if the current blank split has been edited and committed
gboolean reg_loaded
set to TRUE after register is loaded
gboolean trans_expanded
Indicates that the current transaction is expanded in ledger mode.
Transaction * cursor_hint_trans
A transaction used to remember where to put the cursor.
gboolean change_confirmed
true if the user has already confirmed changes of a reconciled split
gboolean exact_traversal
A flag indicating if the last traversal was 'exact'.
Split * cursor_hint_trans_split
A split used to remember where to put the cursor.
CursorClass cursor_hint_cursor_class
Used to remember where to put the cursor.
gpointer user_data
User data for users of SplitRegisters.
GncGUID blank_split_guid
The blank split at the bottom of the register.
SRGetParentCallback get_parent
hook to get parent widget
RateReset_t rate_reset
RATE_RESET_NOT_REQD => No exchange rate dialog needed for current split RATE_RESET_REQD => Need new e...
gboolean full_refresh
flag indicating whether full refresh is ok
gboolean separator_changed
true if the account separator has changed
GncGUID template_account
The template account which template transaction should belong to.
Account * rate_account
account on the current split when the exchange rate was last set
gboolean hint_set_by_traverse
If the hints were set by the traverse callback.
gboolean first_pass
true if we are loading the register for the first time
gboolean show_present_divider
true if the demarcation between 'past' and 'future' transactions should be visible
gboolean auto_complete
true if the transaction being edited was auto-filled
gboolean quickfill_setup
true if we have setup the quickfills
gboolean traverse_to_new
If traverse is to the newly created split.
GncGUID default_account
The default account where new splits are added.