home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1986-11-21 | 2.4 KB | 87 lines |
- (*
- This module provides information about the program.
-
- Created: 8/10/87 by Richie Bielak
-
- Modified:
-
- Copyright © 1987 by Richie Bielak
-
- This program maybe freely distributed, but please leave
- my name in. Thanks.....Richie
-
- *)
- (*$L+ *)
- IMPLEMENTATION MODULE ChaosInfo;
-
- FROM SYSTEM IMPORT ADR, ADDRESS;
- FROM Ports IMPORT WaitPort, ReplyMsg, GetMsg, MessagePtr;
- FROM Intuition IMPORT ScreenPtr, WindowPtr, IDCMPFlags, IDCMPFlagsSet,
- WindowFlags, WindowFlagsSet, GadgetPtr, CloseWindow,
- IntuiMessagePtr;
- FROM Text IMPORT Text;
- FROM Drawing IMPORT SetAPen, Move, RectFill;
- FROM SimpleWindows IMPORT CreateWindow;
- FROM SimpleGadgets IMPORT BeginGadgetList, EndGadgetList, FreeGadgetList,
- LastGadget, AddGadgetTextButton;
- FROM ChaosPages IMPORT DisplayPage1, DisplayPage2, DisplayPage3;
-
- VAR
- GListPtr : GadgetPtr;
-
- (* ++++++++++++++++++++++++++++++++++++++++ *)
- PROCEDURE MakeGadgets () : GadgetPtr;
- BEGIN
- BeginGadgetList ();
- AddGadgetTextButton (230,173, ADR("Continue"));
- RETURN EndGadgetList ();
- END MakeGadgets;
-
- (* ++++++++++++++++++++++++++++++++++++++++ *)
- PROCEDURE AboutChaos (sp : ScreenPtr);
- VAR
- wp : WindowPtr;
- quit : BOOLEAN;
- msgptr : IntuiMessagePtr;
- class : IDCMPFlagsSet;
- gptr : GadgetPtr;
- page : CARDINAL;
- BEGIN
- page := 1;
- quit := FALSE;
- GListPtr := MakeGadgets ();
- wp := CreateWindow (0, 12, 320, 188,
- IDCMPFlagsSet {GadgetUp, GadgetDown},
- WindowFlagsSet {Activate}, GListPtr, sp,
- ADR ("About Hennon maps..."));
- (* Process messages *)
- LOOP
- CASE page OF
- 1: DisplayPage1 (wp);
- |
- 2: SetAPen (wp^.RPort^,0);
- RectFill (wp^.RPort^, 5, 12, 310, 171);
- DisplayPage2 (wp);
- |
- 3: SetAPen (wp^.RPort^,0);
- RectFill (wp^.RPort^, 5, 12, 310, 171);
- DisplayPage3 (wp)
- ELSE
- EXIT
- END;
- INC (page);
- msgptr := WaitPort (wp^.UserPort^);
- LOOP
- msgptr := GetMsg (wp^.UserPort^);
- IF msgptr = NIL THEN EXIT END;
- class := msgptr^.Class; gptr := msgptr^.IAddress;
- ReplyMsg (MessagePtr (msgptr));
- END; (* LOOP *)
- END; (* LOOP *)
- CloseWindow (wp^);
- FreeGadgetList (GListPtr^);
- END AboutChaos;
-
- BEGIN
- END ChaosInfo.
-