Add visual feedback to Drag'n Drop operation

17 views
Skip to first unread message

Manolo

unread,
Sep 12, 2020, 10:09:06 AM9/12/20
to fltk.coredev

I'd like to suggest to add a small new feature to FLTK 1.4, the possibility
to use an Fl_RGB_Image as visual feedback for the drag-n-drop operation.
The intention is to produce an image that evokes what is being dragged.

API:
Fl::dnd(Fl_RGB_Image *rgb = NULL)
which extends the previous API Fl::dnd(void)

As a demo, I have modified test/editor.cxx to call this new API
after drawing in an image the start of the text being dragged.

That's all in attached "dnd.patch".

This would solve the request expressed in "Making a draggable item" of fltk.general.
dnd.patch

Gonzalo Garramuño

unread,
Sep 12, 2020, 3:54:52 PM9/12/20
to fltkc...@googlegroups.com

El 12/9/20 a las 11:09, Manolo escribió:
>
> As a demo, I have modified test/editor.cxx to call this new API
> after drawing in an image the start of the text being dragged.

It isn't clear to me how this should work.  I drag an image from
anywhere?  From the editor itself?

I cannot get it to work on Linux.  Also, what happens with text dnd?

Gonzalo Garramuño

unread,
Sep 12, 2020, 4:01:34 PM9/12/20
to fltkc...@googlegroups.com

El 12/9/20 a las 16:54, Gonzalo Garramuño escribió:
Never mind.  I was testing the old editor not realizing the layout for
binaries had changed.
Reply all
Reply to author
Forward
0 new messages