Files
gitx/PBSourceViewItem.h
T
Pieter de Bie bff93631d5 SideBar: Add branches as children
This makes a nice tree, which should be more
readable than the existing list. The local
branches are expanded by default.
2009-09-10 02:31:08 +02:00

39 lines
1002 B
Objective-C

//
// PBSourceViewItem.h
// GitX
//
// Created by Pieter de Bie on 9/8/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class PBGitRevSpecifier;
@interface PBSourceViewItem : NSObject {
NSMutableArray *children;
NSString *title;
PBGitRevSpecifier *revSpecifier;
BOOL isGroupItem;
}
+ (PBSourceViewItem *)groupItemWithTitle:(NSString *)title;
+ (PBSourceViewItem *)itemWithRevSpec:(PBGitRevSpecifier *)revSpecifier;
+ (PBSourceViewItem *)itemWithTitle:(NSString *)title;
- (void)addChild:(PBSourceViewItem *)child;
// This adds the ref to the path, which should match the item's title,
// so "refs/heads/pu/pb/sidebar" would have the path [@"pu", @"pb", @"sidebare"]
// to the 'local' branch thing
- (void)addRev:(PBGitRevSpecifier *)revSpecifier toPath:(NSArray *)path;
@property(retain) NSString *title;
@property(readonly) NSMutableArray *children;
@property(assign) BOOL isGroupItem;
@property(retain) PBGitRevSpecifier *revSpecifier;
@end