SkyEpub SDK for iOS 7
 All Classes Functions Variables Properties
Instance Methods | Protected Attributes | Properties | List of all members
ReflowableViewController Class Reference

#import <ReflowableViewController.h>

Inheritance diagram for ReflowableViewController:

Instance Methods

(id) - initWithStartPagePositionInBook:
(PageInformation *) - getPageInformationAtPagePositionInBook:
(PageInformation *) - getPageInformation
(void) - gotoPageByPagePositionInBook:
(void) - gotoPageByPagePositionInBook:animated:
(void) - gotoPageByPagePosition:inChapter:
(void) - gotoPageByUniqueIndex:inChapter:
(void) - gotoPageByNavMapIndex:
(void) - gotoPageByHighlight:
(void) - gotoPageBySearchResult:
(void) - changeFontName:fontSize:
(void) - changeFontName:fontSize:lineSpacing:
(void) - changeFontToDefault
(void) - changeLineSpacing:
(void) - changeForegroundColor:backgroundColor:
(void) - changeForegroundColor:
(void) - changeBackgroundColor:
(void) - setBackgroundImageForLandscape:contentRect:
(void) - setBackgroundImageForPortrait:contentRect:
(void) - setMarkerImage:
(void) - makeSelectionHighlight:
(void) - makeSelectionNote:
(void) - deleteHightlight:
(void) - reloadData
(void) - reloadHighlights
(void) - reloadNCX
(void) - searchKey:
(void) - searchMore
(void) - pauseSearch
(void) - stopSearch
(void) - unselect
(void) - normalizeAll
(NSString *) - executeScript:
(void) - setVerticalGapRatio:
(void) - setHorizontalGapRatio:
(void) - setDoublePagedForLandscape:
(void) - setGlobalPaging:
(void) - showIndicatorWhileLoadingChapter:
(void) - showIndicatorWhilePaging:
(void) - showIndicatorWhileRotating:
(void) - allowPageTransitionFast:
(void) - gotoPageInChapter:
(void) - gotoNextPageInChapter
(void) - gotoPrevPageInChapter
(int) - pageCountInChapter
(int) - pageIndexInChapter
(void) - gotoPrevChapter
(void) - gotoNextChapter
(BOOL) - isMediaOverlayAvailable
(void) - playFirstParallelInPage
(void) - pausePlayingParallel
(void) - stopPlayingParallel
(void) - playParallel:
(void) - playParallelByIndex:
(Parallel *) - getParallelByIndex:
(int) - parallelCountInChapter
(void) - playNextParallel
(void) - playPrevParallel
(void) - resumePlayingParallel
(BOOL) - isPlayingPaused
(BOOL) - isPlayingStarted
(void) - changeElementColor:hash:
(void) - restoreElementColor
(void) - debug0
(void) - debug1
(void) - debug2
(void) - gotoChapter:
(void) - gotoPage:
(void) - setContentProviderClass:
(void) - setContentProvider:
(void) - useDOMHighlight:
(void) - changeHighlight:color:
(void) - changeHighlight:note:
(void) - changeHighlight:color:note:
(BOOL) - isDoublePaged
(void) - refresh
(void) - repaint
(CGRect) - getStartRectFromHighlight:
(CGRect) - getEndRectFromHighlight:
(double) - getPagePositionInBook:
(void) - backupPosition
(void) - restorePosition
(void) - hidePages
(void) - showPages
(BOOL) - isPagesShown
(void) - setLicenseKey:
(void) - setMenuControllerEnabled:
(int) - toWebX:
(int) - toViewX:
(int) - toWebY:
(int) - toViewY:
(id) - initWithStartChapterIndex:hashLocation:
(void) - gotoPageByChapterIndex:hashLocation:
(void) - gotoPageByNavPoint:
(id) - initWithStartNavPoint:
(int) - getNumberOfChaptersInBook
(int) - getPageIndexInBook
(int) - getNumberOfPagesInBook
(void) - setBlankColor:
(BOOL) - isRTL
(void) - setDelayTimeForProcessContentInRecalc:
(void) - setDelayTimeForProcessContentInRecalcPagesForRotation:
(void) - setDelayTimeForShowWebViewInProcessContent:
(void) - setDelayTimeForBringContentViewToFrontInShowWebView:
(void) - setDelayTimeForMakeAndResetPageImagesInShowWebViewForPaing:
(void) - setDelayTimeForSetPageReadyInShowWebView:
(void) - setCustomDrawHighlight:
(void) - destroy
(void) - setRTL:
(NavPoint *) - getNavPoint:
(NSString *) - getCoverURL
(BOOL) - isGlobalPagination
(BOOL) - isPaging
(int) - getChapterIndexByPageIndexInBook:
(int) - getPageIndexByPageIndexInBook:
(int) - getNumberOfPagesInChapter:
(double) - getPagePositionByPageIndexInBook:
(double) - getPagePositionInBookByPageIndexInBook:
(void) - setMaxWebViews:
(void) - setGlobalOffset:
(void) - setDrawingHighlightOnFront:
(NSString *) - executeJavascript:
(BOOL) - isVerticalWriting
(BOOL) - isPortrait
(BOOL) - isScrollMode
(void) - setScrollModeEnable
(void) - setScrollMode:
(int) - getPageIndexInBookByPagePositionInBook:
(void) - keepBackgroundColor:
(void) - setNavigationAreaWidthRatio:
(void) - createSelectionWithStartIndex:withStartOffset:withEndIndex:withEndOffset:
(void) - markHighlight:
(void) - markParallelHighlight:color:
(void) - removeParallelHighlights
(void) - setTTSEnabled:
(BOOL) - isTTSEnabled
(BOOL) - setTTSLanguage:
(void) - setTTSPitch:
(void) - setTTSRate:

