quakeforge/ruamoko/gui/Group.r

55 lines
927 B
R
Raw Normal View History

#include <gui/Group.h>
#include <gui/Point.h>
#include <Array.h>
2004-02-04 02:35:57 +00:00
@implementation Group
- (id) init
2004-02-04 02:35:57 +00:00
{
self = [super init];
2004-02-04 02:35:57 +00:00
views = [[Array alloc] init];
return self;
}
- (void) dealloc
{
[views release];
[super dealloc];
2004-02-04 02:35:57 +00:00
}
- (View *) addView: (View *)aView
2004-02-04 02:35:57 +00:00
{
2010-12-12 10:40:24 +00:00
[views addObject:aView];
return aView;
2004-02-04 02:35:57 +00:00
}
- (id) addViews: (Array *)viewlist
{
while ([viewlist count]) {
2010-12-12 01:27:51 +00:00
[self addView: [viewlist objectAtIndex: 0]];
[viewlist removeObjectAtIndex: 0];
}
return self;
}
- (void) setBasePos: (int) x y: (int) y
2004-02-04 02:35:57 +00:00
{
[super setBasePos: x y:y];
local SEL sel = @selector (setBasePosFromView:);
[views makeObjectsPerformSelector:sel withObject:self];
}
- (void) setBasePosFromView: (View *) view
{
[super setBasePosFromView:view];
local SEL sel = @selector (setBasePosFromView:);
[views makeObjectsPerformSelector:sel withObject:self];
2004-02-04 02:35:57 +00:00
}
- (void) draw
{
[views makeObjectsPerformSelector:@selector (draw)];
}
@end