5 // Created by John Pannell on 2/17/06.
6 // Copyright 2006 Positive Spin Media. All rights reserved.
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
>
21 // control specific parameters
22 - (float)leftMarginForTabBarControl
;
23 - (float)rightMarginForTabBarControl
;
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
;
39 - (NSAttributedString
*)attributedObjectCountValueForTabCell
:(PSMTabBarCell
*)cell
;
40 - (NSAttributedString
*)attributedStringValueForTabCell
:(PSMTabBarCell
*)cell
;
43 - (void)drawTabCell
:(PSMTabBarCell
*)cell
;
44 - (void)drawTabBar
:(PSMTabBarControl
*)bar inRect
:(NSRect
)rect
;
48 @interface
PSMTabBarControl (StyleAccessors
)
50 - (NSMutableArray
*)cells
;