1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 09:27:55 +01:00
Telegram/legacy/TelegraphKit/TGToolbarButton.h
2015-10-01 19:19:52 +03:00

50 lines
1.6 KiB
Objective-C

/*
* This is the source code of Telegram for iOS v. 1.1
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Peter Iakovlev, 2013.
*/
#import <UIKit/UIKit.h>
#import "TGNavigationController.h"
typedef enum {
TGToolbarButtonTypeGeneric = 0,
TGToolbarButtonTypeBack = 1,
TGToolbarButtonTypeDone = 2,
TGToolbarButtonTypeDoneBlack = 3,
TGToolbarButtonTypeImage = 4,
TGToolbarButtonTypeDelete = 5,
TGToolbarButtonTypeCustom = 6
} TGToolbarButtonType;
@interface TGToolbarButton : UIButton <TGBarItemSemantics>
@property (nonatomic) TGToolbarButtonType type;
@property (nonatomic) CGSize touchInset;
@property (nonatomic) int minWidth;
@property (nonatomic) float paddingLeft;
@property (nonatomic) float paddingRight;
@property (nonatomic, retain) NSString *text;
@property (nonatomic, retain) UIImage *image;
@property (nonatomic, retain) UIImage *imageLandscape;
@property (nonatomic, retain) UIImage *imageHighlighted;
@property (nonatomic, retain) UILabel *buttonLabelView;
@property (nonatomic, retain) UIImageView *buttonImageView;
@property (nonatomic) bool isLandscape;
@property (nonatomic) int landscapeOffset;
@property (nonatomic) bool backSemantics;
- (id)initWithType:(TGToolbarButtonType)type;
- (id)initWithCustomImages:(UIImage *)imageNormal imageNormalHighlighted:(UIImage *)imageNormalHighlighted imageLandscape:(UIImage *)imageLandscape imageLandscapeHighlighted:(UIImage *)imageLandscapeHighlighted textColor:(UIColor *)textColor shadowColor:(UIColor *)shadowColor;
@end