@@ -50,6 +50,7 @@ public final class ImGui {
50
50
ImFontGlyph .nInit ();
51
51
ImFont .nInit ();
52
52
ImGuiStyle .nInit ();
53
+ ImGuiWindowClass .nInit ();
53
54
nInitInputTextData ();
54
55
}
55
56
@@ -474,6 +475,13 @@ public static ImDrawList getWindowDrawList() {
474
475
return (intptr_t)ImGui::GetWindowDrawList();
475
476
*/
476
477
478
+ /**
479
+ * Get DPI scale currently associated to the current window's viewport.
480
+ */
481
+ public static native float getWindowDpiScale (); /*
482
+ return ImGui::GetWindowDpiScale();
483
+ */
484
+
477
485
/**
478
486
* Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
479
487
*/
@@ -3989,6 +3997,7 @@ public static boolean beginPopupModal(String name, ImBool pOpen, int imGuiWindow
3989
3997
*/
3990
3998
3991
3999
// Tab Bars, Tabs
4000
+ // Note: Tabs are automatically created by the docking system. Use this to create tab bars/tabs yourself without docking being involved.
3992
4001
3993
4002
/**
3994
4003
* Create and append into a TabBar
@@ -4062,6 +4071,73 @@ public static boolean beginTabItem(String label, ImBool pOpen, int imGuiTabBarFl
4062
4071
ImGui::SetTabItemClosed(tabOrDockedWindowLabel);
4063
4072
*/
4064
4073
4074
+ // Docking
4075
+ // [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
4076
+ // Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
4077
+ // - To dock windows: if io.ConfigDockingWithShift == false (default) drag window from their title bar.
4078
+ // - To dock windows: if io.ConfigDockingWithShift == true: hold SHIFT anywhere while moving windows.
4079
+ // About DockSpace:
4080
+ // - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
4081
+ // - DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app.
4082
+
4083
+ public static void dockSpace (int imGuiID ) {
4084
+ nDockSpace (imGuiID , 0 , 0 , 0 , 0 );
4085
+ }
4086
+
4087
+ public static void dockSpace (int imGuiID , float sizeX , float sizeY ) {
4088
+ nDockSpace (imGuiID , sizeX , sizeY , 0 , 0 );
4089
+ }
4090
+
4091
+ public static void dockSpace (int imGuiID , float sizeX , float sizeY , int imGuiDockNodeFlags ) {
4092
+ nDockSpace (imGuiID , sizeX , sizeY , imGuiDockNodeFlags , 0 );
4093
+ }
4094
+
4095
+ public static void dockSpace (int imGuiID , float sizeX , float sizeY , int imGuiDockNodeFlags , ImGuiWindowClass imGuiWindowClass ) {
4096
+ nDockSpace (imGuiID , sizeX , sizeY , imGuiDockNodeFlags , imGuiWindowClass .ptr );
4097
+ }
4098
+
4099
+ private static native void nDockSpace (int imGuiID , float sizeX , float sizeY , int imGuiDockNodeFlags , long windowClassPtr ); /*
4100
+ ImGui::DockSpace(imGuiID, ImVec2(sizeX, sizeY), imGuiDockNodeFlags, windowClassPtr != 0 ? (ImGuiWindowClass*)windowClassPtr : NULL);
4101
+ */
4102
+
4103
+ // TODO: DockSpaceOverViewport
4104
+
4105
+ /**
4106
+ * Set next window dock id
4107
+ */
4108
+ public static native void setNextWindowDockID (int dockId ); /*
4109
+ ImGui::SetNextWindowDockID(dockId);
4110
+ */
4111
+
4112
+ /**
4113
+ * Set next window dock id
4114
+ */
4115
+ public static native void setNextWindowDockID (int dockId , int imGuiCond ); /*
4116
+ ImGui::SetNextWindowDockID(dockId, imGuiCond);
4117
+ */
4118
+
4119
+ /**
4120
+ * set next window class (rare/advanced uses: provide hints to the platform back-end via altered viewport flags and parent/child info)
4121
+ */
4122
+ public static void setNextWindowClass (ImGuiWindowClass windowClass ) {
4123
+ nSetNextWindowClass (windowClass .ptr );
4124
+ }
4125
+
4126
+ private static native void nSetNextWindowClass (long windowClassPtr ); /*
4127
+ ImGui::SetNextWindowClass((ImGuiWindowClass*)windowClassPtr);
4128
+ */
4129
+
4130
+ public static native int getWindowDockID (); /*
4131
+ return ImGui::GetWindowDockID();
4132
+ */
4133
+
4134
+ /**
4135
+ * Is current window docked into another window?
4136
+ */
4137
+ public static native boolean isWindowDocked (); /*
4138
+ return ImGui::IsWindowDocked();
4139
+ */
4140
+
4065
4141
// Logging/Capture
4066
4142
// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
4067
4143
@@ -4432,6 +4508,7 @@ public static byte[] acceptDragDropPayload(String type, int imGuiDragDropFlags)
4432
4508
*/
4433
4509
4434
4510
/**
4511
+ * Get background draw list for the viewport associated to the current window.
4435
4512
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
4436
4513
*/
4437
4514
public static ImDrawList getBackgroundDrawList () {
@@ -4446,7 +4523,8 @@ public static ImDrawList getBackgroundDrawList() {
4446
4523
*/
4447
4524
4448
4525
/**
4449
- * This draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
4526
+ * Get foreground draw list for the viewport associated to the current window.
4527
+ * This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
4450
4528
*/
4451
4529
public static ImDrawList getForegroundDrawList () {
4452
4530
if (foregroundDrawList == null ) {
0 commit comments