[comp.sys.amiga.tech] Scrollable text windows

carpente@corinth.uucp (Michael A. Carpenter OSBU North) (12/15/90)

I am looking for some example source code for scrollable text windows.  What
I mean by this is a window like a text editor has, with a scroll bar and
scrolling gadgets on one side, so you can use the mouse to scroll through
the text in the window.  

I would like to use such a window as a message window in another program.  
Does anyone know where I could get such a source code example?  I can ftp,
so pointers to ftp sites are fine.  C language is preferable...

Thanks

Michael
Please reply via e-mail:
carpente@parc.xerox.com

dwl10@ccc.amdahl.com (Dave Lowrey) (12/19/90)

In article <677@roo.UUCP> carpente@corinth.UUCP (Michael A. Carpenter OSBU North) writes:
>I am looking for some example source code for scrollable text windows.  What
>I mean by this is a window like a text editor has, with a scroll bar and
>scrolling gadgets on one side, so you can use the mouse to scroll through
>the text in the window.  
>
>I would like to use such a window as a message window in another program.  
>Does anyone know where I could get such a source code example?  I can ftp,
>so pointers to ftp sites are fine.  C language is preferable...
>
>Thanks

Pick up a copy of the RKM: Libraries & Devices. In there they have a
very good routine to do what you want.

The code for the sample sources in the book are on a couple of fish
disks (I don't have my index with me right now, sorry).


-- 
                          |  These be my words, not my employer's!
"Dare to be stupid!:      |Dave Lowrey - Amdahl Corp. - Houston, TX
Weird Al Yankovik         |In Texas:  david@starsoft
                          |The World: dwl10@juts.ccc.amdahl.com

a447@mindlink.UUCP (Colin Fox) (12/22/90)

> carpente@corinth.uucp writes:
> 
> Msg-ID: <677@roo.UUCP>
> Posted: 14 Dec 90 17:19:46 GMT
> 
> Org.  : Xerox Palo Alto Research Center
> Person: Michael A. Carpenter OSBU North
> 
> I am looking for some example source code for scrollable text windows. What
> I mean by this is a window like a text editor has, with a scroll bar and
> scrolling gadgets on one side, so you can use the mouse to scroll through
> the text in the window.
> 
> I would like to use such a window as a message window in another program.
> Does anyone know where I could get such a source code example?  I can ftp,
> so pointers to ftp sites are fine.  C language is preferable...
> 
> Thanks
> 
> Michael
> Please reply via e-mail:
> carpente@parc.xerox.com

There is a routine in req.library called RealTimeScroll() that does just this
very thing. It is used in CygnusEd to great effect.

If you have any questions, or would like some specific source, my e-mail
address is "Colin_Fox@mindlink.uucp". I am one of the authors of this library.

a447@mindlink.UUCP (Colin Fox) (12/23/90)

> bryant@milton.u.washington.edu writes:
> 
> Msg-ID: <13421@milton.u.washington.edu>
> Posted: 24 Dec 90 01:57:56 GMT
> 
> Org.  : University of Washington, Seattle
> Person: Jonathan Woolsey
> 
> Why is it that no one implements smooth scrolling of text on the Amiga?
> I can see that it might be slow, but is easy on the eyes
> 
> Jonathan
> bryant@milton.u.washington.edu.

CygnusEd uses smooth scrolling. You can set the number of pixels it moves each
scroll tick in one of the environment menus (File settings->set scroll jump).
It is very fast and very nice. Bruce used some custom blitter code that for
some reason prevented serial communication from occuring while the scrolling is
going on, (and if you were doing a download while you scrolled you aborted the
download), so he also added in a feature so that you can force Ced to use the
ScrollRaster() routine which doesn't have this problem.

bryant@milton.u.washington.edu (Jonathan Woolsey) (12/24/90)

Why is it that no one implements smooth scrolling of text on the Amiga?
I can see that it might be slow, but is easy on the eyes

Jonathan
bryant@milton.u.washington.edu.

hill@evax.arl.utexas.edu (Adam Hill) (12/24/90)

     The beta version of VLT I am typing on right now has "pretty-smooth"
scrolling. It seems not to interfere with anything.... Yet.

     Willy seems to have done an excellent job as usual. :-)
-- 
 adam hill                                 
 hill@evax.arl.utexas.edu                        Make Up Your Own Mind.. AMIGA!
                                                   Amiga... Multimedia NOW  
 Most Common Phrase at DevCon '90 - "Shhhhhhh.."  

peterk@cbmger.UUCP (Peter Kittel GERMANY) (12/29/90)

In article <13421@milton.u.washington.edu> bryant@milton.u.washington.edu (Jonathan Woolsey) writes:
>Why is it that no one implements smooth scrolling of text on the Amiga?
>I can see that it might be slow, but is easy on the eyes

Oh, don't say "no one". Ever seen that program "MuchMore" used
on the Fish disks? Never seen a smoother scrolling before!

-- 
Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk

frank@disys.dis.incom.de (Frank Thomas) (01/03/91)

In <676@cbmger.UUCP> peterk@cbmger.UUCP (Peter Kittel GERMANY) writes:

>In article <13421@milton.u.washington.edu> bryant@milton.u.washington.edu (Jonathan Woolsey) writes:
>>Why is it that no one implements smooth scrolling of text on the Amiga?
>>I can see that it might be slow, but is easy on the eyes

>Oh, don't say "no one". Ever seen that program "MuchMore" used
>on the Fish disks? Never seen a smoother scrolling before!

That is true, but did you know that he is doing that with the processor.
He is doing it that way because he has to move 2 bitplanes. But if you do
this with the blitter (scrollRaster,or yourself) he moves the bitplanes
seperately which causes this well known color-flickering while moving the
stuff. The only way to do it with blitter and 2 bitplanes is to change
to bitplane modulo that way:
line of plane 1
line of plane 2
line of plane 1
line of plane 2
..
But this is only possible for games because you can not print to a screen
like that the normal way.

Frank

darren@cbmvax.commodore.com (Darren Greenwald) (01/09/91)

In article <13421@milton.u.washington.edu> bryant@milton.u.washington.edu (Jonathan Woolsey) writes:
>Why is it that no one implements smooth scrolling of text on the Amiga?
>I can see that it might be slow, but is easy on the eyes
>
>Jonathan
>bryant@milton.u.washington.edu.

 I have seen it done; it works, though as you noted its slower - For
an 8 pixel high font, you'd be looking at eight times the number of
layer/scroll operations to scroll a pixel at a time.  For some
color combinations it doesn't look so hot (e.g., any color combinations
which require 2+ bit-planes to draw the characters in ... in the case
of pen 1, on pen 0 though its not too bad since the second plane
is all 0's).  If you've seen the color artifacting which is visible
with some color combinations when scrolling (latency as all the bit-planes
are shuffled), smooth scrolling can look terrible.

Another variation on this idea is to smooth scroll when moving slowly
through the text, but use faster scrolling as the user moves the scroll
bar faster.