1 #ifndef __SP_XMLVIEW_TREE_H__
2 #define __SP_XMLVIEW_TREE_H__
4 /*
5 * Specialization of GtkCTree for the XML editor
6 *
7 * Authors:
8 * MenTaLguY <mental@rydia.net>
9 *
10 * Copyright (C) 2002 MenTaLguY
11 *
12 * Released under the GNU GPL; see COPYING for details
13 */
15 #include <gtk/gtkctree.h>
16 #include "../xml/repr.h"
18 #include <glib.h>
22 #define SP_TYPE_XMLVIEW_TREE (sp_xmlview_tree_get_type ())
23 #define SP_XMLVIEW_TREE(o) (GTK_CHECK_CAST ((o), SP_TYPE_XMLVIEW_TREE, SPXMLViewTree))
24 #define SP_IS_XMLVIEW_TREE(o) (GTK_CHECK_TYPE ((o), SP_TYPE_XMLVIEW_TREE))
25 #define SP_XMLVIEW_TREE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_XMLVIEW_TREE))
27 struct SPXMLViewTree;
28 struct SPXMLViewTreeClass;
30 struct SPXMLViewTree
31 {
32 GtkCTree tree;
34 Inkscape::XML::Node * repr;
35 gint blocked;
36 };
38 struct SPXMLViewTreeClass
39 {
40 GtkCTreeClass parent_class;
41 };
43 GtkType sp_xmlview_tree_get_type (void);
44 GtkWidget * sp_xmlview_tree_new (Inkscape::XML::Node * repr, void * factory, void * data);
46 #define SP_XMLVIEW_TREE_REPR(tree) (SP_XMLVIEW_TREE (tree)->repr)
48 void sp_xmlview_tree_set_repr (SPXMLViewTree * tree, Inkscape::XML::Node * repr);
50 Inkscape::XML::Node * sp_xmlview_tree_node_get_repr (SPXMLViewTree * tree, GtkCTreeNode * node);
51 GtkCTreeNode * sp_xmlview_tree_get_repr_node (SPXMLViewTree * tree, Inkscape::XML::Node * repr);
55 #endif