]> Dogcows Code - chaz/homebank/blob - src/ui-category.h
Merge branch 'upstream'
[chaz/homebank] / src / ui-category.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2016 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_CATEGORY_GTK_H__
21 #define __HB_CATEGORY_GTK_H__
22
23 enum
24 {
25 LST_DEFCAT_TOGGLE,
26 LST_DEFCAT_DATAS,
27 LST_DEFCAT_NAME,
28 NUM_LST_DEFCAT
29 };
30
31 #define LST_DEFCAT_SORT_NAME 1
32 #define LST_DEFCAT_SORT_USED 2
33
34
35 enum
36 {
37 CAT_TYPE_ALL,
38 CAT_TYPE_EXPENSE,
39 CAT_TYPE_INCOME
40 };
41
42
43 enum
44 {
45 LST_CMBCAT_DATAS,
46 LST_CMBCAT_FULLNAME,
47 LST_CMBCAT_SORTNAME,
48 LST_CMBCAT_NAME,
49 LST_CMBCAT_SUBCAT,
50 NUM_LST_CMBCAT
51 };
52
53
54 gchar *ui_cat_comboboxentry_get_name(GtkComboBox *entry_box);
55 guint32 ui_cat_comboboxentry_get_key(GtkComboBox *entry_box);
56 guint32 ui_cat_comboboxentry_get_key_add_new(GtkComboBox *entry_box);
57 Category *ui_cat_comboboxentry_get(GtkComboBox *entry_box);
58
59 gboolean ui_cat_comboboxentry_set_active(GtkComboBox *entry_box, guint32 key);
60 void ui_cat_comboboxentry_add(GtkComboBox *entry_box, Category *pay);
61 void ui_cat_comboboxentry_populate(GtkComboBox *entry_box, GHashTable *hash);
62 void ui_cat_comboboxentry_populate_except(GtkComboBox *entry_box, GHashTable *hash, guint except_key);
63 GtkWidget *ui_cat_comboboxentry_new(GtkWidget *label);
64
65 /* = = = = = = = = = = */
66
67 void ui_cat_listview_add(GtkTreeView *treeview, Category *item, GtkTreeIter *parent);
68 Category *ui_cat_listview_get_selected(GtkTreeView *treeview);
69 Category *ui_cat_listview_get_selected_parent(GtkTreeView *treeview, GtkTreeIter *parent);
70 gboolean ui_cat_listview_remove (GtkTreeModel *liststore, guint32 key);
71 void ui_cat_listview_remove_selected(GtkTreeView *treeview);
72 void ui_cat_listview_populate(GtkWidget *view, gint type);
73 GtkWidget *ui_cat_listview_new(gboolean withtoggle, gboolean withcount);
74
75 /* = = = = = = = = = = */
76
77 struct ui_cat_manage_dialog_data
78 {
79 GList *tmp_list;
80 gint change;
81
82 GtkWidget *window;
83
84 GtkWidget *LV_cat;
85 GtkWidget *ST_name1, *ST_name2;
86
87 //GtkWidget *BT_add1, *BT_add2;
88
89 //GtkWidget *CM_type;
90 GtkWidget *RA_type;
91
92 GtkWidget *BT_edit;
93 GtkWidget *BT_merge;
94 GtkWidget *BT_delete;
95
96 GtkWidget *BT_expand;
97 GtkWidget *BT_collapse;
98
99 GtkWidget *LA_category;
100
101 };
102
103 struct catPopContext
104 {
105 GtkTreeModel *model;
106 guint except_key;
107 gint type;
108 };
109
110 GtkWidget *ui_cat_manage_dialog (void);
111
112 #endif
113
This page took 0.034676 seconds and 4 git commands to generate.