[Glade-devel] Rubberband Selection Solution?



Hey all,

Im trying to come up with a rubberband (rectangle) selection patch. Id
like to hear some opinions on whether or not its a worthwhile idea,
and what behavior we expect out of it. I think there is a gnome
useability document on rubberband selection, but we might want some
non-standard behavior.

In my attempts I have been having some difficulty. The first idea was
to simply draw on top of the widgets by attaching a callback to click
mousemotion and release events that draws a rectangle with pixel
inversion, but after very much wasted time, ive pretty much given up
on that. Different widgets have different drawing orders which make
lots of special cases necessary, and some of the code is split up so
even if I could get it to work, it would probably be pretty messy.
Perhaps a more experienced person could salvage the idea, but I
cannot.

The second idea is a bit clever:  attach a callback to a modifier key
(SHIFT?) that creates a new transparent window under the mouse. Have
the transparent window follow/stay under the mouse while shift is
held. Overlay a rectangle (rubberband) on the transparent window in
response to the click-drag-release, while increasing the size of the
window as the mouse gets near the edge.

This allows us to ignore the problems with drawing on widgets, and
also create selection "rubberbands"  that are outside the window being
worked on, allowing selection of the window itself, as well as making
selection of things near the window border easier.

I have not coded up an example, so I dont know what issues there may
be. And also I havent done any thinking on how to get it to decide
what gets selected, but I think its doable.

Id love to hear you comments.
   
     - Andy



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]