1 /* HomeBank -- Free, easy, personal accounting for everyone. 2 * Copyright (C) 1995-2021 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 __LIST_OPERATION__H__ 21 #define __LIST_OPERATION__H__ 22 23 24 enum { 25 LIST_TXN_TYPE_BOOK = 0, 26 LIST_TXN_TYPE_DETAIL, 27 LIST_TXN_TYPE_XFERTARGET 28 }; 29 30 31 enum { 32 MODEL_TXN_POINTER = 0, 33 MODEL_TXN_SPLITAMT 34 }; 35 36 37 struct list_txn_data 38 { 39 GtkWidget *treeview; 40 GtkTreeViewColumn *tvc_balance; 41 42 gint list_type; 43 gboolean showall; 44 gboolean warnnocategory; 45 gboolean tvc_is_visible; 46 gboolean save_column_width; 47 }; 48 49 50 GtkWidget *create_list_transaction(gint type, gboolean *pref_columns); 51 GtkWidget *create_list_import_transaction(gboolean enable_choose); 52 53 void list_txn_set_warn_nocategory(GtkTreeView *treeview, gboolean warn); 54 55 gboolean list_txn_column_id_isvisible(GtkTreeView *treeview, gint sort_id); 56 void list_txn_set_column_acc_visible(GtkTreeView *treeview, gboolean visible); 57 58 Transaction *list_txn_get_surround_transaction(GtkTreeView *treeview, Transaction **prev, Transaction **next); 59 Transaction *list_txn_get_active_transaction(GtkTreeView *treeview); 60 61 GString *list_txn_to_string(GtkTreeView *treeview, gboolean clipboard, gboolean incsplit, gboolean incacc); 62 63 void list_txn_set_save_column_width(GtkTreeView *treeview, gboolean save_column_width); 64 void list_txn_sort_force(GtkTreeSortable *sortable, gpointer user_data); 65 guint list_txn_get_quicksearch_column_mask(GtkTreeView *treeview); 66 67 #endif 68