Article View: comp.windows.interviews
Article #525Re: 2D scrolling?
From: John Carlson
Date: Sat, 22 Aug 1992 08:35
Date: Sat, 22 Aug 1992 08:35
26 lines
1437 bytes
1437 bytes
In article <1992Aug18.201020.10570@newsserver.rrzn.uni-hannover.de> patz@ipc1.rrzn.uni-hannover.de (Frank Patz) writes:
>InterViews 3.1 beta
>
>I've tried to code a 2D scrollbox "Viewer", based on TransformSetter
...
>After spending lots of hours with that code: Can it be done
>this way? If not, HOW can it be done?
I've spent a lot of time too, and mine still isn't perfect. To handle
the cases where your allocation() isn't set, set an "allocated" flag
in ::allocate() and unset the flag in ::undraw(). My ::upper() and
::cur_length() methods test to see if the glyph has been allocated. Your
::cur_length() method will have to do likewise, and use the Requisition
instead of the allocation.
if (allocated) {
return allocation().allotment(dimension).span();
} else {
Requisition r;
request(r);
return r.requirement(dimension).natural();
}
John Carlson
carlson@yottzumm.tis.llnl.gov
Technical Details
Message-ID:
<134148@lll-winken.LLNL.GOV>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!mips!darwin.sura.net!seismo!lll-winken!yottzumm.tis.llnl.gov!carlsonReferences:
<1992Aug18.201020.10570@newsserver.rrzn.uni-hannover.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!mips!darwin.sura.net!seismo!lll-winken!yottzumm.tis.llnl.gov!carlson From: carlson@yottzumm.tis.llnl.gov (John Carlson) Newsgroups: comp.windows.interviews Subject: Re: 2D scrolling? Message-ID: <134148@lll-winken.LLNL.GOV> Date: 22 Aug 92 08:35:10 GMT References: <1992Aug18.201020.10570@newsserver.rrzn.uni-hannover.de> Sender: usenet@lll-winken.LLNL.GOV Organization: Lawrence Livermore National Laboratory Lines: 26 Nntp-Posting-Host: yottzumm.tis.llnl.gov