pub struct ContainerDragEvent {
pub window_id: u8,
pub backing: ContainerBacking,
pub affected_slots: Vec<(i16, Slot)>,
pub drag_type: DragType,
pub cursor: Slot,
pub cancelled: bool,
}Expand description
Fires BEFORE a drag (paint mode) distribution is applied.
Cancellable – plugins can prevent drag within GUIs. Fires during the Validate stage.
Fields§
§window_id: u8Window ID of the open container.
backing: ContainerBackingHow the container is backed.
affected_slots: Vec<(i16, Slot)>Slots affected by the drag (protocol slot index + planned result).
drag_type: DragTypeDrag type (left/right/middle).
cursor: SlotCursor item before distribution.
cancelled: boolWhether the event has been cancelled.
Trait Implementations§
Source§impl Clone for ContainerDragEvent
impl Clone for ContainerDragEvent
Source§fn clone(&self) -> ContainerDragEvent
fn clone(&self) -> ContainerDragEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerDragEvent
impl Debug for ContainerDragEvent
Source§impl Event for ContainerDragEvent
impl Event for ContainerDragEvent
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether this event has been cancelled by a Validate handler.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Upcasts to
&mut dyn Any for mutable type-erased dispatch.Source§impl EventRouting for ContainerDragEvent
impl EventRouting for ContainerDragEvent
Auto Trait Implementations§
impl Freeze for ContainerDragEvent
impl RefUnwindSafe for ContainerDragEvent
impl Send for ContainerDragEvent
impl Sync for ContainerDragEvent
impl Unpin for ContainerDragEvent
impl UnsafeUnpin for ContainerDragEvent
impl UnwindSafe for ContainerDragEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more