Protected Attributes

__weak NSString * version
__weak NSString * baseDirectory
id contentProviderClass
__weak UIView * backgroundView
id< ContentProvidercontentProvider


int transitionType
int bookCode
BOOL rotationLocked
BOOL isSearching
< ReflowableViewControllerDelegate
< ReflowableViewControllerDataSource
NSString * version
NSString * baseDirectory
UIView * backgroundView
UIView * customView

Detailed Description

the ReflowableViewController Object

Method Documentation

- (void) allowPageTransitionFast: (BOOL)  isFast

allow fast page transition or not

- (void) backupPosition

backup current position

- (void) changeBackgroundColor: (UIColor *)  backgroundColor

changes background color of ReflowableViewController and reload the current chapter.

- (void) changeElementColor: (NSString *)  colorString
hash: (NSString *)  hash 

change the color of element which has hash

- (void) changeFontName: (NSString *)  fontName
fontSize: (NSInteger)  fontSize 

changes font name and size of ReflowableViewController and reload the current chapter.

- (void) changeFontName: (NSString *)  fontName
fontSize: (NSInteger)  fontSize
lineSpacing: (NSInteger)  lineSpacing 

changes font name,size and lineSpacing of ReflowableViewController and reload the current chapter.

- (void) changeFontToDefault

resets all font settings to default

- (void) changeForegroundColor: (UIColor *)  foregroundColor

changes foreground color of ReflowableViewController and reload the current chapter.

- (void) changeForegroundColor: (UIColor *)  foregroundColor
backgroundColor: (UIColor *)  backgroundColor 

changes foreground and background color of ReflowableViewController and reload the current chapter.

- (void) changeHighlight: (Highlight *)  highlight
color: (UIColor *)  color 

change the color of the highlight

- (void) changeHighlight: (Highlight *)  highlight
color: (UIColor *)  color
note: (NSString *)  note 

change the color and note of text.

- (void) changeHighlight: (Highlight *)  highlight
note: (NSString *)  note 

change the text for note

