forked from veryweblog/ichm
-
Notifications
You must be signed in to change notification settings - Fork 26
/
CHMExporter.h
58 lines (37 loc) · 1.2 KB
/
CHMExporter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// CHMExporter.h
// ichm
//
// Created by Robin Lu on 11/4/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import <AvailabilityMacros.h>
@class CHMDocument;
@class CHMExporter;
@protocol CHMExporterDelegate <NSObject>
- (void)exporterDidBeginExporting:(CHMExporter *)anExporter;
- (void)exporter:(CHMExporter *)anExporter didExportPage:(NSUInteger)page percentageComplete:(CGFloat)percentageComplete;
- (void)exporterDidFinishExporting:(CHMExporter *)anExporter;
@end
#ifdef MAC_OS_X_VERSION_10_11
@interface CHMExporter : NSObject <WebFrameLoadDelegate> {
#else
@interface CHMExporter : NSObject {
#endif
id <CHMExporterDelegate> delegate; // non-retained
NSArray *pageList;
NSUInteger currentPageListItemIndex;
NSUInteger cumulativeExportedPDFPageCount;
WebView *webView;
CGRect pageRect;
CGContextRef ctx;
NSPrintInfo *printInfo;
NSURL *tempDirURL;
NSURL *tempFileURL;
}
- (id)initWithDocument:(CHMDocument *)document destinationURL:(NSURL *)destinationURL pageList:(NSArray *)list;
@property (nonatomic, assign) id <CHMExporterDelegate> delegate;
- (void)beginExport;
@end