NewsBlur/clients/ios/Classes/StoryPageControl.h

131 lines
5.1 KiB
C
Raw Normal View History

//
// StoryPageControl.h
// NewsBlur
//
// Created by Samuel Clay on 11/2/12.
// Copyright (c) 2012 NewsBlur. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "BaseViewController.h"
#import "THCircularProgressView.h"
#import "NBNotifier.h"
#import "StoryDetailViewController.h"
@interface StoryPageControl : BaseViewController
<UIScrollViewDelegate, UIPopoverControllerDelegate, UIPopoverPresentationControllerDelegate, UIGestureRecognizerDelegate> {
NewsBlurAppDelegate *appDelegate;
THCircularProgressView *circularProgressView;
2013-03-05 17:00:03 -08:00
UIButton *buttonPrevious;
UIButton *buttonNext;
UIButton *buttonText;
UIBarButtonItem *markReadBarButton;
UIBarButtonItem *separatorBarButton2;
UIActivityIndicatorView *loadingIndicator;
UIBarButtonItem *buttonBack;
UIView *traverseView;
2013-04-26 13:51:03 -07:00
UIView *progressView;
UIView *progressViewContainer;
BOOL isDraggingScrollview;
BOOL isAnimatedIntoPlace;
BOOL inRotation;
BOOL waitingForNextUnreadFromServer;
2013-03-04 17:15:50 -08:00
UIInterfaceOrientation _orientation;
CGFloat scrollPct;
}
@property (nonatomic) StoryDetailViewController *currentPage;
@property (nonatomic) StoryDetailViewController *nextPage;
@property (nonatomic) StoryDetailViewController *previousPage;
@property (nonatomic, strong) IBOutlet UIScrollView *scrollView;
@property (nonatomic, strong) IBOutlet UIPageControl *pageControl;
@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *loadingIndicator;
2015-12-07 16:09:49 -08:00
@property (nonatomic) IBOutlet UIImageView *textStorySendBackgroundImageView;
@property (nonatomic) IBOutlet UIImageView *prevNextBackgroundImageView;
@property (nonatomic) IBOutlet THCircularProgressView *circularProgressView;
2013-03-05 17:00:03 -08:00
@property (nonatomic) IBOutlet UIButton *buttonPrevious;
@property (nonatomic) IBOutlet UIButton *buttonNext;
@property (nonatomic) IBOutlet UIButton *buttonText;
2013-07-19 18:19:30 -07:00
@property (nonatomic) IBOutlet UIButton *buttonSend;
@property (nonatomic) UIBarButtonItem *buttonBack;
@property (nonatomic) IBOutlet UIBarButtonItem *buttonAction;
@property (nonatomic) IBOutlet UIView *bottomSize;
@property (nonatomic) IBOutlet NSLayoutConstraint *bottomSizeHeightConstraint;
@property (nonatomic) IBOutlet UIBarButtonItem * spacerBarButton;
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
@property (nonatomic) IBOutlet UIBarButtonItem * spacer3BarButton;
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
@property (nonatomic) IBOutlet UIView *traverseView;
2013-04-26 13:51:03 -07:00
@property (nonatomic) IBOutlet UIView *progressView;
@property (nonatomic) IBOutlet UIView *progressViewContainer;
@property (nonatomic) IBOutlet UIBarButtonItem *fontSettingsButton;
@property (nonatomic) IBOutlet UIBarButtonItem *originalStoryButton;
@property (nonatomic, strong) IBOutlet UIBarButtonItem *subscribeButton;
2015-12-07 16:09:49 -08:00
@property (nonatomic) IBOutlet UIImageView *dragBarImageView;
@property (nonatomic) IBOutlet NSLayoutConstraint *traverseBottomConstraint;
@property (nonatomic) IBOutlet NSLayoutConstraint *scrollBottomConstraint;
2013-03-07 10:55:23 -05:00
@property (readwrite) BOOL traversePinned;
@property (readwrite) BOOL traverseFloating;
2012-11-07 17:54:16 -08:00
@property (readwrite) CGFloat inTouchMove;
@property (assign) BOOL isDraggingScrollview;
@property (assign) BOOL isAnimatedIntoPlace;
@property (assign) BOOL waitingForNextUnreadFromServer;
2012-11-09 14:13:44 -08:00
@property (nonatomic) MBProgressHUD *storyHUD;
@property (nonatomic, strong) NBNotifier *notifier;
@property (nonatomic) NSInteger scrollingToPage;
@property (nonatomic, readonly) BOOL isHorizontal;
- (void)resizeScrollView;
- (void)applyNewIndex:(NSInteger)newIndex pageController:(StoryDetailViewController *)pageController;
2013-03-04 17:15:50 -08:00
- (void)layoutForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
- (void)adjustDragBar:(UIInterfaceOrientation)orientation;
2012-11-07 17:54:16 -08:00
- (void)transitionFromFeedDetail;
- (void)resetPages;
- (void)hidePages;
- (void)refreshPages;
2015-09-22 13:25:18 -07:00
- (void)reorientPages;
- (void)refreshHeaders;
2012-11-08 17:39:32 -08:00
- (void)setStoryFromScroll;
2012-11-26 09:54:20 -08:00
- (void)setStoryFromScroll:(BOOL)force;
- (void)advanceToNextUnread;
- (void)updatePageWithActiveStory:(NSInteger)location;
- (void)animateIntoPlace:(BOOL)animated;
- (void)changePage:(NSInteger)pageIndex;
- (void)changePage:(NSInteger)pageIndex animated:(BOOL)animated;
- (void)setNextPreviousButtons;
- (void)setTextButton;
- (void)setTextButton:(StoryDetailViewController *)storyViewController;
- (void)subscribeToBlurblog;
- (IBAction)toggleFontSize:(id)sender;
2012-11-09 14:13:44 -08:00
- (void)setFontStyle:(NSString *)fontStyle;
- (void)changeFontSize:(NSString *)fontSize;
2014-05-15 18:06:56 -07:00
- (void)changeLineSpacing:(NSString *)lineSpacing;
- (void)changedScrollOrientation;
2015-12-07 16:09:49 -08:00
- (void)drawStories;
2012-11-09 14:13:44 -08:00
- (void)showShareHUD:(NSString *)msg;
- (void)showFetchingTextNotifier;
- (void)hideNotifier;
- (IBAction)showOriginalSubview:(id)sender;
- (void)flashCheckmarkHud:(NSString *)messageType;
- (IBAction)openSendToDialog:(id)sender;
- (IBAction)doNextUnreadStory:(id)sender;
- (IBAction)doPreviousStory:(id)sender;
- (IBAction)tapProgressBar:(id)sender;
- (IBAction)toggleTextView:(id)sender;
2017-03-19 18:15:36 -07:00
- (void)finishMarkAsSaved:(NSDictionary *)params;
- (BOOL)failedMarkAsSaved:(NSDictionary *)params;
- (void)finishMarkAsUnsaved:(NSDictionary *)params;
- (BOOL)failedMarkAsUnsaved:(NSDictionary *)params;
- (BOOL)failedMarkAsUnread:(NSDictionary *)params;
@end