public
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/Caged/gitnub.git
Search Repo:
Click here to lend your support to: gitnub and make a donation at www.pledgie.com !
Caged (author)
Sun Mar 09 15:56:26 -0700 2008
commit  f1b4f8a91cc88d458532f474216b6abd918ffdcc
tree    1b5029bb86b17c4782623fc8230f029f7a4f5b4f
parent  1c4f4c7957479efa580891f9bdd9a5f3bb004925
gitnub / ImageTextCell.h
100644 42 lines (31 sloc) 1.329 kb
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
//
// ImageTextCell.h
// SofaControl
//
// Created by Martin Kahr on 10.10.06.
// Copyright 2006 CASE Apps. All rights reserved.
//
 
#import <Cocoa/Cocoa.h>
 
 
@interface ImageTextCell : NSTextFieldCell {
  NSObject* delegate;
  NSString* iconKeyPath;
  NSString* primaryTextKeyPath;
  NSString* secondaryTextKeyPath;
}
 
- (void) setDataDelegate: (NSObject*) aDelegate;
 
- (void) setIconKeyPath: (NSString*) path;
- (void) setPrimaryTextKeyPath: (NSString*) path;
- (void) setSecondaryTextKeyPath: (NSString*) path;
 
@end
 
@interface NSObject(ImageTextCellDelegate)
 
- (NSImage*) iconForCell: (ImageTextCell*) cell data: (NSObject*) data;
- (NSString*) primaryTextForCell: (ImageTextCell*) cell data: (NSObject*) data;
- (NSString*) secondaryTextForCell: (ImageTextCell*) cell data: (NSObject*) data;
 
// optional: give the delegate a chance to set a different data object
// This is especially useful for those cases where you do not want that NSCell creates copies of your data objects (e.g. Core Data objects).
// In this case you bind a value to the NSTableColumn that enables you to retrieve the correct data object. You retrieve the objects
// in the method dataElementForCell
- (NSObject*) dataElementForCell: (ImageTextCell*) cell;
 
// optional
- (BOOL) disabledForCell: (ImageTextCell*) cell data: (NSObject*) data;
 
@end