Moved MacVim project to src/MacVim and removed runtime folder
[MacVim/jjgod.git] / src / MacVim / PSMTabBarControl / source / PSMTabStyle.h
blobeedf7b7712834fdb10a7e8d76e083308f99a0da3
1 //
2 // PSMTabStyle.h
3 // PSMTabBarControl
4 //
5 // Created by John Pannell on 2/17/06.
6 // Copyright 2006 Positive Spin Media. All rights reserved.
7 //
9 /*
10 Protocol to be observed by all style delegate objects. These objects handle the drawing responsibilities for PSMTabBarCell; once the control has been assigned a style, the background and cells draw consistent with that style. Design pattern and implementation by David Smith, Seth Willits, and Chris Forsythe, all touch up and errors by John P. :-)
13 #import "PSMTabBarCell.h"
14 #import "PSMTabBarControl.h"
16 @protocol PSMTabStyle <NSObject>
18 // identity
19 - (NSString *)name;
21 // control specific parameters
22 - (float)leftMarginForTabBarControl;
23 - (float)rightMarginForTabBarControl;
25 // add tab button
26 - (NSImage *)addTabButtonImage;
27 - (NSImage *)addTabButtonPressedImage;
28 - (NSImage *)addTabButtonRolloverImage;
30 // cell specific parameters
31 - (NSRect)closeButtonRectForTabCell:(PSMTabBarCell *)cell;
32 - (NSRect)iconRectForTabCell:(PSMTabBarCell *)cell;
33 - (NSRect)indicatorRectForTabCell:(PSMTabBarCell *)cell;
34 - (NSRect)objectCounterRectForTabCell:(PSMTabBarCell *)cell;
35 - (float)minimumWidthOfTabCell:(PSMTabBarCell *)cell;
36 - (float)desiredWidthOfTabCell:(PSMTabBarCell *)cell;
38 // cell values
39 - (NSAttributedString *)attributedObjectCountValueForTabCell:(PSMTabBarCell *)cell;
40 - (NSAttributedString *)attributedStringValueForTabCell:(PSMTabBarCell *)cell;
42 // drawing
43 - (void)drawTabCell:(PSMTabBarCell *)cell;
44 - (void)drawTabBar:(PSMTabBarControl *)bar inRect:(NSRect)rect;
46 @end
48 @interface PSMTabBarControl (StyleAccessors)
50 - (NSMutableArray *)cells;
52 @end