2 * Copyright (C) 2003, 2004 Marco Pesenti Gritti
3 * Copyright (C) 2003, 2004, 2005 Christian Persch
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #ifndef EGG_EDITABLE_TOOLBAR_H
23 #define EGG_EDITABLE_TOOLBAR_H
25 #include "egg-toolbars-model.h"
27 #include <gtk/gtkuimanager.h>
28 #include <gtk/gtkselection.h>
29 #include <gtk/gtkvbox.h>
30 #include <gtk/gtktoolitem.h>
31 #include <gtk/gtktoolbar.h>
32 #include <gtk/gtkmenu.h>
36 #define EGG_TYPE_EDITABLE_TOOLBAR (egg_editable_toolbar_get_type ())
37 #define EGG_EDITABLE_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbar))
38 #define EGG_EDITABLE_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
39 #define EGG_IS_EDITABLE_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_EDITABLE_TOOLBAR))
40 #define EGG_IS_EDITABLE_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_EDITABLE_TOOLBAR))
41 #define EGG_EDITABLE_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
43 typedef struct _EggEditableToolbar EggEditableToolbar;
44 typedef struct _EggEditableToolbarPrivate EggEditableToolbarPrivate;
45 typedef struct _EggEditableToolbarClass EggEditableToolbarClass;
47 struct _EggEditableToolbar
49 GtkVBox parent_object;
52 EggEditableToolbarPrivate *priv;
55 struct _EggEditableToolbarClass
57 GtkVBoxClass parent_class;
59 void (* action_request) (EggEditableToolbar *etoolbar,
60 const char *action_name);
63 GType egg_editable_toolbar_get_type (void);
64 GtkWidget *egg_editable_toolbar_new (GtkUIManager *manager,
65 const char *visibility_path);
66 GtkWidget *egg_editable_toolbar_new_with_model (GtkUIManager *manager,
67 EggToolbarsModel *model,
68 const char *visibility_path);
69 void egg_editable_toolbar_set_model (EggEditableToolbar *etoolbar,
70 EggToolbarsModel *model);
71 EggToolbarsModel *egg_editable_toolbar_get_model (EggEditableToolbar *etoolbar);
72 GtkUIManager *egg_editable_toolbar_get_manager (EggEditableToolbar *etoolbar);
73 void egg_editable_toolbar_set_edit_mode (EggEditableToolbar *etoolbar,
75 gboolean egg_editable_toolbar_get_edit_mode (EggEditableToolbar *etoolbar);
76 void egg_editable_toolbar_show (EggEditableToolbar *etoolbar,
78 void egg_editable_toolbar_hide (EggEditableToolbar *etoolbar,
80 void egg_editable_toolbar_set_fixed (EggEditableToolbar *etoolbar,
81 GtkToolbar *fixed_toolbar);
83 GtkWidget * egg_editable_toolbar_get_selected (EggEditableToolbar *etoolbar);
84 void egg_editable_toolbar_set_selected (EggEditableToolbar *etoolbar,
87 void egg_editable_toolbar_add_visibility (EggEditableToolbar *etoolbar,
90 /* Private Functions */
92 GtkWidget *_egg_editable_toolbar_new_separator_image (void);