give the panes more control over expander title
[geeqie.git] / src / bar.h
1 /*
2  * Geeqie
3  * (C) 2004 John Ellis
4  * Copyright (C) 2008 - 2009 The Geeqie Team
5  *
6  * Author: Vladimir Nadvornik
7  *
8  * This software is released under the GNU General Public License (GNU GPL).
9  * Please read the included file COPYING for more information.
10  * This software comes with no warranty of any kind, use at your own risk!
11  */
12
13
14 #ifndef BAR_H
15 #define BAR_H
16
17 typedef struct _PaneData PaneData;
18
19 struct _PaneData {
20         void (*pane_set_fd)(GtkWidget *pane, FileData *fd);
21         gint (*pane_event)(GtkWidget *pane, GdkEvent *event);
22         void (*pane_write_config)(GtkWidget *pane, GString *outstr, gint indent);
23         GtkWidget *title;
24         gboolean expanded;
25         
26         GList *(*list_func)(gpointer);
27         gpointer list_data;
28
29 };
30
31
32
33 GtkWidget *bar_new(GtkWidget *bounding_widget);
34 GtkWidget *bar_new_default(GtkWidget *bounding_widget);
35 GtkWidget *bar_new_from_config(GtkWidget *bounding_widget, const gchar **attribute_names, const gchar **attribute_values);
36
37 void bar_close(GtkWidget *bar);
38
39 void bar_write_config(GtkWidget *bar, GString *outstr, gint indent);
40
41 void bar_add(GtkWidget *bar, GtkWidget *pane);
42
43
44 void bar_set_fd(GtkWidget *bar, FileData *fd);
45 gint bar_event(GtkWidget *bar, GdkEvent *event);
46
47 void bar_set_selection_func(GtkWidget *bar, GList *(*list_func)(gpointer data), gpointer data); 
48
49 /* following functions are common for all panes */
50 void bar_pane_set_selection_func(GtkWidget *pane, GList *(*list_func)(gpointer data), gpointer data); 
51
52 #endif
53 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */