1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 
3 /*
4  *  GThumb
5  *
6  *  Copyright (C) 2009 Free Software Foundation, Inc.
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef GTH_SIDEBAR_H
23 #define GTH_SIDEBAR_H
24 
25 #include <gtk/gtk.h>
26 #include "gth-file-data.h"
27 
28 G_BEGIN_DECLS
29 
30 #define GTH_TYPE_SIDEBAR              (gth_sidebar_get_type ())
31 #define GTH_SIDEBAR(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_SIDEBAR, GthSidebar))
32 #define GTH_SIDEBAR_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_TYPE_SIDEBAR, GthSidebarClass))
33 #define GTH_IS_SIDEBAR(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_SIDEBAR))
34 #define GTH_IS_SIDEBAR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_SIDEBAR))
35 #define GTH_SIDEBAR_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GTH_TYPE_SIDEBAR, GthSidebarClass))
36 
37 typedef enum {
38 	GTH_SIDEBAR_STATE_HIDDEN,
39 	GTH_SIDEBAR_STATE_PROPERTIES,
40 	GTH_SIDEBAR_STATE_TOOLS
41 } GthSidebarState;
42 
43 typedef struct _GthSidebar        GthSidebar;
44 typedef struct _GthSidebarClass   GthSidebarClass;
45 typedef struct _GthSidebarPrivate GthSidebarPrivate;
46 
47 struct _GthSidebar {
48 	GtkStack __parent;
49 	GthSidebarPrivate *priv;
50 };
51 
52 struct _GthSidebarClass {
53 	GtkStackClass __parent_class;
54 };
55 
56 GType          gth_sidebar_get_type            (void);
57 GtkWidget *    gth_sidebar_new                 (char           **sections_status);
58 GtkWidget *    gth_sidebar_get_toolbox         (GthSidebar      *sidebar);
59 void           gth_sidebar_set_file            (GthSidebar      *sidebar,
60 						GthFileData     *file_data);
61 void           gth_sidebar_show_properties     (GthSidebar      *sidebar);
62 void           gth_sidebar_show_tools          (GthSidebar      *sidebar);
63 gboolean       gth_sidebar_tool_is_active      (GthSidebar      *sidebar);
64 void           gth_sidebar_deactivate_tool     (GthSidebar      *sidebar);
65 void           gth_sidebar_update_sensitivity  (GthSidebar      *sidebar);
66 char **        gth_sidebar_get_sections_status (GthSidebar      *sidebar);
67 
68 G_END_DECLS
69 
70 #endif /* GTH_SIDEBAR_H */
71