]> www.fi.muni.cz Git - evince.git/blob - cut-n-paste/toolbar-editor/egg-editable-toolbar.h
Implement epiphany like toolbar editor. Based on patch by
[evince.git] / cut-n-paste / toolbar-editor / egg-editable-toolbar.h
1 /*
2  *  Copyright (C) 2003-2004 Marco Pesenti Gritti
3  *  Copyright (C) 2004 Christian Persch
4  *
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)
8  *  any later version.
9  *
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.
14  *
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.
18  *
19  *  $Id$
20  */
21
22 #ifndef EGG_EDITABLE_TOOLBAR_H
23 #define EGG_EDITABLE_TOOLBAR_H
24
25 #include "egg-toolbars-model.h"
26
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
33 G_BEGIN_DECLS
34
35 typedef struct EggEditableToolbarClass EggEditableToolbarClass;
36
37 #define EGG_TYPE_EDITABLE_TOOLBAR             (egg_editable_toolbar_get_type ())
38 #define EGG_EDITABLE_TOOLBAR(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbar))
39 #define EGG_EDITABLE_TOOLBAR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
40 #define EGG_IS_EDITABLE_TOOLBAR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_EDITABLE_TOOLBAR))
41 #define EGG_IS_EDITABLE_TOOLBAR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_EDITABLE_TOOLBAR))
42 #define EGG_EDITABLE_TOOLBAR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
43
44
45 typedef struct EggEditableToolbar EggEditableToolbar;
46 typedef struct EggEditableToolbarPrivate EggEditableToolbarPrivate;
47
48 struct EggEditableToolbar
49 {
50   GtkVBox parent_object;
51
52   /*< private >*/
53   EggEditableToolbarPrivate *priv;
54 };
55
56 struct EggEditableToolbarClass
57 {
58   GtkVBoxClass parent_class;
59
60   void (* action_request) (EggEditableToolbar *etoolbar,
61                            const char *action_name);
62 };
63
64 GType               egg_editable_toolbar_get_type        (void);
65 GtkWidget          *egg_editable_toolbar_new             (GtkUIManager         *manager);
66 GtkWidget          *egg_editable_toolbar_new_with_model  (GtkUIManager         *manager,
67                                                           EggToolbarsModel     *model);
68 void                egg_editable_toolbar_set_model       (EggEditableToolbar   *etoolbar,
69                                                           EggToolbarsModel     *model);
70 EggToolbarsModel   *egg_editable_toolbar_get_model       (EggEditableToolbar   *etoolbar);
71 void                egg_editable_toolbar_set_edit_mode   (EggEditableToolbar   *etoolbar,
72                                                           gboolean              mode);
73 gboolean            egg_editable_toolbar_get_edit_mode   (EggEditableToolbar   *etoolbar);
74 void                egg_editable_toolbar_show            (EggEditableToolbar   *etoolbar,
75                                                           const char           *name);
76 void                egg_editable_toolbar_hide            (EggEditableToolbar   *etoolbar,
77                                                           const char           *name);
78 void                egg_editable_toolbar_set_drag_dest   (EggEditableToolbar   *etoolbar,
79                                                           const GtkTargetEntry *targets,
80                                                           gint                  n_targets,
81                                                           const char           *toolbar_name);
82 void                egg_editable_toolbar_set_fixed       (EggEditableToolbar   *etoolbar,
83                                                           GtkToolItem          *fixed);
84
85
86 /* Private Functions */
87
88 GtkWidget          *_egg_editable_toolbar_new_separator_image (void);
89
90 G_END_DECLS
91
92 #endif