[cl-typesetting-devel] Reusing bits of code

Peter Seibel peter at gigamonkeys.com
Sat Jul 9 03:08:37 UTC 2005


On Jul 8, 2005, at 9:58 AM, Marc Battyani wrote:

> Now it's using this for a logo that seems strange to me.
> Generally you place the logo at some fixed places on the page, not  
> in the
> text. Anyway once you have a draw-logo function you can use it in a
> user-drawn-box as well as using it directly.

Well, here's how I'm thinking of it. I've got this code to draw the  
logo. Now suppose I want to design an invoice. The logo is going to  
appear on the page somewhere and I'd like to place my address  
somewhere relative to the logo. Rather than figure out how big the  
logo is and absolutely positioning the address I'd like to be able to  
do something along the lines of:

   - create a vbox.
   - add the logo to the vbox
   - add some vspace
   - add my address (itself a box) to the vbox
   - set the vbox somewhere on the page

and so on. In other words I'd like to build up the whole page out of  
nested vboxes and hboxes with the sub-elements perhaps being  
relatively involved and reusable components such as the logo. Do you  
see what I'm getting at? And if so, am I on crack to want to do it  
this way?

-Peter

-- 
Peter Seibel           * peter at gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/





More information about the cl-typesetting-devel mailing list