WebDocumentView Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in OS X v10.2 with Safari 1.0 and later. Available in 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 WebKit 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.
Instance Methods
dataSourceUpdated:
Invoked when additional data has been received.
Parameters
- dataSource
The source of the new data.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebDocument.hlayout
Invoked when the receiver should change its layout immediately.
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
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebDocument.hsetDataSource:
Invoked when the data source for this document has been changed.
Parameters
- dataSource
The new data source for the document.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebDocument.hsetNeedsLayout:
Sets whether or not the receiver should change its layout.
Parameters
- flag
Sets whether the receiver needs to update its layout in the next call to its
drawRect:method.
Discussion
A view conforming to this protocol should store the most recent value of this flag in an internal variable. Then, in its drawRect method, if the most recent value of this flag was YES, it should invoke layout and reset the internal variable before updating the contents of the view.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebDocument.hviewDidMoveToHostWindow
Invoked when a web view's host window is set.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebDocument.hviewWillMoveToHostWindow:
Invoked when a web view’s host window is about to change.
Parameters
- hostWindow
The new host window for the view.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebDocument.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-02-24)