Mark many strings translatable
[viking.git] / src / viktreeview.h
blob097da7df6e192887a6ee830c6ccd9e9fda384246
1 /*
2 * viking -- GPS Data and Topo Analyzer, Explorer, and Manager
4 * Copyright (C) 2003-2005, Evan Battaglia <gtoevan@gmx.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef _VIKING_TREEVIEW_H
23 #define _VIKING_TREEVIEW_H
25 #include "config.h"
27 #include <glib.h>
28 #include <glib-object.h>
29 #include <gtk/gtktreeview.h>
31 G_BEGIN_DECLS
33 #define VIK_TREEVIEW_TYPE (vik_treeview_get_type ())
34 #define VIK_TREEVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIK_TREEVIEW_TYPE, VikTreeview))
35 #define VIK_TREEVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIK_TREEVIEW_TYPE, VikTreeviewClass))
36 #define IS_VIK_TREEVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIK_TREEVIEW_TYPE))
37 #define IS_VIK_TREEVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIK_TREEVIEW_TYPE))
39 typedef struct _VikTreeview VikTreeview;
40 typedef struct _VikTreeviewClass VikTreeviewClass;
42 struct _VikTreeviewClass
44 GtkTreeViewClass vbox_class;
45 void (* item_edited) (VikTreeview *vt, GtkTreeIter *iter, const gchar *new_name);
46 void (* item_toggled) (VikTreeview *vt,GtkTreeIter *iter);
49 enum {
50 VIK_TREEVIEW_TYPE_LAYER = 0,
51 VIK_TREEVIEW_TYPE_SUBLAYER
54 GType vik_treeview_get_type ();
57 VikTreeview *vik_treeview_new ();
59 GtkWidget *vik_treeview_get_widget ( VikTreeview *vt );
61 gint vik_treeview_item_get_data ( VikTreeview *vt, GtkTreeIter *iter );
62 gint vik_treeview_item_get_type ( VikTreeview *vt, GtkTreeIter *iter );
63 gpointer vik_treeview_item_get_pointer ( VikTreeview *vt, GtkTreeIter *iter );
64 void vik_treeview_item_set_pointer ( VikTreeview *vt, GtkTreeIter *iter, gpointer pointer );
66 gpointer vik_treeview_item_get_parent ( VikTreeview *vt, GtkTreeIter *iter );
68 void vik_treeview_select_iter ( VikTreeview *vt, GtkTreeIter *iter );
69 gboolean vik_treeview_get_selected_iter ( VikTreeview *vt, GtkTreeIter *iter );
71 void vik_treeview_item_set_name ( VikTreeview *vt, GtkTreeIter *iter, const gchar *to );
72 void vik_treeview_item_set_visible ( VikTreeview *vt, GtkTreeIter *iter, gboolean to );
73 void vik_treeview_item_delete ( VikTreeview *vt, GtkTreeIter *iter );
75 gboolean vik_treeview_get_iter_at_pos ( VikTreeview *vt, GtkTreeIter *iter, gint x, gint y );
77 gboolean vik_treeview_get_iter_from_path_str ( VikTreeview *vt, GtkTreeIter *iter, const gchar *path_str );
78 gboolean vik_treeview_move_item ( VikTreeview *vt, GtkTreeIter *iter, gboolean up );
79 void vik_treeview_item_select ( VikTreeview *vt, GtkTreeIter *iter );
81 gboolean vik_treeview_item_get_parent_iter ( VikTreeview *vt, GtkTreeIter *iter, GtkTreeIter *parent );
82 void vik_treeview_expand_toplevel ( VikTreeview *vt );
83 void vik_treeview_expand ( VikTreeview *vt, GtkTreeIter *iter );
85 void vik_treeview_add_layer ( VikTreeview *vt, GtkTreeIter *parent_iter, GtkTreeIter *iter, const gchar *name, gpointer parent,
86 gpointer item, gint data, gint icon_type ); /* icon type: type of layer or -1 -> no icon */
87 void vik_treeview_insert_layer ( VikTreeview *vt, GtkTreeIter *parent_iter, GtkTreeIter *iter, const gchar *name, gpointer parent,
88 gpointer item, gint data, gint icon_type, GtkTreeIter *sibling );
89 void vik_treeview_add_sublayer ( VikTreeview *vt, GtkTreeIter *parent_iter, GtkTreeIter *iter, const gchar *name, gpointer parent, gpointer item,
90 gint data, GdkPixbuf *icon, gboolean has_visible, gboolean editable );
92 gboolean vik_treeview_get_iter_with_name ( VikTreeview *vt, GtkTreeIter *iter, GtkTreeIter *parent_iter, const gchar *name );
94 #ifdef VIK_CONFIG_ALPHABETIZED_TRW
95 void vik_treeview_add_sublayer_alphabetized ( VikTreeview *vt, GtkTreeIter *parent_iter, GtkTreeIter *iter, const gchar *name, gpointer parent, gpointer item,
96 gint data, GdkPixbuf *icon, gboolean has_visible, gboolean editable );
98 void vik_treeview_sublayer_realphabetize ( VikTreeview *vt, GtkTreeIter *iter, const gchar *newname );
99 #endif
101 G_END_DECLS
103 #endif