Files
gitx/PBCollapsibleSplitView.m
T
Johannes Gilger d669050551 Add PBCollapsibleSplitView as subclass of PBNiceSplitView
This adds a subclass to PBNiceSplitView which has collapsible subviews
as well as an uncollapse-method. The initWithTopMin method is used to
set the minimum sizes for the subviews.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-07-07 18:46:00 +01:00

29 lines
603 B
Objective-C

//
// PBCollapsibleSplitView.m
// GitX
//
// Created by Johannes Gilger on 6/21/09.
// Copyright 2009 Johannes Gilger. All rights reserved.
//
#import "PBCollapsibleSplitView.h"
@implementation PBCollapsibleSplitView
@synthesize topViewMin, bottomViewMin;
- (void)setTopMin:(CGFloat)topMin andBottomMin:(CGFloat)bottomMin {
topViewMin = topMin;
bottomViewMin = bottomMin;
}
- (void)uncollapse {
for (NSView *subview in [self subviews]) {
if([self isSubviewCollapsed:subview]) {
[self setPosition:[self frame].size.height / 3 ofDividerAtIndex:0];
[self adjustSubviews];
}
}
}
@end