2009-12-18 02:55:02 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
|
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#ifndef _NETSURF_GTK_MENU_H_
|
|
|
|
#define _NETSURF_GTK_MENU_H_
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
struct nsgtk_file_menu {
|
2010-09-18 22:14:09 +04:00
|
|
|
GtkMenuItem *file; /* File menu item on menubar */
|
2009-12-18 02:55:02 +03:00
|
|
|
GtkMenu *file_menu;
|
|
|
|
GtkImageMenuItem *newwindow_menuitem;
|
|
|
|
GtkImageMenuItem *newtab_menuitem;
|
|
|
|
GtkImageMenuItem *openfile_menuitem;
|
|
|
|
GtkImageMenuItem *closewindow_menuitem;
|
|
|
|
GtkImageMenuItem *savepage_menuitem;
|
|
|
|
GtkImageMenuItem *export_menuitem;
|
|
|
|
struct nsgtk_export_submenu *export_submenu;
|
|
|
|
GtkImageMenuItem *printpreview_menuitem;
|
|
|
|
GtkImageMenuItem *print_menuitem;
|
|
|
|
GtkImageMenuItem *quit_menuitem;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nsgtk_edit_menu {
|
2010-09-18 22:14:09 +04:00
|
|
|
GtkMenuItem *edit; /* Edit menu item on menubar */
|
2009-12-18 02:55:02 +03:00
|
|
|
GtkMenu *edit_menu;
|
|
|
|
GtkImageMenuItem *cut_menuitem;
|
|
|
|
GtkImageMenuItem *copy_menuitem;
|
|
|
|
GtkImageMenuItem *paste_menuitem;
|
|
|
|
GtkImageMenuItem *delete_menuitem;
|
|
|
|
GtkImageMenuItem *selectall_menuitem;
|
|
|
|
GtkImageMenuItem *find_menuitem;
|
|
|
|
GtkImageMenuItem *preferences_menuitem;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nsgtk_view_menu {
|
2010-09-18 22:14:09 +04:00
|
|
|
GtkMenuItem *view; /* View menu item on menubar */
|
|
|
|
GtkMenu *view_menu; /* gtk menu attached to menu item */
|
2009-12-18 02:55:02 +03:00
|
|
|
GtkImageMenuItem *stop_menuitem;
|
|
|
|
GtkImageMenuItem *reload_menuitem;
|
|
|
|
GtkImageMenuItem *scaleview_menuitem;
|
|
|
|
struct nsgtk_scaleview_submenu *scaleview_submenu;
|
|
|
|
GtkImageMenuItem *fullscreen_menuitem;
|
|
|
|
GtkImageMenuItem *images_menuitem;
|
|
|
|
struct nsgtk_images_submenu *images_submenu;
|
|
|
|
GtkImageMenuItem *toolbars_menuitem;
|
|
|
|
struct nsgtk_toolbars_submenu *toolbars_submenu;
|
2010-09-19 00:53:43 +04:00
|
|
|
GtkImageMenuItem *tabs_menuitem;
|
|
|
|
struct nsgtk_tabs_submenu *tabs_submenu;
|
2009-12-18 02:55:02 +03:00
|
|
|
GtkImageMenuItem *savewindowsize_menuitem;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nsgtk_nav_menu {
|
2010-09-18 22:14:09 +04:00
|
|
|
GtkMenuItem *nav; /* Nav menu item on menubar */
|
2009-12-18 02:55:02 +03:00
|
|
|
GtkMenu *nav_menu;
|
|
|
|
GtkImageMenuItem *back_menuitem;
|
|
|
|
GtkImageMenuItem *forward_menuitem;
|
|
|
|
GtkImageMenuItem *home_menuitem;
|
|
|
|
GtkImageMenuItem *localhistory_menuitem;
|
|
|
|
GtkImageMenuItem *globalhistory_menuitem;
|
|
|
|
GtkImageMenuItem *addbookmarks_menuitem;
|
|
|
|
GtkImageMenuItem *showbookmarks_menuitem;
|
|
|
|
GtkImageMenuItem *openlocation_menuitem;
|
|
|
|
};
|
|
|
|
|
2014-07-23 23:34:29 +04:00
|
|
|
struct nsgtk_tools_menu {
|
|
|
|
GtkMenuItem *tools; /* Tools menu item on menubar */
|
|
|
|
GtkMenu *tools_menu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *showcookies_menuitem;
|
|
|
|
GtkImageMenuItem *downloads_menuitem;
|
|
|
|
GtkImageMenuItem *developer_menuitem;
|
|
|
|
struct nsgtk_developer_submenu *developer_submenu;
|
|
|
|
};
|
|
|
|
|
2009-12-18 02:55:02 +03:00
|
|
|
struct nsgtk_help_menu {
|
2010-09-18 22:14:09 +04:00
|
|
|
GtkMenuItem *help; /* Help menu item on menubar */
|
2009-12-18 02:55:02 +03:00
|
|
|
GtkMenu *help_menu;
|
|
|
|
GtkImageMenuItem *contents_menuitem;
|
|
|
|
GtkImageMenuItem *guide_menuitem;
|
|
|
|
GtkImageMenuItem *info_menuitem;
|
|
|
|
GtkImageMenuItem *about_menuitem;
|
|
|
|
};
|
|
|
|
|
2014-07-23 23:34:29 +04:00
|
|
|
|
2009-12-18 02:55:02 +03:00
|
|
|
struct nsgtk_export_submenu {
|
|
|
|
GtkMenu *export_menu;
|
|
|
|
GtkImageMenuItem *plaintext_menuitem;
|
|
|
|
GtkImageMenuItem *drawfile_menuitem;
|
|
|
|
GtkImageMenuItem *postscript_menuitem;
|
|
|
|
GtkImageMenuItem *pdf_menuitem;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nsgtk_scaleview_submenu {
|
|
|
|
GtkMenu *scaleview_menu;
|
|
|
|
GtkImageMenuItem *zoomplus_menuitem;
|
|
|
|
GtkImageMenuItem *zoomminus_menuitem;
|
|
|
|
GtkImageMenuItem *zoomnormal_menuitem;
|
|
|
|
};
|
|
|
|
|
2010-09-19 00:53:43 +04:00
|
|
|
struct nsgtk_tabs_submenu {
|
|
|
|
GtkMenu *tabs_menu;
|
|
|
|
GtkImageMenuItem *nexttab_menuitem;
|
|
|
|
GtkImageMenuItem *prevtab_menuitem;
|
|
|
|
GtkImageMenuItem *closetab_menuitem;
|
|
|
|
};
|
|
|
|
|
2009-12-18 02:55:02 +03:00
|
|
|
struct nsgtk_images_submenu {
|
|
|
|
GtkMenu *images_menu;
|
|
|
|
GtkCheckMenuItem *foregroundimages_menuitem;
|
|
|
|
GtkCheckMenuItem *backgroundimages_menuitem;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nsgtk_toolbars_submenu {
|
|
|
|
GtkMenu *toolbars_menu;
|
|
|
|
GtkCheckMenuItem *menubar_menuitem;
|
|
|
|
GtkCheckMenuItem *toolbar_menuitem;
|
|
|
|
};
|
|
|
|
|
2014-07-23 23:34:29 +04:00
|
|
|
struct nsgtk_developer_submenu {
|
|
|
|
GtkMenu *developer_menu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *viewsource_menuitem;
|
2009-12-18 02:55:02 +03:00
|
|
|
GtkImageMenuItem *toggledebugging_menuitem;
|
2014-07-23 23:34:29 +04:00
|
|
|
GtkImageMenuItem *debugboxtree_menuitem;
|
|
|
|
GtkImageMenuItem *debugdomtree_menuitem;
|
2009-12-18 02:55:02 +03:00
|
|
|
};
|
|
|
|
|
2010-09-18 03:18:01 +04:00
|
|
|
|
2011-01-28 15:17:51 +03:00
|
|
|
struct nsgtk_bar_submenu {
|
|
|
|
GtkMenuBar *bar_menu;
|
|
|
|
struct nsgtk_file_menu *file_submenu;
|
|
|
|
struct nsgtk_edit_menu *edit_submenu;
|
|
|
|
struct nsgtk_view_menu *view_submenu;
|
|
|
|
struct nsgtk_nav_menu *nav_submenu;
|
2014-07-23 23:34:29 +04:00
|
|
|
struct nsgtk_tabs_submenu *tabs_submenu;
|
|
|
|
struct nsgtk_tools_menu *tools_submenu;
|
2011-01-28 15:17:51 +03:00
|
|
|
struct nsgtk_help_menu *help_submenu;
|
2010-09-18 03:18:01 +04:00
|
|
|
};
|
|
|
|
|
2014-07-08 02:29:06 +04:00
|
|
|
struct nsgtk_popup_menu {
|
2011-01-28 15:17:51 +03:00
|
|
|
GtkMenu *popup_menu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *file_menuitem;
|
|
|
|
struct nsgtk_file_menu *file_submenu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *edit_menuitem;
|
|
|
|
struct nsgtk_edit_menu *edit_submenu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *view_menuitem;
|
|
|
|
struct nsgtk_view_menu *view_submenu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *nav_menuitem;
|
|
|
|
struct nsgtk_nav_menu *nav_submenu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *tabs_menuitem;
|
2014-07-23 23:34:29 +04:00
|
|
|
struct nsgtk_tabs_submenu *tabs_submenu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *tools_menuitem;
|
|
|
|
struct nsgtk_tools_menu *tools_submenu;
|
2011-01-28 15:17:51 +03:00
|
|
|
|
|
|
|
GtkImageMenuItem *help_menuitem;
|
|
|
|
struct nsgtk_help_menu *help_submenu;
|
|
|
|
|
|
|
|
GtkWidget *first_separator;
|
|
|
|
|
|
|
|
/* navigation entries */
|
|
|
|
GtkImageMenuItem *back_menuitem;
|
|
|
|
GtkImageMenuItem *forward_menuitem;
|
|
|
|
|
|
|
|
GtkWidget *third_separator;
|
|
|
|
|
|
|
|
/* view entries */
|
|
|
|
GtkImageMenuItem *stop_menuitem;
|
|
|
|
GtkImageMenuItem *reload_menuitem;
|
|
|
|
|
|
|
|
GtkImageMenuItem *cut_menuitem;
|
|
|
|
GtkImageMenuItem *copy_menuitem;
|
|
|
|
GtkImageMenuItem *paste_menuitem;
|
|
|
|
GtkImageMenuItem *customize_menuitem;
|
|
|
|
|
2011-01-25 12:19:47 +03:00
|
|
|
};
|
|
|
|
|
2014-07-08 02:29:06 +04:00
|
|
|
struct nsgtk_link_menu {
|
|
|
|
GtkMenu *link_menu;
|
|
|
|
|
|
|
|
GtkImageMenuItem *opentab_menuitem;
|
|
|
|
GtkImageMenuItem *openwin_menuitem;
|
|
|
|
|
|
|
|
GtkImageMenuItem *save_menuitem;
|
|
|
|
GtkImageMenuItem *bookmark_menuitem;
|
|
|
|
GtkImageMenuItem *copy_menuitem;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create main menu bar.
|
|
|
|
*/
|
2011-02-02 02:11:29 +03:00
|
|
|
struct nsgtk_bar_submenu *nsgtk_menu_bar_create(GtkMenuShell *menubar, GtkAccelGroup *group);
|
2014-07-08 02:29:06 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Generate right click menu menu.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct nsgtk_popup_menu *nsgtk_popup_menu_create(GtkAccelGroup *group);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generate context sensitive popup menu for link.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct nsgtk_link_menu *nsgtk_link_menu_create(GtkAccelGroup *group);
|
|
|
|
|
2009-12-18 02:55:02 +03:00
|
|
|
|
|
|
|
#endif
|