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