Re: TreeDragSource data_get location



Torsten Schoenfeld <kaffeetisch gmx de> writes:

Relatedly: We don't offer any way to construct a Gtk2::SelectionData.

I noticed that, but wasn't sure what it should look like.  It sounds
like a good idea though.

The typical use case seems to be this: In your drag-motion handler,
you need access to the actual selection data to decide whether a drop
is possible.

I guess that's what tree drags do: get the data and ask
row_drop_possible how it feels about receiving that.

Or does it make sense to want to call, say,
Gtk2::TreeDragSouce->drag_data_get to get the selection data for a specific
target type -- without having been passed an existing selection data
object from somewhere?

You could conceive of that for a faked-up drag as a generic data move,
though sounds a little nasty.

As for the type, I couldn't see any of the tree stuff operating on
anything except its same-client-only "row" type.  There's a fixme in
gtkliststore.c since you could helpfully drag and drop text on a model
with a single column of text.  But perhaps gtk itself ought to take the
lead on anything in that area.

Can you think of a walkable way?

Me?  Nope.  Just from using the TreeView drags it has a feel of "hover
to activate".  If that's so then trying to exercise the whole lot could
mean some very icky timers as well as events.



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