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

From: Leslie Gerhat (thoroughbred_phoenix at yahoo.com)
Date: Tue Nov 13 20:15:58 EST 2007

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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20071113/217f5628/attachment.html>

Posted on the users mailing list.