1 /* Eye of Gnome - Side bar 2 * 3 * Copyright (C) 2004 Red Hat, Inc. 4 * Copyright (C) 2007 The Free Software Foundation 5 * 6 * Author: Lucas Rocha <lucasr@gnome.org> 7 * 8 * Based on evince code (shell/ev-sidebar.h) by: 9 * - Jonathan Blandford <jrb@alum.mit.edu> 10 * 11 * This program is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License along 22 * with this program; if not, write to the Free Software Foundation, Inc., 23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 24 */ 25 26 #ifndef __EOG_SIDEBAR_H__ 27 #define __EOG_SIDEBAR_H__ 28 29 #include <gtk/gtk.h> 30 31 G_BEGIN_DECLS 32 33 typedef struct _EogSidebar EogSidebar; 34 typedef struct _EogSidebarClass EogSidebarClass; 35 typedef struct _EogSidebarPrivate EogSidebarPrivate; 36 37 #define EOG_TYPE_SIDEBAR (eog_sidebar_get_type()) 38 #define EOG_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), EOG_TYPE_SIDEBAR, EogSidebar)) 39 #define EOG_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EOG_TYPE_SIDEBAR, EogSidebarClass)) 40 #define EOG_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), EOG_TYPE_SIDEBAR)) 41 #define EOG_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EOG_TYPE_SIDEBAR)) 42 #define EOG_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EOG_TYPE_SIDEBAR, EogSidebarClass)) 43 44 struct _EogSidebar { 45 GtkBox base_instance; 46 47 EogSidebarPrivate *priv; 48 }; 49 50 struct _EogSidebarClass { 51 GtkBoxClass base_class; 52 53 void (* page_added) (EogSidebar *eog_sidebar, 54 GtkWidget *main_widget); 55 56 void (* page_removed) (EogSidebar *eog_sidebar, 57 GtkWidget *main_widget); 58 }; 59 60 GType eog_sidebar_get_type (void); 61 62 GtkWidget *eog_sidebar_new (void); 63 64 void eog_sidebar_add_page (EogSidebar *eog_sidebar, 65 const gchar *title, 66 GtkWidget *main_widget); 67 68 void eog_sidebar_remove_page (EogSidebar *eog_sidebar, 69 GtkWidget *main_widget); 70 71 void eog_sidebar_set_page (EogSidebar *eog_sidebar, 72 GtkWidget *main_widget); 73 74 gint eog_sidebar_get_n_pages (EogSidebar *eog_sidebar); 75 76 gboolean eog_sidebar_is_empty (EogSidebar *eog_sidebar); 77 78 G_END_DECLS 79 80 #endif /* __EOG_SIDEBAR_H__ */ 81 82 83