Fix setBasePos to get the pos from a view.

This fixes Group for the Point/Size/Rect change.
This commit is contained in:
Bill Currie 2010-11-17 18:59:39 +09:00
parent 67beaf4487
commit c460e3c979
3 changed files with 12 additions and 4 deletions

View File

@ -41,7 +41,8 @@
{
[super setBasePos:pos];
local Point point = {xabs, yabs};
[views makeObjectsPerformSelector:@selector (setBasePos:) withObject:point];
local SEL sel = @selector (setBasePosFromView:);
[views makeObjectsPerformSelector:sel withObject:self];
}
- (void) draw

View File

@ -38,14 +38,21 @@
return flags & 1;
}
- (Point) basePos
{
return makePoint (xabs, yabs);
}
- (void) setBasePos: (integer) x y: (integer) y
{
local Point point = {x, y};
[self setBasePos:point];
xabs = xpos + x;
yabs = ypos + y;
}
- (void) setBasePos: (Point)pos
- (void) setBasePosFromView: (View) view
{
Point pos = [view basePos];
xabs = xpos + pos.x;
yabs = ypos + pos.y;
}

View File

@ -20,7 +20,7 @@
- (id) canFocus: (integer)cf;
- (integer) canFocus;
- (void) setBasePos: (integer)x y: (integer)y;
- (void) setBasePos: (Point)pos;
- (void) setBasePosFromView: (View)view;
- (void) draw;
- (integer) keyEvent:(integer)key unicode:(integer)unicode down:(integer)down;