forked from glebd/bwtoolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBWAnchoredButtonBarIntegration.m
64 lines (47 loc) · 1.19 KB
/
BWAnchoredButtonBarIntegration.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// BWAnchoredButtonBarViewIntegration.m
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//
#import <InterfaceBuilderKit/InterfaceBuilderKit.h>
#import "BWAnchoredButtonBar.h"
#import "BWAnchoredButtonBarInspector.h"
@implementation BWAnchoredButtonBar ( BWAnchoredButtonBarIntegration )
- (void)ibPopulateKeyPaths:(NSMutableDictionary *)keyPaths {
[super ibPopulateKeyPaths:keyPaths];
[[keyPaths objectForKey:IBAttributeKeyPaths] addObjectsFromArray:[NSArray arrayWithObjects:@"selectedIndex", nil]];
}
- (void)ibPopulateAttributeInspectorClasses:(NSMutableArray *)classes {
[super ibPopulateAttributeInspectorClasses:classes];
[classes addObject:[BWAnchoredButtonBarInspector class]];
}
- (NSArray *)ibDefaultChildren
{
return [self subviews];
}
- (NSView *)ibDesignableContentView
{
return self;
}
- (NSSize)ibMinimumSize
{
NSSize minSize = NSZeroSize;
if (isAtBottom)
minSize.height = 23;
else
minSize.height = 24;
return minSize;
}
- (NSSize)ibMaximumSize
{
NSSize maxSize;
maxSize.width = 100000;
if (isAtBottom)
maxSize.height = 23;
else
maxSize.height = 24;
return maxSize;
}
@end