GnuCash c935c2f+
Loading...
Searching...
No Matches
gnc-tree-model-owner.h
Go to the documentation of this file.
1/*
2 * gnc-tree-model-owner.h -- GtkTreeModel implementation to
3 * display owners in a GtkTreeView.
4 *
5 * Copyright (C) 2011 Geert Janssens <geert@kobaltwit.be>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, contact:
19 *
20 * Free Software Foundation Voice: +1-617-542-5942
21 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
22 * Boston, MA 02110-1301, USA gnu@gnu.org
23 */
24
34#ifndef __GNC_TREE_MODEL_OWNER_H
35#define __GNC_TREE_MODEL_OWNER_H
36
37#include <gtk/gtk.h>
38#include "gnc-tree-model.h"
39
40#include "gncOwner.h"
41
42G_BEGIN_DECLS
43
44/* type macros */
45#define GNC_TYPE_TREE_MODEL_OWNER (gnc_tree_model_owner_get_type ())
46G_DECLARE_FINAL_TYPE (GncTreeModelOwner, gnc_tree_model_owner, GNC, TREE_MODEL_OWNER, GncTreeModel)
47
48#define GNC_TREE_MODEL_OWNER_NAME "GncTreeModelOwner"
49
50
51typedef enum
52{
53 GNC_TREE_MODEL_OWNER_COL_NAME,
54 GNC_TREE_MODEL_OWNER_COL_TYPE,
55 GNC_TREE_MODEL_OWNER_COL_ID,
56 GNC_TREE_MODEL_OWNER_COL_CURRENCY,
57 GNC_TREE_MODEL_OWNER_COL_ADDRESS_NAME,
58 GNC_TREE_MODEL_OWNER_COL_ADDRESS_1,
59 GNC_TREE_MODEL_OWNER_COL_ADDRESS_2,
60 GNC_TREE_MODEL_OWNER_COL_ADDRESS_3,
61 GNC_TREE_MODEL_OWNER_COL_ADDRESS_4,
62 GNC_TREE_MODEL_OWNER_COL_PHONE,
63 GNC_TREE_MODEL_OWNER_COL_FAX,
64 GNC_TREE_MODEL_OWNER_COL_EMAIL,
65 GNC_TREE_MODEL_OWNER_COL_BALANCE,
66 GNC_TREE_MODEL_OWNER_COL_BALANCE_REPORT,
67 GNC_TREE_MODEL_OWNER_COL_NOTES,
68 GNC_TREE_MODEL_OWNER_COL_ACTIVE,
69
70 GNC_TREE_MODEL_OWNER_COL_LAST_VISIBLE = GNC_TREE_MODEL_OWNER_COL_ACTIVE,
71
72 /* internal hidden columns */
73 GNC_TREE_MODEL_OWNER_COL_COLOR_BALANCE,
74
75 GNC_TREE_MODEL_OWNER_NUM_COLUMNS
76} GncTreeModelOwnerColumn;
77
85GtkTreeModel *gnc_tree_model_owner_new (GncOwnerType owner_type);
104GncOwner *gnc_tree_model_owner_get_owner (GncTreeModelOwner *model,
105 GtkTreeIter *iter);
106
107
124gboolean gnc_tree_model_owner_get_iter_from_owner (GncTreeModelOwner *model,
125 GncOwner *owner,
126 GtkTreeIter *iter);
127
128
142GtkTreePath *gnc_tree_model_owner_get_path_from_owner (GncTreeModelOwner *model,
143 GncOwner *owner);
146G_END_DECLS
147
148#endif /* __GNC_TREE_MODEL_OWNER_H */
149
GtkTreeModel implementation for a generic gnucash tree.
Business Interface: Object OWNERs.
gboolean gnc_tree_model_owner_get_iter_from_owner(GncTreeModelOwner *model, GncOwner *owner, GtkTreeIter *iter)
Convert a model/owner pair into a gtk_tree_model_iter.
GtkTreeModel * gnc_tree_model_owner_new(GncOwnerType owner_type)
Create a new GtkTreeModel for manipulating gnucash owners.
GtkTreePath * gnc_tree_model_owner_get_path_from_owner(GncTreeModelOwner *model, GncOwner *owner)
Convert a model/owner pair into a gtk_tree_model_path.
GncOwner * gnc_tree_model_owner_get_owner(GncTreeModelOwner *model, GtkTreeIter *iter)
Convert a model/iter pair to a gnucash owner.