]> Dogcows Code - chaz/homebank/blob - src/ui-account.h
import homebank-5.2.6
[chaz/homebank] / src / ui-account.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2019 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_ACCOUNT_GTK_H__
21 #define __HB_ACCOUNT_GTK_H__
22
23 enum
24 {
25 LST_DEFACC_TOGGLE,
26 LST_DEFACC_DATAS,
27 NUM_LST_DEFACC
28 };
29
30 enum
31 {
32 ACC_LST_INSERT_NORMAL,
33 ACC_LST_INSERT_REPORT
34 };
35
36
37 gchar *ui_acc_comboboxentry_get_name(GtkComboBox *entry_box);
38 guint32 ui_acc_comboboxentry_get_key(GtkComboBox *entry_box);
39 gboolean ui_acc_comboboxentry_set_active(GtkComboBox *entry_box, guint32 key);
40 void ui_acc_comboboxentry_add(GtkComboBox *entry_box, Account *acc);
41 void ui_acc_comboboxentry_populate(GtkComboBox *entry_box, GHashTable *hash, gint insert_type);
42 void ui_acc_comboboxentry_populate_except(GtkComboBox *entry_box, GHashTable *hash, guint except_key, gint insert_type);
43 GtkWidget *ui_acc_comboboxentry_new(GtkWidget *label);
44
45 /* = = = = = = = = = = */
46
47 void ui_acc_listview_add(GtkTreeView *treeview, Account *item);
48 guint32 ui_acc_listview_get_selected_key(GtkTreeView *treeview);
49 void ui_acc_listview_remove_selected(GtkTreeView *treeview);
50 void ui_acc_listview_populate(GtkWidget *view, gint insert_type);
51 GtkWidget *ui_acc_listview_new(gboolean withtoggle);
52
53 /* = = = = = = = = = = */
54
55 enum
56 {
57 ACTION_NEW,
58 ACTION_MODIFY,
59 ACTION_REMOVE,
60 };
61
62 enum
63 {
64 FIELD_NAME,
65 //todo: for stock account
66 //FIELD_TYPE,
67 FIELD_BANK,
68 FIELD_NUMBER,
69 FIELD_BUDGET,
70 FIELD_CLOSED,
71 FIELD_INITIAL,
72 FIELD_MINIMUM,
73 FIELD_CHEQUE1,
74 FIELD_CHEQUE2,
75 MAX_ACC_FIELD
76 };
77
78
79 struct ui_acc_manage_data
80 {
81 GList *tmp_list;
82 gint change;
83 gint action;
84 guint32 lastkey;
85
86 GtkWidget *window;
87
88 GtkWidget *LV_acc;
89 GtkWidget *BT_add, *BT_rem;
90
91 GtkWidget *notebook;
92
93 GtkWidget *CY_type;
94 GtkWidget *CY_curr;
95 GtkWidget *ST_institution;
96 GtkWidget *ST_number;
97
98 GtkWidget *TB_notes;
99 GtkWidget *CM_closed;
100
101 GtkWidget *ST_initial;
102 //GtkWidget *ST_warning;
103 GtkWidget *ST_overdraft;
104 GtkWidget *CY_template;
105 GtkWidget *CM_nosummary;
106 GtkWidget *CM_nobudget;
107 GtkWidget *CM_noreport;
108 GtkWidget *ST_cheque1;
109 GtkWidget *ST_cheque2;
110 };
111
112
113 struct accPopContext
114 {
115 GtkTreeModel *model;
116 guint32 except_key;
117 guint32 kcur;
118 gint insert_type;
119 };
120
121
122 GtkWidget *ui_acc_manage_dialog (void);
123
124
125 #endif
126
This page took 0.03685 seconds and 4 git commands to generate.