]> www.fi.muni.cz Git - evince.git/blob - cut-n-paste/toolbar-editor/egg-editable-toolbar.h
8a4e85e7114399f779fc37af082c64b39614f6ef
[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 #include <gtk/gtkmenu.h>
33
34 G_BEGIN_DECLS
35
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))
42
43 typedef struct _EggEditableToolbar        EggEditableToolbar;
44 typedef struct _EggEditableToolbarPrivate EggEditableToolbarPrivate;
45 typedef struct _EggEditableToolbarClass   EggEditableToolbarClass;
46
47 struct _EggEditableToolbar
48 {
49   GtkVBox parent_object;
50
51   /*< private >*/
52   EggEditableToolbarPrivate *priv;
53 };
54
55 struct _EggEditableToolbarClass
56 {
57   GtkVBoxClass parent_class;
58
59   void (* action_request) (EggEditableToolbar *etoolbar,
60                            const char *action_name);
61 };
62
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,
74                                                           gboolean              mode);
75 gboolean            egg_editable_toolbar_get_edit_mode   (EggEditableToolbar   *etoolbar);
76 void                egg_editable_toolbar_show            (EggEditableToolbar   *etoolbar,
77                                                           const char           *name);
78 void                egg_editable_toolbar_hide            (EggEditableToolbar   *etoolbar,
79                                                           const char           *name);
80 void                egg_editable_toolbar_set_fixed       (EggEditableToolbar   *etoolbar,
81                                                           GtkToolbar           *fixed_toolbar);
82
83 GtkWidget *         egg_editable_toolbar_get_selected    (EggEditableToolbar   *etoolbar);
84 void                egg_editable_toolbar_set_selected    (EggEditableToolbar   *etoolbar,
85                                                           GtkWidget            *widget);
86
87 void              egg_editable_toolbar_add_visibility    (EggEditableToolbar   *etoolbar,
88                                                           const char           *path);
89
90 /* Private Functions */
91
92 GtkWidget          *_egg_editable_toolbar_new_separator_image (void);
93
94 G_END_DECLS
95
96 #endif