]>
Commit | Line | Data |
---|---|---|
2de63e63 JF |
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 | ||
c27e08b2 JF |
10 | typedef enum { |
11 | WebTextAlignmentLeft = 0, | |
12 | WebTextAlignmentCenter = 1, | |
13 | WebTextAlignmentRight = 2, | |
14 | } WebTextAlignment; | |
15 | ||
2de63e63 JF |
16 | @interface WBMarkup : NSObject { |
17 | /*04*/ WebView *view_; | |
18 | /*08*/ DOMDocument *document_; | |
19 | /*0C*/ WAKWindow *window_; | |
20 | /*10*/ DOMElement *text_; | |
21 | /*14*/ DOMElement *size_; | |
22 | /*18*/ CGContextRef context_; | |
23 | /*1C*/ CGPoint origin_; | |
24 | } | |
25 | ||
26 | + (BOOL) isSharedMarkupCreated; | |
27 | + (WBMarkup *) sharedMarkup; | |
28 | ||
29 | - (id) init; | |
30 | - (void) dealloc; | |
31 | ||
32 | - (WebView *) _webView; | |
33 | ||
34 | - (void) setStringDrawingOrigin:(CGPoint)origin; | |
35 | - (void) clearStringDrawingOrigin; | |
36 | ||
37 | - (CGSize) sizeOfMarkup:(NSString *)markup forWidth:(float)width; | |
38 | - (CGSize) sizeOfString:(NSString *)string withStyle:(NSString *)style forWidth:(float)width; | |
39 | ||
40 | - (NSString *) _styleFormatString:(NSString *)style; | |
41 | - (void) _setupWithStyle:(NSString *)style width:(float)width height:(float)height; | |
42 | - (BOOL) _webPrepareContextForTextDrawing:(BOOL)drawing; | |
43 | ||
44 | - (void) drawMarkup:(NSString *)markup atPoint:(CGPoint)point; | |
45 | - (void) drawMarkup:(NSString *)markup inRect:(CGRect)rect; | |
46 | ||
47 | - (void) drawString:(NSString *)string atPoint:(CGPoint)point withStyle:(NSString *)style; | |
48 | - (void) drawString:(NSString *)string inRect:(CGRect)rect withStyle:(NSString *)style; | |
49 | ||
50 | @end |