Unit Miscellaneous

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

v1.1 Sept 1993
Changed Message procs to use Alerts
Removed PictMessage (never called), change Message calls to DisplayError
Added positioning to alerts and dialogs
Alert now uses STR# for closing, quitting, etc
Added several functions, for EOF and checking system (see below)
Validated the rect after RestoreOffscreen to prevent drawing twice

Uses

Overview

Functions and Procedures

FUNCTION FossilsExist: Boolean;
PROCEDURE DireMessage (string1ID, string2ID: Integer; VAR Verdict: Integer; YesNo: Boolean);
PROCEDURE MemoryMessage (ID: Integer; InMessage: Str255; VAR Verdict: Integer);
PROCEDURE SimpleMessage (ID: Integer; VAR Verdict: Integer);
PROCEDURE HelpMessage (StrID: Integer);
PROCEDURE SyringeMessage;
PROCEDURE Pause (Message: Str255);
PROCEDURE SetItemState (Mndx, Indx: Integer; Flag: Boolean);
FUNCTION RandInt (Max: Integer): Integer;
FUNCTION Odd (i: Integer): Boolean;
FUNCTION RandSwell (Indgene: Swelltype): SwellType;
PROCEDURE EraseInnerRect (box: Rect);
PROCEDURE FrameOuterRect (box: Rect);
PROCEDURE FrameInnerRect (box: Rect);
PROCEDURE StoreOffScreen (box: Rect; VAR Snapshot: BitMap);
PROCEDURE RestoreOffScreen (box: Rect; Snapshot: BitMap);
PROCEDURE CleanUp;
PROCEDURE MakeOffScreen (box: Rect; VAR Snapshot: BitMap; VAR Burst: Boolean);
PROCEDURE DrawInt (i: Integer);
PROCEDURE Drawi (i: Integer);
PROCEDURE Grow (VAR Box: Rect; d: Integer);
PROCEDURE BoxesOnly;
PROCEDURE OwnEditMenu;
FUNCTION DawkFilter (param: ParmBlkPtr): Boolean;
PROCEDURE SmallMenus;
PROCEDURE LargeMenus;
PROCEDURE BigFuncBox (Box: Rect; VAR Outbox: Rect);
PROCEDURE SmallFuncBox (Box: Rect; VAR Outbox: Rect; BoxSize: Integer);
PROCEDURE FuncBox (Box: Rect; VAR Outbox: Rect; BoxSize: Integer);
PROCEDURE Poop (n: Integer);
PROCEDURE StartDocuments (DocumentCount: Integer);
FUNCTION TwoToThe (n: integer): integer;
FUNCTION TrapAvailable (theTrap: integer): Boolean;
FUNCTION WNEIsImplemented: Boolean;
FUNCTION TempMemCallsAvailable: Boolean;
PROCEDURE DeleteOldFile (volRefNum: Integer; dirID: LongInt; fileName: Str255);
PROCEDURE PositionDialog (theType: ResType; theID: integer);
PROCEDURE FindDlogPosition (theType: ResType; theID: integer; VAR corner: Point);
FUNCTION IsEOF (refNum: Integer; howClose: LongInt): Boolean;
FUNCTION FileSize (refNum: Integer): LongInt;

Description

Functions and Procedures

FUNCTION FossilsExist: Boolean;

replace, but not precisely mimic, Turbo's built-in function

PROCEDURE DireMessage (string1ID, string2ID: Integer; VAR Verdict: Integer; YesNo: Boolean);

v1.1 changed DLOGs to ALRTs.

PROCEDURE MemoryMessage (ID: Integer; InMessage: Str255; VAR Verdict: Integer);

27291 for Fewer album screens, 27295 for Careful. *** Change this to handle appropriate type alerts with strings from STR# ***. v1.1 changed to alerts, position correctly on screen, ID 4405 (got to quit) message changed to DisplayError call.

PROCEDURE SimpleMessage (ID: Integer; VAR Verdict: Integer);

v1.1 redesigned the alert slightly and made it a Caution Alert. This procedure seems to be always called with the same string ID. If more are added, the alert may need to be made less specific

