Refactor to remove duplication, lower assumptions and improve safety
[geany-mirror.git] / src / sidebar.h
blob83b723f6690d56f244ea6245839ef895a4813e33
1 /*
2 * sidebar.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005 The Geany contributors
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 along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef GEANY_SIDEBAR_H
24 #define GEANY_SIDEBAR_H 1
26 #include "document.h"
28 #include "gtkcompat.h"
30 #ifdef GEANY_PRIVATE
32 G_BEGIN_DECLS
34 typedef struct SidebarTreeviews
36 GtkWidget *tree_openfiles;
37 GtkWidget *default_tag_tree;
38 GtkWidget *popup_taglist;
40 SidebarTreeviews;
42 extern SidebarTreeviews tv;
44 enum
46 SYMBOLS_COLUMN_ICON,
47 SYMBOLS_COLUMN_NAME,
48 SYMBOLS_COLUMN_TAG,
49 SYMBOLS_COLUMN_TOOLTIP,
50 SYMBOLS_N_COLUMNS
53 enum
55 OPENFILES_PATHS_NONE,
56 OPENFILES_PATHS_LIST,
57 OPENFILES_PATHS_TREE,
58 OPENFILES_PATHS_COUNT
61 /* documents tree model columns */
62 enum
64 DOCUMENTS_ICON,
65 DOCUMENTS_SHORTNAME, /* dirname for parents, basename for children */
66 DOCUMENTS_DOCUMENT,
67 DOCUMENTS_COLOR,
68 DOCUMENTS_FILENAME, /* full filename */
69 DOCUMENTS_FOLD, /* fold state stored when folding parent rows */
72 void sidebar_init(void);
74 void sidebar_finalize(void);
76 void sidebar_update_tag_list(GeanyDocument *doc, gboolean update);
78 void sidebar_openfiles_add(GeanyDocument *doc);
80 void sidebar_openfiles_update(GeanyDocument *doc);
82 void sidebar_openfiles_update_all(void);
84 void sidebar_select_openfiles_item(GeanyDocument *doc);
86 void sidebar_remove_document(GeanyDocument *doc);
88 void sidebar_add_common_menu_items(GtkMenu *menu);
90 void sidebar_focus_openfiles_tab(void);
92 void sidebar_focus_symbols_tab(void);
94 GtkTreeStore *sidebar_create_store_openfiles(void);
95 #endif
97 G_END_DECLS
100 #endif /* GEANY_SIDEBAR_H */