TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: JONATHAN DE BOYNE POLLARD
from: MIKE RUSKAI
date: 1999-11-06 08:20:00
subject: PROMPT $I in PMCMD

Some senseless babbling from Jonathan De Boyne Pollard to George White
on 11-03-99  09:49 about PROMPT $I in PMCMD...

 JdBP>> Actually, what I need to do is to write a control window that
 JdBP>> can be used to display coloured text, rather than relying on a
 JdBP>> standard MLE control.  I know that these things can be done,
 JdBP>> because programs like ZOC and LiveWire use such controls for
 JdBP>> terminal emulator windows.  Does anyone know how they do it ?
 JdBP>> I've tried rolling my own, but it is *very* slow in repainting
 JdBP>> (all of those calls to GpiCharStringPosAt() take a long time).
 
 GW> I seem to remember that a way to do this was to hide the window,
 GW> build the text, and then make it visible.

 JDBP> That isn't the solution.  The text is already "built", in an internal
 JDBP> logical screen buffer.  The problem is that the raw GPI call to
 JDBP> actually paint the character cells onto the device context is slow, and
 JDBP> that often many characters, in different combinations of colours, have
 JDBP> to be redrawn during a WM_PAINT event when the window contents are
 JDBP> being redisplayed. 
 JDBP> Does anyone here in OS2PROG have any suggestions ?

I can't be sure, because I don't have either program installed, but I
thought both ZOC and LiveWire actually used a VIO window for the terminal.

That would mean a bunch of calls to VioSetState() to set the color
registers.  It'd probably be more work, but if that's what ZOC and LiveWire
used, it must be faster.

Unless, of course, you rely on ANSI for colors.  In that case, you'd just
need to put the control codes into the text you write.

I think I recall a comment from the author of either ZOC or LiveWire, years
ago, explaining why flashing ANSI characters instead have a grey
background, because of how VIO ANSI is handled.

Mike Ruskai
thannymeister@yahoo.com


... BBS addiction is a Terminal disease.

___ Blue Wave/QWK v2.20
--- Platinum Xpress/Win/Wildcat5! v3.0pr2
396/1
* Origin: FIDO QWK MAIL & MORE! WWW.DOCSPLACE.ORG (1:3603/140)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.