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