|
1 /* |
|
2 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
|
3 * |
|
4 * Redistribution and use in source and binary forms, with or without |
|
5 * modification, are permitted provided that the following conditions |
|
6 * are met: |
|
7 * |
|
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. |
|
16 * |
|
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. |
|
27 */ |
|
28 |
|
29 #import <Cocoa/Cocoa.h> |
|
30 |
|
31 @class WebDataSource; |
|
32 @class WebFrame; |
|
33 @class WebFrameViewPrivate; |
|
34 |
|
35 @protocol WebDocumentView; |
|
36 |
|
37 /*! |
|
38 @class WebFrameView |
|
39 */ |
|
40 @interface WebFrameView : NSView |
|
41 { |
|
42 @private |
|
43 WebFrameViewPrivate *_private; |
|
44 } |
|
45 |
|
46 /*! |
|
47 @method webFrame |
|
48 @abstract Returns the WebFrame associated with this WebFrameView |
|
49 @result The WebFrameView's frame. |
|
50 */ |
|
51 - (WebFrame *)webFrame; |
|
52 |
|
53 /*! |
|
54 @method documentView |
|
55 @abstract Returns the WebFrameView's document subview |
|
56 @result The subview that renders the WebFrameView's contents |
|
57 */ |
|
58 - (NSView <WebDocumentView> *)documentView; |
|
59 |
|
60 /*! |
|
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 |
|
64 */ |
|
65 - (void)setAllowsScrolling:(BOOL)flag; |
|
66 |
|
67 /*! |
|
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 |
|
71 */ |
|
72 - (BOOL)allowsScrolling; |
|
73 |
|
74 /*! |
|
75 @method canPrintHeadersAndFooters |
|
76 @abstract Tells whether this frame can print headers and footers |
|
77 @result YES if the frame can, no otherwise |
|
78 */ |
|
79 - (BOOL)canPrintHeadersAndFooters; |
|
80 |
|
81 /*! |
|
82 @method printOperationWithPrintInfo |
|
83 @abstract Creates a print operation set up to print this frame |
|
84 @result A newly created print operation object |
|
85 */ |
|
86 - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo; |
|
87 |
|
88 /*! |
|
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. |
|
94 */ |
|
95 - (BOOL)documentViewShouldHandlePrint; |
|
96 |
|
97 /*! |
|
98 @method printDocumentView |
|
99 @abstract Called by the host application when the WebFrameView returns YES from -documentViewShouldHandlePrint. |
|
100 */ |
|
101 - (void)printDocumentView; |
|
102 |
|
103 @end |