Dialog Machine Version 3
(released as Version 3.2.2 (Jul/2011) or later)
Copyright (c) 1985-2011 by Andreas Fischlin, Olivier Roth, Klara Vancso, Alex Itten and ETH Zurich.
mailto://RAMSES@env.ethz.ch http://www.sysecol.ethz.ch/
(************************************************************************************)
(*##### K E R N E L M O D U L E S #####*)
(************************************************************************************)
The authors reserve the right to make changes, additions, and improvements
to the software or documentation at any time without notice to any person or
organization; no guarantee is made that further versions of either will be
compatible with any other version.
The authors hereby disclaim any and all guarantees and warranties on the
software or its documentation, both expressed or implied. No liability
of any form shall be assumed by the authors. Any user of this sofware uses
it at his or her own risk and no fitness for any purpose whatsoever nor
waranty of merchantability are claimed or implied.
| Marks lines which contain objects which have been added since Version 1.0.
(*=========================================== DMConversions ===========================================*)
TYPE RealFormat = (FixedFormat, ScientificNotation);
PROCEDURE StringToCard( str: ARRAY OF CHAR; VAR card: CARDINAL; VAR done: BOOLEAN );
PROCEDURE CardToString( card: CARDINAL; VAR str: ARRAY OF CHAR; length: CARDINAL );
PROCEDURE StringToLongCard( str: ARRAY OF CHAR; VAR lcard: LONGCARD; VAR done: BOOLEAN );
PROCEDURE LongCardToString( lcard: LONGCARD; VAR str: ARRAY OF CHAR; length: CARDINAL );
PROCEDURE StringToInt( str: ARRAY OF CHAR; VAR int: INTEGER; VAR done: BOOLEAN );
PROCEDURE IntToString( int: INTEGER; VAR str: ARRAY OF CHAR; length: CARDINAL );
PROCEDURE StringToLongInt( str: ARRAY OF CHAR; VAR lint: LONGINT; VAR done: BOOLEAN );
PROCEDURE LongIntToString( lint: LONGINT; VAR str: ARRAY OF CHAR; length: CARDINAL );
PROCEDURE StringToReal( str:ARRAY OF CHAR; VAR real: REAL; VAR done: BOOLEAN );
PROCEDURE RealToString( real: REAL; VAR str: ARRAY OF CHAR; length, dec: CARDINAL; f: RealFormat );
PROCEDURE StringToLongReal( Str:ARRAY OF CHAR; VAR longReal: LONGREAL; VAR done: BOOLEAN );
PROCEDURE LongRealToString( longreal: LONGREAL; VAR str: ARRAY OF CHAR; length, dec: CARDINAL; f: RealFormat );
| PROCEDURE HexStringToBytes( hstr: ARRAY OF CHAR; VAR x: ARRAY OF BYTE; VAR done: BOOLEAN );
| PROCEDURE BytesToHexString( x: ARRAY OF BYTE; VAR hstr: ARRAY OF CHAR ); PROCEDURE SetHexDigitsUpperCase( upperC: BOOLEAN );
| PROCEDURE IllegalSyntaxDetected(): BOOLEAN;
| PROCEDURE UndefREAL(): REAL; (* = NAN(017) *) PROCEDURE UndefLONGREAL(): LONGREAL; (* = NAN(017) *)
| PROCEDURE IsUndefREAL( x: REAL ): BOOLEAN; PROCEDURE IsUndefLONGREAL( x: LONGREAL ): BOOLEAN;
(*=========================================== DMLanguage ===========================================*)
CONST
| allOk = 0;
(* General ('Dialog Machine' and other software layers) *)
| badProgState (* should not occurr *) = -4;
| onlyAnInsert = -3; unknownErr = -2; insuffMem = -1;
| tooOldMac = 9; tooManyTermProc = 10; notImplemented = 100;
(* DMWindIO arithmetic *)
| intOverflow = 1; lowUpSame = 2;
(* User Input (DMEntryForms etc.) *)
| numExpected = 5; outOfRange = 7; wrongChar = 3;
| wrongCharOrNone = 14; only1Char = 4; only1CharOrNone = 15;
| stringTooLong = 16;
(* Object access *)
| unknownWindow = 8; unknownEditField = 6; unknownGraph = 11;
(* DM2DGraphs *)
| noLogScale = 12; graphTooSmall = 17;
(* DMFiles: Subsequent message order fits DMFiles.Response, i.e. code = fileResBase+ORD(f.res) *)
| fileResBase = 20;
| fileNotFound = 21; volNotFound = 22; fileDlgCancelled = 23;
| unknownFile = 24; tooManyFiles = 25; diskFull = 26;
| insuffMemForFileFct = 27; fileAlreadyOpen = 28; fileIsBusy = 29;
| fileIsLocked = 30; fileFctNotDone = 31;
(* Error constants beyond userBase for free use *)
| userBase = 300;
(* See also module Errors from AuxLib for further constants and error messages display *)
TYPE Language = (English, German, French, Italian, MyLanguage1, MyLanguage2);
PROCEDURE SetLanguage( l: Language );
PROCEDURE CurrentLanguage(): Language;
| PROCEDURE GetMsgString( msgNr: INTEGER; VAR str: ARRAY OF CHAR );
(*=========================================== DMMaster ===========================================*)
TYPE
MouseHandlers = (WindowContent, BringToFront, RemoveFromFront, RedefWindow, CloseWindow);
MouseHandler = PROCEDURE (Window); KeyboardHandler = PROC; SubProgStatus = (normal, abnormal);
VAR MasterDone: BOOLEAN;
| PROCEDURE AddSetupProc( sup: PROC; priority: INTEGER );
PROCEDURE RemoveSetupProc( sup: PROC );
| PROCEDURE AddMouseHandler( which: MouseHandlers; mhp: MouseHandler; priority: INTEGER );
| PROCEDURE RemoveMouseHandler( which: MouseHandlers; mhp: MouseHandler );
| PROCEDURE AddKeyboardHandler( khP: KeyboardHandler; priority: INTEGER );
| PROCEDURE RemoveKeyboardHandler( khP: KeyboardHandler );
| PROCEDURE InspectKey( VAR ch: CHAR; VAR modifiers: BITSET );
| PROCEDURE KeyAccepted;
| PROCEDURE DoTillKeyReleased( p: PROC );
| PROCEDURE SetKeyboardHandlerMode( readGetsThem: BOOLEAN; maxPriority: INTEGER );
| PROCEDURE Read( VAR ch: CHAR );
| PROCEDURE GetKeyboardHandlerMode( VAR readGetsThem: BOOLEAN; VAR maxPriority: INTEGER );
| PROCEDURE BusyRead( VAR ch: CHAR );
PROCEDURE ShowWaitSymbol;
PROCEDURE HideWaitSymbol;
PROCEDURE Wait( nrTicks: LONGCARD ); (* 1 tick = 1/60 second *)
| PROCEDURE SoundBell;
| PROCEDURE PlayPredefinedMusic( fileName: ARRAY OF CHAR; musicID: INTEGER );
PROCEDURE InitDialogMachine; PROCEDURE RunDialogMachine; PROCEDURE DialogMachineIsRunning(): BOOLEAN;
PROCEDURE QuitDialogMachine; PROCEDURE AbortDialogMachine; PROCEDURE DialogMachineTask;
PROCEDURE CallSubProg( module: ARRAY OF CHAR; VAR status: SubProgStatus );
| PROCEDURE ForceDialogMachineIntoBatchMode( bm: BOOLEAN ); PROCEDURE DialogMachineIsInBatchMode(): BOOLEAN;
(*=========================================== DMMenus ===========================================*)
TYPE
Menu; Command; AccessStatus = (enabled, disabled); Marking = (checked, unchecked); Separator = (line, blank);
QuitProc = PROCEDURE(VAR BOOLEAN); SeparatorPosition = (beforeCmd, afterCmd);
| VAR MenusDone: BOOLEAN; notInstalledMenu: Menu; notInstalledCommand: Command;
PROCEDURE InstallAbout( s: ARRAY OF CHAR; w,h: CARDINAL; p: PROC );
PROCEDURE NoDeskAccessories;
PROCEDURE InstallMenu( VAR m: Menu; menuText: ARRAY OF CHAR; ast: AccessStatus );
| PROCEDURE InstallSubMenu (inMenu: Menu; VAR subMenu: Menu; menuText: ARRAY OF CHAR; ast: AccessStatus );
PROCEDURE InstallCommand( m: Menu; VAR c: Command; cmdText: ARRAY OF CHAR; p: PROC; ast: AccessStatus; chm: Marking );
PROCEDURE InstallAliasChar( m: Menu; c: Command; ch: CHAR );
| PROCEDURE InstallSeparator( m: Menu; s: Separator );
| PROCEDURE RemoveSeparator( m: Menu; s: CARDINAL );
| PROCEDURE RemoveSeparatorAtCommand( m: Menu; cmd: Command; sp: SeparatorPosition );
PROCEDURE InstallQuitCommand( s: ARRAY OF CHAR; p: QuitProc; aliasChar: CHAR );
| PROCEDURE HideSubQuit( onLevel: CARDINAL ); PROCEDURE ShowSubQuit( onLevel: CARDINAL );
PROCEDURE UseMenu( m: Menu ); PROCEDURE UseMenuBar;
PROCEDURE RemoveMenu( VAR m: Menu ); PROCEDURE RemoveMenuBar;
| PROCEDURE RemoveCommand( m: Menu; cmd: Command );
PROCEDURE EnableDeskAccessories; PROCEDURE DisableDeskAccessories;
PROCEDURE EnableMenu( m: Menu ); PROCEDURE DisableMenu( m: Menu );
PROCEDURE EnableCommand( m: Menu; c: Command ); PROCEDURE DisableCommand( m: Menu; c: Command );
PROCEDURE CheckCommand( m: Menu; c: Command ); PROCEDURE UncheckCommand( m: Menu; c: Command );
| PROCEDURE SetCheckSym( m: Menu; c: Command; ch: CHAR ); PROCEDURE IsCommandChecked( m: Menu; c: Command ): BOOLEAN;
| PROCEDURE ChangeCommand( m: Menu; c: Command; p: PROC ); PROCEDURE ChangeCommandText( m: Menu; c: Command;
newCmdText: ARRAY OF CHAR );
| PROCEDURE ChangeAliasChar( m: Menu; c: Command; newCh: CHAR ); PROCEDURE ChangeQuitAliasChar( onLevel: CARDINAL; newAliasCh: CHAR );
| PROCEDURE ExecuteCommand( m: Menu; c: Command ); PROCEDURE ExecuteAbout;
| PROCEDURE MenuExists( m: Menu ): BOOLEAN; PROCEDURE CommandExists( m: Menu; c: Command ): BOOLEAN;
| PROCEDURE MenuLevel( m: Menu ): CARDINAL; PROCEDURE CommandLevel( m: Menu; c: Command ): CARDINAL;
| PROCEDURE GetMenuAttributes( m: Menu; VAR menuNr: CARDINAL; VAR menuText: ARRAY OF CHAR; VAR ast: AccessStatus;
VAR isSubMenu: BOOLEAN; VAR parentMenu: Menu );
| PROCEDURE GetCommandAttributes( m: Menu; c: Command; VAR cmdNr: CARDINAL; VAR cmdText: ARRAY OF CHAR; VAR p: PROC;
VAR ast: AccessStatus; VAR chm: Marking; VAR chmCh, aliasCh: CHAR );
| PROCEDURE InstallPredefinedMenu ( fileName: ARRAY OF CHAR; menuID: INTEGER; VAR m: Menu );
| PROCEDURE InstallPredefinedSubMenu ( fileName: ARRAY OF CHAR; menuID: INTEGER; inMenu: Menu; VAR subMenu: Menu );
| PROCEDURE InstallPredefinedCommand ( fileName: ARRAY OF CHAR; menuID, itemNr: INTEGER; m: Menu; VAR c: Command; p: PROC );
| PROCEDURE InstallPredefinedSeparator ( fileName: ARRAY OF CHAR; menuID, itemNr: INTEGER; m: Menu );
| PROCEDURE SaveAsPredefinedMenu ( fileName: ARRAY OF CHAR; menuID: INTEGER; m: Menu );
| PROCEDURE SaveAsPredefinedMenuSection( fileName: ARRAY OF CHAR; menuID: INTEGER; m: Menu; maxItemNr: INTEGER );
(*=========================================== DMMessages ===========================================*)
| CONST LNBREAK = 15C; undefMsgNr = -1; toScreen = 0; toJournalFile = 1;
TYPE
| MsgRetrieveProc = PROCEDURE( INTEGER, VAR ARRAY OF CHAR );
| MsgDevice = [toScreen..toJournalFile]; MsgWriteProc = PROCEDURE( CHAR ); MsgWriteLnProc = PROC;
| PROCEDURE Ask( question: ARRAY OF CHAR; butTexts: ARRAY OF CHAR; butWidth: CARDINAL; VAR answer: INTEGER );
| PROCEDURE DisplayBusyMessage( msg: ARRAY OF CHAR );
| PROCEDURE DiscardBusyMessage;
| PROCEDURE Inform ( paragraph1, paragraph2, paragraph3: ARRAY OF CHAR );
| PROCEDURE DoInform ( msgnr: INTEGER; modIdent, locDescr, insertions: ARRAY OF CHAR );
| PROCEDURE Warn ( paragraph1, paragraph2, paragraph3: ARRAY OF CHAR );
| PROCEDURE DoWarn ( msgnr: INTEGER; modIdent, locDescr, insertions: ARRAY OF CHAR );
| PROCEDURE Abort ( paragraph1, paragraph2, paragraph3: ARRAY OF CHAR );
| PROCEDURE DoAbort ( msgnr: INTEGER; modIdent, locDescr, insertions: ARRAY OF CHAR );
| PROCEDURE SetMsgRetrieveProc( rp: MsgRetrieveProc );
| PROCEDURE GetMsgRetrieveProc( VAR rp: MsgRetrieveProc );
| PROCEDURE UseForMsgJournaling( wp: MsgWriteProc; wlnp: MsgWriteLnProc );
| PROCEDURE SetMaxMsgs ( max: INTEGER );
| PROCEDURE SetMsgDevice ( forAsk,forInform,forWarn,forAbort: MsgDevice );
| PROCEDURE GetMsgDevice(V AR forAsk,forInform,forWarn,forAbort: MsgDevice );
| PROCEDURE AskPredefinedQuestion( fileName: ARRAY OF CHAR; alertID: INTEGER;
str1,str2,str3,str4: ARRAY OF CHAR; VAR answer: INTEGER );
(*=========================================== DMStorage ===========================================*)
| PROCEDURE Allocate( VAR p: ADDRESS; size: LONGINT ); PROCEDURE AllocateOnLevel( VAR adr: ADDRESS; size: LONGINT; onLevel: INTEGER );
| PROCEDURE Deallocate( VAR p: ADDRESS ); PROCEDURE DeallocateOnLevel( VAR p: ADDRESS; onLevel: INTEGER );
(* IBM PC compatibility: *)
| PROCEDURE ALLOCATE( VAR p: ADDRESS; size: CARDINAL ); PROCEDURE DEALLOCATE( VAR p: ADDRESS; size: CARDINAL );
(*=========================================== DMStrings ===========================================*)
TYPE String; StringRelation = (smaller, equal, greater);
| VAR notAllocatedStr: String; ResourceStringsDone: BOOLEAN;
| PROCEDURE AllocateStr( VAR strRef: String; s: ARRAY OF CHAR ); PROCEDURE DeallocateStr( VAR strRef: String );
| PROCEDURE SetStr( VAR strRef: String; s: ARRAY OF CHAR ); PROCEDURE GetStr( strRef: String; VAR s: ARRAY OF CHAR );
| PROCEDURE StrLevel( strRef: String ): CARDINAL; PROCEDURE StrLength( strRef: String ): INTEGER;
PROCEDURE Length( VAR string: ARRAY OF CHAR ): INTEGER;
PROCEDURE AssignString( source: ARRAY OF CHAR; VAR d: ARRAY OF CHAR );
| PROCEDURE Append( VAR dest: ARRAY OF CHAR; source: ARRAY OF CHAR ); PROCEDURE AppendCh( VAR dest: ARRAY OF CHAR; ch: CHAR );
| PROCEDURE AppendStr( VAR strRef: String; s: ARRAY OF CHAR ); PROCEDURE AppendChr( VAR strRef: String; ch: CHAR );
| PROCEDURE Concatenate( first,second: ARRAY OF CHAR; VAR result: ARRAY OF CHAR );
| PROCEDURE CopyString( VAR from: ARRAY OF CHAR; i1,nrChs: INTEGER; VAR to: ARRAY OF CHAR; VAR i2: INTEGER );
| PROCEDURE CopyStr( from: String; VAR to: String );
| PROCEDURE Copy( from: ARRAY OF CHAR; startIndex, nrOfChars: INTEGER; VAR to: ARRAY OF CHAR );
| PROCEDURE ExtractSubString( VAR curPosInSrcS: INTEGER; VAR srcS,destS: ARRAY OF CHAR; delimiter: CHAR );
| PROCEDURE FindInString( VAR theString: ARRAY OF CHAR; searchStr: ARRAY OF CHAR; VAR firstCh,lastCh: INTEGER ): BOOLEAN;
| PROCEDURE CompareStrings( s1,s2: ARRAY OF CHAR ): StringRelation;
| PROCEDURE CompVarStrings( VAR a, b: ARRAY OF CHAR ): StringRelation;
| PROCEDURE CompStr( VAR a: ARRAY OF CHAR; bS: String ): StringRelation;
PROCEDURE LoadString( fileName: ARRAY OF CHAR; stringID: INTEGER; VAR string: ARRAY OF CHAR );
PROCEDURE StoreString( fileName: ARRAY OF CHAR; VAR stringID: INTEGER; string: ARRAY OF CHAR );
PROCEDURE GetRString( stringID: INTEGER; VAR str: ARRAY OF CHAR );
| PROCEDURE SetRStringName( fileName: ARRAY OF CHAR; stringID: INTEGER; name: ARRAY OF CHAR );
| PROCEDURE GetRStringName( fileName: ARRAY OF CHAR; stringID: INTEGER; VAR name: ARRAY OF CHAR );
PROCEDURE NewString( VAR s: ARRAY OF CHAR ): String;
PROCEDURE PutString( VAR strRef: String; VAR s: ARRAY OF CHAR );
(*=========================================== DMSystem ===========================================*)
CONST startUpLevel = 1; maxLevel = 5;
PROCEDURE CurrentDMLevel(): CARDINAL;
PROCEDURE LevelisDMLevel( l: CARDINAL ): BOOLEAN;
| PROCEDURE LevelIsTerminating(): BOOLEAN;
| PROCEDURE TopDMLevel(): CARDINAL;
| PROCEDURE DoOnSubProgLevel( l: CARDINAL; p: PROC );
| PROCEDURE ForceDMLevel( extraLevel: CARDINAL ); PROCEDURE ResumeDMLevel( normalLevel: CARDINAL );
| PROCEDURE InstallInitProc( ip: PROC; VAR done: BOOLEAN ); PROCEDURE ExecuteInitProcs;
| PROCEDURE InstallTermProc( tp: PROC; VAR done: BOOLEAN ); PROCEDURE ExecuteTermProcs;
| PROCEDURE GetDMVersion( VAR vers,lastModifDate: ARRAY OF CHAR ); PROCEDURE SystemVersion(): REAL;
| PROCEDURE GetComputerName( VAR name: ARRAY OF CHAR );
| PROCEDURE RunsOnAMac(): BOOLEAN;
| PROCEDURE RunsInMacOSClassic(): BOOLEAN;
| PROCEDURE RunsInMacOSX(): BOOLEAN;
| PROCEDURE RunsOnAnIBMPC(): BOOLEAN;
| PROCEDURE RunsOnAUnixMachine(): BOOLEAN;
| PROCEDURE GetCPUName( VAR name: ARRAY OF CHAR ); PROCEDURE GetFPUName( VAR name: ARRAY OF CHAR );
| PROCEDURE FPUPresent(): BOOLEAN; PROCEDURE GetROMName( VAR name: ARRAY OF CHAR );
PROCEDURE ScreenWidth(): INTEGER;
PROCEDURE ScreenHeight(): INTEGER;
| PROCEDURE MainScreen(): INTEGER;
| PROCEDURE SuperScreen( VAR whichScreen, x,y,w,h, nrOfColors: INTEGER; colorPriority: BOOLEAN );
(* low level routines *)
PROCEDURE MenuBarHeight(): INTEGER; PROCEDURE TitleBarHeight(): INTEGER;
PROCEDURE ScrollBarWidth(): INTEGER;
| PROCEDURE GrowIconSize(): INTEGER;
| PROCEDURE MaxPixelDepth(): INTEGER; (* supported by DM regardless of currently used screen *)
| PROCEDURE HowManyScreens(): INTEGER;
| PROCEDURE GetScreenSize( screen: INTEGER; VAR x,y,w,h: INTEGER );
| PROCEDURE PixelDepthOnScreen( screen: INTEGER ): INTEGER;
CONST unknown = 0;
| Mac512KE = 3; MacSE30 = 9; MacLC = 19; MacPowerBook140 = 25; SUN = 101; IBMPC = 201;
| MacPlus = 4; MacPortable = 10; MacQuadra900 = 20; MacLCII = 19; SUN3 = 102; IBMAT = 202;
| MacSE = 5; MacIIci = 11; MacPowerBook170 = 21; MacQuadra950 = 26; SUNSparc = 103; IBMPS2 = 203;
| MacII = 6; MacIIfx = 13; MacQuadra700 = 22; IBMRisc6000 = 300;
| MacIIx = 7; MacClassic = 17; MacClassicII = 23;
| MacIIcx = 8; MacIIsi = 18; MacPowerBook100 = 24;
PROCEDURE ComputerSystem(): INTEGER;
CONST CPU68000 = 1; CPU8088 = 201; CPU80186 = 203; FPU68881 = 1;
CPU68010 = 2; CPU8086 = 202; CPU80286 = 204; FPU68882 = 2;
CPU68020 = 3; CPU80386 = 205; FPU68040 = 3;
| CPU68030 = 4; CPU80486 = 206;
| CPU68040 = 5;
| PROCEDURE CPUType(): INTEGER;
| PROCEDURE FPUType(): INTEGER;
| CONST MacKeyboard = 1; AExtendKbd = 4; PortableISOKbd = 7; ADBKbdII = 10; PwrBkISOKbd = 13;
| MacKbdAndPad = 2; ADBKeyboard = 5; EastwoodISOKbd = 8; ADBISOKbdII = 11;
| MacPlusKbd = 3; PortableKbd = 6; SaratogaISOKbd = 9; PwrBkADBKbd = 12;
PROCEDURE Keyboard(): INTEGER;
| CONST ROM64k = 1; ROM128k = 2; ROM256k = 3; ROM512k = 4; ROM1024k = 5; (* ROM types *)
| PROCEDURE ROMType(): INTEGER;
| PROCEDURE ROMVersionNr(): INTEGER;
| PROCEDURE QuickDrawVersion(): REAL;
(*=========================================== DMWindIO ===========================================*)
TYPE
MouseModifiers = (ordinary, cmded, opted, shifted, capsLock, controlled);
ClickKind = SET OF MouseModifiers;
DragProc = PROCEDURE (INTEGER, INTEGER);
VAR WindowIODone: BOOLEAN;
PROCEDURE PointClicked( x,y: INTEGER; maxDist: INTEGER ): BOOLEAN;
PROCEDURE RectClicked( rect: RectArea ): BOOLEAN;
PROCEDURE PointDoubleClicked( x,y: INTEGER; maxDist: INTEGER ): BOOLEAN;
PROCEDURE RectDoubleClicked( rect: RectArea ): BOOLEAN;
| PROCEDURE GetLastClick( VAR x,y: INTEGER; VAR click: ClickKind ): BOOLEAN;
| PROCEDURE GetLastDoubleClick( VAR x,y: INTEGER; VAR click: ClickKind ): BOOLEAN;
PROCEDURE GetCurMousePos( VAR x,y: INTEGER );
PROCEDURE GetLastMouseClick( VAR x,y: INTEGER; VAR click: ClickKind );
PROCEDURE DoTillMButReleased( p: PROC );
PROCEDURE Drag( duringDragP,afterDragP: DragProc );
PROCEDURE SetContSize( u: Window; contentRect: RectArea ); PROCEDURE GetContSize( u: Window; VAR contentRect: RectArea );
PROCEDURE SetScrollStep( u: Window; xStep,yStep: INTEGER ); PROCEDURE GetScrollStep( u: Window; VAR xStep, yStep: INTEGER );
PROCEDURE GetScrollBoxPos( u: Window; VAR posX,posY: INTEGER );
| PROCEDURE SetScrollBoxPos( u: Window; posX,posY: INTEGER );
PROCEDURE GetScrollBoxChange( u: Window; VAR changeX,changeY: INTEGER );
PROCEDURE AutoScrollProc( u: Window );
PROCEDURE SetScrollProc( u: Window; scrollP: RestoreProc ); PROCEDURE GetScrollProc( u: Window; VAR scrollP: RestoreProc );
PROCEDURE ScrollContent( u: Window; dx,dy: INTEGER ); PROCEDURE MoveOriginTo( u: Window; x0,y0: INTEGER );
PROCEDURE SelectForOutput( u: Window ); PROCEDURE CurrentOutputWindow(): Window;
TYPE
PaintMode = (replace, paint, invert, erase);
Hue = [0..359]; GreyContent = (light, lightGrey, grey, darkGrey, dark); Saturation = [0..100];
Color = RECORD hue: Hue; greyContent: GreyContent; saturation: Saturation; END;
PatLine = BYTE; Pattern = ARRAY [0..7] OF PatLine;
VAR pat: ARRAY [light..dark] OF Pattern; black, white, red, green, blue, cyan, magenta, yellow: Color;
PROCEDURE SetMode( mode: PaintMode ); PROCEDURE GetMode( VAR mode: PaintMode );
PROCEDURE SetBackground( c: Color; pat: Pattern ); PROCEDURE GetBackground( VAR c: Color; VAR pat: Pattern );
PROCEDURE SetColor( c: Color ); PROCEDURE GetColor( VAR c: Color );
PROCEDURE SetPattern( p: Pattern ); PROCEDURE GetPattern( VAR p: Pattern );
PROCEDURE IdentifyPos( x,y: INTEGER; VAR line,col: CARDINAL );
PROCEDURE IdentifyPoint( line,col: CARDINAL; VAR x,y: INTEGER );
PROCEDURE MaxCol(): CARDINAL; PROCEDURE MaxLn(): CARDINAL;
PROCEDURE CellWidth(): INTEGER; PROCEDURE CellHeight(): INTEGER;
| PROCEDURE StringArea( s: ARRAY OF CHAR; VAR a: RectArea; VAR baseLine,sepSpace: INTEGER );
| PROCEDURE StringWidth( VAR s: ARRAY OF CHAR ): INTEGER;
PROCEDURE BackgroundWidth(): INTEGER; PROCEDURE BackgroundHeight(): INTEGER;
PROCEDURE SetEOWAction( u: Window; action: PROC ); PROCEDURE GetEOWAction( u: Window; VAR action: PROC );
PROCEDURE EraseContent; PROCEDURE RedrawContent;
PROCEDURE SetClipping( cr: RectArea ); PROCEDURE GetClipping( VAR cr: RectArea );
PROCEDURE RemoveClipping;
TYPE
WindowFont = (Chicago, Monaco, Geneva, NewYork); FontStyles = (bold, italic, underline);
| LaserFont = (Times, Helvetica, Courier, Symbol); FontStyle = SET OF FontStyles;
PROCEDURE SetWindowFont( wf: WindowFont; size: CARDINAL; style: FontStyle );
PROCEDURE GetWindowFont( VAR wf: WindowFont; VAR size: CARDINAL; VAR style: FontStyle );
| PROCEDURE SetLaserFont( lf: LaserFont; size: CARDINAL; style: FontStyle );
| PROCEDURE GetLaserFont( VAR lf: LaserFont; VAR size: CARDINAL; VAR style: FontStyle );
PROCEDURE SetPos( line,col: CARDINAL ); PROCEDURE GetPos( VAR line,col: CARDINAL );
PROCEDURE ShowCaret( on: BOOLEAN ); PROCEDURE Invert( on: BOOLEAN );
PROCEDURE Write( ch: CHAR ); PROCEDURE WriteString( s: ARRAY OF CHAR );
| PROCEDURE WriteLn; PROCEDURE WriteVarString( VAR s: ARRAY OF CHAR );
| PROCEDURE WriteCard( c,n: CARDINAL ); PROCEDURE WriteLongCard( lc: LONGCARD; n: CARDINAL );
| PROCEDURE WriteInt( c: INTEGER; n: CARDINAL ); PROCEDURE WriteLongInt( li: LONGINT; n: CARDINAL );
PROCEDURE WriteReal( r: REAL; n,dec: CARDINAL ); PROCEDURE WriteRealSci( r: REAL; n,dec: CARDINAL );
| PROCEDURE WriteLongReal( lr:LONGREAL; n,dec:CARDINAL ); PROCEDURE WriteLongRealSci( lr: LONGREAL; n,dec: CARDINAL );
PROCEDURE SetPen( x,y: INTEGER ); PROCEDURE GetPen( VAR x,y: INTEGER );
| PROCEDURE SetBrushSize( width,height: INTEGER ); PROCEDURE GetBrushSize( VAR width,height: INTEGER );
PROCEDURE Dot( x,y: INTEGER ); PROCEDURE LineTo( x,y: INTEGER );
PROCEDURE Circle( x,y: INTEGER; radius: CARDINAL; filled: BOOLEAN; fillpat: Pattern );
PROCEDURE Area( r: RectArea; pat: Pattern ); PROCEDURE CopyArea( sourceArea: RectArea; dx,dy: INTEGER );
PROCEDURE MapArea( sourceArea,destArea: RectArea );
PROCEDURE DisplayPredefinedPicture (fileName: ARRAY OF CHAR; pictureID: INTEGER; f: RectArea );
| PROCEDURE GetPredefinedPictureFrame( fileName: ARRAY OF CHAR; pictureID: INTEGER; VAR f: RectArea );
PROCEDURE StartPolygon; PROCEDURE CloseAndFillPolygon( pat: Pattern );
| PROCEDURE DrawAndFillPoly( nPoints: CARDINAL; VAR x, y: ARRAY OF INTEGER; VAR withEdge: ARRAY OF BOOLEAN;
VAR edgeColors: ARRAY OF Color; isFilled: BOOLEAN; fillColor: Color; fillPattern: Pattern );
TYPE
QDVHSelect = (v,h); QDVHSelectR = [v..h];
QDPoint = RECORD CASE:INTEGER OF 0: v,h: INTEGER; | 1: vh: ARRAY QDVHSelectR OF INTEGER; END; END;
QDRect = RECORD CASE:INTEGER OF 0: top,left,bottom,right: INTEGER; | 1: topLeft,botRight: QDPoint; END; END;
PROCEDURE XYToQDPoint( x,y: INTEGER; VAR p: QDPoint ); PROCEDURE RectAreaToQDRect( r: RectArea; VAR qdr: QDRect );
PROCEDURE SelectRestoreCopy( u: Window ); PROCEDURE SetRestoreCopy( u: Window; rcp: ADDRESS );
PROCEDURE Turn( angle: INTEGER );
PROCEDURE TurnTo( angle: INTEGER );
PROCEDURE MoveBy( distance: CARDINAL );
PROCEDURE ScaleUC( r: RectArea; xmin,xmax,ymin,ymax: REAL ); PROCEDURE GetUC( VAR r: RectArea; VAR xmin,xmax,ymin,ymax: REAL );
PROCEDURE ConvertPointToUC( x,y: INTEGER; VAR xUC,yUC: REAL ); PROCEDURE ConvertUCToPoint( xUC,yUC: REAL; VAR x,y: INTEGER );
PROCEDURE UCFrame;
PROCEDURE EraseUCFrame;
PROCEDURE EraseUCFrameContent;
PROCEDURE SetUCPen( xUC,yUC: REAL ); PROCEDURE GetUCPen( VAR xUC,yUC: REAL );
PROCEDURE UCDot( xUC,yUC: REAL ); PROCEDURE UCLineTo( xUC,yUC: REAL );
PROCEDURE DrawSym( ch: CHAR );
(*=========================================== DMWindows ===========================================*)
TYPE
Window;
| WindowKind = (GrowOrShrinkOrDrag, FixedSize, FixedLocation, FixedLocTitleBar);
| ModalWindowKind = (DoubleFrame, SingleFrameShadowed );
ScrollBars = (WithVerticalScrollBar, WithHorizontalScrollBar, WithBothScrollBars, WithoutScrollBars);
CloseAttr = (WithCloseBox, WithoutCloseBox); ZoomAttr = (WithZoomBox, WithoutZoomBox);
RectArea = RECORD x,y,w,h: INTEGER END; WindowFrame = RectArea;
WFFixPoint = (bottomLeft, topLeft); RestoreProc = PROCEDURE (Window);
WindowProc = PROCEDURE (Window);
| WindowHandlers = (clickedInContent, broughtToFront, removedFromFront,
redefined, onlyMoved, disappeared, reappeared, closing);
| VAR background: Window; WindowsDone: BOOLEAN; notExistingWindow: Window;
| PROCEDURE NoBackground;
PROCEDURE ReshowBackground;
PROCEDURE OuterWindowFrame( innerf: WindowFrame; wk: WindowKind; s: ScrollBars; VAR outerf: RectArea );
PROCEDURE InnerWindowFrame( outerf: WindowFrame; wk: WindowKind; s: ScrollBars; VAR innerf: RectArea );
PROCEDURE CreateWindow( VAR u: Window; wk: WindowKind; s: ScrollBars; c: CloseAttr; z: ZoomAttr;
fixPoint: WFFixPoint; f: WindowFrame; title: ARRAY OF CHAR; Repaint: RestoreProc );
| PROCEDURE CreateModalWindow( VAR u: Window; wk: ModalWindowKind; s: ScrollBars; f: WindowFrame; Repaint: RestoreProc );
PROCEDURE UsePredefinedWindow( VAR u: Window; fileName: ARRAY OF CHAR; windowID: INTEGER;
fixPoint: WFFixPoint; Repaint: RestoreProc );
CONST DoubleFrameTitled = 3;
| PROCEDURE CreateTitledModalWindow( VAR u: Window; title: ARRAY OF CHAR; f: WindowFrame );
PROCEDURE RedefineWindow( u: Window; f: WindowFrame ); PROCEDURE RedrawTitle( u: Window; title: ARRAY OF CHAR );
| PROCEDURE MakeWindowInvisible( u: Window ); PROCEDURE MakeWindowVisible( u: Window );
| PROCEDURE IsNowVisible( u: Window ): BOOLEAN;
| PROCEDURE WindowLevel( u: Window ): CARDINAL;
| PROCEDURE GetWindowCharacteristics( u: Window; VAR wk: INTEGER; VAR modalKind: BOOLEAN; VAR s: ScrollBars; VAR c: CloseAttr;
VAR z: ZoomAttr; VAR fixPoint: WFFixPoint; VAR f: WindowFrame; VAR title: ARRAY OF CHAR );
PROCEDURE DummyRestoreProc( u: Window ); PROCEDURE AutoRestoreProc( u: Window );
PROCEDURE SetRestoreProc( u: Window; r: RestoreProc ); PROCEDURE GetRestoreProc( u: Window; VAR r: RestoreProc );
PROCEDURE StartAutoRestoring( u:Window; r: RectArea ); PROCEDURE StopAutoRestoring( u: Window );
PROCEDURE AutoRestoring( u: Window ): BOOLEAN; PROCEDURE GetHiddenBitMapSize( u: Window; VAR r: RectArea );
PROCEDURE UpdateWindow( u: Window ); PROCEDURE InvalidateContent( u: Window );
| PROCEDURE UpdateAllWindows;
| PROCEDURE AddWindowHandler( u: Window; wh: WindowHandlers; wpp: WindowProc; prio: INTEGER );
| PROCEDURE RemoveWindowHandler( u: Window; wh: WindowHandlers; wpp: WindowProc );
PROCEDURE GetWindowFrame( u: Window; VAR f: WindowFrame ); PROCEDURE GetWFFixPoint( u: Window; VAR loc: WFFixPoint );
PROCEDURE DoForAllWindows( action: WindowProc );
| PROCEDURE UseWindowModally( u: Window; VAR terminateModalDialog, cancelModalDialog: BOOLEAN );
PROCEDURE PutOnTop( u: Window ); PROCEDURE FrontWindow(): Window;
PROCEDURE RemoveWindow( VAR u: Window ); PROCEDURE RemoveAllWindows;
PROCEDURE WindowExists( u: Window ): BOOLEAN; PROCEDURE RedrawBackground;
| PROCEDURE AttachWindowObject( u: Window; obj: ADDRESS ); PROCEDURE WindowObject( u: Window ): ADDRESS;
(* =============================================== E N D ================================================ *)
The Dialog Machine may be freely copied but not for profit!
(**********************************************************************************)
(*##### O P T I O N A L M O D U L E S #####*)
(**********************************************************************************)
| Marks lines which contain objects which have been added since Version 1.0.
(*=========================================== DM2DGraphs ===========================================*)
TYPE
Graph; Curve;
LabelString = ARRAY[0..255] OF CHAR; GridFlag = (withGrid, withoutGrid);
ScalingType = (lin, log, negLog); PlottingStyle = (solid, slash, slashDot, dots, hidden, wipeout);
Range = RECORD min,max: REAL END; GraphProc = PROCEDURE(Graph);
AxisType = RECORD range: Range; scale: ScalingType; dec: CARDINAL; tickD: REAL; label: LabelString; END;
| VAR DM2DGraphsDone: BOOLEAN; notExistingGraph: Graph; notExistingCurve: Curve;
PROCEDURE DefGraph( VAR g: Graph; u: Window; r: RectArea; xAxis, yAxis: AxisType; grid: GridFlag );
PROCEDURE DefCurve( g: Graph; VAR c: Curve; col: Color; style: PlottingStyle; sym: CHAR );
PROCEDURE RedefGraph( g: Graph; r: RectArea; xAxis,yAxis:AxisType; grid: GridFlag );
PROCEDURE RedefCurve( c: Curve; col: Color; style: PlottingStyle; sym: CHAR );
PROCEDURE ClearGraph( g: Graph ); PROCEDURE DrawGraph( g: Graph );
PROCEDURE DrawLegend( c: Curve; x,y: INTEGER; comment: ARRAY OF CHAR );
PROCEDURE RemoveGraph( VAR g: Graph ); PROCEDURE RemoveAllGraphs( u: Window );
PROCEDURE RemoveCurve( VAR c: Curve );
PROCEDURE GraphExists( g: Graph ): BOOLEAN; PROCEDURE CurveExists( g: Graph; c: Curve ): BOOLEAN;
PROCEDURE DoForAllGraphs( u: Window; gp: GraphProc );
PROCEDURE SetNegLogMin( nlm: REAL );
PROCEDURE SetGapSym( ch: CHAR ); PROCEDURE GetGapSym( VAR ch: CHAR );
PROCEDURE Move( c: Curve; x,y: REAL ); PROCEDURE Plot( curve: Curve; newX,newY: REAL );
PROCEDURE PlotSym( g: Graph; x,y: REAL; sym: CHAR ); PROCEDURE PlotCurve( c: Curve; nrOfPoints: CARDINAL; x,y: ARRAY OF REAL );
PROCEDURE GraphToWindowPoint( g: Graph; xReal,yReal: REAL; VAR xInt,yInt: INTEGER );
PROCEDURE WindowToGraphPoint( g: Graph; xInt,yInt: INTEGER; VAR xReal,yReal: REAL );
(*=========================================== DMAlerts ===========================================*)
PROCEDURE WriteMessage( line,col: CARDINAL; msg: ARRAY OF CHAR );
PROCEDURE ShowAlert( height,width: CARDINAL; WriteMessages: PROC );
PROCEDURE ShowPredefinedAlert( fileName: ARRAY OF CHAR; alertID: INTEGER; str1,str2,str3,str4: ARRAY OF CHAR );
(*=========================================== DMClipboard ===========================================*)
TYPE EditCommands = (undo, cut, copy, paste, clear);
| VAR ClipboardDone: BOOLEAN;
PROCEDURE InstallEditMenu( UndoProc, CutProc, CopyProc, PasteProc, ClearProc: PROC );
| PROCEDURE RemoveEditMenu; PROCEDURE UseEditMenu;
PROCEDURE EnableEditMenu; PROCEDURE DisableEditMenu;
PROCEDURE EnableEditCommand( whichone: EditCommands ); PROCEDURE DisableEditCommand( whichone: EditCommands );
| PROCEDURE PutPictureIntoClipboard;
| PROCEDURE GetPictureFromClipboard( simultaneousDisplay: BOOLEAN; destRect: RectArea );
| PROCEDURE PutTextIntoClipboard;
| PROCEDURE GetTextFromClipboard( simultaneousDisplay: BOOLEAN; destRect: RectArea; fromLine: LONGINT );
(*=========================================== DMClock ===========================================*)
| CONST Jan = 1; Feb = 2; Mar = 3; Apr = 4; Mai = 5; Jun = 6; Jul = 7; Aug = 8; Sep = 9; Oct =10; Nov =11; Dec = 12;
| Sun = 1; Mon = 2; Tue = 3; Wed = 4; Thu = 5; Fri = 6; Sat = 7;
| PROCEDURE Today( VAR year, month, day, dayOfWeek: INTEGER ); PROCEDURE Now( VAR hour, minute, second: INTEGER );
| PROCEDURE NowInSeconds(): LONGINT;
| PROCEDURE InterpreteSeconds( secs: LONGINT; VAR year, month, day, hour, minute, second, dayOfWeek: INTEGER );
| PROCEDURE ConvertDateToSeconds( year, month, day, hour, minute, second: INTEGER; VAR secs: LONGINT );
(*=========================================== DMEditFields ===========================================*)
TYPE
EditItem; RadioBut; EditHandler = PROCEDURE(EditItem);
ItemType = (charField, stringField, textField, cardField, intField, realField,
pushButton, radioButtonSet, checkBox, scrollBar); Direction = (horizontal, vertical);
| VAR EditFieldsDone: BOOLEAN; notInstalledEditItem: EditItem; notInstalledRadioBut: RadioBut;
| PROCEDURE MakeCharField( u: Window; VAR ei: EditItem; x,y: INTEGER; ch: CHAR; charset: ARRAY OF CHAR );
| PROCEDURE MakeStringField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw: CARDINAL; string: ARRAY OF CHAR );
| PROCEDURE MakeTextField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw,lines: CARDINAL; string: ARRAY OF CHAR );
| PROCEDURE MakeCardField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw: CARDINAL; card: CARDINAL; minCard,maxCard: CARDINAL );
| PROCEDURE MakeLongCardField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw: CARDINAL;
card: LONGCARD; minCard,maxCard: LONGCARD );
| PROCEDURE MakeIntField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw: CARDINAL; int: INTEGER; minInt,maxInt: INTEGER );
| PROCEDURE MakeLongIntField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw: CARDINAL;
int: LONGINT; minInt,maxInt: LONGINT );
| PROCEDURE MakeRealField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw: CARDINAL; real: REAL; minReal,maxReal: REAL );
| PROCEDURE MakeLongRealField( u: Window; VAR ei: EditItem; x,y: INTEGER; fw: CARDINAL;
real: LONGREAL; minReal,maxReal: LONGREAL );
| PROCEDURE MakePushButton( u: Window; VAR ei: EditItem; x,y: INTEGER;
buttonWidth: CARDINAL; buttonText: ARRAY OF CHAR; pushButtonAction: PROC );
| PROCEDURE UseAsDefaultButton( pushButton: EditItem );
PROCEDURE BeginRadioButtonSet( u: Window; VAR ei: EditItem );
| PROCEDURE AddRadioButton( VAR radButt: RadioBut; x,y: INTEGER; text: ARRAY OF CHAR );
PROCEDURE EndRadioButtonSet( checkedRadioButton: RadioBut );
| PROCEDURE MakeCheckBox( u: Window; VAR ei: EditItem; x,y: INTEGER; text: ARRAY OF CHAR; boxChecked: BOOLEAN );
| PROCEDURE MakeScrollBar( u: Window; VAR ei: EditItem; x, y, length: INTEGER; sbd: Direction; minVal,maxVal: REAL;
smallStep, bigStep: REAL; curVal: REAL; actionProc: PROC );
PROCEDURE SetChar( ei: EditItem; newCh:CHAR ); PROCEDURE SetString( ei: EditItem; newStr: ARRAY OF CHAR );
| PROCEDURE SetText( ei: EditItem; VAR text: ARRAY OF CHAR );
| PROCEDURE SetCardinal( ei: EditItem; newValue: CARDINAL ); PROCEDURE SetLongCardinal( ei: EditItem; newValue: LONGCARD );
| PROCEDURE SetInteger( ei: EditItem; newValue: INTEGER ); PROCEDURE SetLongInteger( ei: EditItem; newValue: LONGINT );
| PROCEDURE SetReal( ei: EditItem; newValue: REAL ); PROCEDURE SetLongReal( ei: EditItem; newValue: LONGREAL );
PROCEDURE SetRadioButtonSet( ei: EditItem; checkedRadioButton: RadioBut );
PROCEDURE SetCheckBox( ei: EditItem; boxChecked: BOOLEAN );
| PROCEDURE SetScrollBar( ei: EditItem; newValue: REAL );
PROCEDURE IsChar( ei: EditItem; VAR ch:CHAR ): BOOLEAN; PROCEDURE GetString( ei: EditItem; VAR str: ARRAY OF CHAR );
| PROCEDURE GetText( ei: EditItem; VAR text: ARRAY OF CHAR );
| PROCEDURE IsCardinal( ei: EditItem; VAR c: CARDINAL ): BOOLEAN; PROCEDURE IsLongCardinal( ei: EditItem; VAR c: LONGCARD ): BOOLEAN;
| PROCEDURE IsInteger( ei: EditItem; VAR i: INTEGER ): BOOLEAN; PROCEDURE IsLongInteger( ei: EditItem; VAR i: LONGINT ): BOOLEAN;
| PROCEDURE IsReal( ei: EditItem; VAR r: REAL ): BOOLEAN; PROCEDURE IsLongReal( ei: EditItem; VAR r: LONGREAL ): BOOLEAN;
PROCEDURE GetRadioButtonSet( ei: EditItem; VAR checkedRadioButton: RadioBut );
PROCEDURE GetCheckBox( ei: EditItem; VAR boxChecked: BOOLEAN );
| PROCEDURE GetScrollBar( ei: EditItem; VAR r: REAL );
| PROCEDURE InstallEditHandler( u: Window; eh: EditHandler ); PROCEDURE GetEditHandler( u: Window; VAR eh: EditHandler );
| PROCEDURE SelectField( ei: EditItem ); PROCEDURE ClearFieldSelection (u: Window );
| PROCEDURE EnableItem( ei: EditItem ); PROCEDURE DisableItem( ei: EditItem ); PROCEDURE IsEnabled( ei: EditItem ): BOOLEAN;
PROCEDURE EditItemExists( ei: EditItem ): BOOLEAN; PROCEDURE GetEditItemType( ei: EditItem; VAR it: ItemType );
| PROCEDURE RadioButtonExists( rb: RadioBut ): BOOLEAN;
| PROCEDURE EditItemLevel( ei: EditItem ): CARDINAL; PROCEDURE RadioButtonLevel( rb: RadioBut ): CARDINAL;
PROCEDURE RemoveEditItem( VAR ei: EditItem ); PROCEDURE RemoveAllEditItems( u: Window );
| PROCEDURE AttachEditFieldObject( ei: EditItem; obj: ADDRESS ); PROCEDURE EditFieldObject( ei: EditItem ): ADDRESS;
(*=========================================== DMEntryForms ===========================================*)
TYPE FormFrame = RECORD x,y: INTEGER; lines,columns: CARDINAL END; DefltUse = (useAsDeflt, noDeflt ); RadioButtonID;
| VAR FieldInstalled: BOOLEAN; notInstalledRadioButton: RadioButtonID;
PROCEDURE WriteLabel( line,col: CARDINAL; text: ARRAY OF CHAR );
PROCEDURE CharField( line,col: CARDINAL; VAR ch: CHAR; du: DefltUse; charset: ARRAY OF CHAR );
PROCEDURE StringField( line,col: CARDINAL; fw: CARDINAL; VAR string: ARRAY OF CHAR; du: DefltUse );
PROCEDURE CardField( line,col: CARDINAL; fw: CARDINAL; VAR card: CARDINAL; du: DefltUse; minCard,maxCard: CARDINAL );
| PROCEDURE LongCardField (line,col: CARDINAL; fw: CARDINAL; VAR longCard: LONGCARD; du: DefltUse; minLCard,maxLCard: LONGCARD );
PROCEDURE IntField( line,col: CARDINAL; fw: CARDINAL; VAR int: INTEGER; du: DefltUse; minInt,maxInt: INTEGER );
| PROCEDURE LongIntField (line,col: CARDINAL; fw: CARDINAL; VAR longInt: LONGINT; du: DefltUse; minLInt,maxLInt: LONGINT );
PROCEDURE RealField( line,col: CARDINAL; fw: CARDINAL; VAR real: REAL; du: DefltUse; minReal,maxReal: REAL );
| PROCEDURE LongRealField (line,col: CARDINAL; fw,dig: CARDINAL; fmt: RealFormat; VAR longReal: LONGREAL; du: DefltUse;
minLReal,maxLReal: LONGREAL );
PROCEDURE PushButton( line,col: CARDINAL; buttonText: ARRAY OF CHAR; buttonWidth: CARDINAL; pushButtonAction: PROC );
PROCEDURE DefineRadioButtonSet( VAR radioButtonVar: RadioButtonID );
PROCEDURE RadioButton( VAR radButt: RadioButtonID; line,col: CARDINAL; text: ARRAY OF CHAR );
PROCEDURE CheckBox( line,col: CARDINAL; text: ARRAY OF CHAR; VAR checkBoxVar: BOOLEAN );
PROCEDURE UseEntryForm( bf: FormFrame; VAR ok: BOOLEAN );
(*=========================================== DMFiles ===========================================*)
CONST EOL = 36C;
TYPE
Response = (done, filenotfound, volnotfound, cancelled, unknownfile, toomanyfiles, diskfull, memfull,
alreadyopened, isbusy, locked, notdone);
HiddenFileInfo; IOMode = (reading, writing);
TextFile = RECORD
res: Response;
filename: ARRAY [0..255] OF CHAR;
path: ARRAY [0..63] OF CHAR;
curIOMode: IOMode;
curChar: CHAR;
fhint: HiddenFileInfo;
END;
VAR
| legalNum: BOOLEAN; (* read only *) PROCEDURE LastResultCode(): INTEGER;
neverOpenedFile: TextFile; (* read only *)
PROCEDURE GetExistingFile( VAR f: TextFile; prompt: ARRAY OF CHAR );
PROCEDURE CreateNewFile( VAR f: TextFile; prompt, defaultName: ARRAY OF CHAR );
PROCEDURE Lookup( VAR f: TextFile; pathAndFileName: ARRAY OF CHAR; new: BOOLEAN );
| PROCEDURE ReadOnlyLookup( VAR f: TextFile; pathAndFileName: ARRAY OF CHAR );
| PROCEDURE Close( VAR f: TextFile ); PROCEDURE IsOpen( VAR f: TextFile ): BOOLEAN;
| PROCEDURE FileExists( VAR f: TextFile ): BOOLEAN; PROCEDURE FileLevel( VAR f: TextFile ): CARDINAL;
PROCEDURE Delete( VAR f: TextFile ); PROCEDURE Rename( VAR f: TextFile; filename: ARRAY OF CHAR );
PROCEDURE Reset( VAR f: TextFile ); PROCEDURE Rewrite( VAR f: TextFile );
| PROCEDURE AppendAtEOF( VAR f: TextFile ); PROCEDURE FileSize( VAR f: TextFile ): LONGINT;
PROCEDURE EOF( VAR f: TextFile ): BOOLEAN;
PROCEDURE ReadByte( VAR f: TextFile; VAR b: BYTE ); PROCEDURE WriteByte( VAR f: TextFile; b: BYTE );
PROCEDURE ReadChar( VAR f: TextFile; VAR ch: CHAR ); PROCEDURE WriteChar( VAR f: TextFile; ch: CHAR );
PROCEDURE ReadChars( VAR f: TextFile; VAR string: ARRAY OF CHAR ); PROCEDURE WriteChars( VAR f: TextFile; string: ARRAY OF CHAR );
| PROCEDURE WriteEOL( VAR f: TextFile ); PROCEDURE WriteVarChars( VAR f: TextFile; VAR string: ARRAY OF CHAR );
| PROCEDURE SkipGap( VAR f: TextFile ); PROCEDURE SkipGapWithinLn( VAR f: TextFile );
| PROCEDURE SkippedUpToToken (VAR f: TextFile ): BOOLEAN; PROCEDURE AtEOL( VAR f: TextFile ): BOOLEAN;
PROCEDURE Again( VAR f: TextFile );
PROCEDURE GetCardinal( VAR f: TextFile; VAR c: CARDINAL ); PROCEDURE GetLongCard( VAR f: TextFile; VAR c: LONGCARD );
PROCEDURE PutCardinal( VAR f:TextFile; c:CARDINAL; n:CARDINAL ); PROCEDURE PutLongCard( VAR f: TextFile; lc: LONGCARD;
n: CARDINAL );
PROCEDURE GetInteger( VAR f: TextFile; VAR i: INTEGER ); PROCEDURE GetLongInt( VAR f: TextFile; VAR i: LONGINT );
PROCEDURE PutInteger( VAR f: TextFile; i: INTEGER; n: CARDINAL ); PROCEDURE PutLongInt( VAR f: TextFile; li: LONGINT;
n:CARDINAL );
PROCEDURE GetReal( VAR f: TextFile; VAR x: REAL ); PROCEDURE GetLongReal( VAR f: TextFile; VAR x: LONGREAL );
PROCEDURE PutReal( VAR f: TextFile; x: REAL; n, dec: CARDINAL ); PROCEDURE PutRealSci( VAR f: TextFile; x: REAL; n: CARDINAL );
PROCEDURE PutLongReal( VAR f: TextFile; lr: LONGREAL; n,dec: CARDINAL );
PROCEDURE PutLongRealSci( VAR f: TextFile; lr: LONGREAL; n,dec: CARDINAL );
| PROCEDURE AlterIOMode (VAR f: TextFile; newMode: IOMode );
| PROCEDURE SetFilePos( VAR f: TextFile; pos: LONGINT ); PROCEDURE GetFilePos( VAR f: TextFile; VAR pos: LONGINT );
| PROCEDURE ReadByteBlock ( VAR f: TextFile; VAR buf: ARRAY OF BYTE; VAR count: LONGINT );
| PROCEDURE WriteByteBlock( VAR f: TextFile; VAR buf: ARRAY OF BYTE; VAR count: LONGINT );
| PROCEDURE SetFileFilter( f1,f2,f3,f4: ARRAY OF CHAR ); PROCEDURE GetFileFilter( VAR f1,f2,f3,f4: ARRAY OF CHAR );
| PROCEDURE UseAsTypeAndCreator( filetype,creator: ARRAY OF CHAR ); PROCEDURE UsedTypeAndCreator( VAR filetype,creator: ARRAY OF CHAR );
| PROCEDURE HasTypeAndCreator( VAR f: TextFile; VAR filetype,creator: ARRAY OF CHAR );
(*=========================================== DMFloatEnv ===========================================*)
CONST
invalid = 0; underflow = 1; overflow = 2; divideByZero = 3; inexact = 4;
haltIfInvalid = 0; haltIfUnderflow = 1; haltIfOverflow = 2; haltIfDivideByZero = 3; haltIfInexact = 4;
flagIfInvalid = 8; flagIfUnderflow = 9; flagIfOverflow = 10; flagIfDivideByZero = 11; flagIfInexact = 12;
IEEEFloatDefaultEnv = {};
DMFloatDefaultEnv = {haltIfInvalid, haltIfOverflow, haltIfDivideByZero};
TYPE
Exception = [invalid..inexact]; FloatEnvironment = BITSET;
RoundDir = (toNearest, upward, downward, towardZero); RoundPre = (extPrecision, dblPrecision, sglPrecision);
PROCEDURE HaltEnabled( which: Exception ): BOOLEAN;
PROCEDURE EnableHalt( which: Exception ); PROCEDURE DisableHalt( which: Exception );
PROCEDURE ExceptionPending( which: Exception ): BOOLEAN;
PROCEDURE RaiseException( which: Exception ); PROCEDURE ClearException( which: Exception );
PROCEDURE SetPrecision( p: RoundPre ); PROCEDURE GetPrecision( VAR p: RoundPre );
PROCEDURE SetRound( r: RoundDir ); PROCEDURE GetRound( VAR r: RoundDir );
PROCEDURE GetEnvironment( VAR e: FloatEnvironment ); PROCEDURE SetEnvironment( e: FloatEnvironment );
PROCEDURE ProcEntry( VAR savedEnv: FloatEnvironment ); PROCEDURE ProcExit( savedEnv: FloatEnvironment );
PROCEDURE REALMachineEpsilon(): REAL; PROCEDURE TheoreticalREALMachineEpsilon(): REAL;
PROCEDURE LONGREALMachineEpsilon(): LONGREAL; PROCEDURE TheoreticalLONGREALMachineEpsilon(): LONGREAL;
PROCEDURE DRFromHex(dw0,dw1: LONGCARD): LONGREAL; PROCEDURE MachineIsBigEndian(): BOOLEAN;
(*=========================================== DMKeyChars ===========================================*)
| CONST mouse=0; command=1; alt=1; option=2; shift=3; capslock=4; control=5;
| VAR
| cursorUp, cursorDown, cursorLeft, cursorRight, homeKey, endKey, pageUp, pageDown, helpKey,
| enter, return, delete, backspace, tab, esc, hardBlank: CHAR; (* READ ONLY! *)
| VAR BestCH: PROCEDURE(CHAR): CHAR; (* READ ONLY! *)
| TYPE ComputerPlatform = (Mac, IBMPCCompatible, UNIXMachine);
| PROCEDURE ProgrammedOn( c: ComputerPlatform );
| PROCEDURE PCCHAR( macCh: CHAR ): CHAR; PROCEDURE MacCHAR( pcCh: CHAR ): CHAR;
| PROCEDURE PCASCII( pcCh: CHAR ): CHAR; PROCEDURE MacASCII( macCh: CHAR ): CHAR;
(*=========================================== DMMathLib ===========================================*)
PROCEDURE Sqrt ( x: REAL ): REAL;
PROCEDURE Exp ( x: REAL ): REAL; PROCEDURE Ln ( x: REAL ): REAL;
PROCEDURE Sin ( x: REAL ): REAL; PROCEDURE Cos ( x: REAL ): REAL;
PROCEDURE ArcTan( x: REAL ): REAL;
PROCEDURE Real ( x: INTEGER ): REAL; PROCEDURE Entier( x: REAL ): INTEGER;
| PROCEDURE Randomize;
PROCEDURE RandomInt( upperBound: INTEGER ): INTEGER;
PROCEDURE RandomReal(): REAL;
(*=========================================== DMMathLF ===========================================*)
PROCEDURE Sqrt ( x: REAL ): REAL;
PROCEDURE Exp ( x: REAL ): REAL; PROCEDURE Ln ( x: REAL ): REAL;
PROCEDURE Sin ( x: REAL ): REAL; PROCEDURE Cos ( x: REAL ): REAL;
PROCEDURE ArcTan( x: REAL ): REAL;
PROCEDURE Real ( x: INTEGER ): REAL; PROCEDURE Entier( x: REAL ): INTEGER;
| PROCEDURE Randomize;
PROCEDURE RandomInt( upperBound: INTEGER ): INTEGER;
PROCEDURE RandomReal(): REAL;
(*=========================================== DMLongMathLib ===========================================*)
| PROCEDURE LongSqrt ( x: LONGREAL ): LONGREAL;
| PROCEDURE LongExp ( x: LONGREAL ): LONGREAL; PROCEDURE LongLn ( x: LONGREAL ): LONGREAL;
| PROCEDURE LongSin ( x: LONGREAL ): LONGREAL; PROCEDURE LongCos ( x: LONGREAL ): LONGREAL;
| PROCEDURE LongArcTan( x: LONGREAL ): LONGREAL;
| PROCEDURE LongReal ( x: LONGINT ): LONGREAL; PROCEDURE LongEntier( x: LONGREAL ): LONGINT;
(*=========================================== DMOpSys ===========================================*)
| CONST noError = 0; notDone = -2; inexistent = -1; notOpen = 0; readOnly = 1; alreadyWrite = 2; (* codes returned by CurrentFileUse*)
| TYPE ProgStatus = (regular, moduleNotFound, fileNotFound, illegalKey, readError, badSyntax, noMemory, alreadyLoaded,
| killed, tooManyPrograms, continue, noApplication);
| DirectoryProc = PROCEDURE (INTEGER, ARRAY OF CHAR, BOOLEAN, VAR BOOLEAN);
| MessageResponder = PROCEDURE (ARRAY OF CHAR, ARRAY OF CHAR, INTEGER);
| InitDocuHandlingProc = PROCEDURE (INTEGER); DocuHandler = PROCEDURE (INTEGER, ARRAY OF CHAR, ARRAY OF CHAR, VAR BOOLEAN);
| VAR profileFName: ARRAY [0..127] OF CHAR;
| PROCEDURE EjectDisk( volName: ARRAY OF CHAR; VAR ok: BOOLEAN );
| PROCEDURE GetStartupVolName( VAR volName: ARRAY OF CHAR );
| PROCEDURE CurWorkDirectory( VAR path: ARRAY OF CHAR );
| PROCEDURE GetLastResultCode(): INTEGER;
| PROCEDURE CreateDir( path, dirN: ARRAY OF CHAR; VAR done: BOOLEAN );
| PROCEDURE DeleteDir( path, dirN: ARRAY OF CHAR; VAR done: BOOLEAN );
| PROCEDURE RenameDir( path, oldDirN, newDirN: ARRAY OF CHAR; VAR done: BOOLEAN );
| PROCEDURE DirInfo( path, dirN: ARRAY OF CHAR; VAR dirExists, containsFiles : BOOLEAN );
| PROCEDURE DoForAllFilesInDirectory( path: ARRAY OF CHAR; dp: DirectoryProc );
| PROCEDURE CurrentFileUse ( path,fileName: ARRAY OF CHAR ): INTEGER;
| PROCEDURE GetFileDialog( prompt,fileTypes: ARRAY OF CHAR; VAR path,fileName: ARRAY OF CHAR ): BOOLEAN;
| PROCEDURE GetApplication( VAR path, applName: ARRAY OF CHAR ): BOOLEAN;
| PROCEDURE GetFileTypeAndCreator( path,fn: ARRAY OF CHAR; VAR type,creator: ARRAY OF CHAR );
| PROCEDURE SetFileTypeAndCreator( path,fn: ARRAY OF CHAR; type,creator: ARRAY OF CHAR );
| PROCEDURE HasCustomIcon (path,fn: ARRAY OF CHAR ): BOOLEAN;
| PROCEDURE SetCustomIconFlag (path,fn: ARRAY OF CHAR; cif: BOOLEAN );
| PROCEDURE GetFileDates( path,fn: ARRAY OF CHAR; VAR creationDate,modificationDate: LONGINT );
| PROCEDURE SetFileDates( path,fn: ARRAY OF CHAR; creationDate,modificationDate: LONGINT );
| PROCEDURE NowSeconds(): LONGINT;
| PROCEDURE TouchFileDate( path,fn: ARRAY OF CHAR );
| PROCEDURE CopyResourceFork( sourcePath,sourceFn, destPath, destFn: ARRAY OF CHAR; VAR done: BOOLEAN );
| PROCEDURE CopyDataFork ( sourcePath,sourceFn, destPath, destFn: ARRAY OF CHAR; VAR done: BOOLEAN );
| PROCEDURE GetNameOfRunningApplication (VAR name: ARRAY OF CHAR );
| PROCEDURE InstallInitDocuOpening ( idhp: InitDocuHandlingProc ); PROCEDURE InstallOpenDocuHandler ( dh: DocuHandler );
| PROCEDURE InstallInitDocuPrinting( idhp: InitDocuHandlingProc ); PROCEDURE InstallPrintDocuHandler( dh: DocuHandler );
| PROCEDURE SubLaunch( path, prog: ARRAY OF CHAR );
| PROCEDURE Transfer( path, prog: ARRAY OF CHAR );
| PROCEDURE ExecuteForResult( command: ARRAY OF CHAR; VAR result: ARRAY OF CHAR );
| PROCEDURE IsForegroundProgram(): BOOLEAN; PROCEDURE BringProgramToForeground;
| PROCEDURE PutProgramIntoBackground; PROCEDURE QuitDialogMachineInBackground;
| PROCEDURE SetMessageResponder( mr: MessageResponder ); PROCEDURE GetMessageResponder( VAR mr: MessageResponder );
| PROCEDURE SignalMessageToApplication( creatorOfAppl, eventClass, eventID: ARRAY OF CHAR; msgVal: INTEGER; VAR resultCode: INTEGER );
| PROCEDURE EmulateKeyPress( ch: CHAR; modifier: BITSET );
| PROCEDURE EmulateMenuSelection( aliasChar: CHAR );
| PROCEDURE EmulateMouseDown( x,y: INTEGER; modifier: BITSET );
| PROCEDURE TurnMachineOff; PROCEDURE RestartMachine;
| PROCEDURE SetNewPaths;
| PROCEDURE EmulateMacMETHCopyProtection;
| PROCEDURE CallDMSubProg( prog: ARRAY OF CHAR; leaveLoaded: BOOLEAN; VAR st: ProgStatus );
| PROCEDURE CallM2SubProg( prog: ARRAY OF CHAR; leaveLoaded: BOOLEAN; VAR st: ProgStatus );
| PROCEDURE IncludeLibModules( prog: ARRAY OF CHAR; VAR st: ProgStatus );
| PROCEDURE UnLoadM2Progs; |
| PROCEDURE AbortM2Prog( st: ProgStatus );
| PROCEDURE SetCompilerFileTypes( creator, sbmType, obmType, rfmType: ARRAY OF CHAR );
| PROCEDURE GetCompilerFileTypes( VAR creator, sbmType, obmType, rfmType: ARRAY OF CHAR );
(*=========================================== DMPortab ===========================================*)
| VAR zero, one, two, ten, hundred, thousand : LONGREAL; (* read only *)
| zeroLI, oneLI,twoLI, tenLI, hundredLI, thousandLI: LONGINT; (* read only *)
| PROCEDURE SameProc( p1, p2: ARRAY OF BYTE ): BOOLEAN;
| PROCEDURE LIFLOAT( x: LONGINT ): LONGREAL; PROCEDURE LCFLOAT( x: LONGCARD ): LONGREAL;
| PROCEDURE LITRUNC( x: LONGREAL ): LONGINT; PROCEDURE LCTRUNC( x: LONGREAL ): LONGCARD;
| PROCEDURE LONGINTConst ( str: ARRAY OF CHAR ): LONGINT;
| PROCEDURE LONGCARDConst( str: ARRAY OF CHAR ): LONGCARD;
| PROCEDURE LONGREALConst( str: ARRAY OF CHAR ): LONGREAL;
| PROCEDURE LI( x: INTEGER ): LONGINT; PROCEDURE SI( x: LONGINT ): INTEGER;
| PROCEDURE LC( x: CARDINAL ): LONGCARD; PROCEDURE SC( x: LONGCARD ): CARDINAL;
| PROCEDURE LR( x: REAL ): LONGREAL; PROCEDURE SR( x: LONGREAL ): REAL;
(*=========================================== DMPrinting ===========================================*)
| TYPE PrinterFont = (chicago, newYork, geneva, monaco, times, helvetica, courier, symbol);
| VAR PrintingDone: BOOLEAN;
PROCEDURE PageSetup; PROCEDURE SetHeaderText( h: ARRAY OF CHAR );
PROCEDURE SetSubHeaderText( sh: ARRAY OF CHAR ); PROCEDURE SetFooterText( f: ARRAY OF CHAR );
PROCEDURE PrintPicture;
| PROCEDURE PrintText( font: PrinterFont; fontSize: INTEGER; tabwidth: INTEGER );
(*=========================================== DMPTFiles ===========================================*)
| VAR PTFileDone: BOOLEAN;
| PROCEDURE DumpPicture( VAR f: TextFile );
| PROCEDURE LoadPicture( VAR f: TextFile; simulDisplay: BOOLEAN; destRect: RectArea );
| PROCEDURE DumpText( VAR f: TextFile );
| PROCEDURE LoadText( VAR f: TextFile; simulDisplay: BOOLEAN; destRect: RectArea; fromLine: LONGINT );
(*=========================================== DMResources ===========================================*)
| CONST nulCh = 21C;
| TYPE ResourcePointer = POINTER TO Resource; Resource = ARRAY [0..32000] OF CHAR; Padding = (noPadding, padToEven, padToOdd);
| VAR theResource: ResourcePointer; ResourcesDone: BOOLEAN;
| PROCEDURE StartResourceComposition; PROCEDURE CurPosition(): INTEGER;
| PROCEDURE AddBoolean( b: BOOLEAN );
| PROCEDURE AddInt( int: INTEGER ); PROCEDURE AddLongInt( lint: LONGINT );
| PROCEDURE AddHexInt( int: INTEGER ); PROCEDURE AddHexLongInt (lint: LONGINT );
| PROCEDURE AddBinInt( int: INTEGER ); PROCEDURE AddBinLongInt( lint: LONGINT );
| PROCEDURE AddReal( r: REAL ); PROCEDURE AddLongReal( lr: LONGREAL );
| PROCEDURE AddHexReal( r: REAL ); PROCEDURE AddHexLongReal( lr: LONGREAL );
| PROCEDURE AddBinReal( r: REAL ); PROCEDURE AddBinLongReal( lr: LONGREAL );
| PROCEDURE AddChar( ch: CHAR ); PROCEDURE AddString( s: ARRAY OF CHAR );
| PROCEDURE AddString255( s: ARRAY OF CHAR; pad: Padding );
| PROCEDURE OverWriteAtPos (VAR x: ARRAY OF BYTE; VAR theResource: ARRAY OF CHAR; VAR curPos: INTEGER );
| PROCEDURE StoreResource( filename: ARRAY OF CHAR; resID: INTEGER );
| PROCEDURE RetrieveResource( filename: ARRAY OF CHAR; resID: INTEGER );
| PROCEDURE FetchBoolean( VAR b: BOOLEAN );
| PROCEDURE FetchInt( VAR int: INTEGER ); PROCEDURE FetchLongInt( VAR lint: LONGINT );
| PROCEDURE FetchHexInt( VAR int: INTEGER ); PROCEDURE FetchHexLongInt( VAR lint: LONGINT );
| PROCEDURE FetchBinInt( VAR int: INTEGER ); PROCEDURE FetchBinLongInt( VAR lint: LONGINT );
| PROCEDURE FetchReal( VAR r: REAL ); PROCEDURE FetchLongReal( VAR lr: LONGREAL );
| PROCEDURE FetchHexReal( VAR r: REAL ); PROCEDURE FetchHexLongReal( VAR lr: LONGREAL );
| PROCEDURE FetchBinReal( VAR r: REAL ); PROCEDURE FetchBinLongReal( VAR lr: LONGREAL );
| PROCEDURE FetchChar( VAR ch: CHAR ); PROCEDURE FetchString( VAR s: ARRAY OF CHAR );
| PROCEDURE FetchString255( VAR s: ARRAY OF CHAR; pad: Padding );
| PROCEDURE DeleteResource( filename: ARRAY OF CHAR; resID: INTEGER );
| PROCEDURE SetResourceName( fileName: ARRAY OF CHAR; resID: INTEGER; name: ARRAY OF CHAR );
| PROCEDURE GetResourceName( fileName: ARRAY OF CHAR; resID: INTEGER; VAR name: ARRAY OF CHAR );
| PROCEDURE SetResourceType( type: ARRAY OF CHAR );
| PROCEDURE GetResourceType( VAR type: ARRAY OF CHAR );
(*=========================================== DMTextFields ===========================================*)
| TYPE TextPointer = POINTER TO TextSegment; TextSegment = ARRAY [0..32000] OF CHAR;
| PROCEDURE RedefineTextField( textField: EditItem; wf: WindowFrame; withFrame: BOOLEAN );
| PROCEDURE WrapText( textField: EditItem; wrap: BOOLEAN );
| PROCEDURE CopyWTextIntoTextField( textField: EditItem; VAR done: BOOLEAN );
| PROCEDURE CopyTextFromFieldToWText( textField: EditItem );
| PROCEDURE SetSelection( textField: EditItem; beforeCh,afterCh: INTEGER );
| PROCEDURE GetSelection( textField: EditItem; VAR beforeCh,afterCh: INTEGER );
| PROCEDURE GetSelectedChars( textField: EditItem; VAR text: ARRAY OF CHAR );
| PROCEDURE DeleteSelection( textField: EditItem );
| PROCEDURE InsertBeforeCh( textField: EditItem; VAR text: ARRAY OF CHAR; beforeCh: INTEGER );
| PROCEDURE GetTextSizes( textField: EditItem; VAR curTextLength, nrLns, charHeight, firstLnVis,lastLnVis: INTEGER );
| PROCEDURE GrabText( textField: EditItem; VAR txtbeg: TextPointer; VAR curTextLength: INTEGER );
| PROCEDURE ReleaseText( textField: EditItem );
| PROCEDURE FindInText( textField: EditItem; stringToFind: ARRAY OF CHAR; VAR firstCh,lastCh: INTEGER ): BOOLEAN;
| PROCEDURE ScrollText( textField: EditItem; dcols,dlines: INTEGER );
| PROCEDURE ScrollTextWithWindowScrollBars( textField: EditItem );
| PROCEDURE AddScrollBarsToText( textField: EditItem; withVerticalScrollBar, withHorizontalScrollBar: BOOLEAN );
(*=========================================== DMWPictIO ===========================================*)
| VAR PictIODone: BOOLEAN;
PROCEDURE StartPictureSave; PROCEDURE StopPictureSave;
PROCEDURE PausePictureSave; PROCEDURE ResumePictureSave;
| PROCEDURE DisplayPicture( ownerWindow: Window; destRect: RectArea ); PROCEDURE DiscardPicture;
PROCEDURE SetPictureArea( r: RectArea ); PROCEDURE GetPictureArea( VAR r: RectArea );
| PROCEDURE SetHairLineWidth( f: REAL ); PROCEDURE GetHairLineWidth( VAR f: REAL );
(*=========================================== DMWTextIO ===========================================*)
| VAR TextIODone: BOOLEAN;
| PROCEDURE StartTextSave; PROCEDURE StopTextSave;
| PROCEDURE PauseTextSave; PROCEDURE ResumeTextSave;
| PROCEDURE DisplayText( ownerWindow: Window; destRect: RectArea; fromLine: LONGINT ); PROCEDURE DiscardText;
| PROCEDURE GrabWText( VAR txtbeg: ADDRESS; VAR curTextLength: LONGINT ); PROCEDURE ReleaseWText;
| PROCEDURE AppendWText( txtbeg: ADDRESS; length: LONGINT ); PROCEDURE SetWTextSize( newTextLength: LONGINT );
(* =============================================== E N D ================================================ *)
The Dialog Machine may be freely copied but not for profit!