gtk4::prelude

Trait TreeDragSourceExt

Source
pub trait TreeDragSourceExt:
    IsA<TreeDragSource>
    + Sealed
    + 'static {
    // Provided methods
    fn drag_data_delete(&self, path: &TreePath) -> bool { ... }
    fn drag_data_get(&self, path: &TreePath) -> Option<ContentProvider> { ... }
    fn row_draggable(&self, path: &TreePath) -> bool { ... }
}
👎Deprecated: Since 4.10
Expand description

Trait containing all TreeDragSource methods.

§Implementors

ListStore, TreeDragSource, TreeModelFilter, TreeModelSort, TreeStore

Provided Methods§

Source

fn drag_data_delete(&self, path: &TreePath) -> bool

👎Deprecated: Since 4.10

Asks the TreeDragSource to delete the row at @path, because it was moved somewhere else via drag-and-drop. Returns false if the deletion fails because @path no longer exists, or for some model-specific reason. Should robustly handle a @path no longer found in the model!

§Deprecated since 4.10

Use list models instead

§path

row that was being dragged

§Returns

true if the row was successfully deleted

Source

fn drag_data_get(&self, path: &TreePath) -> Option<ContentProvider>

👎Deprecated: Since 4.10

Asks the TreeDragSource to return a gdk::ContentProvider representing the row at @path. Should robustly handle a @path no longer found in the model!

§Deprecated since 4.10

Use list models instead

§path

row that was dragged

§Returns

a gdk::ContentProvider for the given @path

Source

fn row_draggable(&self, path: &TreePath) -> bool

👎Deprecated: Since 4.10

Asks the TreeDragSource whether a particular row can be used as the source of a DND operation. If the source doesn’t implement this interface, the row is assumed draggable.

§Deprecated since 4.10

Use list models instead

§path

row on which user is initiating a drag

§Returns

true if the row can be dragged

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§