1 /* Dia -- an diagram creation/manipulation program
2 * Copyright (C) 1998 Alexander Larsson
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #define TOOLBOX_MENU "/ToolboxMenu"
24 #define DISPLAY_MENU "/DisplayMenu"
25 #define POPUP_MENU "/PopupMenu"
27 struct zoom_pair
{ const gchar
*string
; const gint value
; };
29 extern const struct zoom_pair zooms
[10];
31 /* all the menu items that can be updated */
32 struct _UpdatableMenuItems
37 GtkAction
*edit_delete
;
38 GtkAction
*edit_duplicate
;
41 GtkAction
*paste_text
;
43 GtkAction
*send_to_back
;
44 GtkAction
*bring_to_front
;
45 GtkAction
*send_backwards
;
46 GtkAction
*bring_forwards
;
53 GtkAction
*unparent_children
;
67 GtkAction
*properties
;
70 typedef struct _UpdatableMenuItems UpdatableMenuItems
;
72 void menus_get_toolbox_menubar (GtkWidget
**menubar
, GtkAccelGroup
**accel
);
73 GtkWidget
* menus_get_display_popup (void);
74 GtkAccelGroup
* menus_get_display_accels (void);
75 GtkWidget
* menus_create_display_menubar (GtkUIManager
**ui_manager
, GtkActionGroup
**actions
);
76 void menus_initialize_updatable_items (UpdatableMenuItems
*items
, GtkActionGroup
*actions
);
78 GtkAccelGroup
* menus_get_accel_group (void);
79 GtkActionGroup
* menus_get_action_group (void);
81 GtkAction
* menus_get_action (const gchar
*name
);
82 void menus_set_recent (GtkActionGroup
*actions
);
83 void menus_clear_recent (void);