| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493 |
- Listing:
- 1 IMPLEMENTATION MODULE FramePainter;
- 2 (*
- 3 * REPERTOIRE
- 4 * Release 1.6
- 5 * By Charles Bradford and Cole Brecheen
- 6 * (c) Copyright 1985-1992 PMI
- 7 * Green Bay, Wisconsin
- 8 * All rights reserved
- 9 * (414) 468-6040
- 10 *
- 11 * $Header: D:/logfiles/mods/framepai.mov 1.6 17 Mar 1991 17:55:28 coleb $
- 12 *
- 13 *)
- 14
- 15
- 16 IMPORT FrameManager;
- 17 IMPORT GenLists;
- 18 IMPORT Key;
- 19 IMPORT LowLevel;
- 20 IMPORT M2Strings;
- 21 IMPORT MsColors;
- 22 IMPORT Numbers;
- 23 IMPORT FAPI;
- 24 IMPORT PosUtils;
- 25 IMPORT Rectangles;
- 26 IMPORT ScrnTypes;
- 27 IMPORT ScrnUtl1;
- 28 IMPORT StrEdit;
- 29 IMPORT SYSTEM;
- 30 IMPORT VWindows;
- 31
- 32 VAR
- 33 Initialized : BOOLEAN;
- 34
- 35 PROCEDURE Init();
- 36 BEGIN
- 37 IF Initialized THEN
- 38 RETURN;
- 39 ELSE
- 40 Initialized := TRUE;
- 41 END;
- 42 FrameManager.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 43 GenLists.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 44 Key.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 45 LowLevel.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 46 M2Strings.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 47 MsColors.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 48 Numbers.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 49 PosUtils.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 50 Rectangles.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 51 ScrnTypes.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 52 ScrnUtl1.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 53 StrEdit.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 54 VWindows.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 55 END Init;
- ***** ^ not supported yet
- 56
- 57
- 58 PROCEDURE InColorMode(): BOOLEAN;
- 59 VAR
- 60 ModeData: FAPI.VIOMODEINFO;
- ***** ^ not supported yet
- 61 BEGIN
- 62 ModeData.cb := SYSTEM.TSIZE(FAPI.VIOMODEINFO);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 63 IF FAPI.VIOGETMODE(SYSTEM.ADR(ModeData), 0) # 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 64 RETURN FALSE;
- 65 END;
- 66
- 67 IF ModeData.color = FAPI.UCHAR(0) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 68 RETURN FALSE;
- 69 ELSE
- 70 RETURN TRUE;
- 71 END;
- 72 END InColorMode;
- ***** ^ not supported yet
- 73
- 74
- 75 PROCEDURE DrawLine( col1, row1, col2, row2: CARDINAL; TheChar:
- 76 CHAR );
- 77 VAR
- 78 row : CARDINAL;
- 79 linestr : ARRAY [0..80] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 80 BEGIN
- 81 IF col1 < col2 THEN
- 82 (*We're drawing a horizontal line.*)
- 83 LowLevel.Fill( SYSTEM.ADR(linestr), 1+HIGH(linestr), TheChar);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 84 StrEdit.SetLength( linestr, col2 - col1 +1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 85 VWindows.DrawStr( VWindows.CurrentWindow, col1, row1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 86 SYSTEM.ADR(linestr), col2 - col1 + 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 87 ELSE
- 88 (*We're drawing a vertical line.*)
- 89 FOR row := row1 TO row2 DO
- 90 VWindows.DrawStr( VWindows.CurrentWindow, col1, row,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 91 SYSTEM.ADR(TheChar), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 92 END;
- 93 END;
- 94 END DrawLine;
- ***** ^ not supported yet
- 95
- 96
- 97 PROCEDURE GetFrameCoords( TheFrame: ScrnTypes.DisplayFrame; VAR
- ***** ^ not supported yet
- 98 rect: Rectangles.ARectangle );
- ***** ^ not supported yet
- 99 BEGIN
- 100 Rectangles.DefineRectangle( rect, TheFrame^.startcol +
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 101 1, TheFrame^.startrow + 1, TheFrame^.endcol + 1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 102 TheFrame^.endrow + 1 )
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 103 END GetFrameCoords;
- ***** ^ not supported yet
- 104
- 105
- 106 PROCEDURE RedrawEdField( TheFrame: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 107 FieldCount: CARDINAL; VAR area: Rectangles.ARectangle;
- ***** ^ not supported yet
- 108 Selected: BOOLEAN );
- 109 VAR
- 110 cnt, TypeCode, AbsCol, AbsRow, TmpLength,
- 111 EdFieldHeight, EdFieldWidth : CARDINAL;
- 112 TmpList: GenLists.GenList;
- ***** ^ not supported yet
- 113 TmpAdr: SYSTEM.ADDRESS;
- ***** ^ not supported yet
- 114 EdArea, intersection : Rectangles.ARectangle;
- ***** ^ not supported yet
- 115
- 116 PROCEDURE DrawPartOfStr( StrAdr: SYSTEM.ADDRESS; StrSize, col,
- ***** ^ not supported yet
- 117 row: CARDINAL; VAR area: Rectangles.ARectangle );
- ***** ^ not supported yet
- 118 VAR
- 119 StrArea, intersection : Rectangles.ARectangle;
- ***** ^ not supported yet
- 120 LeadChop: CARDINAL;
- 121 BEGIN
- 122 StrSize := LowLevel.ScanEQ( StrSize, 0C, StrAdr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 123 Rectangles.DefineRectangle( StrArea, col, row, col +
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 124 StrSize - 1, row );
- ***** ^ not supported yet
- 125 IF Rectangles.RectsIntersect( StrArea, area, intersection ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 126 IF StrSize # 0 THEN
- 127 (* Added this test 8 Nov 88 at suggestion of John
- 128 McMonagle because DrawStr does a NullScan if last
- 129 parameter is 0. *)
- 130 IF intersection.col1 > INTEGER(col) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 131 LeadChop := CARDINAL(intersection.col1) - col;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 132 ELSE
- 133 LeadChop := 0;
- 134 END;
- 135 VWindows.DrawStr( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 136 intersection.col1, intersection.row1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 137 LowLevel.AddAddr(StrAdr, LeadChop), (intersection.col2 -
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 138 intersection.col1) + 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 139 END;
- 140 END;
- 141 END DrawPartOfStr;
- ***** ^ not supported yet
- 142
- 143 BEGIN
- 144 AbsRow := ScrnUtl1.AbsFieldRow( TheFrame, FieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 145 AbsCol := ScrnUtl1.AbsFieldCol( TheFrame, FieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 146 ScrnUtl1.GetEdField( TheFrame, FieldCount, TmpList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 147 IF Selected THEN
- 148 ScrnUtl1.SetPointerBarColors( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 149 ELSE
- 150 ScrnUtl1.SetFieldColors( TheFrame, FieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 151 END;
- 152
- 153 EdFieldHeight := ScrnUtl1.FieldHeight( TheFrame, FieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 154 EdFieldWidth := ScrnUtl1.FieldWidth( TheFrame, FieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 155 Rectangles.DefineRectangle( EdArea, AbsCol, AbsRow, AbsCol
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 156 + EdFieldWidth - 1, AbsRow + EdFieldHeight - 1 );
- ***** ^ not supported yet
- 157 IF Rectangles.RectsIntersect( EdArea, area, intersection ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 158 VWindows.ClearPart( TheFrame^.WindowHandle, intersection.col1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 159 intersection.row1, intersection.col2, intersection.row2 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 160 END;
- 161
- 162 EdFieldHeight := Numbers.Min( EdFieldHeight,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 163 GenLists.ListLength( TmpList ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 164 (*EdFieldHeight gets the lesser of the full height
- 165 of the editor window or the number of lines
- 166 presently in it.*)
- 167
- 168 FOR cnt := 1 TO EdFieldHeight DO
- 169 (* write each row in editor window *)
- 170 GenLists.GetElmtAdr( TmpList, cnt, TmpAdr, TmpLength,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 171 TypeCode );
- ***** ^ not supported yet
- 172 DrawPartOfStr( TmpAdr, TmpLength, AbsCol,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 173 CARDINAL(AbsRow) + cnt - 1, intersection );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 174 END;
- 175 END RedrawEdField;
- ***** ^ not supported yet
- 176
- 177
- 178
- 179 PROCEDURE RedrawArea( TheFrame: ScrnTypes.DisplayFrame; col1,
- ***** ^ not supported yet
- 180 row1, col2, row2: CARDINAL );
- 181 VAR
- 182 inside: BOOLEAN;
- 183 FrameRect, TheArea, intersection, EdRect,
- 184 EdToDraw: Rectangles.ARectangle;
- ***** ^ not supported yet
- 185 TmpFieldPtr: ScrnTypes.InputFieldPtr;
- ***** ^ not supported yet
- 186 ImagePtr: ScrnTypes.ImageElmtPtr;
- ***** ^ not supported yet
- 187 tmprow, tmpcol, tmpfield, LeadChop, EdFieldCount, ImageCount,
- 188 FieldListEnd, ImageListEnd,
- 189 TmpLength: CARDINAL;
- 190 EdFieldHeight, EdFieldWidth, AbsoluteRow, AbsoluteCol: INTEGER;
- 191 TheBox : VWindows.BoxStr;
- ***** ^ not supported yet
- 192 tmpforeg, tmpbackg: MsColors.AColor;
- ***** ^ not supported yet
- 193 tmpatrb: MsColors.AMonoAttribute;
- ***** ^ not supported yet
- 194 BEGIN
- 195 (* First, we find each field that's in the area we have to
- 196 redraw, taking TheFrame^.RowsScrolled and
- 197 TheFrame^.ColsScrolled into account.*)
- 198 GetFrameCoords( TheFrame, FrameRect );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 199 Rectangles.DefineRectangle( TheArea, col1, row1, col2, row2 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 200 (* We could check here to make sure TheArea is inside
- 201 FrameRect, but we'll let the caller be responsible for
- 202 that. *)
- 203 IF TheFrame^.ClearFirst THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 204 (* clear underlying window if this screen is "ClearFirst" *)
- 205 ScrnUtl1.SetNormalColors( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 206 VWindows.ClearPart( TheFrame^.WindowHandle, col1, row1, col2, row2 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 207 END;
- 208 IF TheFrame^.EntryBox[0] # 0C THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 209 (* Oh no. We may have to restore some or all of the box. *)
- 210 Rectangles.ShrinkRect( FrameRect );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 211 IF Rectangles.RectIsInside( TheArea, FrameRect ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 212 (* Breathe sigh of relief. TheArea does not extend
- 213 into the box. *)
- 214 Rectangles.ExpandRect( FrameRect );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 215 ELSE
- 216 Rectangles.ExpandRect( FrameRect );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 217 IF Rectangles.RectsIntersect( FrameRect, TheArea, intersection ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 218 (* Actually, we already know they intersect; this just computes
- 219 the intersection for us. *)
- 220 END;
- 221 (* The code below is temporarily determining whether
- 222 the frame is active from capitalization of the
- 223 .action char. If it's uppercase, we know the
- 224 frame is inactive, so we redraw the ExitBox. *)
- 225 IF TheFrame^.action <= 'Z' THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 226 TheBox := TheFrame^.ExitBox;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 227 ELSE
- 228 TheBox := TheFrame^.EntryBox;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 229 END;
- 230 ScrnUtl1.SetBorderColors( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 231 IF TheArea.col2 >= FrameRect.col2 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 232 DEC( col2 );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 233 (* We're doing something tricky here. We know
- 234 there's a box, and we know the area to be
- 235 redrawn extends into it on the right side, so
- 236 that means we also know that col2 is wrong--the
- 237 area to be redrawn is actually one column less
- 238 wide than we had supposed. *)
- 239 DrawLine( intersection.col2, intersection.row1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 240 intersection.col2, intersection.row2, TheBox[4] );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 241 IF intersection.row1 = FrameRect.row1 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 242 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 243 intersection.row1, SYSTEM.ADR(TheBox[2]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 244 END;
- 245 IF intersection.row2 = FrameRect.row2 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 246 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 247 intersection.row2, SYSTEM.ADR(TheBox[7]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 248 END;
- 249 END;
- 250 IF TheArea.col1 <= FrameRect.col1 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 251 INC( col1 );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 252 DrawLine( intersection.col1, intersection.row1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 253 intersection.col1, intersection.row2, TheBox[3] );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 254 IF intersection.row1 = FrameRect.row1 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 255 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 256 intersection.row1, SYSTEM.ADR(TheBox[0]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 257 END;
- 258 IF intersection.row2 = FrameRect.row2 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 259 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 260 intersection.row2, SYSTEM.ADR(TheBox[5]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 261 END;
- 262 END;
- 263 IF TheArea.row2 >= FrameRect.row2 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 264 DEC( row2 );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 265 DrawLine( intersection.col1, intersection.row2,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 266 intersection.col2, intersection.row2, TheBox[6] );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 267 IF intersection.col1 = FrameRect.col1 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 268 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 269 intersection.row2, SYSTEM.ADR(TheBox[5]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 270 END;
- 271 IF intersection.col2 = FrameRect.col2 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 272 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 273 intersection.row2, SYSTEM.ADR(TheBox[7]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 274 END;
- 275 END;
- 276 IF TheArea.row1 <= FrameRect.row1 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 277 INC( row1 );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 278 DrawLine( intersection.col1, intersection.row1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 279 intersection.col2, intersection.row1, TheBox[1] );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 280 IF intersection.col1 = FrameRect.col1 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 281 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 282 intersection.row1, SYSTEM.ADR(TheBox[0]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 283 END;
- 284 IF intersection.col2 = FrameRect.col2 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 285 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 286 intersection.row1, SYSTEM.ADR(TheBox[2]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 287 END;
- 288 END;
- 289 ScrnUtl1.SetNormalColors( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 290 END;
- 291 END;
- 292 IF NOT GenLists.Initialized( TheFrame^.ImageList ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 293 RETURN;
- 294 END;
- 295 EdFieldCount := 0;
- 296 ImageCount := 1;
- 297 ImageListEnd := ScrnUtl1.NumberOfImages( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 298 WHILE ImageCount <= ImageListEnd DO
- 299 ScrnUtl1.GetImagePtr( TheFrame, ImageCount, ImagePtr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 300 TmpLength := M2Strings.Length(ImagePtr^.text);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 301 tmprow := ImagePtr^.row;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 302 tmpcol := ImagePtr^.col;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 303 tmpfield := ImagePtr^.field;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 304 tmpforeg := ImagePtr^.foreg;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 305 tmpbackg := ImagePtr^.backg;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 306 tmpatrb := ImagePtr^.atrb;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 307
- 308 ScrnUtl1.DecodeWord( tmprow );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 309 ScrnUtl1.DecodeWord( tmpcol );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 310 ScrnUtl1.DecodeWord( tmpfield );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 311 ScrnUtl1.DecodeByte( tmpforeg );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 312 ScrnUtl1.DecodeByte( tmpbackg );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 313 ScrnUtl1.DecodeByte( tmpatrb );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 314
- 315 IF tmprow <= TheFrame^.headline THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 316 (* Is this image element protected from scrolling? *)
- 317 AbsoluteRow := INTEGER(TheFrame^.startrow + tmprow);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 318 (* If so, it's always going to be in the same place; we
- 319 don't have to subtract RowsScrolled to find out where
- 320 to write it. *)
- 321 ELSE
- 322 (* This image element is not protected from scrolling; we
- 323 have to add the absolute starting row of the window and
- 324 then subtract RowsScrolled to find out where to write it. *)
- 325 AbsoluteRow := INTEGER(TheFrame^.startrow + tmprow)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 326 - INTEGER( TheFrame^.RowsScrolled );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 327 IF AbsoluteRow <= INTEGER(TheFrame^.startrow + TheFrame^.headline)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 328 THEN
- 329 (* Image element has been scrolled up out of the visible
- 330 part of the window; it's either underneath the area
- 331 protected by the headline, or it's above the window
- 332 altogether; could be negative. *)
- 333 AbsoluteRow := AbsoluteRow - INTEGER( TheFrame^.headline );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 334 END;
- 335 END;
- 336 (*A negative value for AbsoluteRow here indicates
- 337 that the field would have been scrolled off the top
- 338 of the screen.*)
- 339 AbsoluteCol := INTEGER(TheFrame^.startcol + tmpcol)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 340 - INTEGER( TheFrame^.ColsScrolled );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 341
- 342 LeadChop := 0;
- 343
- 344
- 345 IF (tmpfield # 0) THEN
- 346 ScrnUtl1.GetFieldPtr( TheFrame, tmpfield, TmpFieldPtr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 347 END;
- 348 IF (tmpfield # 0) AND (TmpFieldPtr^.typ = ScrnTypes.EditorCode) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 349 AbsoluteRow := ScrnUtl1.AbsFieldRow( TheFrame, tmpfield );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 350 AbsoluteCol := ScrnUtl1.AbsFieldCol( TheFrame, tmpfield );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 351 EdFieldHeight := ScrnUtl1.FieldHeight( TheFrame, tmpfield );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 352 EdFieldWidth := ScrnUtl1.FieldWidth( TheFrame, tmpfield );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 353 Rectangles.DefineRectangle(EdRect , AbsoluteCol, AbsoluteRow,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 354 (AbsoluteCol + EdFieldWidth) - 1,
- 355 (AbsoluteRow + EdFieldHeight) - 1 );
- ***** ^ not supported yet
- 356
- 357 inside := Rectangles.RectsIntersect(TheArea,EdRect,EdToDraw);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 358 ELSE
- 359 IF NOT Numbers.IntIsBetween(row1, AbsoluteRow, row2) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 360 inside := FALSE;
- 361 ELSIF (AbsoluteCol > INTEGER(col2)) THEN
- ***** ^ not supported yet
- 362 inside := FALSE;
- 363 ELSIF (AbsoluteCol < INTEGER(col1)) THEN
- ***** ^ not supported yet
- 364 IF (AbsoluteCol + INTEGER(TmpLength)) < INTEGER(col1) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 365 inside := FALSE;
- 366 ELSE
- 367 LeadChop := CARDINAL(INTEGER(col1) - AbsoluteCol);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 368 inside := TRUE;
- 369 END;
- 370 ELSE
- 371 inside := TRUE;
- 372 END;
- 373 END;
- 374
- 375 IF inside THEN
- 376 IF (tmpfield # 0) THEN
- 377 (* Uh oh. It's not a normal piece of text. *)
- 378 IF (TmpFieldPtr^.typ = ScrnTypes.GroupMember) AND
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 379 TmpFieldPtr^.selected THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 380 (* It's a choice field (member of a group) and it's
- 381 selected, so we use selection colors *)
- 382 ScrnUtl1.SetSelectionColors( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 383 ELSIF (TmpFieldPtr^.typ = ScrnTypes.EditorCode) AND
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 384 (EdFieldCount = 0) THEN
- 385 (* Note the first editor field, but don't write it. Editor
- 386 fields have to be written last because
- 387 lines below onto which the bottom part of the editor field
- 388 overlaps may not be in the background color. Spaces will
- 389 be written over them in whatever that color is, and we
- 390 don't want to wipe out the bottom of the editor field. *)
- 391 EdFieldCount := tmpfield;
- 392 ELSE
- 393 (* use normal colors for this field*)
- 394 ScrnUtl1.SetFieldColors( TheFrame, tmpfield );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 395 END;
- 396 ELSE
- 397 (* use normal colors for this field*)
- 398 VWindows.SetForeColor( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 399 tmpforeg );
- ***** ^ not supported yet
- 400 VWindows.SetBackColor( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 401 tmpbackg );
- ***** ^ not supported yet
- 402 VWindows.SetMonoAttr( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 403 tmpatrb );
- ***** ^ not supported yet
- 404 END;
- 405 IF (tmpfield = 0) OR (TmpFieldPtr^.typ # ScrnTypes.EditorCode) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 406 IF (AbsoluteCol + INTEGER(TmpLength)) >= (INTEGER(col2) + 1) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 407 (*If the string would extend past the right boundary.*)
- 408 TmpLength := CARDINAL((( INTEGER(col2) - AbsoluteCol)
- ***** ^ not supported yet
- 409 + 1) - INTEGER(LeadChop));
- ***** ^ not supported yet
- 410 VWindows.DrawStr( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 411 CARDINAL( (AbsoluteCol + INTEGER(LeadChop))),
- ***** ^ not supported yet
- ***** ^ not supported yet
- 412 CARDINAL(AbsoluteRow),
- ***** ^ not supported yet
- 413 LowLevel.AddAddr(SYSTEM.ADR(ImagePtr^.text),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 414 LeadChop), TmpLength );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 415 ELSE
- 416 VWindows.DrawStr( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 417 CARDINAL( (AbsoluteCol + INTEGER(LeadChop))),
- ***** ^ not supported yet
- ***** ^ not supported yet
- 418 CARDINAL(AbsoluteRow),
- ***** ^ not supported yet
- 419 LowLevel.AddAddr(SYSTEM.ADR(ImagePtr^.text),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 420 LeadChop), TmpLength - LeadChop );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 421 END;
- 422 END;
- 423 END;
- 424 INC( ImageCount );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 425 END;
- 426 IF EdFieldCount = 0 THEN
- 427 RETURN;
- 428 END;
- 429 FieldListEnd := ScrnUtl1.FieldListTotal( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 430 WHILE (EdFieldCount <= FieldListEnd) DO
- 431 ScrnUtl1.GetFieldPtr( TheFrame, EdFieldCount, TmpFieldPtr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 432 IF (TmpFieldPtr^.typ = ScrnTypes.EditorCode) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 433 (* It's an editor field. *)
- 434 AbsoluteRow := ScrnUtl1.AbsFieldRow( TheFrame, EdFieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 435 AbsoluteCol := ScrnUtl1.AbsFieldCol( TheFrame, EdFieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 436 EdFieldHeight := ScrnUtl1.FieldHeight( TheFrame, EdFieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 437 EdFieldWidth := ScrnUtl1.FieldWidth( TheFrame, EdFieldCount );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 438 Rectangles.DefineRectangle(EdRect , AbsoluteCol, AbsoluteRow,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 439 (AbsoluteCol + EdFieldWidth) - 1,
- 440 AbsoluteRow + EdFieldHeight - 1 );
- ***** ^ not supported yet
- 441 IF Rectangles.RectsIntersect(TheArea,EdRect,EdToDraw) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 442 (* We now know we have to display at least part of
- 443 the editor field *)
- 444 RedrawEdField( TheFrame, EdFieldCount, EdToDraw, FALSE );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 445 END;
- 446 END;
- 447 INC( EdFieldCount );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 448 END;
- 449 END RedrawArea;
- ***** ^ not supported yet
- 450
- 451
- 452 PROCEDURE RedrawField( TheFrame: ScrnTypes.DisplayFrame; TheField:
- ***** ^ not supported yet
- 453 CARDINAL; Selected: BOOLEAN );
- 454 (* Selected tells us whether the pointer bar is on this
- 455 field, not whether it's a selected member of a choice
- 456 group; we'll figure out the latter from the field
- 457 itself.*)
- 458 VAR
- 459 FieldRec: ScrnTypes.InputFieldRecord;
- ***** ^ not supported yet
- 460 ImageRec: ScrnTypes.ImageElement;
- ***** ^ not supported yet
- 461 spot : CARDINAL;
- 462 CurrentChoice, save : BOOLEAN;
- 463 SelChar: ARRAY [0..0] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 464 FrameArea : Rectangles.ARectangle;
- ***** ^ not supported yet
- 465 BEGIN
- 466 CurrentChoice := FALSE;
- 467 ScrnUtl1.GetFieldRec( TheFrame, TheField, FieldRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 468 ScrnUtl1.GetFieldImageRec( TheFrame, TheField, ImageRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 469 IF Selected THEN
- 470 ScrnUtl1.SetPointerBarColors( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 471 ELSIF (FieldRec.typ = ScrnTypes.GroupMember) AND
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 472 (FieldRec.selected) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 473 CurrentChoice := TRUE;
- 474 (* We do this to prevent selection character from being
- 475 highlighted if the choice is already selected. *)
- 476 ScrnUtl1.SetSelectionColors( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 477 ELSE
- 478 ScrnUtl1.SetFieldColors( TheFrame, TheField );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 479 END;
- 480 IF (FieldRec.typ = ScrnTypes.EditorCode) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 481 Rectangles.DefineRectangle( FrameArea, TheFrame^.startcol + 1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 482 TheFrame^.startrow + 1, TheFrame^.endcol + 1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 483 TheFrame^.endrow + 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 484 RedrawEdField( TheFrame, TheField, FrameArea, Selected );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 485 RETURN;
- 486 END;
- 487 ScrnUtl1.GetFieldImageRec( TheFrame, TheField, ImageRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 488 VWindows.DrawStr( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 489 ImageRec.col + TheFrame^.startcol - TheFrame^.ColsScrolled,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 490 ImageRec.row + TheFrame^.startrow - TheFrame^.RowsScrolled,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 491 SYSTEM.ADR(ImageRec.text), M2Strings.Length(ImageRec.text) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 492
- 493 (*Now hilite the selection character, if there is one.*)
- 494 IF CurrentChoice OR (Selected AND NOT InColorMode()) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 495
- 496 (*Don't bother if it's a choice field in selection
- 497 colors, and don't bother if the field is already
- 498 selected and the screen isn't in a color mode.*)
- 499 RETURN;
- 500 END;
- 501 IF (FieldRec.typ = ScrnTypes.GroupMember) AND
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 502 (FieldRec.ChoiceKey <= Key.Extended) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 503 SelChar[0] := CHR(FieldRec.ChoiceKey);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 504 ELSIF (FieldRec.typ = ScrnTypes.GotoCode) AND
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 505 (FieldRec.MenuKey <= Key.Extended) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 506 SelChar[0] := CHR(FieldRec.MenuKey);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 507 ELSE
- 508 RETURN;
- 509 END;
- 510 save := PosUtils.CaseSensitive;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 511 PosUtils.CaseSensitive := TRUE;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 512 IF NOT PosUtils.PresentPos( SelChar, ImageRec.text, spot ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 513 PosUtils.CaseSensitive := save;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 514 RETURN;
- 515 END;
- 516 PosUtils.CaseSensitive := save;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 517 ScrnUtl1.SetSelCharColors( TheFrame, TheField );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 518 IF Selected THEN
- 519 VWindows.SetBackColor( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 520 TheFrame^.pbbak );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 521 END;
- 522 VWindows.DrawStr( TheFrame^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 523 ImageRec.col + TheFrame^.startcol -
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 524 TheFrame^.ColsScrolled + spot, ImageRec.row +
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 525 TheFrame^.startrow - TheFrame^.RowsScrolled,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 526 SYSTEM.ADR(ImageRec.text[spot]), 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 527 END RedrawField;
- ***** ^ not supported yet
- 528
- 529
- 530 PROCEDURE ShowDisplayFrame(VAR FrameRec : ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 531 Col1, Row1, ColX, RowX : CARDINAL);
- 532 (* Displays the screen in FrameRec on the screen
- 533 in the window defined by Col1, Row1, ColX, RowX.
- 534 Col1, Row1 = upper left hand corner of window;
- 535 ColX, RowX = lower right corner coordinates.
- 536 Note: if Col1=0, then this proc uses the default values for
- 537 the window coordinates.*)
- 538
- 539 BEGIN (* ShowDisplayFrame *)
- 540 IF Col1 > 0 THEN
- 541 (*Correct the origin: starting col and row are
- 542 decremented by one to represent "zero".*)
- 543 FrameRec^.startcol := Col1-1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 544 FrameRec^.endcol := ColX-1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 545 FrameRec^.startrow := Row1-1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 546 FrameRec^.endrow := RowX - 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 547 ELSE
- 548 Col1 := FrameRec^.startcol + 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 549 Row1 := FrameRec^.startrow + 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 550 ColX := FrameRec^.endcol + 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 551 RowX := FrameRec^.endrow + 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 552 END;
- 553 FrameManager.FrameActivated( FrameRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 554 FrameManager.FrameIsInForeGround( FrameRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 555 (* We have to call both because FrameActivated won't
- 556 bring the frame to the foreground if it is already
- 557 active. Note that we don't do this in RedrawArea,
- 558 because RedrawArea is what FrameManager uses to
- 559 restore areas of the screen -- if each call to
- 560 RedrawArea changed the ordering of frames in
- 561 FrameManager's FrameList, it would get stuck. *)
- 562 IF NOT ScrnUtl1.BoxInFrame(FrameRec) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 563 RedrawArea( FrameRec, Col1, Row1, ColX, RowX );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 564 ELSE
- 565 (* draw the proper box for this screen *)
- 566 ScrnUtl1.SetBorderColors( FrameRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 567 VWindows.DrawBox( FrameRec^.WindowHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 568 FrameRec^.ExitBox, Col1, Row1, ColX, RowX );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 569 (*We draw the ExitBox because the frame is not active
- 570 at this point.*)
- 571 ScrnUtl1.WriteBetween( FrameRec^.WindowHandle, FrameRec^.Caption,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 572 Col1 + 1, Row1, ColX - 1, RowX );
- ***** ^ not supported yet
- 573 RedrawArea( FrameRec, Col1 + 1, Row1 + 1, ColX - 1, RowX - 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 574 END;
- 575 END ShowDisplayFrame;
- ***** ^ not supported yet
- 576
- 577
- 578 BEGIN
- 579 Initialized := FALSE;
- 580 Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 581 END FramePainter.
- ***** ^ not supported yet
- 906 errors
|