home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncsa.uiuc.edu / ftp.ncsa.uiuc.edu.zip / ftp.ncsa.uiuc.edu / Contour / init.p < prev    next >
Text File  |  2017-03-03  |  2KB  |  74 lines

  1. {$U-}
  2. {$R-}
  3. unit Init(50);
  4.  
  5. interface
  6. uses
  7.     MemTypes, Quickdraw, OSIntf, ToolIntf,MacPrint,PackIntf,FixMath,Graf3D,
  8.        Globals, Utilities,Routines,ThreeD,interf;
  9.     
  10.  
  11.  
  12. procedure SetUpCursors;
  13. procedure SetUpContour;
  14. procedure SetupContourMenus;
  15.  
  16. implementation
  17.  
  18. procedure SetUpCursors;
  19. begin
  20.     Watch := GetCursor(WatchCursor);
  21.     Zorro := GetCursor(ZorroID);
  22.  
  23.     InitCursor;
  24. end;
  25.  
  26.  
  27. procedure SetUpContour;
  28. var
  29.     i : integer;
  30. begin
  31.  
  32.   
  33. { Initialize the patterns from the system resource file }
  34.  
  35.     getIndPattern(patList[1], SysPatListID, 20);        { white }
  36.     getIndPattern(patList[2], SysPatListID, 13);
  37.     getIndPattern(patList[3], SysPatListID, 21);
  38.     getIndPattern(patList[4], SysPatListID, 22);
  39.     getIndPattern(patList[5], SysPatListID, 23);
  40.     getIndPattern(patList[6], SysPatListID, 4);
  41.     getIndPattern(patList[7], SysPatListID, 3);
  42.     getIndPattern(patList[8], SysPatListID, 2);
  43.     StuffHex(@patList[9], '7FFFFFFFFFFFFFFF');
  44.     getIndPattern(patList[10], SysPatListID, 1);        { black }
  45.  
  46.     for i := 1 to maxWindows do begin
  47.         secondTime[i] := false;
  48.         shadeSurface[i] := false;
  49.         gridOn[i] := false;
  50.         selection[i] := false;
  51.     end;
  52.  end;
  53.  
  54.  
  55. procedure SetupContourMenus;
  56. begin
  57.     EnableItem(FileMenu,2);
  58.     EnableItem(FileMenu,3);
  59.     EnableItem(FileMenu,4);
  60.     PlotMenu := GetMenu(PlotMenuID);
  61.     InsertMenu(PlotMenu, 0);
  62.  
  63.     GoodiesMenu := GetMenu(GoodiesMenuID);
  64.     InsertMenu(GoodiesMenu, 0);
  65.     CheckItem(PlotMenu,1,true);
  66.     DisableItem(GoodiesMenu,1);
  67.     DisableItem(GoodiesMenu,2);
  68.     DisableItem(PlotMenu,3);
  69.  
  70.     DrawMenuBar;
  71. end;
  72.  
  73. end.
  74.