quakeforge/ruamoko/gui/Group.r

60 lines
992 B
R
Raw Normal View History

2004-02-04 02:35:57 +00:00
#include "gui/Group.h"
#include "gui/Point.h"
#include "Array.h"
@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) moveTo: (int)x y:(int)y
2004-02-04 02:35:57 +00:00
{
[self setBasePos: x y:y];
}
- (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