View previous topic :: View next topic |
Author |
Message |
skirino
Joined: 17 Jun 2010 Posts: 4
|
Posted: Thu Jun 17, 2010 1:04 pm Post subject: How to enable drag and drop in a TreeView |
|
|
Hi,
I'm writing a simple application that uses TreeView and ListStore and now I want to add drag and drop functionality.
So I used TreeView.enableModelDragDest and TreeView.enableModelDragSource, and made a derived class of ListStore that implements functions in TreeDragDestIF and TreeDragSourceIF.
But unfortunately it doesn't work, the functions of my derived class are not called when a row is dragged.
Am I missing something important?
How should I implement drag and drop in TreeView?
Thanks in advance. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
|
Back to top |
|
|
skirino
Joined: 17 Jun 2010 Posts: 4
|
Posted: Sat Jun 19, 2010 11:13 pm Post subject: |
|
|
Thanks to the reply, now I understand (to some extent) the difficulty to bridge the gap between D's interfaces and GObject's interfaces.
I tried in many ways but the implementation in TreeModel.d is probably not directly applicable to my purpose (to override ListStore's methods that belong to TreeDragDestIF and TreeDragSourceIF).
In the meantime I need to learn about the type system of GObject and how vtables for interfaces are treated internally. |
|
Back to top |
|
|
|