PROCEDURE HelpMessage (StrID: Integer);
 
PROCEDURE SyringeMessage;
 
PROCEDURE Pause (Message: Str255);
 
PROCEDURE SetItemState (Mndx, Indx: Integer; Flag: Boolean);
 
FUNCTION RandInt (Max: Integer): Integer;
 
FUNCTION Odd (i: Integer): Boolean;
 
FUNCTION RandSwell (Indgene: Swelltype): SwellType;
 
PROCEDURE EraseInnerRect (box: Rect);
 
PROCEDURE FrameOuterRect (box: Rect);
 
PROCEDURE FrameInnerRect (box: Rect);
 
PROCEDURE StoreOffScreen (box: Rect; VAR Snapshot: BitMap);
 
PROCEDURE RestoreOffScreen (box: Rect; Snapshot: BitMap);
 
PROCEDURE CleanUp;
 
PROCEDURE MakeOffScreen (box: Rect; VAR Snapshot: BitMap; VAR Burst: Boolean);
 
PROCEDURE DrawInt (i: Integer);
 
PROCEDURE Drawi (i: Integer);
 
PROCEDURE Grow (VAR Box: Rect; d: Integer);
 
PROCEDURE BoxesOnly;
 
PROCEDURE OwnEditMenu;
 
FUNCTION DawkFilter (param: ParmBlkPtr): Boolean;
 
PROCEDURE SmallMenus;
 
PROCEDURE LargeMenus;
 
PROCEDURE BigFuncBox (Box: Rect; VAR Outbox: Rect);
 
PROCEDURE SmallFuncBox (Box: Rect; VAR Outbox: Rect; BoxSize: Integer);
 
PROCEDURE FuncBox (Box: Rect; VAR Outbox: Rect; BoxSize: Integer);
 
PROCEDURE Poop (n: Integer);
 
PROCEDURE StartDocuments (DocumentCount: Integer);

v1.1 The original procedure would fail if you double click on a colour biomorph file, because those files have the same creator signiture but different file formats. Added check of file format - Alun

FUNCTION TwoToThe (n: integer): integer;
 
FUNCTION TrapAvailable (theTrap: integer): Boolean;

TrapAvailable - Check whether a certain trap exists on this machine. this function uses the new approved method as per IM-VI p. 3-8. Operating System utility added for v1.1

FUNCTION WNEIsImplemented: Boolean;

WNEIsImplemented - See if WaitNextEvent is implemented. Operating System utility added for v1.1

FUNCTION TempMemCallsAvailable: Boolean;

TempMemCallsAvailable - Check whether the MultiFinder temporary memory calls are available. Operating System utility added for v1.1

PROCEDURE DeleteOldFile (volRefNum: Integer; dirID: LongInt; fileName: Str255);

If there was a crash, the fossil file may be present but busy. We need to convince the finder that it is okay to delete it Operating System utility added for v1.1

PROCEDURE PositionDialog (theType: ResType; theID: integer);

PositionDialog - Center the bounding box of a dialog or alert in the upper third of the screen. This is the preferred location according to the Human Interface Guidelines. Dialog Manager utility added for v1.1

PROCEDURE FindDlogPosition (theType: ResType; theID: integer; VAR corner: Point);

FindDLOGPosition - Return the coordinates of the top left corner of a dialog or alert which centers the box in the upper third of the main screen. This is the preferred location according to the Human Interface Guidelines. Dialog Manager utility added for v1.1

FUNCTION IsEOF (refNum: Integer; howClose: LongInt): Boolean;

Acts like Pascal's eof() function, but in addition you can specify how close to the end of the file you are allowed to be (takes care of truncated files. File Manager utilities added for v1.1)

FUNCTION FileSize (refNum: Integer): LongInt;

returns the number of bytes in the file. Same as the toolbox function GetEOF, except this returns the size instead of an error code. It has this name to emulate the Turbo routine, except this returns bytes (since we don' t use pascal type-files now). File Manager utilities added for v1.1


Generated by PasDoc 0.14.0.