7 #import <UIKit/UIKit.h>
55 @property NSInteger code,bookCode;
56 @property NSInteger chapterIndex;
57 @property NSInteger numberOfChaptersInBook;
58 @property NSInteger pageIndex;
59 @property NSInteger numberOfPagesInChapter;
60 @property (nonatomic,retain) NSString* chapterTitle;
61 @property (nonatomic,retain) NSMutableArray *highlightsInPage;
62 @property double pagePositionInChapter;
63 @property double pagePositionInBook;
64 @property (nonatomic,retain) NSString* pageDescription;
65 @property bool isLoadedChapter;
66 @property NSInteger startIndex,endIndex;
67 @property NSInteger pageIndexInBook,numberOfPagesInBook;
68 @property NSInteger firstCharacterOffsetInPage,textLengthInPage;
102 @property (nonatomic,retain) NSString *fontName;
103 @property NSInteger bookCode,chapterIndex,numberOfPagesInChapter,fontSize,lineSpacing;
104 @property double verticalGapRatio,horizontalGapRatio;
105 @property BOOL isPortrait,isDoublePagedForLandscape;
106 @property int code,width,height;
118 -(NSMutableArray*)reflowableViewController:(ReflowableViewController*)rvc highlightsForChapter:(NSInteger)chapterIndex;
120 -(void)reflowableViewController:(ReflowableViewController*)rvc insertHighlight:(
Highlight*)highlight;
122 -(void)reflowableViewController:(ReflowableViewController*)rvc deleteHighlight:(
Highlight*)highlight;
124 -(NSInteger)reflowableViewController:(ReflowableViewController*)rvc numberOfPagesForPagingInformation:(
PagingInformation*)pagingInformation;
128 -(void)reflowableViewController:(ReflowableViewController*)rvc updateHighlight:(
Highlight*)highlight;
130 -(NSString*)reflowableViewController:(ReflowableViewController*)rvc scriptForChapter:(NSInteger)chapterIndex;
132 -(NSString*)reflowableViewController:(ReflowableViewController*)rvc styleForChapter:(NSInteger)chapterIndex;
134 -(BOOL)reflowableViewController:(ReflowableViewController*)rvc isBookmarked:(
PageInformation*)pageInformation;
136 -(UIImage*)bookmarkImage:(ReflowableViewController*)rvc isBookmarked:(BOOL)isBookmarked;
138 -(CGRect)bookmarkRect:(ReflowableViewController*)rvc isBookmarked:(BOOL)isBookmarked;
148 -(void)reflowableViewController:(ReflowableViewController*)rvc didSelectRange:(
Highlight*)highlight startRect:(CGRect)startRect endRect:(CGRect)endRect;
150 -(void)reflowableViewController:(ReflowableViewController*)rvc didDetectTapAtPosition:(CGPoint)position;
152 -(void)reflowableViewController:(ReflowableViewController*)rvc didDetectDoubleTapAtPosition:(CGPoint)position;
154 -(void)reflowableViewController:(ReflowableViewController*)rvc pageMoved:(
PageInformation*)pageInformation;
156 -(void)reflowableViewController:(ReflowableViewController*)rvc didSearchKey:(SearchResult*)searchResult;
158 -(void)reflowableViewController:(ReflowableViewController*)rvc didFinishSearchForChapter:(SearchResult*)searchResult;
160 -(void)reflowableViewController:(ReflowableViewController*)rvc didFinishSearchAll:(SearchResult*)searchResult;
162 -(void)reflowableViewController:(ReflowableViewController*)rvc didStartPaging:(
int)bookCode;
164 -(void)reflowableViewController:(ReflowableViewController*)rvc didPaging:(
PagingInformation*)pagingInformation;
166 -(void)reflowableViewController:(ReflowableViewController*)rvc didFinishPaging:(
int)bookCode;
169 -(void)reflowableViewController:(ReflowableViewController*)rvc didChapterLoad:(
int)chapterIndex;
172 -(void)reflowableViewController:(ReflowableViewController*)rvc parallelDidStart:(
Parallel*)parallel;
174 -(void)reflowableViewController:(ReflowableViewController*)rvc parallelDidEnd:(
Parallel*)parallel;
176 -(void)parallesDidEnd:(ReflowableViewController*)rvc;
180 -(void)reflowableViewController:(ReflowableViewController*)rvc didHitHighlight:(
Highlight*)highlight atPosition:(CGPoint)position startRect:(CGRect)startRect endRect:(CGRect)endRect;
183 -(void)reflowableViewController:(ReflowableViewController*)rvc didHitLink:(NSString*)urlString;
185 -(void)reflowableViewController:(ReflowableViewController*)rvc didHitImage:(NSString*)urlString;
189 -(void)reflowableViewController:(ReflowableViewController*)rvc didHitLinkForLinearNo:(NSString*)urlString;
192 -(void)pageTransitionStarted:(ReflowableViewController*)rvc;
193 -(void)pageTransitionEnded:(ReflowableViewController*)rvc;
195 -(void)reflowableViewController:(ReflowableViewController*)rvc didSelectionCanceled:(NSString*)lastSelectedText;
197 -(void)reflowableViewController:(ReflowableViewController*)rvc didSelectionChanged:(NSString*)selectedText;
198 -(void)reflowableViewController:(ReflowableViewController*)rvc didHitBookmark:(
PageInformation*)pageInformation isBookmarked:(BOOL)isBookmarked;
201 -(void)reflowableViewController:(ReflowableViewController*)rvc drawHighlightRect:(CGRect)highlightRect context:(CGContextRef)context highlightColor:(UIColor*)highlightColor highlight:(
Highlight*)highlight;
205 -(void)reflowableViewController:(ReflowableViewController*)rvc failedToMove:(BOOL)toForward;
213 @interface ReflowableViewController : UIViewController {
242 @property int transitionType;
243 @property int bookCode;
244 @property BOOL rotationLocked,isSearching;
245 @property (nonatomic,weak) id <ReflowableViewControllerDelegate> delegate;
246 @property (nonatomic,weak) id <ReflowableViewControllerDataSource> dataSource;
247 @property (nonatomic,weak) NSString *version;
248 @property (nonatomic,weak) NSString *baseDirectory;
249 @property (nonatomic,weak) UIView *backgroundView;
250 @property (nonatomic,retain) UIView* customView;
251 @property (nonatomic,retain) Book* book;
254 -(id)initWithStartPagePositionInBook:(
double)pagePositionInBook;
256 -(
PageInformation*)getPageInformationAtPagePositionInBook:(
double)pagePositionInBook;
260 -(void)gotoPageByPagePositionInBook:(
double)pagePositionInBook;
262 -(void)gotoPageByPagePositionInBook:(
double)pagePositionInBook animated:(BOOL)animated;
264 -(void)gotoPageByPagePosition:(
double)pagePositionInChapter inChapter:(
int)chapterIndex;
266 -(void)gotoPageByUniqueIndex:(
int)index inChapter:(
int)chapterIndex;
268 -(void)gotoPageByNavMapIndex:(
int)index;
270 -(void)gotoPageByHighlight:(
Highlight*)highlight;
272 -(void)gotoPageBySearchResult:(SearchResult*)searchResult;
274 -(void)changeFontName:(NSString*)fontName fontSize:(NSInteger)fontSize;
276 -(void)changeFontName:(NSString *)fontName fontSize:(NSInteger)fontSize lineSpacing:(NSInteger)lineSpacing;
278 -(void)changeFontToDefault;
280 -(void)changeLineSpacing:(NSInteger)lineSpacing;
282 -(void)changeForegroundColor:(UIColor*)foregroundColor backgroundColor:(UIColor*)backgroundColor;
284 -(void)changeForegroundColor:(UIColor*)foregroundColor;
286 -(void)changeBackgroundColor:(UIColor *)backgroundColor;
288 -(void)setBackgroundImageForLandscape:(UIImage*)backgroundImage contentRect:(CGRect)rect;
290 -(void)setBackgroundImageForPortrait:(UIImage*)backgroundImage contentRect:(CGRect)rect;
292 -(void)setMarkerImage:(UIImage*)markerImage;
294 -(void)makeSelectionHighlight:(UIColor*)color;
296 -(void)makeSelectionNote:(UIColor*)color;
298 -(void)deleteHightlight:(
Highlight*)highlight;
302 -(void)reloadHighlights;
306 -(void)searchKey:(NSString*)key;
317 -(NSString*)executeScript:(NSString*)script;
319 -(void)setVerticalGapRatio:(
double)ratio;
321 -(void)setHorizontalGapRatio:(
double)ratio;
323 -(void)setDoublePagedForLandscape:(BOOL)isDoublePagedForLandscape;
325 -(void)setGlobalPaging:(BOOL)isGlobalPaging;
328 -(void)showIndicatorWhileLoadingChapter:(BOOL)show;
330 -(void)showIndicatorWhilePaging:(BOOL)show;
332 -(void)showIndicatorWhileRotating:(BOOL)show;
334 -(void)allowPageTransitionFast:(BOOL)isFast;
337 -(void)gotoPageInChapter:(
int)pageIndex;
339 -(void)gotoNextPageInChapter;
341 -(void)gotoPrevPageInChapter;
343 -(int)pageCountInChapter;
345 -(int)pageIndexInChapter;
347 -(void)gotoPrevChapter;
349 -(void)gotoNextChapter;
353 -(BOOL)isMediaOverlayAvailable;
355 -(void)playFirstParallelInPage;
357 -(void)pausePlayingParallel;
359 -(void)stopPlayingParallel;
361 -(void)playParallel:(
Parallel*)parallel;
363 -(void)playParallelByIndex:(
int)parallelIndex;
365 -(
Parallel*)getParallelByIndex:(
int)parallelIndex;
367 -(int)parallelCountInChapter;
369 -(void)playNextParallel;
371 -(void)playPrevParallel;
373 -(void)resumePlayingParallel;
375 -(BOOL)isPlayingPaused;
377 -(BOOL)isPlayingStarted;
380 -(void)changeElementColor:(NSString*)colorString hash:(NSString*)hash;
382 -(void)restoreElementColor;
388 -(void)gotoChapter:(
int)chapterIndex;
390 -(void)gotoPage:(
int)pageIndex;
392 -(void)setContentProviderClass:(Class)contentProvider;
397 -(void)useDOMHighlight:(BOOL)useDOM;
401 -(void)changeHighlight:(
Highlight*)highlight color:(UIColor*)color;
403 -(void)changeHighlight:(
Highlight *)highlight note:(NSString *)note;
405 -(void)changeHighlight:(
Highlight *)highlight color:(UIColor*)color note:(NSString *)note;
407 -(BOOL)isDoublePaged;
413 -(CGRect)getStartRectFromHighlight:(
Highlight*)highlight;
415 -(CGRect)getEndRectFromHighlight:(
Highlight*)highlight;
417 -(double)getPagePositionInBook:(
int)pageIndex;
420 -(void)backupPosition;
422 -(void)restorePosition;
432 -(void)setLicenseKey:(NSString *)licenseKey;
434 -(void)setMenuControllerEnabled:(BOOL)isEnabled;
437 -(int)toWebX:(
int)vx;
439 -(int)toViewX:(
int)wx;
441 -(int)toWebY:(
int)vy;
443 -(int)toViewY:(
int)wy;
447 -(id)initWithStartChapterIndex:(
int)ci hashLocation:(NSString*)hashLocation;
449 -(void)gotoPageByChapterIndex:(
int)ci hashLocation:(NSString*)hashLocation;
451 -(void)gotoPageByNavPoint:(
NavPoint*)navPoint;
453 -(id)initWithStartNavPoint:(
NavPoint*)np;
458 -(int)getNumberOfChaptersInBook;
460 -(int)getPageIndexInBook;
462 -(int)getNumberOfPagesInBook;
466 -(void)setBlankColor:(UIColor*)blankColor;
473 -(void)setDelayTimeForProcessContentInRecalc:(
double)time;
474 -(void)setDelayTimeForProcessContentInRecalcPagesForRotation:(
double)time;
475 -(void)setDelayTimeForShowWebViewInProcessContent:(
double)time;
476 -(void)setDelayTimeForBringContentViewToFrontInShowWebView:(
double)time;
477 -(void)setDelayTimeForMakeAndResetPageImagesInShowWebViewForPaing:(
double)time;
478 -(void)setDelayTimeForSetPageReadyInShowWebView:(
double)time;
482 -(void)setCustomDrawHighlight:(BOOL)isCustomDraw;
490 -(void)setRTL:(BOOL)isRTL;
492 -(
NavPoint*)getNavPoint:(
int)navIndex;
496 -(NSString *)getCoverURL;
500 -(BOOL)isGlobalPagination;
504 -(int)getChapterIndexByPageIndexInBook:(
int)pageIndexInBook;
506 -(int)getPageIndexByPageIndexInBook:(
int)pageIndexInBook;
508 -(int)getNumberOfPagesInChapter:(
int)ci;
510 -(double)getPagePositionByPageIndexInBook:(
int)pageIndexInBook;
512 -(double)getPagePositionInBookByPageIndexInBook:(
int)pageIndexInBook;
516 -(void)setMaxWebViews:(
int)max;
520 -(void)setGlobalOffset:(BOOL)isGlobalOffset;
524 -(void)setDrawingHighlightOnFront:(BOOL)value;
528 -(NSString*)executeJavascript:(NSString*)script;
532 -(BOOL)isVerticalWriting;
540 -(void)setScrollModeEnable;
542 -(void)setScrollMode:(BOOL)value;
544 -(int)getPageIndexInBookByPagePositionInBook:(
double)pagePositionInBook;
548 -(void)keepBackgroundColor:(BOOL)value;
552 -(void)setNavigationAreaWidthRatio:(
float)navigationAreaWidthRatio;
556 -(void)createSelectionWithStartIndex:(
int)startNodeIndex withStartOffset:(
int)startOffset withEndIndex:(
int)endNodeIndex withEndOffset:(
int)endOffset;
560 -(void)markHighlight:(
Highlight*)highlight;
562 -(void)markParallelHighlight:(
Parallel*)parallel color:(UIColor*)color;
564 -(void)removeParallelHighlights;
569 -(void)setTTSEnabled:(BOOL)enabled;
614 -(BOOL)setTTSLanguage:(NSString*)language;
616 -(void)setTTSPitch:(
float)pitch;
618 -(void)setTTSRate:(
float)rate;