]> www.fi.muni.cz Git - evince.git/blob - cut-n-paste/toolbar-editor/egg-editable-toolbar.h
9f143da7091ce88507a375361c69c7c06014ade7
[evince.git] / cut-n-paste / toolbar-editor / egg-editable-toolbar.h
1 /*
2  *  Copyright (C) 2003, 2004  Marco Pesenti Gritti
3  *  Copyright (C) 2003, 2004, 2005  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 #define EGG_TYPE_EDITABLE_TOOLBAR             (egg_editable_toolbar_get_type ())
36 #define EGG_EDITABLE_TOOLBAR(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbar))
37 #define EGG_EDITABLE_TOOLBAR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
38 #define EGG_IS_EDITABLE_TOOLBAR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_EDITABLE_TOOLBAR))
39 #define EGG_IS_EDITABLE_TOOLBAR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_EDITABLE_TOOLBAR))
40 #define EGG_EDITABLE_TOOLBAR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
41
42 typedef struct _EggEditableToolbar        EggEditableToolbar;
43 typedef struct _EggEditableToolbarPrivate EggEditableToolbarPrivate;
44 typedef struct _EggEditableToolbarClass   EggEditableToolbarClass;
45
46 struct _EggEditableToolbar
47 {
48   GtkVBox parent_object;
49
50   /*< private >*/
51   EggEditableToolbarPrivate *priv;
52 };
53
54 struct _EggEditableToolbarClass
55 {
56   GtkVBoxClass parent_class;
57
58   void (* action_request) (EggEditableToolbar *etoolbar,
59                            const char *action_name);
60 };
61
62 GType               egg_editable_toolbar_get_type        (void);
63 GtkWidget          *egg_editable_toolbar_new             (GtkUIManager         *manager);
64 GtkWidget          *egg_editable_toolbar_new_with_model  (GtkUIManager         *manager,
65                                                           EggToolbarsModel     *model);
66 void                egg_editable_toolbar_set_model       (EggEditableToolbar   *etoolbar,
67                                                           EggToolbarsModel     *model);
68 EggToolbarsModel   *egg_editable_toolbar_get_model       (EggEditableToolbar   *etoolbar);
69 void                egg_editable_toolbar_set_edit_mode   (EggEditableToolbar   *etoolbar,
70                                                           gboolean              mode);
71 gboolean            egg_editable_toolbar_get_edit_mode   (EggEditableToolbar   *etoolbar);
72 void                egg_editable_toolbar_show            (EggEditableToolbar   *etoolbar,
73                                                           const char           *name);
74 void                egg_editable_toolbar_hide            (EggEditableToolbar   *etoolbar,
75                                                           const char           *name);
76 void                egg_editable_toolbar_set_drag_dest   (EggEditableToolbar   *etoolbar,
77                                                           const GtkTargetEntry *targets,
78                                                           gint                  n_targets,
79                                                           const char           *toolbar_name);
80 void                egg_editable_toolbar_set_fixed       (EggEditableToolbar   *etoolbar,
81                                                           GtkToolbar           *fixed_toolbar);
82
83
84 /* Private Functions */
85
86 GtkWidget          *_egg_editable_toolbar_new_separator_image (void);
87
88 G_END_DECLS
89
90 #endif