]> git.sur5r.net Git - glabels/blob - glabels2/src/menus.h
Initial revision
[glabels] / glabels2 / src / menus.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  menus.h:  GLabels menus module header file
5  *
6  *  Copyright (C) 2001-2002  Jim Evins <evins@snaught.com>.
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  */
22
23 /*
24  * This file is based on gedit-menus.h from gedit2:
25  *
26  * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
27  * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi 
28  *
29  */
30 #ifndef __GL_MENU_H__
31 #define __GL_MENU_H__
32
33 #include <bonobo/bonobo-ui-component.h>
34 #include <bonobo/bonobo-ui-engine.h>
35 #include <bonobo/bonobo-window.h>
36
37 extern BonoboUIVerb gl_verbs [];
38 extern gchar* gl_menus_no_docs_sensible_verbs []; 
39 extern gchar* gl_menus_untitled_doc_sensible_verbs [];
40 extern gchar* gl_menus_not_modified_doc_sensible_verbs []; 
41
42 #define gl_menus_all_sensible_verbs gl_menus_no_docs_sensible_verbs
43
44 void gl_menus_set_verb_sensitive                (BonoboUIComponent *ui_component,
45                                                  gchar             *cname,
46                                                  gboolean           sensitive);
47 void gl_menus_set_verb_list_sensitive   (BonoboUIComponent *ui_component, 
48                                                  gchar            **vlist,
49                                                  gboolean           sensitive);
50 void gl_menus_set_verb_state            (BonoboUIComponent *ui_component, 
51                                                  gchar* cname, 
52                                                  gboolean state);
53
54 /* convenience functions for plugins */
55
56 void gl_menus_add_menu_item (BonoboWindow *window,
57                      const gchar *path,
58                      const gchar *name,
59                      const gchar *label,
60                      const gchar *tooltip,
61                      const gchar *stock_pixmap,
62                      BonoboUIVerbFn cb);
63
64 void gl_menus_remove_menu_item (BonoboWindow *window,
65                      const gchar *path,
66                      const gchar *name);
67
68
69 void gl_menus_add_menu_item_all (const gchar *path,
70                      const gchar *name,
71                      const gchar *label,
72                      const gchar *tooltip,
73                      const gchar *stock_pixmap,
74                      BonoboUIVerbFn cb);
75
76 void gl_menus_remove_menu_item_all (const gchar *path,
77                      const gchar *name);
78
79
80 #endif /* __GL_MENU_H__ */