NetSurf
menu.h
Go to the documentation of this file.
1/*
2 * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf 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, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef NETSURF_GTK_MENU_H_
19#define NETSURF_GTK_MENU_H_
20
21#include <gtk/gtk.h>
22
23/**
24 * File menu item on menubar
25 */
27 GtkMenuItem *file;
28 GtkMenu *file_menu;
30 GtkWidget *newtab_menuitem;
33 GtkWidget *export_menuitem;
36 GtkWidget *print_menuitem;
37 GtkWidget *quit_menuitem;
38};
39
41 GtkMenuItem *edit; /* Edit menu item on menubar */
42 GtkMenu *edit_menu;
43 GtkWidget *cut_menuitem;
44 GtkWidget *copy_menuitem;
45 GtkWidget *paste_menuitem;
46 GtkWidget *delete_menuitem;
48 GtkWidget *find_menuitem;
50};
51
53 GtkMenuItem *view; /* View menu item on menubar */
54 GtkMenu *view_menu; /* gtk menu attached to menu item */
55
61 GtkWidget *tabs_menuitem;
64};
65
67 GtkMenuItem *nav; /* Nav menu item on menubar */
68 GtkMenu *nav_menu;
69
70 GtkWidget *back_menuitem;
71 GtkWidget *forward_menuitem;
72 GtkWidget *stop_menuitem;
73 GtkWidget *reload_menuitem;
74 GtkWidget *home_menuitem;
80};
81
83 GtkMenuItem *tools; /* Tools menu item on menubar */
84 GtkMenu *tools_menu;
85
90};
91
93 GtkMenuItem *help; /* Help menu item on menubar */
94 GtkMenu *help_menu;
96 GtkWidget *guide_menuitem;
97 GtkWidget *info_menuitem;
98 GtkWidget *about_menuitem;
99};
100
101
103 GtkMenu *export_menu;
106 GtkWidget *pdf_menuitem;
107};
108
114};
115
117 GtkMenu *tabs_menu;
121};
122
125 GtkCheckMenuItem *menubar_menuitem;
126 GtkCheckMenuItem *toolbar_menuitem;
128};
129
132
137};
138
139/**
140 * main menubar
141 */
143 GtkMenuBar *bar_menu;
150};
151
153 GtkMenu *burger_menu;
154
155 GtkWidget *file_menuitem;
157
158 GtkWidget *edit_menuitem;
160
161 GtkWidget *view_menuitem;
163
164 GtkWidget *nav_menuitem;
166
167 GtkWidget *tools_menuitem;
169
170 GtkWidget *help_menuitem;
172};
173
175 GtkMenu *popup_menu;
176
177 /* navigation entries */
178 GtkWidget *back_menuitem;
180 GtkWidget *stop_menuitem;
181 GtkWidget *reload_menuitem;
182
183 GtkWidget *first_separator;
184
185 /* edit entries */
186 GtkWidget *cut_menuitem;
187 GtkWidget *copy_menuitem;
188 GtkWidget *paste_menuitem;
189
191
194 GtkWidget *tools_menuitem;
196};
197
199 GtkMenu *link_menu;
200
203
204 GtkWidget *save_menuitem;
206 GtkWidget *copy_menuitem;
207};
208
209
210/**
211 * Create main menubar menu.
212 */
213struct nsgtk_bar_submenu *nsgtk_menu_bar_create(GtkMenuShell *menubar, GtkAccelGroup *group);
214
215
216/**
217 * Generate burger menu.
218 *
219 * \param accelerator group to use with menu
220 * \return new menu structure or NULL on error
221 */
222struct nsgtk_burger_menu *nsgtk_burger_menu_create(GtkAccelGroup *group);
223
224
225/**
226 * Generate right click popup menu.
227 *
228 * \param accelerator group to use with menu
229 * \return new menu structure or NULL on error
230 */
231struct nsgtk_popup_menu *nsgtk_popup_menu_create(GtkAccelGroup *group);
232
233
234/**
235 * Generate context sensitive link popup menu.
236 *
237 * \param accelerator group to use with menu
238 * \return new menu structure or NULL on error
239 */
240struct nsgtk_link_menu *nsgtk_link_menu_create(GtkAccelGroup *group);
241
242
243/**
244 * destroy bar menu
245 *
246 * destroys the gtk widgets associated with menu and frees all storage.
247 *
248 * \param menu menu to destroy
249 * \return NSERROR_OK and menu destroyed on success else error code
250 */
252
253
254/**
255 * destroy burger menu
256 *
257 * destroys the gtk widgets associated with menu and frees all storage.
258 *
259 * \param menu menu to destroy
260 * \return NSERROR_OK and menu destroyed on success else error code
261 */
263
264
265/**
266 * destroy popup menu
267 *
268 * destroys the gtk widgets associated with menu and frees all storage.
269 *
270 * \param menu menu to destroy
271 * \return NSERROR_OK and menu destroyed on success else error code
272 */
274
275
276/**
277 * destroy link menu
278 *
279 * destroys the gtk widgets associated with menu and frees all storage.
280 *
281 * \param menu menu to destroy
282 * \return NSERROR_OK and menu destroyed on success else error code
283 */
285
286
287#endif
nserror
Enumeration of error codes.
Definition: errors.h:29
struct nsgtk_link_menu * nsgtk_link_menu_create(GtkAccelGroup *group)
Generate context sensitive link popup menu.
Definition: menu.c:582
struct nsgtk_burger_menu * nsgtk_burger_menu_create(GtkAccelGroup *group)
Generate burger menu.
Definition: menu.c:522
nserror nsgtk_menu_bar_destroy(struct nsgtk_bar_submenu *menu)
destroy bar menu
Definition: menu.c:602
nserror nsgtk_burger_menu_destroy(struct nsgtk_burger_menu *menu)
destroy burger menu
Definition: menu.c:623
struct nsgtk_popup_menu * nsgtk_popup_menu_create(GtkAccelGroup *group)
Generate right click popup menu.
Definition: menu.c:551
nserror nsgtk_popup_menu_destroy(struct nsgtk_popup_menu *menu)
destroy popup menu
Definition: menu.c:645
nserror nsgtk_link_menu_destroy(struct nsgtk_link_menu *menu)
destroy link menu
Definition: menu.c:659
struct nsgtk_bar_submenu * nsgtk_menu_bar_create(GtkMenuShell *menubar, GtkAccelGroup *group)
Create main menubar menu.
Definition: menu.c:488
main menubar
Definition: menu.h:142
GtkMenuBar * bar_menu
Definition: menu.h:143
struct nsgtk_help_menu * help_submenu
Definition: menu.h:149
struct nsgtk_nav_menu * nav_submenu
Definition: menu.h:147
struct nsgtk_file_menu * file_submenu
Definition: menu.h:144
struct nsgtk_view_menu * view_submenu
Definition: menu.h:146
struct nsgtk_edit_menu * edit_submenu
Definition: menu.h:145
struct nsgtk_tools_menu * tools_submenu
Definition: menu.h:148
GtkWidget * edit_menuitem
Definition: menu.h:158
struct nsgtk_help_menu * help_submenu
Definition: menu.h:171
struct nsgtk_edit_menu * edit_submenu
Definition: menu.h:159
struct nsgtk_view_menu * view_submenu
Definition: menu.h:162
struct nsgtk_file_menu * file_submenu
Definition: menu.h:156
GtkWidget * view_menuitem
Definition: menu.h:161
GtkMenu * burger_menu
Definition: menu.h:153
GtkWidget * tools_menuitem
Definition: menu.h:167
GtkWidget * help_menuitem
Definition: menu.h:170
struct nsgtk_tools_menu * tools_submenu
Definition: menu.h:168
GtkWidget * file_menuitem
Definition: menu.h:155
GtkWidget * nav_menuitem
Definition: menu.h:164
struct nsgtk_nav_menu * nav_submenu
Definition: menu.h:165
GtkWidget * debugboxtree_menuitem
Definition: menu.h:135
GtkWidget * viewsource_menuitem
Definition: menu.h:133
GtkWidget * toggledebugging_menuitem
Definition: menu.h:134
GtkWidget * debugdomtree_menuitem
Definition: menu.h:136
GtkMenu * developer_menu
Definition: menu.h:131
GtkWidget * preferences_menuitem
Definition: menu.h:49
GtkWidget * find_menuitem
Definition: menu.h:48
GtkWidget * paste_menuitem
Definition: menu.h:45
GtkWidget * cut_menuitem
Definition: menu.h:43
GtkWidget * selectall_menuitem
Definition: menu.h:47
GtkMenuItem * edit
Definition: menu.h:41
GtkWidget * delete_menuitem
Definition: menu.h:46
GtkWidget * copy_menuitem
Definition: menu.h:44
GtkMenu * edit_menu
Definition: menu.h:42
GtkMenu * export_menu
Definition: menu.h:103
GtkWidget * pdf_menuitem
Definition: menu.h:106
GtkWidget * savepage_menuitem
Definition: menu.h:104
GtkWidget * plaintext_menuitem
Definition: menu.h:105
File menu item on menubar.
Definition: menu.h:26
GtkWidget * printpreview_menuitem
Definition: menu.h:35
GtkWidget * quit_menuitem
Definition: menu.h:37
GtkWidget * export_menuitem
Definition: menu.h:33
GtkWidget * newtab_menuitem
Definition: menu.h:30
GtkMenu * file_menu
Definition: menu.h:28
GtkWidget * closewindow_menuitem
Definition: menu.h:32
struct nsgtk_export_submenu * export_submenu
Definition: menu.h:34
GtkWidget * openfile_menuitem
Definition: menu.h:31
GtkMenuItem * file
Definition: menu.h:27
GtkWidget * newwindow_menuitem
Definition: menu.h:29
GtkWidget * print_menuitem
Definition: menu.h:36
GtkMenu * help_menu
Definition: menu.h:94
GtkMenuItem * help
Definition: menu.h:93
GtkWidget * about_menuitem
Definition: menu.h:98
GtkWidget * info_menuitem
Definition: menu.h:97
GtkWidget * guide_menuitem
Definition: menu.h:96
GtkWidget * contents_menuitem
Definition: menu.h:95
GtkWidget * openlocation_menuitem
Definition: menu.h:79
GtkMenu * nav_menu
Definition: menu.h:68
GtkWidget * back_menuitem
Definition: menu.h:70
GtkWidget * globalhistory_menuitem
Definition: menu.h:76
GtkWidget * addbookmarks_menuitem
Definition: menu.h:77
GtkMenuItem * nav
Definition: menu.h:67
GtkWidget * localhistory_menuitem
Definition: menu.h:75
GtkWidget * showbookmarks_menuitem
Definition: menu.h:78
GtkWidget * home_menuitem
Definition: menu.h:74
GtkWidget * forward_menuitem
Definition: menu.h:71
GtkWidget * reload_menuitem
Definition: menu.h:73
GtkWidget * stop_menuitem
Definition: menu.h:72
GtkWidget * first_separator
Definition: menu.h:183
struct nsgtk_toolbars_submenu * toolbars_submenu
Definition: menu.h:193
GtkWidget * back_menuitem
Definition: menu.h:178
struct nsgtk_tools_menu * tools_submenu
Definition: menu.h:195
GtkWidget * tools_menuitem
Definition: menu.h:194
GtkWidget * reload_menuitem
Definition: menu.h:181
GtkWidget * copy_menuitem
Definition: menu.h:187
GtkWidget * stop_menuitem
Definition: menu.h:180
GtkWidget * cut_menuitem
Definition: menu.h:186
GtkWidget * toolbars_menuitem
Definition: menu.h:192
GtkMenu * popup_menu
Definition: menu.h:175
GtkWidget * second_separator
Definition: menu.h:190
GtkWidget * forward_menuitem
Definition: menu.h:179
GtkWidget * paste_menuitem
Definition: menu.h:188
GtkWidget * zoomplus_menuitem
Definition: menu.h:111
GtkWidget * zoomnormal_menuitem
Definition: menu.h:113
GtkMenu * scaleview_menu
Definition: menu.h:110
GtkWidget * zoomminus_menuitem
Definition: menu.h:112
GtkWidget * closetab_menuitem
Definition: menu.h:120
GtkWidget * prevtab_menuitem
Definition: menu.h:119
GtkWidget * nexttab_menuitem
Definition: menu.h:118
GtkMenu * tabs_menu
Definition: menu.h:117
GtkWidget * customize_menuitem
Definition: menu.h:127
GtkMenu * toolbars_menu
Definition: menu.h:124
GtkCheckMenuItem * menubar_menuitem
Definition: menu.h:125
GtkCheckMenuItem * toolbar_menuitem
Definition: menu.h:126
GtkWidget * downloads_menuitem
Definition: menu.h:87
GtkWidget * showcookies_menuitem
Definition: menu.h:86
GtkMenu * tools_menu
Definition: menu.h:84
struct nsgtk_developer_submenu * developer_submenu
Definition: menu.h:89
GtkWidget * developer_menuitem
Definition: menu.h:88
GtkMenuItem * tools
Definition: menu.h:83
struct nsgtk_toolbars_submenu * toolbars_submenu
Definition: menu.h:60
struct nsgtk_scaleview_submenu * scaleview_submenu
Definition: menu.h:57
GtkWidget * tabs_menuitem
Definition: menu.h:61
GtkMenuItem * view
Definition: menu.h:53
GtkWidget * fullscreen_menuitem
Definition: menu.h:58
GtkWidget * toolbars_menuitem
Definition: menu.h:59
GtkMenu * view_menu
Definition: menu.h:54
struct nsgtk_tabs_submenu * tabs_submenu
Definition: menu.h:62
GtkWidget * savewindowsize_menuitem
Definition: menu.h:63
GtkWidget * scaleview_menuitem
Definition: menu.h:56