home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ncsa.uiuc.edu
/
ftp.ncsa.uiuc.edu.zip
/
ftp.ncsa.uiuc.edu
/
Contour
/
globals.p
< prev
next >
Wrap
Text File
|
2017-03-03
|
4KB
|
158 lines
{$U-}
{$R-}
unit Globals(10);
interface
uses
MemTypes, Quickdraw, OSIntf, ToolIntf,MacPrint,FixMath,Graf3D;
const
{menu stuff}
AppleMenuID = 256;
FileMenuID = 257;
EditMenuID = 258;
PlotMenuID = 1000;
GoodiesMenuID = 2000;
{alert box id number.}
dimenID = 1033;
okItem = 1;
hditem = 2;
vditem = 3;
MagItem = 6;
levelItem = 9;
xaxisitem = 12;
yaxisitem = 13;
minItem = 16;
maxItem = 18;
cancelItem = 19;
maxLevels = 40;
IEalertID = 29410;
ZBalertID = 5147;
{window IDs}
WindResID = 256;
{Zoom in/out cursor ID}
ZorroID = 4120;
{Unique contours ID}
resID = 161;
ScrollBarWidth = 16;
HSBarID = 256; { Scroll Bar resources }
VSBarID = 257;
minDataX = 0; {minimum x and y indices for data matrix}
minDataY = 0;
maxRows = 30; {number of rows processed in one disk read}
maxWidth = 1024;
{during contour plot}
numPatterns = 10; {number of shade intensities}
MaxWindows = 5;
type
DataType = array[1..25,1..25] of integer;
ArrayPtr = ^list;
list = packed array[0..0] of char;
boolPtr = ^boolList;
boolList = array[0..0] of boolean;
dimenHandle = ^dimenPtr;
dimenPtr = ^dimensions;
dimensions = record
maxX,maxY : integer;
gridSize : longint;
NoOfLevels,
xOrigin,yOrigin,
minData,maxData : integer;
end;
var
{Menu stuff}
FileMenu,EditMenu,
PlotMenu, GoodiesMenu : MenuHandle;
ClockCursor : CursHandle; {handle to the waiting watch cursor}
PatList : array[1..numPatterns] of Pattern; { selected standard patterns }
Finished : Boolean; {used to terminate the program}
{Screen stuff}
DragArea : Rect; {holds the area where window can be dragged in}
GrowArea : Rect; {holds the area to which a windows size can change}
currentGridSize : longint;
gridSize : array[1..MaxWindows] of longint; { number of pixels per grid region }
Screen : rect;
{window stuff}
bounds : rect;
contourWindow : array[1..maxWindows] of WindowPtr;
ThreeDWindow : array[1..maxWindows] of WindowPtr;
HorizontalScrollBar,VerticalScrollBar : array[1..maxWindows] of ControlHandle;
plotRect : array[1..maxWindows] of Rect; { area in which to plot}
{events}
theEvent : EventRecord;
{cursors}
Cross : CursHandle;
Watch : CursHandle;
Zorro : CursHandle;
{3D stuff}
my3DPort: array [1..maxWindows] of Port3D;
xTops,yTops,
xDegrees,yDegrees,zDegrees : array[1..maxWindows] of integer;
TDHBar, TDVBar : array[1..maxWindows] of ControlHandle;
toggle : array[1..maxWindows] of boolean;
myRect : array[1..maxWindows] of rect;
data3D : DataType;
xLow,xHigh,yLow,yHigh,
xStep,yStep : integer;
secondTime : array[1..maxWindows] of boolean;
newGridSize : longint;
zooming,zoomed,selection : array[1..maxWindows] of boolean;
marqueeState : array[1..maxWindows] of PenState;
marqueeRect : array[1..maxWindows] of rect;
maxX,maxY,
NoOflevels,
xOrigin,yOrigin,
minData,maxData : array[1..maxWindows] of integer;
data : array[0..maxRows] of ArrayPtr;
upHill : boolPtr;
ContourLevel : array[1..maxWindows] of array[1..maxLevels] of integer;
clipRgn : RgnHandle;
shadeSurface : array[1..maxWindows] of boolean;
gridOn : array[1..maxWindows] of boolean;
toggleAxis : array[1..maxWindows] of boolean;
{file Stuff}
theFile : array[1..maxWindows] of integer;
resultCode : OSErr;
count : longint;
{printer stuff}
prRecHdl : THPrint;
myPrPort : TPPrPort;
PrStRec : TPrStatus;
defaultPage : rect;
newFile : array[1..maxWindows] of boolean;
dimen : array[1..maxWindows] of dimenHandle;
resName : array[1..maxWindows] of string[63];
oldWindowIndex,
windowIndex : 0..maxWindows;
NoOfWindows : integer;
implementation
end.