Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

WebDocumentView Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/WebKit.framework
Availability
Available in Mac OS X v10.2 with Safari 1.0 and later.
Available in Mac OS X v10.2.7 and later.
Companion guide
Declared in
WebDocument.h

Overview

This protocol is adopted by the document view of a WebFrameView. You can extend Web Kit to support additional MIME types by implementing your own document view and document representation classes to render data for specific MIME types. You register those classes using the WebFrame registerViewClass:representationClass:forMIMEType: method. Classes that adopt this protocol are expected to be subclasses of NSView.

Tasks

Setting the Data Source

Controlling the Layout

Attaching to a Window

Instance Methods

dataSourceUpdated:

Invoked when additional data has been received.

- (void)dataSourceUpdated:(WebDataSource *)dataSource

Discussion

The parameter dataSource indicates the source of the new data.

Availability
See Also
Declared In
WebDocument.h

layout

Invoked when the receiver should change its layout.

- (void)layout

Discussion

This message is sent to the view as a hint to perform any calculations and update rendering information. For example, at a minimum, the receiver might set the frame rectangle. This method should not perform any drawing operations.

Availability
See Also
Declared In
WebDocument.h

setDataSource:

Invoked when the data source for this document has been changed.

- (void)setDataSource:(WebDataSource *)dataSource

Discussion

The parameter dataSource contains the new data source for this document.

Availability
See Also
Declared In
WebDocument.h

setNeedsLayout:

Sets whether or not the receiver should change its layout.

- (void)setNeedsLayout:(BOOL)flag

Discussion

If flag is YES then the receiver will update its layout. Views conforming to this protocol should implement the drawRect method to invoke layout if this flag is YES.

Availability
Declared In
WebDocument.h

viewDidMoveToHostWindow

Invoked when a web view's host window is set.

- (void)viewDidMoveToHostWindow

Availability
See Also
Declared In
WebDocument.h

viewWillMoveToHostWindow:

Invoked when a web view’s host window is about to change.

- (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow

Discussion

The parameter hostWindow contains the new host window for the WebView.

Availability
See Also
Declared In
WebDocument.h

Next Page > Hide TOC


Last updated: 2006-05-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice