2 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #import <Cocoa/Cocoa.h>
33 @class WebFrameViewPrivate;
35 @protocol WebDocumentView;
40 @interface WebFrameView : NSView
43 WebFrameViewPrivate *_private;
48 @abstract Returns the WebFrame associated with this WebFrameView
49 @result The WebFrameView's frame.
51 - (WebFrame *)webFrame;
55 @abstract Returns the WebFrameView's document subview
56 @result The subview that renders the WebFrameView's contents
58 - (NSView <WebDocumentView> *)documentView;
61 @method setAllowsScrolling:
62 @abstract Sets whether the WebFrameView allows its document to be scrolled
63 @param flag YES to allow the document to be scrolled, NO to disallow scrolling
65 - (void)setAllowsScrolling:(BOOL)flag;
68 @method allowsScrolling
69 @abstract Returns whether the WebFrameView allows its document to be scrolled
70 @result YES if the document is allowed to scroll, otherwise NO
72 - (BOOL)allowsScrolling;
75 @method canPrintHeadersAndFooters
76 @abstract Tells whether this frame can print headers and footers
77 @result YES if the frame can, no otherwise
79 - (BOOL)canPrintHeadersAndFooters;
82 @method printOperationWithPrintInfo
83 @abstract Creates a print operation set up to print this frame
84 @result A newly created print operation object
86 - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo;
89 @method documentViewShouldHandlePrint
90 @abstract Called by the host application before it initializes and runs a print operation.
91 @result If NO is returned, the host application will abort its print operation and call -printDocumentView on the
92 WebFrameView. The document view is then expected to run its own print operation. If YES is returned, the host
93 application's print operation will continue as normal.
95 - (BOOL)documentViewShouldHandlePrint;
98 @method printDocumentView
99 @abstract Called by the host application when the WebFrameView returns YES from -documentViewShouldHandlePrint.
101 - (void)printDocumentView;