add gitignore
[chaz/homebank] / src / ui-transaction.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * HomeBank 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, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __HB_TRANSACTION_GTK_H__
21 #define __HB_TRANSACTION_GTK_H__
22
23 enum {
24 HID_AMOUNT,
25 MAX_HID_AMOUNT
26 };
27
28 enum {
29 TXN_SPLIT_NEW,
30 TXN_SPLIT_AMOUNT
31 };
32
33
34 struct deftransaction_data
35 {
36 GtkWidget *window;
37
38 GtkWidget *PO_date;
39 GtkWidget *PO_pay;
40 GtkWidget *PO_arc;
41 GtkWidget *ST_word;
42 GtkWidget *ST_amount, *BT_amount, *BT_split;
43 GtkWidget *CM_valid;
44 GtkWidget *CM_remind;
45 GtkWidget *CM_cheque;
46
47 GtkWidget *NU_mode;
48 GtkWidget *ST_info;
49 GtkWidget *PO_grp;
50 GtkWidget *PO_acc;
51 GtkWidget *LB_accto, *PO_accto;
52 GtkWidget *ST_tags;
53
54 gint action;
55 gint accnum;
56 gint type;
57
58 Transaction *ope;
59
60 };
61
62 struct ui_txn_split_dialog_data
63 {
64 GtkWidget *dialog;
65 GtkWidget *BT_rem[TXN_MAX_SPLIT];
66 GtkWidget *BT_add[TXN_MAX_SPLIT];
67 GtkWidget *PO_cat[TXN_MAX_SPLIT];
68 GtkWidget *ST_amount[TXN_MAX_SPLIT];
69 GtkWidget *ST_memo[TXN_MAX_SPLIT];
70
71 GtkWidget *LB_sumsplit;
72 GtkWidget *LB_remain;
73 GtkWidget *LB_txnamount;
74
75 Transaction *ope;
76 gdouble amount;
77 gdouble sumsplit;
78 gdouble remsplit;
79
80 gint nbsplit;
81 gint splittype;
82 gint activeline;
83
84 gulong handler_id[TXN_MAX_SPLIT];
85 };
86
87
88
89 GtkWidget *create_deftransaction_window (GtkWindow *parent, gint type);
90 void deftransaction_set_amount(GtkWidget *widget, gdouble amount);
91 void deftransaction_set_transaction(GtkWidget *widget, Transaction *ope);
92 void deftransaction_get (GtkWidget *widget, gpointer user_data);
93 void deftransaction_add (GtkWidget *widget, gpointer user_data);
94 void deftransaction_dispose(GtkWidget *widget, gpointer user_data);
95 void deftransaction_set_amount_from_split(GtkWidget *widget, gdouble amount);
96
97 #endif
This page took 0.04128 seconds and 4 git commands to generate.