- (void) changeLineSpacing: (NSInteger)  lineSpacing

changes the line spacing between lines and reload. lineSpacing is the value of px.

- (void) createSelectionWithStartIndex: (int)  startNodeIndex
withStartOffset: (int)  startOffset
withEndIndex: (int)  endNodeIndex
withEndOffset: (int)  endOffset 

select text with startIndex, startOffset, endIndex,endOffset

- (void) deleteHightlight: (Highlight *)  highlight

clear current Highlight at mouse position;

- (void) destroy

destroy all objects in ReflowableView explicitly

- (NSString*) executeJavascript: (NSString *)  script

executes javascript source.

- (NSString*) executeScript: (NSString *)  script

executes javascript source.

- (int) getChapterIndexByPageIndexInBook: (int)  pageIndexInBook

returns chapter index by page index when globalpagination is set

- (NSString *) getCoverURL

get the cover image url

- (CGRect) getEndRectFromHighlight: (Highlight *)  highlight

gets the end rectangle from a highlight

- (NavPoint*) getNavPoint: (int)  navIndex

get NavPoint Object by Nav Index

- (int) getNumberOfChaptersInBook

gets the number of chapters in book

- (int) getNumberOfPagesInBook

gets the total number of pages in book - global pagination mode only

- (int) getNumberOfPagesInChapter: (int)  ci

returns the number of pages in chapter by chapter index

- (int) getPageIndexByPageIndexInBook: (int)  pageIndexInBook

returns page index in chapter by page index in book when globalpagination is set

- (int) getPageIndexInBook

gets the index of the current page in book - global pagination mode only

- (int) getPageIndexInBookByPagePositionInBook: (double)  pagePositionInBook

return pageIndexInBook by pagePositionIn Book when globalPagination is activated.

- (PageInformation*) getPageInformation

returns PageInformation at current page.

- (PageInformation*) getPageInformationAtPagePositionInBook: (double)  pagePositionInBook

gets PageInformation at the global position in book.

pagePositionInBookis a double between 0 to 1 to indicate the position in entile book.
- (double) getPagePositionByPageIndexInBook: (int)  pageIndexInBook

returns pagePosition in chapter by page index in book when globalpagination is set

- (double) getPagePositionInBook: (int)  pageIndex

return pagePositionInBook value for given page of current chapter

- (double) getPagePositionInBookByPageIndexInBook: (int)  pageIndexInBook

returns pagePosition in book by page index in book when globalpagination is set

- (Parallel*) getParallelByIndex: (int)  parallelIndex

get the parallel at parallelIndx

- (CGRect) getStartRectFromHighlight: (Highlight *)  highlight

gets the start rectangle from a highlight

- (void) gotoChapter: (int)  chapterIndex

loads the chapter by index and go to the first page.

- (void) gotoNextChapter

goto the prev chapter

- (void) gotoNextPageInChapter

goto the next page in this chapter

- (void) gotoPage: (int)  pageIndex

goes to the page by pageIndex in current chapter.

- (void) gotoPageByChapterIndex: (int)  ci
hashLocation: (NSString *)  hashLocation 

goto Page with start chapter index and hashLocation.

- (void) gotoPageByHighlight: (Highlight *)  highlight

goes to the page by Highlight object, highlight must contain chapterIndex.

- (void) gotoPageByNavMapIndex: (int)  index

goes to the page by NavPoint index

- (void) gotoPageByNavPoint: (NavPoint *)  navPoint

goto Page with NavPoint

- (void) gotoPageByPagePosition: (double)  pagePositionInChapter
inChapter: (int)  chapterIndex 

goes to the page by the position(by pagePositionInChapter) in the chapter(by chapterIndex)

- (void) gotoPageByPagePositionInBook: (double)  pagePositionInBook

goes to the page by global position in book.

- (void) gotoPageByPagePositionInBook: (double)  pagePositionInBook
animated: (BOOL)  animated 

