Hi,
reading the specs, map-over-output-records-overlapping-region should map over *all* childs of the supplied output-record which overlap the supplied region. In my application, the output-records are hierarchical with the topmost output-record covering the whole drawing area and its childs occupying parts of that and their childs again parts of the parts and so forth.
When calling the function on a part of the drawing area, the macro only maps the function over the topmost output record and ignores all of its childs which also overlap the region in question.
I could write a similar macro which traverses the tree and checks for overlap but I ask myself, whether the behaviour of mcclim's built-in macro is correct with regards to the specs or whether I'm doing something wrong here...
-- Orm
On Thu, Jan 6, 2011 at 3:51 PM, Orm Finnendahl o.finnendahl@inm.mh-freiburg.de wrote:
Hi,
reading the specs, map-over-output-records-overlapping-region should map over *all* childs of the supplied output-record which overlap the supplied region. In my application, the output-records are hierarchical with the topmost output-record covering the whole drawing area and its childs occupying parts of that and their childs again parts of the parts and so forth.
When calling the function on a part of the drawing area, the macro only maps the function over the topmost output record and ignores all of its childs which also overlap the region in question.
I could write a similar macro which traverses the tree and checks for overlap but I ask myself, whether the behaviour of mcclim's built-in macro is correct with regards to the specs or whether I'm doing something wrong here...
I'm far from an expert here (really a total newb just trying to get my feet wet), and this may be totally unrelated, but, FWIW, I ran across something about this function/macro (?) in the past couple of days while digging back through the mailing list archives (I think it was around Oct 2003).
From what I remember, that discussion had something to do with
creating a custom kind of output record. I think it revolved around protocols and which kind of rectangle a pane really is. It definitely involved intersection testing (I think the issue there was that the current implementation was requiring the custom output record to implement a protocol defined in clim-internals).
That's probably no help whatsoever, and completely unrelated. But I figured I'd post this on the off chance that it might ring a bell for someone who has a clue, or maybe offer a hint that might be at least vaguely helpful.
-- Orm
Good luck, James
On Thu, Jan 6, 2011 at 4:51 PM, Orm Finnendahl o.finnendahl@inm.mh-freiburg.de wrote:
Hi,
reading the specs, map-over-output-records-overlapping-region should map over *all* childs of the supplied output-record which overlap the supplied region. In my application, the output-records are hierarchical with the topmost output-record covering the whole drawing area and its childs occupying parts of that and their childs again parts of the parts and so forth.
When calling the function on a part of the drawing area, the macro only maps the function over the topmost output record and ignores all of its childs which also overlap the region in question.
I could write a similar macro which traverses the tree and checks for overlap but I ask myself, whether the behaviour of mcclim's built-in macro is correct with regards to the specs or whether I'm doing something wrong here...
I think it's pretty clear it shouldn't recurse on it's own. If it did, it'd be necessary to invent another more primitive function which did not. Further, this appears to be the behavior implemented by other CLIM implementations.
map-over-output-records-containing-region is arguably the fundamental operator for querying the output history. As the Franz CLIM User's Guide astutely notes, output-record-children may be forced to cons a new list of children (undesirable..), depending whether the output record stores this them a list or some other structure, e.g. an R-tree.
Manually recursing shouldn't be much trouble - write the continuation inside LABELS, add one recursive call to map-over-output-records-etc.