Browse CVS Repository
Annotation of /undmail/proto/DummyOutlineItem.m
Parent Directory
| Revision Log
| Revision Graph
Revision 1.1.1.1 -
( hide annotations)
( download)
(vendor branch)
Sat Nov 2 05:49:41 2002 UTC
(21 years, 5 months ago)
by footashida
Branch: MAIN, vendor
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
undmail no proto type.
| 1 |
footashida |
1.1 |
#import <Cocoa/Cocoa.h> |
| 2 |
|
|
#import "DummyOutlineItem.h" |
| 3 |
|
|
|
| 4 |
|
|
|
| 5 |
|
|
@implementation DummyOutlineItem |
| 6 |
|
|
+(DummyOutlineItem *)rootItem{ |
| 7 |
|
|
return [[DummyOutlineItem alloc] initWithName:@"/"]; |
| 8 |
|
|
} |
| 9 |
|
|
- (id)itemName{ |
| 10 |
|
|
return itemName; |
| 11 |
|
|
} |
| 12 |
|
|
|
| 13 |
|
|
- (id)initWithName:(NSString *)name{ |
| 14 |
|
|
[itemName retain]; |
| 15 |
|
|
itemName = name; |
| 16 |
|
|
return self; |
| 17 |
|
|
} |
| 18 |
|
|
- (int)numberOfChildren{ |
| 19 |
|
|
if([itemName isEqualToString:@"/"]){ |
| 20 |
|
|
return 4; // inbox, outbox, sent, trash |
| 21 |
|
|
}else{ |
| 22 |
|
|
return -1; |
| 23 |
|
|
} |
| 24 |
|
|
} |
| 25 |
|
|
- (DummyOutlineItem *)childAtIndex:(int)n;{ |
| 26 |
|
|
|
| 27 |
|
|
NSString *name; |
| 28 |
|
|
switch(n) |
| 29 |
|
|
{ |
| 30 |
|
|
case 0: name = @"inbox"; break; |
| 31 |
|
|
case 1: name = @"outbox"; break; |
| 32 |
|
|
case 2: name = @"sent"; break; |
| 33 |
|
|
case 3: name = @"trash"; break; |
| 34 |
|
|
default: name = @"????"; |
| 35 |
|
|
} |
| 36 |
|
|
return [[DummyOutlineItem alloc] initWithName:name]; |
| 37 |
|
|
|
| 38 |
|
|
} |
| 39 |
|
|
|
| 40 |
|
|
@end |
|