goes to the page by global position in book with Animation effect - PageTransitionCurl mode only

- (void) gotoPageBySearchResult: (SearchResult *)  searchResult

goes to the page by SearchResult Object

- (void) gotoPageByUniqueIndex: (int)  index
inChapter: (int)  chapterIndex 

goes to the page by the element index in the chapter by chapterIndex

- (void) gotoPageInChapter: (int)  pageIndex

goto the page of pageIndex in this chapter

- (void) gotoPrevChapter

goto the next chapter

- (void) gotoPrevPageInChapter

goto the prev page in this chapter

- (void) hidePages

Hide the contents of book

- (id) initWithStartChapterIndex: (int)  ci
hashLocation: (NSString *)  hashLocation 

ReflowablableView init with start chapter index and hashLocation.

- (id) initWithStartNavPoint: (NavPoint *)  np

ReflowablableView init with start NavPoint index

- (id) initWithStartPagePositionInBook: (double)  pagePositionInBook

init ReflowableView with start position in book

- (BOOL) isDoublePaged

check where book is double paged or not.

- (BOOL) isGlobalPagination

returns YES when GlobalPagination is set

- (BOOL) isMediaOverlayAvailable

returns MediaOverlay available

- (BOOL) isPagesShown

tell the pages of viewer is shown or hidden

- (BOOL) isPaging

returns YES while Pagination is running

- (BOOL) isPlayingPaused

tells whether playing is paused or not.

- (BOOL) isPlayingStarted

tells whether medaiOverlay started or not.

- (BOOL) isPortrait

returns whether current device is portrait or not

- (BOOL) isRTL

returns whether current book is Right To Left reading or not

- (BOOL) isScrollMode

return whether ScrollMode is activated or not

- (BOOL) isTTSEnabled

returns whether TextToSpeech is enabled

- (BOOL) isVerticalWriting

returns whether current book is VerticalWriting mode or not

- (void) keepBackgroundColor: (BOOL)  value

keep the original background color of book if value is YES

- (void) makeSelectionHighlight: (UIColor *)  color

set current Selection to Highlight;

- (void) makeSelectionNote: (UIColor *)  color

makes current Selection to Highlight its style note.

- (void) markHighlight: (Highlight *)  highlight

mark highlight with Highlight Object

- (void) markParallelHighlight: (Parallel *)  parallel
color: (UIColor *)  color 

mark Parallel highlight with color - (TextToSpeech Only)

- (int) pageCountInChapter

get page count of this chapter

- (int) pageIndexInChapter

get the current pageIndex in this chapter

- (int) parallelCountInChapter

get the count of parallels in this chapter

- (void) pausePlayingParallel

pause playing parallel

- (void) pauseSearch

pauses searching

- (void) playFirstParallelInPage

play the first Parallel in this page

- (void) playNextParallel

play the next parallel

- (void) playParallel: (Parallel *)  parallel

play the parallel

- (void) playParallelByIndex: (int)  parallelIndex

play the parallel at parallelIndx

- (void) playPrevParallel

play the prev parallel

- (void) refresh

tells the engine to rebuild internal cache images for curl transition

- (void) reloadData

reloads current chapter & highlights

- (void) reloadHighlights

erases all highlights and reload highlights from dataSource.

- (void) reloadNCX

reloads NCX file.

- (void) removeParallelHighlights

remove all highlights which were created for parallel. (TextToSpeech Only)

- (void) repaint

tells the engine to repaint viewer

- (void) restoreElementColor

restore the color of element lastly changed

- (void) restorePosition

goto the position backuped

- (void) resumePlayingParallel

resume playing the paused parallel

- (void) searchKey: (NSString *)  key

searches epub for the key.

- (void) searchMore

searches the key more

- (void) setBackgroundImageForLandscape: (UIImage *)  backgroundImage
contentRect: (CGRect)  rect 

changes the background image For landscape with clientRect

