On Thu, 26 Dec 2013 12:36:39 +0100, Mike Wey wrote:
On 12/26/2013 01:30 AM, E.S. Quinn wrote:
I've been slowly wrapping my head around working with TreeViews, and TreeModels, and I've derived a class from TreeModel, so it can interface with a class that already handles storage.
But now, I'd like to make it so I can to tree.setReorderable(true), and drag-drop to reorder the various items in the TreeModel, and I'm not at all sure how to go about telling GTK that my derived TreeModel is reorderable, and how to do that reordering.
I think your custom TreeModel also needs to implement the TreeDragSource
and TreeDragDest interfaces to support reordering.It's currently not easy to get these implemented properly with GtkD, but
ill look into it.
Gotcha! It also occurs to me, re-reading through various GTK and GtkD docs, that it might be better to subclass ListStore, and just override everything so it doesn't touch ListStore's internal storage. Would this sort of thing work?