home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 093.lha / Chaos / Sources / cinfo.mod < prev    next >
Encoding:
Modula Implementation  |  1986-11-21  |  2.4 KB  |  87 lines

  1. (*
  2.     This module provides information about the program.
  3.         
  4.         Created: 8/10/87 by Richie Bielak
  5.         
  6.     Modified:
  7.  
  8.         Copyright © 1987 by Richie Bielak
  9.         
  10.         This program maybe freely distributed, but please leave
  11.         my name in. Thanks.....Richie
  12.  
  13. *)
  14. (*$L+ *)
  15. IMPLEMENTATION MODULE ChaosInfo;
  16.  
  17. FROM SYSTEM    IMPORT ADR, ADDRESS;
  18. FROM Ports     IMPORT WaitPort, ReplyMsg, GetMsg, MessagePtr;
  19. FROM Intuition IMPORT ScreenPtr, WindowPtr, IDCMPFlags, IDCMPFlagsSet,
  20.                WindowFlags, WindowFlagsSet, GadgetPtr, CloseWindow,
  21.            IntuiMessagePtr;
  22. FROM Text      IMPORT Text;
  23. FROM Drawing   IMPORT SetAPen, Move, RectFill;
  24. FROM SimpleWindows IMPORT CreateWindow;
  25. FROM SimpleGadgets IMPORT BeginGadgetList, EndGadgetList, FreeGadgetList,
  26.                LastGadget, AddGadgetTextButton;
  27. FROM ChaosPages IMPORT DisplayPage1, DisplayPage2, DisplayPage3;
  28.  
  29. VAR
  30.   GListPtr : GadgetPtr;
  31.  
  32. (* ++++++++++++++++++++++++++++++++++++++++ *)
  33. PROCEDURE MakeGadgets () : GadgetPtr;
  34.   BEGIN
  35.     BeginGadgetList ();
  36.     AddGadgetTextButton (230,173, ADR("Continue"));
  37.     RETURN EndGadgetList ();
  38.   END MakeGadgets;
  39.  
  40. (* ++++++++++++++++++++++++++++++++++++++++ *)
  41. PROCEDURE AboutChaos (sp : ScreenPtr);
  42.   VAR
  43.     wp : WindowPtr;
  44.     quit : BOOLEAN;
  45.     msgptr : IntuiMessagePtr;
  46.     class : IDCMPFlagsSet;
  47.     gptr : GadgetPtr;
  48.     page : CARDINAL;
  49.   BEGIN
  50.     page := 1;
  51.     quit := FALSE;
  52.     GListPtr := MakeGadgets ();
  53.     wp := CreateWindow (0, 12, 320, 188,
  54.                     IDCMPFlagsSet {GadgetUp, GadgetDown},
  55.                     WindowFlagsSet {Activate}, GListPtr, sp,
  56.                 ADR ("About Hennon maps..."));
  57.     (* Process messages *)
  58.     LOOP
  59.       CASE page OF
  60.        1: DisplayPage1 (wp); 
  61.           |
  62.        2: SetAPen (wp^.RPort^,0); 
  63.           RectFill (wp^.RPort^, 5, 12, 310, 171); 
  64.           DisplayPage2 (wp);
  65.       |
  66.        3: SetAPen (wp^.RPort^,0); 
  67.           RectFill (wp^.RPort^, 5, 12, 310, 171); 
  68.           DisplayPage3 (wp)
  69.        ELSE
  70.          EXIT
  71.       END;
  72.       INC (page);
  73.       msgptr := WaitPort (wp^.UserPort^);
  74.       LOOP
  75.         msgptr := GetMsg (wp^.UserPort^);
  76.         IF msgptr = NIL THEN EXIT END;
  77.         class := msgptr^.Class; gptr := msgptr^.IAddress;        
  78.         ReplyMsg (MessagePtr (msgptr));
  79.       END; (* LOOP *)
  80.     END; (* LOOP *)
  81.     CloseWindow (wp^);
  82.     FreeGadgetList (GListPtr^);
  83.  END AboutChaos;
  84.  
  85. BEGIN
  86. END ChaosInfo.
  87.