Mac OS X Reference Library Apple Developer Connection spyglass button

WebFrameView Class Reference

Inherits from
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
WebFrameView.h

Overview

WebFrameView objects and their subviews display the web content contained in a frame. You never create instances of WebFrameView directly—WebView objects create and manage a hierarchy of WebFrameView objects, one for each frame. WebFrameView objects use a scroll view whose document view conforms to the WebDocumentView protocol.

Tasks

Getting the Web Frame

Getting Subviews

Setting Scrolling Behavior

Printing Views

Instance Methods

allowsScrolling

Returns a Boolean value indicating whether users can scroll.

- (BOOL)allowsScrolling

Return Value

YES if the receiver allows users to scroll; otherwise, NO.

Availability
See Also
Declared In
WebFrameView.h

canPrintHeadersAndFooters

Returns a Boolean value indicating whether the receiver can print headers and footers.

- (BOOL)canPrintHeadersAndFooters

Return Value

YES if the receiver can print headers and footers; otherwise, NO.

Availability
Declared In
WebFrameView.h

documentView

Returns the subview that displays the web content.

- (NSView < WebDocumentView > *)documentView

Return Value

The subview that displays the web content.

Discussion

Use setAllowsScrolling: to enable scrolling of this view.

Availability
Declared In
WebFrameView.h

documentViewShouldHandlePrint

Returns a Boolean value indicating whether the document view should handle a print operation.

- (BOOL)documentViewShouldHandlePrint

Return Value

YES if the document view should handle the print operation; otherwise, NO.

Discussion

If this method returns NO, the application terminates its print operation and sends printDocumentView to the web frame view.

Availability
Declared In
WebFrameView.h

printDocumentView

Prints the receiver.

- (void)printDocumentView

Discussion

This method is invoked if the documentViewShouldHandlePrint method returns NO.

Availability
Declared In
WebFrameView.h

printOperationWithPrintInfo:

Returns a print operation object to print this frame.

- (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo

Parameters
printInfo

Information about the print settings needed to print this frame. See NSPrintInfo Class Reference for more information about this object.

Return Value

An NSPrintOperation object set up to print this frame. See NSPrintOperation Class Reference for more information about this object.

Availability
Declared In
WebFrameView.h

setAllowsScrolling:

Sets whether the frame view should allow users to scroll.

- (void)setAllowsScrolling:(BOOL)flag

Parameters
flag

If YES, scrolling is allowed; if NO, it is not. If the frame contains a scrolling element, then that value is used as the default; otherwise, the default is YES.

Availability
See Also
Declared In
WebFrameView.h

webFrame

Returns the web frame.

- (WebFrame *)webFrame

Return Value

The web frame.

Availability
Declared In
WebFrameView.h

Last updated: 2009-03-04

Did this document help you? Yes It's good, but... Not helpful...