Files
gitx/PBSourceViewItem.h
T
Pieter de Bie 692a79c3ad Sidebar: Add "Commit" action
When this tree leaf is selected, the view switches
to the commit view.
2009-09-10 02:39:51 +02:00

44 lines
1.1 KiB
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;
PBSourceViewItem *parent;
BOOL isGroupItem;
BOOL isUncollapsible;
}
+ (id)groupItemWithTitle:(NSString *)title;
+ (id)itemWithRevSpec:(PBGitRevSpecifier *)revSpecifier;
+ (id)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;
- (PBSourceViewItem *)findRev:(PBGitRevSpecifier *)rev;
- (NSImage *)icon;
@property(retain) NSString *title;
@property(readonly) NSMutableArray *children;
@property(assign) BOOL isGroupItem, isUncollapsible;
@property(retain) PBGitRevSpecifier *revSpecifier;
@property(retain) PBSourceViewItem *parent;
@end