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 debug;
12pub mod dragout;
13pub mod external;
14pub mod files;
15pub mod grid;
16pub mod multiselect;
17pub mod sortable;
18pub mod test;
19pub mod tree;
20
21/// One-stop import: `use dioxus_dnd::prelude::*;`
22pub mod prelude {
23    pub use crate::a11y::{LiveRegion, ReorderButtons};
24    pub use crate::animate::FlipItem;
25    pub use crate::autoscroll::{edge_delta, AutoScroll, ScrollAxis};
26    pub use crate::board::{
27        apply_move, BoardColumn, BoardItem, BoardPayload, BoardSlot, ContainerId, MoveEvent,
28    };
29    pub use crate::canvas::{
30        canvas_keyboard_pointer, canvas_position, canvas_to_client, client_to_canvas, Bounds,
31        CanvasDrop, CanvasDropZone, CanvasKeyboardPlacement, SnapGrid,
32    };
33    pub use crate::core::{
34        apply_clone_or_move, apply_list_clone_or_move, apply_modifiers, client_point, edge_of,
35        effective_effect, element_point, screen_delta_to_world, screen_to_world, transition,
36        use_dnd, use_dnd_provider, use_dnd_strings, use_rect_refresh, use_zone_id,
37        use_zone_registry, world_delta_to_screen, world_to_screen, BridgeDropZone, CanvasViewport,
38        Direction, DndContext, DndProvider, DndStrings, DragId, DragMode, DragModifier,
39        DragOverlay, DragState, Draggable, DropEffect, DropOutcome, DropZone, Edge, EdgeSet,
40        GestureEffect, GestureEvent, GesturePhase, ModifierCtx, ParentZone, Point, Rect,
41        RectRefresh, ZoneId, ZoneRecord, ZoneRegistry,
42    };
43    pub use crate::debug::DndDebugOverlay;
44    pub use crate::dragout::{ExternalDragSource, OutboundContent};
45    pub use crate::external::{classify, ExternalDrop, ExternalDropZone, ExternalPayload};
46    pub use crate::files::{FileDrop, FileDropZone, FileFilter, FileRejection};
47    pub use crate::grid::{cell_of, index_of, SortableGrid};
48    pub use crate::multiselect::{use_selection, SelectableDraggable, Selection, SelectionCount};
49    pub use crate::sortable::{
50        apply_sort, apply_swap, displacement, Axis, ReorderMode, SortEvent, SortableList,
51    };
52    pub use crate::tree::{
53        intent_from_offset, would_create_cycle, DropIntent, NodeId, TreeDropEvent, TreeNodeTarget,
54    };
55}