Browse CVS Repository
Contents of /undmail/guiproto/DummyOutlineItem.m
Parent Directory
| Revision Log
| Revision Graph
Revision 1.1 -
( show annotations)
( download)
Mon Nov 11 15:40:37 2002 UTC
(21 years, 5 months ago)
by footashida
Branch point for: MAIN, ventor
Initial revision
| 1 |
#import <Cocoa/Cocoa.h> |
| 2 |
#import "DummyOutlineItem.h" |
| 3 |
|
| 4 |
|
| 5 |
@implementation DummyOutlineItem |
| 6 |
- (id)itemName{ |
| 7 |
return itemName; |
| 8 |
} |
| 9 |
- (id)initWithName:(NSString *)name{ |
| 10 |
childItems = [[NSMutableArray alloc] init]; |
| 11 |
[itemName retain]; |
| 12 |
itemName = name; |
| 13 |
return self; |
| 14 |
} |
| 15 |
- (int)numberOfChildren{ |
| 16 |
int count = [childItems count]; |
| 17 |
if(count == 0){ |
| 18 |
return -1; |
| 19 |
}else{ |
| 20 |
return count; |
| 21 |
} |
| 22 |
} |
| 23 |
- (DummyOutlineItem *)childAtIndex:(int)n;{ |
| 24 |
return [childItems objectAtIndex:n]; |
| 25 |
} |
| 26 |
- (void)addChild:(DummyOutlineItem *)item{ |
| 27 |
[childItems addObject:item]; |
| 28 |
} |
| 29 |
|
| 30 |
@end |
|