Skip to main content

dioxus_dnd/
lib.rs

1#![doc = include_str!("../README.md")]
2#![allow(non_snake_case)]
3
4pub mod core;
5
6pub mod a11y;
7pub mod animate;
8pub mod autoscroll;
9pub mod board;
10pub mod canvas;
11pub mod dragout;
12pub mod external;
13pub mod files;
14pub mod grid;
15pub mod multiselect;
16pub mod sortable;
17pub mod tree;
18
19/// One-stop import: `use dioxus_dnd::prelude::*;`
20pub mod prelude {
21    pub use crate::a11y::{LiveRegion, ReorderButtons};
22    pub use crate::animate::FlipItem;
23    pub use crate::autoscroll::{edge_delta, AutoScroll, ScrollAxis};
24    pub use crate::board::{
25        apply_move, BoardColumn, BoardItem, BoardPayload, BoardSlot, ContainerId, MoveEvent,
26    };
27    pub use crate::canvas::{
28        canvas_keyboard_pointer, canvas_position, canvas_to_client, client_to_canvas, Bounds,
29        CanvasDrop, CanvasDropZone, CanvasKeyboardPlacement, SnapGrid,
30    };
31    pub use crate::core::{
32        apply_clone_or_move, apply_list_clone_or_move, apply_modifiers, client_point,
33        effective_effect, element_point, screen_delta_to_world, screen_to_world, transition,
34        use_dnd, use_dnd_provider, use_rect_refresh, use_zone_id, use_zone_registry,
35        world_delta_to_screen, world_to_screen, CanvasViewport, Direction, DndContext,
36        DndProvider, DragId, DragMode, DragModifier, DragOverlay, DragState, Draggable,
37        DropEffect, DropOutcome, DropZone, GestureEffect, GestureEvent, GesturePhase, ModifierCtx,
38        ParentZone, Point, Rect, RectRefresh, ZoneId, ZoneRecord, ZoneRegistry,
39    };
40    pub use crate::dragout::{ExternalDragSource, OutboundContent};
41    pub use crate::external::{classify, ExternalDrop, ExternalDropZone, ExternalPayload};
42    pub use crate::files::{FileDrop, FileDropZone, FileFilter, FileRejection};
43    pub use crate::grid::{cell_of, index_of, SortableGrid};
44    pub use crate::multiselect::{use_selection, SelectableDraggable, Selection, SelectionCount};
45    pub use crate::sortable::{
46        apply_sort, apply_swap, displacement, Axis, ReorderMode, SortEvent, SortableList,
47    };
48    pub use crate::tree::{
49        intent_from_offset, would_create_cycle, DropIntent, NodeId, TreeDropEvent, TreeNodeTarget,
50    };
51}