diff --git a/imgui-binding/src/generated/java/imgui/internal/ImGui.java b/imgui-binding/src/generated/java/imgui/internal/ImGui.java index 0de8116c..0e59ca6a 100644 --- a/imgui-binding/src/generated/java/imgui/internal/ImGui.java +++ b/imgui-binding/src/generated/java/imgui/internal/ImGui.java @@ -1116,6 +1116,86 @@ public static void dockBuilderFinish(final int nodeId) { ImGui::DockBuilderFinish(nodeId); */ + // Tables: Candidates for public API + + public static void tableOpenContextMenu() { + nTableOpenContextMenu(); + } + + public static void tableOpenContextMenu(final int columnN) { + nTableOpenContextMenu(columnN); + } + + private static native void nTableOpenContextMenu(); /* + ImGui::TableOpenContextMenu(); + */ + + private static native void nTableOpenContextMenu(int columnN); /* + ImGui::TableOpenContextMenu(columnN); + */ + + public static void tableSetColumnWidth(final int columnN, final float width) { + nTableSetColumnWidth(columnN, width); + } + + private static native void nTableSetColumnWidth(int columnN, float width); /* + ImGui::TableSetColumnWidth(columnN, width); + */ + + public static void tableSetColumnSortDirection(final int columnN, final int sortDirection, final boolean appendToSortSpecs) { + nTableSetColumnSortDirection(columnN, sortDirection, appendToSortSpecs); + } + + private static native void nTableSetColumnSortDirection(int columnN, int sortDirection, boolean appendToSortSpecs); /* + ImGui::TableSetColumnSortDirection(columnN, static_cast(sortDirection), appendToSortSpecs); + */ + + /** + * May use {@code (TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered)} instead. Return hovered column. + * Return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered. + */ + public static int tableGetHoveredColumn() { + return nTableGetHoveredColumn(); + } + + private static native int nTableGetHoveredColumn(); /* + return ImGui::TableGetHoveredColumn(); + */ + + /** + * Retrieve *PREVIOUS FRAME* hovered row. This difference with TableGetHoveredColumn() is the reason why this is not public yet. + */ + public static int tableGetHoveredRow() { + return nTableGetHoveredRow(); + } + + private static native int nTableGetHoveredRow(); /* + return ImGui::TableGetHoveredRow(); + */ + + public static float tableGetHeaderRowHeight() { + return nTableGetHeaderRowHeight(); + } + + private static native float nTableGetHeaderRowHeight(); /* + return ImGui::TableGetHeaderRowHeight(); + */ + + public static void tablePushBackgroundChannel() { + nTablePushBackgroundChannel(); + } + + private static native void nTablePushBackgroundChannel(); /* + ImGui::TablePushBackgroundChannel(); + */ + + public static void tablePopBackgroundChannel() { + nTablePopBackgroundChannel(); + } + + private static native void nTablePopBackgroundChannel(); /* + ImGui::TablePopBackgroundChannel(); + */ // Widgets diff --git a/imgui-binding/src/main/java/imgui/internal/ImGui.java b/imgui-binding/src/main/java/imgui/internal/ImGui.java index 0782d71e..775c9a4f 100644 --- a/imgui-binding/src/main/java/imgui/internal/ImGui.java +++ b/imgui-binding/src/main/java/imgui/internal/ImGui.java @@ -334,6 +334,38 @@ public static void init() { @BindingMethod public static native void DockBuilderFinish(int nodeId); + // Tables: Candidates for public API + + @BindingMethod + public static native void TableOpenContextMenu(@OptArg int columnN); + + @BindingMethod + public static native void TableSetColumnWidth(int columnN, float width); + + @BindingMethod + public static native void TableSetColumnSortDirection(int columnN, @ArgValue(staticCast = "ImGuiSortDirection") int sortDirection, boolean appendToSortSpecs); + + /** + * May use {@code (TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered)} instead. Return hovered column. + * Return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered. + */ + @BindingMethod + public static native int TableGetHoveredColumn(); + + /** + * Retrieve *PREVIOUS FRAME* hovered row. This difference with TableGetHoveredColumn() is the reason why this is not public yet. + */ + @BindingMethod + public static native int TableGetHoveredRow(); + + @BindingMethod + public static native float TableGetHeaderRowHeight(); + + @BindingMethod + public static native void TablePushBackgroundChannel(); + + @BindingMethod + public static native void TablePopBackgroundChannel(); // Widgets