@class IndirectDelegate;
@interface BrowserView : RVPage {
- _transient Database *database_;
UIScroller *scroller_;
UIWebDocumentView *webview_;
NSMutableArray *urls_;
- (WebView *) webView;
-- (id) initWithBook:(RVBook *)book database:(Database *)database;
+- (id) initWithBook:(RVBook *)book;
- (void) webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame;
- (void) webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
- (void) resetViewAnimated:(BOOL)animated;
- (void) resetViewAnimated:(BOOL)animated toPage:(RVPage *)page;
-- (void) setTitle:(NSString *)title forPage:(RVPage *)page;
- (void) setBackButtonTitle:(NSString *)title forPage:(RVPage *)page;
+- (void) reloadTitleForPage:(RVPage *)page;
- (void) reloadButtonsForPage:(RVPage *)page;
- (NSString *) getTitleForPage:(RVPage *)page;
[navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
}
-- (void) setTitle:(NSString *)title forPage:(RVPage *)page {
+- (void) setBackButtonTitle:(NSString *)title forPage:(RVPage *)page {
if ([pages_ count] == 0 || page != [pages_ lastObject])
return;
UINavigationItem *navitem = [navbar_ topItem];
- [navitem setTitle:title];
+ [navitem setBackButtonTitle:title];
}
-- (void) setBackButtonTitle:(NSString *)title forPage:(RVPage *)page {
+- (void) reloadTitleForPage:(RVPage *)page {
if ([pages_ count] == 0 || page != [pages_ lastObject])
return;
UINavigationItem *navitem = [navbar_ topItem];
- [navitem setBackButtonTitle:title];
+ NSString *title = [self getTitleForPage:page];
+ [navitem setTitle:title];
}
- (void) reloadButtonsForPage:(RVPage *)page {
- (void) setPageActive:(BOOL)active;
- (void) resetViewAnimated:(BOOL)animated;
-- (void) setTitle:(NSString *)title;
- (void) setBackButtonTitle:(NSString *)title;
- (void) reloadButtons;
[self doesNotRecognizeSelector:_cmd];
}
-- (void) setTitle:(NSString *)title {
- [book_ setTitle:title forPage:self];
-}
-
- (void) setBackButtonTitle:(NSString *)title {
[book_ setBackButtonTitle:title forPage:self];
}