1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 02:17:51 +01:00
Telegram/Telegraph/TGPhotoToolbarView.h

46 lines
1.7 KiB
C
Raw Normal View History

2015-10-01 18:19:52 +02:00
#import <UIKit/UIKit.h>
typedef enum
{
2016-02-25 01:03:51 +01:00
TGPhotoEditorNoneTab = 0,
2015-10-01 18:19:52 +02:00
TGPhotoEditorCropTab = 1 << 0,
TGPhotoEditorToolsTab = 1 << 1,
TGPhotoEditorCaptionTab = 1 << 2,
TGPhotoEditorRotateTab = 1 << 3
} TGPhotoEditorTab;
@interface TGPhotoToolbarView : UIView
@property (nonatomic, assign) UIInterfaceOrientation interfaceOrientation;
@property (nonatomic, copy) void(^cancelPressed)(void);
@property (nonatomic, copy) void(^donePressed)(void);
2016-02-25 01:03:51 +01:00
@property (nonatomic, copy) void(^doneLongPressed)(id sender);
2015-10-01 18:19:52 +02:00
@property (nonatomic, copy) void(^tabPressed)(TGPhotoEditorTab tab);
@property (nonatomic, readonly) CGRect cancelButtonFrame;
2016-02-25 01:03:51 +01:00
- (instancetype)initWithBackButtonTitle:(NSString *)backButtonTitle doneButtonTitle:(NSString *)doneButtonTitle accentedDone:(bool)accentedDone solidBackground:(bool)solidBackground;
2015-10-01 18:19:52 +02:00
- (void)transitionInAnimated:(bool)animated;
- (void)transitionInAnimated:(bool)animated transparent:(bool)transparent;
- (void)transitionOutAnimated:(bool)animated;
- (void)transitionOutAnimated:(bool)animated transparent:(bool)transparent hideOnCompletion:(bool)hideOnCompletion;
- (void)setDoneButtonEnabled:(bool)enabled animated:(bool)animated;
- (void)setEditButtonsEnabled:(bool)enabled animated:(bool)animated;
- (void)setEditButtonsHidden:(bool)hidden animated:(bool)animated;
2016-02-25 01:03:51 +01:00
- (void)setEditButtonsHighlighted:(TGPhotoEditorTab)buttons;
2015-10-01 18:19:52 +02:00
2016-02-25 01:03:51 +01:00
@property (nonatomic, readonly) TGPhotoEditorTab currentTabs;
- (void)setToolbarTabs:(TGPhotoEditorTab)tabs animated:(bool)animated;
2015-10-01 18:19:52 +02:00
- (void)setActiveTab:(TGPhotoEditorTab)tab;
- (void)calculateLandscapeSizeForPossibleButtonTitles:(NSArray *)possibleButtonTitles;
- (CGFloat)landscapeSize;
@end