34 #ifndef __GNC_TREE_VIEW_COMMODITY_H 35 #define __GNC_TREE_VIEW_COMMODITY_H 46 #define GNC_TYPE_TREE_VIEW_COMMODITY (gnc_tree_view_commodity_get_type ()) 47 G_DECLARE_FINAL_TYPE (GncTreeViewCommodity, gnc_tree_view_commodity, GNC, TREE_VIEW_COMMODITY, GncTreeView)
67 const gchar *first_property_name,
85 GSList *column_names);
99 void gnc_tree_view_commodity_add_kvp_column (GncTreeViewCommodity *view,
100 const gchar *column_title,
101 const gchar *kvp_key);
109 typedef gboolean (*gnc_tree_view_commodity_ns_filter_func)(gnc_commodity_namespace*, gpointer data);
110 typedef gboolean (*gnc_tree_view_commodity_cm_filter_func)(gnc_commodity*, gpointer data);
137 gnc_tree_view_commodity_ns_filter_func ns_func,
138 gnc_tree_view_commodity_cm_filter_func cm_func,
140 GDestroyNotify destroy);
207 gnc_commodity *commodity);
GtkTreeView * gnc_tree_view_commodity_new(QofBook *book, const gchar *first_property_name,...)
Create a new commodity tree view.
void gnc_tree_view_commodity_set_filter(GncTreeViewCommodity *view, gnc_tree_view_commodity_ns_filter_func ns_func, gnc_tree_view_commodity_cm_filter_func cm_func, gpointer data, GDestroyNotify destroy)
This function attaches a filter function to the given commodity tree.
utility functions for the GnuCash UI
common utilities for manipulating a GtkTreeView within gnucash
void gnc_tree_view_commodity_configure_columns(GncTreeViewCommodity *view, GSList *column_names)
Configure (by name) the set of visible columns in an commodity tree view.
void gnc_tree_view_commodity_select_commodity(GncTreeViewCommodity *view, gnc_commodity *commodity)
Select the commodity in the associated commodity tree view.
void gnc_tree_view_commodity_select_subcommodities(GncTreeViewCommodity *view, gnc_commodity *commodity)
This function selects all sub-commodities of an commodity in the commodity tree view.
gnc_commodity * gnc_tree_view_commodity_get_selected_commodity(GncTreeViewCommodity *view)
This function returns the commodity associated with the selected item in the commodity tree view...
void gnc_tree_view_commodity_refilter(GncTreeViewCommodity *view)
This function forces the commodity tree filter to be evaluated.
gnc_commodity * gnc_tree_view_commodity_get_cursor_commodity(GncTreeViewCommodity *view)
This function returns the commodity in the commodity tree view at the current location of the cursor...
Commodity handling public routines.