[Oberon] FPGA - DIY Dialogs
Tomas Kral
thomas.kral at email.cz
Wed Dec 26 13:17:13 CET 2018
On Sat, 15 Dec 2018 11:45:10 +0100
Jörg <joerg.straube at iaeth.ch> wrote:
> chapter 3 and 4
Recoded to this, I borrow from `GraphicFrames.Mod', that learn a lot
from, I wish to use dY, currently have my `voff-Y' calculations.
PROCEDURE Handle*(F: Display.Frame; VAR M: Display.FrameMsg);
VAR x, y, h: INTEGER; o: DLogs.Object;
BEGIN
CASE F OF Frame:
CASE M OF
Oberon.InputMsg:
IF M.id = Oberon.track THEN
IF M.keys # {} THEN FlipHook(F, M);
IF ~ F.focus THEN Oberon.PassFocus(Viewers.This(F.X, F.Y)); F.focus := TRUE END ;
o := DLogs.This(M.X, F.H-M.Y+F.Y); IF o # NIL THEN Out.String("found"); Out.Ln END
ELSE Oberon.DrawMouse(Crosshair, M.X, M.Y) END
ELSIF M.id = Oberon.consume THEN Out.String("consume msg: "); Out.Char(M.ch); Out.Ln
END
| UpdateMsg: Out.String("update msg"); Out.Ln
| Oberon.ControlMsg:
IF M.id = Oberon.neutralize THEN Oberon.RemoveMarks(F.X, F.Y, F.W, F.H);
Out.String("neutralize msg"); Out.Ln
ELSIF M.id = Oberon.defocus THEN Out.String("defocus msg"); Out.Ln;
F.focus := FALSE; HideHook(F)
END
| Oberon.SelectionMsg: Out.String("select msg"); Out.Ln
| Oberon.CopyMsg: Oberon.RemoveMarks(F.X, F.Y, F.W, F.H);
| MenuViewers.ModifyMsg: HideHook(F);
Display.ReplConst(Display.black, F.X, M.Y, F.W, M.H, Display.replace); (*clear frame*)
Display.ReplPattern(7, Display1.grey0, F.X, M.Y, F.W, M.H, Display.invert); (*filler*)
Out.String("modify msg"); Out.Int(M.id, 3); Out.Ln; DLogs.Update(M.Y+M.H)
END
END
END Handle;
I currently have only one dynamic call o.Draw(), I may need o.Handle()
in addition. I do not use UpdateMsg, I plan to use when only one object
needs updating (delete/move/change/...etc).
Is it possible to have one frame for multiple dialogs, see picture?
--
Tomas Kral <thomas.kral at email.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgb.png
Type: image/png
Size: 35619 bytes
Desc: not available
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20181226/289c7873/attachment-0003.png>
More information about the Oberon
mailing list