]>
Commit | Line | Data |
---|---|---|
1 | #include <Foundation/Foundation.h> | |
2 | #include <CoreGraphics/CoreGraphics.h> | |
3 | ||
4 | @class DOMDocument; | |
5 | @class DOMElement; | |
6 | ||
7 | @class WAKWindow; | |
8 | @class WebView; | |
9 | ||
10 | @interface WBMarkup : NSObject { | |
11 | /*04*/ WebView *view_; | |
12 | /*08*/ DOMDocument *document_; | |
13 | /*0C*/ WAKWindow *window_; | |
14 | /*10*/ DOMElement *text_; | |
15 | /*14*/ DOMElement *size_; | |
16 | /*18*/ CGContextRef context_; | |
17 | /*1C*/ CGPoint origin_; | |
18 | } | |
19 | ||
20 | + (BOOL) isSharedMarkupCreated; | |
21 | + (WBMarkup *) sharedMarkup; | |
22 | ||
23 | - (id) init; | |
24 | - (void) dealloc; | |
25 | ||
26 | - (WebView *) _webView; | |
27 | ||
28 | - (void) setStringDrawingOrigin:(CGPoint)origin; | |
29 | - (void) clearStringDrawingOrigin; | |
30 | ||
31 | - (CGSize) sizeOfMarkup:(NSString *)markup forWidth:(float)width; | |
32 | - (CGSize) sizeOfString:(NSString *)string withStyle:(NSString *)style forWidth:(float)width; | |
33 | ||
34 | - (NSString *) _styleFormatString:(NSString *)style; | |
35 | - (void) _setupWithStyle:(NSString *)style width:(float)width height:(float)height; | |
36 | - (BOOL) _webPrepareContextForTextDrawing:(BOOL)drawing; | |
37 | ||
38 | - (void) drawMarkup:(NSString *)markup atPoint:(CGPoint)point; | |
39 | - (void) drawMarkup:(NSString *)markup inRect:(CGRect)rect; | |
40 | ||
41 | - (void) drawString:(NSString *)string atPoint:(CGPoint)point withStyle:(NSString *)style; | |
42 | - (void) drawString:(NSString *)string inRect:(CGRect)rect withStyle:(NSString *)style; | |
43 | ||
44 | @end |