[API] Dear ImGui v1.86 (#102)

This commit is contained in:
SpaiR authored and GitHub committed 2021-12-26 16:00:21 +02:00
1 parent dcf0dea9f3
commit e972af840e
7 files changed
+30 -29

No files matched your search

+7 -7
View File
@@ -5520,13 +5520,6 @@ public class ImGui {
return (intptr_t)ImGui::GetStateStorage(); return (intptr_t)ImGui::GetStateStorage();
*/ */
/**
* Calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can.
*/
public static native void calcListClipping(int itemCount, float itemsHeight, int[] outItemsDisplayStart, int[] outItemsDisplayEnd); /*
ImGui::CalcListClipping(itemCount, itemsHeight, &outItemsDisplayStart[0], &outItemsDisplayEnd[0]);
*/
/** /**
* Helper to create a child window / scrolling region that looks like a normal widget frame * Helper to create a child window / scrolling region that looks like a normal widget frame
*/ */
@@ -5714,6 +5707,13 @@ public class ImGui {
return ImGui::IsMouseDoubleClicked(button); return ImGui::IsMouseDoubleClicked(button);
*/ */
/**
* Return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
*/
public static native int getMouseClickedCount(int button); /*
return ImGui::GetMouseClickedCount(button);
*/
/** /**
* Did mouse button released (went from Down to !Down) * Did mouse button released (went from Down to !Down)
*/ */
@@ -593,6 +593,20 @@ public final class ImGuiIO extends ImGuiStruct {
IO->ConfigDockingNoSplit = value; IO->ConfigDockingNoSplit = value;
*/ */
/**
* Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
*/
public native boolean getConfigDockingWithShift(); /*
return IO->ConfigDockingWithShift;
*/
/**
* Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
*/
public native void setConfigDockingWithShift(boolean value); /*
IO->ConfigDockingWithShift = value;
*/
/** /**
* [BETA] [FIXME: This currently creates regression with auto-sizing and general overhead] * [BETA] [FIXME: This currently creates regression with auto-sizing and general overhead]
* Make every single floating window display within a docking node. * Make every single floating window display within a docking node.
@@ -21,6 +21,7 @@ import imgui.callback.ImListClipperCallback;
* - Clipper can measure the height of the first element * - Clipper can measure the height of the first element
* - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. * - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
* - User code submit visible elements. * - User code submit visible elements.
* - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
* <p> * <p>
* BINDING NOTICE: * BINDING NOTICE:
* It's impossible to implement the same API like in the original. Method {@link #forEach(int, int, ImListClipperCallback)} could be used instead. * It's impossible to implement the same API like in the original. Method {@link #forEach(int, int, ImListClipperCallback)} could be used instead.
@@ -160,19 +160,19 @@ public final class ImGui extends imgui.ImGui {
// Widgets low-level behaviors // Widgets low-level behaviors
public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2) { public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2) {
return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, 0, 0); return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, 0, 0, 0);
} }
public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, float hoverExtend) { public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, float hoverExtend) {
return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, hoverExtend, 0); return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, hoverExtend, 0, 0);
} }
public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay) { public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay, int bgCol) {
return nSplitterBehaviour(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1.getData(), size2.getData(), minSize1, minSize2, hoverExtend, hoverVisibilityDelay); return nSplitterBehaviour(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1.getData(), size2.getData(), minSize1, minSize2, hoverExtend, hoverVisibilityDelay, bgCol);
} }
private static native boolean nSplitterBehaviour(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, float[] size1, float[] size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay); /* private static native boolean nSplitterBehaviour(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, float[] size1, float[] size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay, int bgCol); /*
return ImGui::SplitterBehavior(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), id, (ImGuiAxis)imGuiAxis, &size1[0], &size2[0], minSize1, minSize2, hoverExtend, hoverVisibilityDelay); return ImGui::SplitterBehavior(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), id, (ImGuiAxis)imGuiAxis, &size1[0], &size2[0], minSize1, minSize2, hoverExtend, hoverVisibilityDelay, bgCol);
*/ */
public static ImGuiWindow getCurrentWindow() { public static ImGuiWindow getCurrentWindow() {
@@ -616,20 +616,6 @@ public final class ImGuiDockNode extends ImGuiStruct {
IMGUI_DOCK_NODE->WantHiddenTabBarToggle = wantHiddenTabBarToggle; IMGUI_DOCK_NODE->WantHiddenTabBarToggle = wantHiddenTabBarToggle;
*/ */
/**
* Update by DockNodeTreeUpdatePosSize() write-filtering
*/
public native boolean getMarkedForPosSizeWrite(); /*
return IMGUI_DOCK_NODE->MarkedForPosSizeWrite;
*/
/**
* Update by DockNodeTreeUpdatePosSize() write-filtering
*/
public native void setMarkedForPosSizeWrite(boolean markedForPosSizeWrite); /*
IMGUI_DOCK_NODE->MarkedForPosSizeWrite = markedForPosSizeWrite;
*/
public native boolean isRootNode(); /* public native boolean isRootNode(); /*
return IMGUI_DOCK_NODE->IsRootNode(); return IMGUI_DOCK_NODE->IsRootNode();
*/ */
+1 -1
View File
@@ -29,7 +29,7 @@
//#define IMGUI_API __declspec( dllimport ) //#define IMGUI_API __declspec( dllimport )
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names. //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS #define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//---- Disable all of Dear ImGui or don't implement standard windows. //---- Disable all of Dear ImGui or don't implement standard windows.
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp. // It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.