2 Copyright (C) 2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21 // $Id: UIxMailTree.m 278 2004-08-26 23:29:09Z helge $
23 #include <SOGoUI/UIxComponent.h>
25 @interface UIxMailTree : UIxComponent
31 #include <SOGo/SoObjects/Mailer/SOGoMailBaseObject.h>
33 #include <NGObjWeb/SoComponent.h>
35 @implementation UIxMailTree
44 - (void)setItem:(id)_item {
45 ASSIGN(self->item, _item);
53 - (NSArray *)rootNodes {
54 return [NSArray arrayWithObject:[[self clientObject] treeNavigationNodes]];
57 - (NSArray *)itemChildNodes {
58 NSMutableArray *folders;
62 names = [[self item] toManyRelationshipKeys];
63 count = [names count];
64 folders = [NSMutableArray arrayWithCapacity:count];
66 for (i = 0; i < count; i++) {
69 folder = [[self item] lookupName:[names objectAtIndex:i]
70 inContext:[self context]
73 [folders addObject:folder];
79 - (BOOL)isItemExpanded {
86 [self->item release]; self->item = nil;
90 @end /* UIxMailTree */