1 /* GIMP - The GNU Image Manipulation Program 2 * Copyright (C) 1995 Spencer Kimball and Peter Mattis 3 * 4 * gimpcontainertreestore.h 5 * Copyright (C) 2010 Michael Natterer <mitch@gimp.org> 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * (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, see <https://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __GIMP_CONTAINER_TREE_STORE_H__ 22 #define __GIMP_CONTAINER_TREE_STORE_H__ 23 24 25 enum 26 { 27 GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, 28 GIMP_CONTAINER_TREE_STORE_COLUMN_NAME, 29 GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES, 30 GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_SENSITIVE, 31 GIMP_CONTAINER_TREE_STORE_COLUMN_USER_DATA, 32 GIMP_CONTAINER_TREE_STORE_N_COLUMNS 33 }; 34 35 36 #define GIMP_TYPE_CONTAINER_TREE_STORE (gimp_container_tree_store_get_type ()) 37 #define GIMP_CONTAINER_TREE_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CONTAINER_TREE_STORE, GimpContainerTreeStore)) 38 #define GIMP_CONTAINER_TREE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CONTAINER_TREE_STORE, GimpContainerTreeStoreClass)) 39 #define GIMP_IS_CONTAINER_TREE_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CONTAINER_TREE_STORE)) 40 #define GIMP_IS_CONTAINER_TREE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CONTAINER_TREE_STORE)) 41 #define GIMP_CONTAINER_TREE_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CONTAINER_TREE_STORE, GimpContainerTreeStoreClass)) 42 43 44 typedef struct _GimpContainerTreeStoreClass GimpContainerTreeStoreClass; 45 46 struct _GimpContainerTreeStore 47 { 48 GtkTreeStore parent_instance; 49 }; 50 51 struct _GimpContainerTreeStoreClass 52 { 53 GtkTreeStoreClass parent_class; 54 }; 55 56 57 GType gimp_container_tree_store_get_type (void) G_GNUC_CONST; 58 59 void gimp_container_tree_store_columns_init (GType *types, 60 gint *n_types); 61 gint gimp_container_tree_store_columns_add (GType *types, 62 gint *n_types, 63 GType type); 64 65 GtkTreeModel * gimp_container_tree_store_new (GimpContainerView *container_view, 66 gint n_columns, 67 GType *types); 68 69 void gimp_container_tree_store_add_renderer_cell (GimpContainerTreeStore *store, 70 GtkCellRenderer *cell); 71 void gimp_container_tree_store_set_use_name (GimpContainerTreeStore *store, 72 gboolean use_name); 73 gboolean gimp_container_tree_store_get_use_name (GimpContainerTreeStore *store); 74 75 void gimp_container_tree_store_set_context (GimpContainerTreeStore *store, 76 GimpContext *context); 77 GtkTreeIter * gimp_container_tree_store_insert_item (GimpContainerTreeStore *store, 78 GimpViewable *viewable, 79 GtkTreeIter *parent, 80 gint index); 81 void gimp_container_tree_store_remove_item (GimpContainerTreeStore *store, 82 GimpViewable *viewable, 83 GtkTreeIter *iter); 84 void gimp_container_tree_store_reorder_item (GimpContainerTreeStore *store, 85 GimpViewable *viewable, 86 gint new_index, 87 GtkTreeIter *iter); 88 gboolean gimp_container_tree_store_rename_item (GimpContainerTreeStore *store, 89 GimpViewable *viewable, 90 GtkTreeIter *iter); 91 void gimp_container_tree_store_clear_items (GimpContainerTreeStore *store); 92 void gimp_container_tree_store_set_view_size (GimpContainerTreeStore *store); 93 94 95 #endif /* __GIMP_CONTAINER_TREE_STORE_H__ */ 96