Re: Visual cue for multiple selections

Lauris Kaplinski <[email protected]>
Newsgroups gmane.comp.graphics.sodipodi
Message-ID <[email protected]>
Hello!

Carl Hetherington kirjutas E, 12.01.2004 kell 18:41:
> Consider a pair of concentric circles, one smaller than the other.  As far
> as I can see, there is no visual feedback to differentiate between
> having selected the larger one and having selected both.

Right :-/

> One drawing program from way back used to get around this problem by
> painting a thin dotted rectangle around the bounding box of each
> /individual/ selected item.  This made the composition of the current
> selection very clear.
>
> Does anyone think this might be a good idea for sodipodi?

It may be clear for 2-4 items, but may become visual hodgepodge
if you have, say 20 items.
As far as I remember, CorelDraw painted tiny anchor dot for
each object selected. This may be alternative approach - there
even is no need to choose either one, if we can make these
configurable.

> Either way (;-) I'd like to have a go at implementing it myself.  Any tips
> on where in the code I should be looking?

select-context.* is select tool.
seltrans.* is kinda selection container for select context.
It is mostly used for transofrmations (hence the name), but can
be used to track other this as well (it already tracks generic
bbox, if you choose select tool to show only bbox while
transforming).
Basically you have to add list of either SPCtrlRects or
SPCtrls or some other canvas items, one per selected item
to seltrans, and update that list whenever selection
is changed/modified.

Best wishes,
Lauris Kaplinski




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.