Hi Marc, 

| I have done this with a "print preview" feature I use in some of my
| projects. It's basically a window with a large canvas on it.
| 
| Separately, I have created a simple data structure that consists of a
| "page" class. I put these into an array with as many as I 
| need for each
| page of the document.

Yes, that makes sense to me - it's what's been
going round my head today.

| To "draw" your pages in the canvas, just create a 
| "drawPage(x)" routine
| where x is an integer representing the page number. Within 
| that routine,
| you grab the appropriate "page" subclass and go through each 
| element in it
| and draw it (if it's text, use drawstring, if it's a picture, use
| drawPicture, etc.). In my case, I cache these pages into a series of
| picture objects to speed previewing (my preview feature lets 
| users quickly
| scroll through the previewed pages). To print to a printer, I 
| just "draw"
| the pages to a printer's graphic object instead of the canvas'.

Yes, that all makes sense to me too. :)

| With more knowledge about what specifically your pages are 
| containing I
| could help you more, but the above rough sketch should get 
| you going with
| a data structure.

Thanks for your help Marc. I will be making a WYSIWYG
editor. Right now I don't care for graphics as I'll
only be dealing with text.

Having read all the great replies on this subject I
think it's all starting to form in my head now so 
I'm going to try some experiments.

I will let you know if I get stuck (which I'm sure I
will!) but for now you've all given me plenty of food
for thought.

Thanks again.

All the best,

Mark.

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.5/284 - Release Date: 17/03/2006
 

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to