From 1fc51d1f4482243cc7d2a10517f04dcc471cef8e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 17 Aug 2019 18:32:22 +0100 Subject: moved most of init to toolbar.c --- frontends/gtk/toolbar_items.h | 136 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 frontends/gtk/toolbar_items.h (limited to 'frontends/gtk/toolbar_items.h') diff --git a/frontends/gtk/toolbar_items.h b/frontends/gtk/toolbar_items.h new file mode 100644 index 000000000..fd01103d8 --- /dev/null +++ b/frontends/gtk/toolbar_items.h @@ -0,0 +1,136 @@ +/* + * Copyright 2012 Vincent Sanders + * + * 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 . + */ + +#ifndef NETSURF_GTK_TOOLBAR_ITEMS_H +#define NETSURF_GTK_TOOLBAR_ITEMS_H + +typedef enum { + BACK_BUTTON = 0, + HISTORY_BUTTON, + FORWARD_BUTTON, + STOP_BUTTON, + RELOAD_BUTTON, + HOME_BUTTON, + URL_BAR_ITEM, + WEBSEARCH_ITEM, + THROBBER_ITEM, + NEWWINDOW_BUTTON, + NEWTAB_BUTTON, + OPENFILE_BUTTON, + CLOSETAB_BUTTON, + CLOSEWINDOW_BUTTON, + SAVEPAGE_BUTTON, + PDF_BUTTON, + PLAINTEXT_BUTTON, + DRAWFILE_BUTTON, + POSTSCRIPT_BUTTON, + PRINTPREVIEW_BUTTON, + PRINT_BUTTON, + QUIT_BUTTON, + CUT_BUTTON, + COPY_BUTTON, + PASTE_BUTTON, + DELETE_BUTTON, + SELECTALL_BUTTON, + FIND_BUTTON, + PREFERENCES_BUTTON, + ZOOMPLUS_BUTTON, + ZOOMMINUS_BUTTON, + ZOOMNORMAL_BUTTON, + FULLSCREEN_BUTTON, + VIEWSOURCE_BUTTON, + DOWNLOADS_BUTTON, + SAVEWINDOWSIZE_BUTTON, + TOGGLEDEBUGGING_BUTTON, + SAVEBOXTREE_BUTTON, + SAVEDOMTREE_BUTTON, + LOCALHISTORY_BUTTON, + GLOBALHISTORY_BUTTON, + ADDBOOKMARKS_BUTTON, + SHOWBOOKMARKS_BUTTON, + SHOWCOOKIES_BUTTON, + OPENLOCATION_BUTTON, + NEXTTAB_BUTTON, + PREVTAB_BUTTON, + CONTENTS_BUTTON, + GUIDE_BUTTON, + INFO_BUTTON, + ABOUT_BUTTON, + PLACEHOLDER_BUTTON /* size indicator; array maximum indices */ +} nsgtk_toolbar_button; /* PLACEHOLDER_BUTTON - 1 */ + +#endif + +/* + * Item fields are: + * item identifier enum + * item name + * item initial visibility + */ + +TOOLBAR_ITEM(BACK_BUTTON, back, false) +TOOLBAR_ITEM(HISTORY_BUTTON, history, true) +TOOLBAR_ITEM(FORWARD_BUTTON, forward, false) +TOOLBAR_ITEM(STOP_BUTTON, stop, false) +TOOLBAR_ITEM(RELOAD_BUTTON, reload, true) +TOOLBAR_ITEM(HOME_BUTTON, home, true) +TOOLBAR_ITEM(URL_BAR_ITEM, url_bar, true) +TOOLBAR_ITEM(WEBSEARCH_ITEM, websearch, true) +TOOLBAR_ITEM(THROBBER_ITEM, throbber, true) +TOOLBAR_ITEM(NEWWINDOW_BUTTON, newwindow, true) +TOOLBAR_ITEM(NEWTAB_BUTTON, newtab, true) +TOOLBAR_ITEM(OPENFILE_BUTTON, openfile, true) +TOOLBAR_ITEM(CLOSETAB_BUTTON, closetab, false) +TOOLBAR_ITEM(CLOSEWINDOW_BUTTON, closewindow, true) +TOOLBAR_ITEM(SAVEPAGE_BUTTON, savepage, true) +TOOLBAR_ITEM(PDF_BUTTON, pdf, false) +TOOLBAR_ITEM(PLAINTEXT_BUTTON, plaintext, true) +TOOLBAR_ITEM(DRAWFILE_BUTTON, drawfile, false) +TOOLBAR_ITEM(POSTSCRIPT_BUTTON, postscript, false) +TOOLBAR_ITEM(PRINTPREVIEW_BUTTON, printpreview, false) +TOOLBAR_ITEM(PRINT_BUTTON, print, true) +TOOLBAR_ITEM(QUIT_BUTTON, quit, true) +TOOLBAR_ITEM(CUT_BUTTON, cut, true) +TOOLBAR_ITEM(COPY_BUTTON, copy, true) +TOOLBAR_ITEM(PASTE_BUTTON, paste, true) +TOOLBAR_ITEM(DELETE_BUTTON, delete, false) +TOOLBAR_ITEM(SELECTALL_BUTTON, selectall, true) +TOOLBAR_ITEM(FIND_BUTTON, find, true) +TOOLBAR_ITEM(PREFERENCES_BUTTON, preferences, true) +TOOLBAR_ITEM(ZOOMPLUS_BUTTON, zoomplus, true) +TOOLBAR_ITEM(ZOOMMINUS_BUTTON, zoomminus, true) +TOOLBAR_ITEM(ZOOMNORMAL_BUTTON, zoomnormal, true) +TOOLBAR_ITEM(FULLSCREEN_BUTTON, fullscreen, true) +TOOLBAR_ITEM(VIEWSOURCE_BUTTON, viewsource, true) +TOOLBAR_ITEM(DOWNLOADS_BUTTON, downloads, true) +TOOLBAR_ITEM(SAVEWINDOWSIZE_BUTTON, savewindowsize, true) +TOOLBAR_ITEM(TOGGLEDEBUGGING_BUTTON, toggledebugging, true) +TOOLBAR_ITEM(SAVEBOXTREE_BUTTON, debugboxtree, true) +TOOLBAR_ITEM(SAVEDOMTREE_BUTTON, debugdomtree, true) +TOOLBAR_ITEM(LOCALHISTORY_BUTTON, localhistory, true) +TOOLBAR_ITEM(GLOBALHISTORY_BUTTON, globalhistory, true) +TOOLBAR_ITEM(ADDBOOKMARKS_BUTTON, addbookmarks, true) +TOOLBAR_ITEM(SHOWBOOKMARKS_BUTTON, showbookmarks, true) +TOOLBAR_ITEM(SHOWCOOKIES_BUTTON, showcookies, true) +TOOLBAR_ITEM(OPENLOCATION_BUTTON, openlocation, true) +TOOLBAR_ITEM(NEXTTAB_BUTTON, nexttab, false) +TOOLBAR_ITEM(PREVTAB_BUTTON, prevtab, false) +TOOLBAR_ITEM(CONTENTS_BUTTON, contents, true) +TOOLBAR_ITEM(GUIDE_BUTTON, guide, true) +TOOLBAR_ITEM(INFO_BUTTON, info, true) +TOOLBAR_ITEM(ABOUT_BUTTON, about, true) -- cgit v1.2.3