nana::dragdrop

Defined in header <nana/gui/dragdrop.hpp>
class dragdrop;

The class dragdrop provides support of drag-and-drop operation. Unlike class simple_dragdrop, the dragdrop can transfer data between different processes.

The data to be transferred by the drag-and-drop operation is contained in a dragdrop::data object. The dragdrop::data object is created in a user-defined function in following way:

dragdrop dnd{fm};
dnd.prepare_data([]{
	dragdrop::data data;
	data.insert(std::filesystem::path{"/home/me/file.txt"}); //full path
	return data;
});

Unlike class simple_dragdrop, class dragdrop didn't need a target. When user presses the left mouse button and drags the mouse, the class dragdrop prepares the data to be transferred.

Member types

Member functions

See also