summaryrefslogtreecommitdiff
path: root/platform/ios/Classes/MuTapResult.h
blob: 644bad5e9fa31965770d43b585e3ae09edd7a36b (plain)
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
57
58
59
60
61
62
//
//  MuTapResult.h
//  MuPDF
//
//  Copyright (c) 2013 Artifex Software, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MuAnnotation.h"

@class MuTapResultInternalLink;
@class MuTapResultExternalLink;
@class MuTapResultRemoteLink;
@class MuTapResultWidget;
@class MuTapResultAnnotation;

@interface MuTapResult : NSObject
-(void) switchCaseInternal:(void (^)(MuTapResultInternalLink *))internalLinkBlock
		caseExternal:(void (^)(MuTapResultExternalLink *))externalLinkBlock
		caseRemote:(void (^)(MuTapResultRemoteLink *))remoteLinkBlock
		caseWidget:(void (^)(MuTapResultWidget *))widgetBlock
		caseAnnotation:(void (^)(MuTapResultAnnotation *))annotationBlock;
@end

@interface MuTapResultInternalLink : MuTapResult
{
	int pageNumber;
}
@property(readonly) int pageNumber;
-(id)initWithPageNumber:(int)aNumber;
@end

@interface MuTapResultExternalLink : MuTapResult
{
	NSString *url;
}
@property(readonly) NSString *url;
-(id)initWithUrl:(NSString *)aString;
@end

@interface MuTapResultRemoteLink : MuTapResult
{
	NSString *fileSpec;
	int pageNumber;
	BOOL newWindow;
}
@property(readonly) NSString *fileSpec;
@property(readonly) int pageNumber;
@property(readonly) BOOL newWindow;
-(id)initWithFileSpec:(NSString *)aString pageNumber:(int)aNumber newWindow:(BOOL)aBool;
@end

@interface MuTapResultWidget : MuTapResult
@end

@interface MuTapResultAnnotation : MuTapResult
{
	MuAnnotation *annot;
}
@property(readonly) MuAnnotation *annot;
-(id)initWithAnnotation:(MuAnnotation *)aAnnot;
@end