CairoDrag
An unofficial drag-and-drop implementation for cairo-rs and gtk4.
Drag-and-drop interfaces are useful in many places, and Rust's GTK 4 bindings have some support for them. However, there are some cases in which GTK's drag-and-drop is not sufficient, requiring the use of Cairo, its drawing library. Unfortunately, Cairo does not have drag-and-drop support by default. This crate adds this functionality. Read the documentation and the examples (found in the repository) to get started.
License: BSD 3-Clause
This basically means that you can do whatever you want as long as you give me attribution and you don't remove the license notices or use my name to endorse stuff I don't. Read the actual license for details though.
Changes
0.1.0
- Initial release.
0.1.1
- Change
DragArea::push_(box|rc|rc_ref_cell)to&selfinstead of&mut selfsince they only rely on interior mutability internally.
0.1.2
- Make
DragAreaoptionally scrollable. UseDragArea::new_scrollableinstead ofnewto construct a scrollableDragArea. - Add
on_(double|middle|right)_clickmethods toDraggablefor handling mouse clicks on specific draggable objects. - Add
retainmethod toDraggableto allow for removal of objects from theirDragArea.