32 #ifndef __GNC_TREE_VIEW_H
33 #define __GNC_TREE_VIEW_H
36 #include "gnc-cell-renderer-date.h"
41 #define GNC_TYPE_TREE_VIEW (gnc_tree_view_get_type ())
42 #define GNC_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_TREE_VIEW, GncTreeView))
43 #define GNC_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_TREE_VIEW, GncTreeViewClass))
44 #define GNC_IS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_TREE_VIEW))
45 #define GNC_IS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_TREE_VIEW))
46 #define GNC_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_TREE_VIEW, GncTreeViewClass))
47 #define GNC_TREE_VIEW_NAME "GncTreeView"
53 GtkTreeView gtk_tree_view;
58 GtkTreeViewClass gtk_tree_view;
76 #define MODEL_COLUMN "model_column"
79 #define REAL_TITLE "real_title"
83 #define PREF_NAME "pref-name"
87 #define ALWAYS_VISIBLE "always-visible"
92 #define DEFAULT_VISIBLE "default-visible"
94 #define GNC_TREE_VIEW_COLUMN_DATA_NONE -1
95 #define GNC_TREE_VIEW_COLUMN_COLOR_NONE -1
96 #define GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS -1
99 typedef void (* renderer_toggled) (GtkCellRendererToggle *cell_renderer_toggle,
147 const gchar *column_title,
148 const gchar *column_short_title,
149 const gchar *pref_name,
150 gint model_data_column,
151 gint model_visibility_column,
152 GtkTreeIterCompareFunc column_sort_fn,
153 renderer_toggled toggle_edited_cb);
194 const gchar *column_title,
195 const gchar *pref_name,
196 const gchar *stock_icon_name,
197 const gchar *sizing_text,
198 gint model_data_column,
199 gint model_visibility_column,
200 GtkTreeIterCompareFunc column_sort_fn);
211 const gchar *column_title,
212 const gchar *pref_name,
213 const gchar *sizing_text,
214 gint model_data_column,
215 gint model_visibility_column,
216 GtkTreeModel *combo_tree_model,
217 gint combo_model_text_column,
218 GtkTreeIterCompareFunc column_sort_fn);
227 const gchar *column_title,
228 const gchar *pref_name,
229 const gchar *stock_icon_name,
230 const gchar *sizing_text,
231 gint model_data_column,
232 gint model_visibility_column,
233 GtkTreeIterCompareFunc column_sort_fn);
277 const gchar *column_title,
278 const gchar *pref_name,
279 const gchar *sizing_text,
280 gint model_data_column,
281 gint model_color_column,
282 gint model_visibility_column,
283 GtkTreeIterCompareFunc column_sort_fn);
298 GtkTreeViewColumn *column);
326 const gchar *wanted);
344 const gchar *section);
384 gchar *first_column_name,
399 GtkTreeCellDataFunc func);
449 gnc_tree_view_keynav(
GncTreeView *view, GtkTreeViewColumn **col,
450 GtkTreePath *path, GdkEventKey *event);
454 gnc_tree_view_path_is_valid(
GncTreeView *view, GtkTreePath *path);
GtkTreeViewColumn * gnc_tree_view_add_text_column(GncTreeView *view, const gchar *column_title, const gchar *pref_name, const gchar *stock_icon_name, const gchar *sizing_text, gint model_data_column, gint model_visibility_column, GtkTreeIterCompareFunc column_sort_fn)
gint gnc_tree_view_append_column(GncTreeView *view, GtkTreeViewColumn *column)
void gnc_tree_view_expand_columns(GncTreeView *view, gchar *first_column_name,...)
void gnc_tree_view_set_state_section(GncTreeView *view, const gchar *section)
GtkTreeViewColumn * gnc_tree_view_add_date_column(GncTreeView *view, const gchar *column_title, const gchar *pref_name, const gchar *stock_icon_name, const gchar *sizing_text, gint model_data_column, gint model_visibility_column, GtkTreeIterCompareFunc column_sort_fn)
void gnc_tree_view_set_control_column_background(GncTreeView *view, gint column, GtkTreeCellDataFunc func)
GtkTreeViewColumn * gnc_tree_view_add_numeric_column(GncTreeView *view, const gchar *column_title, const gchar *pref_name, const gchar *sizing_text, gint model_data_column, gint model_color_column, gint model_visibility_column, GtkTreeIterCompareFunc column_sort_fn)
GtkTreeViewColumn * gnc_tree_view_add_combo_column(GncTreeView *view, const gchar *column_title, const gchar *pref_name, const gchar *sizing_text, gint model_data_column, gint model_visibility_column, GtkTreeModel *combo_tree_model, gint combo_model_text_column, GtkTreeIterCompareFunc column_sort_fn)
GtkTreeViewColumn * gnc_tree_view_add_toggle_column(GncTreeView *view, const gchar *column_title, const gchar *column_short_title, const gchar *pref_name, gint model_data_column, gint model_visibility_column, GtkTreeIterCompareFunc column_sort_fn, renderer_toggled toggle_edited_cb)
const gchar * gnc_tree_view_get_state_section(GncTreeView *view)
GType gnc_tree_view_get_type(void)
void gnc_tree_view_remove_state_information(GncTreeView *view)
void gnc_tree_view_configure_columns(GncTreeView *view)
void gnc_tree_view_set_sort_user_data(GncTreeView *view, GtkTreeModel *s_model)
gboolean gnc_tree_view_get_show_column_menu(GncTreeView *view)
GtkTreeViewColumn * gnc_tree_view_find_column_by_name(GncTreeView *view, const gchar *wanted)
void gnc_tree_view_set_show_column_menu(GncTreeView *view, gboolean visible)
void gnc_tree_view_save_state(GncTreeView *view)
GtkCellRenderer * gnc_tree_view_column_get_renderer(GtkTreeViewColumn *column)