WebView

The WebView class is the main class of the Web Browser Engine API. The WebView class contains methods that are used to manage the interactions between WebFrameView and WebFrame instances.

You must create a new WebView instance in order to render a page in the Web Browser Engine. The following code snippet creates a new WebView instance.

WebView * webView = WebView::createInstance();

Each WebView must be attached to a GFWindow native window. For more Information about GfWindow see GfWindow.h.

In order to process events and timer messages, you must create a QNX-based connection on each GfWindow. The main launcher application must determine which WebView instance each events is destined for. Once a GfWindow is created the window must be associated with a WebView.

// create the GfWindow
window = new GfWindow();
// associated the main event loops connection ID
window->setCoid(coid);

To set the native window and the size:

webView->setViewWindow(window);
webView->initWithFrame(rect, NULL, NULL);

A WebView instance can also provide page and link-related information. This information is provided by the WebNotificationDelegate class.

The WebView contains the following methods and types (listed alphabetically):

advanceFocus()
canShowMIMEType()
canShowMIMETypeAsHTML()
close()
createinstance()
goBack()
goForward()
initWithFrame()
mainframe()
onExpose()
onKeyDown()
onKeyUp()
onMouseButtonDown()
onMouseButtonUp()
onMouseMotion()
resetPageZoom()
scrollableSubFrameAtPoint()
scrollableRenderObjectAtPoint()
scrollRenderObjectBy()
setMIMETypesShownAsHTML()
setPageSizeMultiplier()
setViewWindow()
setWebNotificationDelegate()
zoomPageOut()
zoomPageIn()