]> git.sur5r.net Git - glabels/blob - glabels2/src/ui.h
Renamed menus module to ui.
[glabels] / glabels2 / src / ui.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  ui.h:  GLabels UI 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_UI_H__
31 #define __GL_UI_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_ui_verbs [];
38
39 extern gchar *gl_ui_no_docs_sensible_verbs []; 
40 extern gchar *gl_ui_not_modified_doc_sensible_verbs []; 
41 extern gchar *gl_ui_selection_sensible_verbs [];
42 extern gchar *gl_ui_atomic_selection_sensible_verbs [];
43
44 #define gl_ui_all_sensible_verbs gl_ui_no_docs_sensible_verbs
45
46 void gl_ui_set_verb_sensitive           (BonoboUIComponent *ui_component,
47                                          gchar             *cname,
48                                          gboolean           sensitive);
49 void gl_ui_set_verb_list_sensitive      (BonoboUIComponent *ui_component, 
50                                          gchar            **vlist,
51                                          gboolean           sensitive);
52 void gl_ui_set_verb_state               (BonoboUIComponent *ui_component, 
53                                          gchar* cname, 
54                                          gboolean state);
55
56 /* convenience functions for plugins */
57
58 void gl_ui_add_menu_item        (BonoboWindow   *window,
59                                  const gchar    *path,
60                                  const gchar    *name,
61                                  const gchar    *label,
62                                  const gchar    *tooltip,
63                                  const gchar    *stock_pixmap,
64                                  BonoboUIVerbFn  cb);
65
66 void gl_ui_remove_menu_item     (BonoboWindow   *window,
67                                  const gchar    *path,
68                                  const gchar    *name);
69
70
71 void gl_ui_add_menu_item_all    (const gchar    *path,
72                                  const gchar    *name,
73                                  const gchar    *label,
74                                  const gchar    *tooltip,
75                                  const gchar    *stock_pixmap,
76                                  BonoboUIVerbFn  cb);
77
78 void gl_ui_remove_menu_item_all (const gchar    *path,
79                                  const gchar    *name);
80
81
82 #endif /* __GL_UI_H__ */