|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * gnc-tree-view-price.h -- GtkTreeView implementation to display * 00003 * prices in a GtkTreeView. * 00004 * Copyright (C) 2003,2005 David Hampton <hampton@employees.org> * 00005 * * 00006 * This program is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU General Public License as * 00008 * published by the Free Software Foundation; either version 2 of * 00009 * the License, or (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License* 00017 * along with this program; if not, contact: * 00018 * * 00019 * Free Software Foundation Voice: +1-617-542-5942 * 00020 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00021 * Boston, MA 02110-1301, USA gnu@gnu.org * 00022 * * 00023 \********************************************************************/ 00024 00034 #ifndef __GNC_TREE_VIEW_PRICE_H 00035 #define __GNC_TREE_VIEW_PRICE_H 00036 00037 #include <gtk/gtk.h> 00038 #include "gnc-tree-view.h" 00039 00040 #include "gnc-pricedb.h" 00041 #include "gnc-ui-util.h" 00042 00043 G_BEGIN_DECLS 00044 00045 /* type macros */ 00046 #define GNC_TYPE_TREE_VIEW_PRICE (gnc_tree_view_price_get_type ()) 00047 #define GNC_TREE_VIEW_PRICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_TREE_VIEW_PRICE, GncTreeViewPrice)) 00048 #define GNC_TREE_VIEW_PRICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_TREE_VIEW_PRICE, GncTreeViewPriceClass)) 00049 #define GNC_IS_TREE_VIEW_PRICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_TREE_VIEW_PRICE)) 00050 #define GNC_IS_TREE_VIEW_PRICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_TREE_VIEW_PRICE)) 00051 #define GNC_TREE_VIEW_PRICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_TREE_VIEW_PRICE, GncTreeViewPriceClass)) 00052 00053 /* typedefs & structures */ 00054 typedef struct 00055 { 00056 GncTreeView gnc_tree_view; 00057 int stamp; 00058 } GncTreeViewPrice; 00059 00060 typedef struct 00061 { 00062 GncTreeViewClass gnc_tree_view; 00063 } GncTreeViewPriceClass; 00064 00065 00066 00067 /* Standard g_object type */ 00068 GType gnc_tree_view_price_get_type (void); 00069 00070 00088 GtkTreeView *gnc_tree_view_price_new (QofBook *book, 00089 const gchar *first_property_name, 00090 ...); 00097 #ifdef OLD 00098 00109 void gnc_tree_view_price_add_kvp_column (GncTreeViewPrice *view, 00110 const gchar *column_title, 00111 const gchar *kvp_key); 00112 #endif 00113 00138 typedef gboolean (*gnc_tree_view_price_ns_filter_func)(gnc_commodity_namespace*, gpointer data); 00139 typedef gboolean (*gnc_tree_view_price_cm_filter_func)(gnc_commodity *, gpointer data); 00140 typedef gboolean (*gnc_tree_view_price_pc_filter_func)(GNCPrice *, gpointer data); 00141 void gnc_tree_view_price_set_filter (GncTreeViewPrice *view, 00142 gnc_tree_view_price_ns_filter_func ns_func, 00143 gnc_tree_view_price_cm_filter_func cm_func, 00144 gnc_tree_view_price_pc_filter_func pc_func, 00145 gpointer data, 00146 GtkDestroyNotify destroy); 00161 GNCPrice * gnc_tree_view_price_get_cursor_price (GncTreeViewPrice *view); 00162 00163 00175 GNCPrice * gnc_tree_view_price_get_selected_price (GncTreeViewPrice *view); 00176 00177 00193 void gnc_tree_view_price_set_selected_price (GncTreeViewPrice *view, 00194 GNCPrice *price); 00195 00196 00208 GList * gnc_tree_view_price_get_selected_prices (GncTreeViewPrice *view); 00209 00210 00213 G_END_DECLS 00214 00215 #endif /* __GNC_TREE_VIEW_PRICE_H */ 00216
1.7.4