diff options
author | Chris Toshok <toshok@helixcode.com> | 2000-10-25 08:09:18 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-10-25 08:09:18 +0800 |
commit | 606c6276a82e716b12543820c8536417b3598733 (patch) | |
tree | a6e4c51b7be2abfa6f364e98c77a702f24c1803e /widgets/table/e-tree-model.h | |
parent | 2ea5d33268965d453c741aafb115bfc29cc4f086 (diff) | |
download | gsoc2013-evolution-606c6276a82e716b12543820c8536417b3598733.tar gsoc2013-evolution-606c6276a82e716b12543820c8536417b3598733.tar.gz gsoc2013-evolution-606c6276a82e716b12543820c8536417b3598733.tar.bz2 gsoc2013-evolution-606c6276a82e716b12543820c8536417b3598733.tar.lz gsoc2013-evolution-606c6276a82e716b12543820c8536417b3598733.tar.xz gsoc2013-evolution-606c6276a82e716b12543820c8536417b3598733.tar.zst gsoc2013-evolution-606c6276a82e716b12543820c8536417b3598733.zip |
make ETreeModel opaque, and switch from using g_new0 and g_free for
2000-10-24 Chris Toshok <toshok@helixcode.com>
* e-tree-model.c: make ETreeModel opaque, and switch from using
g_new0 and g_free for ETreePath's to using g_mem_chunk routines.
(e_tree_model_node_remove): free the path's save_id. *
(e_tree_model_set_expanded_default): add method to add default
expanded status for parent nodes.
(etree_set_expanded_recurse): make this more efficient.
e-tree-model.h: make ETreeModel opaque. add prototype for
e_tree_model_set_expanded_default.
svn path=/trunk/; revision=6156
Diffstat (limited to 'widgets/table/e-tree-model.h')
-rw-r--r-- | widgets/table/e-tree-model.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/widgets/table/e-tree-model.h b/widgets/table/e-tree-model.h index 13857e6707..d3cfa6665b 100644 --- a/widgets/table/e-tree-model.h +++ b/widgets/table/e-tree-model.h @@ -13,19 +13,14 @@ typedef struct ETreePath ETreePath; typedef struct ETreeModel ETreeModel; +typedef struct ETreeModelPriv ETreeModelPriv; typedef struct ETreeModelClass ETreeModelClass; typedef gint (*ETreePathCompareFunc)(ETreeModel *model, ETreePath *path1, ETreePath *path2); typedef gboolean (*ETreePathFunc)(ETreeModel *model, ETreePath *path, gpointer data); struct ETreeModel { ETableModel base; - ETreePath *root; - gboolean root_visible; - GArray *row_array; /* used in the mapping between ETable and our tree */ - guint32 num_expanded_to_save; - guint32 num_collapsed_to_save; - GHashTable *expanded_state; /* used for loading/saving expanded state */ - GString *sort_group; /* for caching the last sort group info */ + ETreeModelPriv *priv; }; struct ETreeModelClass { @@ -71,9 +66,9 @@ struct ETreeModelClass { }; -GtkType e_tree_model_get_type (void); +GtkType e_tree_model_get_type (void); void e_tree_model_construct (ETreeModel *etree); -ETreeModel *e_tree_model_new (void); +ETreeModel *e_tree_model_new (void); /* tree traversal operations */ ETreePath *e_tree_model_get_root (ETreeModel *etree); @@ -93,6 +88,7 @@ gboolean e_tree_model_node_is_root (ETreeModel *etree, ETreePath gboolean e_tree_model_node_is_expandable (ETreeModel *etree, ETreePath *path); gboolean e_tree_model_node_is_expanded (ETreeModel *etree, ETreePath *path); gboolean e_tree_model_node_is_visible (ETreeModel *etree, ETreePath *path); +void e_tree_model_set_expanded_default (ETreeModel *etree, gboolean expanded); void e_tree_model_node_set_expanded (ETreeModel *etree, ETreePath *path, gboolean expanded); void e_tree_model_node_set_expanded_recurse (ETreeModel *etree, ETreePath *path, gboolean expanded); guint e_tree_model_node_get_children (ETreeModel *etree, ETreePath *path, ETreePath ***paths); |