GnuCash c935c2f+
Loading...
Searching...
No Matches
dialog-transfer.h
1/********************************************************************\
2 * dialog-transfer.h -- transfer dialog for GnuCash *
3 * Copyright (C) 1999 Linas Vepstas *
4 * Copyright (C) 2000 Dave Peticolas *
5 * *
6 * This program is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU General Public License as *
8 * published by the Free Software Foundation; either version 2 of *
9 * the License, or (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License*
17 * along with this program; if not, contact: *
18 * *
19 * Free Software Foundation Voice: +1-617-542-5942 *
20 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21 * Boston, MA 02110-1301, USA gnu@gnu.org *
22\********************************************************************/
23
24#ifndef DIALOG_TRANSFER_H
25#define DIALOG_TRANSFER_H
26
27#include "Account.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33typedef struct _xferDialog XferDialog;
34
41XferDialog * gnc_xfer_dialog(GtkWidget * parent, Account *initial);
42
47gboolean gnc_xfer_dialog_run_until_done( XferDialog * );
48
49void gnc_xfer_dialog_close( XferDialog * );
50
51/*********** Access routines ***********/
52void gnc_xfer_dialog_set_title( XferDialog *, const gchar * );
53
55void gnc_xfer_dialog_set_information_label( XferDialog *,
56 const gchar * );
57
61void gnc_xfer_dialog_add_user_specified_button( XferDialog *xferData,
62 const gchar *label,
63 GCallback callback,
64 gpointer user_data );
65
66void gnc_xfer_dialog_toggle_currency_table ( XferDialog *xferData,
67 gboolean show_table );
68
69void gnc_xfer_dialog_set_from_account_label( XferDialog *,
70 const gchar * );
71void gnc_xfer_dialog_set_to_account_label( XferDialog *, const gchar * );
72
74void gnc_xfer_dialog_set_from_show_button_active( XferDialog *, gboolean );
75void gnc_xfer_dialog_set_to_show_button_active( XferDialog *, gboolean );
76
78void gnc_xfer_dialog_select_from_account(XferDialog *xferData,
79 Account *account);
81void gnc_xfer_dialog_select_to_account(XferDialog *xferData,
82 Account *account);
83
84void gnc_xfer_dialog_select_from_currency(XferDialog *xferData, gnc_commodity *cur);
85void gnc_xfer_dialog_select_to_currency(XferDialog *xferData, gnc_commodity *cur);
86
88void gnc_xfer_dialog_lock_from_account_tree(XferDialog *xferData );
90void gnc_xfer_dialog_lock_to_account_tree(XferDialog *xferData );
92void gnc_xfer_dialog_hide_from_account_tree(XferDialog *xferData );
94void gnc_xfer_dialog_hide_to_account_tree(XferDialog *xferData );
95
96
104void gnc_xfer_dialog_set_amount(XferDialog *xferData, gnc_numeric amount);
105
107void gnc_xfer_dialog_set_amount_sensitive(XferDialog *xferData, gboolean is_sensitive);
108
116void gnc_xfer_dialog_set_description(XferDialog *xferData,
117 const char *description);
118
125void gnc_xfer_dialog_set_memo(XferDialog *xferData, const char *memo);
126
134void gnc_xfer_dialog_set_num(XferDialog *xferData, const char *num);
135
143void gnc_xfer_dialog_set_date(XferDialog *xferData, time64 set_time);
144
146void gnc_xfer_dialog_set_date_sensitive(XferDialog *xferData, gboolean is_sensitive);
147
151void gnc_xfer_dialog_set_price_edit(XferDialog *xferData,
152 gnc_numeric price_value);
153
157void gnc_xfer_dialog_quickfill_to_account(XferDialog *xferData,
158 gboolean qf_to_account );
159
176void gnc_xfer_dialog_is_exchange_dialog(XferDialog *xferData,
177 gnc_numeric * exch_rate);
178
179
186typedef void (*gnc_xfer_dialog_cb)(Transaction *new_trans,
187 gpointer user_data);
188
208void gnc_xfer_dialog_set_txn_cb(XferDialog *xferData,
209 gnc_xfer_dialog_cb handler,
210 gpointer user_data);
211
212/* Uses the XferDialog to obtain from the user an explicit exchange
213 rate. This exchange rate will then be uses to converting 'amount',
214 which is given in the commodity of the register Account, reg_acc,
215 into a split value for a split whose Account is the commodity
216 specified by xfer_com.
217
218 The 'exch_rate' argument is used to set the initial value of the
219 rate. If the dialog completes successfully 'FALSE' is returned and
220 'exch_rate' is also used to store the converted value. Otherwise,
221 TRUE is returned and the 'exch_rate' argument is undefined.
222*/
223gboolean gnc_xfer_dialog_run_exchange_dialog(
224 XferDialog *xfer, gnc_numeric *exch_rate, gnc_numeric amount,
225 Account *reg_acc, Transaction *txn, gnc_commodity *xfer_com,
226 gboolean expanded);
227
228#ifdef __cplusplus
229}
230#endif
231
232#endif
Account handling public routines.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition gnc-date.h:87
STRUCTS.