Drag and Drop: Exposed some internals.

features/sdl_renderer3_multiviewports
omar ago%!(EXTRA string=8 years)
parent 90788a1242
commit 8b59ed0708
  1. 9
      imgui.cpp
  2. 2
      imgui_internal.h

@ -673,7 +673,6 @@ static bool DataTypeApplyOpFromText(const char* buf, const char* ini
namespace ImGui namespace ImGui
{ {
static void ClearDragDrop();
static void FocusPreviousWindow(); static void FocusPreviousWindow();
} }
@ -11151,7 +11150,7 @@ void ImGui::Value(const char* prefix, float v, const char* float_format)
// DRAG AND DROP // DRAG AND DROP
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void ImGui::ClearDragDrop() void ImGui::ClearDragDrop()
{ {
ImGuiContext& g = *GImGui; ImGuiContext& g = *GImGui;
g.DragDropActive = false; g.DragDropActive = false;
@ -11340,6 +11339,12 @@ bool ImGui::BeginDragDropTarget()
return true; return true;
} }
bool ImGui::IsDragDropPayloadBeingAccepted()
{
ImGuiContext& g = *GImGui;
return g.DragDropActive && g.DragDropAcceptIdPrev != 0;
}
const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags) const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags)
{ {
ImGuiContext& g = *GImGui; ImGuiContext& g = *GImGui;

@ -873,6 +873,8 @@ namespace ImGui
IMGUI_API bool SplitterBehavior(ImGuiID id, const ImRect& bb, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f); IMGUI_API bool SplitterBehavior(ImGuiID id, const ImRect& bb, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f);
IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id); IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id);
IMGUI_API void ClearDragDrop();
IMGUI_API bool IsDragDropPayloadBeingAccepted();
// FIXME-WIP: New Columns API // FIXME-WIP: New Columns API
IMGUI_API void BeginColumns(const char* id, int count, ImGuiColumnsFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns(). IMGUI_API void BeginColumns(const char* id, int count, ImGuiColumnsFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().

Loading…
Cancel
Save