Re: The Console

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi David,
well now that the new release is out, I can try something new. So I knocked
up a console library this afternoon using Win32lib. It has the following
functions...

global procedure ConsoleOut(integer pConsole, sequence pText)
global procedure ConsoleRowCol(integer pConsole, integer pRow, integer pCol)
global function ConsoleOpen(sequence pTitle, integer pRows, integer pCols)
global procedure ConsoleClose(integer pConsole)
global function ConsoleMetrics(integer pConsole, sequence pMetric)
global procedure ConsoleColors(integer pConsole, atom pForeground, atom
pBackground)

It is just about ready for Alpha testing.

Currently I cannot get the background colors to change, no matter what I do.
Also the repainting is very brute-force like and this can be optimised. But
it does run very fast anyhow. Also, it is fixed at "Courier New, 10 point"
font for now.

It supports the standard console processing for Carriage Return, LineFeed,
BackSpace, Form Feed, and Tabstops. It scrolls up one line only if the
current character forces it to, which means you can safely write a character
in the bottom righthand corner with out the whole screen moving on you. It
supports consoles from 1 to 66 rows and 1 to 132 columns. You can have any
number of independent consoles open.

I'll post the code to the list later today, once my kids have gone to bed.

I plan to support the ANSI escape sequences, font changes,  etc...

-----
cheers,
Derek Parnell

>-----Original Message-----
>From: Derek Parnell [mailto:dparnell at bigpond.net.au]
>Sent: Friday, November 03, 2000 6:38 PM
>To: derekp at solace.com.au
>Subject: Re: The Console
>
>
>LEVIATHAN wrote:
>
>> Noticing the replys here, it looks
>> like one might as well make a Windows
>> 'console' routine, opens a... 200x150
>> window and opens binary I/O to it ...
>
>It may come to that. I wanted to avoid having to write the scrolling code,
>etc. It also complicates wrapping Win32Lib.
>
>Thanks for the feedback.
>
>-- David Cuny
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu