feat(api): bump Dear ImGui from 1.89.0 to 1.90.9

This commit is contained in:
SpaiR authored and GitHub committed 2025-08-26 13:33:36 +03:00
1 parent 718633e61e
commit 634e28b76a
61 files changed
+11728 -7827

No files matched your search

@@ -664,13 +664,21 @@ private fun createFieldSetContent(field: CtField<*>): List<String> {
}
} else {
result += transformMethodToContent(setAccessor, listOf(valueParam)).map {
var valueReplaceTarget = "$1"
field.getAnnotation(A_NAME_BINDING_FIELD)?.let { a ->
val staticCast = a.getValueAsString(A_VALUE_STATIC_CAST)
if (staticCast != null && staticCast.isNotEmpty()) {
valueReplaceTarget = "static_cast<$staticCast>($valueReplaceTarget)"
}
}
val fieldName = "$PTR_JNI_THIS->${field.getCallName()}"
val replaceTarget = "$PTR_JNI_THIS->${setAccessor.simpleName}\\((.+)\\)"
var replaceContent = "$fieldName = $1"
var replaceContent = "$fieldName = $valueReplaceTarget"
// When we set a string to a field we need to manually copy the string itself.
if (field.isType("String") && !field.hasAnnotation(A_NAME_TYPE_STD_STRING)) {
replaceContent = "SET_STRING_FIELD($fieldName, $1)"
replaceContent = "SET_STRING_FIELD($fieldName, $valueReplaceTarget)"
}
it.replace(replaceTarget.toRegex(), replaceContent)
@@ -1,9 +1,9 @@
{
"info" : {
"source" : "include/imguizmo/ImGuizmo.h",
"hash" : "86c265f6f4ce4a91b09950758f209579",
"hash" : "330da82032707d5d2f3bd3f474934613",
"url" : "https://github.com/CedricGuillemet/ImGuizmo.git",
"revision" : "ba662b119d64f9ab700bb2cd7b2781f9044f5565"
"revision" : "bcdd86bb8a8019b373e46921c52ef7f2fdaa8b16"
},
"decls" : [ {
"@type" : "AstNamespaceDecl",
@@ -672,6 +672,129 @@
"qualType" : "int",
"desugaredQualType" : "int"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "PushID",
"resultType" : "void",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "str_id",
"qualType" : "const char *",
"desugaredQualType" : "const char *"
}, {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : " ID stack/scopes"
}, {
"@type" : "AstTextComment",
"text" : " Read the FAQ (docs/FAQ.md or http://dearimgui.org/faq) for more details about how ID are handled in dear imgui."
}, {
"@type" : "AstTextComment",
"text" : " - Those questions are answered and impacted by understanding of the ID stack system:"
}, {
"@type" : "AstTextComment",
"text" : " - \"Q: Why is my widget not reacting when I click on it?\""
}, {
"@type" : "AstTextComment",
"text" : " - \"Q: How can I have widgets with an empty label?\""
}, {
"@type" : "AstTextComment",
"text" : " - \"Q: How can I have multiple widgets with the same label?\""
}, {
"@type" : "AstTextComment",
"text" : " - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely"
}, {
"@type" : "AstTextComment",
"text" : " want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them."
}, {
"@type" : "AstTextComment",
"text" : " - You can also use the \"Label##foobar\" syntax within widget label to distinguish them from each others."
}, {
"@type" : "AstTextComment",
"text" : " - In this header file we use the \"label\"/\"name\" terminology to denote a string that will be displayed + used as an ID,"
}, {
"@type" : "AstTextComment",
"text" : " whereas \"str_id\" denote a string that is only used as an ID and not normally displayed."
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "PushID",
"resultType" : "void",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "str_id_begin",
"qualType" : "const char *",
"desugaredQualType" : "const char *"
}, {
"@type" : "AstParmVarDecl",
"name" : "str_id_end",
"qualType" : "const char *",
"desugaredQualType" : "const char *"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "PushID",
"resultType" : "void",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "ptr_id",
"qualType" : "const void *",
"desugaredQualType" : "const void *"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "PushID",
"resultType" : "void",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "int_id",
"qualType" : "int",
"desugaredQualType" : "int"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "PopID",
"resultType" : "void"
}, {
"@type" : "AstFunctionDecl",
"name" : "GetID",
"resultType" : "int",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "str_id",
"qualType" : "const char *",
"desugaredQualType" : "const char *"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "GetID",
"resultType" : "int",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "str_id_begin",
"qualType" : "const char *",
"desugaredQualType" : "const char *"
}, {
"@type" : "AstParmVarDecl",
"name" : "str_id_end",
"qualType" : "const char *",
"desugaredQualType" : "const char *"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "GetID",
"resultType" : "int",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "ptr_id",
"qualType" : "const void *",
"desugaredQualType" : "const void *"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "IsOver",
@@ -745,6 +868,35 @@
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "SetAxisMask",
"resultType" : "void",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "x",
"qualType" : "bool",
"desugaredQualType" : "bool"
}, {
"@type" : "AstParmVarDecl",
"name" : "y",
"qualType" : "bool",
"desugaredQualType" : "bool"
}, {
"@type" : "AstParmVarDecl",
"name" : "z",
"qualType" : "bool",
"desugaredQualType" : "bool"
}, {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : " Set an axis mask to permanently hide a given axis (true -> hidden, false -> shown)"
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "SetPlaneLimit",
@@ -764,6 +916,30 @@
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "IsOver",
"resultType" : "bool",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "position",
"qualType" : "float *",
"desugaredQualType" : "float *"
}, {
"@type" : "AstParmVarDecl",
"name" : "pixelRadius",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : " from a x,y,z point in space and using Manipulation view/projection matrix, check if mouse is in pixel radius distance of that projected point"
} ]
} ]
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "COLOR",
File diff suppressed because it is too large. Load diff
@@ -1,9 +1,9 @@
{
"info" : {
"source" : "include/imgui/misc/freetype/imgui_freetype.h",
"hash" : "70fc81810854ab5f439f8e1ea0536285",
"hash" : "b08898b2e1013c180b4ee5b2846938bf",
"url" : "https://github.com/ocornut/imgui",
"revision" : "1d8e48c161370c37628c4f37f3f87cb19fbcb723"
"revision" : "3369cbd2776d7567ac198b1a3017a4fa2d547cc3"
},
"decls" : [ {
"@type" : "AstRecordDecl",
@@ -165,22 +165,6 @@
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "BuildFontAtlas",
"resultType" : "bool",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "atlas",
"qualType" : "ImFontAtlas *",
"desugaredQualType" : "ImFontAtlas *"
}, {
"@type" : "AstParmVarDecl",
"name" : "flags",
"qualType" : "unsigned int",
"desugaredQualType" : "unsigned int",
"defaultValue" : "0"
} ]
} ]
} ]
}
File diff suppressed because it is too large. Load diff
@@ -1,9 +1,9 @@
{
"info" : {
"source" : "include/implot/implot.h",
"hash" : "7503718ef8ef1a6302f0083bfdc0997f",
"hash" : "26beb5cb000f8e7982b3d2e46693fc78",
"url" : "https://github.com/epezent/implot.git",
"revision" : "18c72431f8265e2b0b5378a3a73d8a883b2175ff"
"revision" : "1f7a8c0314d838a76695bccebe0f66864f507bc0"
},
"decls" : [ {
"@type" : "AstRecordDecl",
@@ -151,41 +151,33 @@
"evaluatedValue" : 32
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ImPlotFlags_NoChild",
"docComment" : "a child window region will not be used to capture mouse scroll (can boost performance for single ImGui window applications)",
"name" : "ImPlotFlags_NoFrame",
"docComment" : "the ImGui frame will not be rendered",
"qualType" : "ImPlotFlags_",
"order" : 7,
"value" : "1 << 6",
"evaluatedValue" : 64
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ImPlotFlags_NoFrame",
"docComment" : "the ImGui frame will not be rendered",
"name" : "ImPlotFlags_Equal",
"docComment" : "x and y axes pairs will be constrained to have the same units/pixel",
"qualType" : "ImPlotFlags_",
"order" : 8,
"value" : "1 << 7",
"evaluatedValue" : 128
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ImPlotFlags_Equal",
"docComment" : "x and y axes pairs will be constrained to have the same units/pixel",
"name" : "ImPlotFlags_Crosshairs",
"docComment" : "the default mouse cursor will be replaced with a crosshair when hovered",
"qualType" : "ImPlotFlags_",
"order" : 9,
"value" : "1 << 8",
"evaluatedValue" : 256
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ImPlotFlags_Crosshairs",
"docComment" : "the default mouse cursor will be replaced with a crosshair when hovered",
"qualType" : "ImPlotFlags_",
"order" : 10,
"value" : "1 << 9",
"evaluatedValue" : 512
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ImPlotFlags_CanvasOnly",
"qualType" : "ImPlotFlags_",
"order" : 11,
"order" : 10,
"value" : "ImPlotFlags_NoTitle | ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect | ImPlotFlags_NoMouseText",
"evaluatedValue" : 55
} ]
@@ -1053,6 +1045,14 @@
"order" : 1,
"value" : "1 << 10",
"evaluatedValue" : 1024
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ImPlotPieChartFlags_IgnoreHidden",
"docComment" : "ignore hidden slices when drawing the pie chart (as if they were not there)",
"qualType" : "ImPlotPieChartFlags_",
"order" : 2,
"value" : "1 << 11",
"evaluatedValue" : 2048
} ]
}, {
"@type" : "AstEnumDecl",
@@ -3303,7 +3303,7 @@
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : " Sets up the plot legend."
"text" : " Sets up the plot legend. This can also be called immediately after BeginSubplots when using ImPlotSubplotFlags_ShareItems."
} ]
} ]
} ]
@@ -3847,6 +3847,24 @@
"qualType" : "ImPlotDragToolFlags",
"desugaredQualType" : "int",
"defaultValue" : "0"
}, {
"@type" : "AstParmVarDecl",
"name" : "out_clicked",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "out_hovered",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "held",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstFullComment",
"decls" : [ {
@@ -3888,6 +3906,24 @@
"qualType" : "ImPlotDragToolFlags",
"desugaredQualType" : "int",
"defaultValue" : "0"
}, {
"@type" : "AstParmVarDecl",
"name" : "out_clicked",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "out_hovered",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "held",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstFullComment",
"decls" : [ {
@@ -3929,6 +3965,24 @@
"qualType" : "ImPlotDragToolFlags",
"desugaredQualType" : "int",
"defaultValue" : "0"
}, {
"@type" : "AstParmVarDecl",
"name" : "out_clicked",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "out_hovered",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "held",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstFullComment",
"decls" : [ {
@@ -3979,6 +4033,24 @@
"qualType" : "ImPlotDragToolFlags",
"desugaredQualType" : "int",
"defaultValue" : "0"
}, {
"@type" : "AstParmVarDecl",
"name" : "out_clicked",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "out_hovered",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstParmVarDecl",
"name" : "held",
"qualType" : "bool *",
"desugaredQualType" : "bool *",
"defaultValue" : "="
}, {
"@type" : "AstFullComment",
"decls" : [ {
@@ -1,5 +1,4 @@
import imgui.ImGui;
import imgui.ImVec2;
import imgui.extension.imguizmo.ImGuizmo;
import imgui.extension.imguizmo.flag.Mode;
import imgui.extension.imguizmo.flag.Operation;
@@ -66,6 +66,19 @@ public final class ImDrawList extends ImGuiStruct {
THIS->Flags = value;
*/
// [Internal, used while building lists]
/**
* [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to 0.
*/
public int getVtxCurrentIdx() {
return nGetVtxCurrentIdx();
}
private native int nGetVtxCurrentIdx(); /*
return THIS->_VtxCurrentIdx;
*/
/**
* Render-level scissoring.
* This is passed down to your render function but not used for CPU-side coarse clipping.
@@ -606,6 +619,104 @@ public final class ImDrawList extends ImGuiStruct {
THIS->AddNgonFilled(center, radius, col, num_segments);
*/
public void addEllipse(final ImVec2 center, final ImVec2 radius, final int col) {
nAddEllipse(center.x, center.y, radius.x, radius.y, col);
}
public void addEllipse(final float centerX, final float centerY, final float radiusX, final float radiusY, final int col) {
nAddEllipse(centerX, centerY, radiusX, radiusY, col);
}
public void addEllipse(final ImVec2 center, final ImVec2 radius, final int col, final float rot) {
nAddEllipse(center.x, center.y, radius.x, radius.y, col, rot);
}
public void addEllipse(final float centerX, final float centerY, final float radiusX, final float radiusY, final int col, final float rot) {
nAddEllipse(centerX, centerY, radiusX, radiusY, col, rot);
}
public void addEllipse(final ImVec2 center, final ImVec2 radius, final int col, final float rot, final float numSegments) {
nAddEllipse(center.x, center.y, radius.x, radius.y, col, rot, numSegments);
}
public void addEllipse(final float centerX, final float centerY, final float radiusX, final float radiusY, final int col, final float rot, final float numSegments) {
nAddEllipse(centerX, centerY, radiusX, radiusY, col, rot, numSegments);
}
public void addEllipse(final ImVec2 center, final ImVec2 radius, final int col, final float rot, final float numSegments, final float thickness) {
nAddEllipse(center.x, center.y, radius.x, radius.y, col, rot, numSegments, thickness);
}
public void addEllipse(final float centerX, final float centerY, final float radiusX, final float radiusY, final int col, final float rot, final float numSegments, final float thickness) {
nAddEllipse(centerX, centerY, radiusX, radiusY, col, rot, numSegments, thickness);
}
private native void nAddEllipse(float centerX, float centerY, float radiusX, float radiusY, int col); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->AddEllipse(center, radius, col);
*/
private native void nAddEllipse(float centerX, float centerY, float radiusX, float radiusY, int col, float rot); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->AddEllipse(center, radius, col, rot);
*/
private native void nAddEllipse(float centerX, float centerY, float radiusX, float radiusY, int col, float rot, float numSegments); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->AddEllipse(center, radius, col, rot, numSegments);
*/
private native void nAddEllipse(float centerX, float centerY, float radiusX, float radiusY, int col, float rot, float numSegments, float thickness); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->AddEllipse(center, radius, col, rot, numSegments, thickness);
*/
public void addEllipseFilled(final ImVec2 center, final ImVec2 radius, final int col) {
nAddEllipseFilled(center.x, center.y, radius.x, radius.y, col);
}
public void addEllipseFilled(final float centerX, final float centerY, final float radiusX, final float radiusY, final int col) {
nAddEllipseFilled(centerX, centerY, radiusX, radiusY, col);
}
public void addEllipseFilled(final ImVec2 center, final ImVec2 radius, final int col, final float rot) {
nAddEllipseFilled(center.x, center.y, radius.x, radius.y, col, rot);
}
public void addEllipseFilled(final float centerX, final float centerY, final float radiusX, final float radiusY, final int col, final float rot) {
nAddEllipseFilled(centerX, centerY, radiusX, radiusY, col, rot);
}
public void addEllipseFilled(final ImVec2 center, final ImVec2 radius, final int col, final float rot, final float numSegments) {
nAddEllipseFilled(center.x, center.y, radius.x, radius.y, col, rot, numSegments);
}
public void addEllipseFilled(final float centerX, final float centerY, final float radiusX, final float radiusY, final int col, final float rot, final float numSegments) {
nAddEllipseFilled(centerX, centerY, radiusX, radiusY, col, rot, numSegments);
}
private native void nAddEllipseFilled(float centerX, float centerY, float radiusX, float radiusY, int col); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->AddEllipseFilled(center, radius, col);
*/
private native void nAddEllipseFilled(float centerX, float centerY, float radiusX, float radiusY, int col, float rot); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->AddEllipseFilled(center, radius, col, rot);
*/
private native void nAddEllipseFilled(float centerX, float centerY, float radiusX, float radiusY, int col, float rot, float numSegments); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->AddEllipseFilled(center, radius, col, rot, numSegments);
*/
public void addText(final ImVec2 pos, final int col, final String textBegin) {
nAddText(pos.x, pos.y, col, textBegin);
}
@@ -755,38 +866,6 @@ public final class ImDrawList extends ImGuiStruct {
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
*/
public void addPolyline(final ImVec2[] points, final int numPoint, final int col, final int imDrawFlags, final float thickness) {
nAddPolyline(points, numPoint, col, imDrawFlags, thickness);
}
private native void nAddPolyline(ImVec2[] obj_points, int numPoint, int col, int imDrawFlags, float thickness); /*MANUAL
int pointsLength = env->GetArrayLength(obj_points);
ImVec2 points[pointsLength];
for (int i = 0; i < pointsLength; i++) {
jobject src = env->GetObjectArrayElement(obj_points, i);
ImVec2 dst;
Jni::ImVec2Cpy(env, src, &dst);
points[i] = dst;
};
THIS->AddPolyline(points, numPoint, col, imDrawFlags, thickness);
*/
public void addConvexPolyFilled(final ImVec2[] points, final int numPoints, final int col) {
nAddConvexPolyFilled(points, numPoints, col);
}
private native void nAddConvexPolyFilled(ImVec2[] obj_points, int numPoints, int col); /*MANUAL
int pointsLength = env->GetArrayLength(obj_points);
ImVec2 points[pointsLength];
for (int i = 0; i < pointsLength; i++) {
jobject src = env->GetObjectArrayElement(obj_points, i);
ImVec2 dst;
Jni::ImVec2Cpy(env, src, &dst);
points[i] = dst;
};
THIS->AddConvexPolyFilled(points, numPoints, col);
*/
/**
* Cubic Bezier (4 control points)
*/
@@ -873,6 +952,58 @@ public final class ImDrawList extends ImGuiStruct {
THIS->AddBezierQuadratic(p1, p2, p3, col, thickness, numSegments);
*/
// General polygon
// - Only simple polygons are supported by filling functions (no self-intersections, no holes).
// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience fo user but not used by main library.
public void addPolyline(final ImVec2[] points, final int numPoints, final int col, final int imDrawFlags, final float thickness) {
nAddPolyline(points, numPoints, col, imDrawFlags, thickness);
}
private native void nAddPolyline(ImVec2[] obj_points, int numPoints, int col, int imDrawFlags, float thickness); /*MANUAL
int pointsLength = env->GetArrayLength(obj_points);
ImVec2 points[pointsLength];
for (int i = 0; i < pointsLength; i++) {
jobject src = env->GetObjectArrayElement(obj_points, i);
ImVec2 dst;
Jni::ImVec2Cpy(env, src, &dst);
points[i] = dst;
};
THIS->AddPolyline(points, numPoints, col, imDrawFlags, thickness);
*/
public void addConvexPolyFilled(final ImVec2[] points, final int numPoints, final int col) {
nAddConvexPolyFilled(points, numPoints, col);
}
private native void nAddConvexPolyFilled(ImVec2[] obj_points, int numPoints, int col); /*MANUAL
int pointsLength = env->GetArrayLength(obj_points);
ImVec2 points[pointsLength];
for (int i = 0; i < pointsLength; i++) {
jobject src = env->GetObjectArrayElement(obj_points, i);
ImVec2 dst;
Jni::ImVec2Cpy(env, src, &dst);
points[i] = dst;
};
THIS->AddConvexPolyFilled(points, numPoints, col);
*/
public void addConcavePolyFilled(final ImVec2[] points, final int numPoints, final int col) {
nAddConcavePolyFilled(points, numPoints, col);
}
private native void nAddConcavePolyFilled(ImVec2[] obj_points, int numPoints, int col); /*MANUAL
int pointsLength = env->GetArrayLength(obj_points);
ImVec2 points[pointsLength];
for (int i = 0; i < pointsLength; i++) {
jobject src = env->GetObjectArrayElement(obj_points, i);
ImVec2 dst;
Jni::ImVec2Cpy(env, src, &dst);
points[i] = dst;
};
THIS->AddConcavePolyFilled(points, numPoints, col);
*/
// Image primitives
// - Read FAQ to understand what ImTextureID is.
// - "pMin" and "pMax" represent the upper-left and lower-right corners of the rectangle.
@@ -1082,7 +1213,8 @@ public final class ImDrawList extends ImGuiStruct {
*/
// Stateful path API, add points then finish with PathFillConvex() or PathStroke()
// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex().
public void pathClear() {
nPathClear();
@@ -1129,6 +1261,14 @@ public final class ImDrawList extends ImGuiStruct {
THIS->PathFillConvex(col);
*/
public void pathFillConcave(final int col) {
nPathFillConcave(col);
}
private native void nPathFillConcave(int col); /*
THIS->PathFillConcave(col);
*/
public void pathStroke(final int col) {
nPathStroke(col);
}
@@ -1206,6 +1346,34 @@ public final class ImDrawList extends ImGuiStruct {
THIS->PathArcToFast(center, radius, aMinOf12, aMaxOf12);
*/
public void pathEllipticalArcTo(final ImVec2 center, final ImVec2 radius, final float rot, final float aMin, final float aMax) {
nPathEllipticalArcTo(center.x, center.y, radius.x, radius.y, rot, aMin, aMax);
}
public void pathEllipticalArcTo(final float centerX, final float centerY, final float radiusX, final float radiusY, final float rot, final float aMin, final float aMax) {
nPathEllipticalArcTo(centerX, centerY, radiusX, radiusY, rot, aMin, aMax);
}
public void pathEllipticalArcTo(final ImVec2 center, final ImVec2 radius, final float rot, final float aMin, final float aMax, final int numSegments) {
nPathEllipticalArcTo(center.x, center.y, radius.x, radius.y, rot, aMin, aMax, numSegments);
}
public void pathEllipticalArcTo(final float centerX, final float centerY, final float radiusX, final float radiusY, final float rot, final float aMin, final float aMax, final int numSegments) {
nPathEllipticalArcTo(centerX, centerY, radiusX, radiusY, rot, aMin, aMax, numSegments);
}
private native void nPathEllipticalArcTo(float centerX, float centerY, float radiusX, float radiusY, float rot, float aMin, float aMax); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->PathEllipticalArcTo(center, radius, rot, aMin, aMax);
*/
private native void nPathEllipticalArcTo(float centerX, float centerY, float radiusX, float radiusY, float rot, float aMin, float aMax, int numSegments); /*MANUAL
ImVec2 center = ImVec2(centerX, centerY);
ImVec2 radius = ImVec2(radiusX, radiusY);
THIS->PathEllipticalArcTo(center, radius, rot, aMin, aMax, numSegments);
*/
/**
* Cubic Bezier (4 control points)
*/
@@ -200,61 +200,61 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
* Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
* Set font_cfg.FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed.
*/
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontSize, final float sizePixels) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontSize, sizePixels));
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontDataSize, final float sizePixels) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontDataSize, sizePixels));
}
/**
* Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
* Set font_cfg.FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed.
*/
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontSize, final float sizePixels, final ImFontConfig fontConfig) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontSize, sizePixels, fontConfig.ptr));
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontDataSize, final float sizePixels, final ImFontConfig fontConfig) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontDataSize, sizePixels, fontConfig.ptr));
}
/**
* Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
* Set font_cfg.FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed.
*/
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontSize, final float sizePixels, final ImFontConfig fontConfig, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontSize, sizePixels, fontConfig.ptr, glyphRanges));
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontDataSize, final float sizePixels, final ImFontConfig fontConfig, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontDataSize, sizePixels, fontConfig.ptr, glyphRanges));
}
/**
* Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
* Set font_cfg.FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed.
*/
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontSize, final float sizePixels, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontSize, sizePixels, glyphRanges));
public ImFont addFontFromMemoryTTF(final byte[] fontData, final int fontDataSize, final float sizePixels, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryTTF(fontData, fontDataSize, sizePixels, glyphRanges));
}
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontSize, float sizePixels); /*MANUAL
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontDataSize, float sizePixels); /*MANUAL
auto fontData = obj_fontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_fontData, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontSize, sizePixels);
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontDataSize, sizePixels);
if (fontData != NULL) env->ReleasePrimitiveArrayCritical(obj_fontData, fontData, JNI_FALSE);
return _result;
*/
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontSize, float sizePixels, long fontConfig); /*MANUAL
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontDataSize, float sizePixels, long fontConfig); /*MANUAL
auto fontData = obj_fontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_fontData, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontSize, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig));
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontDataSize, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig));
if (fontData != NULL) env->ReleasePrimitiveArrayCritical(obj_fontData, fontData, JNI_FALSE);
return _result;
*/
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontSize, float sizePixels, long fontConfig, short[] obj_glyphRanges); /*MANUAL
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontDataSize, float sizePixels, long fontConfig, short[] obj_glyphRanges); /*MANUAL
auto fontData = obj_fontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_fontData, JNI_FALSE);
auto glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontSize, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig), (ImWchar*)&glyphRanges[0]);
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontDataSize, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig), (ImWchar*)&glyphRanges[0]);
if (fontData != NULL) env->ReleasePrimitiveArrayCritical(obj_fontData, fontData, JNI_FALSE);
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
return _result;
*/
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontSize, float sizePixels, short[] obj_glyphRanges); /*MANUAL
private native long nAddFontFromMemoryTTF(byte[] obj_fontData, int fontDataSize, float sizePixels, short[] obj_glyphRanges); /*MANUAL
auto fontData = obj_fontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_fontData, JNI_FALSE);
auto glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontSize, sizePixels, NULL, (ImWchar*)&glyphRanges[0]);
auto _result = (uintptr_t)THIS->AddFontFromMemoryTTF(&fontData[0], fontDataSize, sizePixels, NULL, (ImWchar*)&glyphRanges[0]);
if (fontData != NULL) env->ReleasePrimitiveArrayCritical(obj_fontData, fontData, JNI_FALSE);
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
return _result;
@@ -323,58 +323,58 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
/**
* 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
*/
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontSize, final float sizePixels) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontSize, sizePixels));
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontDataSize, final float sizePixels) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontDataSize, sizePixels));
}
/**
* 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
*/
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontSize, final float sizePixels, final ImFontConfig imFontConfig) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontSize, sizePixels, imFontConfig.ptr));
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontDataSize, final float sizePixels, final ImFontConfig imFontConfig) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontDataSize, sizePixels, imFontConfig.ptr));
}
/**
* 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
*/
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontSize, final float sizePixels, final ImFontConfig imFontConfig, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontSize, sizePixels, imFontConfig.ptr, glyphRanges));
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontDataSize, final float sizePixels, final ImFontConfig imFontConfig, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontDataSize, sizePixels, imFontConfig.ptr, glyphRanges));
}
/**
* 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
*/
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontSize, final float sizePixels, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontSize, sizePixels, glyphRanges));
public ImFont addFontFromMemoryCompressedTTF(final byte[] compressedFontData, final int compressedFontDataSize, final float sizePixels, final short[] glyphRanges) {
return new ImFont(nAddFontFromMemoryCompressedTTF(compressedFontData, compressedFontDataSize, sizePixels, glyphRanges));
}
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontSize, float sizePixels); /*MANUAL
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontDataSize, float sizePixels); /*MANUAL
auto compressedFontData = obj_compressedFontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_compressedFontData, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontSize, sizePixels);
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontDataSize, sizePixels);
if (compressedFontData != NULL) env->ReleasePrimitiveArrayCritical(obj_compressedFontData, compressedFontData, JNI_FALSE);
return _result;
*/
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontSize, float sizePixels, long imFontConfig); /*MANUAL
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontDataSize, float sizePixels, long imFontConfig); /*MANUAL
auto compressedFontData = obj_compressedFontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_compressedFontData, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontSize, sizePixels, reinterpret_cast<ImFontConfig*>(imFontConfig));
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontDataSize, sizePixels, reinterpret_cast<ImFontConfig*>(imFontConfig));
if (compressedFontData != NULL) env->ReleasePrimitiveArrayCritical(obj_compressedFontData, compressedFontData, JNI_FALSE);
return _result;
*/
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontSize, float sizePixels, long imFontConfig, short[] obj_glyphRanges); /*MANUAL
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontDataSize, float sizePixels, long imFontConfig, short[] obj_glyphRanges); /*MANUAL
auto compressedFontData = obj_compressedFontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_compressedFontData, JNI_FALSE);
auto glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontSize, sizePixels, reinterpret_cast<ImFontConfig*>(imFontConfig), (ImWchar*)&glyphRanges[0]);
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontDataSize, sizePixels, reinterpret_cast<ImFontConfig*>(imFontConfig), (ImWchar*)&glyphRanges[0]);
if (compressedFontData != NULL) env->ReleasePrimitiveArrayCritical(obj_compressedFontData, compressedFontData, JNI_FALSE);
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
return _result;
*/
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontSize, float sizePixels, short[] obj_glyphRanges); /*MANUAL
private native long nAddFontFromMemoryCompressedTTF(byte[] obj_compressedFontData, int compressedFontDataSize, float sizePixels, short[] obj_glyphRanges); /*MANUAL
auto compressedFontData = obj_compressedFontData == NULL ? NULL : (char*)env->GetPrimitiveArrayCritical(obj_compressedFontData, JNI_FALSE);
auto glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontSize, sizePixels, NULL, (ImWchar*)&glyphRanges[0]);
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedTTF(&compressedFontData[0], compressedFontDataSize, sizePixels, NULL, (ImWchar*)&glyphRanges[0]);
if (compressedFontData != NULL) env->ReleasePrimitiveArrayCritical(obj_compressedFontData, compressedFontData, JNI_FALSE);
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
return _result;
@@ -674,11 +674,12 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
//-------------------------------------------
// You can request arbitrary rectangles to be packed into the atlas, for your own purposes.
// After calling Build(), you can query the rectangle position and render your pixels.
// You can also request your rectangles to be mapped as font glyph (given a font + Unicode point),
// so you can render e.g. custom colorful icons and use them as regular glyphs.
// Read docs/FONTS.md for more details about using colorful icons.
// Note: this API may be redesigned later in order to support multi-monitor varying DPI settings.
// - After calling Build(), you can query the rectangle position and render your pixels.
// - If you render colored output, set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format.
// - You can also request your rectangles to be mapped as font glyph (given a font + Unicode point),
// so you can render e.g. custom colorful icons and use them as regular glyphs.
// - Read docs/FONTS.md for more details about using colorful icons.
// - Note: this API may be redesigned later in order to support multi-monitor varying DPI settings.
public int addCustomRectRegular(final int width, final int height) {
return nAddCustomRectRegular(width, height);
@@ -484,6 +484,28 @@ public final class ImFontConfig extends ImGuiStructDestroyable {
THIS->RasterizerMultiply = value;
*/
/**
* DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered.
*/
public float getRasterizerDensity() {
return nGetRasterizerDensity();
}
/**
* DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered.
*/
public void setRasterizerDensity(final float value) {
nSetRasterizerDensity(value);
}
private native float nGetRasterizerDensity(); /*
return THIS->RasterizerDensity;
*/
private native void nSetRasterizerDensity(float value); /*
THIS->RasterizerDensity = value;
*/
/**
* Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
*/
File diff suppressed because it is too large. Load diff
@@ -916,6 +916,34 @@ public final class ImGuiIO extends ImGuiStruct {
// Debug options
//------------------------------------------------------------------
/**
* Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro.
* - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability.
* - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application.
* e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
*/
public boolean getConfigDebugIsDebuggerPresent() {
return nGetConfigDebugIsDebuggerPresent();
}
/**
* Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro.
* - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability.
* - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application.
* e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
*/
public void setConfigDebugIsDebuggerPresent(final boolean value) {
nSetConfigDebugIsDebuggerPresent(value);
}
private native boolean nGetConfigDebugIsDebuggerPresent(); /*
return THIS->ConfigDebugIsDebuggerPresent;
*/
private native void nSetConfigDebugIsDebuggerPresent(boolean value); /*
THIS->ConfigDebugIsDebuggerPresent = value;
*/
/**
* Tools to test correct Begin/End and BeginChild/EndChild behaviors.
* Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()
@@ -1301,6 +1329,28 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->ClearEventsQueue();
*/
/**
* Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
*/
public void clearInputKeys() {
nClearInputKeys();
}
private native void nClearInputKeys(); /*
THIS->ClearInputKeys();
*/
/**
* Clear current mouse state.
*/
public void clearInputMouse() {
nClearInputMouse();
}
private native void nClearInputMouse(); /*
THIS->ClearInputMouse();
*/
//------------------------------------------------------------------
// Output - Updated by NewFrame() or EndFrame()/Render()
// (when reading from the io.WantCaptureMouse, io.WantCaptureKeyboard flags to dispatch your inputs, it is
@@ -1589,28 +1639,6 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->MetricsActiveWindows = value;
*/
/**
* Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
*/
public int getMetricsActiveAllocations() {
return nGetMetricsActiveAllocations();
}
/**
* Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
*/
public void setMetricsActiveAllocations(final int value) {
nSetMetricsActiveAllocations(value);
}
private native int nGetMetricsActiveAllocations(); /*
return THIS->MetricsActiveAllocations;
*/
private native void nSetMetricsActiveAllocations(int value); /*
THIS->MetricsActiveAllocations = value;
*/
/**
* Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
*/
@@ -1672,176 +1700,6 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->MouseDelta = value;
*/
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
@Deprecated
public int[] getKeyMap() {
return nGetKeyMap();
}
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
@Deprecated
public int getKeyMap(final int idx) {
return nGetKeyMap(idx);
}
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
@Deprecated
public void setKeyMap(final int[] value) {
nSetKeyMap(value);
}
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
@Deprecated
public void setKeyMap(final int idx, final int value) {
nSetKeyMap(idx, value);
}
@Deprecated
private native int[] nGetKeyMap(); /*
jint jBuf[ImGuiKey_COUNT];
for (int i = 0; i < ImGuiKey_COUNT; i++)
jBuf[i] = THIS->KeyMap[i];
jintArray result = env->NewIntArray(ImGuiKey_COUNT);
env->SetIntArrayRegion(result, 0, ImGuiKey_COUNT, jBuf);
return result;
*/
@Deprecated
private native int nGetKeyMap(int idx); /*
return THIS->KeyMap[idx];
*/
@Deprecated
private native void nSetKeyMap(int[] value); /*
for (int i = 0; i < ImGuiKey_COUNT; i++)
THIS->KeyMap[i] = value[i];
*/
@Deprecated
private native void nSetKeyMap(int idx, int value); /*
THIS->KeyMap[idx] = value;
*/
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
*/
@Deprecated
public boolean[] getKeysDown() {
return nGetKeysDown();
}
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
*/
@Deprecated
public boolean getKeysDown(final int idx) {
return nGetKeysDown(idx);
}
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
*/
@Deprecated
public void setKeysDown(final boolean[] value) {
nSetKeysDown(value);
}
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
*/
@Deprecated
public void setKeysDown(final int idx, final boolean value) {
nSetKeysDown(idx, value);
}
@Deprecated
private native boolean[] nGetKeysDown(); /*
jboolean jBuf[ImGuiKey_COUNT];
for (int i = 0; i < ImGuiKey_COUNT; i++)
jBuf[i] = THIS->KeysDown[i];
jbooleanArray result = env->NewBooleanArray(ImGuiKey_COUNT);
env->SetBooleanArrayRegion(result, 0, ImGuiKey_COUNT, jBuf);
return result;
*/
@Deprecated
private native boolean nGetKeysDown(int idx); /*
return THIS->KeysDown[idx];
*/
@Deprecated
private native void nSetKeysDown(boolean[] value); /*
for (int i = 0; i < ImGuiKey_COUNT; i++)
THIS->KeysDown[i] = value[i];
*/
@Deprecated
private native void nSetKeysDown(int idx, boolean value); /*
THIS->KeysDown[idx] = value;
*/
/**
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
*/
public float[] getNavInputs() {
return nGetNavInputs();
}
/**
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
*/
public float getNavInputs(final int idx) {
return nGetNavInputs(idx);
}
/**
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
*/
public void setNavInputs(final float[] value) {
nSetNavInputs(value);
}
/**
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
*/
public void setNavInputs(final int idx, final float value) {
nSetNavInputs(idx, value);
}
private native float[] nGetNavInputs(); /*
jfloat jBuf[512];
for (int i = 0; i < 512; i++)
jBuf[i] = THIS->NavInputs[i];
jfloatArray result = env->NewFloatArray(512);
env->SetFloatArrayRegion(result, 0, 512, jBuf);
return result;
*/
private native float nGetNavInputs(int idx); /*
return THIS->NavInputs[idx];
*/
private native void nSetNavInputs(float[] value); /*
for (int i = 0; i < 512; i++)
THIS->NavInputs[i] = value[i];
*/
private native void nSetNavInputs(int idx, float value); /*
THIS->NavInputs[idx] = value;
*/
//------------------------------------------------------------------
// [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
//------------------------------------------------------------------
@@ -2719,6 +2577,28 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->MouseWheelRequestAxisSwap = value;
*/
/**
* (OSX) Set to true when the current click was a ctrl-click that spawned a simulated right click.
*/
public boolean getMouseCtrlLeftAsRightClick() {
return nGetMouseCtrlLeftAsRightClick();
}
/**
* (OSX) Set to true when the current click was a ctrl-click that spawned a simulated right click.
*/
public void setMouseCtrlLeftAsRightClick(final boolean value) {
nSetMouseCtrlLeftAsRightClick(value);
}
private native boolean nGetMouseCtrlLeftAsRightClick(); /*
return THIS->MouseCtrlLeftAsRightClick;
*/
private native void nSetMouseCtrlLeftAsRightClick(boolean value); /*
THIS->MouseCtrlLeftAsRightClick = value;
*/
/**
* Duration the mouse button has been down (0.0f == just clicked)
*/
@@ -119,17 +119,6 @@ public final class ImGuiStorage extends ImGuiStructDestroyable {
THIS->SetFloat(key, val);
*/
/**
* Use on your own storage if you know only integer are being stored (open/close all tree nodes)
*/
public void setAllInt(final int val) {
nSetAllInt(val);
}
private native void nSetAllInt(int val); /*
THIS->SetAllInt(val);
*/
/**
* For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and then sort once.
*/
@@ -141,6 +130,17 @@ public final class ImGuiStorage extends ImGuiStructDestroyable {
THIS->BuildSortByKey();
*/
/**
* Use on your own storage if you know only integer are being stored (open/close all tree nodes)
*/
public void setAllInt(final int val) {
nSetAllInt(val);
}
private native void nSetAllInt(int val); /*
THIS->SetAllInt(val);
*/
/*JNI
#undef THIS
*/
@@ -322,7 +322,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
*/
private native void nSetWindowMenuButtonPosition(int value); /*
THIS->WindowMenuButtonPosition = value;
THIS->WindowMenuButtonPosition = static_cast<ImGuiDir>(value);
*/
/**
@@ -1009,7 +1009,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
*/
private native void nSetColorButtonPosition(int value); /*
THIS->ColorButtonPosition = value;
THIS->ColorButtonPosition = static_cast<ImGuiDir>(value);
*/
/**
@@ -80,6 +80,28 @@ public final class ImGuiWindowClass extends ImGuiStructDestroyable {
THIS->ParentViewportId = value;
*/
/**
* ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will succeed when this window is focused.
*/
public int getFocusRouteParentWindowId() {
return nGetFocusRouteParentWindowId();
}
/**
* ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will succeed when this window is focused.
*/
public void setFocusRouteParentWindowId(final int value) {
nSetFocusRouteParentWindowId(value);
}
private native int nGetFocusRouteParentWindowId(); /*
return THIS->FocusRouteParentWindowId;
*/
private native void nSetFocusRouteParentWindowId(int value); /*
THIS->FocusRouteParentWindowId = value;
*/
/**
* Viewport flags to set when a window of this class owns a viewport.
* This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis.
@@ -55,32 +55,25 @@ public final class ImPlotFlags {
public static final int NoBoxSelect = 32;
/**
* a child window region will not be used to capture mouse scroll (can boost performance for single ImGui window applications)
* the ImGui frame will not be rendered
*
* <p>Definition: {@code 1 << 6}
*/
public static final int NoChild = 64;
/**
* the ImGui frame will not be rendered
*
* <p>Definition: {@code 1 << 7}
*/
public static final int NoFrame = 128;
public static final int NoFrame = 64;
/**
* x and y axes pairs will be constrained to have the same units/pixel
*
* <p>Definition: {@code 1 << 8}
* <p>Definition: {@code 1 << 7}
*/
public static final int Equal = 256;
public static final int Equal = 128;
/**
* the default mouse cursor will be replaced with a crosshair when hovered
*
* <p>Definition: {@code 1 << 9}
* <p>Definition: {@code 1 << 8}
*/
public static final int Crosshairs = 512;
public static final int Crosshairs = 256;
/**
* Definition: {@code ImPlotFlags_NoTitle | ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect | ImPlotFlags_NoMouseText}
@@ -18,4 +18,11 @@ public final class ImPlotPieChartFlags {
* <p>Definition: {@code 1 << 10}
*/
public static final int Normalize = 1024;
/**
* ignore hidden slices when drawing the pie chart (as if they were not there)
*
* <p>Definition: {@code 1 << 11}
*/
public static final int IgnoreHidden = 2048;
}
@@ -37,11 +37,4 @@ public final class ImGuiButtonFlags {
* <p>Definition: {@code ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle}
*/
public static final int MouseButtonMask_ = 7;
/**
* [Internal]
*
* <p>Definition: {@code ImGuiButtonFlags_MouseButtonLeft}
*/
public static final int MouseButtonDefault_ = 1;
}
@@ -0,0 +1,86 @@
package imgui.flag;
/**
* Flags for ImGui::BeginChild()
* (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'.
* About using AutoResizeX/AutoResizeY flags:
* - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see {@code Demo->Child->Auto-resize with Constraints}).
* - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.
* - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped.
* While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch.
* - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.
* HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping.
*/
public final class ImGuiChildFlags {
private ImGuiChildFlags() {
}
/**
* Definition: {@code 0}
*/
public static final int None = 0;
/**
* Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)
*
* <p>Definition: {@code 1 << 0}
*/
public static final int Border = 1;
/**
* Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense)
*
* <p>Definition: {@code 1 << 1}
*/
public static final int AlwaysUseWindowPadding = 2;
/**
* Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)
*
* <p>Definition: {@code 1 << 2}
*/
public static final int ResizeX = 4;
/**
* Allow resize from bottom border (layout direction). "
*
* <p>Definition: {@code 1 << 3}
*/
public static final int ResizeY = 8;
/**
* Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above.
*
* <p>Definition: {@code 1 << 4}
*/
public static final int AutoResizeX = 16;
/**
* Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
*
* <p>Definition: {@code 1 << 5}
*/
public static final int AutoResizeY = 32;
/**
* Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED.
*
* <p>Definition: {@code 1 << 6}
*/
public static final int AlwaysAutoResize = 64;
/**
* Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
*
* <p>Definition: {@code 1 << 7}
*/
public static final int FrameStyle = 128;
/**
* Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
*
* <p>Definition: {@code 1 << 8}
*/
public static final int NavFlattened = 256;
}
@@ -40,10 +40,19 @@ public final class ImGuiCol {
public static final int FrameBgActive = 9;
/**
* Title bar
*/
public static final int TitleBg = 10;
/**
* Title bar when focused
*/
public static final int TitleBgActive = 11;
/**
* Title bar when collapsed
*/
public static final int TitleBgCollapsed = 12;
public static final int MenuBarBg = 13;
@@ -56,6 +65,9 @@ public final class ImGuiCol {
public static final int ScrollbarGrabActive = 17;
/**
* Checkbox tick and RadioButton circle
*/
public static final int CheckMark = 18;
public static final int SliderGrab = 19;
@@ -93,87 +105,130 @@ public final class ImGuiCol {
public static final int ResizeGripActive = 32;
/**
* TabItem in a TabBar
* Tab background, when hovered
*/
public static final int Tab = 33;
public static final int TabHovered = 33;
public static final int TabHovered = 34;
/**
* Tab background, when tab-bar is focused {@code &} tab is unselected
*/
public static final int Tab = 34;
public static final int TabActive = 35;
/**
* Tab background, when tab-bar is focused {@code &} tab is selected
*/
public static final int TabSelected = 35;
public static final int TabUnfocused = 36;
/**
* Tab horizontal overline, when tab-bar is focused {@code &} tab is selected
*/
public static final int TabSelectedOverline = 36;
public static final int TabUnfocusedActive = 37;
/**
* Tab background, when tab-bar is unfocused {@code &} tab is unselected
*/
public static final int TabDimmed = 37;
/**
* Tab background, when tab-bar is unfocused {@code &} tab is selected
*/
public static final int TabDimmedSelected = 38;
/**
* ..horizontal overline, when tab-bar is unfocused {@code &} tab is selected
*/
public static final int TabDimmedSelectedOverline = 39;
/**
* Preview overlay color when about to docking something
*/
public static final int DockingPreview = 38;
public static final int DockingPreview = 40;
/**
* Background color for empty node (e.g. CentralNode with no window docked into it)
*/
public static final int DockingEmptyBg = 39;
public static final int DockingEmptyBg = 41;
public static final int PlotLines = 40;
public static final int PlotLines = 42;
public static final int PlotLinesHovered = 41;
public static final int PlotLinesHovered = 43;
public static final int PlotHistogram = 42;
public static final int PlotHistogram = 44;
public static final int PlotHistogramHovered = 43;
public static final int PlotHistogramHovered = 45;
/**
* Table header background
*/
public static final int TableHeaderBg = 44;
public static final int TableHeaderBg = 46;
/**
* Table outer and header borders (prefer using Alpha=1.0 here)
*/
public static final int TableBorderStrong = 45;
public static final int TableBorderStrong = 47;
/**
* Table inner borders (prefer using Alpha=1.0 here)
*/
public static final int TableBorderLight = 46;
public static final int TableBorderLight = 48;
/**
* Table row background (even rows)
*/
public static final int TableRowBg = 47;
public static final int TableRowBg = 49;
/**
* Table row background (odd rows)
*/
public static final int TableRowBgAlt = 48;
public static final int TableRowBgAlt = 50;
public static final int TextSelectedBg = 49;
public static final int TextSelectedBg = 51;
/**
* Rectangle highlighting a drop target
*/
public static final int DragDropTarget = 50;
public static final int DragDropTarget = 52;
/**
* Gamepad/keyboard: current highlighted item
*/
public static final int NavHighlight = 51;
public static final int NavHighlight = 53;
/**
* Highlight window when using CTRL+TAB
*/
public static final int NavWindowingHighlight = 52;
public static final int NavWindowingHighlight = 54;
/**
* Darken/colorize entire screen behind the CTRL+TAB window list, when active
*/
public static final int NavWindowingDimBg = 53;
public static final int NavWindowingDimBg = 55;
/**
* Darken/colorize entire screen behind a modal window, when one is active
*/
public static final int ModalWindowDimBg = 54;
public static final int ModalWindowDimBg = 56;
public static final int COUNT = 55;
public static final int COUNT = 57;
/**
* [renamed in 1.90.9]
*
* <p>Definition: {@code ImGuiCol_TabSelected}
*/
public static final int TabActive = 35;
/**
* [renamed in 1.90.9]
*
* <p>Definition: {@code ImGuiCol_TabDimmed}
*/
public static final int TabUnfocused = 37;
/**
* [renamed in 1.90.9]
*
* <p>Definition: {@code ImGuiCol_TabDimmedSelected}
*/
public static final int TabUnfocusedActive = 38;
}
@@ -62,6 +62,13 @@ public final class ImGuiComboFlags {
*/
public static final int NoPreview = 64;
/**
* Width dynamically calculated from preview contents
*
* <p>Definition: {@code 1 << 7}
*/
public static final int WidthFitPreview = 128;
/**
* Definition: {@code ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest}
*/
@@ -42,7 +42,7 @@ public final class ImGuiConfigFlags {
public static final int NavNoCaptureKeyboard = 8;
/**
* Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information set by the backend.
* Instruct dear imgui to disable mouse inputs and interactions.
*
* <p>Definition: {@code 1 << 4}
*/
@@ -56,11 +56,18 @@ public final class ImGuiConfigFlags {
public static final int NoMouseCursorChange = 32;
/**
* Docking enable flags.
* Instruct dear imgui to disable keyboard inputs and interactions. This is done by ignoring keyboard events and clearing existing states.
*
* <p>Definition: {@code 1 << 6}
*/
public static final int DockingEnable = 64;
public static final int NoKeyboard = 64;
/**
* Docking enable flags.
*
* <p>Definition: {@code 1 << 7}
*/
public static final int DockingEnable = 128;
/**
* Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_RendererHasViewports set by the respective backends)
@@ -15,44 +15,65 @@ public final class ImGuiDockNodeFlags {
public static final int None = 0;
/**
* Shared // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
* Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
*
* <p>Definition: {@code 1 << 0}
*/
public static final int KeepAliveOnly = 1;
/**
* Shared // Disable docking inside the Central Node, which will be always kept empty.
* Disable docking over the Central Node, which will be always kept empty.
*
* <p>Definition: {@code 1 << 2}
*/
public static final int NoDockingInCentralNode = 4;
public static final int NoDockingOverCentralNode = 4;
/**
* Shared // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
* Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
*
* <p>Definition: {@code 1 << 3}
*/
public static final int PassthruCentralNode = 8;
/**
* Shared/Local // Disable splitting the node into smaller nodes. Useful e.g. when embedding dockspaces into a main root one (the root one may have splitting disabled to reduce confusion). Note: when turned off, existing splits will be preserved.
* Disable other windows/nodes from splitting this node.
*
* <p>Definition: {@code 1 << 4}
*/
public static final int NoSplit = 16;
public static final int NoDockingSplit = 16;
/**
* Shared/Local // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
* Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
*
* <p>Definition: {@code 1 << 5}
*/
public static final int NoResize = 32;
/**
* Shared/Local // Tab bar will automatically hide when there is a single window in the dock node.
* Tab bar will automatically hide when there is a single window in the dock node.
*
* <p>Definition: {@code 1 << 6}
*/
public static final int AutoHideTabBar = 64;
/**
* Disable undocking this node.
*
* <p>Definition: {@code 1 << 7}
*/
public static final int NoUndocking = 128;
/**
* Renamed in 1.90
*
* <p>Definition: {@code ImGuiDockNodeFlags_NoDockingSplit}
*/
public static final int NoSplit = 16;
/**
* Renamed in 1.90
*
* <p>Definition: {@code ImGuiDockNodeFlags_NoDockingOverCentralNode}
*/
public static final int NoDockingInCentralNode = 4;
}
@@ -53,7 +53,21 @@ public final class ImGuiDragDropFlags {
*
* <p>Definition: {@code 1 << 5}
*/
public static final int SourceAutoExpirePayload = 32;
public static final int PayloadAutoExpire = 32;
/**
* Hint to specify that the payload may not be copied outside current dear imgui context.
*
* <p>Definition: {@code 1 << 6}
*/
public static final int PayloadNoCrossContext = 64;
/**
* Hint to specify that the payload may not be copied outside current process.
*
* <p>Definition: {@code 1 << 7}
*/
public static final int PayloadNoCrossProcess = 128;
/**
* AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered.
@@ -82,4 +96,11 @@ public final class ImGuiDragDropFlags {
* <p>Definition: {@code ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect}
*/
public static final int AcceptPeekOnly = 3072;
/**
* Renamed in 1.90.9
*
* <p>Definition: {@code ImGuiDragDropFlags_PayloadAutoExpire}
*/
public static final int SourceAutoExpirePayload = 32;
}
@@ -9,7 +9,9 @@ public final class ImGuiInputTextFlags {
}
/**
* Definition: {@code 0}
* Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter)
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
@@ -28,102 +30,102 @@ public final class ImGuiInputTextFlags {
public static final int CharsHexadecimal = 2;
/**
* Turn a..z into A..Z
* Allow 0123456789.+-* /eE (Scientific notation input)
*
* <p>Definition: {@code 1 << 2}
*/
public static final int CharsUppercase = 4;
public static final int CharsScientific = 4;
/**
* Turn a..z into A..Z
*
* <p>Definition: {@code 1 << 3}
*/
public static final int CharsUppercase = 8;
/**
* Filter out spaces, tabs
*
* <p>Definition: {@code 1 << 3}
*/
public static final int CharsNoBlank = 8;
/**
* Select entire text when first taking mouse focus
*
* <p>Definition: {@code 1 << 4}
*/
public static final int AutoSelectAll = 16;
/**
* Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function.
*
* <p>Definition: {@code 1 << 5}
*/
public static final int EnterReturnsTrue = 32;
/**
* Callback on pressing TAB (for completion handling)
*
* <p>Definition: {@code 1 << 6}
*/
public static final int CallbackCompletion = 64;
/**
* Callback on pressing Up/Down arrows (for history handling)
*
* <p>Definition: {@code 1 << 7}
*/
public static final int CallbackHistory = 128;
/**
* Callback on each iteration. User code may query cursor position, modify text buffer.
*
* <p>Definition: {@code 1 << 8}
*/
public static final int CallbackAlways = 256;
/**
* Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
*
* <p>Definition: {@code 1 << 9}
*/
public static final int CallbackCharFilter = 512;
public static final int CharsNoBlank = 16;
/**
* Pressing TAB input a ' ' character into the text field
*
* <p>Definition: {@code 1 << 10}
* <p>Definition: {@code 1 << 5}
*/
public static final int AllowTabInput = 1024;
public static final int AllowTabInput = 32;
/**
* In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter).
* Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function.
*
* <p>Definition: {@code 1 << 11}
* <p>Definition: {@code 1 << 6}
*/
public static final int CtrlEnterForNewLine = 2048;
public static final int EnterReturnsTrue = 64;
/**
* Disable following the cursor horizontally
* Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
*
* <p>Definition: {@code 1 << 12}
* <p>Definition: {@code 1 << 7}
*/
public static final int NoHorizontalScroll = 4096;
public static final int EscapeClearsAll = 128;
/**
* Overwrite mode
* In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter).
*
* <p>Definition: {@code 1 << 13}
* <p>Definition: {@code 1 << 8}
*/
public static final int AlwaysOverwrite = 8192;
public static final int CtrlEnterForNewLine = 256;
/**
* Read-only mode
*
* <p>Definition: {@code 1 << 14}
* <p>Definition: {@code 1 << 9}
*/
public static final int ReadOnly = 16384;
public static final int ReadOnly = 512;
/**
* Password mode, display all characters as '*'
* Password mode, display all characters as '*', disable copy
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Password = 1024;
/**
* Overwrite mode
*
* <p>Definition: {@code 1 << 11}
*/
public static final int AlwaysOverwrite = 2048;
/**
* Select entire text when first taking mouse focus
*
* <p>Definition: {@code 1 << 12}
*/
public static final int AutoSelectAll = 4096;
/**
* InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value.
*
* <p>Definition: {@code 1 << 13}
*/
public static final int ParseEmptyRefVal = 8192;
/**
* InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal.
*
* <p>Definition: {@code 1 << 14}
*/
public static final int DisplayEmptyRefVal = 16384;
/**
* Disable following the cursor horizontally
*
* <p>Definition: {@code 1 << 15}
*/
public static final int Password = 32768;
public static final int NoHorizontalScroll = 32768;
/**
* Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().
@@ -133,30 +135,44 @@ public final class ImGuiInputTextFlags {
public static final int NoUndoRedo = 65536;
/**
* Allow 0123456789.+-* /eE (Scientific notation input)
* Callback on pressing TAB (for completion handling)
*
* <p>Definition: {@code 1 << 17}
*/
public static final int CharsScientific = 131072;
public static final int CallbackCompletion = 131072;
/**
* Callback on pressing Up/Down arrows (for history handling)
*
* <p>Definition: {@code 1 << 18}
*/
public static final int CallbackHistory = 262144;
/**
* Callback on each iteration. User code may query cursor position, modify text buffer.
*
* <p>Definition: {@code 1 << 19}
*/
public static final int CallbackAlways = 524288;
/**
* Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
*
* <p>Definition: {@code 1 << 20}
*/
public static final int CallbackCharFilter = 1048576;
/**
* Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this)
*
* <p>Definition: {@code 1 << 18}
* <p>Definition: {@code 1 << 21}
*/
public static final int CallbackResize = 262144;
public static final int CallbackResize = 2097152;
/**
* Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
*
* <p>Definition: {@code 1 << 19}
* <p>Definition: {@code 1 << 22}
*/
public static final int CallbackEdit = 524288;
/**
* Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
*
* <p>Definition: {@code 1 << 20}
*/
public static final int EscapeClearsAll = 1048576;
public static final int CallbackEdit = 4194304;
}
@@ -168,294 +168,325 @@ public final class ImGuiKey {
public static final int F12 = 583;
public static final int F13 = 584;
public static final int F14 = 585;
public static final int F15 = 586;
public static final int F16 = 587;
public static final int F17 = 588;
public static final int F18 = 589;
public static final int F19 = 590;
public static final int F20 = 591;
public static final int F21 = 592;
public static final int F22 = 593;
public static final int F23 = 594;
public static final int F24 = 595;
/**
* '
*/
public static final int Apostrophe = 584;
public static final int Apostrophe = 596;
/**
* ,
*/
public static final int Comma = 585;
public static final int Comma = 597;
/**
* -
*/
public static final int Minus = 586;
public static final int Minus = 598;
/**
* .
*/
public static final int Period = 587;
public static final int Period = 599;
/**
* /
*/
public static final int Slash = 588;
public static final int Slash = 600;
/**
* ;
*/
public static final int Semicolon = 589;
public static final int Semicolon = 601;
/**
* =
*/
public static final int Equal = 590;
public static final int Equal = 602;
/**
* [
*/
public static final int LeftBracket = 591;
public static final int LeftBracket = 603;
/**
* \ (this text inhibit multiline comment caused by backslash)
*/
public static final int Backslash = 592;
public static final int Backslash = 604;
/**
* ]
*/
public static final int RightBracket = 593;
public static final int RightBracket = 605;
/**
* `
*/
public static final int GraveAccent = 594;
public static final int GraveAccent = 606;
public static final int CapsLock = 595;
public static final int CapsLock = 607;
public static final int ScrollLock = 596;
public static final int ScrollLock = 608;
public static final int NumLock = 597;
public static final int NumLock = 609;
public static final int PrintScreen = 598;
public static final int PrintScreen = 610;
public static final int Pause = 599;
public static final int Pause = 611;
public static final int Keypad0 = 600;
public static final int Keypad0 = 612;
public static final int Keypad1 = 601;
public static final int Keypad1 = 613;
public static final int Keypad2 = 602;
public static final int Keypad2 = 614;
public static final int Keypad3 = 603;
public static final int Keypad3 = 615;
public static final int Keypad4 = 604;
public static final int Keypad4 = 616;
public static final int Keypad5 = 605;
public static final int Keypad5 = 617;
public static final int Keypad6 = 606;
public static final int Keypad6 = 618;
public static final int Keypad7 = 607;
public static final int Keypad7 = 619;
public static final int Keypad8 = 608;
public static final int Keypad8 = 620;
public static final int Keypad9 = 609;
public static final int Keypad9 = 621;
public static final int KeypadDecimal = 610;
public static final int KeypadDecimal = 622;
public static final int KeypadDivide = 611;
public static final int KeypadDivide = 623;
public static final int KeypadMultiply = 612;
public static final int KeypadMultiply = 624;
public static final int KeypadSubtract = 613;
public static final int KeypadSubtract = 625;
public static final int KeypadAdd = 614;
public static final int KeypadAdd = 626;
public static final int KeypadEnter = 615;
public static final int KeypadEnter = 627;
public static final int KeypadEqual = 616;
public static final int KeypadEqual = 628;
/**
* Available on some keyboard/mouses. Often referred as "Browser Back"
*/
public static final int AppBack = 629;
public static final int AppForward = 630;
/**
* Menu (Xbox) + (Switch) Start/Options (PS)
*/
public static final int GamepadStart = 617;
public static final int GamepadStart = 631;
/**
* View (Xbox) - (Switch) Share (PS)
*/
public static final int GamepadBack = 618;
public static final int GamepadBack = 632;
/**
* X (Xbox) Y (Switch) Square (PS) // Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows)
*/
public static final int GamepadFaceLeft = 619;
public static final int GamepadFaceLeft = 633;
/**
* B (Xbox) A (Switch) Circle (PS) // Cancel / Close / Exit
*/
public static final int GamepadFaceRight = 620;
public static final int GamepadFaceRight = 634;
/**
* Y (Xbox) X (Switch) Triangle (PS) // Text Input / On-screen Keyboard
*/
public static final int GamepadFaceUp = 621;
public static final int GamepadFaceUp = 635;
/**
* A (Xbox) B (Switch) Cross (PS) // Activate / Open / Toggle / Tweak
*/
public static final int GamepadFaceDown = 622;
public static final int GamepadFaceDown = 636;
/**
* D-pad Left // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadLeft = 623;
public static final int GamepadDpadLeft = 637;
/**
* D-pad Right // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadRight = 624;
public static final int GamepadDpadRight = 638;
/**
* D-pad Up // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadUp = 625;
public static final int GamepadDpadUp = 639;
/**
* D-pad Down // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadDown = 626;
public static final int GamepadDpadDown = 640;
/**
* L Bumper (Xbox) L (Switch) L1 (PS) // Tweak Slower / Focus Previous (in Windowing mode)
*/
public static final int GamepadL1 = 627;
public static final int GamepadL1 = 641;
/**
* R Bumper (Xbox) R (Switch) R1 (PS) // Tweak Faster / Focus Next (in Windowing mode)
*/
public static final int GamepadR1 = 628;
public static final int GamepadR1 = 642;
/**
* L Trig. (Xbox) ZL (Switch) L2 (PS) [Analog]
*/
public static final int GamepadL2 = 629;
public static final int GamepadL2 = 643;
/**
* R Trig. (Xbox) ZR (Switch) R2 (PS) [Analog]
*/
public static final int GamepadR2 = 630;
public static final int GamepadR2 = 644;
/**
* L Stick (Xbox) L3 (Switch) L3 (PS)
*/
public static final int GamepadL3 = 631;
public static final int GamepadL3 = 645;
/**
* R Stick (Xbox) R3 (Switch) R3 (PS)
*/
public static final int GamepadR3 = 632;
public static final int GamepadR3 = 646;
/**
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickLeft = 633;
public static final int GamepadLStickLeft = 647;
/**
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickRight = 634;
public static final int GamepadLStickRight = 648;
/**
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickUp = 635;
public static final int GamepadLStickUp = 649;
/**
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickDown = 636;
public static final int GamepadLStickDown = 650;
/**
* [Analog]
*/
public static final int GamepadRStickLeft = 637;
public static final int GamepadRStickLeft = 651;
/**
* [Analog]
*/
public static final int GamepadRStickRight = 638;
public static final int GamepadRStickRight = 652;
/**
* [Analog]
*/
public static final int GamepadRStickUp = 639;
public static final int GamepadRStickUp = 653;
/**
* [Analog]
*/
public static final int GamepadRStickDown = 640;
public static final int GamepadRStickDown = 654;
/**
* Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
*/
public static final int MouseLeft = 641;
public static final int MouseLeft = 655;
/**
* Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
*/
public static final int MouseRight = 642;
public static final int MouseRight = 656;
/**
* Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
*/
public static final int MouseMiddle = 643;
public static final int MouseMiddle = 657;
/**
* Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
*/
public static final int MouseX1 = 644;
public static final int MouseX1 = 658;
/**
* Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
*/
public static final int MouseX2 = 645;
public static final int MouseX2 = 659;
/**
* Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
*/
public static final int MouseWheelX = 646;
public static final int MouseWheelX = 660;
/**
* Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
*/
public static final int MouseWheelY = 647;
public static final int MouseWheelY = 661;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModCtrl = 648;
public static final int ReservedForModCtrl = 662;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModShift = 649;
public static final int ReservedForModShift = 663;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModAlt = 650;
public static final int ReservedForModAlt = 664;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModSuper = 651;
public static final int ReservedForModSuper = 665;
/**
* [Internal] Reserved for mod storage
*/
public static final int COUNT = 652;
public static final int COUNT = 666;
/**
* Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
* Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user... - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call.
*
* <p>Definition: {@code 0}
*/
public static final int ImGuiMod_None = 0;
/**
* Ctrl
* Ctrl (non-macOS), Cmd (macOS)
*
* <p>Definition: {@code 1 << 12}
*/
@@ -476,25 +507,18 @@ public final class ImGuiKey {
public static final int ImGuiMod_Alt = 16384;
/**
* Cmd/Super/Windows
* Windows/Super (non-macOS), Ctrl (macOS)
*
* <p>Definition: {@code 1 << 15}
*/
public static final int ImGuiMod_Super = 32768;
/**
* Alias for Ctrl (non-macOS) _or_ Super (macOS).
* 4-bits
*
* <p>Definition: {@code 1 << 11}
* <p>Definition: {@code 0xF000}
*/
public static final int ImGuiMod_Shortcut = 2048;
/**
* 5-bits
*
* <p>Definition: {@code 0xF800}
*/
public static final int ImGuiMod_Mask_ = 63488;
public static final int ImGuiMod_Mask_ = 61440;
/**
* [Internal] Prior to 1.87 we required user to fill io.KeysDown[512] using their own native index + the io.KeyMap[] array. We are ditching this method but keeping a legacy path for user code doing e.g. IsKeyPressed(MY_NATIVE_KEY_CODE) If you need to iterate all keys (for e.g. an input mapper) you may use ImGuiKey_NamedKey_BEGIN..ImGuiKey_NamedKey_END.
@@ -508,21 +532,21 @@ public final class ImGuiKey {
*
* <p>Definition: {@code ImGuiKey_COUNT}
*/
public static final int NamedKey_END = 652;
public static final int NamedKey_END = 666;
/**
* [Internal] Prior to 1.87 we required user to fill io.KeysDown[512] using their own native index + the io.KeyMap[] array. We are ditching this method but keeping a legacy path for user code doing e.g. IsKeyPressed(MY_NATIVE_KEY_CODE) If you need to iterate all keys (for e.g. an input mapper) you may use ImGuiKey_NamedKey_BEGIN..ImGuiKey_NamedKey_END.
*
* <p>Definition: {@code ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN}
*/
public static final int NamedKey_COUNT = 140;
public static final int NamedKey_COUNT = 154;
/**
* Size of KeysData[]: hold legacy 0..512 keycodes + named keys
*
* <p>Definition: {@code ImGuiKey_COUNT}
*/
public static final int KeysData_SIZE = 652;
public static final int KeysData_SIZE = 666;
/**
* Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
@@ -531,6 +555,13 @@ public final class ImGuiKey {
*/
public static final int KeysData_OFFSET = 0;
/**
* Removed in 1.90.7, you can now simply use ImGuiMod_Ctrl
*
* <p>Definition: {@code ImGuiMod_Ctrl}
*/
public static final int ImGuiMod_Shortcut = 4096;
/**
* Renamed in 1.89
*
@@ -558,11 +589,4 @@ public final class ImGuiKey {
* <p>Definition: {@code ImGuiMod_Super}
*/
public static final int ModSuper = 32768;
/**
* Renamed in 1.87
*
* <p>Definition: {@code ImGuiKey_KeypadEnter}
*/
public static final int KeyPadEnter = 615;
}
@@ -50,35 +50,42 @@ public final class ImGuiPopupFlags {
public static final int MouseButtonDefault_ = 1;
/**
* For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack
* For OpenPopup*(), BeginPopupContext*(): don't reopen same popup if already open (won't reposition, won't reinitialize navigation)
*
* <p>Definition: {@code 1 << 5}
*/
public static final int NoOpenOverExistingPopup = 32;
public static final int NoReopen = 32;
/**
* For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack
*
* <p>Definition: {@code 1 << 7}
*/
public static final int NoOpenOverExistingPopup = 128;
/**
* For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space
*
* <p>Definition: {@code 1 << 6}
* <p>Definition: {@code 1 << 8}
*/
public static final int NoOpenOverItems = 64;
public static final int NoOpenOverItems = 256;
/**
* For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup.
*
* <p>Definition: {@code 1 << 7}
* <p>Definition: {@code 1 << 10}
*/
public static final int AnyPopupId = 128;
public static final int AnyPopupId = 1024;
/**
* For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level)
*
* <p>Definition: {@code 1 << 8}
* <p>Definition: {@code 1 << 11}
*/
public static final int AnyPopupLevel = 256;
public static final int AnyPopupLevel = 2048;
/**
* Definition: {@code ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel}
*/
public static final int AnyPopup = 384;
public static final int AnyPopup = 3072;
}
@@ -21,7 +21,7 @@ public final class ImGuiSelectableFlags {
public static final int DontClosePopups = 1;
/**
* Selectable frame can span all columns (text will still fit in current column)
* Frame will span all columns of its container table (text will still fit in current column)
*
* <p>Definition: {@code 1 << 1}
*/
@@ -25,19 +25,26 @@ public final class ImGuiSliderFlags {
public static final int Logarithmic = 32;
/**
* Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits)
* Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits).
*
* <p>Definition: {@code 1 << 6}
*/
public static final int NoRoundToFormat = 64;
/**
* Disable CTRL+Click or Enter key allowing to input text directly into the widget
* Disable CTRL+Click or Enter key allowing to input text directly into the widget.
*
* <p>Definition: {@code 1 << 7}
*/
public static final int NoInput = 128;
/**
* Enable wrapping around from max to min and from min to max (only supported by DragXXX() functions for now.
*
* <p>Definition: {@code 1 << 8}
*/
public static final int WrapAround = 256;
/**
* [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
*
@@ -129,35 +129,55 @@ public final class ImGuiStyleVar {
*/
public static final int TabRounding = 22;
/**
* float TabBorderSize
*/
public static final int TabBorderSize = 23;
/**
* float TabBarBorderSize
*/
public static final int TabBarBorderSize = 24;
/**
* float TableAngledHeadersAngle
*/
public static final int TableAngledHeadersAngle = 25;
/**
* ImVec2 TableAngledHeadersTextAlign
*/
public static final int TableAngledHeadersTextAlign = 26;
/**
* ImVec2 ButtonTextAlign
*/
public static final int ButtonTextAlign = 23;
public static final int ButtonTextAlign = 27;
/**
* ImVec2 SelectableTextAlign
*/
public static final int SelectableTextAlign = 24;
public static final int SelectableTextAlign = 28;
/**
* float SeparatorTextBorderSize
* float SeparatorTextBorderSize
*/
public static final int SeparatorTextBorderSize = 25;
public static final int SeparatorTextBorderSize = 29;
/**
* ImVec2 SeparatorTextAlign
*/
public static final int SeparatorTextAlign = 26;
public static final int SeparatorTextAlign = 30;
/**
* ImVec2 SeparatorTextPadding
*/
public static final int SeparatorTextPadding = 27;
public static final int SeparatorTextPadding = 31;
/**
* float DockingSeparatorSize
*/
public static final int DockingSeparatorSize = 28;
public static final int DockingSeparatorSize = 32;
public static final int COUNT = 29;
public static final int COUNT = 33;
}
@@ -35,7 +35,7 @@ public final class ImGuiTabBarFlags {
public static final int TabListPopupButton = 4;
/**
* Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() {@code &} {@code &} IsMouseClicked(2)) *p_open = false.
* Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() {@code &} {@code &} IsMouseClicked(2)) *p_open = false.
*
* <p>Definition: {@code 1 << 3}
*/
@@ -56,26 +56,33 @@ public final class ImGuiTabBarFlags {
public static final int NoTooltip = 32;
/**
* Resize tabs when they don't fit
* Draw selected overline markers over selected tab
*
* <p>Definition: {@code 1 << 6}
*/
public static final int FittingPolicyResizeDown = 64;
public static final int DrawSelectedOverline = 64;
/**
* Resize tabs when they don't fit
*
* <p>Definition: {@code 1 << 7}
*/
public static final int FittingPolicyResizeDown = 128;
/**
* Add scroll buttons when tabs don't fit
*
* <p>Definition: {@code 1 << 7}
* <p>Definition: {@code 1 << 8}
*/
public static final int FittingPolicyScroll = 128;
public static final int FittingPolicyScroll = 256;
/**
* Definition: {@code ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll}
*/
public static final int FittingPolicyMask_ = 192;
public static final int FittingPolicyMask_ = 384;
/**
* Definition: {@code ImGuiTabBarFlags_FittingPolicyResizeDown}
*/
public static final int FittingPolicyDefault_ = 64;
public static final int FittingPolicyDefault_ = 128;
}
@@ -14,7 +14,7 @@ public final class ImGuiTabItemFlags {
public static final int None = 0;
/**
* Display a dot next to the title + tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
* Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure.
*
* <p>Definition: {@code 1 << 0}
*/
@@ -28,14 +28,14 @@ public final class ImGuiTabItemFlags {
public static final int SetSelected = 2;
/**
* Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() {@code &} {@code &} IsMouseClicked(2)) *p_open = false.
* Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() {@code &} {@code &} IsMouseClicked(2)) *p_open = false.
*
* <p>Definition: {@code 1 << 2}
*/
public static final int NoCloseWithMiddleMouseButton = 4;
/**
* Don't call PushID(tab{@code ->}ID)/PopID() on BeginTabItem()/EndTabItem()
* Don't call PushID()/PopID() on BeginTabItem()/EndTabItem()
*
* <p>Definition: {@code 1 << 3}
*/
@@ -68,4 +68,11 @@ public final class ImGuiTabItemFlags {
* <p>Definition: {@code 1 << 7}
*/
public static final int Trailing = 128;
/**
* Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
*
* <p>Definition: {@code 1 << 8}
*/
public static final int NoAssumedClosure = 256;
}
@@ -100,7 +100,7 @@ public final class ImGuiTableColumnFlags {
public static final int NoSortDescending = 2048;
/**
* TableHeadersRow() will not submit label for this column. Convenient for some small columns. Name will still appear in context menu.
* TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers.
*
* <p>Definition: {@code 1 << 12}
*/
@@ -141,6 +141,13 @@ public final class ImGuiTableColumnFlags {
*/
public static final int IndentDisable = 131072;
/**
* TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row.
*
* <p>Definition: {@code 1 << 18}
*/
public static final int AngledHeader = 262144;
/**
* Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags.
*
@@ -275,6 +275,13 @@ public final class ImGuiTableFlags {
*/
public static final int SortTristate = 134217728;
/**
* Highlight column headers when hovered (may evolve into a fuller highlight)
*
* <p>Definition: {@code 1 << 28}
*/
public static final int HighlightHoveredColumn = 268435456;
/**
* [Internal] Combinations and masks
*
@@ -84,35 +84,49 @@ public final class ImGuiTreeNodeFlags {
public static final int Bullet = 512;
/**
* Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
* Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding() before the node.
*
* <p>Definition: {@code 1 << 10}
*/
public static final int FramePadding = 1024;
/**
* Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default.
* Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line without using AllowOverlap mode.
*
* <p>Definition: {@code 1 << 11}
*/
public static final int SpanAvailWidth = 2048;
/**
* Extend hit box to the left-most and right-most edges (bypass the indented area).
* Extend hit box to the left-most and right-most edges (cover the indent area).
*
* <p>Definition: {@code 1 << 12}
*/
public static final int SpanFullWidth = 4096;
/**
* (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
* Narrow hit box + narrow hovering highlight, will only cover the label text.
*
* <p>Definition: {@code 1 << 13}
*/
public static final int NavLeftJumpsBackHere = 8192;
public static final int SpanTextWidth = 8192;
/**
* ImGuiTreeNodeFlags_NoScrollOnOpen = 1 {@code <<} 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
* Frame will span all columns of its container table (text will still fit in current column)
*
* <p>Definition: {@code 1 << 14}
*/
public static final int SpanAllColumns = 16384;
/**
* (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
*
* <p>Definition: {@code 1 << 15}
*/
public static final int NavLeftJumpsBackHere = 32768;
/**
* ImGuiTreeNodeFlags_NoScrollOnOpen = 1 {@code <<} 16, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
*
* <p>Definition: {@code ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog}
*/
@@ -126,44 +126,37 @@ public final class ImGuiWindowFlags {
public static final int AlwaysHorizontalScrollbar = 32768;
/**
* Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
* No gamepad/keyboard navigation within the window
*
* <p>Definition: {@code 1 << 16}
*/
public static final int AlwaysUseWindowPadding = 65536;
/**
* No gamepad/keyboard navigation within the window
*
* <p>Definition: {@code 1 << 18}
*/
public static final int NoNavInputs = 262144;
public static final int NoNavInputs = 65536;
/**
* No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
*
* <p>Definition: {@code 1 << 19}
* <p>Definition: {@code 1 << 17}
*/
public static final int NoNavFocus = 524288;
public static final int NoNavFocus = 131072;
/**
* Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
*
* <p>Definition: {@code 1 << 20}
* <p>Definition: {@code 1 << 18}
*/
public static final int UnsavedDocument = 1048576;
public static final int UnsavedDocument = 262144;
/**
* Disable docking of this window
*
* <p>Definition: {@code 1 << 21}
* <p>Definition: {@code 1 << 19}
*/
public static final int NoDocking = 2097152;
public static final int NoDocking = 524288;
/**
* Definition: {@code ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus}
*/
public static final int NoNav = 786432;
public static final int NoNav = 196608;
/**
* Definition: {@code ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse}
@@ -173,14 +166,7 @@ public final class ImGuiWindowFlags {
/**
* Definition: {@code ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus}
*/
public static final int NoInputs = 786944;
/**
* [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
*
* <p>Definition: {@code 1 << 23}
*/
public static final int NavFlattened = 8388608;
public static final int NoInputs = 197120;
/**
* Don't use! For internal use by BeginChild()
@@ -223,4 +209,18 @@ public final class ImGuiWindowFlags {
* <p>Definition: {@code 1 << 29}
*/
public static final int DockNodeHost = 536870912;
/**
* Obsoleted in 1.90: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call.
*
* <p>Definition: {@code 1 << 30}
*/
public static final int AlwaysUseWindowPadding = 1073741824;
/**
* Obsoleted in 1.90.9: Use ImGuiChildFlags_NavFlattened in BeginChild() call.
*
* <p>Definition: {@code 1 << 31}
*/
public static final int NavFlattened = -2147483648;
}
@@ -1088,7 +1088,7 @@ public final class ImGui extends imgui.ImGui {
private static native int nDockBuilderSplitNode(int nodeId, int splitDir, float sizeRatioForNodeAtDir, int[] obj_outIdAtDir, int[] obj_outIdAtOppositeDir); /*MANUAL
auto outIdAtDir = obj_outIdAtDir == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_outIdAtDir, JNI_FALSE);
auto outIdAtOppositeDir = obj_outIdAtOppositeDir == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_outIdAtOppositeDir, JNI_FALSE);
auto _result = ImGui::DockBuilderSplitNode(nodeId, splitDir, sizeRatioForNodeAtDir, reinterpret_cast<ImGuiID*>((outIdAtDir != NULL ? &outIdAtDir[0] : NULL)), reinterpret_cast<ImGuiID*>((outIdAtOppositeDir != NULL ? &outIdAtOppositeDir[0] : NULL)));
auto _result = ImGui::DockBuilderSplitNode(nodeId, static_cast<ImGuiDir>(splitDir), sizeRatioForNodeAtDir, reinterpret_cast<ImGuiID*>((outIdAtDir != NULL ? &outIdAtDir[0] : NULL)), reinterpret_cast<ImGuiID*>((outIdAtOppositeDir != NULL ? &outIdAtOppositeDir[0] : NULL)));
if (outIdAtDir != NULL) env->ReleasePrimitiveArrayCritical(obj_outIdAtDir, outIdAtDir, JNI_FALSE);
if (outIdAtOppositeDir != NULL) env->ReleasePrimitiveArrayCritical(obj_outIdAtOppositeDir, outIdAtOppositeDir, JNI_FALSE);
return _result;
@@ -1545,4 +1545,19 @@ public final class ImGui extends imgui.ImGui {
return _result;
*/
// Shade functions (write over already created vertices)
public static void shadeVertsTransformPos(final ImDrawList drawList, final int vertStartIdx, final int vertEndIdx, final ImVec2 pivotIn, final float cosA, final float sinA, final ImVec2 pivotOut) {
nShadeVertsTransformPos(drawList.ptr, vertStartIdx, vertEndIdx, pivotIn.x, pivotIn.y, cosA, sinA, pivotOut.x, pivotOut.y);
}
public static void shadeVertsTransformPos(final ImDrawList drawList, final int vertStartIdx, final int vertEndIdx, final float pivotInX, final float pivotInY, final float cosA, final float sinA, final float pivotOutX, final float pivotOutY) {
nShadeVertsTransformPos(drawList.ptr, vertStartIdx, vertEndIdx, pivotInX, pivotInY, cosA, sinA, pivotOutX, pivotOutY);
}
private static native void nShadeVertsTransformPos(long drawList, int vertStartIdx, int vertEndIdx, float pivotInX, float pivotInY, float cosA, float sinA, float pivotOutX, float pivotOutY); /*MANUAL
ImVec2 pivotIn = ImVec2(pivotInX, pivotInY);
ImVec2 pivotOut = ImVec2(pivotOutX, pivotOutY);
ImGui::ShadeVertsTransformPos(reinterpret_cast<ImDrawList*>(drawList), vertStartIdx, vertEndIdx, pivotIn, cosA, sinA, pivotOut);
*/
}
@@ -38,13 +38,6 @@ public final class ImGuiButtonFlags {
*/
public static final int MouseButtonMask_ = 7;
/**
* [Internal]
*
* <p>Definition: {@code ImGuiButtonFlags_MouseButtonLeft}
*/
public static final int MouseButtonDefault_ = 1;
/**
* return true on click (mouse down event)
*
@@ -137,7 +130,7 @@ public final class ImGuiButtonFlags {
public static final int NoHoldingActiveId = 131072;
/**
* don't override navigation focus when activated (FIXME: this is essentially used everytime an item uses ImGuiItemFlags_NoNav, but because legacy specs don't requires LastItemData to be set ButtonBehavior(), we can't poll g.LastItemData.InFlags)
* don't override navigation focus when activated (FIXME: this is essentially used every time an item uses ImGuiItemFlags_NoNav, but because legacy specs don't requires LastItemData to be set ButtonBehavior(), we can't poll g.LastItemData.InFlags)
*
* <p>Definition: {@code 1 << 18}
*/
@@ -14,169 +14,185 @@ public final class ImGuiDockNodeFlags {
public static final int None = 0;
/**
* Shared // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
* Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
*
* <p>Definition: {@code 1 << 0}
*/
public static final int KeepAliveOnly = 1;
/**
* Shared // Disable docking inside the Central Node, which will be always kept empty.
* Disable docking over the Central Node, which will be always kept empty.
*
* <p>Definition: {@code 1 << 2}
*/
public static final int NoDockingInCentralNode = 4;
public static final int NoDockingOverCentralNode = 4;
/**
* Shared // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
* Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
*
* <p>Definition: {@code 1 << 3}
*/
public static final int PassthruCentralNode = 8;
/**
* Shared/Local // Disable splitting the node into smaller nodes. Useful e.g. when embedding dockspaces into a main root one (the root one may have splitting disabled to reduce confusion). Note: when turned off, existing splits will be preserved.
* Disable other windows/nodes from splitting this node.
*
* <p>Definition: {@code 1 << 4}
*/
public static final int NoSplit = 16;
public static final int NoDockingSplit = 16;
/**
* Shared/Local // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
* Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
*
* <p>Definition: {@code 1 << 5}
*/
public static final int NoResize = 32;
/**
* Shared/Local // Tab bar will automatically hide when there is a single window in the dock node.
* Tab bar will automatically hide when there is a single window in the dock node.
*
* <p>Definition: {@code 1 << 6}
*/
public static final int AutoHideTabBar = 64;
/**
* Local, Saved // A dockspace is a node that occupy space within an existing user window. Otherwise the node is floating and create its own window.
* Disable undocking this node.
*
* <p>Definition: {@code 1 << 7}
*/
public static final int NoUndocking = 128;
/**
* Renamed in 1.90
*
* <p>Definition: {@code ImGuiDockNodeFlags_NoDockingSplit}
*/
public static final int NoSplit = 16;
/**
* Renamed in 1.90
*
* <p>Definition: {@code ImGuiDockNodeFlags_NoDockingOverCentralNode}
*/
public static final int NoDockingInCentralNode = 4;
/**
* Saved // A dockspace is a node that occupy space within an existing user window. Otherwise the node is floating and create its own window.
*
* <p>Definition: {@code 1 << 10}
*/
public static final int DockSpace = 1024;
/**
* Local, Saved // The central node has 2 main properties: stay visible when empty, only use "remaining" spaces from its neighbor.
* Saved // The central node has 2 main properties: stay visible when empty, only use "remaining" spaces from its neighbor.
*
* <p>Definition: {@code 1 << 11}
*/
public static final int CentralNode = 2048;
/**
* Local, Saved // Tab bar is completely unavailable. No triangle in the corner to enable it back.
* Saved // Tab bar is completely unavailable. No triangle in the corner to enable it back.
*
* <p>Definition: {@code 1 << 12}
*/
public static final int NoTabBar = 4096;
/**
* Local, Saved // Tab bar is hidden, with a triangle in the corner to show it again (NB: actual tab-bar instance may be destroyed as this is only used for single-window tab bar)
* Saved // Tab bar is hidden, with a triangle in the corner to show it again (NB: actual tab-bar instance may be destroyed as this is only used for single-window tab bar)
*
* <p>Definition: {@code 1 << 13}
*/
public static final int HiddenTabBar = 8192;
/**
* Local, Saved // Disable window/docking menu (that one that appears instead of the collapse button)
* Saved // Disable window/docking menu (that one that appears instead of the collapse button)
*
* <p>Definition: {@code 1 << 14}
*/
public static final int NoWindowMenuButton = 16384;
/**
* Local, Saved //
* Saved // Disable close button
*
* <p>Definition: {@code 1 << 15}
*/
public static final int NoCloseButton = 32768;
/**
* Local, Saved // Disable any form of docking in this dockspace or individual node. (On a whole dockspace, this pretty much defeat the purpose of using a dockspace at all). Note: when turned on, existing docked nodes will be preserved.
*
* <p>Definition: {@code 1 << 16}
*/
public static final int NoDocking = 65536;
public static final int NoResizeX = 65536;
/**
* [EXPERIMENTAL] Prevent another window/node from splitting this node.
*
* <p>Definition: {@code 1 << 17}
*/
public static final int NoDockingSplitMe = 131072;
public static final int NoResizeY = 131072;
/**
* [EXPERIMENTAL] Prevent this node from splitting another window/node.
* Any docked window will be automatically be focus-route chained (window{@code ->}ParentWindowForFocusRoute set to this) so Shortcut() in this window can run when any docked window is focused.
*
* <p>Definition: {@code 1 << 18}
*/
public static final int NoDockingSplitOther = 262144;
public static final int DockedWindowsInFocusRoute = 262144;
/**
* [EXPERIMENTAL] Prevent another window/node to be docked over this node.
* Disable this node from splitting other windows/nodes.
*
* <p>Definition: {@code 1 << 19}
*/
public static final int NoDockingOverMe = 524288;
public static final int NoDockingSplitOther = 524288;
/**
* [EXPERIMENTAL] Prevent this node to be docked over another window or non-empty node.
* Disable other windows/nodes from being docked over this node.
*
* <p>Definition: {@code 1 << 20}
*/
public static final int NoDockingOverOther = 1048576;
public static final int NoDockingOverMe = 1048576;
/**
* [EXPERIMENTAL] Prevent this node to be docked over an empty node (e.g. DockSpace with no other windows)
* Disable this node from being docked over another window or non-empty node.
*
* <p>Definition: {@code 1 << 21}
*/
public static final int NoDockingOverEmpty = 2097152;
public static final int NoDockingOverOther = 2097152;
/**
* [EXPERIMENTAL]
* Disable this node from being docked over an empty node (e.g. DockSpace with no other windows)
*
* <p>Definition: {@code 1 << 22}
*/
public static final int NoResizeX = 4194304;
public static final int NoDockingOverEmpty = 4194304;
/**
* [EXPERIMENTAL]
*
* <p>Definition: {@code 1 << 23}
* Definition: {@code ImGuiDockNodeFlags_NoDockingOverMe | ImGuiDockNodeFlags_NoDockingOverOther | ImGuiDockNodeFlags_NoDockingOverEmpty | ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoDockingSplitOther}
*/
public static final int NoResizeY = 8388608;
public static final int NoDocking = 7864336;
/**
* Definition: {@code ~0}
* Masks
*
* <p>Definition: {@code ~0}
*/
public static final int SharedFlagsInheritMask_ = -1;
/**
* Definition: {@code ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY}
*/
public static final int NoResizeFlagsMask_ = 12582944;
/**
* Definition: {@code ImGuiDockNodeFlags_NoSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton | ImGuiDockNodeFlags_NoDocking}
*/
public static final int LocalFlagsMask_ = 12713072;
/**
* When splitting those flags are moved to the inheriting child, never duplicated
* Masks
*
* <p>Definition: {@code ImGuiDockNodeFlags_LocalFlagsMask_ {@code &} ~ImGuiDockNodeFlags_DockSpace}
* <p>Definition: {@code ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY}
*/
public static final int LocalFlagsTransferMask_ = 12712048;
public static final int NoResizeFlagsMask_ = 196640;
/**
* Definition: {@code ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton | ImGuiDockNodeFlags_NoDocking}
* When splitting, those local flags are moved to the inheriting child, never duplicated
*
* <p>Definition: {@code ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton}
*/
public static final int SavedFlagsMask_ = 12712992;
public static final int LocalFlagsTransferMask_ = 260208;
/**
* When splitting, those local flags are moved to the inheriting child, never duplicated
*
* <p>Definition: {@code ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton}
*/
public static final int SavedFlagsMask_ = 261152;
}
@@ -92,4 +92,11 @@ public final class ImGuiItemFlags {
* <p>Definition: {@code 1 << 10}
*/
public static final int Inputable = 1024;
/**
* false // Set by SetNextItemSelectionUserData()
*
* <p>Definition: {@code 1 << 11}
*/
public static final int HasSelectionUserData = 2048;
}
@@ -67,16 +67,23 @@ public class ImGuiItemStatusFlags {
public static final int HoveredWindow = 128;
/**
* Set when the Focusable item just got focused by Tabbing (FIXME: to be removed soon)
* [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()).
*
* <p>Definition: {@code 1 << 8}
*/
public static final int FocusedByTabbing = 256;
public static final int Visible = 256;
/**
* [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()).
* g.LastItemData.ClipRect is valid.
*
* <p>Definition: {@code 1 << 9}
*/
public static final int Visible = 512;
public static final int HasClipRect = 512;
/**
* g.LastItemData.Shortcut valid. Set by SetNextItemShortcut() {@code ->} ItemAdd().
*
* <p>Definition: {@code 1 << 10}
*/
public static final int HasShortcut = 1024;
}
@@ -35,6 +35,14 @@ public final class ImDrawList extends ImGuiStruct {
@BindingField(isFlag = true)
public int Flags;
// [Internal, used while building lists]
/**
* [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to 0.
*/
@BindingField(accessors = BindingField.Accessor.GETTER, callName = "_VtxCurrentIdx")
public int VtxCurrentIdx;
/**
* Render-level scissoring.
* This is passed down to your render function but not used for CPU-side coarse clipping.
@@ -105,18 +113,18 @@ public final class ImDrawList extends ImGuiStruct {
@BindingMethod
public native void AddNgonFilled(ImVec2 center, float radius, int col, int num_segments);
@BindingMethod
public native void AddEllipse(ImVec2 center, ImVec2 radius, int col, @OptArg float rot, @OptArg float numSegments, @OptArg float thickness);
@BindingMethod
public native void AddEllipseFilled(ImVec2 center, ImVec2 radius, int col, @OptArg float rot, @OptArg float numSegments);
@BindingMethod
public native void AddText(ImVec2 pos, int col, String textBegin, @OptArg String textEnd);
@BindingMethod
public native void AddText(ImFont font, int fontSize, ImVec2 pos, int col, String textBegin, @OptArg(callValue = "NULL") String textEnd, @OptArg(callValue = "0.0f") float wrapWidth, @OptArg @ArgValue(callPrefix = "&") ImVec4 cpuFineClipRect);
@BindingMethod
public native void AddPolyline(ImVec2[] points, int numPoint, int col, int imDrawFlags, float thickness);
@BindingMethod
public native void AddConvexPolyFilled(ImVec2[] points, int numPoints, int col);
/**
* Cubic Bezier (4 control points)
*/
@@ -129,6 +137,19 @@ public final class ImDrawList extends ImGuiStruct {
@BindingMethod
public native void AddBezierQuadratic(ImVec2 p1, ImVec2 p2, ImVec2 p3, int col, float thickness, @OptArg int numSegments);
// General polygon
// - Only simple polygons are supported by filling functions (no self-intersections, no holes).
// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience fo user but not used by main library.
@BindingMethod
public native void AddPolyline(ImVec2[] points, int numPoints, int col, int imDrawFlags, float thickness);
@BindingMethod
public native void AddConvexPolyFilled(ImVec2[] points, int numPoints, int col);
@BindingMethod
public native void AddConcavePolyFilled(ImVec2[] points, int numPoints, int col);
// Image primitives
// - Read FAQ to understand what ImTextureID is.
// - "pMin" and "pMax" represent the upper-left and lower-right corners of the rectangle.
@@ -144,7 +165,8 @@ public final class ImDrawList extends ImGuiStruct {
public native void AddImageRounded(@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long textureID, ImVec2 pMin, ImVec2 pMax, ImVec2 uvMin, ImVec2 uvMax, int col, float rounding, @OptArg int imDrawFlags);
// Stateful path API, add points then finish with PathFillConvex() or PathStroke()
// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex().
@BindingMethod
public native void PathClear();
@@ -161,6 +183,9 @@ public final class ImDrawList extends ImGuiStruct {
@BindingMethod
public native void PathFillConvex(int col);
@BindingMethod
public native void PathFillConcave(int col);
@BindingMethod
public native void PathStroke(int col, @OptArg(callValue = "0") int imDrawFlags, @OptArg float thickness);
@@ -173,6 +198,9 @@ public final class ImDrawList extends ImGuiStruct {
@BindingMethod
public native void PathArcToFast(ImVec2 center, float radius, int aMinOf12, int aMaxOf12);
@BindingMethod
public native void PathEllipticalArcTo(ImVec2 center, ImVec2 radius, float rot, float aMin, float aMax, @OptArg int numSegments);
/**
* Cubic Bezier (4 control points)
*/
@@ -80,26 +80,26 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
* Set font_cfg.FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed.
*/
@BindingMethod
public native ImFont AddFontFromMemoryTTF(byte[] fontData, @ArgValue(callValue = "(int)env->GetArrayLength(obj_fontData)") Void fontSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig fontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
public native ImFont AddFontFromMemoryTTF(byte[] fontData, @ArgValue(callValue = "(int)env->GetArrayLength(obj_fontData)") Void fontDataSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig fontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
/**
* Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
* Set font_cfg.FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed.
*/
@BindingMethod
public native ImFont AddFontFromMemoryTTF(byte[] fontData, int fontSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig fontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
public native ImFont AddFontFromMemoryTTF(byte[] fontData, int fontDataSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig fontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
/**
* 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
*/
@BindingMethod
public native ImFont AddFontFromMemoryCompressedTTF(byte[] compressedFontData, @ArgValue(callValue = "(int)env->GetArrayLength(obj_compressedFontData)") Void compressedFontSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig imFontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
public native ImFont AddFontFromMemoryCompressedTTF(byte[] compressedFontData, @ArgValue(callValue = "(int)env->GetArrayLength(obj_compressedFontData)") Void compressedFontDataSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig imFontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
/**
* 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
*/
@BindingMethod
public native ImFont AddFontFromMemoryCompressedTTF(byte[] compressedFontData, int compressedFontSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig imFontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
public native ImFont AddFontFromMemoryCompressedTTF(byte[] compressedFontData, int compressedFontDataSize, float sizePixels, @OptArg(callValue = "NULL") ImFontConfig imFontConfig, @OptArg @ArgValue(callPrefix = "(ImWchar*)") short[] glyphRanges);
/**
* 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 parameter.
@@ -336,11 +336,12 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
//-------------------------------------------
// You can request arbitrary rectangles to be packed into the atlas, for your own purposes.
// After calling Build(), you can query the rectangle position and render your pixels.
// You can also request your rectangles to be mapped as font glyph (given a font + Unicode point),
// so you can render e.g. custom colorful icons and use them as regular glyphs.
// Read docs/FONTS.md for more details about using colorful icons.
// Note: this API may be redesigned later in order to support multi-monitor varying DPI settings.
// - After calling Build(), you can query the rectangle position and render your pixels.
// - If you render colored output, set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format.
// - You can also request your rectangles to be mapped as font glyph (given a font + Unicode point),
// so you can render e.g. custom colorful icons and use them as regular glyphs.
// - Read docs/FONTS.md for more details about using colorful icons.
// - Note: this API may be redesigned later in order to support multi-monitor varying DPI settings.
@BindingMethod
public native int AddCustomRectRegular(int width, int height);
@@ -159,6 +159,12 @@ public final class ImFontConfig extends ImGuiStructDestroyable {
@BindingField
public float RasterizerMultiply;
/**
* DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered.
*/
@BindingField
public float RasterizerDensity;
/**
* Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
*/
+178 -123
View File
@@ -192,7 +192,7 @@ public class ImGui {
public static native ImGuiIO GetIO();
/**
* Access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame!
* Access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame!
*/
@BindingMethod
@ReturnValue(isStatic = true, callPrefix = "&")
@@ -248,7 +248,7 @@ public class ImGui {
* Create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
*/
@BindingMethod
public static native void ShowStackToolWindow(@OptArg ImBoolean pOpen);
public static native void ShowIDStackToolWindow(@OptArg ImBoolean pOpen);
/**
* Create About window. display Dear ImGui version, credits and build/system information.
@@ -309,16 +309,15 @@ public class ImGui {
// Windows
// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack.
// - You may append multiple times to the same window during the same frame.
// - Passing 'bool* pOpen != NULL' shows a window-closing widget in the upper-right corner of the window,
// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window,
// which clicking will set the boolean to false when clicked.
// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times.
// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin().
// - Begin() return 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 End() for each Begin() 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.]
// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all 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.]
// - Note that the bottom of window stack always contains a window called "Debug".
@BindingMethod
@@ -329,18 +328,38 @@ public class ImGui {
// Child Windows
// - 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.
// [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.]
// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false".
// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Border == true.
// Consider updating your old code:
// BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
// BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Border);
// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)):
// == 0.0f: use remaining parent window size for this axis.
// > 0.0f: use specified size for this axis.
// < 0.0f: right/bottom-align to specified distance from available content boundaries.
// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents.
// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended.
// - 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.
// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all 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.]
@BindingMethod
public static native boolean BeginChild(String strId, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "false") boolean border, @OptArg int imGuiWindowFlags);
public static native boolean BeginChild(String strId, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "0") int childFlags, @OptArg int windowFlags);
@BindingMethod
public static native boolean BeginChild(int imGuiID, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "false") boolean border, @OptArg int imGuiWindowFlags);
public static native boolean BeginChild(int id, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "0") int childFlags, @OptArg int windowFlags);
@BindingMethod
public static native boolean BeginChild(String strId, ImVec2 size, @ArgValue(staticCast = "ImGuiChildFlags") boolean border, @OptArg int windowFlags);
/**
* @deprecated Use {@link #beginChild(String, ImVec2, int, int)} instead.
*/
@Deprecated
@BindingMethod
public static native boolean BeginChild(int id, ImVec2 size, @ArgValue(staticCast = "ImGuiChildFlags") boolean border, @OptArg int windowFlags);
@BindingMethod
public static native void EndChild();
@@ -361,9 +380,10 @@ public class ImGui {
public static native boolean IsWindowFocused(@OptArg int imGuiFocusedFlags);
/**
* Is current window hovered (and typically: not blocked by a popup/modal)? see flags for options.
* NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app,
* you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!
* Is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options.
* IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app,
* you should not use this function! Use the 'io.WantCaptureMouse' boolean for that!
* Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details.
*/
@BindingMethod
public static native boolean IsWindowHovered(@OptArg int imGuiHoveredFlags);
@@ -382,13 +402,13 @@ public class ImGui {
/**
* Get current window position in screen space (note: it is unlikely you need to use this.
* Consider using current layout pos instead, GetScreenCursorPos())
* Consider using current layout pos instead, GetCursorScreenPos())
*/
@BindingMethod
public static native ImVec2 GetWindowPos();
/**
* Get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
* Get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
*/
@BindingMethod
public static native ImVec2 GetWindowSize();
@@ -426,7 +446,8 @@ public class ImGui {
public static native void SetNextWindowSize(ImVec2 size, @OptArg int cond);
/**
* Set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Sizes will be rounded down.
* Set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max of same axis to preserve current size (which itself is a constraint).
* Use callback to apply non-trivial programmatic constraints.
*/
@BindingMethod
public static native void SetNextWindowSizeConstraints(ImVec2 sizeMin, ImVec2 sizeMax);
@@ -757,7 +778,7 @@ public class ImGui {
* Retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList.
*/
@BindingMethod(callName = "GetColorU32")
public static native int GetColorU32i(@ArgValue(staticCast = "ImU32") int col);
public static native int GetColorU32i(@ArgValue(staticCast = "ImU32") int col, @OptArg float alphaMul);
/**
* Retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(),
@@ -766,13 +787,58 @@ public class ImGui {
@BindingMethod
public static native ImVec4 GetStyleColorVec4(int imGuiColIdx);
// Cursor / Layout
// Layout cursor positioning
// - By "cursor" we mean the current output position.
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
// Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
// Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions.
// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
// - Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
/**
* Cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
*/
@BindingMethod
public static native ImVec2 GetCursorScreenPos();
/**
* Cursor position in absolute coordinates.
*/
@BindingMethod
public static native void SetCursorScreenPos(ImVec2 pos);
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native ImVec2 GetCursorPos();
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native void SetCursorPos(ImVec2 localPos);
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native void SetCursorPosX(float localX);
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native void SetCursorPosY(float localY);
/**
* Initial cursor position in window coordinates
*/
@BindingMethod
public static native ImVec2 GetCursorStartPos();
// Other layout functions
/**
* Separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
@@ -833,50 +899,6 @@ public class ImGui {
// are using the main, absolute coordinate system.
// GetWindowPos() + GetCursorPos() == GetCursorScreenPos() etc.)
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native ImVec2 GetCursorPos();
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native void SetCursorPos(ImVec2 pos);
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native void SetCursorPosX(float x);
/**
* Cursor position in window coordinates (relative to window position)
*/
@BindingMethod
public static native void SetCursorPosY(float y);
/**
* Initial cursor position in window coordinates
*/
@BindingMethod
public static native ImVec2 GetCursorStartPos();
/**
* Cursor position in absolute coordinates (useful to work with ImDrawList API).
* Generally top-left == GetMainViewport().Pos == (0,0) in single viewport mode,
* and bottom-right == GetMainViewport().Pos+Size == io.DisplaySize in single-viewport mode.
*/
@BindingMethod
public static native ImVec2 GetCursorScreenPos();
/**
* Cursor position in absolute coordinates.
*/
@BindingMethod
public static native void SetCursorScreenPos(ImVec2 pos);
/**
* Vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)
*/
@@ -1046,7 +1068,7 @@ public class ImGui {
public static native boolean Button(String label, @OptArg ImVec2 size);
/**
* Button with FramePadding=(0,0) to easily embed within text
* Button with (FramePadding.y == 0) to easily embed within text
*/
@BindingMethod
public static native boolean SmallButton(String label);
@@ -1061,7 +1083,7 @@ public class ImGui {
* Square button with an arrow shape
*/
@BindingMethod
public static native boolean ArrowButton(String strId, int dir);
public static native boolean ArrowButton(String strId, @ArgValue(staticCast = "ImGuiDir") int dir);
public static boolean checkbox(String label, boolean active) {
return nCheckbox(label, active);
@@ -1103,10 +1125,10 @@ public class ImGui {
// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
@BindingMethod
public static native void Image(@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg ImVec4 tintCol, @OptArg ImVec4 borderCol);
public static native void Image(@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 imageSize, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg ImVec4 tintCol, @OptArg ImVec4 borderCol);
@BindingMethod
public static native boolean ImageButton(String strId, @ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg ImVec4 bgCol, @OptArg ImVec4 tintCol);
public static native boolean ImageButton(String strId, @ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 imageSize, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg ImVec4 bgCol, @OptArg ImVec4 tintCol);
// Widgets: Combo Box (Dropdown)
@@ -1649,19 +1671,19 @@ public class ImGui {
public static native boolean TreeNodeEx(@ArgValue(callPrefix = "(void*)") long ptrId, int flags, String label, Void NULL);
/**
* ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
* ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
*/
@BindingMethod
public static native void TreePush(String strId);
/**
* ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
* ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
*/
@BindingMethod
public static native void TreePush(@ArgValue(callPrefix = "(void*)") long ptrId);
/**
* ~ Unindent()+PopId()
* ~ Unindent()+PopID()
*/
@BindingMethod
public static native void TreePop();
@@ -1702,11 +1724,11 @@ public class ImGui {
public static native boolean Selectable(String label, ImBoolean pSelected, @OptArg(callValue = "0") int imGuiSelectableFlags, @OptArg ImVec2 size);
// Widgets: List Boxes
// - This is essentially a thin wrapper to using BeginChild/EndChild with some stylistic changes.
// - The BeginListBox()/EndListBox() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() or any items.
// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analoguous to how Combos are created.
// - Choose frame width: size.x > 0.0f: custom / size.{@code x {@code <} 0.0f} or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
// - Choose frame height: size.y > 0.0f: custom / size.y {@code < 0.0f} or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items
// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items
/**
* Open a framed scrolling region.
@@ -1808,7 +1830,8 @@ public class ImGui {
// Tooltips
// - Tooltips are windows following the mouse. They do not take focus away.
// - A tooltip window can contain items of any types. SetTooltip() is a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom.
// - A tooltip window can contain items of any types.
// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip)
/**
* Begin/append a tooltip window.
@@ -1840,7 +1863,7 @@ public class ImGui {
public static native boolean BeginItemTooltip();
/**
* Set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
* Set a text-only tooltip if preceding item was hovered. override any previous call to SetTooltip().
*/
@BindingMethod
public static native void SetItemTooltip(String text, Void NULL);
@@ -1853,8 +1876,7 @@ public class ImGui {
// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
// This is sometimes leading to confusing mistakes. May rework this in the future.
// Popups: begin/end functions
// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards. ImGuiWindowFlags are forwarded to the window.
// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window.
// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/**
@@ -1958,16 +1980,14 @@ public class ImGui {
// 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!
// --------------------------------------------------------------------------------------------------------
// - 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()
@BindingMethod
public static native boolean BeginTable(String id, int column, @OptArg(callValue = "0") int imGuiTableFlags, @OptArg(callValue = "ImVec2(0,0)") ImVec2 outerSize, @OptArg float innerWidth);
public static native boolean BeginTable(String id, int columns, @OptArg(callValue = "0") int imGuiTableFlags, @OptArg(callValue = "ImVec2(0,0)") ImVec2 outerSize, @OptArg float innerWidth);
/**
* Only call EndTable() if BeginTable() returns true!
@@ -2011,6 +2031,12 @@ public class ImGui {
@BindingMethod
public static native void TableSetupScrollFreeze(int cols, int rows);
/**
* Submit one header cell manually (rarely used)
*/
@BindingMethod
public static native void TableHeader(String label);
/**
* Submit all headers cells based on data provided to TableSetupColumn() + submit context menu
*/
@@ -2018,10 +2044,10 @@ public class ImGui {
public static native void TableHeadersRow();
/**
* Submit one header cell manually (rarely used)
* Submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW.
*/
@BindingMethod
public static native void TableHeader(String label);
public static native void TableAngledHeadersRow();
// Tables: Sorting & Miscellaneous functions
// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
@@ -2077,6 +2103,12 @@ public class ImGui {
@BindingMethod
public static native void TableSetColumnEnabled(int columnN, boolean value);
/**
* 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. Can also use (TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered) instead.
*/
@BindingMethod
public static native int TableGetHoveredColumn();
/**
* Change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.
*/
@@ -2172,11 +2204,11 @@ public class ImGui {
// Docking
// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking/undocking.
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to _enable_ docking/undocking.
// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
// About dockspaces:
// - Use DockSpaceOverViewport() to create an explicit dock node covering the screen or a specific viewport.
// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
@@ -2184,10 +2216,10 @@ public class ImGui {
// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
@BindingMethod
public static native int DockSpace(int imGuiID, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "0") int imGuiDockNodeFlags, @OptArg ImGuiWindowClass windowClass);
public static native int DockSpace(int dockspaceId, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "0") int imGuiDockNodeFlags, @OptArg ImGuiWindowClass windowClass);
@BindingMethod
public static native int DockSpaceOverViewport(@OptArg ImGuiViewport viewport, @OptArg(callValue = "0") int imGuiDockNodeFlags, @OptArg ImGuiWindowClass windowClass);
public static native int DockSpaceOverViewport(@OptArg(callValue = "0") int dockspaceId, @OptArg ImGuiViewport viewport, @OptArg(callValue = "0") int imGuiDockNodeFlags, @OptArg ImGuiWindowClass windowClass);
/**
* Set next window dock id
@@ -2378,7 +2410,7 @@ public class ImGui {
public static native void EndDragDropTarget();
/**
* Peek directly into the current payload from anywhere. May return NULL.
* Peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type.
*/
@SuppressWarnings("unchecked")
public static <T> T getDragDropPayload() {
@@ -2422,6 +2454,12 @@ public class ImGui {
return payload != NULL && payload->IsDataType(dataType);
*/
// Disabling [BETA API]
// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
// - Tooltips windows by exception are opted out of disabling.
// - BeginDisabled(false) essentially does nothing useful but is provided to facilitate use of boolean expressions. If you can avoid calling BeginDisabled(False)/EndDisabled() best to avoid it.
/**
* Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
* BeginDisabled(false) essentially does nothing useful but is provided to facilitate use of boolean expressions.
@@ -2592,15 +2630,15 @@ public class ImGui {
// Background/Foreground Draw Lists
/**
* Get background draw list for the viewport associated to the current window.
* Get background draw list for the given viewport or viewport associated to the current window.
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
*/
@BindingMethod
public static native ImDrawList GetBackgroundDrawList(@OptArg ImGuiViewport viewport);
/**
* Get foreground draw list for the viewport associated to the current window.
* This draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
* Get foreground draw list for the given viewport or viewport associated to the current window.
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
*/
@BindingMethod
public static native ImDrawList GetForegroundDrawList(@OptArg ImGuiViewport viewport);
@@ -2650,18 +2688,6 @@ public class ImGui {
@BindingMethod
public static native ImGuiStorage GetStateStorage();
/**
* Helper to create a child window / scrolling region that looks like a normal widget frame
*/
@BindingMethod
public static native boolean BeginChildFrame(int id, ImVec2 size, @OptArg int imGuiWindowFlags);
/**
* Always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window)
*/
@BindingMethod
public static native void EndChildFrame();
// Text Utilities
@BindingMethod
@@ -2697,13 +2723,6 @@ public class ImGui {
// - without IMGUI_DISABLE_OBSOLETE_KEYIO (legacy support): you can still use your legacy native/user indices (< 512) according to how your backend/engine stored them in io.KeysDown[], but need to cast them to ImGuiKey.
// - with IMGUI_DISABLE_OBSOLETE_KEYIO (this is the way forward): any use of ImGuiKey will assert with key < 512. GetKeyIndex() is pass-through and therefore deprecated (gone if IMGUI_DISABLE_OBSOLETE_KEYIO is defined).
/**
* Map ImGuiKey_* values into user's key index. == io.KeyMap[key]
*/
@BindingMethod
@Deprecated
public static native int GetKeyIndex(@ArgValue(staticCast = "ImGuiKey") int key);
/**
* Is key being held. == io.KeysDown[user_key_index].
*/
@@ -2722,6 +2741,13 @@ public class ImGui {
@BindingMethod
public static native boolean IsKeyReleased(@ArgValue(staticCast = "ImGuiKey") int key);
/**
* Was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord.
* This doesn't do any routing or focus check, please consider using Shortcut() function instead.
*/
@BindingMethod
public static native boolean IsKeyChordPressed(@ArgValue(staticCast = "ImGuiKeyChord") int keyChord);
/**
* Uses provided repeat rate/delay.
* Return a count, most often 0 or 1 but might be {@code >1} if RepeatRate is small enough that {@code DeltaTime > RepeatRate}
@@ -2743,6 +2769,28 @@ public class ImGui {
@BindingMethod
public static native void SetNextFrameWantCaptureKeyboard(boolean wantCaptureKeyboard);
// Inputs Utilities: Shortcut Testing & Routing [BETA]
// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments)
// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments)
// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values.
// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
// Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
// Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
// Child2 -> no call // When Child2 is focused, Parent gets the shortcut.
// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
// This is an important property as it facilitate working with foreign code or larger codebase.
// - To understand the difference:
// - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect.
// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -> function has (desirable) side-effects as it can prevents another call from getting the route.
// - Visualize registered routes in 'Metrics/Debugger->Inputs'.
@BindingMethod
public static native boolean Shortcut(@ArgValue(staticCast = "ImGuiKeyChord") int keyChord, @OptArg int flags);
@BindingMethod
public static native void SetNextItemShortcut(@ArgValue(staticCast = "ImGuiKeyChord") int keyChord, @OptArg int flags);
// Inputs Utilities: Mouse specific
// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
@@ -2809,14 +2857,14 @@ public class ImGui {
public static native ImVec2 GetMousePosOnOpeningCurrentPopup();
/**
* Is mouse dragging. if lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold
* Is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
*/
@BindingMethod
public static native boolean IsMouseDragging(int button, @OptArg float lockThreshold);
/**
* Return the delta from the initial clicking position while the mouse button is pressed or was just released.
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
*/
@BindingMethod
public static native ImVec2 GetMouseDragDelta(@OptArg final int button, @OptArg final float lockThreshold);
@@ -2884,10 +2932,17 @@ public class ImGui {
public static native String SaveIniSettingsToMemory(@OptArg @ArgValue(callPrefix = "(size_t*)&") long outIniSize);
// Debug Utilities
// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger
@BindingMethod
public static native void DebugTextEncoding(String text);
@BindingMethod
public static native void DebugFlashStyleColor(@ArgValue(staticCast = "ImGuiCol") int idx);
@BindingMethod
public static native void DebugStartItemPicker();
@BindingMethod
public static native boolean DebugCheckVersionAndDataLayout(String versionStr, int szIo, int szStyle, int szVec2, int szVec4, int szDrawVert, int szDrawIdx);
+27 -30
View File
@@ -252,6 +252,15 @@ public final class ImGuiIO extends ImGuiStruct {
// Debug options
//------------------------------------------------------------------
/**
* Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro.
* - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability.
* - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application.
* e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
*/
@BindingField
public boolean ConfigDebugIsDebuggerPresent;
/**
* Tools to test correct Begin/End and BeginChild/EndChild behaviors.
* Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()
@@ -430,6 +439,18 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingMethod
public native void ClearEventsQueue();
/**
* Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
*/
@BindingMethod
public native void ClearInputKeys();
/**
* Clear current mouse state.
*/
@BindingMethod
public native void ClearInputMouse();
//------------------------------------------------------------------
// Output - Updated by NewFrame() or EndFrame()/Render()
// (when reading from the io.WantCaptureMouse, io.WantCaptureKeyboard flags to dispatch your inputs, it is
@@ -517,42 +538,12 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public int MetricsActiveWindows;
/**
* Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
*/
@BindingField
public int MetricsActiveAllocations;
/**
* Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
*/
@BindingField
public ImVec2 MouseDelta;
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
@BindingField
@TypeArray(type = "int", size = "ImGuiKey_COUNT")
@Deprecated
public int[] KeyMap;
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
*/
@BindingField
@TypeArray(type = "boolean", size = "ImGuiKey_COUNT")
@Deprecated
public boolean[] KeysDown;
/**
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
*/
@BindingField
@TypeArray(type = "float", size = "512")
public float[] NavInputs;
//------------------------------------------------------------------
// [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
//------------------------------------------------------------------
@@ -719,6 +710,12 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public boolean MouseWheelRequestAxisSwap;
/**
* (OSX) Set to true when the current click was a ctrl-click that spawned a simulated right click.
*/
@BindingField
public boolean MouseCtrlLeftAsRightClick;
/**
* Duration the mouse button has been down (0.0f == just clicked)
*/
@@ -64,18 +64,18 @@ public final class ImGuiStorage extends ImGuiStructDestroyable {
@BindingMethod
public native void SetFloat(int key, float val);
/**
* Use on your own storage if you know only integer are being stored (open/close all tree nodes)
*/
@BindingMethod
public native void SetAllInt(int val);
/**
* For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and then sort once.
*/
@BindingMethod
public native void BuildSortByKey();
/**
* Use on your own storage if you know only integer are being stored (open/close all tree nodes)
*/
@BindingMethod
public native void SetAllInt(int val);
/*JNI
#undef THIS
*/
@@ -81,7 +81,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
/**
* Side of the collapsing/docking button in the title bar (None/Left/Right). Defaults to ImGuiDir_Left.
*/
@BindingField
@BindingField(staticCast = "ImGuiDir")
public int WindowMenuButtonPosition;
/**
@@ -215,7 +215,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
/**
* Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
*/
@BindingField
@BindingField(staticCast = "ImGuiDir")
public int ColorButtonPosition;
/**
@@ -50,6 +50,12 @@ public final class ImGuiWindowClass extends ImGuiStructDestroyable {
@BindingField
public int ParentViewportId;
/**
* ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will succeed when this window is focused.
*/
@BindingField
public int FocusRouteParentWindowId;
/**
* Viewport flags to set when a window of this class owns a viewport.
* This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis.
@@ -31,4 +31,9 @@ public @interface BindingField {
* Name of the method which will be used to call native API.
*/
String callName() default "";
/**
* Defines a value to cast with "static_cast" function.
*/
String staticCast() default "";
}
@@ -0,0 +1,24 @@
package imgui.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
/**
* Flags for ImGui::BeginChild()
* (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'.
* About using AutoResizeX/AutoResizeY flags:
* - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints").
* - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.
* - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped.
* While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch.
* - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.
* HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping.
*/
@BindingSource
public final class ImGuiChildFlags {
private ImGuiChildFlags() {
}
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiChildFlags_")
public Void __;
}
@@ -11,6 +11,6 @@ public final class ImGuiDir {
private ImGuiDir() {
}
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiDir_")
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiDir", sanitizeName = "ImGuiDir_")
public Void __;
}
@@ -11,6 +11,6 @@ public final class ImGuiSortDirection {
private ImGuiSortDirection() {
}
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiSortDirection_")
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiSortDirection", sanitizeName = "ImGuiSortDirection_")
public Void __;
}
@@ -324,7 +324,7 @@ public final class ImGui extends imgui.ImGui {
* Create 2 child nodes in this parent node.
*/
@BindingMethod
public static native int DockBuilderSplitNode(int nodeId, int splitDir, float sizeRatioForNodeAtDir, @ArgValue(reinterpretCast = "ImGuiID*") ImInt outIdAtDir, @ArgValue(reinterpretCast = "ImGuiID*") ImInt outIdAtOppositeDir);
public static native int DockBuilderSplitNode(int nodeId, @ArgValue(staticCast = "ImGuiDir") int splitDir, float sizeRatioForNodeAtDir, @ArgValue(reinterpretCast = "ImGuiID*") ImInt outIdAtDir, @ArgValue(reinterpretCast = "ImGuiID*") ImInt outIdAtOppositeDir);
// TODO DockBuilderCopyDockSpace, DockBuilderCopyNode
@@ -428,4 +428,8 @@ public final class ImGui extends imgui.ImGui {
@BindingMethod
public static native boolean SplitterBehavior(ImRect bb, int id, @ArgValue(staticCast = "ImGuiAxis") int axis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, @OptArg float hoverExtend, @OptArg float hoverVisibilityDelay, @OptArg int bgCol);
// Shade functions (write over already created vertices)
@BindingMethod
public static native void ShadeVertsTransformPos(ImDrawList drawList, int vertStartIdx, int vertEndIdx, ImVec2 pivotIn, float cosA, float sinA, ImVec2 pivotOut);
}
+1 -1
View File
@@ -30,7 +30,7 @@
//#define IMGUI_API __declspec( dllimport )
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions.
//---- Disable all of Dear ImGui or don't implement standard windows.
@@ -172,6 +172,7 @@ public class ImGuiImplGl3 {
protected int elementsHandle = 0;
// protected int vertexBufferSize;
// protected int indexBufferSize;
// protected boolean hasPolygonMode;
protected boolean hasClipOrigin;
}
@@ -262,11 +263,11 @@ public class ImGuiImplGl3 {
io.setBackendRendererName("imgui-java_impl_opengl3");
{ // Desktop or GLES 3
final String glVersion = glGetString(GL_VERSION);
int major = glGetInteger(GL_MAJOR_VERSION);
int minor = glGetInteger(GL_MINOR_VERSION);
if (major == 0 && minor == 0) {
// Query GL_VERSION in desktop GL 2.x, the string will start with "<major>.<minor>"
final String glVersion = glGetString(GL_VERSION);
if (glVersion != null) {
final String[] glVersions = glVersion.split("\\.");
major = Integer.parseInt(glVersions[0]);
@@ -337,6 +338,9 @@ public class ImGuiImplGl3 {
if (data.shaderHandle == 0) {
createDeviceObjects();
}
if (data.fontTexture == 0) {
createFontsTexture();
}
}
protected void setupRenderState(final ImDrawData drawData, final int fbWidth, final int fbHeight, final int gVertexArrayObject) {
@@ -108,7 +108,19 @@ import static org.lwjgl.glfw.GLFW.GLFW_KEY_F1;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F10;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F11;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F12;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F13;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F14;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F15;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F16;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F17;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F18;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F19;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F2;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F20;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F21;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F22;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F23;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F24;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F3;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F4;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_F5;
@@ -288,7 +300,7 @@ public class ImGuiImplGlfw {
// This field is required to use GLFW with touch screens on Windows.
// For compatibility reasons it was added here as a comment. But we don't use somewhere in the binding implementation.
// protected long glfwWndProc;
// protected long prevWndProc;
}
/**
@@ -579,6 +591,30 @@ public class ImGuiImplGlfw {
return ImGuiKey.F11;
case GLFW_KEY_F12:
return ImGuiKey.F12;
case GLFW_KEY_F13:
return ImGuiKey.F13;
case GLFW_KEY_F14:
return ImGuiKey.F14;
case GLFW_KEY_F15:
return ImGuiKey.F15;
case GLFW_KEY_F16:
return ImGuiKey.F16;
case GLFW_KEY_F17:
return ImGuiKey.F17;
case GLFW_KEY_F18:
return ImGuiKey.F18;
case GLFW_KEY_F19:
return ImGuiKey.F19;
case GLFW_KEY_F20:
return ImGuiKey.F20;
case GLFW_KEY_F21:
return ImGuiKey.F21;
case GLFW_KEY_F22:
return ImGuiKey.F22;
case GLFW_KEY_F23:
return ImGuiKey.F23;
case GLFW_KEY_F24:
return ImGuiKey.F24;
default:
return ImGuiKey.None;
}