SkyEpub SDK for iOS 7
 All Classes Functions Variables Properties
FixedViewController.h
1 //
2 // FixedViewController.h
3 // CoreTest
4 //
5 // Created by SkyTree on 11. 10. 19..
6 // Copyright (c) 2011 Skytree Corporation. All rights reserved.
7 //
8 
9 #import <UIKit/UIKit.h>
10 #import "Book.h"
11 
12 #define SpreadAuto 0
13 #define SpreadLandscape 1
14 #define SpreadPortrait 2
15 #define SpreadBoth 4
16 #define SpreadNone 8
17 
19 @class Highlight;
20 @protocol ContentProvider;
21 
25 @interface FixedPageInformation :NSObject{
27  NSInteger bookCode;
29  NSInteger pageIndex;
31  NSInteger numberOfPages;
33  double pagePosition;
35  NSString *cachedImagePath;
36 }
37 
38 @property NSInteger bookCode;
39 @property NSInteger pageIndex;
40 @property NSInteger numberOfPages;
41 @property double pagePosition;
42 @property (nonatomic,retain) NSString* cachedImagePath;
43 
44 @end
45 
46 @protocol FixedViewControllerDataSource <NSObject>
47 @optional
49 -(NSString*)fixedViewController:(FixedViewController*)fvc scriptForPage:(NSInteger)pageIndex;
51 -(NSString*)fixedViewController:(FixedViewController*)fvc styleForPage:(NSInteger)pageIndex;
53 -(BOOL)fixedViewController:(FixedViewController*)fvc cacheExists:(int)pageIndex;
54 
56 -(NSMutableArray*)fixedViewController:(FixedViewController*)fvc highlightsForChapter:(NSInteger)chapterIndex;
58 -(void)fixedViewController:(FixedViewController*)rvc insertHighlight:(Highlight*)highlight;
60 -(void)fixedViewController:(FixedViewController*)rvc deleteHighlight:(Highlight*)highlight;
62 -(void)fixedViewController:(FixedViewController*)rvc updateHighlight:(Highlight*)highlight;
63 
64 
65 @end
66 
67 @class ImageIndexed;
68 
70 @protocol FixedViewControllerDelegate <NSObject>
71 @optional
73 -(void)fixedViewController:(FixedViewController*)fvc didDetectTapAtPositionInView:(CGPoint)positionInView positionInPage:(CGPoint)positionInPage;
75 -(void)fixedViewController:(FixedViewController*)fvc didDetectDoubleTapAtPositionInView:(CGPoint)positionInView positionInPage:(CGPoint)positionInPage;
77 -(void)fixedViewController:(FixedViewController*)fvc pageMoved:(FixedPageInformation*)fixedPageInformation;
78 
80 -(void)fixedViewController:(FixedViewController*)fvc cachingStarted:(int)index;
82 -(void)fixedViewController:(FixedViewController*)fvc cachingFinished:(int)index;
84 -(void)fixedViewController:(FixedViewController*)fvc cached:(int)index image:(UIImage*)image;
85 
86 -(void)fixedViewController:(FixedViewController*)fvc cached:(int)index path:(NSString*)path;
87 
89 -(void)fixedViewController:(FixedViewController*)fvc parallelDidStart:(Parallel*)parallel;
91 -(void)fixedViewController:(FixedViewController*)fvc parallelDidEnd:(Parallel*)parallel;
93 -(void)parallesDidEnd:(FixedViewController*)fvc;
94 
96 -(void)fixedViewController:(FixedViewController*)fvc didSearchKey:(SearchResult*)searchResult;
98 -(void)fixedViewController:(FixedViewController*)fvc didFinishSearchForChapter:(SearchResult*)searchResult;
100 -(void)fixedViewController:(FixedViewController*)fvc didFinishSearchAll:(SearchResult*)searchResult;
101 
103 -(void)fixedViewController:(FixedViewController*)fvc failedToMove:(BOOL)toForward;
104 
105 
106 
108 -(void)fixedViewController:(FixedViewController*)rvc didSelectRange:(Highlight*)highlight menuRect:(CGRect)menuRect;
109 
111 -(void)fixedViewController:(FixedViewController*)rvc didHitHighlight:(Highlight*)highlight atPosition:(CGPoint)position;
112 
113 
114 
115 @end
116 
118 @interface FixedViewController : UIViewController {
122  int bookCode;
124  Book* book;
126  __weak id <FixedViewControllerDelegate> delegate;
128  __weak id <FixedViewControllerDataSource> dataSource;
130  __weak NSString* version;
132  __weak NSString* baseDirectory;
136  id<ContentProvider> contentProvider;
137 }
138 
139 @property (nonatomic,weak) NSString *encryptKey;
140 @property int transitionType;
141 @property int bookCode;
142 @property (nonatomic,retain) Book* book;
143 @property (nonatomic,weak) id <FixedViewControllerDelegate> delegate;
144 @property (nonatomic,weak) id <FixedViewControllerDataSource> dataSource;
145 @property (nonatomic,weak) NSString* version;
146 @property (nonatomic,weak) NSString* baseDirectory;
147 
149 -(void)debug0;
150 -(void)debug1;
151 -(void)debug2;
152 -(void)debug3;
153 
154 
158 -(id)initWithStartPageIndex:(int)startPageIndex;
163 -(id)initWithStartPageIndex:(int)pageIndex spread:(int)spreadType;
168 -(id)initWithStartPosition:(double)startPosition spread:(int)spreadType;
169 
170 
172 -(FixedPageInformation*)getFixedPageInformationAtPagePosition:(double)pagePosition;
174 -(FixedPageInformation*)getFixedPageInformationAtPageIndex:(int)pageIndex;
176 -(FixedPageInformation*)getFixedPageInformation;
178 -(void)gotoPageByPagePosition:(double)pagePosition;
180 -(void)changeBackgroundColor:(UIColor*)backgroundColor;
182 -(void)changeWindowColor:(UIColor*)windowColor;
184 -(void)gotoPageByNavMapIndex:(int)index;
186 -(void)clearCached;
188 -(void)setContentProviderClass:(Class)contentProvider;
190 -(void)setContentProvider:(id<ContentProvider>)customProvider;
192 -(BOOL)canRotate;
193 
194 
196 -(void)gotoPage:(int)pageIndex;
198 -(void)gotoNextPage;
200 -(void)gotoPrevPage;
202 -(int)pageCountInBook;
204 -(int)currentPageIndex;
205 
207 -(void)changeElementColor:(NSString*)colorString hash:(NSString*)hash pageIndex:(int)pageIndex;
209 -(void)restoreElementColor;
210 
212 -(BOOL)isMediaOverlayAvailable;
214 -(void)playFirstParallel;
216 -(void)pausePlayingParallel;
218 -(void)stopPlayingParallel;
220 -(void)playParallel:(Parallel*)parallel;
222 -(void)playParallelByIndex:(int)parallelIndex;
224 -(Parallel*)getParallelByIndex:(int)parallelIndex;
226 -(int)parallelCount;
228 -(void)playNextParallel;
230 -(void)playPrevParallel;
232 -(void)resumePlayingParallel;
234 -(BOOL)isPlayingPaused;
236 -(BOOL)isPlayingStarted;
237 
239 -(void)setLicenseKey:(NSString *)licenseKey;
240 
242 -(void)setTimeForRendering:(double)seconds;
244 -(void)setTimeForCaching:(double)seconds;
246 -(void)deleteAllCaches;
247 
249 -(void)destroy;
250 
252 -(void)setPagesCenterImage:(UIImage*)pagesCenterImage;
254 -(void)setPagesStackImage:(UIImage*)pagesStackImage;
255 
257 -(void)setNavigationAreaEnabled:(BOOL)enabled;
258 
260 -(NSString*)getCoverURL;
261 
263 -(void)startCaching;
265 -(void)stopCaching;
266 
268 -(NSString*)executeJavascript:(NSString*)script forLeftPage:(BOOL)forLeft;
270 -(NSString*)executeJavascript:(NSString*)script;
271 
273 -(void)useSingleLayer;
274 
276 -(void)setSwipeGestureEnabled:(BOOL)enabled;
277 
279 -(int)platformMemory;
281 -(NSString *)platformString;
282 
284 -(void)addMenuItemForSelection:(NSObject*)target title:(NSString*)title selector:(SEL)selector;
285 
287 -(void)makeSelectionHighlight:(UIColor*)color;
289 -(void)makeSelectionNote:(UIColor*)color;
291 -(void)deleteHighlight:(Highlight*)highlight;
293 -(void)changeHighlight:(Highlight*)highlight color:(UIColor*)color;
295 -(void)changeHighlight:(Highlight *)highlight note:(NSString *)note;
297 -(void)changeHighlight:(Highlight *)highlight color:(UIColor*)color note:(NSString *)note;
298 
300 -(void)searchKey:(NSString*)key;
302 -(void)searchMore;
304 -(void)pauseSearch;
306 -(void)stopSearch;
307 
308 
310 -(BOOL)isDoublePaged;
311 
313 -(NavPoint*)getNavPoint:(int)navIndex;
314 
316 -(void)gotoPageByNavPoint:(NavPoint*)np;
317 
319 -(void)setFitToHeight:(BOOL)value;
320 
322 -(void)setMaxLayer:(int)max;
323 
324 
325 
326 
327 
328 @end