quakeforge/ruamoko/gui/Group.r

45 lines
683 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 dealloc];
[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
}
- (void) moveTo: (integer)x y:(integer)y
{
[self setBasePos: x y:y];
}
- (void) setBasePos: (Point) pos
{
[super setBasePos:pos];
local Point point = [[Point alloc] initWithComponents:xabs :yabs];
[views makeObjectsPerformSelector:@selector (setBasePos:) withObject:point];
[point dealloc];
}
- (void) draw
{
[views makeObjectsPerformSelector:@selector (draw)];
}
@end