34 #ifndef __GNC_TREE_VIEW_ACCOUNT_H 35 #define __GNC_TREE_VIEW_ACCOUNT_H 46 #define GNC_TYPE_TREE_VIEW_ACCOUNT (gnc_tree_view_account_get_type ()) 47 G_DECLARE_FINAL_TYPE (GncTreeViewAccount, gnc_tree_view_account, GNC, TREE_VIEW_ACCOUNT, GncTreeView)
49 #define GNC_TREE_VIEW_ACCOUNT_NAME "GncTreeViewAccount" 66 GncTreeViewAccount *tree_view;
67 GHashTable *filter_override;
68 guint32 visible_types;
69 guint32 original_visible_types;
71 gboolean original_show_hidden;
72 gboolean show_zero_total;
73 gboolean original_show_zero_total;
75 gboolean original_show_unused;
99 void gnc_tree_view_account_save(GncTreeViewAccount *tree_view,
101 GKeyFile *key_file,
const gchar *group_name);
102 void gnc_tree_view_account_restore(GncTreeViewAccount *view,
105 const gchar *group_name);
107 void gnc_tree_view_account_save_filter (GncTreeViewAccount *tree_view,
110 const gchar *group_name);
111 void gnc_tree_view_account_restore_filter (GncTreeViewAccount *view,
114 const gchar *group_name);
118 GType gnc_tree_view_account_get_type (
void);
158 typedef gchar * (*GncTreeViewAccountColumnSource) (
Account *account,
159 GtkTreeViewColumn *col,
160 GtkCellRenderer *cell);
162 typedef void (*GncTreeViewAccountColumnTextEdited) (
Account *account,
163 GtkTreeViewColumn *col,
164 const gchar *new_text);
184 GncTreeViewAccount *view,
const gchar *column_title,
185 GncTreeViewAccountColumnSource source_cb,
186 GncTreeViewAccountColumnTextEdited edited_cb);
187 GtkTreeViewColumn *gnc_tree_view_account_add_custom_column_renderer(
188 GncTreeViewAccount *account_view,
const gchar *column_title,
189 GncTreeViewAccountColumnSource col_source_cb,
190 GncTreeViewAccountColumnTextEdited col_edited_cb,
191 GtkCellRenderer *renderer);
192 void gnc_tree_view_account_set_name_edited(GncTreeViewAccount *view,
193 GncTreeViewAccountColumnTextEdited edited_cb);
194 void gnc_tree_view_account_name_edited_cb(
Account *account, GtkTreeViewColumn *col,
const gchar *new_name);
196 void gnc_tree_view_account_set_code_edited(GncTreeViewAccount *view,
197 GncTreeViewAccountColumnTextEdited edited_cb);
198 void gnc_tree_view_account_code_edited_cb(
Account *account, GtkTreeViewColumn *col,
const gchar *new_code);
200 void gnc_tree_view_account_set_description_edited(GncTreeViewAccount *view,
201 GncTreeViewAccountColumnTextEdited edited_cb);
202 void gnc_tree_view_account_description_edited_cb(
Account *account, GtkTreeViewColumn *col,
const gchar *new_desc);
204 void gnc_tree_view_account_set_notes_edited(GncTreeViewAccount *view,
205 GncTreeViewAccountColumnTextEdited edited_cb);
206 void gnc_tree_view_account_notes_edited_cb(
Account *account, GtkTreeViewColumn *col,
const gchar *new_notes);
221 const gchar *column_title,
222 const gchar *propname);
241 AccountViewInfo *avi);
255 AccountViewInfo *avi);
291 GSourceFunc destroy);
301 gboolean gnc_tree_view_account_filter_by_view_info(
489 (GncTreeViewAccount *view, GFunc editing_started_cb, gpointer editing_cb_data );
495 (GncTreeViewAccount *view, GFunc editing_finished_cb, gpointer editing_cb_data );
void gnc_tree_view_account_get_view_info(GncTreeViewAccount *account_view, AccountViewInfo *avi)
Given pointers to an account tree and old style filter block, this function will copy the current con...
GtkTreeViewColumn * gnc_tree_view_account_add_property_column(GncTreeViewAccount *view, const gchar *column_title, const gchar *propname)
Add a new column to the set of columns in an account tree view.
The instance data structure for a content plugin.
GList * gnc_tree_view_account_get_selected_accounts(GncTreeViewAccount *view)
This function returns a list of the accounts associated with the selected items in the account tree v...
Account * gnc_tree_view_account_get_cursor_account(GncTreeViewAccount *view)
This function returns the account in the account tree view at the current location of the cursor...
void gnc_tree_view_account_set_editing_finished_cb(GncTreeViewAccount *view, GFunc editing_finished_cb, gpointer editing_cb_data)
Setup the callback for when the user finishes editing the account tree so actions can be enabled like...
utility functions for the GnuCash UI
void gppat_filter_response_cb(GtkWidget *dialog, gint response, AccountFilterDialog *fd)
The Filter dialog was closed.
common utilities for manipulating a GtkTreeView within gnucash
void gppat_filter_select_all_cb(GtkWidget *button, AccountFilterDialog *fd)
The "select all account types" button in the Filter dialog was clicked.
stop here; the following types just aren't ready for prime time
void gnc_tree_view_account_expand_to_account(GncTreeViewAccount *view, Account *account)
This function forces the account tree expand whatever levels are necessary to make the specified acco...
void gnc_tree_view_account_column_add_color(GncTreeViewAccount *view, GtkTreeViewColumn *col)
Add the account color background data function to the GncTreeViewAccount column to show or not the co...
void gnc_tree_view_account_set_view_info(GncTreeViewAccount *account_view, AccountViewInfo *avi)
Given pointers to an account tree and old style filter block, this function will applies the settings...
void gppat_filter_clear_all_cb(GtkWidget *button, AccountFilterDialog *fd)
The "clear all account types" button in the Filter dialog was clicked.
void gnc_tree_view_account_set_editing_started_cb(GncTreeViewAccount *view, GFunc editing_started_cb, gpointer editing_cb_data)
Setup the callback for when the user starts editing the account tree so actions can be disabled like ...
void gnc_tree_view_account_set_selected_accounts(GncTreeViewAccount *view, GList *account_list, gboolean show_last)
This function selects a set of accounts in the account tree view.
void gppat_filter_show_hidden_toggled_cb(GtkToggleButton *togglebutton, AccountFilterDialog *fd)
The "show hidden" button in the Filter dialog changed state.
void gnc_tree_view_account_set_filter(GncTreeViewAccount *account_view, gnc_tree_view_account_filter_func func, gpointer data, GSourceFunc destroy)
This function attaches a filter function to the given account tree.
void gnc_tree_view_account_select_subaccounts(GncTreeViewAccount *view, Account *account)
This function selects all sub-accounts of an account in the account tree view.
void gnc_tree_view_account_refilter(GncTreeViewAccount *view)
This function forces the account tree filter to be evaluated.
GtkTreeViewColumn * gnc_tree_view_account_add_custom_column(GncTreeViewAccount *view, const gchar *column_title, GncTreeViewAccountColumnSource source_cb, GncTreeViewAccountColumnTextEdited edited_cb)
Add a new custom column to the set of columns in an account tree view.
GtkTreeView * gnc_tree_view_account_new_with_root(Account *root, gboolean show_root)
Create a new account tree view.
GtkTreeView * gnc_tree_view_account_new(gboolean show_root)
Create a new account tree view.
gboolean gnc_plugin_page_account_tree_filter_accounts(Account *account, gpointer user_data)
This function tells the account tree view whether or not to filter out a particular account...
Functions for adding plugins to a GnuCash window.
void gnc_tree_view_account_clear_model_cache(GncTreeViewAccount *view)
This function clears the tree model account cache so the values will be updated/refreshed.
Account * gnc_tree_view_account_get_account_from_iter(GtkTreeModel *model, GtkTreeIter *iter)
This function returns the account associated with the specified iter.
Account * gnc_tree_view_account_get_account_from_path(GncTreeViewAccount *view, GtkTreePath *path)
This function returns the account associated with the specified path.
void gnc_tree_view_account_set_selected_account(GncTreeViewAccount *view, Account *account)
This function selects an account in the account tree view.
void gppat_filter_show_unused_toggled_cb(GtkToggleButton *togglebutton, AccountFilterDialog *fd)
The "show unused" button in the Filter dialog changed state.
gint gnc_tree_view_account_count_children(GncTreeViewAccount *view, Account *account)
This function determines if an account in the account tree view has any visible children.
Account * gnc_tree_view_account_get_selected_account(GncTreeViewAccount *view)
This function returns the account associated with the selected item in the account tree view...
gboolean(* gnc_tree_view_account_filter_func)(Account *account, gpointer data)
This is the description of a filter function used by the account tree.
void gppat_filter_select_default_cb(GtkWidget *button, AccountFilterDialog *fd)
The "select default account types" button in the Filter dialog was clicked.
void gppat_filter_show_zero_toggled_cb(GtkToggleButton *togglebutton, AccountFilterDialog *fd)
The "show zero totals" button in the Filter dialog changed state.