WINDOW.LST 151 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * WINDOW.MOD - Clipping text windows *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1987..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 (*%F _fdata *)
  13. 12 (*# call(seg_name => null) *)
  14. 13 (*# data(seg_name => null) *)
  15. 14 (*%E *)
  16. 15 (*# module(implementation=>off) *)
  17. 16 (*# call(o_a_copy=>off) *)
  18. 17 (*# check(stack=>off,
  19. 18 index=>off,
  20. 19 range=>off,
  21. 20 overflow=>off,
  22. 21 nil_ptr=>off) *)
  23. 22
  24. 23 IMPLEMENTATION MODULE Window;
  25. 24
  26. 25 (*%F _OS2 *)
  27. 26 IMPORT SYSTEM, Str, Lib, IO, CoreSig;
  28. 27 (*%E *)
  29. 28 (*%T _OS2 *)
  30. 29 IMPORT SYSTEM, Str, Lib, Vio, Dos, IO, CoreSig;
  31. 30 (*%E *)
  32. 31 (*%T _mthread *)
  33. 32 IMPORT Process;
  34. 33 (*%E *)
  35. 34 FROM Storage IMPORT ALLOCATE,DEALLOCATE;
  36. 35
  37. 36 TYPE
  38. 37 UseListPtr = POINTER TO UseListLink;
  39. ***** ^ undeclared identifier
  40. 38 UseListLink = RECORD
  41. 39 Next : UseListPtr;
  42. 40 Proc : ADDRESS;
  43. ***** ^ undeclared identifier
  44. 41 Wind : WinType;
  45. ***** ^ undeclared identifier
  46. 42 END;
  47. ***** ^ not supported yet
  48. 43 VAR
  49. 44 (*%T _mthread *)
  50. 45 Lock,Unlock : LockProc;
  51. ***** ^ undeclared identifier
  52. 46 (*%E *)
  53. 47
  54. 48
  55. 49 CONST
  56. 50 GuardConst = 4A4EH;
  57. 51
  58. 52
  59. 53 PROCEDURE CheckWindow(W:WinType);
  60. ***** ^ undeclared identifier
  61. 54 BEGIN
  62. 55 IF W^.Guard - Seg(W^) # GuardConst THEN
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. ***** ^ undeclared identifier
  66. ***** ^ not supported yet
  67. 56 Lib.RunTimeError(CoreSig._FatalErrorPos(),30H,'Invalid Window');
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. 57 END; (*IF*)
  75. 58 END CheckWindow;
  76. ***** ^ not supported yet
  77. 59
  78. 60 PROCEDURE ClipFrame ( W : WinType );
  79. ***** ^ undeclared identifier
  80. 61 VAR
  81. 62 i : CARDINAL;
  82. 63 BEGIN
  83. 64 WITH W^ DO
  84. ***** ^ not supported yet
  85. 65 IF WDef.FrameOn THEN i := 1 ELSE i := 0 END;
  86. ***** ^ undeclared identifier
  87. ***** ^ not supported yet
  88. 66 IF XA < WDef.X1+i THEN
  89. ***** ^ undeclared identifier
  90. ***** ^ undeclared identifier
  91. ***** ^ not supported yet
  92. 67 XA := WDef.X1+i
  93. ***** ^ undeclared identifier
  94. ***** ^ undeclared identifier
  95. ***** ^ not supported yet
  96. 68 ELSIF XA > WDef.X2-i THEN
  97. ***** ^ undeclared identifier
  98. ***** ^ undeclared identifier
  99. ***** ^ not supported yet
  100. 69 XA := WDef.X2-i
  101. ***** ^ undeclared identifier
  102. ***** ^ undeclared identifier
  103. ***** ^ not supported yet
  104. 70 END;
  105. 71 IF XB > WDef.X2-i THEN
  106. ***** ^ undeclared identifier
  107. ***** ^ undeclared identifier
  108. ***** ^ not supported yet
  109. 72 XB := WDef.X2-i
  110. ***** ^ undeclared identifier
  111. ***** ^ undeclared identifier
  112. ***** ^ not supported yet
  113. 73 ELSIF XB < WDef.X1+i THEN
  114. ***** ^ undeclared identifier
  115. ***** ^ undeclared identifier
  116. ***** ^ not supported yet
  117. 74 XB := WDef.X1+i
  118. ***** ^ undeclared identifier
  119. ***** ^ undeclared identifier
  120. ***** ^ not supported yet
  121. 75 END;
  122. 76 IF YA < WDef.Y1+i THEN
  123. ***** ^ undeclared identifier
  124. ***** ^ undeclared identifier
  125. ***** ^ not supported yet
  126. 77 YA := WDef.Y1+i
  127. ***** ^ undeclared identifier
  128. ***** ^ undeclared identifier
  129. ***** ^ not supported yet
  130. 78 ELSIF YA > WDef.Y2-i THEN
  131. ***** ^ undeclared identifier
  132. ***** ^ undeclared identifier
  133. ***** ^ not supported yet
  134. 79 YA := WDef.Y2-i
  135. ***** ^ undeclared identifier
  136. ***** ^ undeclared identifier
  137. ***** ^ not supported yet
  138. 80 END;
  139. 81 IF YB > WDef.Y2-i THEN
  140. ***** ^ undeclared identifier
  141. ***** ^ undeclared identifier
  142. ***** ^ not supported yet
  143. 82 YB := WDef.Y2-i
  144. ***** ^ undeclared identifier
  145. ***** ^ undeclared identifier
  146. ***** ^ not supported yet
  147. 83 ELSIF YB < WDef.Y1+i THEN
  148. ***** ^ undeclared identifier
  149. ***** ^ undeclared identifier
  150. ***** ^ not supported yet
  151. 84 YB := WDef.Y1+i
  152. ***** ^ undeclared identifier
  153. ***** ^ undeclared identifier
  154. ***** ^ not supported yet
  155. 85 END;
  156. 86 Width := XB-XA+1; Depth := YB-YA+1;
  157. ***** ^ undeclared identifier
  158. ***** ^ undeclared identifier
  159. ***** ^ undeclared identifier
  160. ***** ^ undeclared identifier
  161. ***** ^ undeclared identifier
  162. ***** ^ undeclared identifier
  163. 87 END;
  164. ***** ^ not supported yet
  165. 88 END ClipFrame;
  166. ***** ^ not supported yet
  167. 89
  168. 90 PROCEDURE ClipXY ( W : WinType; VAR X,Y : RelCoord );
  169. ***** ^ undeclared identifier
  170. ***** ^ undeclared identifier
  171. 91 VAR
  172. 92 mw,md : CARDINAL;
  173. 93 BEGIN
  174. 94 WITH W^ DO
  175. ***** ^ not supported yet
  176. 95 mw := Width; md := Depth;
  177. ***** ^ undeclared identifier
  178. ***** ^ undeclared identifier
  179. 96 IF WDef.FrameOn AND NOT WDef.WrapOn THEN
  180. ***** ^ undeclared identifier
  181. ***** ^ not supported yet
  182. ***** ^ undeclared identifier
  183. ***** ^ not supported yet
  184. 97 INC(md); INC(mw)
  185. ***** ^ undeclared identifier
  186. ***** ^ not supported yet
  187. ***** ^ undeclared identifier
  188. ***** ^ not supported yet
  189. 98 ELSE
  190. 99 IF X=0 THEN X := 1 END;
  191. ***** ^ not supported yet
  192. ***** ^ not supported yet
  193. 100 IF Y=0 THEN Y := 1 END;
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. 101 END;
  197. 102 IF X>mw THEN X := mw END;
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. 103 IF Y>md THEN Y := md END;
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. 104 END;
  204. ***** ^ not supported yet
  205. 105 END ClipXY;
  206. ***** ^ not supported yet
  207. 106
  208. 107
  209. 108 PROCEDURE BufferSpaceFill ( W : WinType; pos : CARDINAL; len : CARDINAL );
  210. ***** ^ undeclared identifier
  211. 109 BEGIN
  212. 110 WITH W^ DO
  213. ***** ^ not supported yet
  214. 111 IF IsPalette THEN
  215. ***** ^ undeclared identifier
  216. 112 Lib.WordFill(ADR(Buffer^[pos]),len,32
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. ***** ^ undeclared identifier
  220. ***** ^ undeclared identifier
  221. ***** ^ not supported yet
  222. 113 +VAL(CARDINAL,CurPalColor)*256);
  223. ***** ^ undeclared identifier
  224. ***** ^ undeclared identifier
  225. ***** ^ not supported yet
  226. 114 ELSE
  227. 115 Lib.WordFill(ADR(Buffer^[pos]),len,32+
  228. ***** ^ not supported yet
  229. ***** ^ not supported yet
  230. ***** ^ undeclared identifier
  231. ***** ^ undeclared identifier
  232. ***** ^ not supported yet
  233. 116 ORD(WDef.Foreground)*256+ORD(WDef.Background)*4096);
  234. ***** ^ undeclared identifier
  235. ***** ^ undeclared identifier
  236. ***** ^ not supported yet
  237. ***** ^ undeclared identifier
  238. ***** ^ undeclared identifier
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. 117 END;
  242. 118 END;
  243. ***** ^ not supported yet
  244. 119 END BufferSpaceFill;
  245. ***** ^ not supported yet
  246. 120
  247. 121
  248. 122 PROCEDURE CurWin () : WinType;
  249. ***** ^ undeclared identifier
  250. 123 (* Returns The current window being used for output for this process *)
  251. 124 (* If no window assigned by Use then returns Top. *)
  252. 125 (* NB Locks window system and leaves locked if _mthread set. *)
  253. 126 VAR
  254. 127 u : UseListPtr;
  255. ***** ^ not supported yet
  256. 128 p : ADDRESS;
  257. ***** ^ undeclared identifier
  258. 129 BEGIN
  259. 130 (*%T _mthread *)
  260. 131 Lock();
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. 132 (*%E *)
  264. 133 IF CoreWind._multip THEN
  265. ***** ^ undeclared identifier
  266. ***** ^ not supported yet
  267. 134 (*%T _mthread *)
  268. 135 p := SYSTEM.CurrentProcess();
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. 136 (*%E *)
  274. 137 (*%F _mthread *)
  275. 138 p := NIL;
  276. 139 (*%E *)
  277. 140 u := UseListPtr(CoreWind._uselist)^.Next;
  278. ***** ^ not supported yet
  279. ***** ^ undeclared identifier
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. 141 LOOP
  283. 142 IF u = NIL THEN
  284. ***** ^ not supported yet
  285. 143 RETURN WinType(CoreWind._windowstack); (* Top() *)
  286. ***** ^ undeclared identifier
  287. ***** ^ undeclared identifier
  288. ***** ^ not supported yet
  289. 144 ELSIF p = u^.Proc THEN
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. ***** ^ not supported yet
  293. 145 RETURN u^.Wind;
  294. ***** ^ not supported yet
  295. ***** ^ not supported yet
  296. 146 END; (*IF*)
  297. 147 u := u^.Next;
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. 148 END; (*LOOP*)
  302. 149 END; (*IF*)
  303. 150 u := UseListPtr(CoreWind._uselist)^.Next;
  304. ***** ^ not supported yet
  305. ***** ^ undeclared identifier
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. 151 IF u = NIL THEN
  309. ***** ^ not supported yet
  310. 152 RETURN WinType(CoreWind._windowstack); (* Top() *)
  311. ***** ^ undeclared identifier
  312. ***** ^ undeclared identifier
  313. ***** ^ not supported yet
  314. 153 END; (*IF*)
  315. 154 RETURN u^.Wind;
  316. ***** ^ not supported yet
  317. ***** ^ not supported yet
  318. 155 END CurWin;
  319. ***** ^ not supported yet
  320. 156
  321. 157 (*%F _OS2 *)
  322. 158 PROCEDURE ResetCursor;
  323. 159 VAR
  324. 160 R : SYSTEM.Registers;
  325. 161 mode : CARDINAL;
  326. 162 BEGIN
  327. 163 IF (CoreWind._cursorstack = NIL) OR
  328. 164 ObscuredAt(WinType(CoreWind._cursorstack),WinType(CoreWind._cursorstack)^.CurrentX,WinType(CoreWind._cursorstack)^.CurrentY) THEN
  329. 165 mode := 2000H;
  330. 166 ELSE
  331. 167 WITH WinType(CoreWind._cursorstack)^ DO
  332. 168 WITH R DO
  333. 169 AH := 2;
  334. 170 BH := SHORTCARD(CoreWind._activepage());
  335. 171 DL := SHORTCARD(XA+CurrentX-1);
  336. 172 DH := SHORTCARD(YA+CurrentY-1);
  337. 173 END;
  338. 174 Lib.Intr(R,10H);
  339. 175 END;
  340. 176 mode := CoreWind._cursorlines;
  341. 177 END;
  342. 178 R.AH := 1;
  343. 179 R.CX := mode;
  344. 180 Lib.Intr(R,10H);
  345. 181 END ResetCursor;
  346. 182 (*%E *)
  347. 183
  348. 184 (*%T _OS2 *)
  349. 185 VAR
  350. 186 CursorInfo : Vio.CURSORINFO;
  351. ***** ^ not supported yet
  352. 187 RealMode : BOOLEAN;
  353. 188
  354. 189 PROCEDURE ResetCursor;
  355. 190 VAR r : CARDINAL;
  356. 191 BEGIN
  357. 192 IF (CoreWind._cursorstack = NIL) OR
  358. ***** ^ undeclared identifier
  359. ***** ^ not supported yet
  360. 193 ObscuredAt(WinType(CoreWind._cursorstack),WinType(CoreWind._cursorstack)^.CurrentX,WinType(CoreWind._cursorstack)^.CurrentY) THEN
  361. ***** ^ undeclared identifier
  362. ***** ^ undeclared identifier
  363. ***** ^ undeclared identifier
  364. ***** ^ not supported yet
  365. ***** ^ undeclared identifier
  366. ***** ^ undeclared identifier
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. ***** ^ undeclared identifier
  370. ***** ^ undeclared identifier
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. 194 CursorInfo.attr := MAX(CARDINAL);
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. ***** ^ undeclared identifier
  377. ***** ^ not supported yet
  378. 195 ELSE
  379. 196 WITH WinType(CoreWind._cursorstack)^ DO
  380. ***** ^ undeclared identifier
  381. ***** ^ undeclared identifier
  382. ***** ^ not supported yet
  383. 197 r := Vio.SetCurPos(YA+CurrentY-1,XA+CurrentX-1,0 );
  384. ***** ^ not supported yet
  385. ***** ^ not supported yet
  386. ***** ^ undeclared identifier
  387. ***** ^ undeclared identifier
  388. ***** ^ undeclared identifier
  389. ***** ^ undeclared identifier
  390. ***** ^ not supported yet
  391. 198 END;
  392. ***** ^ not supported yet
  393. 199 CursorInfo.attr := 0;
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. 200 END;
  397. 201 r := Vio.SetCurType( CursorInfo,0);
  398. ***** ^ undeclared identifier
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. ***** ^ not supported yet
  403. 202 END ResetCursor;
  404. ***** ^ not supported yet
  405. 203 (*%E *)
  406. 204
  407. 205 PROCEDURE UnlinkCursor ( W : WinType );
  408. ***** ^ undeclared identifier
  409. 206 VAR
  410. 207 w : WinType;
  411. ***** ^ undeclared identifier
  412. 208 BEGIN
  413. 209 w := WinType(CoreWind._cursorstack);
  414. ***** ^ not supported yet
  415. ***** ^ undeclared identifier
  416. ***** ^ undeclared identifier
  417. ***** ^ not supported yet
  418. 210 IF w = W THEN CoreWind._cursorstack := w^.CursorChain END;
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. ***** ^ undeclared identifier
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. ***** ^ not supported yet
  425. 211 LOOP
  426. 212 IF w = NIL THEN RETURN END;
  427. ***** ^ not supported yet
  428. 213 IF w^.CursorChain = W THEN
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 214 w^.CursorChain := W^.CursorChain;
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. 215 RETURN;
  438. 216 END;
  439. 217 w := w^.CursorChain;
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 218 END;
  444. 219 END UnlinkCursor;
  445. ***** ^ not supported yet
  446. 220
  447. 221 (* ------------------------- *)
  448. 222 (* Cursor Control *)
  449. 223 (* ------------------------- *)
  450. 224
  451. 225
  452. 226
  453. 227 PROCEDURE CursorOn;
  454. 228 VAR
  455. 229 w,cw : WinType;
  456. ***** ^ undeclared identifier
  457. 230 BEGIN
  458. 231 cw := CurWin();
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. ***** ^ not supported yet
  462. 232 UnlinkCursor(cw);
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. 233 cw^.WDef.CursorOn := TRUE;
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. 234 IF NOT cw^.WDef.Hidden THEN
  470. ***** ^ not supported yet
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. 235 cw^.CursorChain := WinType(CoreWind._cursorstack);
  474. ***** ^ not supported yet
  475. ***** ^ not supported yet
  476. ***** ^ undeclared identifier
  477. ***** ^ undeclared identifier
  478. ***** ^ not supported yet
  479. 236 CoreWind._cursorstack := cw;
  480. ***** ^ undeclared identifier
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. 237 END;
  484. 238 ResetCursor;
  485. ***** ^ not supported yet
  486. 239 (*%T _mthread *)
  487. 240 Unlock();
  488. ***** ^ not supported yet
  489. ***** ^ not supported yet
  490. 241 (*%E *)
  491. 242 END CursorOn;
  492. ***** ^ not supported yet
  493. 243
  494. 244 PROCEDURE CursorOff;
  495. 245 VAR
  496. 246 w,cw : WinType;
  497. ***** ^ undeclared identifier
  498. 247 BEGIN
  499. 248 cw := CurWin();
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. 249 UnlinkCursor(cw);
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. 250 cw^.WDef.CursorOn := FALSE;
  507. ***** ^ not supported yet
  508. ***** ^ not supported yet
  509. ***** ^ not supported yet
  510. 251 ResetCursor;
  511. ***** ^ not supported yet
  512. 252 (*%T _mthread *)
  513. 253 Unlock();
  514. ***** ^ not supported yet
  515. ***** ^ not supported yet
  516. 254 (*%E *)
  517. 255 END CursorOff;
  518. ***** ^ not supported yet
  519. 256
  520. 257 (* ------------------------- *)
  521. 258 (* Window creation *)
  522. 259 (* ------------------------- *)
  523. 260
  524. 261
  525. 262 PROCEDURE MakeWindow ( VAR WD : WinDef ) : WinType;
  526. ***** ^ undeclared identifier
  527. ***** ^ undeclared identifier
  528. 263
  529. 264 (*
  530. 265 Creates a new Window descriptor
  531. 266 The size is Inclusive of frame if needed
  532. 267 does not allocate buffer
  533. 268 *)
  534. 269 VAR W : WinType; min : CARDINAL;
  535. ***** ^ undeclared identifier
  536. 270 BEGIN
  537. 271 NEW(W);
  538. ***** ^ undeclared identifier
  539. ***** ^ not supported yet
  540. 272 WITH W^ DO
  541. ***** ^ not supported yet
  542. 273 WITH WD DO
  543. ***** ^ not supported yet
  544. 274 IF X2 >= ScreenWidth THEN X2:=ScreenWidth-1 END;
  545. ***** ^ undeclared identifier
  546. ***** ^ undeclared identifier
  547. ***** ^ undeclared identifier
  548. ***** ^ undeclared identifier
  549. 275 IF Y2 >= CurrentScreenDepth THEN Y2:=CurrentScreenDepth-1 END;
  550. ***** ^ undeclared identifier
  551. ***** ^ undeclared identifier
  552. ***** ^ undeclared identifier
  553. ***** ^ undeclared identifier
  554. 276 IF WD.FrameOn THEN min := 2 ELSE min := 0 END;
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. 277 IF (X1+min>X2) THEN X2 := X1+min END;
  558. ***** ^ undeclared identifier
  559. ***** ^ undeclared identifier
  560. ***** ^ undeclared identifier
  561. ***** ^ undeclared identifier
  562. 278 IF (Y1+min>Y2) THEN Y2 := Y1+min END;
  563. ***** ^ undeclared identifier
  564. ***** ^ undeclared identifier
  565. ***** ^ undeclared identifier
  566. ***** ^ undeclared identifier
  567. 279 XA := X1; YA := Y1; XB := X2; YB := Y2;
  568. ***** ^ undeclared identifier
  569. ***** ^ undeclared identifier
  570. ***** ^ undeclared identifier
  571. ***** ^ undeclared identifier
  572. ***** ^ undeclared identifier
  573. ***** ^ undeclared identifier
  574. ***** ^ undeclared identifier
  575. ***** ^ undeclared identifier
  576. 280 Width := X2-X1+1; Depth := Y2-Y1+1;
  577. ***** ^ undeclared identifier
  578. ***** ^ undeclared identifier
  579. ***** ^ undeclared identifier
  580. ***** ^ undeclared identifier
  581. ***** ^ undeclared identifier
  582. ***** ^ undeclared identifier
  583. 281 END;
  584. ***** ^ not supported yet
  585. 282 WDef := WD;
  586. ***** ^ undeclared identifier
  587. ***** ^ undeclared identifier
  588. 283 OWidth := Width; ODepth := Depth;
  589. ***** ^ undeclared identifier
  590. ***** ^ undeclared identifier
  591. ***** ^ undeclared identifier
  592. ***** ^ undeclared identifier
  593. 284 CurrentX := 1;
  594. ***** ^ undeclared identifier
  595. 285 CurrentY := 1;
  596. ***** ^ undeclared identifier
  597. 286 Next := NIL;
  598. ***** ^ undeclared identifier
  599. 287 Buffer := NIL;
  600. ***** ^ undeclared identifier
  601. 288 UserRecord := NIL;
  602. ***** ^ undeclared identifier
  603. 289 IsPalette := FALSE;
  604. ***** ^ undeclared identifier
  605. 290 CurPalColor := NormalPaletteColor;
  606. ***** ^ undeclared identifier
  607. ***** ^ undeclared identifier
  608. 291 TMode := NoTitle;
  609. ***** ^ undeclared identifier
  610. ***** ^ undeclared identifier
  611. 292 Guard := GuardConst+CARDINAL(Seg(W^));
  612. ***** ^ undeclared identifier
  613. ***** ^ undeclared identifier
  614. ***** ^ undeclared identifier
  615. 293 CursorChain := NIL;
  616. ***** ^ undeclared identifier
  617. 294 Title := NIL;
  618. ***** ^ undeclared identifier
  619. 295 END;
  620. ***** ^ not supported yet
  621. 296 ClipFrame(W);
  622. ***** ^ not supported yet
  623. ***** ^ undeclared identifier
  624. 297 RETURN W;
  625. ***** ^ undeclared identifier
  626. 298 END MakeWindow;
  627. ***** ^ not supported yet
  628. 299
  629. 300 PROCEDURE Open ( WD : WinDef ) : WinType;
  630. ***** ^ undeclared identifier
  631. ***** ^ undeclared identifier
  632. 301 (*
  633. 302 Opens a window on the screen ready for use
  634. 303 *)
  635. 304 VAR
  636. 305 W : WinType;
  637. ***** ^ undeclared identifier
  638. 306 BEGIN
  639. 307 (*%T _mthread *)
  640. 308 Lock();
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. 309 (*%E *)
  644. 310 W := MakeWindow (WD);
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. 311 WITH W^ DO
  649. ***** ^ not supported yet
  650. 312 ALLOCATE ( Buffer,OWidth*ODepth*2);
  651. ***** ^ not supported yet
  652. ***** ^ undeclared identifier
  653. ***** ^ undeclared identifier
  654. ***** ^ undeclared identifier
  655. ***** ^ not supported yet
  656. 313 BufferSpaceFill(W,0,OWidth*ODepth);
  657. ***** ^ not supported yet
  658. ***** ^ not supported yet
  659. ***** ^ undeclared identifier
  660. ***** ^ undeclared identifier
  661. 314 IF WD.FrameOn THEN
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. 315 SetFrame(W,WDef.FrameDef,WDef.FrameFore,WDef.FrameBack);
  665. ***** ^ undeclared identifier
  666. ***** ^ not supported yet
  667. ***** ^ undeclared identifier
  668. ***** ^ not supported yet
  669. ***** ^ undeclared identifier
  670. ***** ^ not supported yet
  671. ***** ^ undeclared identifier
  672. ***** ^ not supported yet
  673. 316 END;
  674. 317 END;
  675. ***** ^ not supported yet
  676. 318 IF WD.Hidden THEN
  677. ***** ^ undeclared identifier
  678. ***** ^ not supported yet
  679. 319 Use ( W )
  680. ***** ^ undeclared identifier
  681. ***** ^ undeclared identifier
  682. 320 ELSE
  683. 321 PutOnTop ( W )
  684. ***** ^ undeclared identifier
  685. ***** ^ undeclared identifier
  686. 322 END;
  687. 323 (*%T _mthread *)
  688. 324 Unlock();
  689. ***** ^ not supported yet
  690. ***** ^ not supported yet
  691. 325 (*%E *)
  692. 326 RETURN W;
  693. ***** ^ undeclared identifier
  694. 327 END Open;
  695. ***** ^ not supported yet
  696. 328
  697. 329
  698. 330 (* ------------------------- *)
  699. 331 (* Window stack manipulation *)
  700. 332 (* and screen redraw *)
  701. 333 (* ------------------------- *)
  702. 334
  703. 335
  704. 336
  705. 337 PROCEDURE Use ( W : WinType );
  706. ***** ^ undeclared identifier
  707. 338 (*
  708. 339 Causes all subsequent output (by the current process)
  709. 340 to appear in the specified Window
  710. 341 NB does not have to be Top Window (or in fact on the screen at all)
  711. 342 UseListPtr(CoreWind._uselist) is the MRU window
  712. 343 *)
  713. 344 VAR
  714. 345 p : ADDRESS;
  715. ***** ^ undeclared identifier
  716. 346 u : UseListPtr;
  717. ***** ^ not supported yet
  718. 347 up : UseListPtr;
  719. ***** ^ not supported yet
  720. 348 BEGIN
  721. 349 (*%T _mthread *)
  722. 350 Lock();
  723. ***** ^ not supported yet
  724. ***** ^ not supported yet
  725. 351 (*%E *)
  726. 352 CheckWindow(W);
  727. ***** ^ not supported yet
  728. ***** ^ not supported yet
  729. 353 (*%T _mthread *)
  730. 354 p := SYSTEM.CurrentProcess();
  731. ***** ^ not supported yet
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. 355 (*%E *)
  736. 356 (*%F _mthread *)
  737. 357 p := NIL;
  738. 358 (*%E *)
  739. 359 up := UseListPtr(CoreWind._uselist);
  740. ***** ^ not supported yet
  741. ***** ^ undeclared identifier
  742. ***** ^ not supported yet
  743. 360 u := up^.Next;
  744. ***** ^ not supported yet
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. 361 LOOP
  748. 362 IF u = NIL THEN NEW(u); u^.Proc := p; EXIT END;
  749. ***** ^ not supported yet
  750. ***** ^ undeclared identifier
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. ***** ^ not supported yet
  755. 363 IF p = u^.Proc THEN up^.Next := u^.Next; EXIT END;
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. ***** ^ not supported yet
  760. ***** ^ not supported yet
  761. ***** ^ not supported yet
  762. ***** ^ not supported yet
  763. 364 up := u; u := u^.Next;
  764. ***** ^ not supported yet
  765. ***** ^ not supported yet
  766. ***** ^ not supported yet
  767. ***** ^ not supported yet
  768. ***** ^ not supported yet
  769. 365 END;
  770. 366 u^.Next := UseListPtr(CoreWind._uselist)^.Next;
  771. ***** ^ not supported yet
  772. ***** ^ not supported yet
  773. ***** ^ undeclared identifier
  774. ***** ^ not supported yet
  775. ***** ^ not supported yet
  776. 367 UseListPtr(CoreWind._uselist)^.Next := u;
  777. ***** ^ undeclared identifier
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. ***** ^ not supported yet
  781. 368 u^.Wind := W;
  782. ***** ^ not supported yet
  783. ***** ^ not supported yet
  784. ***** ^ not supported yet
  785. 369 (*%T _mthread *)
  786. 370 Unlock();
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. 371 (*%E *)
  790. 372 END Use;
  791. ***** ^ not supported yet
  792. 373
  793. 374 PROCEDURE TakeOffStack ( W : WinType ); (* Private *)
  794. ***** ^ undeclared identifier
  795. 375 VAR pw : WinType;
  796. ***** ^ undeclared identifier
  797. 376 BEGIN
  798. 377 IF W = WinType(CoreWind._windowstack) THEN
  799. ***** ^ not supported yet
  800. ***** ^ undeclared identifier
  801. ***** ^ undeclared identifier
  802. ***** ^ not supported yet
  803. 378 CoreWind._windowstack := W^.Next;
  804. ***** ^ undeclared identifier
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. 379 ELSE
  809. 380 pw := WinType(CoreWind._windowstack);
  810. ***** ^ not supported yet
  811. ***** ^ undeclared identifier
  812. ***** ^ undeclared identifier
  813. ***** ^ not supported yet
  814. 381 IF W # pw THEN
  815. ***** ^ not supported yet
  816. ***** ^ not supported yet
  817. 382 LOOP
  818. 383 IF (pw = NIL) THEN EXIT END;
  819. ***** ^ not supported yet
  820. 384 IF (pw^.Next = W) THEN pw^.Next := W^.Next; EXIT END;
  821. ***** ^ not supported yet
  822. ***** ^ not supported yet
  823. ***** ^ not supported yet
  824. ***** ^ not supported yet
  825. ***** ^ not supported yet
  826. ***** ^ not supported yet
  827. ***** ^ not supported yet
  828. 385 pw := pw^.Next;
  829. ***** ^ not supported yet
  830. ***** ^ not supported yet
  831. ***** ^ not supported yet
  832. 386 END;
  833. 387 END;
  834. 388 END;
  835. 389 W^.Next := NIL;
  836. ***** ^ not supported yet
  837. ***** ^ not supported yet
  838. 390 END TakeOffStack;
  839. ***** ^ not supported yet
  840. 391
  841. 392
  842. 393
  843. 394 PROCEDURE UpdateScreen ( W : WinType; X,Y : AbsCoord; Len : CARDINAL );
  844. ***** ^ undeclared identifier
  845. ***** ^ undeclared identifier
  846. 395 (* Updates the screen from the window buffer *)
  847. 396 VAR
  848. 397 NextLen,
  849. 398 NextX : AbsCoord;
  850. ***** ^ undeclared identifier
  851. 399 w : WinType;
  852. ***** ^ undeclared identifier
  853. 400 oxa,oxb,ax,bx : AbsCoord;
  854. ***** ^ undeclared identifier
  855. 401 buff : ARRAY[0..ScreenWidth-1] OF CARDINAL;
  856. ***** ^ undeclared identifier
  857. ***** ^ not supported yet
  858. ***** ^ not supported yet
  859. 402 a : ADDRESS;
  860. ***** ^ undeclared identifier
  861. 403 BEGIN
  862. 404 IF W^.WDef.Hidden THEN RETURN END;
  863. ***** ^ not supported yet
  864. ***** ^ not supported yet
  865. ***** ^ not supported yet
  866. 405 WHILE Len#0 DO
  867. 406 (* adjust co ordinates for crossing windows *)
  868. 407 NextLen := 0;
  869. ***** ^ not supported yet
  870. 408 w := WinType(CoreWind._windowstack);
  871. ***** ^ not supported yet
  872. ***** ^ undeclared identifier
  873. ***** ^ undeclared identifier
  874. ***** ^ not supported yet
  875. 409 ax := X; bx := X+Len-1;
  876. ***** ^ not supported yet
  877. ***** ^ not supported yet
  878. ***** ^ not supported yet
  879. ***** ^ not supported yet
  880. 410 LOOP
  881. 411 IF (w = W)OR(w=NIL) THEN EXIT END;
  882. ***** ^ not supported yet
  883. ***** ^ not supported yet
  884. ***** ^ not supported yet
  885. 412 WITH w^ DO
  886. ***** ^ not supported yet
  887. 413 IF (Y>=WDef.Y1) AND (Y<=WDef.Y2) THEN
  888. ***** ^ not supported yet
  889. ***** ^ undeclared identifier
  890. ***** ^ not supported yet
  891. ***** ^ not supported yet
  892. ***** ^ undeclared identifier
  893. ***** ^ not supported yet
  894. 414 oxa := WDef.X1; oxb := WDef.X2;
  895. ***** ^ not supported yet
  896. ***** ^ undeclared identifier
  897. ***** ^ not supported yet
  898. ***** ^ not supported yet
  899. ***** ^ undeclared identifier
  900. ***** ^ not supported yet
  901. 415 IF (ax>=oxa) AND (bx<=oxb) THEN (* wiped out *)
  902. ***** ^ not supported yet
  903. ***** ^ not supported yet
  904. ***** ^ not supported yet
  905. ***** ^ not supported yet
  906. 416 ax := bx+1; EXIT;
  907. ***** ^ not supported yet
  908. ***** ^ not supported yet
  909. 417 ELSIF (ax<=oxb) AND (bx>=oxa) THEN (* some interaction *)
  910. ***** ^ not supported yet
  911. ***** ^ not supported yet
  912. ***** ^ not supported yet
  913. ***** ^ not supported yet
  914. 418 IF (ax<oxa) AND (bx>oxb) THEN (* cut into two *)
  915. ***** ^ not supported yet
  916. ***** ^ not supported yet
  917. ***** ^ not supported yet
  918. ***** ^ not supported yet
  919. 419 bx := oxa-1;
  920. ***** ^ not supported yet
  921. ***** ^ not supported yet
  922. 420 NextX := oxb+1;
  923. ***** ^ not supported yet
  924. ***** ^ not supported yet
  925. 421 NextLen := X+Len-NextX;
  926. ***** ^ not supported yet
  927. ***** ^ not supported yet
  928. ***** ^ not supported yet
  929. 422 ELSIF (bx>oxb) THEN (* left edge cut off *)
  930. ***** ^ not supported yet
  931. ***** ^ not supported yet
  932. 423 ax := oxb+1;
  933. ***** ^ not supported yet
  934. ***** ^ not supported yet
  935. 424 ELSIF (ax<oxa) THEN (* right edge cut off *)
  936. ***** ^ not supported yet
  937. ***** ^ not supported yet
  938. 425 bx := oxa-1;
  939. ***** ^ not supported yet
  940. ***** ^ not supported yet
  941. 426 END;
  942. 427 END;
  943. 428 END;
  944. 429 w := Next;
  945. ***** ^ not supported yet
  946. ***** ^ undeclared identifier
  947. 430 END;
  948. ***** ^ not supported yet
  949. 431 END;
  950. 432 Len := bx-ax+1;
  951. ***** ^ undeclared identifier
  952. ***** ^ undeclared identifier
  953. ***** ^ undeclared identifier
  954. 433 IF Len # 0 THEN
  955. ***** ^ undeclared identifier
  956. 434 WITH W^ DO
  957. ***** ^ undeclared identifier
  958. 435 a := ADR(Buffer^[(ax-WDef.X1)+(Y-WDef.Y1)*OWidth]);
  959. ***** ^ undeclared identifier
  960. ***** ^ undeclared identifier
  961. ***** ^ undeclared identifier
  962. ***** ^ undeclared identifier
  963. ***** ^ undeclared identifier
  964. ***** ^ not supported yet
  965. ***** ^ undeclared identifier
  966. ***** ^ undeclared identifier
  967. ***** ^ not supported yet
  968. ***** ^ undeclared identifier
  969. 436 IF IsPalette THEN
  970. ***** ^ undeclared identifier
  971. 437 CoreWind._palxlat(ADR(buff),a,Len,ADR(PalAttr));
  972. ***** ^ undeclared identifier
  973. ***** ^ not supported yet
  974. ***** ^ undeclared identifier
  975. ***** ^ undeclared identifier
  976. ***** ^ undeclared identifier
  977. ***** ^ undeclared identifier
  978. ***** ^ undeclared identifier
  979. ***** ^ undeclared identifier
  980. 438 a := ADR(buff);
  981. ***** ^ undeclared identifier
  982. ***** ^ undeclared identifier
  983. ***** ^ undeclared identifier
  984. 439 END;
  985. 440 CoreWind._buffertoscreen ( ax,Y,a,Len);
  986. ***** ^ undeclared identifier
  987. ***** ^ not supported yet
  988. ***** ^ undeclared identifier
  989. ***** ^ undeclared identifier
  990. ***** ^ undeclared identifier
  991. ***** ^ undeclared identifier
  992. 441 END;
  993. ***** ^ not supported yet
  994. 442 END;
  995. 443 X := NextX;
  996. ***** ^ undeclared identifier
  997. ***** ^ undeclared identifier
  998. 444 Len := NextLen;
  999. ***** ^ undeclared identifier
  1000. ***** ^ undeclared identifier
  1001. 445 END;
  1002. 446 END UpdateScreen;
  1003. ***** ^ not supported yet
  1004. 447
  1005. 448
  1006. 449 PROCEDURE RedrawSection ( W : WinType;
  1007. ***** ^ undeclared identifier
  1008. 450 X1,Y1,X2,Y2 : AbsCoord ); (* Private *)
  1009. ***** ^ undeclared identifier
  1010. 451 (* redraws rectangular portion of the window from the buffer *)
  1011. 452 VAR
  1012. 453 Y : AbsCoord;
  1013. ***** ^ undeclared identifier
  1014. 454 BEGIN
  1015. 455 FOR Y := Y1 TO Y2 DO
  1016. ***** ^ FOR needs integer variable and bounds
  1017. ***** ^ not supported yet
  1018. ***** ^ not supported yet
  1019. 456 UpdateScreen(W,X1,Y,X2-X1+1);
  1020. ***** ^ not supported yet
  1021. ***** ^ not supported yet
  1022. ***** ^ not supported yet
  1023. ***** ^ not supported yet
  1024. ***** ^ not supported yet
  1025. ***** ^ not supported yet
  1026. ***** ^ not supported yet
  1027. 457 END;
  1028. 458 END RedrawSection;
  1029. ***** ^ not supported yet
  1030. 459
  1031. 460 PROCEDURE RedrawWindow ( W : WinType ); (* Private *)
  1032. ***** ^ undeclared identifier
  1033. 461 BEGIN
  1034. 462 WITH W^ DO
  1035. ***** ^ not supported yet
  1036. 463 RedrawSection ( W,WDef.X1,WDef.Y1,WDef.X2,WDef.Y2 );
  1037. ***** ^ not supported yet
  1038. ***** ^ not supported yet
  1039. ***** ^ undeclared identifier
  1040. ***** ^ not supported yet
  1041. ***** ^ undeclared identifier
  1042. ***** ^ not supported yet
  1043. ***** ^ undeclared identifier
  1044. ***** ^ not supported yet
  1045. ***** ^ undeclared identifier
  1046. ***** ^ not supported yet
  1047. 464 END;
  1048. ***** ^ not supported yet
  1049. 465 END RedrawWindow;
  1050. ***** ^ not supported yet
  1051. 466
  1052. 467 PROCEDURE RedrawWindowPane ( W : WinType ); (* Private *)
  1053. ***** ^ undeclared identifier
  1054. 468 BEGIN
  1055. 469 WITH W^ DO
  1056. ***** ^ not supported yet
  1057. 470 RedrawSection ( W,XA,YA,XB,YB );
  1058. ***** ^ not supported yet
  1059. ***** ^ not supported yet
  1060. ***** ^ undeclared identifier
  1061. ***** ^ undeclared identifier
  1062. ***** ^ undeclared identifier
  1063. ***** ^ undeclared identifier
  1064. 471 END;
  1065. ***** ^ not supported yet
  1066. 472 END RedrawWindowPane;
  1067. ***** ^ not supported yet
  1068. 473
  1069. 474
  1070. 475 PROCEDURE DisplayBeneath ( W : WinType; NW : WinType ); (* Private *)
  1071. ***** ^ undeclared identifier
  1072. ***** ^ undeclared identifier
  1073. 476 (* Re-displays windows Obscured by W from NW *)
  1074. 477 VAR
  1075. 478 x1,x2,y1,y2 : AbsCoord;
  1076. ***** ^ undeclared identifier
  1077. 479 BEGIN
  1078. 480 WITH W^ DO
  1079. ***** ^ not supported yet
  1080. 481 WHILE NW#NIL DO
  1081. ***** ^ not supported yet
  1082. 482 IF ((WDef.X2>=NW^.WDef.X1)AND(NW^.WDef.X2>=WDef.X1) AND
  1083. ***** ^ undeclared identifier
  1084. ***** ^ not supported yet
  1085. ***** ^ not supported yet
  1086. ***** ^ not supported yet
  1087. ***** ^ not supported yet
  1088. ***** ^ not supported yet
  1089. ***** ^ not supported yet
  1090. ***** ^ not supported yet
  1091. ***** ^ undeclared identifier
  1092. ***** ^ not supported yet
  1093. 483 (WDef.Y2>=NW^.WDef.Y1)AND(NW^.WDef.Y2>=WDef.Y1)) THEN (* windows cross *)
  1094. ***** ^ undeclared identifier
  1095. ***** ^ not supported yet
  1096. ***** ^ not supported yet
  1097. ***** ^ not supported yet
  1098. ***** ^ not supported yet
  1099. ***** ^ not supported yet
  1100. ***** ^ not supported yet
  1101. ***** ^ not supported yet
  1102. ***** ^ undeclared identifier
  1103. ***** ^ not supported yet
  1104. 484 (* calculate Intersection *)
  1105. 485 IF WDef.X1>NW^.WDef.X1 THEN
  1106. ***** ^ undeclared identifier
  1107. ***** ^ not supported yet
  1108. ***** ^ not supported yet
  1109. ***** ^ not supported yet
  1110. ***** ^ not supported yet
  1111. 486 x1 := WDef.X1
  1112. ***** ^ not supported yet
  1113. ***** ^ undeclared identifier
  1114. ***** ^ not supported yet
  1115. 487 ELSE
  1116. 488 x1 := NW^.WDef.X1
  1117. ***** ^ not supported yet
  1118. ***** ^ not supported yet
  1119. ***** ^ not supported yet
  1120. ***** ^ not supported yet
  1121. 489 END;
  1122. 490 IF WDef.X2<NW^.WDef.X2 THEN
  1123. ***** ^ undeclared identifier
  1124. ***** ^ not supported yet
  1125. ***** ^ not supported yet
  1126. ***** ^ not supported yet
  1127. ***** ^ not supported yet
  1128. 491 x2 := WDef.X2
  1129. ***** ^ not supported yet
  1130. ***** ^ undeclared identifier
  1131. ***** ^ not supported yet
  1132. 492 ELSE
  1133. 493 x2 := NW^.WDef.X2
  1134. ***** ^ not supported yet
  1135. ***** ^ not supported yet
  1136. ***** ^ not supported yet
  1137. ***** ^ not supported yet
  1138. 494 END;
  1139. 495 IF WDef.Y1>NW^.WDef.Y1 THEN
  1140. ***** ^ undeclared identifier
  1141. ***** ^ not supported yet
  1142. ***** ^ not supported yet
  1143. ***** ^ not supported yet
  1144. ***** ^ not supported yet
  1145. 496 y1 := WDef.Y1
  1146. ***** ^ not supported yet
  1147. ***** ^ undeclared identifier
  1148. ***** ^ not supported yet
  1149. 497 ELSE
  1150. 498 y1 := NW^.WDef.Y1
  1151. ***** ^ not supported yet
  1152. ***** ^ not supported yet
  1153. ***** ^ not supported yet
  1154. ***** ^ not supported yet
  1155. 499 END;
  1156. 500 IF WDef.Y2<NW^.WDef.Y2 THEN
  1157. ***** ^ undeclared identifier
  1158. ***** ^ not supported yet
  1159. ***** ^ not supported yet
  1160. ***** ^ not supported yet
  1161. ***** ^ not supported yet
  1162. 501 y2 := WDef.Y2
  1163. ***** ^ not supported yet
  1164. ***** ^ undeclared identifier
  1165. ***** ^ not supported yet
  1166. 502 ELSE
  1167. 503 y2 := NW^.WDef.Y2
  1168. ***** ^ not supported yet
  1169. ***** ^ not supported yet
  1170. ***** ^ not supported yet
  1171. ***** ^ not supported yet
  1172. 504 END;
  1173. 505 RedrawSection (NW, x1,y1,x2,y2 );
  1174. ***** ^ not supported yet
  1175. ***** ^ not supported yet
  1176. ***** ^ not supported yet
  1177. ***** ^ not supported yet
  1178. ***** ^ not supported yet
  1179. ***** ^ not supported yet
  1180. 506 END;
  1181. 507 NW := NW^.Next;
  1182. ***** ^ not supported yet
  1183. ***** ^ not supported yet
  1184. ***** ^ not supported yet
  1185. 508 END;
  1186. 509 END;
  1187. ***** ^ not supported yet
  1188. 510 END DisplayBeneath;
  1189. ***** ^ not supported yet
  1190. 511
  1191. 512
  1192. 513
  1193. 514
  1194. 515 PROCEDURE PutOnTop ( W : WinType );
  1195. ***** ^ undeclared identifier
  1196. 516 (*
  1197. 517 Puts the specified window on the top of the window stack
  1198. 518 Ensuring that it is fully visible.
  1199. 519 If this results in other windows becoming obscured then a buffer
  1200. 520 is allocated for each of these windows.
  1201. 521 All otherwise undirected output (ie with no Use) will appear
  1202. 522 within this window.
  1203. 523 *)
  1204. 524
  1205. 525 BEGIN
  1206. 526 (*%T _mthread *)
  1207. 527 Lock();
  1208. ***** ^ not supported yet
  1209. ***** ^ not supported yet
  1210. 528 (*%E *)
  1211. 529 CheckWindow(W);
  1212. ***** ^ not supported yet
  1213. ***** ^ not supported yet
  1214. 530 IF W # WinType(CoreWind._windowstack) THEN
  1215. ***** ^ not supported yet
  1216. ***** ^ undeclared identifier
  1217. ***** ^ undeclared identifier
  1218. ***** ^ not supported yet
  1219. 531 TakeOffStack( W );
  1220. ***** ^ not supported yet
  1221. ***** ^ not supported yet
  1222. 532 W^.Next := WinType(CoreWind._windowstack);
  1223. ***** ^ not supported yet
  1224. ***** ^ not supported yet
  1225. ***** ^ undeclared identifier
  1226. ***** ^ undeclared identifier
  1227. ***** ^ not supported yet
  1228. 533 CoreWind._windowstack := W;
  1229. ***** ^ undeclared identifier
  1230. ***** ^ not supported yet
  1231. ***** ^ not supported yet
  1232. 534 WITH W^ DO
  1233. ***** ^ not supported yet
  1234. 535 WDef.Hidden := FALSE;
  1235. ***** ^ undeclared identifier
  1236. ***** ^ not supported yet
  1237. 536 RedrawWindow ( W );
  1238. ***** ^ not supported yet
  1239. ***** ^ not supported yet
  1240. 537 IF WDef.CursorOn THEN
  1241. ***** ^ undeclared identifier
  1242. ***** ^ not supported yet
  1243. 538 Use ( W );
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. 539 CursorOn;
  1247. ***** ^ not supported yet
  1248. 540 END;
  1249. 541 END;
  1250. ***** ^ not supported yet
  1251. 542 END;
  1252. 543 Use ( W );
  1253. ***** ^ not supported yet
  1254. ***** ^ undeclared identifier
  1255. 544 ResetCursor;
  1256. ***** ^ not supported yet
  1257. 545 (*%T _mthread *)
  1258. 546 Unlock();
  1259. ***** ^ not supported yet
  1260. ***** ^ not supported yet
  1261. 547 (*%E *)
  1262. 548 END PutOnTop;
  1263. ***** ^ not supported yet
  1264. 549
  1265. 550
  1266. 551 PROCEDURE Hide ( W : WinType );
  1267. ***** ^ undeclared identifier
  1268. 552 (*
  1269. 553 Removes window from the Window stack and also the screen
  1270. 554 Placing the windows contents in a buffer for possible re-display later
  1271. 555 Uncovers obscured windows
  1272. 556 *)
  1273. 557 VAR
  1274. 558 p : WinType;
  1275. ***** ^ undeclared identifier
  1276. 559 w : WinType;
  1277. ***** ^ undeclared identifier
  1278. 560 BEGIN
  1279. 561 (*%T _mthread *)
  1280. 562 Lock();
  1281. ***** ^ not supported yet
  1282. ***** ^ not supported yet
  1283. 563 (*%E *)
  1284. 564 CheckWindow(W);
  1285. ***** ^ not supported yet
  1286. ***** ^ not supported yet
  1287. 565 WITH W^ DO
  1288. ***** ^ not supported yet
  1289. 566 IF NOT WDef.Hidden THEN
  1290. ***** ^ undeclared identifier
  1291. ***** ^ not supported yet
  1292. 567 w := W^.Next;
  1293. ***** ^ not supported yet
  1294. ***** ^ not supported yet
  1295. ***** ^ not supported yet
  1296. 568 TakeOffStack ( W );
  1297. ***** ^ not supported yet
  1298. ***** ^ not supported yet
  1299. 569 DisplayBeneath ( W, w );
  1300. ***** ^ not supported yet
  1301. ***** ^ not supported yet
  1302. ***** ^ not supported yet
  1303. 570 IF WDef.CursorOn THEN CursorOff; WDef.CursorOn := TRUE; END;
  1304. ***** ^ undeclared identifier
  1305. ***** ^ not supported yet
  1306. ***** ^ not supported yet
  1307. ***** ^ undeclared identifier
  1308. ***** ^ not supported yet
  1309. 571 WDef.Hidden := TRUE;
  1310. ***** ^ undeclared identifier
  1311. ***** ^ not supported yet
  1312. 572 END;
  1313. 573 END;
  1314. ***** ^ not supported yet
  1315. 574 ResetCursor;
  1316. ***** ^ not supported yet
  1317. 575 (*%T _mthread *)
  1318. 576 Unlock();
  1319. ***** ^ not supported yet
  1320. ***** ^ not supported yet
  1321. 577 (*%E *)
  1322. 578 END Hide;
  1323. ***** ^ not supported yet
  1324. 579
  1325. 580 PROCEDURE PutBeneath ( W : WinType; WA : WinType );
  1326. ***** ^ undeclared identifier
  1327. ***** ^ undeclared identifier
  1328. 581 (*
  1329. 582 Puts window W beneath window WA
  1330. 583 *)
  1331. 584 VAR
  1332. 585 p : WinType;
  1333. ***** ^ undeclared identifier
  1334. 586 w : WinType;
  1335. ***** ^ undeclared identifier
  1336. 587 BEGIN
  1337. 588 Hide(W);
  1338. ***** ^ not supported yet
  1339. ***** ^ not supported yet
  1340. 589 (*%T _mthread *)
  1341. 590 Lock();
  1342. ***** ^ not supported yet
  1343. ***** ^ not supported yet
  1344. 591 (*%E *)
  1345. 592 CheckWindow(WA);
  1346. ***** ^ not supported yet
  1347. ***** ^ not supported yet
  1348. 593 WITH WA^ DO
  1349. ***** ^ not supported yet
  1350. 594 IF NOT WDef.Hidden THEN
  1351. ***** ^ undeclared identifier
  1352. ***** ^ not supported yet
  1353. 595 w := Next;
  1354. ***** ^ not supported yet
  1355. ***** ^ undeclared identifier
  1356. 596 Next := W;
  1357. ***** ^ undeclared identifier
  1358. ***** ^ not supported yet
  1359. 597 W^.Next := w;
  1360. ***** ^ not supported yet
  1361. ***** ^ not supported yet
  1362. ***** ^ not supported yet
  1363. 598 W^.WDef.Hidden := FALSE;
  1364. ***** ^ not supported yet
  1365. ***** ^ not supported yet
  1366. ***** ^ not supported yet
  1367. 599 RedrawWindow ( W );
  1368. ***** ^ not supported yet
  1369. ***** ^ not supported yet
  1370. 600 END;
  1371. 601 END;
  1372. ***** ^ not supported yet
  1373. 602 ResetCursor;
  1374. ***** ^ not supported yet
  1375. 603 (*%T _mthread *)
  1376. 604 Unlock();
  1377. ***** ^ not supported yet
  1378. ***** ^ not supported yet
  1379. 605 (*%E *)
  1380. 606 END PutBeneath;
  1381. ***** ^ not supported yet
  1382. 607
  1383. 608 PROCEDURE SnapShot;
  1384. 609 (* Updates the Window buffer from the screen *)
  1385. 610 (* only works with non palette windows *)
  1386. 611 VAR
  1387. 612 W : WinType;
  1388. ***** ^ undeclared identifier
  1389. 613 y : CARDINAL;
  1390. 614 p : CARDINAL;
  1391. 615 BEGIN
  1392. 616 W := CurWin();
  1393. ***** ^ not supported yet
  1394. ***** ^ not supported yet
  1395. ***** ^ not supported yet
  1396. 617 WITH W^ DO
  1397. ***** ^ not supported yet
  1398. 618 WITH WDef DO
  1399. ***** ^ undeclared identifier
  1400. 619 IF NOT IsPalette THEN
  1401. ***** ^ undeclared identifier
  1402. 620 p := 0;
  1403. 621 FOR y := Y1 TO Y2 DO
  1404. ***** ^ undeclared identifier
  1405. ***** ^ undeclared identifier
  1406. 622 CoreWind._screentobuffer(X1,y,ADR(Buffer^[p]),OWidth);
  1407. ***** ^ undeclared identifier
  1408. ***** ^ not supported yet
  1409. ***** ^ undeclared identifier
  1410. ***** ^ undeclared identifier
  1411. ***** ^ undeclared identifier
  1412. ***** ^ not supported yet
  1413. ***** ^ undeclared identifier
  1414. 623 INC(p,OWidth);
  1415. ***** ^ undeclared identifier
  1416. ***** ^ undeclared identifier
  1417. 624 END;
  1418. 625 END;
  1419. 626 END;
  1420. ***** ^ not supported yet
  1421. 627 END;
  1422. ***** ^ not supported yet
  1423. 628 (*%T _mthread *)
  1424. 629 Unlock();
  1425. ***** ^ not supported yet
  1426. ***** ^ not supported yet
  1427. 630 (*%E *)
  1428. 631 END SnapShot;
  1429. ***** ^ not supported yet
  1430. 632
  1431. 633
  1432. 634 (* ------------------------- *)
  1433. 635 (* Window disposal *)
  1434. 636 (* ------------------------- *)
  1435. 637
  1436. 638 PROCEDURE DisposeTitle ( W : WinType );
  1437. ***** ^ undeclared identifier
  1438. 639 BEGIN
  1439. 640 WITH W^ DO
  1440. ***** ^ not supported yet
  1441. 641 IF TMode # NoTitle THEN
  1442. ***** ^ undeclared identifier
  1443. ***** ^ undeclared identifier
  1444. 642 DEALLOCATE(Title,Str.Length(Title^)+1);
  1445. ***** ^ not supported yet
  1446. ***** ^ undeclared identifier
  1447. ***** ^ not supported yet
  1448. ***** ^ not supported yet
  1449. ***** ^ undeclared identifier
  1450. ***** ^ not supported yet
  1451. 643 TMode := NoTitle;
  1452. ***** ^ undeclared identifier
  1453. ***** ^ undeclared identifier
  1454. 644 END;
  1455. 645 END;
  1456. ***** ^ not supported yet
  1457. 646 END DisposeTitle;
  1458. ***** ^ not supported yet
  1459. 647
  1460. 648
  1461. 649
  1462. 650 PROCEDURE Close ( VAR W : WinType );
  1463. ***** ^ undeclared identifier
  1464. 651 (*
  1465. 652 removes the specified window from the screen
  1466. 653 deletes window descriptor and
  1467. 654 de-allocates any buffers previously allocated.
  1468. 655 *)
  1469. 656 VAR
  1470. 657 w : WinType;
  1471. ***** ^ undeclared identifier
  1472. 658 u,up,un : UseListPtr;
  1473. ***** ^ not supported yet
  1474. 659 BEGIN
  1475. 660 (*%T _mthread *)
  1476. 661 Lock();
  1477. ***** ^ not supported yet
  1478. ***** ^ not supported yet
  1479. 662 (*%E *)
  1480. 663 Hide ( W );
  1481. ***** ^ not supported yet
  1482. ***** ^ not supported yet
  1483. 664 TakeOffStack (W);
  1484. ***** ^ not supported yet
  1485. ***** ^ not supported yet
  1486. 665 UnlinkCursor(W);
  1487. ***** ^ not supported yet
  1488. ***** ^ not supported yet
  1489. 666 WITH W^ DO
  1490. ***** ^ not supported yet
  1491. 667 IF (Buffer # NIL) THEN DEALLOCATE(Buffer,OWidth * ODepth * 2); END;
  1492. ***** ^ undeclared identifier
  1493. ***** ^ not supported yet
  1494. ***** ^ undeclared identifier
  1495. ***** ^ undeclared identifier
  1496. ***** ^ undeclared identifier
  1497. ***** ^ not supported yet
  1498. 668 END;
  1499. ***** ^ not supported yet
  1500. 669 up := UseListPtr(CoreWind._uselist);
  1501. ***** ^ undeclared identifier
  1502. ***** ^ undeclared identifier
  1503. ***** ^ not supported yet
  1504. 670 u := up^.Next;
  1505. ***** ^ undeclared identifier
  1506. ***** ^ undeclared identifier
  1507. ***** ^ not supported yet
  1508. 671 WHILE (u#NIL) DO
  1509. ***** ^ undeclared identifier
  1510. 672 un := u^.Next;
  1511. ***** ^ undeclared identifier
  1512. ***** ^ undeclared identifier
  1513. ***** ^ not supported yet
  1514. 673 IF (u^.Wind = W) THEN
  1515. ***** ^ undeclared identifier
  1516. ***** ^ not supported yet
  1517. ***** ^ undeclared identifier
  1518. 674 up^.Next := un;
  1519. ***** ^ undeclared identifier
  1520. ***** ^ not supported yet
  1521. ***** ^ undeclared identifier
  1522. 675 DISPOSE(u);
  1523. ***** ^ undeclared identifier
  1524. ***** ^ undeclared identifier
  1525. 676 ELSE
  1526. 677 up := u;
  1527. ***** ^ undeclared identifier
  1528. ***** ^ undeclared identifier
  1529. 678 END;
  1530. 679 u := un;
  1531. ***** ^ undeclared identifier
  1532. ***** ^ undeclared identifier
  1533. 680 END;
  1534. 681 DisposeTitle(W);
  1535. ***** ^ not supported yet
  1536. ***** ^ undeclared identifier
  1537. 682 W^.Guard := GuardConst; (* Invalidate guard *)
  1538. ***** ^ undeclared identifier
  1539. ***** ^ not supported yet
  1540. 683 DISPOSE(W);
  1541. ***** ^ undeclared identifier
  1542. ***** ^ undeclared identifier
  1543. 684 (*%T _mthread *)
  1544. 685 Unlock();
  1545. ***** ^ not supported yet
  1546. ***** ^ not supported yet
  1547. 686 (*%E *)
  1548. 687 END Close;
  1549. ***** ^ not supported yet
  1550. 688
  1551. 689
  1552. 690
  1553. 691
  1554. 692 PROCEDURE Used () : WinType;
  1555. ***** ^ undeclared identifier
  1556. 693 (*
  1557. 694 Returns The current window being used for output for this process
  1558. 695 If no window assigned by Use then returns Top
  1559. 696 *)
  1560. 697 VAR
  1561. 698 w : WinType;
  1562. ***** ^ undeclared identifier
  1563. 699 BEGIN
  1564. 700 w := CurWin();
  1565. ***** ^ not supported yet
  1566. ***** ^ not supported yet
  1567. ***** ^ not supported yet
  1568. 701 (*%T _mthread *)
  1569. 702 Unlock();
  1570. ***** ^ not supported yet
  1571. ***** ^ not supported yet
  1572. 703 (*%E *)
  1573. 704 RETURN w;
  1574. ***** ^ not supported yet
  1575. 705 END Used;
  1576. ***** ^ not supported yet
  1577. 706
  1578. 707 PROCEDURE Top () : WinType;
  1579. ***** ^ undeclared identifier
  1580. 708 (*
  1581. 709 Returns The current top Window
  1582. 710 *)
  1583. 711 VAR w : WinType;
  1584. ***** ^ undeclared identifier
  1585. 712 BEGIN
  1586. 713 (*%T _mthread *)
  1587. 714 Lock();
  1588. ***** ^ not supported yet
  1589. ***** ^ not supported yet
  1590. 715 (*%E *)
  1591. 716 w := WinType(CoreWind._windowstack);
  1592. ***** ^ not supported yet
  1593. ***** ^ undeclared identifier
  1594. ***** ^ undeclared identifier
  1595. ***** ^ not supported yet
  1596. 717 (*%T _mthread *)
  1597. 718 Unlock();
  1598. ***** ^ not supported yet
  1599. ***** ^ not supported yet
  1600. 719 (*%E *)
  1601. 720 RETURN w;
  1602. ***** ^ not supported yet
  1603. 721 END Top;
  1604. ***** ^ not supported yet
  1605. 722
  1606. 723
  1607. 724
  1608. 725 PROCEDURE At (X,Y : AbsCoord) : WinType;
  1609. ***** ^ undeclared identifier
  1610. ***** ^ undeclared identifier
  1611. 726 (*
  1612. 727 Returns the window displayed at the absolute position X,Y
  1613. 728 *)
  1614. 729 VAR
  1615. 730 W : WinType;
  1616. ***** ^ undeclared identifier
  1617. 731 BEGIN
  1618. 732 (*%T _mthread *)
  1619. 733 Lock();
  1620. ***** ^ not supported yet
  1621. ***** ^ not supported yet
  1622. 734 (*%E *)
  1623. 735 W := WinType(CoreWind._windowstack);
  1624. ***** ^ not supported yet
  1625. ***** ^ undeclared identifier
  1626. ***** ^ undeclared identifier
  1627. ***** ^ not supported yet
  1628. 736 LOOP
  1629. 737 IF W = NIL THEN EXIT END;
  1630. ***** ^ not supported yet
  1631. 738 WITH W^ DO
  1632. ***** ^ not supported yet
  1633. 739 IF (Y >= WDef.Y1) AND (Y <= WDef.Y2) AND
  1634. ***** ^ not supported yet
  1635. ***** ^ undeclared identifier
  1636. ***** ^ not supported yet
  1637. ***** ^ not supported yet
  1638. ***** ^ undeclared identifier
  1639. ***** ^ not supported yet
  1640. 740 (X >= WDef.X1) AND (X <= WDef.X2) THEN
  1641. ***** ^ not supported yet
  1642. ***** ^ undeclared identifier
  1643. ***** ^ not supported yet
  1644. ***** ^ not supported yet
  1645. ***** ^ undeclared identifier
  1646. ***** ^ not supported yet
  1647. 741 EXIT
  1648. 742 END;
  1649. 743 W := Next;
  1650. ***** ^ not supported yet
  1651. ***** ^ undeclared identifier
  1652. 744 END;
  1653. ***** ^ not supported yet
  1654. 745 END;
  1655. 746 (*%T _mthread *)
  1656. 747 Unlock();
  1657. ***** ^ not supported yet
  1658. ***** ^ not supported yet
  1659. 748 (*%E *)
  1660. 749 RETURN W;
  1661. ***** ^ undeclared identifier
  1662. 750 END At;
  1663. ***** ^ not supported yet
  1664. 751
  1665. 752 PROCEDURE ObscuredAt (W : WinType; X,Y : RelCoord ) : BOOLEAN;
  1666. ***** ^ undeclared identifier
  1667. ***** ^ undeclared identifier
  1668. 753 (*
  1669. 754 Returns if the specified window is obscured at the specified position
  1670. 755 *)
  1671. 756 VAR
  1672. 757 b : BOOLEAN;
  1673. 758 w : WinType;
  1674. ***** ^ undeclared identifier
  1675. 759 BEGIN
  1676. 760 (*%T _mthread *)
  1677. 761 Lock();
  1678. ***** ^ not supported yet
  1679. ***** ^ not supported yet
  1680. 762 (*%E *)
  1681. 763 CheckWindow(W);
  1682. ***** ^ not supported yet
  1683. ***** ^ not supported yet
  1684. 764 WITH W^ DO
  1685. ***** ^ not supported yet
  1686. 765 IF WDef.Hidden THEN
  1687. ***** ^ undeclared identifier
  1688. ***** ^ not supported yet
  1689. 766 b:= TRUE;
  1690. 767 ELSE
  1691. 768 INC(X,XA-1); INC(Y,YA-1);
  1692. ***** ^ undeclared identifier
  1693. ***** ^ not supported yet
  1694. ***** ^ undeclared identifier
  1695. ***** ^ not supported yet
  1696. ***** ^ undeclared identifier
  1697. ***** ^ not supported yet
  1698. ***** ^ undeclared identifier
  1699. ***** ^ not supported yet
  1700. 769 w := WinType(CoreWind._windowstack);
  1701. ***** ^ not supported yet
  1702. ***** ^ undeclared identifier
  1703. ***** ^ undeclared identifier
  1704. ***** ^ not supported yet
  1705. 770 LOOP
  1706. 771 IF w = W THEN b := FALSE; EXIT END;
  1707. ***** ^ not supported yet
  1708. ***** ^ not supported yet
  1709. 772 IF w = NIL THEN b := TRUE; EXIT END;
  1710. ***** ^ not supported yet
  1711. 773 WITH w^ DO
  1712. ***** ^ not supported yet
  1713. 774 IF (Y>=WDef.Y1) AND (Y<=WDef.Y2) AND
  1714. ***** ^ not supported yet
  1715. ***** ^ undeclared identifier
  1716. ***** ^ not supported yet
  1717. ***** ^ not supported yet
  1718. ***** ^ undeclared identifier
  1719. ***** ^ not supported yet
  1720. 775 (X>=WDef.X1) AND (X<=WDef.X2) THEN
  1721. ***** ^ not supported yet
  1722. ***** ^ undeclared identifier
  1723. ***** ^ not supported yet
  1724. ***** ^ not supported yet
  1725. ***** ^ undeclared identifier
  1726. ***** ^ not supported yet
  1727. 776 b := TRUE;
  1728. 777 EXIT
  1729. 778 END;
  1730. 779 w := Next;
  1731. ***** ^ not supported yet
  1732. ***** ^ undeclared identifier
  1733. 780 END;
  1734. ***** ^ not supported yet
  1735. 781 END;
  1736. 782 END;
  1737. 783 END;
  1738. ***** ^ not supported yet
  1739. 784 (*%T _mthread *)
  1740. 785 Unlock();
  1741. ***** ^ not supported yet
  1742. ***** ^ not supported yet
  1743. 786 (*%E *)
  1744. 787 RETURN b;
  1745. ***** ^ undeclared identifier
  1746. 788 END ObscuredAt;
  1747. ***** ^ not supported yet
  1748. 789
  1749. 790
  1750. 791
  1751. 792 PROCEDURE WindowWrite ( W : WinType;
  1752. ***** ^ undeclared identifier
  1753. 793 x,y : RelCoord;
  1754. ***** ^ undeclared identifier
  1755. 794 Len : CARDINAL;
  1756. 795 str : ADDRESS;
  1757. ***** ^ undeclared identifier
  1758. 796 frame : BOOLEAN ); (* Private *)
  1759. 797 VAR
  1760. 798 Attr : CARDINAL;
  1761. 799 X,Y : AbsCoord;
  1762. ***** ^ undeclared identifier
  1763. 800 BEGIN
  1764. 801 IF Len>0 THEN
  1765. 802 WITH W^ DO
  1766. ***** ^ not supported yet
  1767. 803 IF IsPalette THEN
  1768. ***** ^ undeclared identifier
  1769. 804 IF frame THEN
  1770. 805 Attr := VAL(CARDINAL,FramePaletteColor);
  1771. ***** ^ undeclared identifier
  1772. ***** ^ undeclared identifier
  1773. 806 ELSE
  1774. 807 Attr := VAL(CARDINAL,CurPalColor);
  1775. ***** ^ undeclared identifier
  1776. ***** ^ undeclared identifier
  1777. 808 END;
  1778. 809 ELSIF frame THEN
  1779. 810 Attr := ORD(WDef.FrameFore)+ORD(WDef.FrameBack)*16;
  1780. ***** ^ undeclared identifier
  1781. ***** ^ undeclared identifier
  1782. ***** ^ not supported yet
  1783. ***** ^ undeclared identifier
  1784. ***** ^ undeclared identifier
  1785. ***** ^ not supported yet
  1786. 811 ELSE
  1787. 812 Attr := ORD(WDef.Foreground)+ORD(WDef.Background)*16;
  1788. ***** ^ undeclared identifier
  1789. ***** ^ undeclared identifier
  1790. ***** ^ not supported yet
  1791. ***** ^ undeclared identifier
  1792. ***** ^ undeclared identifier
  1793. ***** ^ not supported yet
  1794. 813 END;
  1795. 814 X := x+XA-1; Y := y+YA-1;
  1796. ***** ^ not supported yet
  1797. ***** ^ not supported yet
  1798. ***** ^ undeclared identifier
  1799. ***** ^ not supported yet
  1800. ***** ^ not supported yet
  1801. ***** ^ undeclared identifier
  1802. 815 IF Len+X-1 > WDef.X2 THEN Len := WDef.X2+1-X END;
  1803. ***** ^ not supported yet
  1804. ***** ^ undeclared identifier
  1805. ***** ^ not supported yet
  1806. ***** ^ undeclared identifier
  1807. ***** ^ not supported yet
  1808. ***** ^ not supported yet
  1809. 816 CoreWind._bufferwrite (ADR(Buffer^[X-WDef.X1+(Y-WDef.Y1)*OWidth]),str,Len,Attr);
  1810. ***** ^ undeclared identifier
  1811. ***** ^ not supported yet
  1812. ***** ^ undeclared identifier
  1813. ***** ^ undeclared identifier
  1814. ***** ^ not supported yet
  1815. ***** ^ undeclared identifier
  1816. ***** ^ not supported yet
  1817. ***** ^ not supported yet
  1818. ***** ^ undeclared identifier
  1819. ***** ^ not supported yet
  1820. ***** ^ undeclared identifier
  1821. ***** ^ not supported yet
  1822. ***** ^ not supported yet
  1823. 817 UpdateScreen(W,X,Y,Len);
  1824. ***** ^ not supported yet
  1825. ***** ^ not supported yet
  1826. ***** ^ not supported yet
  1827. ***** ^ not supported yet
  1828. ***** ^ not supported yet
  1829. 818 END;
  1830. ***** ^ not supported yet
  1831. 819 END;
  1832. 820 END WindowWrite;
  1833. ***** ^ not supported yet
  1834. 821
  1835. 822 PROCEDURE DrawFrame ( W : WinType );
  1836. ***** ^ undeclared identifier
  1837. 823 VAR
  1838. 824 s : ARRAY[0..81] OF CHAR;
  1839. ***** ^ not supported yet
  1840. ***** ^ not supported yet
  1841. 825 w,l,tl : CARDINAL;
  1842. 826 i : CARDINAL;
  1843. 827
  1844. 828 PROCEDURE PutTitle ( mode : CARDINAL; row : CARDINAL );
  1845. 829 VAR
  1846. 830 i,j : CARDINAL;
  1847. 831 BEGIN
  1848. 832 WITH W^ DO
  1849. ***** ^ not supported yet
  1850. 833 CASE mode OF
  1851. 834 0 : i := 1 |
  1852. 835 1 : i := (Width-tl) DIV 2 + 1; |
  1853. ***** ^ undeclared identifier
  1854. 836 2 : i := Width+1-tl |
  1855. ***** ^ undeclared identifier
  1856. 837 ELSE
  1857. 838 i := MAX(CARDINAL);
  1858. ***** ^ undeclared identifier
  1859. ***** ^ not supported yet
  1860. 839 END;
  1861. 840 j := 0;
  1862. 841 WHILE (i<=Width)AND(j<tl) DO
  1863. ***** ^ undeclared identifier
  1864. 842 s[i] := Title^[j]; INC(i); INC(j)
  1865. ***** ^ not supported yet
  1866. ***** ^ not supported yet
  1867. ***** ^ undeclared identifier
  1868. ***** ^ not supported yet
  1869. ***** ^ undeclared identifier
  1870. ***** ^ not supported yet
  1871. ***** ^ undeclared identifier
  1872. ***** ^ not supported yet
  1873. 843 END;
  1874. 844 WindowWrite (W,0,row,OWidth,ADR(s),TRUE);
  1875. ***** ^ not supported yet
  1876. ***** ^ not supported yet
  1877. ***** ^ undeclared identifier
  1878. ***** ^ undeclared identifier
  1879. ***** ^ not supported yet
  1880. ***** ^ not supported yet
  1881. 845 END;
  1882. ***** ^ not supported yet
  1883. 846 END PutTitle;
  1884. ***** ^ not supported yet
  1885. 847
  1886. 848
  1887. 849 BEGIN
  1888. 850 WITH W^ DO
  1889. ***** ^ undeclared identifier
  1890. 851 IF NOT WDef.FrameOn THEN
  1891. ***** ^ undeclared identifier
  1892. ***** ^ not supported yet
  1893. 852 IF (OWidth<3)OR(ODepth<3) THEN RETURN END; (* No Room *)
  1894. ***** ^ undeclared identifier
  1895. ***** ^ undeclared identifier
  1896. 853 WDef.FrameOn := TRUE;
  1897. ***** ^ undeclared identifier
  1898. ***** ^ not supported yet
  1899. 854 ClipFrame(W);
  1900. ***** ^ not supported yet
  1901. ***** ^ undeclared identifier
  1902. 855 ResetCursor;
  1903. ***** ^ not supported yet
  1904. 856 END;
  1905. 857 s[0] := WDef.FrameDef[0];
  1906. ***** ^ undeclared identifier
  1907. ***** ^ not supported yet
  1908. ***** ^ undeclared identifier
  1909. ***** ^ not supported yet
  1910. ***** ^ not supported yet
  1911. 858 Lib.Fill(ADR(s[1]),Width,WDef.FrameDef[1]);
  1912. ***** ^ not supported yet
  1913. ***** ^ not supported yet
  1914. ***** ^ undeclared identifier
  1915. ***** ^ undeclared identifier
  1916. ***** ^ not supported yet
  1917. ***** ^ undeclared identifier
  1918. ***** ^ undeclared identifier
  1919. ***** ^ not supported yet
  1920. ***** ^ not supported yet
  1921. 859 s[Width+1] := WDef.FrameDef[2];
  1922. ***** ^ undeclared identifier
  1923. ***** ^ undeclared identifier
  1924. ***** ^ not supported yet
  1925. ***** ^ undeclared identifier
  1926. ***** ^ not supported yet
  1927. ***** ^ not supported yet
  1928. 860 IF TMode # NoTitle THEN
  1929. ***** ^ undeclared identifier
  1930. ***** ^ undeclared identifier
  1931. 861 tl := Str.Length(Title^);
  1932. ***** ^ undeclared identifier
  1933. ***** ^ not supported yet
  1934. ***** ^ not supported yet
  1935. ***** ^ undeclared identifier
  1936. 862 IF tl>Width THEN tl := Width END;
  1937. ***** ^ undeclared identifier
  1938. ***** ^ undeclared identifier
  1939. ***** ^ undeclared identifier
  1940. ***** ^ undeclared identifier
  1941. 863 END;
  1942. 864 PutTitle(ORD(TMode-LeftUpperTitle),0);
  1943. ***** ^ undeclared identifier
  1944. ***** ^ undeclared identifier
  1945. ***** ^ undeclared identifier
  1946. ***** ^ undeclared identifier
  1947. ***** ^ not supported yet
  1948. 865 (* Sides *)
  1949. 866 FOR i := 1 TO Depth DO
  1950. ***** ^ undeclared identifier
  1951. ***** ^ undeclared identifier
  1952. 867 WindowWrite(W,0,i,1,ADR(WDef.FrameDef[3]),TRUE);
  1953. ***** ^ not supported yet
  1954. ***** ^ undeclared identifier
  1955. ***** ^ undeclared identifier
  1956. ***** ^ undeclared identifier
  1957. ***** ^ undeclared identifier
  1958. ***** ^ not supported yet
  1959. ***** ^ not supported yet
  1960. ***** ^ not supported yet
  1961. 868 WindowWrite(W,Width+1,i,1,ADR(WDef.FrameDef[4]),TRUE);
  1962. ***** ^ not supported yet
  1963. ***** ^ undeclared identifier
  1964. ***** ^ undeclared identifier
  1965. ***** ^ undeclared identifier
  1966. ***** ^ undeclared identifier
  1967. ***** ^ undeclared identifier
  1968. ***** ^ not supported yet
  1969. ***** ^ not supported yet
  1970. ***** ^ not supported yet
  1971. 869 END;
  1972. 870 s[0] := WDef.FrameDef[5];
  1973. ***** ^ undeclared identifier
  1974. ***** ^ not supported yet
  1975. ***** ^ undeclared identifier
  1976. ***** ^ not supported yet
  1977. ***** ^ not supported yet
  1978. 871 Lib.Fill(ADR(s[1]),Width,WDef.FrameDef[6]);
  1979. ***** ^ not supported yet
  1980. ***** ^ not supported yet
  1981. ***** ^ undeclared identifier
  1982. ***** ^ undeclared identifier
  1983. ***** ^ not supported yet
  1984. ***** ^ undeclared identifier
  1985. ***** ^ undeclared identifier
  1986. ***** ^ not supported yet
  1987. ***** ^ not supported yet
  1988. 872 s[Width+1] := WDef.FrameDef[7];
  1989. ***** ^ undeclared identifier
  1990. ***** ^ undeclared identifier
  1991. ***** ^ not supported yet
  1992. ***** ^ undeclared identifier
  1993. ***** ^ not supported yet
  1994. ***** ^ not supported yet
  1995. 873 PutTitle(ORD(TMode-LeftLowerTitle),Depth+1);
  1996. ***** ^ undeclared identifier
  1997. ***** ^ undeclared identifier
  1998. ***** ^ undeclared identifier
  1999. ***** ^ undeclared identifier
  2000. ***** ^ undeclared identifier
  2001. ***** ^ not supported yet
  2002. 874 END;
  2003. ***** ^ not supported yet
  2004. 875 END DrawFrame;
  2005. ***** ^ not supported yet
  2006. 876
  2007. 877
  2008. 878
  2009. 879 PROCEDURE SetFrame ( W : WinType;
  2010. ***** ^ undeclared identifier
  2011. 880 Frame : FrameStr;
  2012. ***** ^ undeclared identifier
  2013. 881 Fore, Back : Color );
  2014. ***** ^ undeclared identifier
  2015. 882 (*
  2016. 883 Put a frame around the specified window
  2017. 884 With Title String and border definition (see above)
  2018. 885 having specified fore/background colours for the border
  2019. 886 *)
  2020. 887 BEGIN
  2021. 888 (*%T _mthread *)
  2022. 889 Lock();
  2023. ***** ^ not supported yet
  2024. ***** ^ not supported yet
  2025. 890 (*%E *)
  2026. 891 CheckWindow(W);
  2027. ***** ^ not supported yet
  2028. ***** ^ not supported yet
  2029. 892 WITH W^ DO
  2030. ***** ^ not supported yet
  2031. 893 WDef.FrameDef := Frame;
  2032. ***** ^ undeclared identifier
  2033. ***** ^ not supported yet
  2034. ***** ^ not supported yet
  2035. 894 WDef.FrameFore := Fore;
  2036. ***** ^ undeclared identifier
  2037. ***** ^ not supported yet
  2038. ***** ^ not supported yet
  2039. 895 WDef.FrameBack := Back;
  2040. ***** ^ undeclared identifier
  2041. ***** ^ not supported yet
  2042. ***** ^ not supported yet
  2043. 896 END;
  2044. ***** ^ not supported yet
  2045. 897 DrawFrame(W);
  2046. ***** ^ not supported yet
  2047. ***** ^ undeclared identifier
  2048. 898 (*%T _mthread *)
  2049. 899 Unlock();
  2050. ***** ^ not supported yet
  2051. ***** ^ not supported yet
  2052. 900 (*%E *)
  2053. 901 END SetFrame;
  2054. ***** ^ not supported yet
  2055. 902
  2056. 903
  2057. 904
  2058. 905 PROCEDURE MergeWindows ( s,d : WinType );
  2059. ***** ^ undeclared identifier
  2060. 906 (* slightly complicated procedure to merge two windows
  2061. 907 s is new (hidden) window
  2062. 908 d is old window to be merged into
  2063. 909 *)
  2064. 910 VAR
  2065. 911 w : WinDescriptor;
  2066. ***** ^ undeclared identifier
  2067. 912 r,wd : CARDINAL;
  2068. 913 sw,sd,so,sp : CARDINAL;
  2069. 914 dw,dd,do,dp : CARDINAL;
  2070. 915 BEGIN
  2071. 916 s^.CurrentX := d^.CurrentX;
  2072. ***** ^ not supported yet
  2073. ***** ^ not supported yet
  2074. ***** ^ not supported yet
  2075. ***** ^ not supported yet
  2076. 917 s^.CurrentY := d^.CurrentY;
  2077. ***** ^ not supported yet
  2078. ***** ^ not supported yet
  2079. ***** ^ not supported yet
  2080. ***** ^ not supported yet
  2081. 918 s^.CursorChain := d^.CursorChain;
  2082. ***** ^ not supported yet
  2083. ***** ^ not supported yet
  2084. ***** ^ not supported yet
  2085. ***** ^ not supported yet
  2086. 919 s^.UserRecord := d^.UserRecord;
  2087. ***** ^ not supported yet
  2088. ***** ^ not supported yet
  2089. ***** ^ not supported yet
  2090. ***** ^ not supported yet
  2091. 920 s^.CurPalColor := d^.CurPalColor;
  2092. ***** ^ not supported yet
  2093. ***** ^ not supported yet
  2094. ***** ^ not supported yet
  2095. ***** ^ not supported yet
  2096. 921 s^.Title := d^.Title;
  2097. ***** ^ not supported yet
  2098. ***** ^ not supported yet
  2099. ***** ^ not supported yet
  2100. ***** ^ not supported yet
  2101. 922 s^.TMode := d^.TMode;
  2102. ***** ^ not supported yet
  2103. ***** ^ not supported yet
  2104. ***** ^ not supported yet
  2105. ***** ^ not supported yet
  2106. 923 d^.TMode := NoTitle;
  2107. ***** ^ not supported yet
  2108. ***** ^ not supported yet
  2109. ***** ^ undeclared identifier
  2110. 924 d^.WDef.CursorOn := FALSE;
  2111. ***** ^ not supported yet
  2112. ***** ^ not supported yet
  2113. ***** ^ not supported yet
  2114. 925 w := d^; d^ := s^; s^ := w;
  2115. ***** ^ not supported yet
  2116. ***** ^ not supported yet
  2117. ***** ^ not supported yet
  2118. ***** ^ not supported yet
  2119. ***** ^ not supported yet
  2120. ***** ^ not supported yet
  2121. 926 WITH s^ DO
  2122. ***** ^ not supported yet
  2123. 927 sw := OWidth; sd := ODepth;
  2124. ***** ^ undeclared identifier
  2125. ***** ^ undeclared identifier
  2126. 928 IF WDef.FrameOn THEN
  2127. ***** ^ undeclared identifier
  2128. ***** ^ not supported yet
  2129. 929 DEC(sw,2); DEC(sd,2);
  2130. ***** ^ undeclared identifier
  2131. ***** ^ not supported yet
  2132. ***** ^ undeclared identifier
  2133. ***** ^ not supported yet
  2134. 930 sp := (OWidth+1);
  2135. ***** ^ undeclared identifier
  2136. 931 ELSE
  2137. 932 sp := 0;
  2138. 933 END;
  2139. 934 Guard := GuardConst+CARDINAL(Seg(s^));
  2140. ***** ^ undeclared identifier
  2141. ***** ^ undeclared identifier
  2142. ***** ^ not supported yet
  2143. 935 END;
  2144. ***** ^ not supported yet
  2145. 936 WITH d^ DO
  2146. ***** ^ undeclared identifier
  2147. 937 dw := OWidth; dd := ODepth;
  2148. ***** ^ undeclared identifier
  2149. ***** ^ undeclared identifier
  2150. ***** ^ undeclared identifier
  2151. ***** ^ undeclared identifier
  2152. 938 IF WDef.FrameOn THEN
  2153. ***** ^ undeclared identifier
  2154. ***** ^ not supported yet
  2155. 939 DEC(dw,2); DEC(dd,2);
  2156. ***** ^ undeclared identifier
  2157. ***** ^ undeclared identifier
  2158. ***** ^ not supported yet
  2159. ***** ^ undeclared identifier
  2160. ***** ^ undeclared identifier
  2161. ***** ^ not supported yet
  2162. 940 dp := OWidth+1;
  2163. ***** ^ undeclared identifier
  2164. ***** ^ undeclared identifier
  2165. 941 ELSE
  2166. 942 dp := 0;
  2167. ***** ^ undeclared identifier
  2168. 943 END;
  2169. 944 Guard := GuardConst+CARDINAL(Seg(d^));
  2170. ***** ^ undeclared identifier
  2171. ***** ^ undeclared identifier
  2172. ***** ^ undeclared identifier
  2173. 945 END;
  2174. ***** ^ not supported yet
  2175. 946 IF sd < dd THEN wd := sd ELSE wd := dd END;
  2176. ***** ^ undeclared identifier
  2177. ***** ^ undeclared identifier
  2178. ***** ^ undeclared identifier
  2179. ***** ^ undeclared identifier
  2180. ***** ^ undeclared identifier
  2181. ***** ^ undeclared identifier
  2182. 947 FOR r := 0 TO wd-1 DO
  2183. ***** ^ undeclared identifier
  2184. ***** ^ undeclared identifier
  2185. ***** ^ FOR needs integer variable and bounds
  2186. 948 IF sw>=dw THEN
  2187. ***** ^ undeclared identifier
  2188. ***** ^ undeclared identifier
  2189. 949 Lib.WordMove(ADR(s^.Buffer^[sp]),ADR(d^.Buffer^[dp]),dw);
  2190. ***** ^ not supported yet
  2191. ***** ^ not supported yet
  2192. ***** ^ undeclared identifier
  2193. ***** ^ undeclared identifier
  2194. ***** ^ not supported yet
  2195. ***** ^ undeclared identifier
  2196. ***** ^ undeclared identifier
  2197. ***** ^ undeclared identifier
  2198. ***** ^ not supported yet
  2199. ***** ^ undeclared identifier
  2200. ***** ^ undeclared identifier
  2201. 950 ELSE
  2202. 951 Lib.WordMove(ADR(s^.Buffer^[sp]),ADR(d^.Buffer^[dp]),sw);
  2203. ***** ^ not supported yet
  2204. ***** ^ not supported yet
  2205. ***** ^ undeclared identifier
  2206. ***** ^ undeclared identifier
  2207. ***** ^ not supported yet
  2208. ***** ^ undeclared identifier
  2209. ***** ^ undeclared identifier
  2210. ***** ^ undeclared identifier
  2211. ***** ^ not supported yet
  2212. ***** ^ undeclared identifier
  2213. ***** ^ undeclared identifier
  2214. 952 BufferSpaceFill(d,dp+sw,dw-sw);
  2215. ***** ^ not supported yet
  2216. ***** ^ undeclared identifier
  2217. ***** ^ undeclared identifier
  2218. ***** ^ undeclared identifier
  2219. ***** ^ undeclared identifier
  2220. ***** ^ undeclared identifier
  2221. 953 END;
  2222. 954 INC(sp,s^.OWidth); INC(dp,d^.OWidth);
  2223. ***** ^ undeclared identifier
  2224. ***** ^ undeclared identifier
  2225. ***** ^ undeclared identifier
  2226. ***** ^ not supported yet
  2227. ***** ^ undeclared identifier
  2228. ***** ^ undeclared identifier
  2229. ***** ^ undeclared identifier
  2230. ***** ^ not supported yet
  2231. 955 END;
  2232. 956 (* now fill rest *)
  2233. 957 IF wd<dd THEN
  2234. ***** ^ undeclared identifier
  2235. ***** ^ undeclared identifier
  2236. 958 FOR r := wd TO dd-1 DO
  2237. ***** ^ undeclared identifier
  2238. ***** ^ undeclared identifier
  2239. ***** ^ undeclared identifier
  2240. ***** ^ FOR needs integer variable and bounds
  2241. 959 BufferSpaceFill(d,dp,dw);
  2242. ***** ^ not supported yet
  2243. ***** ^ undeclared identifier
  2244. ***** ^ undeclared identifier
  2245. ***** ^ undeclared identifier
  2246. 960 INC(dp,d^.OWidth);
  2247. ***** ^ undeclared identifier
  2248. ***** ^ undeclared identifier
  2249. ***** ^ undeclared identifier
  2250. ***** ^ not supported yet
  2251. 961 END
  2252. 962 END;
  2253. 963 IF d^.WDef.FrameOn THEN DrawFrame(d) END;
  2254. ***** ^ undeclared identifier
  2255. ***** ^ not supported yet
  2256. ***** ^ not supported yet
  2257. ***** ^ not supported yet
  2258. ***** ^ undeclared identifier
  2259. 964 IF NOT s^.WDef.Hidden THEN
  2260. ***** ^ undeclared identifier
  2261. ***** ^ not supported yet
  2262. ***** ^ not supported yet
  2263. 965 d^.Next := s;
  2264. ***** ^ undeclared identifier
  2265. ***** ^ not supported yet
  2266. ***** ^ undeclared identifier
  2267. 966 d^.WDef.Hidden := FALSE;
  2268. ***** ^ undeclared identifier
  2269. ***** ^ not supported yet
  2270. ***** ^ not supported yet
  2271. 967 RedrawWindow(d);
  2272. ***** ^ not supported yet
  2273. ***** ^ undeclared identifier
  2274. 968 END;
  2275. 969 Close(s);
  2276. ***** ^ not supported yet
  2277. ***** ^ undeclared identifier
  2278. 970 END MergeWindows;
  2279. ***** ^ not supported yet
  2280. 971
  2281. 972
  2282. 973 PROCEDURE IGotoXY ( W : WinType; X,Y : RelCoord );
  2283. ***** ^ undeclared identifier
  2284. ***** ^ undeclared identifier
  2285. 974 (*
  2286. 975 Sets the current X Y position of the pane currently being used
  2287. 976 *)
  2288. 977 BEGIN
  2289. 978 WITH W^ DO CurrentX := X; CurrentY := Y END;
  2290. ***** ^ not supported yet
  2291. ***** ^ undeclared identifier
  2292. ***** ^ not supported yet
  2293. ***** ^ undeclared identifier
  2294. ***** ^ not supported yet
  2295. 979 IF WinType(CoreWind._cursorstack) = W THEN ResetCursor END;
  2296. ***** ^ undeclared identifier
  2297. ***** ^ undeclared identifier
  2298. ***** ^ not supported yet
  2299. ***** ^ undeclared identifier
  2300. ***** ^ not supported yet
  2301. 980 END IGotoXY;
  2302. ***** ^ not supported yet
  2303. 981
  2304. 982
  2305. 983
  2306. 984
  2307. 985 (* ------------------------- *)
  2308. 986 (* Palette procedures *)
  2309. 987 (* ------------------------- *)
  2310. 988
  2311. 989
  2312. 990
  2313. 991 PROCEDURE GetPal ( W : WinType; VAR Pal : PaletteDef );
  2314. ***** ^ undeclared identifier
  2315. ***** ^ undeclared identifier
  2316. 992 VAR
  2317. 993 i : PaletteRange;
  2318. ***** ^ undeclared identifier
  2319. 994 BEGIN
  2320. 995 CheckWindow(W);
  2321. ***** ^ not supported yet
  2322. ***** ^ not supported yet
  2323. 996 WITH W^ DO
  2324. ***** ^ not supported yet
  2325. 997 FOR i := 0 TO PaletteMax DO
  2326. ***** ^ FOR needs integer variable and bounds
  2327. ***** ^ undeclared identifier
  2328. 998 Pal[i].Fore := Color(PalAttr[i] MOD 16);
  2329. ***** ^ not supported yet
  2330. ***** ^ not supported yet
  2331. ***** ^ not supported yet
  2332. ***** ^ undeclared identifier
  2333. ***** ^ undeclared identifier
  2334. ***** ^ not supported yet
  2335. ***** ^ not supported yet
  2336. 999 Pal[i].Back := Color(PalAttr[i] DIV 16);
  2337. ***** ^ not supported yet
  2338. ***** ^ not supported yet
  2339. ***** ^ not supported yet
  2340. ***** ^ undeclared identifier
  2341. ***** ^ undeclared identifier
  2342. ***** ^ not supported yet
  2343. ***** ^ not supported yet
  2344. 1000 END;
  2345. 1001 END;
  2346. ***** ^ not supported yet
  2347. 1002 END GetPal;
  2348. ***** ^ not supported yet
  2349. 1003
  2350. 1004 PROCEDURE SetPal ( W : WinType; VAR Pal : PaletteDef );
  2351. ***** ^ undeclared identifier
  2352. ***** ^ undeclared identifier
  2353. 1005 VAR
  2354. 1006 i : PaletteRange;
  2355. ***** ^ undeclared identifier
  2356. 1007 BEGIN
  2357. 1008 CheckWindow(W);
  2358. ***** ^ not supported yet
  2359. ***** ^ not supported yet
  2360. 1009 WITH W^ DO
  2361. ***** ^ not supported yet
  2362. 1010 FOR i := 0 TO PaletteMax DO
  2363. ***** ^ FOR needs integer variable and bounds
  2364. ***** ^ undeclared identifier
  2365. 1011 PalAttr[i] := VAL(SHORTCARD,ORD(Pal[i].Fore)+ORD(Pal[i].Back)*16);
  2366. ***** ^ undeclared identifier
  2367. ***** ^ not supported yet
  2368. ***** ^ undeclared identifier
  2369. ***** ^ undeclared identifier
  2370. ***** ^ not supported yet
  2371. ***** ^ not supported yet
  2372. ***** ^ not supported yet
  2373. ***** ^ undeclared identifier
  2374. ***** ^ not supported yet
  2375. ***** ^ not supported yet
  2376. ***** ^ not supported yet
  2377. ***** ^ not supported yet
  2378. 1012 END;
  2379. 1013 IsPalette := TRUE;
  2380. ***** ^ undeclared identifier
  2381. 1014 END;
  2382. ***** ^ not supported yet
  2383. 1015 END SetPal;
  2384. ***** ^ not supported yet
  2385. 1016
  2386. 1017
  2387. 1018
  2388. 1019
  2389. 1020 PROCEDURE PaletteOpen(WD: WinDef; Pal: PaletteDef) : WinType;
  2390. ***** ^ undeclared identifier
  2391. ***** ^ undeclared identifier
  2392. ***** ^ undeclared identifier
  2393. 1021 (*
  2394. 1022 Opens a window on the screen ready for use
  2395. 1023 *)
  2396. 1024 VAR
  2397. 1025 W : WinType;
  2398. ***** ^ undeclared identifier
  2399. 1026 BEGIN
  2400. 1027 (*%T _mthread *)
  2401. 1028 Lock();
  2402. ***** ^ not supported yet
  2403. ***** ^ not supported yet
  2404. 1029 (*%E *)
  2405. 1030 W := MakeWindow (WD);
  2406. ***** ^ not supported yet
  2407. ***** ^ not supported yet
  2408. ***** ^ not supported yet
  2409. 1031 SetPal(W,Pal);
  2410. ***** ^ not supported yet
  2411. ***** ^ not supported yet
  2412. ***** ^ not supported yet
  2413. 1032 WITH W^ DO
  2414. ***** ^ not supported yet
  2415. 1033 ALLOCATE ( Buffer,OWidth*ODepth*2);
  2416. ***** ^ not supported yet
  2417. ***** ^ undeclared identifier
  2418. ***** ^ undeclared identifier
  2419. ***** ^ undeclared identifier
  2420. ***** ^ not supported yet
  2421. 1034 BufferSpaceFill(W,0,OWidth*ODepth);
  2422. ***** ^ not supported yet
  2423. ***** ^ not supported yet
  2424. ***** ^ undeclared identifier
  2425. ***** ^ undeclared identifier
  2426. 1035 IF WD.FrameOn THEN
  2427. ***** ^ not supported yet
  2428. ***** ^ not supported yet
  2429. 1036 SetFrame(W,WDef.FrameDef,WDef.FrameFore,WDef.FrameBack);
  2430. ***** ^ not supported yet
  2431. ***** ^ not supported yet
  2432. ***** ^ undeclared identifier
  2433. ***** ^ not supported yet
  2434. ***** ^ undeclared identifier
  2435. ***** ^ not supported yet
  2436. ***** ^ undeclared identifier
  2437. ***** ^ not supported yet
  2438. 1037 END;
  2439. 1038 END;
  2440. ***** ^ not supported yet
  2441. 1039 IF WD.Hidden THEN
  2442. ***** ^ undeclared identifier
  2443. ***** ^ not supported yet
  2444. 1040 Use ( W )
  2445. ***** ^ not supported yet
  2446. ***** ^ undeclared identifier
  2447. 1041 ELSE
  2448. 1042 PutOnTop ( W )
  2449. ***** ^ not supported yet
  2450. ***** ^ undeclared identifier
  2451. 1043 END;
  2452. 1044 (*%T _mthread *)
  2453. 1045 Unlock();
  2454. ***** ^ not supported yet
  2455. ***** ^ not supported yet
  2456. 1046 (*%E *)
  2457. 1047 RETURN W;
  2458. ***** ^ undeclared identifier
  2459. 1048 END PaletteOpen;
  2460. ***** ^ not supported yet
  2461. 1049
  2462. 1050
  2463. 1051 PROCEDURE SetPaletteColor ( c : PaletteRange );
  2464. ***** ^ undeclared identifier
  2465. 1052 VAR
  2466. 1053 W : WinType;
  2467. ***** ^ undeclared identifier
  2468. 1054 BEGIN
  2469. 1055 W := CurWin();
  2470. ***** ^ not supported yet
  2471. ***** ^ not supported yet
  2472. ***** ^ not supported yet
  2473. 1056 W^.CurPalColor := c;
  2474. ***** ^ not supported yet
  2475. ***** ^ not supported yet
  2476. ***** ^ not supported yet
  2477. 1057 (*%T _mthread *)
  2478. 1058 Unlock();
  2479. ***** ^ not supported yet
  2480. ***** ^ not supported yet
  2481. 1059 (*%E *)
  2482. 1060 END SetPaletteColor;
  2483. ***** ^ not supported yet
  2484. 1061
  2485. 1062
  2486. 1063 PROCEDURE PaletteColor() : PaletteRange;
  2487. ***** ^ undeclared identifier
  2488. 1064 VAR
  2489. 1065 W : WinType;
  2490. ***** ^ undeclared identifier
  2491. 1066 BEGIN
  2492. 1067 W := CurWin();
  2493. ***** ^ not supported yet
  2494. ***** ^ not supported yet
  2495. ***** ^ not supported yet
  2496. 1068 (*%T _mthread *)
  2497. 1069 Unlock();
  2498. ***** ^ not supported yet
  2499. ***** ^ not supported yet
  2500. 1070 (*%E *)
  2501. 1071 RETURN W^.CurPalColor;
  2502. ***** ^ not supported yet
  2503. ***** ^ not supported yet
  2504. 1072 END PaletteColor;
  2505. ***** ^ not supported yet
  2506. 1073
  2507. 1074 PROCEDURE SetPalette(W: WinType; Pal: PaletteDef);
  2508. ***** ^ undeclared identifier
  2509. ***** ^ undeclared identifier
  2510. 1075 (*
  2511. 1076 Changes the Palette of the specified window,
  2512. 1077 redisplaying the changed colors
  2513. 1078 *)
  2514. 1079 BEGIN
  2515. 1080 (*%T _mthread *)
  2516. 1081 Lock();
  2517. ***** ^ not supported yet
  2518. ***** ^ not supported yet
  2519. 1082 (*%E *)
  2520. 1083 SetPal(W,Pal);
  2521. ***** ^ not supported yet
  2522. ***** ^ not supported yet
  2523. ***** ^ not supported yet
  2524. 1084 RedrawWindow(W);
  2525. ***** ^ not supported yet
  2526. ***** ^ not supported yet
  2527. 1085 (*%T _mthread *)
  2528. 1086 Unlock();
  2529. ***** ^ not supported yet
  2530. ***** ^ not supported yet
  2531. 1087 (*%E *)
  2532. 1088 END SetPalette;
  2533. ***** ^ not supported yet
  2534. 1089
  2535. 1090
  2536. 1091 PROCEDURE PaletteColorUsed(W: WinType; pc: PaletteRange) : BOOLEAN;
  2537. ***** ^ undeclared identifier
  2538. ***** ^ undeclared identifier
  2539. 1092 (*
  2540. 1093 Returns if color in use anywhere in the window
  2541. 1094 *)
  2542. 1095 VAR
  2543. 1096 p : CARDINAL;
  2544. 1097 l : CARDINAL;
  2545. 1098 m : CARDINAL;
  2546. 1099 ba : POINTER TO ARRAY[0..MAX(CARDINAL)-1] OF SHORTCARD;
  2547. ***** ^ undeclared identifier
  2548. ***** ^ not supported yet
  2549. ***** ^ not supported yet
  2550. ***** ^ not supported yet
  2551. 1100 BEGIN
  2552. 1101 CheckWindow(W);
  2553. ***** ^ not supported yet
  2554. ***** ^ not supported yet
  2555. 1102 WITH W^ DO
  2556. ***** ^ not supported yet
  2557. 1103 ba := ADR(Buffer^);
  2558. ***** ^ not supported yet
  2559. ***** ^ undeclared identifier
  2560. ***** ^ undeclared identifier
  2561. 1104 p := 0;
  2562. 1105 m := OWidth*ODepth*2;
  2563. ***** ^ undeclared identifier
  2564. ***** ^ undeclared identifier
  2565. 1106 LOOP
  2566. 1107 l := m-p;
  2567. 1108 p := p+Lib.ScanR(ADR(ba^[p]),l,pc);
  2568. ***** ^ not supported yet
  2569. ***** ^ not supported yet
  2570. ***** ^ undeclared identifier
  2571. ***** ^ not supported yet
  2572. ***** ^ not supported yet
  2573. ***** ^ not supported yet
  2574. 1109 IF p >= m THEN RETURN FALSE END;
  2575. 1110 IF ODD(p) THEN RETURN TRUE END;
  2576. ***** ^ undeclared identifier
  2577. ***** ^ not supported yet
  2578. 1111 INC(p);
  2579. ***** ^ undeclared identifier
  2580. ***** ^ not supported yet
  2581. 1112 END;
  2582. 1113 END;
  2583. ***** ^ not supported yet
  2584. 1114 END PaletteColorUsed;
  2585. ***** ^ not supported yet
  2586. 1115
  2587. 1116
  2588. 1117
  2589. 1118 (* ------------------------- *)
  2590. 1119 (* Move resize procedure *)
  2591. 1120 (* ------------------------- *)
  2592. 1121
  2593. 1122
  2594. 1123
  2595. 1124
  2596. 1125 PROCEDURE Change(W:WinType;X1,Y1,X2,Y2:AbsCoord);
  2597. ***** ^ undeclared identifier
  2598. ***** ^ undeclared identifier
  2599. 1126 (* Changes the size and/or position of the specified window The *)
  2600. 1127 (* contents of the window will be moved with it *)
  2601. 1128 VAR
  2602. 1129 nw : WinType;
  2603. ***** ^ undeclared identifier
  2604. 1130 wd : WinDef;
  2605. ***** ^ undeclared identifier
  2606. 1131 pal : PaletteDef;
  2607. ***** ^ undeclared identifier
  2608. 1132 save : WinType;
  2609. ***** ^ undeclared identifier
  2610. 1133 min : CARDINAL;
  2611. 1134 BEGIN
  2612. 1135 CheckWindow(W);
  2613. ***** ^ not supported yet
  2614. ***** ^ not supported yet
  2615. 1136 save := CurWin();
  2616. ***** ^ not supported yet
  2617. ***** ^ not supported yet
  2618. ***** ^ not supported yet
  2619. 1137 WITH W^ DO
  2620. ***** ^ not supported yet
  2621. 1138 IF X2 >= ScreenWidth THEN
  2622. ***** ^ not supported yet
  2623. ***** ^ undeclared identifier
  2624. 1139 X2 := ScreenWidth - 1;
  2625. ***** ^ not supported yet
  2626. ***** ^ undeclared identifier
  2627. 1140 END; (*IF*)
  2628. 1141 IF Y2 >= CurrentScreenDepth THEN
  2629. ***** ^ not supported yet
  2630. ***** ^ undeclared identifier
  2631. 1142 Y2 := CurrentScreenDepth - 1;
  2632. ***** ^ not supported yet
  2633. ***** ^ undeclared identifier
  2634. 1143 END; (*IF*)
  2635. 1144 wd := WDef;
  2636. ***** ^ not supported yet
  2637. ***** ^ undeclared identifier
  2638. 1145 IF wd.FrameOn THEN
  2639. ***** ^ not supported yet
  2640. ***** ^ not supported yet
  2641. 1146 min := 2;
  2642. 1147 ELSE
  2643. 1148 min := 0;
  2644. 1149 END; (*IF*)
  2645. 1150 IF (X1 + min > X2) OR (Y1 + min > Y2) THEN
  2646. ***** ^ not supported yet
  2647. ***** ^ not supported yet
  2648. ***** ^ not supported yet
  2649. ***** ^ not supported yet
  2650. 1151 (*%T _mthread *)
  2651. 1152 Unlock();
  2652. ***** ^ not supported yet
  2653. ***** ^ not supported yet
  2654. 1153 (*%E *)
  2655. 1154 RETURN;
  2656. 1155 END; (*IF*)
  2657. 1156 wd.X1 := X1;
  2658. ***** ^ not supported yet
  2659. ***** ^ not supported yet
  2660. ***** ^ not supported yet
  2661. 1157 wd.Y1 := Y1;
  2662. ***** ^ not supported yet
  2663. ***** ^ not supported yet
  2664. ***** ^ not supported yet
  2665. 1158 wd.X2 := X2;
  2666. ***** ^ not supported yet
  2667. ***** ^ not supported yet
  2668. ***** ^ not supported yet
  2669. 1159 wd.Y2 := Y2;
  2670. ***** ^ not supported yet
  2671. ***** ^ not supported yet
  2672. ***** ^ not supported yet
  2673. 1160 wd.Hidden := TRUE;
  2674. ***** ^ not supported yet
  2675. ***** ^ not supported yet
  2676. 1161 IF IsPalette THEN
  2677. ***** ^ undeclared identifier
  2678. 1162 GetPal(W,pal);
  2679. ***** ^ not supported yet
  2680. ***** ^ not supported yet
  2681. ***** ^ not supported yet
  2682. 1163 nw := PaletteOpen(wd,pal);
  2683. ***** ^ not supported yet
  2684. ***** ^ not supported yet
  2685. ***** ^ not supported yet
  2686. ***** ^ not supported yet
  2687. 1164 ELSE
  2688. 1165 nw := Open(wd);
  2689. ***** ^ not supported yet
  2690. ***** ^ not supported yet
  2691. ***** ^ not supported yet
  2692. 1166 END; (*IF*)
  2693. 1167 MergeWindows(nw,W);
  2694. ***** ^ not supported yet
  2695. ***** ^ not supported yet
  2696. ***** ^ not supported yet
  2697. 1168 ClipFrame (W);
  2698. ***** ^ not supported yet
  2699. ***** ^ not supported yet
  2700. 1169 IF CurrentX > Width THEN
  2701. ***** ^ undeclared identifier
  2702. ***** ^ undeclared identifier
  2703. 1170 CurrentX := Width;
  2704. ***** ^ undeclared identifier
  2705. ***** ^ undeclared identifier
  2706. 1171 END; (*IF*)
  2707. 1172 IF CurrentY > Depth THEN
  2708. ***** ^ undeclared identifier
  2709. ***** ^ undeclared identifier
  2710. 1173 CurrentY := Depth;
  2711. ***** ^ undeclared identifier
  2712. ***** ^ undeclared identifier
  2713. 1174 END; (*IF*)
  2714. 1175 ResetCursor;
  2715. ***** ^ not supported yet
  2716. 1176 END; (*WITH*)
  2717. ***** ^ not supported yet
  2718. 1177 Use(save); (* restore used window *)
  2719. ***** ^ not supported yet
  2720. ***** ^ undeclared identifier
  2721. 1178 (*%T _mthread *)
  2722. 1179 Unlock();
  2723. ***** ^ not supported yet
  2724. ***** ^ not supported yet
  2725. 1180 (*%E *)
  2726. 1181 END Change;
  2727. ***** ^ not supported yet
  2728. 1182
  2729. 1183 (* ------------------------- *)
  2730. 1184 (* Multi process support *)
  2731. 1185 (* ------------------------- *)
  2732. 1186
  2733. 1187 PROCEDURE NullProc;
  2734. 1188 BEGIN
  2735. 1189 END NullProc;
  2736. ***** ^ not supported yet
  2737. 1190
  2738. 1191 PROCEDURE SetProcessLocks ( LockProc,UnlockProc : LockProc );
  2739. ***** ^ not a type name
  2740. 1192 BEGIN
  2741. 1193 (*%T _mthread *)
  2742. 1194 Lock := LockProc;
  2743. ***** ^ not supported yet
  2744. ***** ^ not supported yet
  2745. 1195 Unlock := UnlockProc;
  2746. ***** ^ not supported yet
  2747. ***** ^ not supported yet
  2748. 1196 CoreWind._multip := TRUE;
  2749. ***** ^ undeclared identifier
  2750. ***** ^ not supported yet
  2751. 1197 (*%E *)
  2752. 1198 END SetProcessLocks;
  2753. ***** ^ not supported yet
  2754. 1199
  2755. 1200 (* ------------------------- *)
  2756. 1201 (* Window output *)
  2757. 1202 (* ------------------------- *)
  2758. 1203
  2759. 1204
  2760. 1205 PROCEDURE DeleteLine ( W : WinType; Y : RelCoord );
  2761. ***** ^ undeclared identifier
  2762. ***** ^ undeclared identifier
  2763. 1206 VAR
  2764. 1207 r,p : CARDINAL;
  2765. 1208 BEGIN
  2766. 1209 CheckWindow(W);
  2767. ***** ^ not supported yet
  2768. ***** ^ not supported yet
  2769. 1210 WITH W^ DO
  2770. ***** ^ not supported yet
  2771. 1211 p := XA-WDef.X1+(YA-WDef.Y1+Y-1)*OWidth;
  2772. ***** ^ undeclared identifier
  2773. ***** ^ undeclared identifier
  2774. ***** ^ not supported yet
  2775. ***** ^ undeclared identifier
  2776. ***** ^ undeclared identifier
  2777. ***** ^ not supported yet
  2778. ***** ^ not supported yet
  2779. ***** ^ undeclared identifier
  2780. 1212 FOR r := Y TO Depth-1 DO
  2781. ***** ^ not supported yet
  2782. ***** ^ undeclared identifier
  2783. ***** ^ FOR needs integer variable and bounds
  2784. 1213 Lib.Move(ADR(Buffer^[p+OWidth]),ADR(Buffer^[p]),Width*2);
  2785. ***** ^ not supported yet
  2786. ***** ^ not supported yet
  2787. ***** ^ undeclared identifier
  2788. ***** ^ undeclared identifier
  2789. ***** ^ undeclared identifier
  2790. ***** ^ undeclared identifier
  2791. ***** ^ undeclared identifier
  2792. ***** ^ not supported yet
  2793. ***** ^ undeclared identifier
  2794. ***** ^ not supported yet
  2795. 1214 INC(p,OWidth);
  2796. ***** ^ undeclared identifier
  2797. ***** ^ undeclared identifier
  2798. 1215 END;
  2799. 1216 BufferSpaceFill(W,p,Width);
  2800. ***** ^ not supported yet
  2801. ***** ^ not supported yet
  2802. ***** ^ undeclared identifier
  2803. 1217 RedrawSection ( W,XA,Y+YA-1,XB,YB );
  2804. ***** ^ not supported yet
  2805. ***** ^ not supported yet
  2806. ***** ^ undeclared identifier
  2807. ***** ^ not supported yet
  2808. ***** ^ undeclared identifier
  2809. ***** ^ undeclared identifier
  2810. ***** ^ undeclared identifier
  2811. 1218 END;
  2812. ***** ^ not supported yet
  2813. 1219 END DeleteLine;
  2814. ***** ^ not supported yet
  2815. 1220
  2816. 1221
  2817. 1222
  2818. 1223 PROCEDURE Clear;
  2819. 1224 (*
  2820. 1225 clears the current window
  2821. 1226 *)
  2822. 1227 VAR
  2823. 1228 r,p : CARDINAL;
  2824. 1229 W : WinType;
  2825. ***** ^ undeclared identifier
  2826. 1230 BEGIN
  2827. 1231 W := CurWin();
  2828. ***** ^ not supported yet
  2829. ***** ^ not supported yet
  2830. ***** ^ not supported yet
  2831. 1232 WITH W^ DO
  2832. ***** ^ not supported yet
  2833. 1233 p := XA-WDef.X1+(YA-WDef.Y1)*OWidth;
  2834. ***** ^ undeclared identifier
  2835. ***** ^ undeclared identifier
  2836. ***** ^ not supported yet
  2837. ***** ^ undeclared identifier
  2838. ***** ^ undeclared identifier
  2839. ***** ^ not supported yet
  2840. ***** ^ undeclared identifier
  2841. 1234 FOR r := 1 TO Depth DO
  2842. ***** ^ undeclared identifier
  2843. 1235 BufferSpaceFill(W,p,Width);
  2844. ***** ^ not supported yet
  2845. ***** ^ not supported yet
  2846. ***** ^ undeclared identifier
  2847. 1236 INC(p,OWidth);
  2848. ***** ^ undeclared identifier
  2849. ***** ^ undeclared identifier
  2850. 1237 END;
  2851. 1238 RedrawWindowPane(W);
  2852. ***** ^ not supported yet
  2853. ***** ^ not supported yet
  2854. 1239 END;
  2855. ***** ^ not supported yet
  2856. 1240 IGotoXY(W,1,1);
  2857. ***** ^ not supported yet
  2858. ***** ^ undeclared identifier
  2859. ***** ^ not supported yet
  2860. 1241 (*%T _mthread *)
  2861. 1242 Unlock();
  2862. ***** ^ not supported yet
  2863. ***** ^ not supported yet
  2864. 1243 (*%E *)
  2865. 1244 END Clear;
  2866. ***** ^ not supported yet
  2867. 1245
  2868. 1246 PROCEDURE ClrEol;
  2869. 1247 (*
  2870. 1248 clears from the cursor to the end of line
  2871. 1249 *)
  2872. 1250 VAR
  2873. 1251 W : WinType;
  2874. ***** ^ undeclared identifier
  2875. 1252 BEGIN
  2876. 1253 W := CurWin();
  2877. ***** ^ not supported yet
  2878. ***** ^ not supported yet
  2879. ***** ^ not supported yet
  2880. 1254 WITH W^ DO
  2881. ***** ^ not supported yet
  2882. 1255 BufferSpaceFill(W,XA-WDef.X1+CurrentX-1+(YA-WDef.Y1+CurrentY-1)*OWidth,
  2883. ***** ^ not supported yet
  2884. ***** ^ not supported yet
  2885. ***** ^ undeclared identifier
  2886. ***** ^ undeclared identifier
  2887. ***** ^ not supported yet
  2888. ***** ^ undeclared identifier
  2889. ***** ^ undeclared identifier
  2890. ***** ^ undeclared identifier
  2891. ***** ^ not supported yet
  2892. ***** ^ undeclared identifier
  2893. ***** ^ undeclared identifier
  2894. 1256 Width-CurrentX+1);
  2895. ***** ^ undeclared identifier
  2896. ***** ^ undeclared identifier
  2897. ***** ^ not supported yet
  2898. 1257 RedrawSection ( W,XA-1+CurrentX,YA-1+CurrentY,XB,YA-1+CurrentY );
  2899. ***** ^ not supported yet
  2900. ***** ^ not supported yet
  2901. ***** ^ undeclared identifier
  2902. ***** ^ undeclared identifier
  2903. ***** ^ undeclared identifier
  2904. ***** ^ undeclared identifier
  2905. ***** ^ undeclared identifier
  2906. ***** ^ undeclared identifier
  2907. ***** ^ undeclared identifier
  2908. 1258 END;
  2909. ***** ^ not supported yet
  2910. 1259 (*%T _mthread *)
  2911. 1260 Unlock();
  2912. ***** ^ not supported yet
  2913. ***** ^ not supported yet
  2914. 1261 (*%E *)
  2915. 1262 END ClrEol;
  2916. ***** ^ not supported yet
  2917. 1263
  2918. 1264 (*%F _OS2 *)
  2919. 1265 PROCEDURE Bell;
  2920. 1266 VAR
  2921. 1267 R : SYSTEM.Registers;
  2922. 1268 BEGIN
  2923. 1269 WITH R DO
  2924. 1270 AX := 0E07H;
  2925. 1271 BL := 0;
  2926. 1272 Lib.Intr(R,10H);
  2927. 1273 END;
  2928. 1274 END Bell;
  2929. 1275 (*%E *)
  2930. 1276
  2931. 1277 (*%T _OS2 *)
  2932. 1278 PROCEDURE Bell;
  2933. 1279 BEGIN
  2934. 1280 Dos.Beep(1000,300);
  2935. ***** ^ not supported yet
  2936. ***** ^ not supported yet
  2937. ***** ^ not supported yet
  2938. 1281 END Bell;
  2939. ***** ^ not supported yet
  2940. 1282 (*%E *)
  2941. 1283
  2942. 1284 PROCEDURE WriteC ( W : WinType; C : CHAR);
  2943. ***** ^ undeclared identifier
  2944. 1285 VAR
  2945. 1286 nx : CARDINAL;
  2946. 1287 BEGIN
  2947. 1288 WITH W^ DO
  2948. ***** ^ not supported yet
  2949. 1289 CASE C OF
  2950. 1290 CHR(12) : Clear;
  2951. ***** ^ undeclared identifier
  2952. ***** ^ not supported yet
  2953. ***** ^ not supported yet
  2954. 1291 IGotoXY(W,1,1);
  2955. ***** ^ not supported yet
  2956. ***** ^ not supported yet
  2957. ***** ^ not supported yet
  2958. 1292 | CHR(10) : IF CurrentY=Depth THEN
  2959. ***** ^ undeclared identifier
  2960. ***** ^ not supported yet
  2961. ***** ^ undeclared identifier
  2962. ***** ^ undeclared identifier
  2963. 1293 DeleteLine ( W, 1 );
  2964. ***** ^ not supported yet
  2965. ***** ^ not supported yet
  2966. ***** ^ not supported yet
  2967. 1294 ELSE
  2968. 1295 IGotoXY(W,CurrentX,CurrentY+1);
  2969. ***** ^ not supported yet
  2970. ***** ^ not supported yet
  2971. ***** ^ undeclared identifier
  2972. ***** ^ undeclared identifier
  2973. ***** ^ not supported yet
  2974. 1296 END;
  2975. 1297 | CHR(13) : (*ClrEol; change 1/7/88*) IGotoXY(W,1,CurrentY);
  2976. ***** ^ undeclared identifier
  2977. ***** ^ not supported yet
  2978. ***** ^ not supported yet
  2979. ***** ^ not supported yet
  2980. ***** ^ undeclared identifier
  2981. 1298 | CHR(08) : IF CurrentX>1 THEN
  2982. ***** ^ undeclared identifier
  2983. ***** ^ not supported yet
  2984. ***** ^ undeclared identifier
  2985. 1299 IGotoXY(W,CurrentX-1,CurrentY); WriteC(W,' ');
  2986. ***** ^ not supported yet
  2987. ***** ^ not supported yet
  2988. ***** ^ undeclared identifier
  2989. ***** ^ undeclared identifier
  2990. ***** ^ not supported yet
  2991. ***** ^ not supported yet
  2992. ***** ^ not supported yet
  2993. 1300 IGotoXY(W,CurrentX-1,CurrentY);
  2994. ***** ^ not supported yet
  2995. ***** ^ not supported yet
  2996. ***** ^ undeclared identifier
  2997. ***** ^ undeclared identifier
  2998. 1301 END;
  2999. 1302 | CHR(7) : Bell;
  3000. ***** ^ undeclared identifier
  3001. ***** ^ not supported yet
  3002. ***** ^ not supported yet
  3003. 1303 ELSE
  3004. 1304 IF CurrentX > Width THEN RETURN END;
  3005. ***** ^ undeclared identifier
  3006. ***** ^ undeclared identifier
  3007. 1305 WindowWrite(W,CurrentX,CurrentY,1,ADR(C),FALSE);
  3008. ***** ^ not supported yet
  3009. ***** ^ not supported yet
  3010. ***** ^ undeclared identifier
  3011. ***** ^ undeclared identifier
  3012. ***** ^ undeclared identifier
  3013. ***** ^ not supported yet
  3014. ***** ^ not supported yet
  3015. 1306 IF (CurrentX#Width)OR NOT WDef.WrapOn THEN
  3016. ***** ^ undeclared identifier
  3017. ***** ^ undeclared identifier
  3018. ***** ^ undeclared identifier
  3019. ***** ^ not supported yet
  3020. 1307 IGotoXY(W,CurrentX+1,CurrentY);
  3021. ***** ^ not supported yet
  3022. ***** ^ not supported yet
  3023. ***** ^ undeclared identifier
  3024. ***** ^ undeclared identifier
  3025. 1308 ELSE
  3026. 1309 IF CurrentY=Depth THEN
  3027. ***** ^ undeclared identifier
  3028. ***** ^ undeclared identifier
  3029. 1310 DeleteLine ( W, 1 );
  3030. ***** ^ not supported yet
  3031. ***** ^ not supported yet
  3032. ***** ^ not supported yet
  3033. 1311 IGotoXY(W,1,CurrentY);
  3034. ***** ^ not supported yet
  3035. ***** ^ not supported yet
  3036. ***** ^ undeclared identifier
  3037. 1312 ELSE
  3038. 1313 IGotoXY(W,1,CurrentY+1);
  3039. ***** ^ not supported yet
  3040. ***** ^ not supported yet
  3041. ***** ^ undeclared identifier
  3042. ***** ^ not supported yet
  3043. 1314 END;
  3044. 1315 END;
  3045. 1316 END;
  3046. 1317 END;
  3047. ***** ^ not supported yet
  3048. 1318 END WriteC;
  3049. ***** ^ not supported yet
  3050. 1319
  3051. 1320 PROCEDURE WriteOut (S : ARRAY OF CHAR);
  3052. ***** ^ not supported yet
  3053. 1321 VAR
  3054. 1322 W : WinType;
  3055. ***** ^ undeclared identifier
  3056. 1323 p,q,m : CARDINAL;
  3057. 1324 ss : CARDINAL;
  3058. 1325 BEGIN
  3059. 1326 W := CurWin();
  3060. ***** ^ not supported yet
  3061. ***** ^ not supported yet
  3062. ***** ^ not supported yet
  3063. 1327 WITH W^ DO
  3064. ***** ^ not supported yet
  3065. 1328 ss := HIGH(S)+1;
  3066. ***** ^ undeclared identifier
  3067. ***** ^ not supported yet
  3068. 1329 p := 0;
  3069. 1330 q := 0;
  3070. 1331 LOOP
  3071. 1332 (* first accumulate normal chars on same line *)
  3072. 1333 m := Width+p-CurrentX;
  3073. ***** ^ undeclared identifier
  3074. ***** ^ undeclared identifier
  3075. 1334 IF NOT W^.WDef.WrapOn THEN INC(m) END; (* can fit another char in *)
  3076. ***** ^ not supported yet
  3077. ***** ^ not supported yet
  3078. ***** ^ not supported yet
  3079. ***** ^ undeclared identifier
  3080. ***** ^ not supported yet
  3081. 1335 IF m > ss THEN m := ss END;
  3082. 1336 WHILE (q<m)AND(S[q]>=' ') DO INC(q) END;
  3083. ***** ^ not supported yet
  3084. ***** ^ not supported yet
  3085. ***** ^ undeclared identifier
  3086. ***** ^ not supported yet
  3087. 1337 (* now output the line *)
  3088. 1338 IF q > p THEN
  3089. 1339 WindowWrite(W,CurrentX,CurrentY,q-p,ADR(S[p]),FALSE);
  3090. ***** ^ not supported yet
  3091. ***** ^ not supported yet
  3092. ***** ^ undeclared identifier
  3093. ***** ^ undeclared identifier
  3094. ***** ^ undeclared identifier
  3095. ***** ^ not supported yet
  3096. ***** ^ not supported yet
  3097. ***** ^ not supported yet
  3098. 1340 IGotoXY(W,CurrentX+q-p,CurrentY);
  3099. ***** ^ not supported yet
  3100. ***** ^ not supported yet
  3101. ***** ^ undeclared identifier
  3102. ***** ^ undeclared identifier
  3103. 1341 END;
  3104. 1342 (* now output the special char *)
  3105. 1343 IF (S[q] = CHR(0)) OR (q > HIGH(S)) THEN EXIT ELSE WriteC(W,S[q]);
  3106. ***** ^ not supported yet
  3107. ***** ^ not supported yet
  3108. ***** ^ undeclared identifier
  3109. ***** ^ not supported yet
  3110. ***** ^ undeclared identifier
  3111. ***** ^ not supported yet
  3112. ***** ^ not supported yet
  3113. ***** ^ not supported yet
  3114. ***** ^ not supported yet
  3115. ***** ^ not supported yet
  3116. 1344 END;
  3117. 1345 INC(q);
  3118. ***** ^ undeclared identifier
  3119. ***** ^ not supported yet
  3120. 1346 p := q;
  3121. 1347 END;
  3122. 1348 END;
  3123. ***** ^ not supported yet
  3124. 1349 (*%T _mthread *)
  3125. 1350 Unlock();
  3126. ***** ^ not supported yet
  3127. ***** ^ not supported yet
  3128. 1351 (*%E *)
  3129. 1352 END WriteOut;
  3130. ***** ^ not supported yet
  3131. 1353
  3132. 1354 PROCEDURE DirectWrite ( X,Y : RelCoord; (* start co-ords *)
  3133. ***** ^ undeclared identifier
  3134. 1355 A : ADDRESS; (* address of char array *)
  3135. ***** ^ undeclared identifier
  3136. 1356 Len : CARDINAL ); (* length to be written *)
  3137. 1357 (*
  3138. 1358 writes directly to current window at the specified X,Y coordinates
  3139. 1359 with no check for special (ie control) chars or eol wrap
  3140. 1360 *)
  3141. 1361 VAR
  3142. 1362 W : WinType;
  3143. ***** ^ undeclared identifier
  3144. 1363 BEGIN
  3145. 1364 W := CurWin();
  3146. ***** ^ not supported yet
  3147. ***** ^ not supported yet
  3148. ***** ^ not supported yet
  3149. 1365 WindowWrite(W,X,Y,Len,A,FALSE);
  3150. ***** ^ not supported yet
  3151. ***** ^ not supported yet
  3152. ***** ^ not supported yet
  3153. ***** ^ not supported yet
  3154. ***** ^ not supported yet
  3155. ***** ^ not supported yet
  3156. 1366 (*%T _mthread *)
  3157. 1367 Unlock();
  3158. ***** ^ not supported yet
  3159. ***** ^ not supported yet
  3160. 1368 (*%E *)
  3161. 1369 END DirectWrite;
  3162. ***** ^ not supported yet
  3163. 1370
  3164. 1371
  3165. 1372 PROCEDURE GotoXY ( X,Y : RelCoord );
  3166. ***** ^ undeclared identifier
  3167. 1373 VAR
  3168. 1374 W : WinType;
  3169. ***** ^ undeclared identifier
  3170. 1375 BEGIN
  3171. 1376 W := CurWin();
  3172. ***** ^ not supported yet
  3173. ***** ^ not supported yet
  3174. ***** ^ not supported yet
  3175. 1377 ClipXY(W,X,Y);
  3176. ***** ^ not supported yet
  3177. ***** ^ not supported yet
  3178. ***** ^ not supported yet
  3179. ***** ^ not supported yet
  3180. 1378 IGotoXY(W,X,Y);
  3181. ***** ^ not supported yet
  3182. ***** ^ not supported yet
  3183. ***** ^ not supported yet
  3184. ***** ^ not supported yet
  3185. 1379 (*%T _mthread *)
  3186. 1380 Unlock();
  3187. ***** ^ not supported yet
  3188. ***** ^ not supported yet
  3189. 1381 (*%E *)
  3190. 1382 END GotoXY;
  3191. ***** ^ not supported yet
  3192. 1383
  3193. 1384 PROCEDURE WhereX ( ) : RelCoord;
  3194. ***** ^ undeclared identifier
  3195. 1385 VAR
  3196. 1386 W : WinType;
  3197. ***** ^ undeclared identifier
  3198. 1387 BEGIN
  3199. 1388 W := CurWin();
  3200. ***** ^ not supported yet
  3201. ***** ^ not supported yet
  3202. ***** ^ not supported yet
  3203. 1389 (*%T _mthread *)
  3204. 1390 Unlock();
  3205. ***** ^ not supported yet
  3206. ***** ^ not supported yet
  3207. 1391 (*%E *)
  3208. 1392 RETURN W^.CurrentX;
  3209. ***** ^ not supported yet
  3210. ***** ^ not supported yet
  3211. 1393 END WhereX;
  3212. ***** ^ not supported yet
  3213. 1394
  3214. 1395 PROCEDURE WhereY ( ) : RelCoord;
  3215. ***** ^ undeclared identifier
  3216. 1396 VAR
  3217. 1397 W : WinType;
  3218. ***** ^ undeclared identifier
  3219. 1398 BEGIN
  3220. 1399 W := CurWin();
  3221. ***** ^ not supported yet
  3222. ***** ^ not supported yet
  3223. ***** ^ not supported yet
  3224. 1400 (*%T _mthread *)
  3225. 1401 Unlock();
  3226. ***** ^ not supported yet
  3227. ***** ^ not supported yet
  3228. 1402 (*%E *)
  3229. 1403 RETURN W^.CurrentY;
  3230. ***** ^ not supported yet
  3231. ***** ^ not supported yet
  3232. 1404 END WhereY;
  3233. ***** ^ not supported yet
  3234. 1405
  3235. 1406 PROCEDURE ConvertCoords ( W : WinType ;
  3236. ***** ^ undeclared identifier
  3237. 1407 X,Y : RelCoord;
  3238. ***** ^ undeclared identifier
  3239. 1408 VAR XO,YO : AbsCoord );
  3240. ***** ^ undeclared identifier
  3241. 1409 BEGIN
  3242. 1410 CheckWindow(W);
  3243. ***** ^ not supported yet
  3244. ***** ^ not supported yet
  3245. 1411 XO := X+W^.XA-1; YO := Y+W^.YA-1;
  3246. ***** ^ not supported yet
  3247. ***** ^ not supported yet
  3248. ***** ^ not supported yet
  3249. ***** ^ not supported yet
  3250. ***** ^ not supported yet
  3251. ***** ^ not supported yet
  3252. ***** ^ not supported yet
  3253. ***** ^ not supported yet
  3254. 1412 END ConvertCoords;
  3255. ***** ^ not supported yet
  3256. 1413
  3257. 1414
  3258. 1415 PROCEDURE InsLine;
  3259. 1416 VAR
  3260. 1417 W : WinType;
  3261. ***** ^ undeclared identifier
  3262. 1418 r,p,p1 : CARDINAL;
  3263. 1419 BEGIN
  3264. 1420 W := CurWin();
  3265. ***** ^ not supported yet
  3266. ***** ^ not supported yet
  3267. ***** ^ not supported yet
  3268. 1421 WITH W^ DO
  3269. ***** ^ not supported yet
  3270. 1422 p := XA-WDef.X1+(YA-WDef.Y1+Depth-1)*OWidth;
  3271. ***** ^ undeclared identifier
  3272. ***** ^ undeclared identifier
  3273. ***** ^ not supported yet
  3274. ***** ^ undeclared identifier
  3275. ***** ^ undeclared identifier
  3276. ***** ^ not supported yet
  3277. ***** ^ undeclared identifier
  3278. ***** ^ undeclared identifier
  3279. 1423 FOR r := CurrentY TO Depth-1 DO
  3280. ***** ^ undeclared identifier
  3281. ***** ^ undeclared identifier
  3282. ***** ^ FOR needs integer variable and bounds
  3283. 1424 DEC(p,OWidth);
  3284. ***** ^ undeclared identifier
  3285. ***** ^ undeclared identifier
  3286. 1425 Lib.Move(ADR(Buffer^[p]),ADR(Buffer^[p+OWidth]),Width*2);
  3287. ***** ^ not supported yet
  3288. ***** ^ not supported yet
  3289. ***** ^ undeclared identifier
  3290. ***** ^ undeclared identifier
  3291. ***** ^ not supported yet
  3292. ***** ^ undeclared identifier
  3293. ***** ^ undeclared identifier
  3294. ***** ^ undeclared identifier
  3295. ***** ^ undeclared identifier
  3296. ***** ^ not supported yet
  3297. 1426 END;
  3298. 1427 BufferSpaceFill(W,p,Width);
  3299. ***** ^ not supported yet
  3300. ***** ^ not supported yet
  3301. ***** ^ undeclared identifier
  3302. 1428 RedrawSection ( W,XA,CurrentY+YA-1,XB,YB );
  3303. ***** ^ not supported yet
  3304. ***** ^ not supported yet
  3305. ***** ^ undeclared identifier
  3306. ***** ^ undeclared identifier
  3307. ***** ^ undeclared identifier
  3308. ***** ^ undeclared identifier
  3309. ***** ^ undeclared identifier
  3310. 1429 END;
  3311. ***** ^ not supported yet
  3312. 1430 (*%T _mthread *)
  3313. 1431 Unlock();
  3314. ***** ^ not supported yet
  3315. ***** ^ not supported yet
  3316. 1432 (*%E *)
  3317. 1433 END InsLine;
  3318. ***** ^ not supported yet
  3319. 1434
  3320. 1435 PROCEDURE DelLine;
  3321. 1436 VAR
  3322. 1437 W : WinType;
  3323. ***** ^ undeclared identifier
  3324. 1438 BEGIN
  3325. 1439 W := CurWin();
  3326. ***** ^ not supported yet
  3327. ***** ^ not supported yet
  3328. ***** ^ not supported yet
  3329. 1440 DeleteLine(W,W^.CurrentY);
  3330. ***** ^ not supported yet
  3331. ***** ^ not supported yet
  3332. ***** ^ not supported yet
  3333. ***** ^ not supported yet
  3334. 1441 (*%T _mthread *)
  3335. 1442 Unlock();
  3336. ***** ^ not supported yet
  3337. ***** ^ not supported yet
  3338. 1443 (*%E *)
  3339. 1444 END DelLine;
  3340. ***** ^ not supported yet
  3341. 1445
  3342. 1446 PROCEDURE TextColor ( c : Color );
  3343. ***** ^ undeclared identifier
  3344. 1447 VAR
  3345. 1448 W : WinType;
  3346. ***** ^ undeclared identifier
  3347. 1449 BEGIN
  3348. 1450 W := CurWin();
  3349. ***** ^ not supported yet
  3350. ***** ^ not supported yet
  3351. ***** ^ not supported yet
  3352. 1451 W^.WDef.Foreground := c;
  3353. ***** ^ not supported yet
  3354. ***** ^ not supported yet
  3355. ***** ^ not supported yet
  3356. ***** ^ not supported yet
  3357. 1452 (*%T _mthread *)
  3358. 1453 Unlock();
  3359. ***** ^ not supported yet
  3360. ***** ^ not supported yet
  3361. 1454 (*%E *)
  3362. 1455 END TextColor;
  3363. ***** ^ not supported yet
  3364. 1456
  3365. 1457 PROCEDURE TextBackground ( c : Color );
  3366. ***** ^ undeclared identifier
  3367. 1458 VAR
  3368. 1459 W : WinType;
  3369. ***** ^ undeclared identifier
  3370. 1460 BEGIN
  3371. 1461 W := CurWin();
  3372. ***** ^ not supported yet
  3373. ***** ^ not supported yet
  3374. ***** ^ not supported yet
  3375. 1462 W^.WDef.Background := c;
  3376. ***** ^ not supported yet
  3377. ***** ^ not supported yet
  3378. ***** ^ not supported yet
  3379. ***** ^ not supported yet
  3380. 1463 (*%T _mthread *)
  3381. 1464 Unlock();
  3382. ***** ^ not supported yet
  3383. ***** ^ not supported yet
  3384. 1465 (*%E *)
  3385. 1466 END TextBackground;
  3386. ***** ^ not supported yet
  3387. 1467
  3388. 1468 PROCEDURE SetWrap ( on : BOOLEAN );
  3389. 1469 VAR
  3390. 1470 W : WinType;
  3391. ***** ^ undeclared identifier
  3392. 1471 BEGIN
  3393. 1472 W := CurWin();
  3394. ***** ^ not supported yet
  3395. ***** ^ not supported yet
  3396. ***** ^ not supported yet
  3397. 1473 W^.WDef.WrapOn := on;
  3398. ***** ^ not supported yet
  3399. ***** ^ not supported yet
  3400. ***** ^ not supported yet
  3401. 1474 (*%T _mthread *)
  3402. 1475 Unlock();
  3403. ***** ^ not supported yet
  3404. ***** ^ not supported yet
  3405. 1476 (*%E *)
  3406. 1477 END SetWrap;
  3407. ***** ^ not supported yet
  3408. 1478
  3409. 1479 PROCEDURE Info ( W : WinType; VAR WD : WinDef );
  3410. ***** ^ undeclared identifier
  3411. ***** ^ undeclared identifier
  3412. 1480 (* gets information for specified window *)
  3413. 1481 BEGIN
  3414. 1482 (*%T _mthread *)
  3415. 1483 Lock();
  3416. ***** ^ not supported yet
  3417. ***** ^ not supported yet
  3418. 1484 (*%E *)
  3419. 1485 WD := W^.WDef;
  3420. ***** ^ not supported yet
  3421. ***** ^ not supported yet
  3422. ***** ^ not supported yet
  3423. 1486 (*%T _mthread *)
  3424. 1487 Unlock();
  3425. ***** ^ not supported yet
  3426. ***** ^ not supported yet
  3427. 1488 (*%E *)
  3428. 1489 END Info;
  3429. ***** ^ not supported yet
  3430. 1490
  3431. 1491
  3432. 1492 (* ------------------------- *)
  3433. 1493 (* Title procedure *)
  3434. 1494 (* ------------------------- *)
  3435. 1495 PROCEDURE SetTitle ( W : WinType;
  3436. ***** ^ undeclared identifier
  3437. 1496 NewTitle : ARRAY OF CHAR;
  3438. ***** ^ not supported yet
  3439. 1497 Mode : TitleMode );
  3440. ***** ^ undeclared identifier
  3441. 1498 (*
  3442. 1499 updates the window title within the window frame,
  3443. 1500 positioning it in the position defined by the title mode
  3444. 1501 *)
  3445. 1502 VAR
  3446. 1503 l : CARDINAL;
  3447. 1504 BEGIN
  3448. 1505 CheckWindow(W);
  3449. ***** ^ not supported yet
  3450. ***** ^ not supported yet
  3451. 1506 (*%T _mthread *)
  3452. 1507 Lock();
  3453. ***** ^ not supported yet
  3454. ***** ^ not supported yet
  3455. 1508 (*%E *)
  3456. 1509 DisposeTitle(W);
  3457. ***** ^ not supported yet
  3458. ***** ^ not supported yet
  3459. 1510 WITH W^ DO
  3460. ***** ^ not supported yet
  3461. 1511 IF Mode # NoTitle THEN
  3462. ***** ^ not supported yet
  3463. ***** ^ undeclared identifier
  3464. 1512 l := Str.Length(NewTitle);
  3465. ***** ^ not supported yet
  3466. ***** ^ not supported yet
  3467. ***** ^ not supported yet
  3468. 1513 ALLOCATE(Title,l+1);
  3469. ***** ^ not supported yet
  3470. ***** ^ undeclared identifier
  3471. ***** ^ not supported yet
  3472. 1514 Lib.Move(ADR(NewTitle),ADR(Title^),l);
  3473. ***** ^ not supported yet
  3474. ***** ^ not supported yet
  3475. ***** ^ undeclared identifier
  3476. ***** ^ not supported yet
  3477. ***** ^ undeclared identifier
  3478. ***** ^ undeclared identifier
  3479. ***** ^ not supported yet
  3480. 1515 Title^[l] := CHR(0);
  3481. ***** ^ undeclared identifier
  3482. ***** ^ not supported yet
  3483. ***** ^ undeclared identifier
  3484. ***** ^ not supported yet
  3485. 1516 END;
  3486. 1517 TMode := Mode;
  3487. ***** ^ undeclared identifier
  3488. ***** ^ not supported yet
  3489. 1518 END;
  3490. ***** ^ not supported yet
  3491. 1519 DrawFrame(W);
  3492. ***** ^ not supported yet
  3493. ***** ^ undeclared identifier
  3494. 1520 (*%T _mthread *)
  3495. 1521 Unlock;
  3496. ***** ^ not supported yet
  3497. 1522 (*%E *)
  3498. 1523 END SetTitle;
  3499. ***** ^ not supported yet
  3500. 1524
  3501. 1525
  3502. 1526 PROCEDURE ReadString ( VAR string : ARRAY OF CHAR );
  3503. ***** ^ not supported yet
  3504. 1527 VAR
  3505. 1528 c : CHAR;
  3506. 1529 line: ARRAY[0..82] OF CHAR;
  3507. ***** ^ not supported yet
  3508. ***** ^ not supported yet
  3509. 1530 p,H : CARDINAL;
  3510. 1531 W : WinType;
  3511. ***** ^ undeclared identifier
  3512. 1532 con : BOOLEAN;
  3513. 1533 BEGIN
  3514. 1534 W := CurWin();
  3515. ***** ^ not supported yet
  3516. ***** ^ not supported yet
  3517. ***** ^ not supported yet
  3518. 1535 PutOnTop(W);
  3519. ***** ^ not supported yet
  3520. ***** ^ not supported yet
  3521. 1536 con := W^.WDef.CursorOn;
  3522. ***** ^ not supported yet
  3523. ***** ^ not supported yet
  3524. ***** ^ not supported yet
  3525. 1537 CursorOn;
  3526. ***** ^ not supported yet
  3527. 1538 H := HIGH(string);
  3528. ***** ^ undeclared identifier
  3529. ***** ^ not supported yet
  3530. 1539 IF H>79 THEN H := 79 END;
  3531. 1540 p := 0;
  3532. 1541 LOOP
  3533. 1542 c := IO.RdKey();
  3534. ***** ^ not supported yet
  3535. ***** ^ not supported yet
  3536. ***** ^ not supported yet
  3537. 1543 IF (c=CHR(8))OR(c=CHR(127)) THEN
  3538. ***** ^ undeclared identifier
  3539. ***** ^ not supported yet
  3540. ***** ^ undeclared identifier
  3541. ***** ^ not supported yet
  3542. 1544 IF p>0 THEN DEC(p); IO.WrChar(CHR(8)) END;
  3543. ***** ^ undeclared identifier
  3544. ***** ^ not supported yet
  3545. ***** ^ not supported yet
  3546. ***** ^ not supported yet
  3547. ***** ^ undeclared identifier
  3548. ***** ^ not supported yet
  3549. 1545 ELSIF (c>=' ') THEN
  3550. 1546 IF p<=H THEN
  3551. 1547 IO.WrChar(c);
  3552. ***** ^ not supported yet
  3553. ***** ^ not supported yet
  3554. ***** ^ not supported yet
  3555. 1548 line[p] := c;
  3556. ***** ^ not supported yet
  3557. ***** ^ not supported yet
  3558. 1549 INC(p);
  3559. ***** ^ undeclared identifier
  3560. ***** ^ not supported yet
  3561. 1550 END;
  3562. 1551 ELSIF c=CHR(13) THEN
  3563. ***** ^ undeclared identifier
  3564. ***** ^ not supported yet
  3565. 1552 EXIT;
  3566. 1553 END;
  3567. 1554 END;
  3568. 1555 line[p] := CHR(0);
  3569. ***** ^ not supported yet
  3570. ***** ^ not supported yet
  3571. ***** ^ undeclared identifier
  3572. ***** ^ not supported yet
  3573. 1556 Str.Copy(string,line);
  3574. ***** ^ not supported yet
  3575. ***** ^ not supported yet
  3576. ***** ^ not supported yet
  3577. ***** ^ not supported yet
  3578. 1557 IF NOT con THEN CursorOff END;
  3579. ***** ^ not supported yet
  3580. 1558 (*%T _mthread *)
  3581. 1559 Unlock;
  3582. ***** ^ not supported yet
  3583. 1560 (*%E *)
  3584. 1561 IO.WrLn;
  3585. ***** ^ not supported yet
  3586. ***** ^ not supported yet
  3587. 1562 END ReadString;
  3588. ***** ^ not supported yet
  3589. 1563
  3590. 1564 (* Low level routines to read and write to the window buffer direct *)
  3591. 1565
  3592. 1566 PROCEDURE RdBufferLn ( W : WinType; (* Source window *)
  3593. ***** ^ undeclared identifier
  3594. 1567 X,Y : RelCoord; (* start co-ords *)
  3595. ***** ^ undeclared identifier
  3596. 1568 Dest : ADDRESS; (* address of buffer *)
  3597. ***** ^ undeclared identifier
  3598. 1569 Len : CARDINAL ); (* length in WORDs *)
  3599. 1570 VAR
  3600. 1571 AX,AY : AbsCoord;
  3601. ***** ^ undeclared identifier
  3602. 1572 BEGIN
  3603. 1573 WITH W^ DO
  3604. ***** ^ not supported yet
  3605. 1574 AX := X+XA-1; AY := Y+YA-1;
  3606. ***** ^ not supported yet
  3607. ***** ^ not supported yet
  3608. ***** ^ undeclared identifier
  3609. ***** ^ not supported yet
  3610. ***** ^ not supported yet
  3611. ***** ^ undeclared identifier
  3612. 1575 Lib.WordMove(ADR(Buffer^[AX-WDef.X1+(AY-WDef.Y1)*OWidth]),Dest,Len);
  3613. ***** ^ not supported yet
  3614. ***** ^ not supported yet
  3615. ***** ^ undeclared identifier
  3616. ***** ^ undeclared identifier
  3617. ***** ^ not supported yet
  3618. ***** ^ undeclared identifier
  3619. ***** ^ not supported yet
  3620. ***** ^ not supported yet
  3621. ***** ^ undeclared identifier
  3622. ***** ^ not supported yet
  3623. ***** ^ undeclared identifier
  3624. ***** ^ not supported yet
  3625. ***** ^ not supported yet
  3626. 1576 END;
  3627. ***** ^ not supported yet
  3628. 1577 END RdBufferLn;
  3629. ***** ^ not supported yet
  3630. 1578
  3631. 1579 PROCEDURE WrBufferLn ( W : WinType; (* Dest window *)
  3632. ***** ^ undeclared identifier
  3633. 1580 X,Y : RelCoord; (* start co-ords *)
  3634. ***** ^ undeclared identifier
  3635. 1581 Src : ADDRESS; (* address of buffer *)
  3636. ***** ^ undeclared identifier
  3637. 1582 Len : CARDINAL ); (* length in WORDs *)
  3638. 1583 VAR
  3639. 1584 AX,AY : AbsCoord;
  3640. ***** ^ undeclared identifier
  3641. 1585 BEGIN
  3642. 1586 WITH W^ DO
  3643. ***** ^ not supported yet
  3644. 1587 AX := X+XA-1; AY := Y+YA-1;
  3645. ***** ^ not supported yet
  3646. ***** ^ not supported yet
  3647. ***** ^ undeclared identifier
  3648. ***** ^ not supported yet
  3649. ***** ^ not supported yet
  3650. ***** ^ undeclared identifier
  3651. 1588 Lib.WordMove(Src,ADR(Buffer^[AX-WDef.X1+(AY-WDef.Y1)*OWidth]),Len);
  3652. ***** ^ not supported yet
  3653. ***** ^ not supported yet
  3654. ***** ^ not supported yet
  3655. ***** ^ undeclared identifier
  3656. ***** ^ undeclared identifier
  3657. ***** ^ not supported yet
  3658. ***** ^ undeclared identifier
  3659. ***** ^ not supported yet
  3660. ***** ^ not supported yet
  3661. ***** ^ undeclared identifier
  3662. ***** ^ not supported yet
  3663. ***** ^ undeclared identifier
  3664. ***** ^ not supported yet
  3665. 1589 UpdateScreen(W,AX,AY,Len);
  3666. ***** ^ not supported yet
  3667. ***** ^ not supported yet
  3668. ***** ^ not supported yet
  3669. ***** ^ not supported yet
  3670. ***** ^ not supported yet
  3671. 1590 END;
  3672. ***** ^ not supported yet
  3673. 1591 END WrBufferLn;
  3674. ***** ^ not supported yet
  3675. 1592
  3676. 1593 PROCEDURE InputStr ( VAR S : ARRAY OF CHAR );
  3677. ***** ^ not supported yet
  3678. 1594 VAR
  3679. 1595 ins : BOOLEAN;
  3680. 1596 k : CHAR;
  3681. 1597 x,y,p,l : CARDINAL;
  3682. 1598 BEGIN
  3683. 1599 x := WhereX(); y := WhereY();
  3684. ***** ^ not supported yet
  3685. ***** ^ not supported yet
  3686. ***** ^ not supported yet
  3687. ***** ^ not supported yet
  3688. 1600 p := MAX(CARDINAL);
  3689. ***** ^ undeclared identifier
  3690. ***** ^ not supported yet
  3691. 1601 p := 0;
  3692. 1602 ins := TRUE; (* Insert mode *)
  3693. 1603 LOOP
  3694. 1604 l := Str.Length(S);
  3695. ***** ^ not supported yet
  3696. ***** ^ not supported yet
  3697. ***** ^ not supported yet
  3698. 1605 IF p>l THEN p := l END;
  3699. 1606 IO.WrStr(S); ClrEol;
  3700. ***** ^ not supported yet
  3701. ***** ^ not supported yet
  3702. ***** ^ not supported yet
  3703. ***** ^ not supported yet
  3704. 1607 GotoXY(x+p,y);
  3705. ***** ^ not supported yet
  3706. ***** ^ not supported yet
  3707. 1608 k := IO.RdCharDirect();
  3708. ***** ^ not supported yet
  3709. ***** ^ not supported yet
  3710. ***** ^ not supported yet
  3711. 1609 IF k = 0C THEN (* Extended character *)
  3712. 1610 CASE IO.RdCharDirect() OF
  3713. ***** ^ not supported yet
  3714. ***** ^ not supported yet
  3715. ***** ^ not supported yet
  3716. 1611 | CHR(75) : k := CHR(19); (* LeftArr -> ^S *)
  3717. ***** ^ undeclared identifier
  3718. ***** ^ not supported yet
  3719. ***** ^ undeclared identifier
  3720. ***** ^ not supported yet
  3721. 1612 | CHR(77) : k := CHR(4) ; (* RightArr -> ^D *)
  3722. ***** ^ undeclared identifier
  3723. ***** ^ not supported yet
  3724. ***** ^ undeclared identifier
  3725. ***** ^ not supported yet
  3726. 1613 | CHR(71) : k := CHR(1) ; (* Home -> ^A *)
  3727. ***** ^ undeclared identifier
  3728. ***** ^ not supported yet
  3729. ***** ^ undeclared identifier
  3730. ***** ^ not supported yet
  3731. 1614 | CHR(79) : k := CHR(6) ; (* End -> ^F *)
  3732. ***** ^ undeclared identifier
  3733. ***** ^ not supported yet
  3734. ***** ^ undeclared identifier
  3735. ***** ^ not supported yet
  3736. 1615 | CHR(83) : k := CHR(7) ; (* Del -> ^G *)
  3737. ***** ^ undeclared identifier
  3738. ***** ^ not supported yet
  3739. ***** ^ undeclared identifier
  3740. ***** ^ not supported yet
  3741. 1616 | CHR(82) : k := CHR(22); (* Ins -> ^V *)
  3742. ***** ^ undeclared identifier
  3743. ***** ^ not supported yet
  3744. ***** ^ undeclared identifier
  3745. ***** ^ not supported yet
  3746. 1617 END;
  3747. 1618 END;
  3748. 1619 CASE k OF
  3749. 1620 | ' '..'~' : IF ins THEN Str.Insert(S,k,p);
  3750. ***** ^ not supported yet
  3751. ***** ^ not supported yet
  3752. ***** ^ not supported yet
  3753. ***** ^ not supported yet
  3754. 1621 ELSIF p=l THEN Str.Append(S,k);
  3755. ***** ^ not supported yet
  3756. ***** ^ not supported yet
  3757. ***** ^ not supported yet
  3758. ***** ^ not supported yet
  3759. 1622 ELSE S[p] := k;
  3760. ***** ^ not supported yet
  3761. ***** ^ not supported yet
  3762. 1623 END;
  3763. 1624 INC(p);
  3764. ***** ^ undeclared identifier
  3765. ***** ^ not supported yet
  3766. 1625 | CHR(1) : p := 0; (* Home *)
  3767. ***** ^ undeclared identifier
  3768. ***** ^ not supported yet
  3769. 1626 | CHR(6) : p := l; (* End *)
  3770. ***** ^ undeclared identifier
  3771. ***** ^ not supported yet
  3772. 1627 | CHR(19) : IF p>0 THEN DEC(p) END; (* Left *)
  3773. ***** ^ undeclared identifier
  3774. ***** ^ not supported yet
  3775. ***** ^ undeclared identifier
  3776. ***** ^ not supported yet
  3777. 1628 | CHR(4) : IF p<l THEN INC(p) END; (* Right *)
  3778. ***** ^ undeclared identifier
  3779. ***** ^ not supported yet
  3780. ***** ^ undeclared identifier
  3781. ***** ^ not supported yet
  3782. 1629 | CHR(7) : IF p<l THEN (* Del *)
  3783. ***** ^ undeclared identifier
  3784. ***** ^ not supported yet
  3785. 1630 Str.Delete(S,p,1);
  3786. ***** ^ not supported yet
  3787. ***** ^ not supported yet
  3788. ***** ^ not supported yet
  3789. ***** ^ not supported yet
  3790. 1631 END;
  3791. 1632 | CHR(8) : IF p>0 THEN (* BackSpace *)
  3792. ***** ^ undeclared identifier
  3793. ***** ^ not supported yet
  3794. 1633 DEC(p); Str.Delete(S,p,1);
  3795. ***** ^ undeclared identifier
  3796. ***** ^ not supported yet
  3797. ***** ^ not supported yet
  3798. ***** ^ not supported yet
  3799. ***** ^ not supported yet
  3800. ***** ^ not supported yet
  3801. 1634 END;
  3802. 1635 | CHR(22) : ins := NOT ins; (* Toggle Ins/Ovr *)
  3803. ***** ^ undeclared identifier
  3804. ***** ^ not supported yet
  3805. 1636 | CHR(13) : RETURN; (* Enter *)
  3806. ***** ^ undeclared identifier
  3807. ***** ^ not supported yet
  3808. 1637 END;
  3809. 1638 GotoXY(x,y);
  3810. ***** ^ not supported yet
  3811. ***** ^ not supported yet
  3812. 1639 END;
  3813. 1640 END InputStr;
  3814. ***** ^ not supported yet
  3815. 1641
  3816. 1642
  3817. 1643 (* ------------------------- *)
  3818. 1644 (* Main initialization *)
  3819. 1645 (* ------------------------- *)
  3820. 1646
  3821. 1647 CONST
  3822. 1648 ClearOnEntry = TRUE; (* Change to FALSE if automatic clear *)
  3823. 1649
  3824. 1650 (*%F _OS2 *)
  3825. 1651 VAR
  3826. 1652 R : SYSTEM.Registers;
  3827. 1653 WD : WinDef;
  3828. 1654
  3829. 1655 BEGIN
  3830. 1656 (*%T _mthread *)
  3831. 1657 Lock := NullProc;
  3832. 1658 Unlock := NullProc;
  3833. 1659 (*%E *)
  3834. 1660 CoreWind._multip := FALSE;
  3835. 1661 IO.WrStrRedirect := WriteOut;
  3836. 1662 IO.RdStrRedirect := ReadString;
  3837. 1663 CurrentScreenDepth := AbsCoord(CoreWind._getscreendepth());
  3838. 1664 IF NOT CoreWind._winsetup THEN
  3839. 1665 CoreWind._initscreentype(CGASnow);
  3840. 1666 R.AH := 3;
  3841. 1667 R.BH := SHORTCARD(CoreWind._activepage());
  3842. 1668 Lib.Intr(R,10H);
  3843. 1669 IF (R.CH<20H)AND(R.CL>0) THEN
  3844. 1670 CoreWind._cursorlines := R.CX;
  3845. 1671 ELSE
  3846. 1672 CoreWind._cursorlines := 0607H;
  3847. 1673 END;
  3848. 1674 CoreWind._windowstack := NIL;
  3849. 1675 NEW(UseListPtr(CoreWind._uselist));
  3850. 1676 UseListPtr(CoreWind._uselist)^.Next := NIL; (* dummy *)
  3851. 1677 CoreWind._cursorstack := NIL;
  3852. 1678 WD := FullScreenDef;
  3853. 1679 WD.Y2 := CurrentScreenDepth;
  3854. 1680 IF ClearOnEntry THEN
  3855. 1681 FullScreen := Open(WD);
  3856. 1682 ELSE
  3857. 1683 WD.Hidden := TRUE;
  3858. 1684 FullScreen := Open(WD);
  3859. 1685 SnapShot;
  3860. 1686 PutOnTop(FullScreen);
  3861. 1687 GotoXY(ORD(R.DL)+1,ORD(R.DH)+1);
  3862. 1688 END;
  3863. 1689 ELSE
  3864. 1690 FullScreen:=CoreWind._fullscreen;
  3865. 1691 END;
  3866. 1692
  3867. 1693 (*%E *)
  3868. 1694
  3869. 1695
  3870. 1696 (*%T _OS2 *)
  3871. 1697 VAR
  3872. 1698 Row, Col: CARDINAL;
  3873. 1699 WD: WinDef;
  3874. ***** ^ undeclared identifier
  3875. 1700 BEGIN
  3876. 1701 (*%T _mthread *)
  3877. 1702 Lock := Process.Lock;
  3878. ***** ^ not supported yet
  3879. ***** ^ not supported yet
  3880. ***** ^ not supported yet
  3881. 1703 Unlock := Process.Unlock;
  3882. ***** ^ not supported yet
  3883. ***** ^ not supported yet
  3884. ***** ^ not supported yet
  3885. 1704 (*%E *)
  3886. 1705 IO.WrStrRedirect := WriteOut;
  3887. ***** ^ not supported yet
  3888. ***** ^ not supported yet
  3889. ***** ^ not supported yet
  3890. 1706 IO.RdStrRedirect := ReadString;
  3891. ***** ^ not supported yet
  3892. ***** ^ not supported yet
  3893. ***** ^ not supported yet
  3894. 1707 CurrentScreenDepth := AbsCoord(CoreWind._getscreendepth());
  3895. ***** ^ undeclared identifier
  3896. ***** ^ undeclared identifier
  3897. ***** ^ undeclared identifier
  3898. ***** ^ not supported yet
  3899. ***** ^ not supported yet
  3900. 1708 IF NOT CoreWind._winsetup THEN
  3901. ***** ^ undeclared identifier
  3902. ***** ^ not supported yet
  3903. 1709 RealMode := NOT Lib.ProtectedMode();
  3904. ***** ^ not supported yet
  3905. ***** ^ not supported yet
  3906. ***** ^ not supported yet
  3907. 1710 IF Vio.GetCurType( CursorInfo, 0 ) = 0 THEN END;
  3908. ***** ^ not supported yet
  3909. ***** ^ not supported yet
  3910. ***** ^ not supported yet
  3911. ***** ^ not supported yet
  3912. 1711 CoreWind._initscreentype(CGASnow);
  3913. ***** ^ undeclared identifier
  3914. ***** ^ not supported yet
  3915. ***** ^ undeclared identifier
  3916. 1712 CoreWind._windowstack := NIL;
  3917. ***** ^ undeclared identifier
  3918. ***** ^ not supported yet
  3919. 1713 NEW(UseListPtr(CoreWind._uselist));
  3920. ***** ^ undeclared identifier
  3921. ***** ^ undeclared identifier
  3922. ***** ^ not supported yet
  3923. 1714 UseListPtr(CoreWind._uselist)^.Next := NIL; (* dummy *)
  3924. ***** ^ undeclared identifier
  3925. ***** ^ not supported yet
  3926. ***** ^ not supported yet
  3927. 1715 CoreWind._cursorstack := NIL;
  3928. ***** ^ undeclared identifier
  3929. ***** ^ not supported yet
  3930. 1716 WD := FullScreenDef;
  3931. ***** ^ not supported yet
  3932. ***** ^ undeclared identifier
  3933. 1717 WD.Y2 := CurrentScreenDepth;
  3934. ***** ^ not supported yet
  3935. ***** ^ not supported yet
  3936. ***** ^ undeclared identifier
  3937. 1718 IF ClearOnEntry THEN
  3938. ***** ^ not supported yet
  3939. 1719 FullScreen := Open(WD);
  3940. ***** ^ undeclared identifier
  3941. ***** ^ not supported yet
  3942. ***** ^ not supported yet
  3943. 1720 ELSE
  3944. 1721 WD.Hidden := TRUE;
  3945. ***** ^ not supported yet
  3946. ***** ^ not supported yet
  3947. 1722 FullScreen := Open(WD);
  3948. ***** ^ undeclared identifier
  3949. ***** ^ not supported yet
  3950. ***** ^ not supported yet
  3951. 1723 SnapShot;
  3952. ***** ^ not supported yet
  3953. 1724 PutOnTop(FullScreen);
  3954. ***** ^ not supported yet
  3955. ***** ^ undeclared identifier
  3956. 1725 Vio.GetCurPos(Row, Col, 0);
  3957. ***** ^ not supported yet
  3958. ***** ^ not supported yet
  3959. ***** ^ not supported yet
  3960. 1726 GotoXY(Col+1, Row+1);
  3961. ***** ^ not supported yet
  3962. ***** ^ not supported yet
  3963. 1727 END;
  3964. 1728 ELSE
  3965. 1729 FullScreen := CoreWind._fullscreen;
  3966. ***** ^ undeclared identifier
  3967. ***** ^ undeclared identifier
  3968. ***** ^ not supported yet
  3969. 1730 END;
  3970. 1731 (*%E *)
  3971. 1732
  3972. 1733 END Window.
  3973. ***** ^ not supported yet
  3974. 2239 errors