From e581631a9ce0803ba629ac67cd8934a6e23753ae Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 8 Jun 2000 23:16:22 +0000 Subject: New files. A tree model using a GNode structure to store it's info. 2000-06-08 Chris Toshok * e-tree-gnode.c, e-tree-gnode.h: New files. A tree model using a GNode structure to store it's info. * e-tree-model.c, e-tree-model.h: New files. A proxy model sitting between a table model and the real tree model (of which ETreeGNode is an example). * e-cell-tree.c, e-cell-tree.h: New files. A cell renderer capable of wrapping up a subcell and drawing the tree controls for expanding/collapsing trees. * tree-expanded.xpm, tree-unexpanded.xpm: New files. the standard + and - icons. * e-tree-example-1.c: New file, giving a (pretty poor :) example of using ETreeGNode. * Makefile.am: at the tree stuff to the build, and build tree-example-1. * .cvsignore: ignore tree-example-1. svn path=/trunk/; revision=3483 --- widgets/table/e-cell-tree.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 widgets/table/e-cell-tree.h (limited to 'widgets/table/e-cell-tree.h') diff --git a/widgets/table/e-cell-tree.h b/widgets/table/e-cell-tree.h new file mode 100644 index 0000000000..6bd842b39e --- /dev/null +++ b/widgets/table/e-cell-tree.h @@ -0,0 +1,42 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* ECellTree - Tree item for e-table. + * Copyright (C) 2000 Helix Code, Inc. + * Author: Chris Toshok + * + */ +#ifndef _E_CELL_TREE_H_ +#define _E_CELL_TREE_H_ + +#include +#include "e-cell.h" + +#define E_CELL_TREE_TYPE (e_cell_tree_get_type ()) +#define E_CELL_TREE(o) (GTK_CHECK_CAST ((o), E_CELL_TREE_TYPE, ECellTree)) +#define E_CELL_TREE_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_TREE_TYPE, ECellTreeClass)) +#define E_IS_CELL_TREE(o) (GTK_CHECK_TYPE ((o), E_CELL_TREE_TYPE)) +#define E_IS_CELL_TREE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CELL_TREE_TYPE)) + +typedef struct { + ECell parent; + + gboolean draw_lines; + + GdkPixbuf *expanded_image; + GdkPixbuf *unexpanded_image; + + ECell *subcell; +} ECellTree; + +typedef struct { + ECellClass parent_class; +} ECellTreeClass; + +GtkType e_cell_tree_get_type (void); +ECell *e_cell_tree_new (ETableModel *model, gboolean draw_lines, + ECell *subcell); +void e_cell_tree_construct (ECellTree *ect, gboolean draw_lines, + ECell *subcell); + +#endif /* _E_CELL_TREE_H_ */ + + -- cgit