CLIM mail archive


Implementation approach advice ...

I have a bunch of nitty-gritty questions about clim capablities, but I think
its easier to give me a hand by knowing what I'm trying to do overall, and
suggesting an approach. What follows is an informal spec of what I want,
followed by a brief sketch of the approaches I've considered. If you have an
idea for another approach, please pass it on to me.

Any help, perspective, suggestions, etc, is GREATLY appreciated.

Informal specification:

A class of pane called an annotation-pane. It enables me to have a scrollable
central window with margins (on 1 - 4 sides) which contain annotations. The
annotations in the margin are connected (graphically, by a line) to points in
the central window. (USE: Imagine a blueprint with annotations in the margins
pointing to various features - on a computer screen the blueprint needs to be
scrollable, and the annotations need to change to reflect the part of the
blueprint you can see)

This means that the scroll bars for the central window need to be on the
outside of the annotations (on the outside of the pane) so that drawing the
connecting lines doesn't try to draw over the scroll bars.

I need to know when the central region is scrolled, because I'll need to
change where the annotation pointers point to, which annotation should be
dumped because what they point to is no longer visible, and which new ones to
put up.

The size of annotations would be specified initially (in terms of a char limit
- which must be less than the absolute number of characters that fit to allow
for additional whitespace needed for filling) and then be able to fill in the
annotation box with the annotation text (number of character limit imposed to
try to minimize truncation problems, but truncate anything that overflows and
let the author note and fix it).

Finally, it would be nice to have control over where the annotation for a
particular point on the central display is positioned - make it as close as
possible, and keep it that way when the window is scrolled.

Implementation Approaches:

Given that having lines providing a strong, visual connection between the
annotation and the thing being annotated is necessary, I've come up with three
approaches: make this an application frame, the central display and
annotations all being seperate windows; make a special window which has a very
wide inside margin I can put annotations in, but which is not (directly)
effected by scrolling; within a normal window, implement my own scrolling for
a sub-region, and implement annotation margins, display boxes, etc.

The advantage of the first approach is that I can output annotations to their
own windows, and use predefined filling, truncating, etc functions - i.e. each
annotation gets its own window stream. The disadvantage is that I'd have to
implement scrolling for the inner window with something other than scroll
bars. Also, I'd like to put an annotated pane into a larger frame, I don't
know how easy it is to include and application pane within another application

The advantage of the second approach would be to avoid introducing my own,
non-standard scrolling mechanism. The disadvantage is mostly I can't figure
out how to do it without reaching pretty deep into clim - and, of course, I
don't know how (at this point) point to reach into clim to do it, or even if
its possible.

The third approach has no advantages, other than not having to delve deeply
into clim. I've done a lot of it this way once under DW - it got ugly, so I
wouldn't re-use what I did, but I know I can do it this way.

Main Index | Thread Index