[plt-scheme] flowing text into two text% objects

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Nov 13 20:29:31 EST 2007

Here's one quick thought:

Maybe you could have a single text% object that is displayed in two
editor-canvas%es, similar to what happens when you split the
definitions window in DrScheme. The scrollbars on each canvas would be
hidden, but the right canvas would be scrolled down one page relative
to tge left canvas.

Matthew

At Tue, 13 Nov 2007 17:15:58 -0800 (PST), Leslie Gerhat wrote:
> We are creating an eBook reader program and are having some difficulties with 
> our GUI.   In particular, we would like the area which displays the text to 
> look like a book with two text% objects corresponding to the right and left 
> pages.  We have created these two objects; however we are unable to fill them 
> appropriately.  We need to feed text into the left text% object until the 
> snips are no longer visible.  At that point, we need to start filling the 
> right text% object.  Then, once the user has read these two columns, they need 
> to be able to "turn the page" and repeat the fill processes with the next "two 
> pages" of text.   We have tried breaking our single string of text into list 
> objects representing a "page," but because we are using a proportional font, 
> the number of characters per "page" is inconsistent and we have no good way of 
> generating these list objects.  We also considered making each word or newline 
> into a structure, carrying a field
>  corresponding to the word's index in the complete text.  However, we ran into 
> issues when trying to put these into the text% object.  Specifically, we 
> couldn't figure out how to tell whether or not the word was visible.  We tried 
> to use the (get-visible-position-range) function, but it
> doesn't actually return an integer value that can be compared to the
> current position.  We are looking for any advice with our approach to this 
> problem.  Thank you in advance for your help.
> 
> Leslie Gerhat
> 
> 
> 
> 
>       
> _______________________________________________________________________________
> _____
> Get easy, one-click access to your favorites. 
> Make Yahoo! your homepage.
> http://www.yahoo.com/r/hs _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.