[qwaq] Allow views to be moved/resized without redraw

The move is to a specified point and resize to a specified size rather
than a delta.
This commit is contained in:
Bill Currie 2020-03-31 10:54:15 +09:00
parent 17da19b979
commit 34706906f5
2 changed files with 14 additions and 0 deletions

View file

@ -67,6 +67,8 @@ enum {
-move: (Point) delta;
-resize: (Extent) delta;
-move:(Point)dpos andResize:(Extent)dsize;
-moveTo:(Point)pos; // does not redraw
-resizeTo:(Extent)size; // does not redraw
-grow: (Extent) delta;
-(ListenerGroup *)onEvent;
-handleEvent: (qwaq_event_t *) event;

View file

@ -277,6 +277,18 @@ updateScreenCursor (View *view)
return self;
}
-moveTo:(Point)pos
{
self.pos = pos;
return self;
}
-resizeTo:(Extent)size
{
self.size = size;
return self;
}
-grow: (Extent) delta
{
Point dpos = {};