From 33309088a2aa48906a1cb56f720e441cb2a0b18d Mon Sep 17 00:00:00 2001 From: SpaiR Date: Sat, 23 Jan 2021 20:02:42 +0200 Subject: [PATCH] [API] Dear ImGui v1.80 --- .../src/main/java/imgui/ImDrawList.java | 60 +- .../src/main/java/imgui/ImFontAtlas.java | 2 +- imgui-binding/src/main/java/imgui/ImGui.java | 588 ++++++++++++------ .../src/main/java/imgui/ImGuiIO.java | 72 ++- .../src/main/java/imgui/ImGuiPlatformIO.java | 114 ++-- .../src/main/java/imgui/ImGuiStyle.java | 33 +- .../src/main/java/imgui/ImGuiViewport.java | 12 +- .../src/main/java/imgui/ImGuiWindowClass.java | 28 +- .../main/java/imgui/flag/ImDrawListFlags.java | 2 +- .../java/imgui/flag/ImGuiBackendFlags.java | 18 +- .../src/main/java/imgui/flag/ImGuiCol.java | 34 +- .../java/imgui/flag/ImGuiConfigFlags.java | 12 +- .../java/imgui/flag/ImGuiKeyModFlags.java | 2 +- .../main/java/imgui/flag/ImGuiNavInput.java | 4 +- .../java/imgui/flag/ImGuiSortDirection.java | 19 + .../main/java/imgui/flag/ImGuiStyleVar.java | 20 +- .../java/imgui/flag/ImGuiTableBgTarget.java | 31 + .../imgui/flag/ImGuiTableColumnFlags.java | 94 +++ .../main/java/imgui/flag/ImGuiTableFlags.java | 184 ++++++ .../java/imgui/flag/ImGuiTableRowFlags.java | 15 + .../java/imgui/flag/ImGuiViewportFlags.java | 2 +- 21 files changed, 1016 insertions(+), 330 deletions(-) create mode 100644 imgui-binding/src/main/java/imgui/flag/ImGuiSortDirection.java create mode 100644 imgui-binding/src/main/java/imgui/flag/ImGuiTableBgTarget.java create mode 100644 imgui-binding/src/main/java/imgui/flag/ImGuiTableColumnFlags.java create mode 100644 imgui-binding/src/main/java/imgui/flag/ImGuiTableFlags.java create mode 100644 imgui-binding/src/main/java/imgui/flag/ImGuiTableRowFlags.java diff --git a/imgui-binding/src/main/java/imgui/ImDrawList.java b/imgui-binding/src/main/java/imgui/ImDrawList.java index 4ccec40..59e80c5 100644 --- a/imgui-binding/src/main/java/imgui/ImDrawList.java +++ b/imgui-binding/src/main/java/imgui/ImDrawList.java @@ -277,12 +277,32 @@ public final class ImDrawList extends ImGuiStruct { IM_DRAW_LIST->AddConvexPolyFilled(_points, numPoints, col); */ - public native void addBezierCurve(float p1X, float p1Y, float p2X, float p2Y, float p3X, float p3Y, float p4X, float p4Y, int col, float thickness); /* - IM_DRAW_LIST->AddBezierCurve(ImVec2(p1X, p1Y), ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), ImVec2(p4X, p4Y), col, thickness); + /** + * Cubic Bezier (4 control points) + */ + public native void addBezierCubic(float p1X, float p1Y, float p2X, float p2Y, float p3X, float p3Y, float p4X, float p4Y, int col, float thickness); /* + IM_DRAW_LIST->AddBezierCubic(ImVec2(p1X, p1Y), ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), ImVec2(p4X, p4Y), col, thickness); */ - public native void addBezierCurve(float p1X, float p1Y, float p2X, float p2Y, float p3X, float p3Y, float p4X, float p4Y, int col, float thickness, int numSegments); /* - IM_DRAW_LIST->AddBezierCurve(ImVec2(p1X, p1Y), ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), ImVec2(p4X, p4Y), col, thickness, numSegments); + /** + * Cubic Bezier (4 control points) + */ + public native void addBezierCubic(float p1X, float p1Y, float p2X, float p2Y, float p3X, float p3Y, float p4X, float p4Y, int col, float thickness, int numSegments); /* + IM_DRAW_LIST->AddBezierCubic(ImVec2(p1X, p1Y), ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), ImVec2(p4X, p4Y), col, thickness, numSegments); + */ + + /** + * Quadratic Bezier (3 control points) + */ + public native void addBezierQuadratic(float p1X, float p1Y, float p2X, float p2Y, float p3X, float p3Y, int col, float thickness); /* + IM_DRAW_LIST->AddBezierQuadratic(ImVec2(p1X, p1Y), ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), col, thickness); + */ + + /** + * Quadratic Bezier (3 control points) + */ + public native void addBezierQuadratic(float p1X, float p1Y, float p2X, float p2Y, float p3X, float p3Y, int col, float thickness, int numSegments); /* + IM_DRAW_LIST->AddBezierQuadratic(ImVec2(p1X, p1Y), ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), col, thickness, numSegments); */ // Image primitives @@ -373,13 +393,39 @@ public final class ImDrawList extends ImGuiStruct { IM_DRAW_LIST->PathArcTo(ImVec2(centerX, centerY), radius, aMin, aMax, numSegments); */ - // Use precomputed angles for a 12 steps circle + /** + * Use precomputed angles for a 12 steps circle + */ public native void pathArcToFast(float centerX, float centerY, float radius, int aMinOf12, int aMaxOf12); /* IM_DRAW_LIST->PathArcToFast(ImVec2(centerX, centerY), radius, aMinOf12, aMaxOf12); */ - public native void pathBezierCurveTo(float p2X, float p2Y, float p3X, float p3Y, float p4X, float p4Y, int numSegments); /* - IM_DRAW_LIST->PathBezierCurveTo(ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), ImVec2(p4X, p4Y), numSegments); + /** + * Cubic Bezier (4 control points) + */ + public native void pathBezierCubicCurveTo(float p2X, float p2Y, float p3X, float p3Y, float p4X, float p4Y); /* + IM_DRAW_LIST->PathBezierCubicCurveTo(ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), ImVec2(p4X, p4Y)); + */ + + /** + * Cubic Bezier (4 control points) + */ + public native void pathBezierCubicCurveTo(float p2X, float p2Y, float p3X, float p3Y, float p4X, float p4Y, int numSegments); /* + IM_DRAW_LIST->PathBezierCubicCurveTo(ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), ImVec2(p4X, p4Y), numSegments); + */ + + /** + * Quadratic Bezier (3 control points) + */ + public native void pathBezierQuadraticCurveTo(float p2X, float p2Y, float p3X, float p3Y); /* + IM_DRAW_LIST->PathBezierQuadraticCurveTo(ImVec2(p2X, p2Y), ImVec2(p3X, p3Y)); + */ + + /** + * Quadratic Bezier (3 control points) + */ + public native void pathBezierQuadraticCurveTo(float p2X, float p2Y, float p3X, float p3Y, int numSegments); /* + IM_DRAW_LIST->PathBezierQuadraticCurveTo(ImVec2(p2X, p2Y), ImVec2(p3X, p3Y), numSegments); */ public native void pathRect(float rectMinX, float rectMinY, float rectMaxX, float rectMaxY); /* diff --git a/imgui-binding/src/main/java/imgui/ImFontAtlas.java b/imgui-binding/src/main/java/imgui/ImFontAtlas.java index a114381..2fd57c0 100644 --- a/imgui-binding/src/main/java/imgui/ImFontAtlas.java +++ b/imgui-binding/src/main/java/imgui/ImFontAtlas.java @@ -410,7 +410,7 @@ public final class ImFontAtlas extends ImGuiStructDestroyable { */ /** - * Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs + * Default + Hiragana, Katakana, Half-Width, Selection of 2999 Ideographs */ public native short[] getGlyphRangesJapanese(); /* RETURN_GLYPH_2_SHORT(IM_FONT_ATLAS->GetGlyphRangesJapanese()); diff --git a/imgui-binding/src/main/java/imgui/ImGui.java b/imgui-binding/src/main/java/imgui/ImGui.java index 532b5c7..416954a 100644 --- a/imgui-binding/src/main/java/imgui/ImGui.java +++ b/imgui-binding/src/main/java/imgui/ImGui.java @@ -190,9 +190,7 @@ public class ImGui { */ /** - * Ends the Dear ImGui frame, finalize the draw data. - * You can get call GetDrawData() to obtain it and run your rendering function (up to v1.60, this used to call io.RenderDrawListsFn(). - * Nowadays, we allow and prefer calling your render function yourself.) + * Ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData(). */ public static native void render(); /* ImGui::Render(); @@ -215,8 +213,7 @@ public class ImGui { // Demo, Debug, Information /** - * Create Demo window (previously called ShowTestWindow). demonstrate most ImGui features. - * Call this to learn about the library! + * Create Demo window. Demonstrate most ImGui features. Call this to learn about the library! */ public static native void showDemoWindow(); /* ImGui::ShowDemoWindow(); @@ -230,6 +227,24 @@ public class ImGui { ImGui::ShowDemoWindow(&pOpen[0]); */ + /** + * Create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc. + */ + public static void showMetricsWindow(ImBoolean pOpen) { + nShowMetricsWindow(pOpen.getData()); + } + + /** + * Create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc. + */ + public static native void showMetricsWindow(); /* + ImGui::ShowMetricsWindow(); + */ + + private static native void nShowMetricsWindow(boolean[] pOpen); /* + ImGui::ShowMetricsWindow(&pOpen[0]); + */ + /** * Create About window. display Dear ImGui version, credits and build/system information. */ @@ -245,26 +260,6 @@ public class ImGui { ImGui::ShowAboutWindow(&pOpen[0]); */ - /** - * Create Debug/Metrics window. - * Display Dear ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc. - */ - public static native void showMetricsWindow(); /* - ImGui::ShowMetricsWindow(); - */ - - /** - * Create Debug/Metrics window. - * Display Dear ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc. - */ - public static void showMetricsWindow(ImBoolean pOpen) { - nShowMetricsWindow(pOpen.getData()); - } - - private static native void nShowMetricsWindow(boolean[] pOpen); /* - ImGui::ShowMetricsWindow(&pOpen[0]); - */ - /** * Add style editor block (not a window). * You can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style) @@ -303,7 +298,7 @@ public class ImGui { */ /** - * Get the compiled version string e.g. "1.23" (essentially the compiled value for IMGUI_VERSION) + * Get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the compiled version of imgui.cpp) */ public static native String getVersion(); /* return env->NewStringUTF(ImGui::GetVersion()); @@ -318,27 +313,12 @@ public class ImGui { ImGui::StyleColorsDark(); */ - public static void styleColorsDark(ImGuiStyle ref) { - nStyleColorsDark(ref.ptr); + public static void styleColorsDark(ImGuiStyle style) { + nStyleColorsDark(style.ptr); } - private static native void nStyleColorsDark(long ref); /* - ImGui::StyleColorsDark((ImGuiStyle*)ref); - */ - - /** - * Classic imgui style - */ - public static native void styleColorsClassic(); /* - ImGui::StyleColorsClassic(); - */ - - public static void styleColorsClassic(ImGuiStyle ref) { - nStyleColorsClassic(ref.ptr); - } - - private static native void nStyleColorsClassic(long ref); /* - ImGui::StyleColorsClassic((ImGuiStyle*)ref); + private static native void nStyleColorsDark(long ptr); /* + ImGui::StyleColorsDark((ImGuiStyle*)ptr); */ /** @@ -348,12 +328,27 @@ public class ImGui { ImGui::StyleColorsLight(); */ - public static void styleColorsLight(ImGuiStyle ref) { - nStyleColorsLight(ref.ptr); + public static void styleColorsLight(ImGuiStyle style) { + nStyleColorsLight(style.ptr); } - private static native void nStyleColorsLight(long ref); /* - ImGui::StyleColorsLight((ImGuiStyle*)ref); + private static native void nStyleColorsLight(long ptr); /* + ImGui::StyleColorsLight((ImGuiStyle*)ptr); + */ + + /** + * Classic imgui style + */ + public static native void styleColorsClassic(); /* + ImGui::StyleColorsClassic(); + */ + + public static void styleColorsClassic(ImGuiStyle style) { + nStyleColorsClassic(style.ptr); + } + + private static native void nStyleColorsClassic(long ptr); /* + ImGui::StyleColorsClassic((ImGuiStyle*)ptr); */ // Windows @@ -402,7 +397,10 @@ public class ImGui { // - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. // - For each independent axis of 'size': ==0.0f: use remaining host window size / >0.0f: fixed size / <0.0f: use remaining window size minus abs(size) / Each axis can use a different mode, e.g. ImVec2(0,400). // - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window. - // Always call a matching EndChild() for each BeginChild() call, regardless of its return value [this is due to legacy reason and is inconsistent with most other functions such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function returned true.] + // Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + // [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu, + // BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function + // returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] public static native boolean beginChild(String strId); /* return ImGui::BeginChild(strId); @@ -771,28 +769,8 @@ public class ImGui { */ // Content region - // - Those functions are bound to be redesigned soon (they are confusing, incomplete and return values in local window coordinates which increases confusion) - - /** - * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates - */ - public static native void getContentRegionMax(ImVec2 dstImVec2); /* - Jni::ImVec2Cpy(env, ImGui::GetContentRegionMax(), dstImVec2); - */ - - /** - * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates - */ - public static native float getContentRegionMaxX(); /* - return ImGui::GetContentRegionMax().x; - */ - - /** - * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates - */ - public static native float getContentRegionMaxY(); /* - return ImGui::GetContentRegionMax().y; - */ + // - Retrieve available space from a given point. GetContentRegionAvail() is frequently useful. + // - Those functions are bound to be redesigned (they are confusing, incomplete and the Min/Max return values are in local window coordinates which increases confusion) /** * == GetContentRegionMax() - GetCursorPos() @@ -816,10 +794,24 @@ public class ImGui { */ /** - * Content boundaries min (roughly (0,0)-Scroll), in window coordinates + * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates */ - public static native float getContentRegionAvailWidth(); /* - return ImGui::GetContentRegionAvailWidth(); + public static native void getContentRegionMax(ImVec2 dstImVec2); /* + Jni::ImVec2Cpy(env, ImGui::GetContentRegionMax(), dstImVec2); + */ + + /** + * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates + */ + public static native float getContentRegionMaxX(); /* + return ImGui::GetContentRegionMax().x; + */ + + /** + * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates + */ + public static native float getContentRegionMaxY(); /* + return ImGui::GetContentRegionMax().y; */ /** @@ -858,35 +850,21 @@ public class ImGui { // Windows Scrolling /** - * Get scrolling amount [0..GetScrollMaxX()] + * Get scrolling amount [0 .. GetScrollMaxX()] */ public static native float getScrollX(); /* return ImGui::GetScrollX(); */ /** - * Get scrolling amount [0..GetScrollMaxY()] + * Get scrolling amount [0 .. GetScrollMaxY()] */ public static native float getScrollY(); /* return ImGui::GetScrollY(); */ /** - * Get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - */ - public static native float getScrollMaxX(); /* - return ImGui::GetScrollMaxX(); - */ - - /** - * Get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - */ - public static native float getScrollMaxY(); /* - return ImGui::GetScrollMaxY(); - */ - - /** - * Set scrolling amount [0..GetScrollMaxX()] + * Set scrolling amount [0 .. GetScrollMaxX()] */ public static native void setScrollX(float scrollX); /* ImGui::SetScrollX(scrollX); @@ -899,6 +877,20 @@ public class ImGui { ImGui::SetScrollY(scrollY); */ + /** + * Get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x + */ + public static native float getScrollMaxX(); /* + return ImGui::GetScrollMaxX(); + */ + + /** + * Get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y + */ + public static native float getScrollMaxY(); /* + return ImGui::GetScrollMaxY(); + */ + /** * Adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center, 1.0: right. * When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead. @@ -973,14 +965,23 @@ public class ImGui { ImGui::PopFont(); */ + /** + * Modify a style color. always use this if you modify the style after NewFrame(). + */ public static native void pushStyleColor(int imGuiCol, float r, float g, float b, float a); /* ImGui::PushStyleColor(imGuiCol, (ImU32)ImColor((float)r, (float)g, (float)b, (float)a)); */ + /** + * Modify a style color. always use this if you modify the style after NewFrame(). + */ public static native void pushStyleColor(int imGuiCol, int r, int g, int b, int a); /* ImGui::PushStyleColor(imGuiCol, (ImU32)ImColor((int)r, (int)g, (int)b, (int)a)); */ + /** + * Modify a style color. always use this if you modify the style after NewFrame(). + */ public static native void pushStyleColor(int imGuiCol, int col); /* ImGui::PushStyleColor(imGuiCol, col); */ @@ -993,10 +994,16 @@ public class ImGui { ImGui::PopStyleColor(count); */ + /** + * Modify a style float variable. always use this if you modify the style after NewFrame(). + */ public static native void pushStyleVar(int imGuiStyleVar, float val); /* ImGui::PushStyleVar(imGuiStyleVar, val); */ + /** + * Modify a style ImVec2 variable. always use this if you modify the style after NewFrame(). + */ public static native void pushStyleVar(int imGuiStyleVar, float valX, float valY); /* ImGui::PushStyleVar(imGuiStyleVar, ImVec2(valX, valY)); */ @@ -1010,13 +1017,79 @@ public class ImGui { */ /** - * Retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), - * otherwise use GetColorU32() to get style color with style alpha baked in. + * Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets */ - public static native void getStyleColorVec4(int imGuiStyleVar, ImVec4 dstImVec4); /* - Jni::ImVec4Cpy(env, ImGui::GetStyleColorVec4(imGuiStyleVar), dstImVec4); + public static native void pushAllowKeyboardFocus(boolean allowKeyboardFocus); /* + ImGui::PushAllowKeyboardFocus(allowKeyboardFocus); */ + public static native void popAllowKeyboardFocus(); /* + ImGui::PopAllowKeyboardFocus(); + */ + + /** + * In 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). + * Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame. + */ + public static native void pushButtonRepeat(boolean repeat); /* + ImGui::PushButtonRepeat(repeat); + */ + + public static native void popButtonRepeat(); /* + ImGui::PopButtonRepeat(); + */ + + // Parameters stacks (current window) + + /** + * Push width of items for common large "item+label" widgets. {@code > 0.0f}: width in pixels, + * {@code <0.0f} align xx pixels to the right of window (so -1.0f always align width to the right side). 0.0f = default to ~2/3 of windows width, + */ + public static native void pushItemWidth(float itemWidth); /* + ImGui::PushItemWidth(itemWidth); + */ + + public static native void popItemWidth(); /* + ImGui::PopItemWidth(); + */ + + /** + * Set width of the _next_ common large "item+label" widget. {@code > 0.0f}: width in pixels, + * {@code <0.0f} align xx pixels to the right of window (so -1.0f always align width to the right side) + */ + public static native void setNextItemWidth(float itemWidth); /* + ImGui::SetNextItemWidth(itemWidth); + */ + + /** + * Width of item given pushed settings and current cursor position. NOT necessarily the width of last item unlike most 'Item' functions. + */ + public static native float calcItemWidth(); /* + return ImGui::CalcItemWidth(); + */ + + /** + * Push Word-wrapping positions for Text*() commands. {@code < 0.0f}: no wrapping; 0.0f: wrap to end of window (or column); {@code > 0.0f}: wrap at + * 'wrap_posX' position in window local space + */ + public static native void pushTextWrapPos(); /* + ImGui::PushTextWrapPos(); + */ + + /** + * Push Word-wrapping positions for Text*() commands. {@code < 0.0f}: no wrapping; 0.0f: wrap to end of window (or column); {@code > 0.0f}: wrap at + * 'wrap_posX' position in window local space + */ + public static native void pushTextWrapPos(float wrapLocalPosX); /* + ImGui::PushTextWrapPos(wrapLocalPosX); + */ + + public static native void popTextWrapPos(); /* + ImGui::PopTextWrapPos(); + */ + + // Style read access + /** * Get current font. */ @@ -1089,76 +1162,12 @@ public class ImGui { return ImGui::GetColorU32((ImU32)col); */ - // Parameters stacks (current window) - /** - * Push width of items for common large "item+label" widgets. {@code > 0.0f}: width in pixels, - * {@code <0.0f} align xx pixels to the right of window (so -1.0f always align width to the right side). 0.0f = default to ~2/3 of windows width, + * Retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), + * otherwise use GetColorU32() to get style color with style alpha baked in. */ - public static native void pushItemWidth(float itemWidth); /* - ImGui::PushItemWidth(itemWidth); - */ - - public static native void popItemWidth(); /* - ImGui::PopItemWidth(); - */ - - /** - * Set width of the _next_ common large "item+label" widget. {@code > 0.0f}: width in pixels, - * {@code <0.0f} align xx pixels to the right of window (so -1.0f always align width to the right side) - */ - public static native void setNextItemWidth(float itemWidth); /* - ImGui::SetNextItemWidth(itemWidth); - */ - - /** - * Width of item given pushed settings and current cursor position. NOT necessarily the width of last item unlike most 'Item' functions. - */ - public static native float calcItemWidth(); /* - return ImGui::CalcItemWidth(); - */ - - /** - * Push Word-wrapping positions for Text*() commands. {@code < 0.0f}: no wrapping; 0.0f: wrap to end of window (or column); {@code > 0.0f}: wrap at - * 'wrap_posX' position in window local space - */ - public static native void pushTextWrapPos(); /* - ImGui::PushTextWrapPos(); - */ - - /** - * Push Word-wrapping positions for Text*() commands. {@code < 0.0f}: no wrapping; 0.0f: wrap to end of window (or column); {@code > 0.0f}: wrap at - * 'wrap_posX' position in window local space - */ - public static native void pushTextWrapPos(float wrapLocalPosX); /* - ImGui::PushTextWrapPos(wrapLocalPosX); - */ - - public static native void popTextWrapPos(); /* - ImGui::PopTextWrapPos(); - */ - - /** - * Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets - */ - public static native void pushAllowKeyboardFocus(boolean allowKeyboardFocus); /* - ImGui::PushAllowKeyboardFocus(allowKeyboardFocus); - */ - - public static native void popAllowKeyboardFocus(); /* - ImGui::PopAllowKeyboardFocus(); - */ - - /** - * In 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). - * Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame. - */ - public static native void pushButtonRepeat(boolean repeat); /* - ImGui::PushButtonRepeat(repeat); - */ - - public static native void popButtonRepeat(); /* - ImGui::PopButtonRepeat(); + public static native void getStyleColorVec4(int imGuiStyleVar, ImVec4 dstImVec4); /* + Jni::ImVec4Cpy(env, ImGui::GetStyleColorVec4(imGuiStyleVar), dstImVec4); */ // Cursor / Layout @@ -1219,28 +1228,28 @@ public class ImGui { */ /** - * Move content position toward the right, by style.IndentSpacing or indent_w if != 0 + * Move content position toward the right, by indent_w, or style.IndentSpacing if indent_w {@code <= 0}. */ public static native void indent(); /* ImGui::Indent(); */ /** - * Move content position toward the right, by style.IndentSpacing or indent_w if != 0 + * Move content position toward the right, by indent_w, or style.IndentSpacing if indent_w {@code <= 0}. */ public static native void indent(float indentW); /* ImGui::Indent(indentW); */ /** - * Move content position back to the left, by style.IndentSpacing or indent_w if != 0 + * Move content position back to the left, by indent_w, or style.IndentSpacing if indent_w {@code <= 0}. */ public static native void unindent(); /* ImGui::Unindent(); */ /** - * Move content position back to the left, by style.IndentSpacing or indent_w if != 0 + * Move content position back to the left, by indent_w, or style.IndentSpacing if indent_w {@code <= 0}. */ public static native void unindent(float indentW); /* ImGui::Unindent(indentW); @@ -3448,7 +3457,7 @@ public class ImGui { return ImGui::InputScalarN(label, dataType, &pData[0], components, &pStep, &pStepFast, format, imGuiInputTextFlags); */ - // Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + // Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) // - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. // - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x @@ -3600,21 +3609,23 @@ public class ImGui { */ /** - * When 'pOpen' isn't NULL, display an additional small close button on upper right of the header + * When 'pVisible' isn't NULL, display an additional small close button on upper right of the header + * which will set the bool to false when clicked, if '*pVisible==false' don't display the header. */ - public static boolean collapsingHeader(String label, ImBoolean pOpen) { - return nCollapsingHeader(label, pOpen.getData(), 0); + public static boolean collapsingHeader(String label, ImBoolean pVisible) { + return nCollapsingHeader(label, pVisible.getData(), 0); } /** - * When 'pOpen' isn't NULL, display an additional small close button on upper right of the header + * When 'pVisible' isn't NULL, display an additional small close button on upper right of the header + * which will set the bool to false when clicked, if '*pVisible==false' don't display the header. */ - public static boolean collapsingHeader(String label, ImBoolean pOpen, int imGuiTreeNodeFlags) { - return nCollapsingHeader(label, pOpen.getData(), imGuiTreeNodeFlags); + public static boolean collapsingHeader(String label, ImBoolean pVisible, int imGuiTreeNodeFlags) { + return nCollapsingHeader(label, pVisible.getData(), imGuiTreeNodeFlags); } - private static native boolean nCollapsingHeader(String label, boolean[] pOpen, int imGuiTreeNodeFlags); /* - return ImGui::CollapsingHeader(label, &pOpen[0], imGuiTreeNodeFlags); + private static native boolean nCollapsingHeader(String label, boolean[] pVisible, int imGuiTreeNodeFlags); /* + return ImGui::CollapsingHeader(label, &pVisible[0], imGuiTreeNodeFlags); */ /** @@ -3905,7 +3916,7 @@ public class ImGui { */ // Tooltips - // - Tooltip are windows following the mouse which do not take focus away. + // - Tooltip are windows following the mouse. They do not take focus away. /** * Begin/append a tooltip window. to create full-featured tooltip (with any kind of items). @@ -4173,11 +4184,214 @@ public class ImGui { return ImGui::IsPopupOpen(strId, imGuiPopupFlags); */ + // Tables + // [BETA API] API may evolve slightly! If you use this, please update to the next version when it comes out! + // - Full-featured replacement for old Columns API. + // - See Demo->Tables for demo code. + // - See top of imgui_tables.cpp for general commentary. + // - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + // The typical call flow is: + // - 1. Call BeginTable(). + // - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + // - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + // - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + // - 5. Populate contents: + // - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + // - If you are using tables as a sort of grid, where every columns is holding the same type of contents, + // you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + // TableNextColumn() will automatically wrap-around into the next row if needed. + // - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + // - Summary of possible call flow: + // -------------------------------------------------------------------------------------------------------- + // TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + // TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + // TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + // TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + // -------------------------------------------------------------------------------------------------------- + // - 5. Call EndTable() + + public static native boolean beginTable(String id, int column); /* + return ImGui::BeginTable(id, column); + */ + + public static native boolean beginTable(String id, int column, int imGuiTableFlags); /* + return ImGui::BeginTable(id, column, imGuiTableFlags); + */ + + public static native boolean beginTable(String id, int column, int imGuiTableFlags, float outerSizeX, float outerSizeY); /* + return ImGui::BeginTable(id, column, imGuiTableFlags, ImVec2(outerSizeX, outerSizeY)); + */ + + public static native boolean beginTable(String id, int column, int imGuiTableFlags, float outerSizeX, float outerSizeY, float innerWidth); /* + return ImGui::BeginTable(id, column, imGuiTableFlags, ImVec2(outerSizeX, outerSizeY), innerWidth); + */ + + /** + * Only call EndTable() if BeginTable() returns true! + */ + public static native void endTable(); /* + ImGui::EndTable(); + */ + + /** + * Append into the first cell of a new row. + */ + public static native void tableNextRow(); /* + ImGui::TableNextRow(); + */ + + /** + * Append into the first cell of a new row. + */ + public static native void tableNextRow(int imGuiTableRowFlags); /* + ImGui::TableNextRow(imGuiTableRowFlags); + */ + + /** + * Append into the first cell of a new row. + */ + public static native void tableNextRow(int imGuiTableRowFlags, float minRowHeight); /* + ImGui::TableNextRow(imGuiTableRowFlags, minRowHeight); + */ + + /** + * Append into the next column (or first column of next row if currently in last column). Return true when column is visible. + */ + public static native boolean tableNextColumn(); /* + return ImGui::TableNextColumn(); + */ + + /** + * Append into the specified column. Return true when column is visible. + */ + public static native boolean tableSetColumnIndex(int columnN); /* + return ImGui::TableSetColumnIndex(columnN); + */ + + // Tables: Headers & Columns declaration + // - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + // - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + // Headers are required to perform: reordering, sorting, and opening the context menu. + // The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + // - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + // some advanced use cases (e.g. adding custom widgets in header row). + // - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + + public static native void tableSetupColumn(String label); /* + ImGui::TableSetupColumn(label); + */ + + public static native void tableSetupColumn(String label, int imGuiTableColumnFlags); /* + ImGui::TableSetupColumn(label, imGuiTableColumnFlags); + */ + + public static native void tableSetupColumn(String label, int imGuiTableColumnFlags, float initWidthOrWeight); /* + ImGui::TableSetupColumn(label, imGuiTableColumnFlags, initWidthOrWeight); + */ + + public static native void tableSetupColumn(String label, int imGuiTableColumnFlags, float initWidthOrWeight, int userId); /* + ImGui::TableSetupColumn(label, imGuiTableColumnFlags, initWidthOrWeight, userId); + */ + + /** + * Lock columns/rows so they stay visible when scrolled. + */ + public static native void tableSetupScrollFreeze(int cols, int rows); /* + ImGui::TableSetupScrollFreeze(cols, rows); + */ + + /** + * Submit all headers cells based on data provided to TableSetupColumn() + submit context menu + */ + public static native void tableHeadersRow(); /* + ImGui::TableHeadersRow(); + */ + + /** + * Submit one header cell manually (rarely used) + */ + public static native void tableHeader(String label); /* + ImGui::TableHeader(label); + */ + + // Tables: Sorting + // - Call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + // - When 'SpecsDirty == true' you should sort your data. It will be true when sorting specs have changed + // since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, else you may + // wastefully sort your data every frame! + // - Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable(). + + // TODO: TableGetSortSpecs() + + // Tables: Miscellaneous functions + // - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + + /** + * Return number of columns (value passed to BeginTable). + */ + public static native int tableGetColumnCount(); /* + return ImGui::TableGetColumnCount(); + */ + + /** + * Return current column index. + */ + public static native int tableGetColumnIndex(); /* + return ImGui::TableGetColumnIndex(); + */ + + /** + * Return current row index. + */ + public static native int tableGetRowIndex(); /* + return ImGui::TableGetRowIndex(); + */ + + /** + * Return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column. + */ + public static native String tableGetColumnName(); /* + return env->NewStringUTF(ImGui::TableGetColumnName()); + */ + + /** + * Return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column. + */ + public static native String tableGetColumnName(int columnN); /* + return env->NewStringUTF(ImGui::TableGetColumnName(columnN)); + */ + + /** + * Return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column. + */ + public static native int tableGetColumnFlags(); /* + return ImGui::TableGetColumnFlags(); + */ + + /** + * Return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column. + */ + public static native int tableGetColumnFlags(int columnN); /* + return ImGui::TableGetColumnFlags(columnN); + */ + + /** + * Change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details. + */ + public static native void tableSetBgColor(int imGuiTableBgTarget, int color); /* + ImGui::TableSetBgColor(imGuiTableBgTarget, color); + */ + + /** + * Change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details. + */ + public static native void tableSetBgColor(int imGuiTableBgTarget, int color, int columnN); /* + ImGui::TableSetBgColor(imGuiTableBgTarget, color, columnN); + */ + + // Legacy Columns API (2020: prefer using Tables!) // Columns // - You can also use SameLine(posX) to mimic simplified columns. - // - The columns API is work-in-progress and rather lacking (columns are arguably the worst part of dear imgui at the moment!) - // - There is a maximum of 64 columns. - // - Currently working on new 'Tables' api which will replace columns around Q2 2020 (see GitHub #2957). public static native void columns(); /* ImGui::Columns(); @@ -4408,7 +4622,7 @@ public class ImGui { */ /** - * set next window class (rare/advanced uses: provide hints to the platform back-end via altered viewport flags and parent/child info) + * set next window class (rare/advanced uses: provide hints to the platform backend via altered viewport flags and parent/child info) */ public static void setNextWindowClass(ImGuiWindowClass windowClass) { nSetNextWindowClass(windowClass.ptr); @@ -4504,7 +4718,6 @@ public class ImGui { */ // Drag and Drop - // - [BETA API] API may evolve! // - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip as replacement) private static WeakReference objectPayloadRef = null; @@ -4664,6 +4877,7 @@ public class ImGui { */ // Clipping + // - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only. public static native void pushClipRect(float clipRectMinX, float clipRectMinY, float clipRectMaxX, float clipRectMaxY, boolean intersectWithCurrentClipRect); /* ImGui::PushClipRect(ImVec2(clipRectMinX, clipRectMinY), ImVec2(clipRectMaxX, clipRectMaxY), intersectWithCurrentClipRect); @@ -5428,7 +5642,7 @@ public class ImGui { // Note: You may use GetWindowViewport() to get the current viewport of the current window. /** - * Platform/renderer functions, for back-end to setup + viewports list. + * Platform/renderer functions, for backend to setup + viewports list. */ public static ImGuiPlatformIO getPlatformIO() { if (platformIO == null) { @@ -5472,7 +5686,7 @@ public class ImGui { /** * Call DestroyWindow platform functions for all viewports. - * Call from back-end Shutdown() if you need to close platform windows before imgui shutdown. + * Call from backend Shutdown() if you need to close platform windows before imgui shutdown. * Otherwise will be called by DestroyContext(). */ public static native void destroyPlatformWindows(); /* @@ -5480,7 +5694,7 @@ public class ImGui { */ /** - * This is a helper for back-ends. + * This is a helper for backends. */ public static ImGuiViewport findViewportByID(int imGuiID) { FIND_VIEWPORT.ptr = nFindViewportByID(imGuiID); @@ -5492,7 +5706,7 @@ public class ImGui { */ /** - * This is a helper for back-ends. The type platform_handle is decided by the back-end (e.g. HWND, MyWindow*, GLFWwindow* etc.) + * This is a helper for backends. The type platform_handle is decided by the backend (e.g. HWND, MyWindow*, GLFWwindow* etc.) */ public static ImGuiViewport findViewportByPlatformHandle(long platformHandle) { FIND_VIEWPORT.ptr = nFindViewportByPlatformHandle(platformHandle); diff --git a/imgui-binding/src/main/java/imgui/ImGuiIO.java b/imgui-binding/src/main/java/imgui/ImGuiIO.java index 9d65d8e..33f16d8 100644 --- a/imgui-binding/src/main/java/imgui/ImGuiIO.java +++ b/imgui-binding/src/main/java/imgui/ImGuiIO.java @@ -60,35 +60,35 @@ public final class ImGuiIO { } /** - * See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end. + * See ImGuiBackendFlags enum. Set by backend to communicate features supported by the backend. */ public native int getBackendFlags(); /* return ImGui::GetIO().BackendFlags; */ /** - * See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end. + * See ImGuiBackendFlags enum. Set by backend to communicate features supported by the backend. */ public native void setBackendFlags(int backendFlags); /* ImGui::GetIO().BackendFlags = backendFlags; */ /** - * See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end. + * See ImGuiBackendFlags enum. Set by backend to communicate features supported by the backend. */ public void addBackendFlags(final int backendFlags) { setBackendFlags(getBackendFlags() | backendFlags); } /** - * See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end. + * See ImGuiBackendFlags enum. Set by backend to communicate features supported by the backend. */ public void removeBackendFlags(final int backendFlags) { setBackendFlags(getBackendFlags() & ~(backendFlags)); } /** - * See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end. + * See ImGuiBackendFlags enum. Set by backend to communicate features supported by the backend. */ public boolean hasBackendFlags(final int flags) { return (getBackendFlags() & flags) != 0; @@ -304,7 +304,7 @@ public final class ImGuiIO { /** * Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). - * Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations. + * Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations. */ public native boolean getMouseDrawCursor(); /* return ImGui::GetIO().MouseDrawCursor; @@ -312,7 +312,7 @@ public final class ImGuiIO { /** * Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). - * Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations. + * Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations. */ public native void setMouseDrawCursor(boolean mouseDrawCursor); /* ImGui::GetIO().MouseDrawCursor = mouseDrawCursor; @@ -321,7 +321,7 @@ public final class ImGuiIO { /** * OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, * Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, - * Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63) + * Multi-selection in lists uses Cmd/Super instead of Ctrl */ public native boolean getConfigMacOSXBehaviors(); /* return ImGui::GetIO().ConfigMacOSXBehaviors; @@ -330,26 +330,40 @@ public final class ImGuiIO { /** * OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, * Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, - * Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63) + * Multi-selection in lists uses Cmd/Super instead of Ctrl */ public native void setConfigMacOSXBehaviors(boolean configMacOSXBehaviors); /* ImGui::GetIO().ConfigMacOSXBehaviors = configMacOSXBehaviors; */ /** - * Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63) + * Set to false to disable blinking cursor, for users who consider it distracting. */ public native boolean getConfigInputTextCursorBlink(); /* return ImGui::GetIO().ConfigInputTextCursorBlink; */ /** - * Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63) + * Set to false to disable blinking cursor, for users who consider it distracting. */ public native void setConfigInputTextCursorBlink(boolean configInputTextCursorBlink); /* ImGui::GetIO().ConfigInputTextCursorBlink = configInputTextCursorBlink; */ + /** + * [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard. + */ + public native boolean getConfigDragClickToInputText(); /* + return ImGui::GetIO().ConfigDragClickToInputText; + */ + + /** + * [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard. + */ + public native void setConfigDragClickToInputText(boolean configDragClickToInputText); /* + ImGui::GetIO().ConfigDragClickToInputText = configDragClickToInputText; + */ + /** * Enable resizing of windows from their edges and from the lower-left corner. * This requires (io.BackendFlags {@code &} ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. @@ -369,31 +383,31 @@ public final class ImGuiIO { */ /** - * [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected. + * Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar. */ public native boolean getConfigWindowsMoveFromTitleBarOnly(); /* return ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly; */ /** - * [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected. + * Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar. */ public native void setConfigWindowsMoveFromTitleBarOnly(boolean configWindowsMoveFromTitleBarOnly); /* ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly = configWindowsMoveFromTitleBarOnly; */ /** - * [BETA] Compact window memory usage when unused. Set to -1.0f to disable. + * [Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable. */ - public native float getConfigWindowsMemoryCompactTimer(); /* - return ImGui::GetIO().ConfigWindowsMemoryCompactTimer; + public native float getConfigMemoryCompactTimer(); /* + return ImGui::GetIO().ConfigMemoryCompactTimer; */ /** - * [BETA] Compact window memory usage when unused. Set to -1.0f to disable. + * Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable. */ - public native void setConfigWindowsMemoryCompactTimer(float configWindowsMemoryCompactTimer); /* - ImGui::GetIO().ConfigWindowsMemoryCompactTimer = configWindowsMemoryCompactTimer; + public native void setConfigMemoryCompactTimer(float configMemoryCompactTimer); /* + ImGui::GetIO().ConfigMemoryCompactTimer = configMemoryCompactTimer; */ //------------------------------------------------------------------ @@ -401,28 +415,28 @@ public final class ImGuiIO { //------------------------------------------------------------------ /** - * Optional: Platform back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff. + * Optional: Platform backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. */ public native String getBackendPlatformName(); /* return env->NewStringUTF(ImGui::GetIO().BackendPlatformName); */ /** - * Optional: Platform back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff. + * Optional: Platform backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. */ public native void setBackendPlatformName(String backendPlatformName); /*MANUAL ImGui::GetIO().BackendPlatformName = obj_backendPlatformName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_backendPlatformName, JNI_FALSE); */ /** - * Optional: Renderer back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff. + * Optional: Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. */ public native String getBackendRendererName(); /* return env->NewStringUTF(ImGui::GetIO().BackendRendererName); */ /** - * Optional: Renderer back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff. + * Optional: Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. */ public native void setBackendRendererName(String backendRendererName); /*MANUAL ImGui::GetIO().BackendRendererName = obj_backendRendererName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_backendRendererName, JNI_FALSE); @@ -655,7 +669,7 @@ public final class ImGuiIO { /** * Disable default OS parenting to main viewport for secondary viewports. * By default, viewports are marked with ParentViewportId = main_viewport, - * expecting the platform back-end to setup a parent/child relationship between the OS windows (some back-end may ignore this). + * expecting the platform backend to setup a parent/child relationship between the OS windows (some backend may ignore this). * Set to true if you want the default to be 0, then all viewports will be top-level OS windows. */ public native boolean getConfigViewportsNoDefaultParent(); /* @@ -665,7 +679,7 @@ public final class ImGuiIO { /** * Disable default OS parenting to main viewport for secondary viewports. * By default, viewports are marked with ParentViewportId = main_viewport, - * expecting the platform back-end to setup a parent/child relationship between the OS windows (some back-end may ignore this). + * expecting the platform backend to setup a parent/child relationship between the OS windows (some backend may ignore this). * Set to true if you want the default to be 0, then all viewports will be top-level OS windows. */ public native void setConfigViewportsNoDefaultParent(boolean value); /* @@ -769,14 +783,14 @@ public final class ImGuiIO { */ /** - * Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all back-ends. + * Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all backends. */ public native float getMouseWheelH(); /* return ImGui::GetIO().MouseWheelH; */ /** - * Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all back-ends. + * Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all backends. */ public native void setMouseWheelH(float mouseDeltaX); /* ImGui::GetIO().MouseWheelH = mouseDeltaX; @@ -973,14 +987,14 @@ public final class ImGuiIO { */ /** - * MousePos has been altered, back-end should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled. + * MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled. */ public native boolean getWantSetMousePos(); /* return ImGui::GetIO().WantSetMousePos; */ /** - * MousePos has been altered, back-end should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled. + * MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled. */ public native void setWantSetMousePos(boolean wantSetMousePos); /* ImGui::GetIO().WantSetMousePos = wantSetMousePos; diff --git a/imgui-binding/src/main/java/imgui/ImGuiPlatformIO.java b/imgui-binding/src/main/java/imgui/ImGuiPlatformIO.java index df042b4..dd7ab65 100644 --- a/imgui-binding/src/main/java/imgui/ImGuiPlatformIO.java +++ b/imgui-binding/src/main/java/imgui/ImGuiPlatformIO.java @@ -11,63 +11,63 @@ import imgui.callback.ImPlatformFuncViewportSuppImVec2; /** * ----------------------------------------------------------------------------- - * [BETA] Platform interface for multi-viewport support + * [BETA] Platform interface for multi-viewport support * ----------------------------------------------------------------------------- - * (Optional) This is completely optional, for advanced users! - * If you are new to Dear ImGui and trying to integrate it into your engine, you can probably ignore this for now. - * This feature allows you to seamlessly drag Dear ImGui windows outside of your application viewport. - * This is achieved by creating new Platform/OS windows on the fly, and rendering into them. - * Dear ImGui manages the viewport structures, and the back-end create and maintain one Platform/OS window for each of those viewports. - * See Glossary https://github.com/ocornut/imgui/wiki/Glossary for details about some of the terminology. - * See Thread https://github.com/ocornut/imgui/issues/1542 for gifs, news and questions about this evolving feature. - * About the coordinates system: - * - When multi-viewports are enabled, all Dear ImGui coordinates become absolute coordinates (same as OS coordinates!) - * - So e.g. ImGui::SetNextWindowPos(ImVec2(0,0)) will position a window relative to your primary monitor! - * - If you want to position windows relative to your main application viewport, use ImGui::GetMainViewport().Pos as a base position. - * Steps to use multi-viewports in your application, when using a default back-end from the examples/ folder: - * - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. - * - Back-end: The back-end initialization will setup all necessary ImGuiPlatformIO's functions and update monitors info every frame. - * - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render(). - * - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls. - * Steps to use multi-viewports in your application, when using a custom back-end: - * - Important: THIS IS NOT EASY TO DO and comes with many subtleties not described here! - * It's also an experimental feature, so some of the requirements may evolve. - * Consider using default back-ends if you can. Either way, carefully follow and refer to examples/ back-ends for details. - * - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. - * - Back-end: Hook ImGuiPlatformIO's Platform_* and Renderer_* callbacks (see below). - * Set 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports' and 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports'. - * Update ImGuiPlatformIO's Monitors list every frame. - * Update MousePos every frame, in absolute coordinates. - * - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render(). - * You may skip calling RenderPlatformWindowsDefault() if its API is not convenient for your needs. Read comments below. - * - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls. - * About ImGui::RenderPlatformWindowsDefault(): - * - This function is a mostly a _helper_ for the common-most cases, and to facilitate using default back-ends. - * - You can check its simple source code to understand what it does. - * It basically iterates secondary viewports and call 4 functions that are setup in ImGuiPlatformIO, if available: - * Platform_RenderWindow(), Renderer_RenderWindow(), Platform_SwapBuffers(), Renderer_SwapBuffers() - * Those functions pointers exists only for the benefit of RenderPlatformWindowsDefault(). - * - If you have very specific rendering needs (e.g. flipping multiple swap-chain simultaneously, unusual sync/threading issues, etc.), - * you may be tempted to ignore RenderPlatformWindowsDefault() and write customized code to perform your renderingg. - * You may decide to setup the platform_io's *RenderWindow and *SwapBuffers pointers and call your functions through those pointers, - * or you may decide to never setup those pointers and call your code directly. They are a convenience, not an obligatory interface. + * (Optional) This is completely optional, for advanced users! + * If you are new to Dear ImGui and trying to integrate it into your engine, you can probably ignore this for now. + * This feature allows you to seamlessly drag Dear ImGui windows outside of your application viewport. + * This is achieved by creating new Platform/OS windows on the fly, and rendering into them. + * Dear ImGui manages the viewport structures, and the backend create and maintain one Platform/OS window for each of those viewports. + * See Glossary https://github.com/ocornut/imgui/wiki/Glossary for details about some of the terminology. + * See Thread https://github.com/ocornut/imgui/issues/1542 for gifs, news and questions about this evolving feature. + * About the coordinates system: + * - When multi-viewports are enabled, all Dear ImGui coordinates become absolute coordinates (same as OS coordinates!) + * - So e.g. ImGui::SetNextWindowPos(ImVec2(0,0)) will position a window relative to your primary monitor! + * - If you want to position windows relative to your main application viewport, use ImGui::GetMainViewport().Pos as a base position. + * Steps to use multi-viewports in your application, when using a default backend from the examples/ folder: + * - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. + * - Backend: The backend initialization will setup all necessary ImGuiPlatformIO's functions and update monitors info every frame. + * - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render(). + * - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls. + * Steps to use multi-viewports in your application, when using a custom backend: + * - Important: THIS IS NOT EASY TO DO and comes with many subtleties not described here! + * It's also an experimental feature, so some of the requirements may evolve. + * Consider using default backends if you can. Either way, carefully follow and refer to examples/ backends for details. + * - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. + * - Backend: Hook ImGuiPlatformIO's Platform_* and Renderer_* callbacks (see below). + * Set 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports' and 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports'. + * Update ImGuiPlatformIO's Monitors list every frame. + * Update MousePos every frame, in absolute coordinates. + * - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render(). + * You may skip calling RenderPlatformWindowsDefault() if its API is not convenient for your needs. Read comments below. + * - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls. + * About ImGui::RenderPlatformWindowsDefault(): + * - This function is a mostly a _helper_ for the common-most cases, and to facilitate using default backends. + * - You can check its simple source code to understand what it does. + * It basically iterates secondary viewports and call 4 functions that are setup in ImGuiPlatformIO, if available: + * Platform_RenderWindow(), Renderer_RenderWindow(), Platform_SwapBuffers(), Renderer_SwapBuffers() + * Those functions pointers exists only for the benefit of RenderPlatformWindowsDefault(). + * - If you have very specific rendering needs (e.g. flipping multiple swap-chain simultaneously, unusual sync/threading issues, etc.), + * you may be tempted to ignore RenderPlatformWindowsDefault() and write customized code to perform your renderingg. + * You may decide to setup the platform_io's *RenderWindow and *SwapBuffers pointers and call your functions through those pointers, + * or you may decide to never setup those pointers and call your code directly. They are a convenience, not an obligatory interface. * ----------------------------------------------------------------------------- - * (Optional) Access via ImGui::GetPlatformIO() - * - * ------------------------------------------------------------------ - * Input - Back-end interface/functions + Monitor List + * (Optional) Access via ImGui::GetPlatformIO() + *

* ------------------------------------------------------------------ - * (Optional) Platform functions (e.g. Win32, GLFW, SDL2) - * For reference, the second column shows which function are generally calling the Platform Functions: - * N = ImGui::NewFrame() ~ beginning of the dear imgui frame: read info from platform/OS windows (latest size/position) - * F = ImGui::Begin(), ImGui::EndFrame() ~ during the dear imgui frame - * U = ImGui::UpdatePlatformWindows() ~ after the dear imgui frame: create and update all platform/OS windows - * R = ImGui::RenderPlatformWindowsDefault() ~ render - * D = ImGui::DestroyPlatformWindows() ~ shutdown - * The general idea is that NewFrame() we will read the current Platform/OS state, and UpdatePlatformWindows() will write to it. - * The functions are designed so we can mix and match 2 imgui_impl_xxxx files, one for the Platform (~window/input handling), one for Renderer. - * Custom engine back-ends will often provide both Platform and Renderer interfaces and so may not need to use all functions. - * Platform functions are typically called before their Renderer counterpart, apart from Destroy which are called the other way. + * Input - Backend interface/functions + Monitor List + * ------------------------------------------------------------------ + * (Optional) Platform functions (e.g. Win32, GLFW, SDL2) + * For reference, the second column shows which function are generally calling the Platform Functions: + * N = ImGui::NewFrame() ~ beginning of the dear imgui frame: read info from platform/OS windows (latest size/position) + * F = ImGui::Begin(), ImGui::EndFrame() ~ during the dear imgui frame + * U = ImGui::UpdatePlatformWindows() ~ after the dear imgui frame: create and update all platform/OS windows + * R = ImGui::RenderPlatformWindowsDefault() ~ render + * D = ImGui::DestroyPlatformWindows() ~ shutdown + * The general idea is that NewFrame() we will read the current Platform/OS state, and UpdatePlatformWindows() will write to it. + * The functions are designed so we can mix and match 2 imgui_impl_xxxx files, one for the Platform (~window/input handling), one for Renderer. + * Custom engine backends will often provide both Platform and Renderer interfaces and so may not need to use all functions. + * Platform functions are typically called before their Renderer counterpart, apart from Destroy which are called the other way. */ public final class ImGuiPlatformIO extends ImGuiStruct { private static final ImGuiViewport MAIN_VIEWPORT = new ImGuiViewport(0); @@ -336,7 +336,7 @@ public final class ImGuiPlatformIO extends ImGuiStruct { */ /** - * // . . U . . // (Optional) Called by UpdatePlatformWindows(). Optional hook to allow the platform back-end from doing general book-keeping every frame. + * // . . U . . // (Optional) Called by UpdatePlatformWindows(). Optional hook to allow the platform backend from doing general book-keeping every frame. */ public native void setPlatformUpdateWindow(ImPlatformFuncViewport func); /* IM_PLATFORM_FUNC_VIEWPORT_METHOD_TMPL(UpdateWindow) @@ -392,7 +392,7 @@ public final class ImGuiPlatformIO extends ImGuiStruct { */ /** - * // (Optional) [BETA] FIXME-DPI: DPI handling: Called during Begin() every time the viewport we are outputting into changes, so back-end has a chance to swap fonts to adjust style. + * // (Optional) [BETA] FIXME-DPI: DPI handling: Called during Begin() every time the viewport we are outputting into changes, so backend has a chance to swap fonts to adjust style. */ public native void setPlatformOnChangedViewport(ImPlatformFuncViewport func); /* IM_PLATFORM_FUNC_VIEWPORT_METHOD_TMPL(OnChangedViewport) @@ -489,7 +489,7 @@ public final class ImGuiPlatformIO extends ImGuiStruct { */ // (Optional) Monitor list - // - Updated by: app/back-end. Update every frame to dynamically support changing monitor or DPI configuration. + // - Updated by: app/backend. Update every frame to dynamically support changing monitor or DPI configuration. // - Used by: dear imgui to query DPI info, clamp popups/tooltips within same monitor and not have them straddle monitors. //------------------------------------------------------------------ diff --git a/imgui-binding/src/main/java/imgui/ImGuiStyle.java b/imgui-binding/src/main/java/imgui/ImGuiStyle.java index f16490b..3b5170e 100644 --- a/imgui-binding/src/main/java/imgui/ImGuiStyle.java +++ b/imgui-binding/src/main/java/imgui/ImGuiStyle.java @@ -349,6 +349,35 @@ public final class ImGuiStyle extends ImGuiStructDestroyable { IMGUI_STYLE->ItemInnerSpacing.y = y; */ + /** + * Padding within a table cell. + */ + public native void getCellPadding(ImVec2 dstImVec2); /* + Jni::ImVec2Cpy(env, &IMGUI_STYLE->CellPadding, dstImVec2); + */ + + /** + * Padding within a table cell. + */ + public native float getCellPaddingX(); /* + return IMGUI_STYLE->CellPadding.x; + */ + + /** + * Padding within a table cell. + */ + public native float getCellPaddingY(); /* + return IMGUI_STYLE->CellPadding.y; + */ + + /** + * Padding within a table cell. + */ + public native void setCellPadding(float x, float y); /* + IMGUI_STYLE->CellPadding.x = x; + IMGUI_STYLE->CellPadding.y = y; + */ + /** * Expand reactive bounding box for touch-based system where touch position is not accurate enough. * Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! @@ -692,7 +721,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable { /** * Enable anti-aliased lines/borders using textures where possible. - * Require back-end to render with bilinear filtering. + * Require backend to render with bilinear filtering. * Latched at the beginning of the frame (copied to ImDrawList). */ public native boolean getAntiAliasedLinesUseTex(); /* @@ -701,7 +730,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable { /** * Enable anti-aliased lines/borders using textures where possible. - * Require back-end to render with bilinear filtering. + * Require backend to render with bilinear filtering. * Latched at the beginning of the frame (copied to ImDrawList). */ public native void setAntiAliasedLinesUseTex(boolean antiAliasedLinesUseTex); /* diff --git a/imgui-binding/src/main/java/imgui/ImGuiViewport.java b/imgui-binding/src/main/java/imgui/ImGuiViewport.java index 4443907..6abe6d9 100644 --- a/imgui-binding/src/main/java/imgui/ImGuiViewport.java +++ b/imgui-binding/src/main/java/imgui/ImGuiViewport.java @@ -3,7 +3,7 @@ package imgui; import imgui.binding.ImGuiStruct; /** - * The viewports created and managed by Dear ImGui. The role of the platform back-end is to create the platform/OS windows corresponding to each viewport. + * The viewports created and managed by Dear ImGui. The role of the platform backend is to create the platform/OS windows corresponding to each viewport. * - Main Area = entire viewport. * - Work Area = entire viewport minus sections optionally used by menu bars, status bars. Some positioning code will prefer to use this. Window are also trying to stay within this area. */ @@ -215,23 +215,23 @@ public final class ImGuiViewport extends ImGuiStruct { */ /** - * (Advanced) 0: no parent. Instruct the platform back-end to setup a parent/child relationship between platform windows. + * (Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between platform windows. */ public native int getParentViewportId(); /* return IMGUI_VIEWPORT->ParentViewportId; */ /** - * (Advanced) 0: no parent. Instruct the platform back-end to setup a parent/child relationship between platform windows. + * (Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between platform windows. */ public native void setParentViewportId(int parentViewportId); /* IMGUI_VIEWPORT->ParentViewportId = parentViewportId; */ - // Our design separate the Renderer and Platform back-ends to facilitate combining default back-ends with each others. - // When our create your own back-end for a custom engine, it is possible that both Renderer and Platform will be handled + // Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + // When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled // by the same system and you may not need to use all the UserData/Handle fields. - // The library never uses those fields, they are merely storage to facilitate back-end implementation. + // The library never uses those fields, they are merely storage to facilitate backend implementation. /** * void* to hold custom data structure for the renderer (e.g. swap chain, framebuffers etc.). generally set by your Renderer_CreateWindow function. diff --git a/imgui-binding/src/main/java/imgui/ImGuiWindowClass.java b/imgui-binding/src/main/java/imgui/ImGuiWindowClass.java index b588232..b9a4790 100644 --- a/imgui-binding/src/main/java/imgui/ImGuiWindowClass.java +++ b/imgui-binding/src/main/java/imgui/ImGuiWindowClass.java @@ -7,8 +7,8 @@ import imgui.binding.ImGuiStructDestroyable; * Important: the content of this class is still highly WIP and likely to change and be refactored * before we stabilize Docking features. Please be mindful if using this. * Provide hints: - * - To the platform back-end via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) - * - To the platform back-end for OS level parent/child relationships of viewport. + * - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + * - To the platform backend for OS level parent/child relationships of viewport. * - To the docking system for various options and filtering. */ public final class ImGuiWindowClass extends ImGuiStructDestroyable { @@ -51,16 +51,16 @@ public final class ImGuiWindowClass extends ImGuiStructDestroyable { */ /** - * Hint for the platform back-end. If non-zero, the platform back-end can create a parent{@code <>}child relationship between the platform windows. - * Not conforming back-ends are free to e.g. parent every viewport to the main viewport or not. + * Hint for the platform backend. If non-zero, the platform backend can create a parent{@code <>}child relationship between the platform windows. + * Not conforming backends are free to e.g. parent every viewport to the main viewport or not. */ public native int getParentViewportId(); /* return IMGUI_WINDOW_CLASS->ParentViewportId; */ /** - * Hint for the platform back-end. If non-zero, the platform back-end can create a parent{@code <>}child relationship between the platform windows. - * Not conforming back-ends are free to e.g. parent every viewport to the main viewport or not. + * Hint for the platform backend. If non-zero, the platform backend can create a parent{@code <>}child relationship between the platform windows. + * Not conforming backends are free to e.g. parent every viewport to the main viewport or not. */ public native void setParentViewportId(int parentViewportId); /* IMGUI_WINDOW_CLASS->ParentViewportId = parentViewportId; @@ -98,6 +98,22 @@ public final class ImGuiWindowClass extends ImGuiStructDestroyable { IMGUI_WINDOW_CLASS->ViewportFlagsOverrideClear = viewportFlagsOverrideClear; */ + /** + * [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. + * May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing. + */ + public native int getTabItemFlagsOverrideSet(); /* + return IMGUI_WINDOW_CLASS->TabItemFlagsOverrideSet; + */ + + /** + * [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. + * May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing. + */ + public native void setTabItemFlagsOverrideSet(int tabItemFlagsOverrideSet); /* + IMGUI_WINDOW_CLASS->TabItemFlagsOverrideSet = tabItemFlagsOverrideSet; + */ + /** * [EXPERIMENTAL] Dock node flags to set when a window of this class is hosted by a dock node (it doesn't have to be selected!) */ diff --git a/imgui-binding/src/main/java/imgui/flag/ImDrawListFlags.java b/imgui-binding/src/main/java/imgui/flag/ImDrawListFlags.java index d1aaecc..5512664 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImDrawListFlags.java +++ b/imgui-binding/src/main/java/imgui/flag/ImDrawListFlags.java @@ -14,7 +14,7 @@ public final class ImDrawListFlags { */ public static final int AntiAliasedLines = 1; /** - * Enable anti-aliased lines/borders using textures when possible. Require back-end to render with bilinear filtering. + * Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering. */ public static final int AntiAliasedLinesUseTex = 1 << 1; /** diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiBackendFlags.java b/imgui-binding/src/main/java/imgui/flag/ImGuiBackendFlags.java index 5c45c2b..93a4e59 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImGuiBackendFlags.java +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiBackendFlags.java @@ -1,7 +1,7 @@ package imgui.flag; /** - * Back-end capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom back-end. + * Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. */ public final class ImGuiBackendFlags { private ImGuiBackendFlags() { @@ -9,36 +9,36 @@ public final class ImGuiBackendFlags { public static final int None = 0; /** - * Back-end Platform supports gamepad and currently has one connected. + * Backend Platform supports gamepad and currently has one connected. */ public static final int HasGamepad = 1; /** - * Back-end Platform supports honoring GetMouseCursor() value to change the OS cursor shape. + * Backend Platform supports honoring GetMouseCursor() value to change the OS cursor shape. */ public static final int HasMouseCursors = 1 << 1; /** - * Back-end Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set). + * Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set). */ public static final int HasSetMousePos = 1 << 2; /** - * Back-end Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices. + * Backend Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices. */ public static final int RendererHasVtxOffset = 1 << 3; // [BETA] Viewports /** - * Back-end Platform supports multiple viewports. + * Backend Platform supports multiple viewports. */ public static final int PlatformHasViewports = 1 << 10; /** - * Back-end Platform supports setting io.MouseHoveredViewport to the viewport directly under the mouse _IGNORING_ viewports + * Backend Platform supports setting io.MouseHoveredViewport to the viewport directly under the mouse _IGNORING_ viewports * with the ImGuiViewportFlags_NoInputs flag and _REGARDLESS_ of whether another viewport is focused and may be capturing the mouse. - * This information is _NOT EASY_ to provide correctly with most high-level engines! Don't set this without studying how the examples/ back-end handle it! + * This information is _NOT EASY_ to provide correctly with most high-level engines! Don't set this without studying how the examples/ backend handle it! */ public static final int HasMouseHoveredViewport = 1 << 11; /** - * Back-end Renderer supports multiple viewports. + * Backend Renderer supports multiple viewports. */ public static final int RendererHasViewports = 1 << 12; } diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiCol.java b/imgui-binding/src/main/java/imgui/flag/ImGuiCol.java index 286326c..4090de7 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImGuiCol.java +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiCol.java @@ -72,23 +72,43 @@ public final class ImGuiCol { public static final int PlotLinesHovered = 41; public static final int PlotHistogram = 42; public static final int PlotHistogramHovered = 43; - public static final int TextSelectedBg = 44; - public static final int DragDropTarget = 45; + /** + * Table header background + */ + public static final int TableHeaderBg = 44; + /** + * Table outer and header borders (prefer using Alpha=1.0 here) + */ + public static final int TableBorderStrong = 45; + /** + * Table inner borders (prefer using Alpha=1.0 here) + */ + public static final int TableBorderLight = 46; + /** + * Table row background (even rows) + */ + public static final int TableRowBg = 47; + /** + * Table row background (odd rows) + */ + public static final int TableRowBgAlt = 48; + public static final int TextSelectedBg = 49; + public static final int DragDropTarget = 50; /** * Gamepad/keyboard: current highlighted item */ - public static final int NavHighlight = 46; + public static final int NavHighlight = 51; /** * Highlight window when using CTRL+TAB */ - public static final int NavWindowingHighlight = 47; + public static final int NavWindowingHighlight = 52; /** * Darken/colorize entire screen behind the CTRL+TAB window list, when active */ - public static final int NavWindowingDimBg = 48; + public static final int NavWindowingDimBg = 53; /** * Darken/colorize entire screen behind a modal window, when one is active */ - public static final int ModalWindowDimBg = 49; - public static final int COUNT = 49; + public static final int ModalWindowDimBg = 54; + public static final int COUNT = 55; } diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiConfigFlags.java b/imgui-binding/src/main/java/imgui/flag/ImGuiConfigFlags.java index c1a458a..165269a 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImGuiConfigFlags.java +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiConfigFlags.java @@ -13,7 +13,7 @@ public final class ImGuiConfigFlags { */ public static final int NavEnableKeyboard = 1; /** - * Master gamepad navigation enable flag. This is mostly to instruct your imgui back-end to fill io.NavInputs[]. Back-end also needs to set ImGuiBackendFlags_HasGamepad. + * Master gamepad navigation enable flag. This is mostly to instruct your imgui backend to fill io.NavInputs[]. Backend also needs to set ImGuiBackendFlags_HasGamepad. */ public static final int NavEnableGamepad = 1 << 1; /** @@ -27,12 +27,12 @@ public final class ImGuiConfigFlags { */ public static final int NavNoCaptureKeyboard = 1 << 3; /** - * Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information set by the back-end. + * Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information set by the backend. */ public static final int NoMouse = 1 << 4; /** - * Instruct back-end to not alter mouse cursor shape and visibility. - * Use if the back-end cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. + * Instruct backend to not alter mouse cursor shape and visibility. + * Use if the backend cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. * You may want to honor requests from imgui by reading GetMouseCursor() yourself instead. */ public static final int NoMouseCursorChange = 1 << 5; @@ -47,7 +47,7 @@ public final class ImGuiConfigFlags { // When using viewports it is recommended that your default value for ImGuiCol_WindowBg is opaque (Alpha=1.0) so transition to a viewport won't be noticeable. /** - * Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_RendererHasViewports set by the respective back-ends) + * Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_RendererHasViewports set by the respective backends) */ public static final int ViewportsEnable = 1 << 10; /** @@ -61,7 +61,7 @@ public final class ImGuiConfigFlags { */ public static final int DpiEnableScaleFonts = 1 << 15; - // User storage (to allow your back-end/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core Dear ImGui) + // User storage (to allow your backend/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core Dear ImGui) /** * Application is SRGB-aware. diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiKeyModFlags.java b/imgui-binding/src/main/java/imgui/flag/ImGuiKeyModFlags.java index 1969649..5f5cfe0 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImGuiKeyModFlags.java +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiKeyModFlags.java @@ -1,7 +1,7 @@ package imgui.flag; /** - * To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/back-end) + * To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/backend) */ public final class ImGuiKeyModFlags { private ImGuiKeyModFlags() { diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiNavInput.java b/imgui-binding/src/main/java/imgui/flag/ImGuiNavInput.java index 61b604f..51e7260 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImGuiNavInput.java +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiNavInput.java @@ -5,9 +5,9 @@ package imgui.flag; * Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. * NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays. * Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. - * Back-end: set ImGuiBackendFlags_HasGamepad and fill the io.NavInputs[] fields before calling NewFrame(). + * Backend: set ImGuiBackendFlags_HasGamepad and fill the io.NavInputs[] fields before calling NewFrame(). * Note that io.NavInputs[] is cleared by EndFrame(). - * Read instructions in imgui.cpp for more details. Download PNG/PSD at http://goo.gl/9LgVZW. + * Read instructions in imgui.cpp for more details. Download PNG/PSD at http://dearimgui.org/controls_sheets. */ public final class ImGuiNavInput { private ImGuiNavInput() { diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiSortDirection.java b/imgui-binding/src/main/java/imgui/flag/ImGuiSortDirection.java new file mode 100644 index 0000000..4687f32 --- /dev/null +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiSortDirection.java @@ -0,0 +1,19 @@ +package imgui.flag; + +/** + * A sorting direction + */ +public final class ImGuiSortDirection { + private ImGuiSortDirection() { + } + + public static final int None = 0; + /** + * Ascending = {@code 0->9, A->Z} etc. + */ + public static final int Ascending = 1; + /** + * Descending = {@code 9->0, Z->A} etc. + */ + public static final int Descending = 2; +} diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiStyleVar.java b/imgui-binding/src/main/java/imgui/flag/ImGuiStyleVar.java index e4c010d..044cebd 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImGuiStyleVar.java +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiStyleVar.java @@ -77,33 +77,37 @@ public final class ImGuiStyleVar { * float IndentSpacing */ public static final int IndentSpacing = 15; + /** + * ImVec2 CellPadding + */ + public static final int CellPadding = 16; /** * float ScrollbarSize */ - public static final int ScrollbarSize = 16; + public static final int ScrollbarSize = 17; /** * float ScrollbarRounding */ - public static final int ScrollbarRounding = 17; + public static final int ScrollbarRounding = 18; /** * float GrabMinSize */ - public static final int GrabMinSize = 18; + public static final int GrabMinSize = 19; /** * float GrabRounding */ - public static final int GrabRounding = 19; + public static final int GrabRounding = 20; /** * float TabRounding */ - public static final int TabRounding = 20; + public static final int TabRounding = 21; /** * ImVec2 ButtonTextAlign */ - public static final int ButtonTextAlign = 21; + public static final int ButtonTextAlign = 22; /** * ImVec2 SelectableTextAlign */ - public static final int SelectableTextAlign = 22; - public static final int COUNT = 23; + public static final int SelectableTextAlign = 23; + public static final int COUNT = 24; } diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiTableBgTarget.java b/imgui-binding/src/main/java/imgui/flag/ImGuiTableBgTarget.java new file mode 100644 index 0000000..1706be7 --- /dev/null +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiTableBgTarget.java @@ -0,0 +1,31 @@ +package imgui.flag; + +/** + * Enum for ImGui::TableSetBgColor() + * Background colors are rendering in 3 layers: + * - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. + * - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. + * - Layer 2: draw with CellBg color if set. + * The purpose of the two row/columns layers is to let you decide if a background color changes should override or blend with the existing color. + * When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. + * If you set the color of RowBg0 target, your color will override the existing RowBg0 color. + * If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. + */ +public final class ImGuiTableBgTarget { + private ImGuiTableBgTarget() { + } + + public static final int None = 0; + /** + * Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used) + */ + public static final int RowBg0 = 1; + /** + * Set row background color 1 (generally used for selection marking) + */ + public static final int RowBg1 = 2; + /** + * Set cell background color (top-most color) + */ + public static final int CellBg = 3; +} diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiTableColumnFlags.java b/imgui-binding/src/main/java/imgui/flag/ImGuiTableColumnFlags.java new file mode 100644 index 0000000..083ea33 --- /dev/null +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiTableColumnFlags.java @@ -0,0 +1,94 @@ +package imgui.flag; + +/** + * Flags for {@link imgui.ImGui#tableSetupColumn(String, int)} + */ +public final class ImGuiTableColumnFlags { + private ImGuiTableColumnFlags() { + } + + // Input configuration flags + public static final int None = 0; + /** + * Default as a hidden/disabled column. + */ + public static final int DefaultHide = 1; + /** + * Default as a sorting column. + */ + public static final int DefaultSort = 1 << 1; + /** + * Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp). + */ + public static final int WidthStretch = 1 << 2; + /** + * Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable). + */ + public static final int WidthFixed = 1 << 3; + /** + * Disable manual resizing. + */ + public static final int NoResize = 1 << 4; + /** + * Disable manual reordering this column, this will also prevent other columns from crossing over this column. + */ + public static final int NoReorder = 1 << 5; + /** + * Disable ability to hide/disable this column. + */ + public static final int NoHide = 1 << 6; + /** + * Disable clipping for this column (all NoClip columns will render in a same draw command). + */ + public static final int NoClip = 1 << 7; + /** + * Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table). + */ + public static final int NoSort = 1 << 8; + /** + * Disable ability to sort in the ascending direction. + */ + public static final int NoSortAscending = 1 << 9; + /** + * Disable ability to sort in the descending direction. + */ + public static final int NoSortDescending = 1 << 10; + /** + * Disable header text width contribution to automatic column width. + */ + public static final int NoHeaderWidth = 1 << 11; + /** + * Make the initial sort direction Ascending when first sorting on this column (default). + */ + public static final int PreferSortAscending = 1 << 12; + /** + * Make the initial sort direction Descending when first sorting on this column. + */ + public static final int PreferSortDescending = 1 << 13; + /** + * Use current Indent value when entering cell (default for column 0). + */ + public static final int IndentEnable = 1 << 14; + /** + * Ignore current Indent value when entering cell (default for columns {@code >} 0). Indentation changes _within_ the cell will still be honored. + */ + public static final int IndentDisable = 1 << 15; + + // Output status flags, read-only via TableGetColumnFlags() + /** + * Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. + */ + public static final int IsEnabled = 1 << 20; + /** + * Status: is visible == is enabled AND not clipped by scrolling. + */ + public static final int IsVisible = 1 << 21; + /** + * Status: is currently part of the sort specs + */ + public static final int IsSorted = 1 << 22; + /** + * Status: is hovered by mouse + */ + public static final int IsHovered = 1 << 23; +} diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiTableFlags.java b/imgui-binding/src/main/java/imgui/flag/ImGuiTableFlags.java new file mode 100644 index 0000000..ccfa9f6 --- /dev/null +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiTableFlags.java @@ -0,0 +1,184 @@ +package imgui.flag; + +/** + * Flags for ImGui::BeginTable() + * [BETA API] API may evolve slightly! If you use this, please update to the next version when it comes out! + * - Important! Sizing policies have complex and subtle side effects, more so than you would expect. + * Read comments/demos carefully + experiment with live demos to get acquainted with them. + * - The DEFAULT sizing policies are: + * - Default to SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize. + * - Default to SizingStretchSame if ScrollX is off. + * - When ScrollX is off: + * - Table defaults to SizingStretchSame {@code ->} all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight. + * - Columns sizing policy allowed: Stretch (default), Fixed/Auto. + * - Fixed Columns will generally obtain their requested width (unless the table cannot fit them all). + * - Stretch Columns will share the remaining width. + * - Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors. + * The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns. + * (this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing). + * - When ScrollX is on: + * - Table defaults to SizingFixedFit {@code ->} all Columns defaults to ImGuiTableColumnFlags_WidthFixed + * - Columns sizing policy allowed: Fixed/Auto mostly. + * - Fixed Columns can be enlarged as needed. Table will show an horizontal scrollbar if needed. + * - When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop. + * - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable(). + * If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again. + * - Read on documentation at the top of imgui_tables.cpp for details. + */ +public final class ImGuiTableFlags { + private ImGuiTableFlags() { + } + + // Features + public static final int None = 0; + /** + * Enable resizing columns. + */ + public static final int Resizable = 1; + /** + * Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers) + */ + public static final int Reorderable = 1 << 1; + /** + * Enable hiding/disabling columns in context menu. + */ + public static final int Hideable = 1 << 2; + /** + * Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see SortMulti and SortTristate. + */ + public static final int Sortable = 1 << 3; + /** + * Disable persisting columns order, width and sort settings in the .ini file. + */ + public static final int NoSavedSettings = 1 << 4; + /** + * Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow(). + */ + public static final int ContextMenuInBody = 1 << 5; + + // Decorations + /** + * Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually) + */ + public static final int RowBg = 1 << 6; + /** + * Draw horizontal borders between rows. + */ + public static final int BordersInnerH = 1 << 7; + /** + * Draw horizontal borders at the top and bottom. + */ + public static final int BordersOuterH = 1 << 8; + /** + * Draw vertical borders between columns. + */ + public static final int BordersInnerV = 1 << 9; + /** + * Draw vertical borders on the left and right sides. + */ + public static final int BordersOuterV = 1 << 10; + /** + * Draw horizontal borders. + */ + public static final int BordersH = BordersInnerH | BordersOuterH; + /** + * Draw vertical borders. + */ + public static final int BordersV = BordersInnerV | BordersOuterV; + /** + * Draw inner borders. + */ + public static final int BordersInner = BordersInnerV | BordersInnerH; + /** + * Draw outer borders. + */ + public static final int BordersOuter = BordersOuterV | BordersOuterH; + /** + * Draw all borders. + */ + public static final int Borders = BordersInner | BordersOuter; + /** + * [ALPHA] Disable vertical borders in columns Body (borders will always appears in Headers). {@code ->} May move to style + */ + public static final int NoBordersInBody = 1 << 11; + /** + * [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers). {@code ->} May move to style + */ + public static final int NoBordersInBodyUntilResize = 1 << 12; + + // Sizing Policy (read above for defaults) + /** + * Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width. + */ + public static final int SizingFixedFit = 1 << 13; + /** + * Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable NoKeepColumnsVisible. + */ + public static final int SizingFixedSame = 2 << 13; + /** + * Columns default to _WidthStretch with default weights proportional to each columns contents widths. + */ + public static final int SizingStretchProp = 3 << 13; + /** + * Columns default to _WidthStretch with default weights all equal, unless overriden by TableSetupColumn(). + */ + public static final int SizingStretchSame = 4 << 13; + + // Sizing Extra Options + /** + * Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used. + */ + public static final int NoHostExtendX = 1 << 16; + /** + * Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible. + */ + public static final int NoHostExtendY = 1 << 17; + /** + * Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable. + */ + public static final int NoKeepColumnsVisible = 1 << 18; + /** + * Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). + * With larger number of columns, resizing will appear to be less smooth. + */ + public static final int PreciseWidths = 1 << 19; + + // Clipping + /** + * Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze(). + */ + public static final int NoClip = 1 << 20; + + // Padding + /** + * Default if BordersOuterV is on. Enable outer-most padding. Generally desirable if you have headers. + */ + public static final int PadOuterX = 1 << 21; + /** + * Default if BordersOuterV is off. Disable outer-most padding. + */ + public static final int NoPadOuterX = 1 << 22; + + public static final int NoPadInnerX = 1 << 23; + + // Scrolling + /** + * Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. + * Because this create a child window, ScrollY is currently generally recommended when using ScrollX. + */ + public static final int ScrollX = 1 << 24; + /** + * Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. + */ + public static final int ScrollY = 1 << 25; + + // Sorting + /** + * Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount {@code >} 1). + */ + public static final int SortMulti = 1 << 26; + /** + * Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). + */ + public static final int SortTristate = 1 << 27; +} diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiTableRowFlags.java b/imgui-binding/src/main/java/imgui/flag/ImGuiTableRowFlags.java new file mode 100644 index 0000000..1e86ace --- /dev/null +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiTableRowFlags.java @@ -0,0 +1,15 @@ +package imgui.flag; + +/** + * Flags for {@link imgui.ImGui#tableNextRow(int)} + */ +public final class ImGuiTableRowFlags { + private ImGuiTableRowFlags() { + } + + public static final int None = 0; + /** + * Identify header row (set default background color + width of its contents accounted different for auto column width) + */ + public static final int Headers = 1; +} diff --git a/imgui-binding/src/main/java/imgui/flag/ImGuiViewportFlags.java b/imgui-binding/src/main/java/imgui/flag/ImGuiViewportFlags.java index a63c95a..f67e39c 100644 --- a/imgui-binding/src/main/java/imgui/flag/ImGuiViewportFlags.java +++ b/imgui-binding/src/main/java/imgui/flag/ImGuiViewportFlags.java @@ -1,7 +1,7 @@ package imgui.flag; /** - * Flags stored in ImGuiViewport::Flags, giving indications to the platform back-ends. + * Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. */ public final class ImGuiViewportFlags { private ImGuiViewportFlags() {