[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Re: [zzdev] Re: (techy) window_draw and key_pressed
- To: zzdev@xxxxxxxxxx
- Subject: Re: [zzdev] Re: (techy) window_draw and key_pressed
- From: Andrew Pam <xanni@xxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Nov 1998 03:12:06 +1100
- In-reply-to: <19981115183102.4671.qmail@xxxxxxxxxx>; from Mark-Jason Dominus on Sun, Nov 15, 1998 at 01:31:02PM -0500
- References: <19981115201656.C3347@xxxxxxxxxxxxxx> <19981115183102.4671.qmail@xxxxxxxxxx>
- Reply-to: zzdev@xxxxxxxxxx
On Sun, Nov 15, 1998 at 01:31:02PM -0500, Mark-Jason Dominus wrote:
> Me neither. Seems like bad design.
Ouch! Look more closely. :-)
> Well, I haven't thought about it too much, but maybe the special case
> isn't important. I mean, suppose the program redraws the border and
> the status bar more often than it needs to? Then so what? That
> doesn't take long. The curses package will notice that it hasn't
> really changed and won't generate any extra screen I/O in that case.
Correct, but completely irrelevant (see my previous post). The entire
screen area apart from the border and status bar are entirely likely
to change after almost any Zigzag operation, forcing curses to redraw.
We want to avoid doing that repeatedly when the user has not yet
completed a series of operations, drawing just enough to get a sense of
what's happening (kind of like "greeking" for text).
> The `elegant' method is to use a `decoration' design. Suppose you
> have a class of objects that represent things that can be drawn on the
> screen; let's call this class `Drawable'. Different sorts of
> drawables will be subclasses of Drawable. For example, Window is a
> subclass of Drawable.
Yes, this is a fairly standard (and useful) design, though it does
complicate the code somewhat. We want to add support for a variety of
user interfaces in future, and this might well be one technique we use.
Thanks for the detailed explanation (elided in this reply).
Share and enjoy,
*** Xanni ***
mailto:xanni@xxxxxxxxxx Andrew Pam
http://www.xanadu.com.au/ Technical VP, Xanadu
http://www.glasswings.com.au/ Technical Editor, Glass Wings
http://www.sericyb.com.au/sc/ Manager, Serious Cybernetics
P.O. Box 26, East Melbourne VIC 8002 Australia Phone +61 3 96511511