NetSurf
scaffolding.h
Go to the documentation of this file.
1/*
2 * Copyright 2008 François Revol <mmu_man@users.sourceforge.net>
3 * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
4 *
5 * This file is part of NetSurf, http://www.netsurf-browser.org/
6 *
7 * NetSurf is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * NetSurf is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef NETSURF_BEOS_SCAFFOLDING_H
21#define NETSURF_BEOS_SCAFFOLDING_H 1
22
23#include <View.h>
24#include <Window.h>
25#include <NetPositive.h>
26
27extern "C" {
28struct hlcache_handle;
29struct nsurl;
30}
31
33
34class NSBaseView : public BView {
35public:
36 NSBaseView(BRect frame);
37 NSBaseView(BMessage *archive);
38virtual ~NSBaseView();
39
40virtual void MessageReceived(BMessage *message);
41//virtual void Draw(BRect updateRect);
42
43//virtual void FrameMoved(BPoint new_location);
44//virtual void FrameResized(float new_width, float new_height);
45
46virtual void AllAttached(void);
47
48virtual status_t Archive(BMessage *archive, bool deep=true) const;
49static BArchivable *Instantiate(BMessage *archive);
50
51void SetScaffolding(struct beos_scaffolding *scaf);
52private:
54};
55
56class NSBrowserWindow : public BWindow {
57public:
58 NSBrowserWindow(BRect frame, struct beos_scaffolding *scaf);
59virtual ~NSBrowserWindow();
60
61virtual void DispatchMessage(BMessage *message, BHandler *handler);
62virtual void MessageReceived(BMessage *message);
63virtual bool QuitRequested(void);
64void WindowActivated(bool active);
65
66struct beos_scaffolding *Scaffolding() const { return fScaffolding; };
67
68static BWindow* activeWindow;
69private:
71
72
73};
74
75
76// XXX: clean up
77typedef enum {
78
79 /* no/unknown actions */
80 NO_ACTION = 'nsMA',
81
82 /* help actions */
89
90 /* history actions */
93
94 /* hotlist actions */
97
98 /* cookie actions */
101
102 /* page actions */
108
109 /* object actions */
113
114 /* save actions */
129
130 /* navigation actions */
139
140 /* browser window/display actions */
152
153 /* tree actions */
168
169 /* toolbar actions */
174
175 /* misc actions */
179
180
182
184
186
188
190
192
193
194void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding *scaffold, BMessage *message);
195
197
198//void nsbeos_window_destroy_event(NSBrowserWindow *window, nsbeos_scaffolding *g, BMessage *event);
199
200
201void nsbeos_scaffolding_popup_menu(nsbeos_scaffolding *scaffold, struct browser_window *bw, BPoint where, BPoint screenWhere);
202
203void gui_window_set_title(struct gui_window *_g, const char *title);
204nserror gui_window_set_url(struct gui_window *_g, struct nsurl *url);
205void gui_window_set_icon(struct gui_window *_g, struct hlcache_handle *icon);
206void gui_window_set_status(struct gui_window *_g, const char *text);
208void gui_window_stop_throbber(struct gui_window* _g);
209
210#endif /* NETSURF_BEOS_SCAFFOLDING_H */
static struct s_view view
Definition: plot.c:199
void nsbeos_scaffolding_popup_menu(nsbeos_scaffolding *scaffold, struct browser_window *bw, BPoint where, BPoint screenWhere)
nsbeos_scaffolding * nsbeos_new_scaffolding(struct gui_window *toplevel)
void gui_window_set_icon(struct gui_window *_g, struct hlcache_handle *icon)
add retrieved favicon to the gui
nserror gui_window_set_url(struct gui_window *_g, struct nsurl *url)
void gui_window_start_throbber(struct gui_window *_g)
Definition: theme.c:413
NSBaseView * nsbeos_get_baseview_for_scaffolding(nsbeos_scaffolding *scaffold)
void nsbeos_scaffolding_destroy(nsbeos_scaffolding *scaffold)
bool nsbeos_scaffolding_is_busy(nsbeos_scaffolding *scaffold)
void gui_window_set_status(struct gui_window *_g, const char *text)
NSBrowserWindow * nsbeos_find_last_window(void)
void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding *scaffold, BMessage *message)
NSBrowserWindow * nsbeos_get_bwindow_for_scaffolding(nsbeos_scaffolding *scaffold)
menu_action
Definition: scaffolding.h:77
@ HELP_OPEN_ABOUT
Definition: scaffolding.h:86
@ BROWSER_WINDOW_STAGGER
Definition: scaffolding.h:149
@ TREE_EXPAND_FOLDERS
Definition: scaffolding.h:157
@ BROWSER_NAVIGATE_HOME
Definition: scaffolding.h:131
@ TREE_EXPAND_ALL
Definition: scaffolding.h:156
@ BROWSER_SCALE_VIEW
Definition: scaffolding.h:141
@ BROWSER_PAGE_INFO
Definition: scaffolding.h:104
@ NO_ACTION
Definition: scaffolding.h:80
@ BROWSER_OBJECT_SAVE
Definition: scaffolding.h:115
@ BROWSER_NAVIGATE_FORWARD
Definition: scaffolding.h:133
@ BROWSER_BUFFER_ALL
Definition: scaffolding.h:146
@ BROWSER_BUFFER_ANIMS
Definition: scaffolding.h:145
@ HELP_OPEN_LICENCE
Definition: scaffolding.h:87
@ TREE_COLLAPSE_FOLDERS
Definition: scaffolding.h:160
@ TOOLBAR_ADDRESS_BAR
Definition: scaffolding.h:171
@ BROWSER_OBJECT_RELOAD
Definition: scaffolding.h:112
@ TREE_SELECTION
Definition: scaffolding.h:162
@ BROWSER_OBJECT_EXPORT_SPRITE
Definition: scaffolding.h:116
@ BROWSER_WINDOW_RESET
Definition: scaffolding.h:151
@ BROWSER_WINDOW_COPY
Definition: scaffolding.h:150
@ CHOICES_SHOW
Definition: scaffolding.h:176
@ BROWSER_OBJECT_SAVE_URL_URI
Definition: scaffolding.h:117
@ COOKIES_SHOW
Definition: scaffolding.h:99
@ BROWSER_SAVE_VIEW
Definition: scaffolding.h:147
@ BROWSER_IMAGES_BACKGROUND
Definition: scaffolding.h:144
@ BROWSER_NAVIGATE_RELOAD
Definition: scaffolding.h:135
@ BROWSER_OBJECT
Definition: scaffolding.h:110
@ BROWSER_NEW_WINDOW
Definition: scaffolding.h:106
@ BROWSER_NAVIGATE_BACK
Definition: scaffolding.h:132
@ BROWSER_PRINT
Definition: scaffolding.h:105
@ BROWSER_NAVIGATE_STOP
Definition: scaffolding.h:137
@ HISTORY_SHOW_LOCAL
Definition: scaffolding.h:91
@ TREE_SELECTION_LAUNCH
Definition: scaffolding.h:164
@ TREE_NEW_FOLDER
Definition: scaffolding.h:154
@ BROWSER_SAVE_URL_TEXT
Definition: scaffolding.h:126
@ TREE_SELECT_ALL
Definition: scaffolding.h:166
@ BROWSER_NAVIGATE_UP
Definition: scaffolding.h:134
@ HOTLIST_ADD_URL
Definition: scaffolding.h:95
@ TREE_CLEAR_SELECTION
Definition: scaffolding.h:167
@ BROWSER_OBJECT_SAVE_URL_URL
Definition: scaffolding.h:118
@ HELP_OPEN_GUIDE
Definition: scaffolding.h:84
@ BROWSER_NAVIGATE_URL
Definition: scaffolding.h:138
@ HOTLIST_SHOW
Definition: scaffolding.h:96
@ BROWSER_PAGE
Definition: scaffolding.h:103
@ BROWSER_SAVE
Definition: scaffolding.h:120
@ TREE_SELECTION_EDIT
Definition: scaffolding.h:163
@ BROWSER_FIND_TEXT
Definition: scaffolding.h:142
@ TREE_EXPAND_LINKS
Definition: scaffolding.h:158
@ BROWSER_OBJECT_INFO
Definition: scaffolding.h:111
@ BROWSER_NAVIGATE_RELOAD_ALL
Definition: scaffolding.h:136
@ BROWSER_IMAGES_FOREGROUND
Definition: scaffolding.h:143
@ TOOLBAR_BUTTONS
Definition: scaffolding.h:170
@ HOTLIST_EXPORT
Definition: scaffolding.h:127
@ BROWSER_OBJECT_SAVE_URL_TEXT
Definition: scaffolding.h:119
@ APPLICATION_QUIT
Definition: scaffolding.h:177
@ TREE_SELECTION_DELETE
Definition: scaffolding.h:165
@ BROWSER_SAVE_COMPLETE
Definition: scaffolding.h:121
@ HELP_OPEN_INFORMATION
Definition: scaffolding.h:85
@ HISTORY_SHOW_GLOBAL
Definition: scaffolding.h:92
@ TOOLBAR_EDIT
Definition: scaffolding.h:173
@ HISTORY_EXPORT
Definition: scaffolding.h:128
@ BROWSER_WINDOW_DEFAULT
Definition: scaffolding.h:148
@ BROWSER_SAVE_URL_URI
Definition: scaffolding.h:124
@ BROWSER_EXPORT_DRAW
Definition: scaffolding.h:122
@ BROWSER_VIEW_SOURCE
Definition: scaffolding.h:107
@ TREE_COLLAPSE_ALL
Definition: scaffolding.h:159
@ COOKIES_DELETE
Definition: scaffolding.h:100
@ BROWSER_SAVE_URL_URL
Definition: scaffolding.h:125
@ BROWSER_EXPORT_TEXT
Definition: scaffolding.h:123
@ TREE_COLLAPSE_LINKS
Definition: scaffolding.h:161
@ HELP_OPEN_CONTENTS
Definition: scaffolding.h:83
@ TREE_NEW_LINK
Definition: scaffolding.h:155
@ TOOLBAR_THROBBER
Definition: scaffolding.h:172
@ HELP_LAUNCH_INTERACTIVE
Definition: scaffolding.h:88
void gui_window_stop_throbber(struct gui_window *_g)
Definition: theme.c:432
void nsbeos_attach_toplevel_view(nsbeos_scaffolding *g, BView *view)
void gui_window_set_title(struct gui_window *_g, const char *title)
virtual status_t Archive(BMessage *archive, bool deep=true) const
virtual void MessageReceived(BMessage *message)
static BArchivable * Instantiate(BMessage *archive)
struct beos_scaffolding * fScaffolding
Definition: scaffolding.h:53
NSBaseView(BRect frame)
void SetScaffolding(struct beos_scaffolding *scaf)
virtual ~NSBaseView()
virtual void AllAttached(void)
virtual bool QuitRequested(void)
virtual void DispatchMessage(BMessage *message, BHandler *handler)
NSBrowserWindow(BRect frame, struct beos_scaffolding *scaf)
static BWindow * activeWindow
Definition: scaffolding.h:68
struct beos_scaffolding * fScaffolding
Definition: scaffolding.h:70
struct beos_scaffolding * Scaffolding() const
Definition: scaffolding.h:66
void WindowActivated(bool active)
virtual ~NSBrowserWindow()
virtual void MessageReceived(BMessage *message)
nserror
Enumeration of error codes.
Definition: errors.h:29
struct nsurl nsurl
NetSurf URL object.
Definition: nsurl.h:31
Browser window data.
first entry in window list
Definition: gui.c:298
High-level cache handle.
Definition: hlcache.c:66
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