quakeforge/ruamoko/gui/Group.r

60 lines
998 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
{
[views addItem: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;
}
2004-02-04 02:35:57 +00:00
- (void) moveTo: (integer)x y:(integer)y
{
[self setBasePos: x y:y];
}
- (void) setBasePos: (integer) x y: (integer) 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