NetSurf
toolbar_items.h
Go to the documentation of this file.
1/*
2 * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
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
19#ifndef NETSURF_GTK_TOOLBAR_ITEMS_H
20#define NETSURF_GTK_TOOLBAR_ITEMS_H
21
22typedef enum {
77 PLACEHOLDER_BUTTON /* size indicator; array maximum indices */
78} nsgtk_toolbar_button; /* PLACEHOLDER_BUTTON - 1 */
79
80#endif
81
82/*
83 * Item fields are:
84 * - item identifier (enum value)
85 * - name (identifier)
86 * - initial sensitivity (true/false)
87 * - if there is a toolbar click signal handler (y/n) and it is available in
88 * the toolbar and toolbox as a button (b, implies y) if the item is
89 * available as a button but not placed in the toolbox (t, implies y)
90 * - if there is a menu activate signal handler (y/n) and it calls the
91 * toolbar click handler directly. (p, implies y)
92 * - item label as a netsurf message (identifier)
93 * - icon image name ("string")
94 */
95
96#ifndef TOOLBAR_ITEM
97#define TOOLBAR_ITEM(a, b, c, d, e, f, g)
98#define TOOLBAR_ITEM_SET
99#endif
100
101TOOLBAR_ITEM(BACK_BUTTON, back, false, b, p, gtkBack, "go-previous")
102TOOLBAR_ITEM(HISTORY_BUTTON, history, true, y, n, , "local-history")
103TOOLBAR_ITEM(FORWARD_BUTTON, forward, false, b, p, gtkForward, "go-next")
104TOOLBAR_ITEM(STOP_BUTTON, stop, false, t, p, gtkStop, NSGTK_STOCK_STOP)
106TOOLBAR_ITEM(HOME_BUTTON, home, true, b, p, gtkHome, NSGTK_STOCK_HOME)
107TOOLBAR_ITEM(URL_BAR_ITEM, url_bar, true, n, n, , NULL)
108TOOLBAR_ITEM(WEBSEARCH_ITEM, websearch, true, n, n, , NULL)
109TOOLBAR_ITEM(THROBBER_ITEM, throbber, true, n, n, , NULL)
110TOOLBAR_ITEM(NEWWINDOW_BUTTON, newwindow, true, b, p, gtkNewWindow, "document-new")
111TOOLBAR_ITEM(NEWTAB_BUTTON, newtab, true, b, p, gtkNewTab, NSGTK_STOCK_ADD)
112TOOLBAR_ITEM(OPENFILE_BUTTON, openfile, true, b, p, gtkOpenFile, "document-open")
113TOOLBAR_ITEM(CLOSETAB_BUTTON, closetab, false, n, y, , "window-close")
114TOOLBAR_ITEM(CLOSEWINDOW_BUTTON, closewindow, true, y, p, , "window-close")
115TOOLBAR_ITEM(SAVEPAGE_BUTTON, savepage, true, b, p, gtkSavePage, "text-html")
116TOOLBAR_ITEM(PDF_BUTTON, pdf, false, y, p, , "x-office-document")
117TOOLBAR_ITEM(PLAINTEXT_BUTTON, plaintext, true, b, p, gtkPlainText, "text-x-generic")
118TOOLBAR_ITEM(DRAWFILE_BUTTON, drawfile, false, n, n, , NULL)
119TOOLBAR_ITEM(POSTSCRIPT_BUTTON, postscript, false, n, n, , NULL)
120TOOLBAR_ITEM(PRINTPREVIEW_BUTTON, printpreview, false, n, p, gtkPrintPreview, "gtk-print-preview")
121TOOLBAR_ITEM(PRINT_BUTTON, print, true, b, p, gtkPrint, "document-print")
122TOOLBAR_ITEM(QUIT_BUTTON, quit, true, b, p, gtkQuitMenu, "application-exit")
123TOOLBAR_ITEM(CUT_BUTTON, cut, true, b, p, gtkCut, "edit-cut")
124TOOLBAR_ITEM(COPY_BUTTON, copy, true, b, p, gtkCopy, "edit-copy")
125TOOLBAR_ITEM(PASTE_BUTTON, paste, true, b, p, gtkPaste, "edit-paste")
126TOOLBAR_ITEM(DELETE_BUTTON, delete, false, b, p, gtkDelete, "edit-delete")
127TOOLBAR_ITEM(SELECTALL_BUTTON, selectall, true, b, p, gtkSelectAll, "edit-select-all")
128TOOLBAR_ITEM(FIND_BUTTON, find, true, n, y, gtkFind, "edit-find")
129TOOLBAR_ITEM(PREFERENCES_BUTTON, preferences, true, b, p, gtkPreferences, "preferences-system")
130TOOLBAR_ITEM(ZOOMPLUS_BUTTON, zoomplus, true, b, p, gtkZoomPlus, "gtk-zoom-in")
131TOOLBAR_ITEM(ZOOMMINUS_BUTTON, zoomminus, true, b, p, gtkZoomMinus, "gtk-zoom-out")
132TOOLBAR_ITEM(ZOOMNORMAL_BUTTON, zoomnormal, true, b, p, gtkZoomNormal, "gtk-zoom-100")
133TOOLBAR_ITEM(FULLSCREEN_BUTTON, fullscreen, true, b, p, gtkFullScreen, "gtk-fullscreen")
134TOOLBAR_ITEM(VIEWSOURCE_BUTTON, viewsource, true, b, p, gtkPageSource, "gtk-index")
135TOOLBAR_ITEM(DOWNLOADS_BUTTON, downloads, true, b, p, gtkDownloads, NSGTK_STOCK_SAVE_AS)
136TOOLBAR_ITEM(SAVEWINDOWSIZE_BUTTON, savewindowsize, true, y, p, gtkSaveWindowSize, NULL)
137TOOLBAR_ITEM(TOGGLEDEBUGGING_BUTTON, toggledebugging, true, y, p, gtkToggleDebugging, NULL)
138TOOLBAR_ITEM(SAVEBOXTREE_BUTTON, debugboxtree, true, y, p, gtkDebugBoxTree, NULL)
139TOOLBAR_ITEM(SAVEDOMTREE_BUTTON, debugdomtree, true, y, p, gtkDebugDomTree, NULL)
140TOOLBAR_ITEM(LOCALHISTORY_BUTTON, localhistory, true, y, p, , NULL)
141TOOLBAR_ITEM(GLOBALHISTORY_BUTTON, globalhistory, true, y, p, gtkGlobalHistory, NULL)
142TOOLBAR_ITEM(ADDBOOKMARKS_BUTTON, addbookmarks, true, y, p, gtkAddBookMarks, NULL)
143TOOLBAR_ITEM(SHOWBOOKMARKS_BUTTON, showbookmarks, true, b, p, gtkShowBookMarks, "user-bookmarks")
144TOOLBAR_ITEM(SHOWCOOKIES_BUTTON, showcookies, true, b, p, gtkShowCookies, "show-cookie")
145TOOLBAR_ITEM(OPENLOCATION_BUTTON, openlocation, true, y, p, gtkOpenLocation, NULL)
146TOOLBAR_ITEM(NEXTTAB_BUTTON, nexttab, false, n, y, gtkNextTab, "media-skip-forward")
147TOOLBAR_ITEM(PREVTAB_BUTTON, prevtab, false, n, y, gtkPrevTab, "media-skip-backward")
148TOOLBAR_ITEM(CONTENTS_BUTTON, contents, true, y, p, gtkContents, "gtk-help")
149TOOLBAR_ITEM(GUIDE_BUTTON, guide, true, y, p, gtkGuide, "gtk-help")
150TOOLBAR_ITEM(INFO_BUTTON, info, true, y, p, gtkUserInformation, "dialog-information")
151TOOLBAR_ITEM(ABOUT_BUTTON, about, true, b, p, gtkAbout, "help-about")
152TOOLBAR_ITEM(OPENMENU_BUTTON, openmenu, true, b, n, gtkOpenMenu, NSGTK_STOCK_OPEN_MENU)
153TOOLBAR_ITEM(CUSTOMIZE_BUTTON, cutomize, true, y, p, , NULL)
154TOOLBAR_ITEM(RELOADSTOP_BUTTON, reloadstop, true, b, n, Reload, NSGTK_STOCK_REFRESH)
155
156#ifdef TOOLBAR_ITEM_SET
157#undef TOOLBAR_ITEM
158#undef TOOLBAR_ITEM_SET
159#endif
#define NSGTK_STOCK_REFRESH
Definition: compat.h:60
#define NSGTK_STOCK_OPEN_MENU
Definition: compat.h:66
#define NSGTK_STOCK_SAVE_AS
Definition: compat.h:62
#define NSGTK_STOCK_HOME
Definition: compat.h:58
#define NSGTK_STOCK_ADD
Definition: compat.h:54
#define NSGTK_STOCK_STOP
Definition: compat.h:63
wimp_w dialog
Definition: dialog.c:87
struct fbtk_bitmap reload
History tree for a window.
#define TOOLBAR_ITEM(a, b, c, d, e, f, g)
Definition: toolbar_items.h:97
nsgtk_toolbar_button
Definition: toolbar_items.h:22
@ THROBBER_ITEM
Definition: toolbar_items.h:33
@ CUSTOMIZE_BUTTON
Definition: toolbar_items.h:76
@ GUIDE_BUTTON
Definition: toolbar_items.h:73
@ OPENFILE_BUTTON
Definition: toolbar_items.h:36
@ CLOSEWINDOW_BUTTON
Definition: toolbar_items.h:38
@ FIND_BUTTON
Definition: toolbar_items.h:52
@ VIEWSOURCE_BUTTON
Definition: toolbar_items.h:58
@ WEBSEARCH_ITEM
Definition: toolbar_items.h:28
@ BACK_BUTTON
Definition: toolbar_items.h:23
@ NEXTTAB_BUTTON
Definition: toolbar_items.h:70
@ SHOWCOOKIES_BUTTON
Definition: toolbar_items.h:68
@ COPY_BUTTON
Definition: toolbar_items.h:48
@ POSTSCRIPT_BUTTON
Definition: toolbar_items.h:43
@ ABOUT_BUTTON
Definition: toolbar_items.h:75
@ ZOOMNORMAL_BUTTON
Definition: toolbar_items.h:56
@ PREFERENCES_BUTTON
Definition: toolbar_items.h:53
@ CONTENTS_BUTTON
Definition: toolbar_items.h:72
@ HISTORY_BUTTON
Definition: toolbar_items.h:24
@ QUIT_BUTTON
Definition: toolbar_items.h:46
@ NEWTAB_BUTTON
Definition: toolbar_items.h:35
@ OPENLOCATION_BUTTON
Definition: toolbar_items.h:69
@ SAVEWINDOWSIZE_BUTTON
Definition: toolbar_items.h:60
@ PRINT_BUTTON
Definition: toolbar_items.h:45
@ SELECTALL_BUTTON
Definition: toolbar_items.h:51
@ OPENMENU_BUTTON
Definition: toolbar_items.h:29
@ DELETE_BUTTON
Definition: toolbar_items.h:50
@ CLOSETAB_BUTTON
Definition: toolbar_items.h:37
@ SAVEDOMTREE_BUTTON
Definition: toolbar_items.h:63
@ DRAWFILE_BUTTON
Definition: toolbar_items.h:42
@ ADDBOOKMARKS_BUTTON
Definition: toolbar_items.h:66
@ DOWNLOADS_BUTTON
Definition: toolbar_items.h:59
@ PRINTPREVIEW_BUTTON
Definition: toolbar_items.h:44
@ URL_BAR_ITEM
Definition: toolbar_items.h:27
@ PDF_BUTTON
Definition: toolbar_items.h:40
@ NEWWINDOW_BUTTON
Definition: toolbar_items.h:34
@ SAVEBOXTREE_BUTTON
Definition: toolbar_items.h:62
@ PASTE_BUTTON
Definition: toolbar_items.h:49
@ PLAINTEXT_BUTTON
Definition: toolbar_items.h:41
@ RELOAD_BUTTON
Definition: toolbar_items.h:31
@ LOCALHISTORY_BUTTON
Definition: toolbar_items.h:64
@ FULLSCREEN_BUTTON
Definition: toolbar_items.h:57
@ FORWARD_BUTTON
Definition: toolbar_items.h:25
@ ZOOMPLUS_BUTTON
Definition: toolbar_items.h:54
@ HOME_BUTTON
Definition: toolbar_items.h:32
@ SHOWBOOKMARKS_BUTTON
Definition: toolbar_items.h:67
@ SAVEPAGE_BUTTON
Definition: toolbar_items.h:39
@ GLOBALHISTORY_BUTTON
Definition: toolbar_items.h:65
@ PLACEHOLDER_BUTTON
Definition: toolbar_items.h:77
@ CUT_BUTTON
Definition: toolbar_items.h:47
@ ZOOMMINUS_BUTTON
Definition: toolbar_items.h:55
@ TOGGLEDEBUGGING_BUTTON
Definition: toolbar_items.h:61
@ STOP_BUTTON
Definition: toolbar_items.h:30
@ INFO_BUTTON
Definition: toolbar_items.h:74
@ RELOADSTOP_BUTTON
Definition: toolbar_items.h:26
@ PREVTAB_BUTTON
Definition: toolbar_items.h:71
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
Definition: plot.c:978