sector@pro-exchange.cts.COM.UUCP (06/04/88)
I'm still going through the process of converting my TML Pascal program to ORCA.. A few problems have come up, and I was wondering if anyone can help me out with them... Thanks in advance, Roby *> TML's Writeln checked to see where you were on the screen so if the next line of text that was going to be drawn was off of the screen, it would scroll the window up a bit and write the text at the bottom of that screen/window.. (Similar to what happens in a text enviroment) ORCA does not do this.. How can I write a similar routine to do basically the same thing?? *> TML's Readln displayed a "Mickey Mousish" cursor on the screen, ORCA does not.. How can I write my own input routine that flashes a cursor?? Note : these two examples are applying to text handling in Super-Hires Mode.. UUCP: [ ihnp4 cbosgd nosc ] !crash!pnet01!pro-sol!pro-exchange!sector ARPA: crash!pnet01!pro-exchange!sector@nosc INET: sector@pro-exchange.cts.com "It would take 100 orcs with an array of cleaning tools, to fix this joint up"
AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") (06/11/88)
>From: Roby Sherman <sector@pro-exchange.cts.com> >Subject: ORCA PASCAL help >I'm still going through the process of converting my TML Pascal program to >ORCA.. A few problems have come up, and I was wondering if anyone can help me >out with them... Thanks in advance, > Roby >*> TML's Writeln checked to see where you were on the screen so if the next >line of text that was going to be drawn was off of the screen, it would scroll >the window up a bit and write the text at the bottom of that screen/window.. >(Similar to what happens in a text enviroment) ORCA does not do this.. How can >I write a similar routine to do basically the same thing?? Sounds like you'll have to do something similar to what the TML library must do--use ScrollRect. The amount to scroll would be the Ascent plus the Descent plus the Leading (pixels vertically between lines) for the font you are drawing in. You can use GetFontInfo(??) to find those values. The current port should already be set to the single window you want to scroll, so that shouldn't be a problem (or if there's no window and it's just a QD port, it's still no problem). Your 'writeln' routine will need to keep track of a vertical coordinate so it knows when it's near the bottom of the port; when you scroll up, decrement it by the same amount you scrolled. DON'T compare to 200 to decide when you hit the bottom--instead, do a GetPortRect(?) on the port to find out how tall it is. (If you hard-code a 200, you'll probably be sorry you did, sooner or later.) >*> TML's Readln displayed a "Mickey Mousish" cursor on the screen, ORCA does >not.. How can I write my own input routine that flashes a cursor?? Again, you'll have to simulate it yourself. Use GetNextEvent to get keyDown and autoKey (repeating keys) events, and use InvertRect to blink the cursor (you'll need to keep track of whether it's on or off so you don't leave it there by accident). --David A. Lyons a.k.a. DAL Systems PO Box 287 | North Liberty, IA 52317 BITNET: AWCTTYPA@UIAMVS CompuServe: 72177,3233 GEnie mail: D.LYONS2