[Oberon] FPGA - DIY Dialogs

Tomas Kral thomas.kral at email.cz
Wed Jan 23 20:37:42 CET 2019

On Mon, 21 Jan 2019 19:55:34 +0100
Tomas Kral <thomas.kral at email.cz> wrote:

> I realise I need a context switch to move from one to the other
> dialog.

I can now move dialogs, overlapping ones as well. I have introduced
`frame' field to object type, that does object binding to a particular
So far avoiding another list of frame pointers.

Moving now, does not seem complicated.

  PROCEDURE Move*(o: Object; dx, dy: INTEGER);
    VAR f: Object;
  BEGIN f := o.frame;
    WHILE (o # NIL) & (o.frame = f) DO INC(o.x, dx); INC(o.y, dy); o :=
    o.next END
  END Move;

Bring to top takes slightly more coding, also need a global `top'

  PROCEDURE BringToTop*(o: Object);
    VAR f, p: Object;
    IF o # top THEN Top(o); f := o.frame; p := o; cnt := o.id-1;
      WHILE (o # NIL) & (o.frame = f) DO p := p.next; Unlink(o);
Insert(o); o := p END
  END BringToTop;

With additional list, the above would take only swapping two node
pointers in a list, but all other procedures, would need double list
traversal. Not sure what is better.

The graphics is not completely flicker-free, but on the other hand, does
not need offscreen bitmaps.

I could try evaluate rectangle intersections in a list, and redraw only
overlapping frames, the others would just need display copy block, or
leave in position as is.

Not sure just testing.

Tomas Kral <thomas.kral at email.cz>

More information about the Oberon mailing list