[Prev][Next][Index][Thread]

Re: What object to use??




Mike Strayer wrote in message <9612nj$h3r$1@unix.sri.com>...
>Hello,
>I'm in the process of learning Dylan using Functional
>Developer.  I'm trying to put a windows app together
>using the DUIM library.  I've worked my way through the
>tutorial but I question remains unanswered.
>
>If i want to have a window to draw to, and display images
>in what class should I use when I create the pane?  Looking
>at the DUIM reference manual it would appear that either
><sheet> or <medium> are the likely choices but I thought
>I'd ask before chasing the wild goose.


Think of a sheet as managing two things, for the most part.
It corresponds to an HWND in Windoze.
 - a region, and a transform to a parent sheet
 - an event stream

Think of a medium as a drawing surface, like a Windows DC.
Mediums have properties like brush and pen, and support
functions like draw-line.

There are <drawing-pane>'s which are sheets that are
guaranteed to have a medium.  Drawing panes happen to
have "trampolines" for drawing functions that draw onto
the sheet's medium.

This separation of sheet and medium allows a drawing
surface to be shared among many sheets.  This is a good
thing, sinces drawing surfaces are actually pretty expensive,
but unmirrored sheets are very cheap.






References: