From 74ba0bec360cc64ac466712a42b25b851b53acdb Mon Sep 17 00:00:00 2001 From: dbr Date: Thu, 11 Feb 2021 13:46:26 +1100 Subject: [PATCH] imgui::legacy::ImGuiDragDropFlags has already been modernised Has been available at imgui::drag_drop::DragDropFlags since implemented --- imgui/src/legacy.rs | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/imgui/src/legacy.rs b/imgui/src/legacy.rs index 0b34f47..79c6bf7 100644 --- a/imgui/src/legacy.rs +++ b/imgui/src/legacy.rs @@ -4,45 +4,6 @@ use std::os::raw::c_int; use crate::widget::tree::TreeNodeFlags; -bitflags!( - /// Flags for igBeginDragDropSource(), igAcceptDragDropPayload() - #[repr(C)] - pub struct ImGuiDragDropFlags: c_int { - /// By default, a successful call to igBeginDragDropSource opens a tooltip so you can - /// display a preview or description of the source contents. This flag disable this - /// behavior. - const SourceNoPreviewTooltip = 1; - /// By default, when dragging we clear data so that igIsItemHovered() will return false, to - /// avoid subsequent user code submitting tooltips. This flag disable this behavior so you - /// can still call igIsItemHovered() on the source item. - const SourceNoDisableHover = 1 << 1; - /// Disable the behavior that allows to open tree nodes and collapsing header by holding - /// over them while dragging a source item. - const SourceNoHoldToOpenOthers = 1 << 2; - /// Allow items such as igText(), igImage() that have no unique identifier to be used as - /// drag source, by manufacturing a temporary identifier based on their window-relative - /// position. This is extremely unusual within the dear imgui ecosystem and so we made it - /// explicit. - const SourceAllowNullID = 1 << 3; - /// External source (from outside of imgui), won't attempt to read current item/window - /// info. Will always return true. Only one Extern source can be active simultaneously. - const SourceExtern = 1 << 4; - /// Automatically expire the payload if the source cease to be submitted (otherwise - /// payloads are persisting while being dragged) - const SourceAutoExpirePayload = 1 << 5; - /// igAcceptDragDropPayload() will returns true even before the mouse button is released. - /// You can then call igIsDelivery() to test if the payload needs to be delivered. - const AcceptBeforeDelivery = 1 << 10; - /// Do not draw the default highlight rectangle when hovering over target. - const AcceptNoDrawDefaultRect = 1 << 11; - /// Request hiding the igBeginDragDropSource tooltip from the igBeginDragDropTarget site. - const AcceptNoPreviewTooltip = 1 << 12; - /// For peeking ahead and inspecting the payload before delivery. - const AcceptPeekOnly = ImGuiDragDropFlags::AcceptBeforeDelivery.bits - | ImGuiDragDropFlags::AcceptNoDrawDefaultRect.bits; - } -); - bitflags!( /// Flags for indictating which corner of a rectangle should be rounded #[repr(C)]