- (void) setBackgroundImageForPortrait: (UIImage *)  backgroundImage
contentRect: (CGRect)  rect 

changes the background image For Portrait with clientRect

- (void) setBlankColor: (UIColor *)  blankColor

set the color of blank area

- (void) setContentProvider: (id< ContentProvider >)  customProvider
- (void) setContentProviderClass: (Class)  contentProvider

set ContentProvider class

- (void) setCustomDrawHighlight: (BOOL)  isCustomDraw

enable custom drawing for highlight mark

- (void) setDoublePagedForLandscape: (BOOL)  isDoublePagedForLandscape

set double page support for landscape view

- (void) setDrawingHighlightOnFront: (BOOL)  value

draw Highlight on the top of epub, not under it.

- (void) setGlobalOffset: (BOOL)  isGlobalOffset

set GlobalOffset to YES/NO

- (void) setGlobalPaging: (BOOL)  isGlobalPaging

set global pagination

- (void) setHorizontalGapRatio: (double)  ratio

set horizontal gap

- (void) setLicenseKey: (NSString *)  licenseKey

set license key

- (void) setMarkerImage: (UIImage *)  markerImage

set the marker image for highlight.

- (void) setMaxWebViews: (int)  max

set the max number of webviews

- (void) setMenuControllerEnabled: (BOOL)  isEnabled

enable system System MenuController when text is selected

- (void) setNavigationAreaWidthRatio: (float)  navigationAreaWidthRatio

set Navatation Area Ratio on both left and right side

- (void) setRTL: (BOOL)  isRTL

enforce reading flow to "Right to Left"

- (void) setScrollMode: (BOOL)  value

activate/deactivate Scroll Mode

- (void) setScrollModeEnable

activate Scroll Mode

- (void) setTTSEnabled: (BOOL)  enabled

set TextToSpeech enabled

- (BOOL) setTTSLanguage: (NSString *)  language

set TextToSpeech language for utterance, default en-US

- (void) setTTSPitch: (float)  pitch

set the pitch of utterance

- (void) setTTSRate: (float)  rate

set the rate of utterance

- (void) setVerticalGapRatio: (double)  ratio

set vertical gap

- (void) showIndicatorWhileLoadingChapter: (BOOL)  show

show indicator while loading new chapter or not.

- (void) showIndicatorWhilePaging: (BOOL)  show

show indicator while paginating whole chapters or not.

- (void) showIndicatorWhileRotating: (BOOL)  show

show indicator while device is rotated or not

- (void) showPages

show the contents of book

- (void) stopPlayingParallel

stop playing parallel

- (void) stopSearch

stops searching

- (int) toViewX: (int)  wx

convert web coordination x to screen coordination x

- (int) toViewY: (int)  wy

convert web coordination y to screen coordination y

- (int) toWebX: (int)  vx

convert screen coordination x to web coordination x

- (int) toWebY: (int)  vy

convert screen coordination y to web coordination y

- (void) unselect

unselects the text selection.

- (void) useDOMHighlight: (BOOL)  useDOM

use DOM structure for highlight text.

Member Data Documentation

- (__weak UIView*) backgroundView

the UIView object for background under the text

- (__weak NSString*) baseDirectory

the base directory for custom content files of epub

- (id<ContentProvider>) contentProvider


- (id) contentProviderClass

the class for custom reader for epub.

- (__weak NSString*) version

current engine version.

Property Documentation

- (Book *) book

the Book object which contains information about epub.

- (int) bookCode

the unique code for this book.

- (UIView *) customView

the customView for user interface

- (id< ReflowableViewControllerDataSource >) dataSource
- (id< ReflowableViewControllerDelegate >) delegate
- (BOOL) isSearching

Search process is going on or not

- (BOOL) rotationLocked

to prevent rotation when rotationLocked is YES

- (int) transitionType

the page transition type. 0:none, 1:slide, 2:curl

The documentation for this class was generated from the following file: