Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (54 sloc) 1.72 KB
//
// ECSideBar.h
//
//
// Created by erndev
// BSD license.
//
#import <Cocoa/Cocoa.h>
@class EDSideBar;
#if __has_feature(objc_arc)
#define EDSideBarRetain nonatomic, strong
#define EDSideBarAssign nonatomic, unsafe_unretained
#else
#define EDSideBarRetain nonatomic, retain
#define EDSideBarAssign nonatomic, assign
#endif
@protocol EDSideBarDelegate <NSObject>
@required
- (void)sideBar:(EDSideBar*)tabBar didSelectButton:(NSInteger)index;
@end
enum {
ECSideBarLayoutTop = 0,
ECSideBarLayoutCenter = 1,
ECSideBarLayoutBottom = 2,
};
typedef NSUInteger ECSideBarLayoutMode;
@interface EDSideBar : NSView {
ECSideBarLayoutMode layoutMode;
NSColor *_backgroundColor;
CGFloat buttonsHeight;
id<EDSideBarDelegate> sidebarDelegate;
NSMatrix *_matrix;
Class cellClass;
NSImageView *selectorImageView;
BOOL animateSelection;
NSTimeInterval animationDuration;
}
-(void)setLayoutMode:(ECSideBarLayoutMode)layout;
-(void)addButtonWithTitle:(NSString*)title;
-(void)addButtonWithTitle:(NSString*)title image:(NSImage*)image;
-(void)addButtonWithTitle:(NSString*)title image:(NSImage*)image alternateImage:(NSImage*)alternateImage;
-(void)selectButtonAtRow:(NSUInteger)row;
-(void)drawBackground:(NSRect)rect;
-(void)setSelectionImage:(NSImage*)image;
-(id)cellForItem:(NSInteger)index;
@property (EDSideBarRetain) NSColor *backgroundColor;
@property (EDSideBarRetain) id<EDSideBarDelegate>sidebarDelegate;
@property (EDSideBarAssign,setter=setCellClass:) Class cellClass;
@property (nonatomic, setter=setLayoutMode:) ECSideBarLayoutMode layoutMode;
@property (nonatomic, setter=setButtonsHeight:) CGFloat buttonsHeight;
@property BOOL animateSelection;
@property NSTimeInterval animationDuration;
@property CGFloat noiseAlpha;
@end
Something went wrong with that request. Please try again.