feat(api): bump Dear ImGui from 1.88 to 1.89.9

resolves #134
resolves #135
resolves #145
resolves #220
resolves #310

- Bump imgui-node-editor to the latest coomit
- Bump implot from 0.13 to 0.16
This commit is contained in:
SpaiR authored and GitHub committed 2025-01-29 15:24:43 +02:00
1 parent 2a605f0d85
commit e70576f322
133 files changed
+21416 -19232

No files matched your search

@@ -18,8 +18,8 @@ class GenerateLibs extends DefaultTask {
'include/imgui-node-editor',
'include/imguizmo',
'include/implot',
'include/ImGuiColorTextEdit',
'include/ImGuiFileDialog',
// 'include/ImGuiColorTextEdit',
// 'include/ImGuiFileDialog',
'include/imgui_club/imgui_memory_editor',
'include/imgui-knobs'
]
@@ -1,9 +1,9 @@
{
"info" : {
"source" : "include/imguizmo/ImGuizmo.h",
"hash" : "f3ed04e44a5959358d2d9966b66f2f69",
"hash" : "86c265f6f4ce4a91b09950758f209579",
"url" : "https://github.com/CedricGuillemet/ImGuizmo.git",
"revision" : "e2bc419c8826a3d632d3974aab201b0fee770263"
"revision" : "ba662b119d64f9ab700bb2cd7b2781f9044f5565"
},
"decls" : [ {
"@type" : "AstNamespaceDecl",
@@ -101,6 +101,20 @@
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "IsUsingAny",
"resultType" : "bool",
"decls" : [ {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : " return true if any gizmo is in moving state"
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "Enable",
@@ -712,6 +726,206 @@
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "SetAxisLimit",
"resultType" : "void",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "value",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : " Configure the limit where axis are hidden"
} ]
} ]
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "SetPlaneLimit",
"resultType" : "void",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "value",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : " Configure the limit where planes are hiden"
} ]
} ]
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "COLOR",
"decls" : [ {
"@type" : "AstEnumConstantDecl",
"name" : "DIRECTION_X",
"docComment" : "directionColor[0]",
"qualType" : "ImGuizmo::COLOR",
"order" : 0,
"evaluatedValue" : 0
}, {
"@type" : "AstEnumConstantDecl",
"name" : "DIRECTION_Y",
"docComment" : "directionColor[1]",
"qualType" : "ImGuizmo::COLOR",
"order" : 1,
"evaluatedValue" : 1
}, {
"@type" : "AstEnumConstantDecl",
"name" : "DIRECTION_Z",
"docComment" : "directionColor[2]",
"qualType" : "ImGuizmo::COLOR",
"order" : 2,
"evaluatedValue" : 2
}, {
"@type" : "AstEnumConstantDecl",
"name" : "PLANE_X",
"docComment" : "planeColor[0]",
"qualType" : "ImGuizmo::COLOR",
"order" : 3,
"evaluatedValue" : 3
}, {
"@type" : "AstEnumConstantDecl",
"name" : "PLANE_Y",
"docComment" : "planeColor[1]",
"qualType" : "ImGuizmo::COLOR",
"order" : 4,
"evaluatedValue" : 4
}, {
"@type" : "AstEnumConstantDecl",
"name" : "PLANE_Z",
"docComment" : "planeColor[2]",
"qualType" : "ImGuizmo::COLOR",
"order" : 5,
"evaluatedValue" : 5
}, {
"@type" : "AstEnumConstantDecl",
"name" : "SELECTION",
"docComment" : "selectionColor",
"qualType" : "ImGuizmo::COLOR",
"order" : 6,
"evaluatedValue" : 6
}, {
"@type" : "AstEnumConstantDecl",
"name" : "INACTIVE",
"docComment" : "inactiveColor",
"qualType" : "ImGuizmo::COLOR",
"order" : 7,
"evaluatedValue" : 7
}, {
"@type" : "AstEnumConstantDecl",
"name" : "TRANSLATION_LINE",
"docComment" : "translationLineColor",
"qualType" : "ImGuizmo::COLOR",
"order" : 8,
"evaluatedValue" : 8
}, {
"@type" : "AstEnumConstantDecl",
"name" : "SCALE_LINE",
"qualType" : "ImGuizmo::COLOR",
"order" : 9,
"evaluatedValue" : 9
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ROTATION_USING_BORDER",
"qualType" : "ImGuizmo::COLOR",
"order" : 10,
"evaluatedValue" : 10
}, {
"@type" : "AstEnumConstantDecl",
"name" : "ROTATION_USING_FILL",
"qualType" : "ImGuizmo::COLOR",
"order" : 11,
"evaluatedValue" : 11
}, {
"@type" : "AstEnumConstantDecl",
"name" : "HATCHED_AXIS_LINES",
"qualType" : "ImGuizmo::COLOR",
"order" : 12,
"evaluatedValue" : 12
}, {
"@type" : "AstEnumConstantDecl",
"name" : "TEXT",
"qualType" : "ImGuizmo::COLOR",
"order" : 13,
"evaluatedValue" : 13
}, {
"@type" : "AstEnumConstantDecl",
"name" : "TEXT_SHADOW",
"qualType" : "ImGuizmo::COLOR",
"order" : 14,
"evaluatedValue" : 14
}, {
"@type" : "AstEnumConstantDecl",
"name" : "COUNT",
"qualType" : "ImGuizmo::COLOR",
"order" : 15,
"evaluatedValue" : 15
} ]
}, {
"@type" : "AstRecordDecl",
"name" : "Style",
"decls" : [ {
"@type" : "AstFieldDecl",
"name" : "TranslationLineThickness",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "TranslationLineArrowSize",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "RotationLineThickness",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "RotationOuterLineThickness",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "ScaleLineThickness",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "ScaleLineCircleSize",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "HatchedAxisLineThickness",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "CenterCircleSize",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "Colors",
"qualType" : "int[15]",
"desugaredQualType" : "int[15]"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "GetStyle",
"resultType" : "Style &"
} ]
} ]
}
File diff suppressed because it is too large. Load diff
@@ -1,9 +1,9 @@
{
"info" : {
"source" : "include/imgui/misc/freetype/imgui_freetype.h",
"hash" : "5976473c3ad2fbe2f0386eaa9019d4e0",
"hash" : "70fc81810854ab5f439f8e1ea0536285",
"url" : "https://github.com/ocornut/imgui",
"revision" : "9cd9c2eff99877a3f10a7f9c2a3a5b9c15ea36c6"
"revision" : "1d8e48c161370c37628c4f37f3f87cb19fbcb723"
},
"decls" : [ {
"@type" : "AstRecordDecl",
File diff suppressed because it is too large. Load diff
@@ -1,9 +1,9 @@
{
"info" : {
"source" : "include/imgui-node-editor/imgui_node_editor.h",
"hash" : "0f066843f1362eeb6d7ee7b7f4fad24f",
"hash" : "22122655801cd34b78703e44a74d5ee9",
"url" : "https://github.com/thedmd/imgui-node-editor",
"revision" : "d79ebdeb2375fa6c1f88a40e52e7d08c8d472b62"
"revision" : "b302971455b3719ec9b5fb94b2f92d27c62b9ff0"
},
"decls" : [ {
"@type" : "AstNamespaceDecl",
@@ -33,6 +33,72 @@
} ]
} ]
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "PinKind",
"decls" : [ {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : "------------------------------------------------------------------------------"
} ]
} ]
}, {
"@type" : "AstEnumConstantDecl",
"name" : "Input",
"qualType" : "ax::NodeEditor::PinKind",
"order" : 0,
"evaluatedValue" : 0
}, {
"@type" : "AstEnumConstantDecl",
"name" : "Output",
"qualType" : "ax::NodeEditor::PinKind",
"order" : 1,
"evaluatedValue" : 1
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "FlowDirection",
"decls" : [ {
"@type" : "AstEnumConstantDecl",
"name" : "Forward",
"qualType" : "ax::NodeEditor::FlowDirection",
"order" : 0,
"evaluatedValue" : 0
}, {
"@type" : "AstEnumConstantDecl",
"name" : "Backward",
"qualType" : "ax::NodeEditor::FlowDirection",
"order" : 1,
"evaluatedValue" : 1
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "CanvasSizeMode",
"decls" : [ {
"@type" : "AstEnumConstantDecl",
"name" : "FitVerticalView",
"docComment" : "Previous view will be scaled to fit new view on Y axis",
"qualType" : "ax::NodeEditor::CanvasSizeMode",
"order" : 0,
"evaluatedValue" : 0
}, {
"@type" : "AstEnumConstantDecl",
"name" : "FitHorizontalView",
"docComment" : "Previous view will be scaled to fit new view on X axis",
"qualType" : "ax::NodeEditor::CanvasSizeMode",
"order" : 1,
"evaluatedValue" : 1
}, {
"@type" : "AstEnumConstantDecl",
"name" : "CenterOnly",
"docComment" : "Previous view will be centered on new view",
"qualType" : "ax::NodeEditor::CanvasSizeMode",
"order" : 2,
"evaluatedValue" : 2
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "SaveReasonFlags",
@@ -82,11 +148,25 @@
"evaluatedValue" : 8
}, {
"@type" : "AstEnumConstantDecl",
"name" : "User",
"name" : "AddNode",
"qualType" : "ax::NodeEditor::SaveReasonFlags",
"order" : 5,
"value" : "0x00000010",
"evaluatedValue" : 16
}, {
"@type" : "AstEnumConstantDecl",
"name" : "RemoveNode",
"qualType" : "ax::NodeEditor::SaveReasonFlags",
"order" : 6,
"value" : "0x00000020",
"evaluatedValue" : 32
}, {
"@type" : "AstEnumConstantDecl",
"name" : "User",
"qualType" : "ax::NodeEditor::SaveReasonFlags",
"order" : 7,
"value" : "0x00000040",
"evaluatedValue" : 64
} ]
}, {
"@type" : "AstRecordDecl",
@@ -131,6 +211,16 @@
"name" : "UserPointer",
"qualType" : "void *",
"desugaredQualType" : "void *"
}, {
"@type" : "AstFieldDecl",
"name" : "CustomZoomLevels",
"qualType" : "int",
"desugaredQualType" : "int"
}, {
"@type" : "AstFieldDecl",
"name" : "CanvasSizeMode",
"qualType" : "CanvasSizeModeAlias",
"desugaredQualType" : "ax::NodeEditor::CanvasSizeMode"
}, {
"@type" : "AstFieldDecl",
"name" : "DragButtonIndex",
@@ -151,47 +241,16 @@
"name" : "ContextMenuButtonIndex",
"qualType" : "int",
"desugaredQualType" : "int"
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "PinKind",
"decls" : [ {
"@type" : "AstFullComment",
"decls" : [ {
"@type" : "AstParagraphComment",
"decls" : [ {
"@type" : "AstTextComment",
"text" : "------------------------------------------------------------------------------"
} ]
} ]
}, {
"@type" : "AstEnumConstantDecl",
"name" : "Input",
"qualType" : "ax::NodeEditor::PinKind",
"order" : 0,
"evaluatedValue" : 0
"@type" : "AstFieldDecl",
"name" : "EnableSmoothZoom",
"qualType" : "bool",
"desugaredQualType" : "bool"
}, {
"@type" : "AstEnumConstantDecl",
"name" : "Output",
"qualType" : "ax::NodeEditor::PinKind",
"order" : 1,
"evaluatedValue" : 1
} ]
}, {
"@type" : "AstEnumDecl",
"name" : "FlowDirection",
"decls" : [ {
"@type" : "AstEnumConstantDecl",
"name" : "Forward",
"qualType" : "ax::NodeEditor::FlowDirection",
"order" : 0,
"evaluatedValue" : 0
}, {
"@type" : "AstEnumConstantDecl",
"name" : "Backward",
"qualType" : "ax::NodeEditor::FlowDirection",
"order" : 1,
"evaluatedValue" : 1
"@type" : "AstFieldDecl",
"name" : "SmoothZoomPower",
"qualType" : "float",
"desugaredQualType" : "float"
} ]
}, {
"@type" : "AstEnumDecl",
@@ -267,58 +326,64 @@
"evaluatedValue" : 9
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_LinkSelRect",
"name" : "StyleColor_HighlightLinkBorder",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 10,
"evaluatedValue" : 10
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_LinkSelRectBorder",
"name" : "StyleColor_LinkSelRect",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 11,
"evaluatedValue" : 11
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_PinRect",
"name" : "StyleColor_LinkSelRectBorder",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 12,
"evaluatedValue" : 12
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_PinRectBorder",
"name" : "StyleColor_PinRect",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 13,
"evaluatedValue" : 13
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_Flow",
"name" : "StyleColor_PinRectBorder",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 14,
"evaluatedValue" : 14
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_FlowMarker",
"name" : "StyleColor_Flow",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 15,
"evaluatedValue" : 15
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_GroupBg",
"name" : "StyleColor_FlowMarker",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 16,
"evaluatedValue" : 16
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_GroupBorder",
"name" : "StyleColor_GroupBg",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 17,
"evaluatedValue" : 17
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_Count",
"name" : "StyleColor_GroupBorder",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 18,
"evaluatedValue" : 18
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleColor_Count",
"qualType" : "ax::NodeEditor::StyleColor",
"order" : 19,
"evaluatedValue" : 19
} ]
}, {
"@type" : "AstEnumDecl",
@@ -463,10 +528,34 @@
"evaluatedValue" : 22
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleVar_Count",
"name" : "StyleVar_HighlightConnectedLinks",
"qualType" : "ax::NodeEditor::StyleVar",
"order" : 23,
"evaluatedValue" : 23
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleVar_SnapLinkToPinDir",
"qualType" : "ax::NodeEditor::StyleVar",
"order" : 24,
"evaluatedValue" : 24
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleVar_HoveredNodeBorderOffset",
"qualType" : "ax::NodeEditor::StyleVar",
"order" : 25,
"evaluatedValue" : 25
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleVar_SelectedNodeBorderOffset",
"qualType" : "ax::NodeEditor::StyleVar",
"order" : 26,
"evaluatedValue" : 26
}, {
"@type" : "AstEnumConstantDecl",
"name" : "StyleVar_Count",
"qualType" : "ax::NodeEditor::StyleVar",
"order" : 27,
"evaluatedValue" : 27
} ]
}, {
"@type" : "AstRecordDecl",
@@ -491,11 +580,21 @@
"name" : "HoveredNodeBorderWidth",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "HoverNodeBorderOffset",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "SelectedNodeBorderWidth",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "SelectedNodeBorderOffset",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "PinRounding",
@@ -586,11 +685,21 @@
"name" : "GroupBorderWidth",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "HighlightConnectedLinks",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "SnapLinkToPinDir",
"qualType" : "float",
"desugaredQualType" : "float"
}, {
"@type" : "AstFieldDecl",
"name" : "Colors",
"qualType" : "int[18]",
"desugaredQualType" : "int[18]"
"qualType" : "int[19]",
"desugaredQualType" : "int[19]"
} ]
}, {
"@type" : "AstRecordDecl",
@@ -649,6 +758,17 @@
"qualType" : "EditorContext *",
"desugaredQualType" : "EditorContext *"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "GetConfig",
"resultType" : "const Config &",
"decls" : [ {
"@type" : "AstParmVarDecl",
"name" : "ctx",
"qualType" : "EditorContext *",
"desugaredQualType" : "EditorContext *",
"defaultValue" : "nullptr"
} ]
}, {
"@type" : "AstFunctionDecl",
"name" : "GetStyle",
@@ -1612,6 +1732,14 @@
"@type" : "AstFunctionDecl",
"name" : "IsBackgroundDoubleClicked",
"resultType" : "bool"
}, {
"@type" : "AstFunctionDecl",
"name" : "GetBackgroundClickButtonIndex",
"resultType" : "int"
}, {
"@type" : "AstFunctionDecl",
"name" : "GetBackgroundDoubleClickButtonIndex",
"resultType" : "int"
}, {
"@type" : "AstFunctionDecl",
"name" : "GetLinkPins",
File diff suppressed because it is too large. Load diff
@@ -1,3 +1,4 @@
/*
import imgui.ImGui;
import imgui.extension.texteditor.TextEditor;
import imgui.extension.texteditor.TextEditorCoordinates;
@@ -136,3 +137,4 @@ public class ExampleImGuiColorTextEdit {
}
}
}
*/
@@ -1,3 +1,4 @@
/*
import imgui.extension.imguifiledialog.ImGuiFileDialog;
import imgui.extension.imguifiledialog.callback.ImGuiFileDialogPaneFun;
import imgui.extension.imguifiledialog.flag.ImGuiFileDialogFlags;
@@ -71,3 +72,4 @@ public class ExampleImGuiFileDialog {
ImGui.end();
}
}
*/
@@ -73,8 +73,8 @@ public class ExampleImGuiNodeEditor {
source.outputNodeId = target.nodeId;
}
}
NodeEditor.endCreate();
}
NodeEditor.endCreate();
int uniqueLinkId = 1;
for (Graph.GraphNode node : graph.nodes.values()) {
+10 -10
View File
@@ -9,8 +9,8 @@ public class Extra {
private static final ImBoolean SHOW_DRAG_N_DROP_WINDOW = new ImBoolean(false);
private static final ImBoolean SHOW_IMPLOT_DEMO_WINDOW = new ImBoolean(false);
private static final ImBoolean SHOW_IMGUIZMO_DEMO = new ImBoolean(false);
private static final ImBoolean SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW = new ImBoolean(false);
private static final ImBoolean SHOW_IMGUI_FILE_DIALOG_WINDOW = new ImBoolean(false);
// private static final ImBoolean SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW = new ImBoolean(false);
// private static final ImBoolean SHOW_IMGUI_FILE_DIALOG_WINDOW = new ImBoolean(false);
private static final ImBoolean SHOW_IMGUI_MEMORY_EDITOR_WINDOW = new ImBoolean(false);
private static final ImBoolean SHOW_IMGUI_CANVAS_EDITOR_WINDOW = new ImBoolean(false);
private static final ImBoolean SHOW_IMGUI_INPUT_CALLBACK_WINDOW = new ImBoolean(false);
@@ -26,8 +26,8 @@ public class Extra {
ImGui.checkbox("Show Drag'N'Drop Demo Window", SHOW_DRAG_N_DROP_WINDOW);
ImGui.checkbox("Show ImPlot Demo Window", SHOW_IMPLOT_DEMO_WINDOW);
ImGui.checkbox("Show ImGuizmo Demo Window", SHOW_IMGUIZMO_DEMO);
ImGui.checkbox("Show ImGuiColorTextEdit Demo Window", SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW);
ImGui.checkbox("Show ImGuiFileDialog Demo Window", SHOW_IMGUI_FILE_DIALOG_WINDOW);
// ImGui.checkbox("Show ImGuiColorTextEdit Demo Window", SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW);
// ImGui.checkbox("Show ImGuiFileDialog Demo Window", SHOW_IMGUI_FILE_DIALOG_WINDOW);
ImGui.checkbox("Show ImGui MemoryEditor Demo Window", SHOW_IMGUI_MEMORY_EDITOR_WINDOW);
ImGui.checkbox("Show ImGui Canvas Demo Window", SHOW_IMGUI_CANVAS_EDITOR_WINDOW);
ImGui.checkbox("Show Imgui InputText Callback Window", SHOW_IMGUI_INPUT_CALLBACK_WINDOW);
@@ -57,13 +57,13 @@ public class Extra {
ExampleImPlot.show(SHOW_IMPLOT_DEMO_WINDOW);
}
if (SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW.get()) {
ExampleImGuiColorTextEdit.show(SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW);
}
// if (SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW.get()) {
// ExampleImGuiColorTextEdit.show(SHOW_IMGUI_COLOR_TEXT_EDIT_WINDOW);
// }
if (SHOW_IMGUI_FILE_DIALOG_WINDOW.get()) {
ExampleImGuiFileDialog.show(SHOW_IMGUI_FILE_DIALOG_WINDOW);
}
// if (SHOW_IMGUI_FILE_DIALOG_WINDOW.get()) {
// ExampleImGuiFileDialog.show(SHOW_IMGUI_FILE_DIALOG_WINDOW);
// }
if (SHOW_IMGUI_MEMORY_EDITOR_WINDOW.get()) {
ExampleImGuiMemoryEditor.show(SHOW_IMGUI_MEMORY_EDITOR_WINDOW);
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Font Awesome icons codepoints, can be used to render icons with imgui in any place where text can be rendered.
*
* To preview and search for icons use: https://fontawesome.com/icons?d=gallery&p=2&m=free
* To preview and search for icons use: {@code https://fontawesome.com/icons?d=gallery&p=2&m=free}
*/
@SuppressWarnings("unused")
public class FontAwesomeIcons {
@@ -331,6 +331,25 @@ public final class ImDrawData extends ImGuiStruct {
// Functions
public void clear() {
nClear();
}
private native void nClear(); /*
THIS->Clear();
*/
/**
* Helper to add an external draw list into an existing ImDrawData.
*/
public void addDrawList(final ImDrawList drawList) {
nAddDrawList(drawList.ptr);
}
private native void nAddDrawList(long drawList); /*
THIS->AddDrawList(reinterpret_cast<ImDrawList*>(drawList));
*/
/**
* Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources.
* Always prefer indexed rendering!
@@ -150,26 +150,52 @@ public final class ImFont extends ImGuiStructDestroyable {
THIS->EllipsisChar = value;
*/
/**
* Character used for ellipsis rendering (if a single '...' character isn't found)
*/
public short getDotChar() {
return nGetDotChar();
public short getEllipsisCharCount() {
return nGetEllipsisCharCount();
}
/**
* Character used for ellipsis rendering (if a single '...' character isn't found)
*/
public void setDotChar(final short value) {
nSetDotChar(value);
public void setEllipsisCharCount(final short value) {
nSetEllipsisCharCount(value);
}
private native short nGetDotChar(); /*
return THIS->DotChar;
private native short nGetEllipsisCharCount(); /*
return THIS->EllipsisCharCount;
*/
private native void nSetDotChar(short value); /*
THIS->DotChar = value;
private native void nSetEllipsisCharCount(short value); /*
THIS->EllipsisCharCount = value;
*/
public float getEllipsisWidth() {
return nGetEllipsisWidth();
}
public void setEllipsisWidth(final float value) {
nSetEllipsisWidth(value);
}
private native float nGetEllipsisWidth(); /*
return THIS->EllipsisWidth;
*/
private native void nSetEllipsisWidth(float value); /*
THIS->EllipsisWidth = value;
*/
public float getEllipsisCharStep() {
return nGetEllipsisCharStep();
}
public void setEllipsisCharStep(final float value) {
nSetEllipsisCharStep(value);
}
private native float nGetEllipsisCharStep(); /*
return THIS->EllipsisCharStep;
*/
private native void nSetEllipsisCharStep(float value); /*
THIS->EllipsisCharStep = value;
*/
public boolean getDirtyLookupTables() {
@@ -609,6 +609,13 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
RETURN_GLYPH_2_SHORT(THIS->GetGlyphRangesDefault());
*/
/**
* Default + Greek and Coptic
*/
public native short[] getGlyphRangesGreek(); /*
RETURN_GLYPH_2_SHORT(THIS->GetGlyphRangesGreek());
*/
/**
* Default + Korean characters
*/
+334 -310
View File
@@ -463,7 +463,7 @@ public class ImGui {
*/
/**
* Add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).
* Add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls).
*/
public static void showUserGuide() {
nShowUserGuide();
@@ -906,7 +906,8 @@ public class ImGui {
*/
/**
* Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
* Get current window position in screen space (note: it is unlikely you need to use this.
* Consider using current layout pos instead, GetScreenCursorPos())
*/
public static ImVec2 getWindowPos() {
final ImVec2 dst = new ImVec2();
@@ -915,21 +916,24 @@ public class ImGui {
}
/**
* Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
* Get current window position in screen space (note: it is unlikely you need to use this.
* Consider using current layout pos instead, GetScreenCursorPos())
*/
public static float getWindowPosX() {
return nGetWindowPosX();
}
/**
* Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
* Get current window position in screen space (note: it is unlikely you need to use this.
* Consider using current layout pos instead, GetScreenCursorPos())
*/
public static float getWindowPosY() {
return nGetWindowPosY();
}
/**
* Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
* Get current window position in screen space (note: it is unlikely you need to use this.
* Consider using current layout pos instead, GetScreenCursorPos())
*/
public static void getWindowPos(final ImVec2 dst) {
nGetWindowPos(dst);
@@ -948,7 +952,7 @@ public class ImGui {
*/
/**
* Get current window size
* Get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
*/
public static ImVec2 getWindowSize() {
final ImVec2 dst = new ImVec2();
@@ -957,21 +961,21 @@ public class ImGui {
}
/**
* Get current window size
* Get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
*/
public static float getWindowSizeX() {
return nGetWindowSizeX();
}
/**
* Get current window size
* Get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
*/
public static float getWindowSizeY() {
return nGetWindowSizeY();
}
/**
* Get current window size
* Get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
*/
public static void getWindowSize(final ImVec2 dst) {
nGetWindowSize(dst);
@@ -1214,6 +1218,25 @@ public class ImGui {
ImGui::SetNextWindowFocus();
*/
/**
* Set next window scrolling value (use {@code < 0.0f} to not affect a given axis).
*/
public static void setNextWindowScroll(final ImVec2 scroll) {
nSetNextWindowScroll(scroll.x, scroll.y);
}
/**
* Set next window scrolling value (use {@code < 0.0f} to not affect a given axis).
*/
public static void setNextWindowScroll(final float scrollX, final float scrollY) {
nSetNextWindowScroll(scrollX, scrollY);
}
private static native void nSetNextWindowScroll(float scrollX, float scrollY); /*MANUAL
ImVec2 scroll = ImVec2(scrollX, scrollY);
ImGui::SetNextWindowScroll(scroll);
*/
/**
* Set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg.
* You may also use ImGuiWindowFlags_NoBackground.
@@ -1620,7 +1643,7 @@ public class ImGui {
*/
/**
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
*/
public static ImVec2 getWindowContentRegionMax() {
final ImVec2 dst = new ImVec2();
@@ -1629,21 +1652,21 @@ public class ImGui {
}
/**
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
*/
public static float getWindowContentRegionMaxX() {
return nGetWindowContentRegionMaxX();
}
/**
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
*/
public static float getWindowContentRegionMaxY() {
return nGetWindowContentRegionMaxY();
}
/**
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
*/
public static void getWindowContentRegionMax(final ImVec2 dst) {
nGetWindowContentRegionMax(dst);
@@ -1662,6 +1685,8 @@ public class ImGui {
*/
// Windows Scrolling
// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/**
* Get scrolling amount [0 .. GetScrollMaxX()]
@@ -1939,22 +1964,22 @@ public class ImGui {
*/
/**
* Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
* Tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
*/
public static void pushAllowKeyboardFocus(final boolean allowKeyboardFocus) {
nPushAllowKeyboardFocus(allowKeyboardFocus);
public static void pushTabStop(final boolean tabStop) {
nPushTabStop(tabStop);
}
private static native void nPushAllowKeyboardFocus(boolean allowKeyboardFocus); /*
ImGui::PushAllowKeyboardFocus(allowKeyboardFocus);
private static native void nPushTabStop(boolean tabStop); /*
ImGui::PushTabStop(tabStop);
*/
public static void popAllowKeyboardFocus() {
nPopAllowKeyboardFocus();
public static void popTabStop() {
nPopTabStop();
}
private static native void nPopAllowKeyboardFocus(); /*
ImGui::PopAllowKeyboardFocus();
private static native void nPopTabStop(); /*
ImGui::PopTabStop();
*/
/**
@@ -2055,6 +2080,7 @@ public class ImGui {
*/
// Style read access
// - Use the ShowStyleEditor() function to interactively see/edit the colors.
private static final ImFont _GETFONT_1 = new ImFont(0);
@@ -2299,7 +2325,7 @@ public class ImGui {
*/
/**
* Undo a SameLine() or force a new line when in an horizontal-layout context.
* Undo a SameLine() or force a new line when in a horizontal-layout context.
*/
public static void newLine() {
nNewLine();
@@ -2660,12 +2686,16 @@ public class ImGui {
*/
// ID stack/scopes
// - Read the FAQ for more details about how ID are handled in dear imgui. If you are creating widgets in a loop you most
// likely want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// - The resulting ID are hashes of the entire stack.
// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
// - Those questions are answered and impacted by understanding of the ID stack system:
// - "Q: Why is my widget not reacting when I click on it?"
// - "Q: How can I have widgets with an empty label?"
// - "Q: How can I have multiple widgets with the same label?"
// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed and used as an ID,
// whereas "strId" denote a string that is only used as an ID and not normally displayed.
// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/**
* Push string into the ID stack (will hash string).
@@ -2907,6 +2937,19 @@ public class ImGui {
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
*/
/**
* Currently: formatted text with an horizontal line
*/
public static void separatorText(final String label) {
nSeparatorText(label);
}
private static native void nSeparatorText(String label); /*MANUAL
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
ImGui::SeparatorText(label);
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
*/
// Widgets: Main
// - Most widgets return true when the value has been changed or when pressed/selected
// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
@@ -3019,237 +3062,6 @@ public class ImGui {
return _result;
*/
public static void image(final long userTextureId, final ImVec2 size) {
nImage(userTextureId, size.x, size.y);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY) {
nImage(userTextureId, sizeX, sizeY);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 tintCol) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, tintCol.x, tintCol.y, tintCol.z, tintCol.w);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, tintColX, tintColY, tintColZ, tintColW);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 tintCol, final ImVec4 borderCol) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, tintCol.x, tintCol.y, tintCol.z, tintCol.w, borderCol.x, borderCol.y, borderCol.z, borderCol.w);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float tintColX, final float tintColY, final float tintColZ, final float tintColW, final float borderColX, final float borderColY, final float borderColZ, final float borderColW) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, tintColX, tintColY, tintColZ, tintColW, borderColX, borderColY, borderColZ, borderColW);
}
private static native void nImage(long userTextureId, float sizeX, float sizeY); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, tintCol);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float tintColX, float tintColY, float tintColZ, float tintColW, float borderColX, float borderColY, float borderColZ, float borderColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
ImVec4 borderCol = ImVec4(borderColX, borderColY, borderColZ, borderColW);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, tintCol, borderCol);
*/
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final ImVec2 size) {
return nImageButton(userTextureId, size.x, size.y);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final float sizeX, final float sizeY) {
return nImageButton(userTextureId, sizeX, sizeY);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final ImVec2 size, final ImVec2 uv0) {
return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y) {
return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1) {
return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y) {
return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding) {
return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding) {
return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding, final ImVec4 bgCol) {
return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding, bgCol.x, bgCol.y, bgCol.z, bgCol.w);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding, final float bgColX, final float bgColY, final float bgColZ, final float bgColW) {
return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding, bgColX, bgColY, bgColZ, bgColW);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding, final ImVec4 bgCol, final ImVec4 tintCol) {
return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) {
return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 bgCol, final ImVec4 tintCol) {
return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w);
}
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
public static boolean imageButton(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) {
return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW);
}
private static native boolean nImageButton(long userTextureId, float sizeX, float sizeY); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
auto _result = ImGui::ImageButton((ImTextureID)(uintptr_t)userTextureId, size);
return _result;
*/
private static native boolean nImageButton(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
auto _result = ImGui::ImageButton((ImTextureID)(uintptr_t)userTextureId, size, uv0);
return _result;
*/
private static native boolean nImageButton(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
auto _result = ImGui::ImageButton((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1);
return _result;
*/
private static native boolean nImageButton(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
auto _result = ImGui::ImageButton((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, framePadding);
return _result;
*/
private static native boolean nImageButton(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding, float bgColX, float bgColY, float bgColZ, float bgColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW);
auto _result = ImGui::ImageButton((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, framePadding, bgCol);
return _result;
*/
private static native boolean nImageButton(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
auto _result = ImGui::ImageButton((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, framePadding, bgCol, tintCol);
return _result;
*/
private static native boolean nImageButton(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
auto _result = ImGui::ImageButton((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, -1, bgCol, tintCol);
return _result;
*/
public static boolean checkbox(String label, boolean active) {
return nCheckbox(label, active);
}
@@ -3372,7 +3184,176 @@ public class ImGui {
ImGui::Bullet();
*/
// Widgets: Combo Box
// Widgets: Images
// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
public static void image(final long userTextureId, final ImVec2 size) {
nImage(userTextureId, size.x, size.y);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY) {
nImage(userTextureId, sizeX, sizeY);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 tintCol) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, tintCol.x, tintCol.y, tintCol.z, tintCol.w);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, tintColX, tintColY, tintColZ, tintColW);
}
public static void image(final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 tintCol, final ImVec4 borderCol) {
nImage(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, tintCol.x, tintCol.y, tintCol.z, tintCol.w, borderCol.x, borderCol.y, borderCol.z, borderCol.w);
}
public static void image(final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float tintColX, final float tintColY, final float tintColZ, final float tintColW, final float borderColX, final float borderColY, final float borderColZ, final float borderColW) {
nImage(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, tintColX, tintColY, tintColZ, tintColW, borderColX, borderColY, borderColZ, borderColW);
}
private static native void nImage(long userTextureId, float sizeX, float sizeY); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, tintCol);
*/
private static native void nImage(long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float tintColX, float tintColY, float tintColZ, float tintColW, float borderColX, float borderColY, float borderColZ, float borderColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
ImVec4 borderCol = ImVec4(borderColX, borderColY, borderColZ, borderColW);
ImGui::Image((ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, tintCol, borderCol);
*/
public static boolean imageButton(final String strId, final long userTextureId, final ImVec2 size) {
return nImageButton(strId, userTextureId, size.x, size.y);
}
public static boolean imageButton(final String strId, final long userTextureId, final float sizeX, final float sizeY) {
return nImageButton(strId, userTextureId, sizeX, sizeY);
}
public static boolean imageButton(final String strId, final long userTextureId, final ImVec2 size, final ImVec2 uv0) {
return nImageButton(strId, userTextureId, size.x, size.y, uv0.x, uv0.y);
}
public static boolean imageButton(final String strId, final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y) {
return nImageButton(strId, userTextureId, sizeX, sizeY, uv0X, uv0Y);
}
public static boolean imageButton(final String strId, final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1) {
return nImageButton(strId, userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y);
}
public static boolean imageButton(final String strId, final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y) {
return nImageButton(strId, userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y);
}
public static boolean imageButton(final String strId, final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 bgCol) {
return nImageButton(strId, userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w);
}
public static boolean imageButton(final String strId, final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float bgColX, final float bgColY, final float bgColZ, final float bgColW) {
return nImageButton(strId, userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, bgColX, bgColY, bgColZ, bgColW);
}
public static boolean imageButton(final String strId, final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 bgCol, final ImVec4 tintCol) {
return nImageButton(strId, userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w);
}
public static boolean imageButton(final String strId, final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) {
return nImageButton(strId, userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW);
}
private static native boolean nImageButton(String obj_strId, long userTextureId, float sizeX, float sizeY); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
auto _result = ImGui::ImageButton(strId, (ImTextureID)(uintptr_t)userTextureId, size);
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
private static native boolean nImageButton(String obj_strId, long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
auto _result = ImGui::ImageButton(strId, (ImTextureID)(uintptr_t)userTextureId, size, uv0);
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
private static native boolean nImageButton(String obj_strId, long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
auto _result = ImGui::ImageButton(strId, (ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1);
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
private static native boolean nImageButton(String obj_strId, long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float bgColX, float bgColY, float bgColZ, float bgColW); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW);
auto _result = ImGui::ImageButton(strId, (ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, bgCol);
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
private static native boolean nImageButton(String obj_strId, long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
auto _result = ImGui::ImageButton(strId, (ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, bgCol, tintCol);
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
// Widgets: Combo Box (Dropdown)
// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose.
@@ -3497,7 +3478,7 @@ public class ImGui {
// Widgets: Drag Sliders
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
// - Speed are per-pixel of mouse movement (vSpeed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(vSpeed, minimum_step_at_given_precision).
@@ -3505,7 +3486,7 @@ public class ImGui {
// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
// - Use vMin > vMax to lock edits.
// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/**
@@ -5349,7 +5330,7 @@ public class ImGui {
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/**
@@ -9269,13 +9250,6 @@ public class ImGui {
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
*/
/**
* ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
*/
public static void treePush() {
nTreePush();
}
/**
* ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
*/
@@ -9283,10 +9257,6 @@ public class ImGui {
nTreePush(ptrId);
}
private static native void nTreePush(); /*
ImGui::TreePush();
*/
private static native void nTreePush(long ptrId); /*
ImGui::TreePush((void*)ptrId);
*/
@@ -9564,8 +9534,8 @@ public class ImGui {
// - 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.
// - 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.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
// - 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
/**
* Open a framed scrolling region.
@@ -10233,10 +10203,11 @@ public class ImGui {
*/
// Tooltips
// - Tooltip are windows following the mouse. They do not take focus away.
// - 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.
/**
* Begin/append a tooltip window. to create full-featured tooltip (with any kind of items).
* Begin/append a tooltip window.
*/
public static void beginTooltip() {
nBeginTooltip();
@@ -10246,6 +10217,9 @@ public class ImGui {
ImGui::BeginTooltip();
*/
/**
* Only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!
*/
public static void endTooltip() {
nEndTooltip();
}
@@ -10255,7 +10229,7 @@ public class ImGui {
*/
/**
* Set a text-only tooltip, typically use with ImGui::IsItemHovered(). override any previous call to SetTooltip().
* Set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to SetTooltip().
*/
public static void setTooltip(final String text) {
nSetTooltip(text);
@@ -10267,6 +10241,35 @@ public class ImGui {
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
*/
// Tooltips: helpers for showing a tooltip when hovering an item
// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip) && BeginTooltip())' idiom.
// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip)) { SetTooltip(...); }' idiom.
// - Where 'ImGuiHoveredFlags_Tooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
/**
* Begin/append a tooltip window if preceding item was hovered.
*/
public static boolean beginItemTooltip() {
return nBeginItemTooltip();
}
private static native boolean nBeginItemTooltip(); /*
return ImGui::BeginItemTooltip();
*/
/**
* Set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
*/
public static void setItemTooltip(final String text) {
nSetItemTooltip(text);
}
private static native void nSetItemTooltip(String text); /*MANUAL
auto text = obj_text == NULL ? NULL : (char*)env->GetStringUTFChars(obj_text, JNI_FALSE);
ImGui::SetItemTooltip(text, NULL);
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
*/
// Popups, Modals
// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
@@ -10277,7 +10280,7 @@ public class ImGui {
// 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.
// - BeginPopupModal(): block every interactions behind the window, cannot be closed by user, add a dimming background, has a title bar.
// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/**
* Return true if the popup is open, and you can start outputting to it.
@@ -10696,7 +10699,7 @@ public class ImGui {
// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
// - 5. Populate contents:
// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
// - If you are using tables as a sort of grid, where every columns is holding the same type of contents,
// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
// TableNextColumn() will automatically wrap-around into the next row if needed.
// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
@@ -11278,7 +11281,7 @@ public class ImGui {
*/
// Tab Bars, Tabs
// Note: Tabs are automatically created by the docking system. Use this to create tab bars/tabs yourself without docking being involved.
// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/**
* Create and append into a TabBar
@@ -11435,11 +11438,16 @@ 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!
// - To dock windows: if io.ConfigDockingWithShift == false (default) drag window from their title bar.
// - To dock windows: if io.ConfigDockingWithShift == true: hold SHIFT anywhere while moving windows.
// About DockSpace:
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking/undocking.
// - 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.
// About dockspaces:
// - Use DockSpaceOverViewport() to create an explicit dock node covering the screen or a specific viewport.
// 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.
// - DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app.
// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
public static int dockSpace(final int imGuiID) {
return nDockSpace(imGuiID);
@@ -12042,6 +12050,21 @@ public class ImGui {
ImGui::SetKeyboardFocusHere(offset);
*/
// Overlapping mode
/**
* Allow next item to be overlapped by a subsequent item.
* Useful with invisible buttons, selectable, treenode covering an area where subsequent items may need to be added.
* Note that both Selectable() and TreeNode() have dedicated flags doing this.
*/
public static void setNextItemAllowOverlap() {
nSetNextItemAllowOverlap();
}
private static native void nSetNextItemAllowOverlap(); /*
ImGui::SetNextItemAllowOverlap();
*/
// Item/Widgets Utilities
// - Most of the functions are referring to the last/previous item we submitted.
// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions.
@@ -12093,14 +12116,16 @@ public class ImGui {
*/
/**
* Is the last item clicked? (e.g. button/node just clicked on) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Is the last item hovered and mouse clicked on? (**) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in function definition.
*/
public static boolean isItemClicked() {
return nIsItemClicked();
}
/**
* Is the last item clicked? (e.g. button/node just clicked on) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Is the last item hovered and mouse clicked on? (**) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in function definition.
*/
public static boolean isItemClicked(final int mouseButton) {
return nIsItemClicked(mouseButton);
@@ -12148,7 +12173,7 @@ public class ImGui {
*/
/**
* Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that requires continuous editing.
* Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that require continuous editing.
*/
public static boolean isItemDeactivated() {
return nIsItemDeactivated();
@@ -12160,7 +12185,7 @@ public class ImGui {
/**
* Was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved).
* Useful for Undo/Redo patterns with widgets that requires continuous editing.
* Useful for Undo/Redo patterns with widgets that require continuous editing.
* Note that you may get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even when clicking an already selected item).
*/
public static boolean isItemDeactivatedAfterEdit() {
@@ -12214,6 +12239,17 @@ public class ImGui {
return ImGui::IsAnyItemFocused();
*/
/**
* Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
*/
public static int getItemID() {
return nGetItemID();
}
private static native int nGetItemID(); /*
return ImGui::GetItemID();
*/
/**
* Get upper-left bounding rectangle of the last item (screen space)
*/
@@ -12340,17 +12376,6 @@ public class ImGui {
return ImGui::GetItemRectSize().y;
*/
/**
* Allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
*/
public static void setItemAllowOverlap() {
nSetItemAllowOverlap();
}
private static native void nSetItemAllowOverlap(); /*
ImGui::SetItemAllowOverlap();
*/
// Viewports
// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
// - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
@@ -12802,12 +12827,11 @@ public class ImGui {
ImGui::ColorConvertHSVtoRGB(hsv[0], hsv[1], hsv[2], rgb[0], rgb[1], rgb[2]);
*/
// Inputs Utilities: Keyboard
// Without IMGUI_DISABLE_OBSOLETE_KEYIO: (legacy support)
// - For 'ImGuiKey key' you can still use your legacy native/user indices according to how your backend/engine stored them in io.KeysDown[].
// With IMGUI_DISABLE_OBSOLETE_KEYIO: (this is the way forward)
// - Any use of 'ImGuiKey' will assert when key < 512 will be passed, previously reserved as native/user keys indices
// - GetKeyIndex() is pass-through and therefore deprecated (gone if IMGUI_DISABLE_OBSOLETE_KEYIO is defined)
// Inputs Utilities: Keyboard/Mouse/Gamepad
// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
// - before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. About use of those legacy ImGuiKey values:
// - 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]
@@ -12901,7 +12925,7 @@ public class ImGui {
ImGui::SetNextFrameWantCaptureKeyboard(wantCaptureKeyboard);
*/
// Inputs Utilities: Mouse
// 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.
// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
@@ -13317,7 +13341,7 @@ public class ImGui {
*/
/**
* get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render().
* Get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render().
* If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
*/
public static int getMouseCursor() {
@@ -13329,7 +13353,7 @@ public class ImGui {
*/
/**
* Set desired cursor type
* Set desired mouse cursor shape
*/
public static void setMouseCursor(final int type) {
nSetMouseCursor(type);
@@ -3,6 +3,7 @@ package imgui;
import imgui.binding.ImGuiStruct;
import imgui.callback.ImStrConsumer;
import imgui.callback.ImStrSupplier;
import imgui.internal.ImGuiContext;
/**
* Communicate most settings and inputs/outputs to Dear ImGui using this structure.
@@ -261,116 +262,6 @@ public final class ImGuiIO extends ImGuiStruct {
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
*/
/**
* Time for a double-click, in seconds.
*/
public float getMouseDoubleClickTime() {
return nGetMouseDoubleClickTime();
}
/**
* Time for a double-click, in seconds.
*/
public void setMouseDoubleClickTime(final float value) {
nSetMouseDoubleClickTime(value);
}
private native float nGetMouseDoubleClickTime(); /*
return THIS->MouseDoubleClickTime;
*/
private native void nSetMouseDoubleClickTime(float value); /*
THIS->MouseDoubleClickTime = value;
*/
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
public float getMouseDoubleClickMaxDist() {
return nGetMouseDoubleClickMaxDist();
}
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
public void setMouseDoubleClickMaxDist(final float value) {
nSetMouseDoubleClickMaxDist(value);
}
private native float nGetMouseDoubleClickMaxDist(); /*
return THIS->MouseDoubleClickMaxDist;
*/
private native void nSetMouseDoubleClickMaxDist(float value); /*
THIS->MouseDoubleClickMaxDist = value;
*/
/**
* Distance threshold before considering we are dragging.
*/
public float getMouseDragThreshold() {
return nGetMouseDragThreshold();
}
/**
* Distance threshold before considering we are dragging.
*/
public void setMouseDragThreshold(final float value) {
nSetMouseDragThreshold(value);
}
private native float nGetMouseDragThreshold(); /*
return THIS->MouseDragThreshold;
*/
private native void nSetMouseDragThreshold(float value); /*
THIS->MouseDragThreshold = value;
*/
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
public float getKeyRepeatDelay() {
return nGetKeyRepeatDelay();
}
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
public void setKeyRepeatDelay(final float value) {
nSetKeyRepeatDelay(value);
}
private native float nGetKeyRepeatDelay(); /*
return THIS->KeyRepeatDelay;
*/
private native void nSetKeyRepeatDelay(float value); /*
THIS->KeyRepeatDelay = value;
*/
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
public float getKeyRepeatRate() {
return nGetKeyRepeatRate();
}
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
public void setKeyRepeatRate(final float value) {
nSetKeyRepeatRate(value);
}
private native float nGetKeyRepeatRate(); /*
return THIS->KeyRepeatRate;
*/
private native void nSetKeyRepeatRate(float value); /*
THIS->KeyRepeatRate = value;
*/
private static final ImFontAtlas _GETFONTS_1 = new ImFontAtlas(0);
/**
@@ -793,6 +684,28 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->ConfigInputTextCursorBlink = value;
*/
/**
* [BETA] Pressing Enter will keep item active and select contents (single-line only).
*/
public boolean getConfigInputTextEnterKeepActive() {
return nGetConfigInputTextEnterKeepActive();
}
/**
* [BETA] Pressing Enter will keep item active and select contents (single-line only).
*/
public void setConfigInputTextEnterKeepActive(final boolean value) {
nSetConfigInputTextEnterKeepActive(value);
}
private native boolean nGetConfigInputTextEnterKeepActive(); /*
return THIS->ConfigInputTextEnterKeepActive;
*/
private native void nSetConfigInputTextEnterKeepActive(boolean value); /*
THIS->ConfigInputTextEnterKeepActive = value;
*/
/**
* [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.
*/
@@ -885,6 +798,232 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->ConfigMemoryCompactTimer = value;
*/
// Inputs Behaviors
// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle)
/**
* Time for a double-click, in seconds.
*/
public float getMouseDoubleClickTime() {
return nGetMouseDoubleClickTime();
}
/**
* Time for a double-click, in seconds.
*/
public void setMouseDoubleClickTime(final float value) {
nSetMouseDoubleClickTime(value);
}
private native float nGetMouseDoubleClickTime(); /*
return THIS->MouseDoubleClickTime;
*/
private native void nSetMouseDoubleClickTime(float value); /*
THIS->MouseDoubleClickTime = value;
*/
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
public float getMouseDoubleClickMaxDist() {
return nGetMouseDoubleClickMaxDist();
}
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
public void setMouseDoubleClickMaxDist(final float value) {
nSetMouseDoubleClickMaxDist(value);
}
private native float nGetMouseDoubleClickMaxDist(); /*
return THIS->MouseDoubleClickMaxDist;
*/
private native void nSetMouseDoubleClickMaxDist(float value); /*
THIS->MouseDoubleClickMaxDist = value;
*/
/**
* Distance threshold before considering we are dragging.
*/
public float getMouseDragThreshold() {
return nGetMouseDragThreshold();
}
/**
* Distance threshold before considering we are dragging.
*/
public void setMouseDragThreshold(final float value) {
nSetMouseDragThreshold(value);
}
private native float nGetMouseDragThreshold(); /*
return THIS->MouseDragThreshold;
*/
private native void nSetMouseDragThreshold(float value); /*
THIS->MouseDragThreshold = value;
*/
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
public float getKeyRepeatDelay() {
return nGetKeyRepeatDelay();
}
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
public void setKeyRepeatDelay(final float value) {
nSetKeyRepeatDelay(value);
}
private native float nGetKeyRepeatDelay(); /*
return THIS->KeyRepeatDelay;
*/
private native void nSetKeyRepeatDelay(float value); /*
THIS->KeyRepeatDelay = value;
*/
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
public float getKeyRepeatRate() {
return nGetKeyRepeatRate();
}
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
public void setKeyRepeatRate(final float value) {
nSetKeyRepeatRate(value);
}
private native float nGetKeyRepeatRate(); /*
return THIS->KeyRepeatRate;
*/
private native void nSetKeyRepeatRate(float value); /*
THIS->KeyRepeatRate = value;
*/
//------------------------------------------------------------------
// Debug options
//------------------------------------------------------------------
/**
* 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()
* This is inconsistent with other BeginXXX functions and create confusion for many users.
* We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.
* First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
*/
public boolean getConfigDebugBeginReturnValueOnce() {
return nGetConfigDebugBeginReturnValueOnce();
}
/**
* 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()
* This is inconsistent with other BeginXXX functions and create confusion for many users.
* We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.
* First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
*/
public void setConfigDebugBeginReturnValueOnce(final boolean value) {
nSetConfigDebugBeginReturnValueOnce(value);
}
private native boolean nGetConfigDebugBeginReturnValueOnce(); /*
return THIS->ConfigDebugBeginReturnValueOnce;
*/
private native void nSetConfigDebugBeginReturnValueOnce(boolean value); /*
THIS->ConfigDebugBeginReturnValueOnce = value;
*/
/**
* Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat.
* Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT.
* Windows should be flickering while running.
*/
public boolean getConfigDebugBeginReturnValueLoop() {
return nGetConfigDebugBeginReturnValueLoop();
}
/**
* Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat.
* Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT.
* Windows should be flickering while running.
*/
public void setConfigDebugBeginReturnValueLoop(final boolean value) {
nSetConfigDebugBeginReturnValueLoop(value);
}
private native boolean nGetConfigDebugBeginReturnValueLoop(); /*
return THIS->ConfigDebugBeginReturnValueLoop;
*/
private native void nSetConfigDebugBeginReturnValueLoop(boolean value); /*
THIS->ConfigDebugBeginReturnValueLoop = value;
*/
/**
* Option to deactivate io.AddFocusEvent(false) handling. May facilitate interactions with a debugger when focus loss leads to clearing inputs data.
* Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.
* Consider using e.g. Win32's IsDebuggerPresent() as an additional filter (or see ImOsIsDebuggerPresent() in imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
* Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing.
*/
public boolean getConfigDebugIgnoreFocusLoss() {
return nGetConfigDebugIgnoreFocusLoss();
}
/**
* Option to deactivate io.AddFocusEvent(false) handling. May facilitate interactions with a debugger when focus loss leads to clearing inputs data.
* Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.
* Consider using e.g. Win32's IsDebuggerPresent() as an additional filter (or see ImOsIsDebuggerPresent() in imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
* Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing.
*/
public void setConfigDebugIgnoreFocusLoss(final boolean value) {
nSetConfigDebugIgnoreFocusLoss(value);
}
private native boolean nGetConfigDebugIgnoreFocusLoss(); /*
return THIS->ConfigDebugIgnoreFocusLoss;
*/
private native void nSetConfigDebugIgnoreFocusLoss(boolean value); /*
THIS->ConfigDebugIgnoreFocusLoss = value;
*/
/**
* Option to audit .ini data
* Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower)
*/
public boolean getConfigDebugIniSettings() {
return nGetConfigDebugIniSettings();
}
/**
* Option to audit .ini data
* Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower)
*/
public void setConfigDebugIniSettings(final boolean value) {
nSetConfigDebugIniSettings(value);
}
private native boolean nGetConfigDebugIniSettings(); /*
return THIS->ConfigDebugIniSettings;
*/
private native void nSetConfigDebugIniSettings(boolean value); /*
THIS->ConfigDebugIniSettings = value;
*/
//------------------------------------------------------------------
// Platform Functions
//------------------------------------------------------------------
@@ -965,6 +1104,30 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->GetClipboardTextFn = getClipboardTextStub;
*/
/**
* Optional: Platform locale
* [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from {@code *localeconv()->decimal_point}
*/
public short getPlatformLocaleDecimalPoint() {
return nGetPlatformLocaleDecimalPoint();
}
/**
* Optional: Platform locale
* [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from {@code *localeconv()->decimal_point}
*/
public void setPlatformLocaleDecimalPoint(final short value) {
nSetPlatformLocaleDecimalPoint(value);
}
private native short nGetPlatformLocaleDecimalPoint(); /*
return THIS->PlatformLocaleDecimalPoint;
*/
private native void nSetPlatformLocaleDecimalPoint(short value); /*
THIS->PlatformLocaleDecimalPoint = value;
*/
//------------------------------------------------------------------
// Input - Call before calling NewFrame()
//------------------------------------------------------------------
@@ -1016,7 +1179,7 @@ public final class ImGuiIO extends ImGuiStruct {
*/
/**
* Queue a mouse wheel update
* Queue a mouse wheel update.
*/
public void addMouseWheelEvent(final float whX, final float whY) {
nAddMouseWheelEvent(whX, whY);
@@ -1026,6 +1189,17 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->AddMouseWheelEvent(whX, whY);
*/
/**
* Queue a mouse source change (Mouse/TouchScreen/Pen)
*/
public void addMouseSourceEvent(final int source) {
nAddMouseSourceEvent(source);
}
private native void nAddMouseSourceEvent(int source); /*
THIS->AddMouseSourceEvent(static_cast<ImGuiMouseSource>(source));
*/
/**
* Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to call this (for multi-viewport support).
*/
@@ -1060,7 +1234,7 @@ public final class ImGuiIO extends ImGuiStruct {
*/
/**
* Queue new character input from an UTF-16 character, it can be a surrogate
* Queue new character input from a UTF-16 character, it can be a surrogate
*/
public void addInputCharacterUTF16(final short c) {
nAddInputCharacterUTF16(c);
@@ -1071,7 +1245,7 @@ public final class ImGuiIO extends ImGuiStruct {
*/
/**
* Queue new characters input from an UTF-8 string.
* Queue new characters input from a UTF-8 string.
*/
public void addInputCharactersUTF8(final String str) {
nAddInputCharactersUTF8(str);
@@ -1117,25 +1291,14 @@ public final class ImGuiIO extends ImGuiStruct {
*/
/**
* [Internal] Clear the text input buffer manually
* Clear all incoming events.
*/
public void clearInputCharacters() {
nClearInputCharacters();
public void clearEventsQueue() {
nClearEventsQueue();
}
private native void nClearInputCharacters(); /*
THIS->ClearInputCharacters();
*/
/**
* [Internal] Release all keys
*/
public void clearInputKeys() {
nClearInputKeys();
}
private native void nClearInputKeys(); /*
THIS->ClearInputKeys();
private native void nClearEventsQueue(); /*
THIS->ClearEventsQueue();
*/
//------------------------------------------------------------------
@@ -1313,16 +1476,18 @@ public final class ImGuiIO extends ImGuiStruct {
*/
/**
* Application framerate estimate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
* Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
* Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second.
* Solely for convenience.
* Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
*/
public float getFramerate() {
return nGetFramerate();
}
/**
* Application framerate estimate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
* Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
* Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second.
* Solely for convenience.
* Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
*/
public void setFramerate(final float value) {
nSetFramerate(value);
@@ -1627,10 +1792,85 @@ public final class ImGuiIO extends ImGuiStruct {
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 float nSetNavInputs(int idx, float value); /*
THIS->NavInputs[idx] = value;
*/
//------------------------------------------------------------------
// [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
//------------------------------------------------------------------
private static final ImGuiContext _GETCTX_1 = new ImGuiContext(0);
/**
* Parent UI context (needs to be set explicitly by parent).
*/
public ImGuiContext getCtx() {
_GETCTX_1.ptr = nGetCtx();
return _GETCTX_1;
}
/**
* Parent UI context (needs to be set explicitly by parent).
*/
public void setCtx(final ImGuiContext value) {
nSetCtx(value.ptr);
}
private native long nGetCtx(); /*
return (uintptr_t)THIS->Ctx;
*/
private native void nSetCtx(long value); /*
THIS->Ctx = reinterpret_cast<ImGuiContext*>(value);
*/
/**
* Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
*/
@@ -1904,56 +2144,6 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->KeySuper = 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 float nSetNavInputs(int idx, float value); /*
THIS->NavInputs[idx] = value;
*/
// Other state maintained from data above + IO function calls
/**
@@ -2505,6 +2695,30 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->MouseDownOwnedUnlessPopupClose[idx] = value;
*/
/**
* On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event.
* On a Mac system this is already enforced by the system.
*/
public boolean getMouseWheelRequestAxisSwap() {
return nGetMouseWheelRequestAxisSwap();
}
/**
* On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event.
* On a Mac system this is already enforced by the system.
*/
public void setMouseWheelRequestAxisSwap(final boolean value) {
nSetMouseWheelRequestAxisSwap(value);
}
private native boolean nGetMouseWheelRequestAxisSwap(); /*
return THIS->MouseWheelRequestAxisSwap;
*/
private native void nSetMouseWheelRequestAxisSwap(boolean value); /*
THIS->MouseWheelRequestAxisSwap = value;
*/
/**
* Duration the mouse button has been down (0.0f == just clicked)
*/
@@ -2677,82 +2891,6 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->MouseDragMaxDistanceSqr[idx] = value;
*/
public float[] getNavInputsDownDuration() {
return nGetNavInputsDownDuration();
}
public float getNavInputsDownDuration(final int idx) {
return nGetNavInputsDownDuration(idx);
}
public void setNavInputsDownDuration(final float[] value) {
nSetNavInputsDownDuration(value);
}
public void setNavInputsDownDuration(final int idx, final float value) {
nSetNavInputsDownDuration(idx, value);
}
private native float[] nGetNavInputsDownDuration(); /*
jfloat jBuf[ImGuiNavInput_COUNT];
for (int i = 0; i < ImGuiNavInput_COUNT; i++)
jBuf[i] = THIS->NavInputsDownDuration[i];
jfloatArray result = env->NewFloatArray(ImGuiNavInput_COUNT);
env->SetFloatArrayRegion(result, 0, ImGuiNavInput_COUNT, jBuf);
return result;
*/
private native float nGetNavInputsDownDuration(int idx); /*
return THIS->NavInputsDownDuration[idx];
*/
private native void nSetNavInputsDownDuration(float[] value); /*
for (int i = 0; i < ImGuiNavInput_COUNT; i++)
THIS->NavInputsDownDuration[i] = value[i];
*/
private native float nSetNavInputsDownDuration(int idx, float value); /*
THIS->NavInputsDownDuration[idx] = value;
*/
public float[] getNavInputsDownDurationPrev() {
return nGetNavInputsDownDurationPrev();
}
public float getNavInputsDownDurationPrev(final int idx) {
return nGetNavInputsDownDurationPrev(idx);
}
public void setNavInputsDownDurationPrev(final float[] value) {
nSetNavInputsDownDurationPrev(value);
}
public void setNavInputsDownDurationPrev(final int idx, final float value) {
nSetNavInputsDownDurationPrev(idx, value);
}
private native float[] nGetNavInputsDownDurationPrev(); /*
jfloat jBuf[ImGuiNavInput_COUNT];
for (int i = 0; i < ImGuiNavInput_COUNT; i++)
jBuf[i] = THIS->NavInputsDownDurationPrev[i];
jfloatArray result = env->NewFloatArray(ImGuiNavInput_COUNT);
env->SetFloatArrayRegion(result, 0, ImGuiNavInput_COUNT, jBuf);
return result;
*/
private native float nGetNavInputsDownDurationPrev(int idx); /*
return THIS->NavInputsDownDurationPrev[idx];
*/
private native void nSetNavInputsDownDurationPrev(float[] value); /*
for (int i = 0; i < ImGuiNavInput_COUNT; i++)
THIS->NavInputsDownDurationPrev[i] = value[i];
*/
private native float nSetNavInputsDownDurationPrev(int idx, float value); /*
THIS->NavInputsDownDurationPrev[idx] = value;
*/
/**
* Touch/Pen pressure (0.0f to 1.0f, should be {@code >}0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
*/
@@ -1,6 +1,7 @@
package imgui;
import imgui.binding.ImGuiStruct;
import imgui.internal.ImGuiContext;
/**
* Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used.<p>
@@ -23,6 +24,31 @@ public class ImGuiInputTextCallbackData extends ImGuiStruct {
#define THIS ((ImGuiInputTextCallbackData*)STRUCT_PTR)
*/
private static final ImGuiContext _GETCTX_1 = new ImGuiContext(0);
/**
* Parent UI context
*/
public ImGuiContext getCtx() {
_GETCTX_1.ptr = nGetCtx();
return _GETCTX_1;
}
/**
* Parent UI context
*/
public void setCtx(final ImGuiContext value) {
nSetCtx(value.ptr);
}
private native long nGetCtx(); /*
return (uintptr_t)THIS->Ctx;
*/
private native void nSetCtx(long value); /*
THIS->Ctx = reinterpret_cast<ImGuiContext*>(value);
*/
/**
* One ImGuiInputTextFlags_Callback*
*/
@@ -1,62 +1,235 @@
package imgui;
import imgui.binding.ImGuiStructDestroyable;
import imgui.callback.ImListClipperCallback;
import imgui.internal.ImGuiContext;
import java.util.function.Consumer;
/**
* Helper: Manually clip large list of items.
* If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse
* clipping based on visibility to save yourself from processing those items at all.
* If you have lots evenly spaced items and you have random access to the list, you can perform coarse
* clipping based on visibility to only submit items that are in view.
* The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped.
* (Dear ImGui already clip items based on their bounds but it needs to measure text size to do so, whereas manual coarse clipping before submission makes this cost and your own data fetching/submission cost almost null)
* (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally
* fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily
* scale using lists with tens of thousands of items without a problem)
* Usage:
* <pre>
* ImGuiListClipper clipper;
* clipper.Begin(1000); // We have 1000 elements, evenly spaced.
* while (clipper.Step())
* for (int i = clipper.DisplayStart; i {@code <} clipper.DisplayEnd; i++)
* ImGui::Text("line number %d", i);
* ImGuiListClipper clipper;
* clipper.Begin(1000); // We have 1000 elements, evenly spaced.
* while (clipper.Step())
* for (int i = clipper.DisplayStart; i {@code <} clipper.DisplayEnd; i++)
* ImGui::Text("line number %d", i);
* </pre>
* Generally what happens is:
* - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not.
* - User code submit one element.
* - User code submit that one element.
* - Clipper can measure the height of the first element
* - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
* - User code submit visible elements.
* - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
* <p>
* BINDING NOTICE:
* It's impossible to implement the same API like in the original. Method {@link #forEach(int, int, ImListClipperCallback)} could be used instead.
* <pre>
* ImGuiListClipper.forEach(1000, new ImListClipperCallback() {
* public void accept(int index) {
* ImGui.text(String.format("line number %d", index));
* }
* });
* </pre>
*/
public final class ImGuiListClipper {
private ImGuiListClipper() {
public final class ImGuiListClipper extends ImGuiStructDestroyable {
public ImGuiListClipper() {
super();
}
public ImGuiListClipper(final long ptr) {
super(ptr);
}
@Override
protected long create() {
return nCreate();
}
/*JNI
#include "_common.h"
#define THIS ((ImGuiListClipper*)STRUCT_PTR)
*/
private native long nCreate(); /*
return (uintptr_t)(new ImGuiListClipper());
*/
private static final ImGuiContext _GETCTX_1 = new ImGuiContext(0);
/**
* Parent UI context
*/
public ImGuiContext getCtx() {
_GETCTX_1.ptr = nGetCtx();
return _GETCTX_1;
}
/**
* Parent UI context
*/
public void setCtx(final ImGuiContext value) {
nSetCtx(value.ptr);
}
private native long nGetCtx(); /*
return (uintptr_t)THIS->Ctx;
*/
private native void nSetCtx(long value); /*
THIS->Ctx = reinterpret_cast<ImGuiContext*>(value);
*/
public int getDisplayStart() {
return nGetDisplayStart();
}
public void setDisplayStart(final int value) {
nSetDisplayStart(value);
}
private native int nGetDisplayStart(); /*
return THIS->DisplayStart;
*/
private native void nSetDisplayStart(int value); /*
THIS->DisplayStart = value;
*/
public int getDisplayEnd() {
return nGetDisplayEnd();
}
public void setDisplayEnd(final int value) {
nSetDisplayEnd(value);
}
private native int nGetDisplayEnd(); /*
return THIS->DisplayEnd;
*/
private native void nSetDisplayEnd(int value); /*
THIS->DisplayEnd = value;
*/
public int getItemsCount() {
return nGetItemsCount();
}
private native int nGetItemsCount(); /*
return THIS->ItemsCount;
*/
public float getItemsHeight() {
return nGetItemsHeight();
}
private native float nGetItemsHeight(); /*
return THIS->ItemsHeight;
*/
public float getStartPosY() {
return nGetStartPosY();
}
private native float nGetStartPosY(); /*
return THIS->StartPosY;
*/
public void begin(final int itemsCount) {
nBegin(itemsCount);
}
public void begin(final int itemsCount, final float itemsHeight) {
nBegin(itemsCount, itemsHeight);
}
private native void nBegin(int itemsCount); /*
THIS->Begin(itemsCount);
*/
private native void nBegin(int itemsCount, float itemsHeight); /*
THIS->Begin(itemsCount, itemsHeight);
*/
/**
* Automatically called on the last call of Step() that returns false.
*/
public void end() {
nEnd();
}
private native void nEnd(); /*
THIS->End();
*/
/**
* Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.
*/
public boolean step() {
return nStep();
}
private native boolean nStep(); /*
return THIS->Step();
*/
/**
* Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility.
* (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
*/
public void includeItemByIndex(final int itemIndex) {
nIncludeItemByIndex(itemIndex);
}
private native void nIncludeItemByIndex(int itemIndex); /*
THIS->IncludeItemByIndex(itemIndex);
*/
/**
* Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility.
* (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
*
* @param itemEnd
* is exclusive e.g. use (42, 42+1) to make item 42 never clipped.
*/
public void includeItemsByIndex(final int itemBegin, final int itemEnd) {
nIncludeItemsByIndex(itemBegin, itemEnd);
}
private native void nIncludeItemsByIndex(int itemBegin, int itemEnd); /*
THIS->IncludeItemsByIndex(itemBegin, itemEnd);
*/
/**
* Shortcut to use {@link ImGuiListClipper} instance.
*
* @param clipAction action to use inside the {@link ImGuiListClipper} instance
*/
public static void forEach(final Consumer<ImGuiListClipper> clipAction) {
final ImGuiListClipper clipper = new ImGuiListClipper();
clipAction.accept(clipper);
clipper.destroy();
}
/**
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param callback action to do in iterations
* @param callback action to do in iterations
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
*/
@Deprecated
public static void forEach(final int itemsCount, final ImListClipperCallback callback) {
forEach(itemsCount, -1, callback);
}
/**
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param itemsHeight Use -1.0f to be calculated automatically on first step.
* Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
* @param callback action to do in iterations
* Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
* @param callback action to do in iterations
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
*/
@Deprecated
public static native void forEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /*
ImGuiListClipper clipper;
clipper.Begin(itemsCount, itemsHeight);
@@ -66,4 +239,8 @@ public final class ImGuiListClipper {
}
}
*/
/*JNI
#undef THIS
*/
}
@@ -499,7 +499,14 @@ public final class ImGuiPlatformIO extends ImGuiStruct {
return IMGUI_PLATFORM_IO->Monitors.Size;
*/
public native void pushMonitors(float mainPosX, float mainPosY, float mainSizeX, float mainSizeY, float workPosX, float workPosY, float workSizeX, float workSizeY, float dpiScale); /*
public native void pushMonitors(
long platformHandle,
float mainPosX, float mainPosY,
float mainSizeX, float mainSizeY,
float workPosX, float workPosY,
float workSizeX, float workSizeY,
float dpiScale
); /*
ImGuiPlatformMonitor monitor;
monitor.MainPos = ImVec2(mainPosX, mainPosY);
@@ -509,6 +516,7 @@ public final class ImGuiPlatformIO extends ImGuiStruct {
monitor.WorkSize = ImVec2(workSizeX, workSizeY);
monitor.DpiScale = dpiScale;
monitor.PlatformHandle = (void*)platformHandle;
IMGUI_PLATFORM_IO->Monitors.push_back(monitor);
*/
@@ -294,6 +294,20 @@ public final class ImGuiPlatformMonitor extends ImGuiStruct {
THIS->DpiScale = value;
*/
/**
* Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
*/
public native void setPlatformHandle(long platformHandle); /*
THIS->PlatformHandle = (void*)platformHandle;
*/
/**
* Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
*/
public native long getPlatformHandle(); /*
return (uintptr_t)THIS->PlatformHandle;
*/
/*JNI
#undef THIS
*/
@@ -182,7 +182,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
*/
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
public ImVec2 getWindowMinSize() {
final ImVec2 dst = new ImVec2();
@@ -191,35 +191,35 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
}
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
public float getWindowMinSizeX() {
return nGetWindowMinSizeX();
}
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
public float getWindowMinSizeY() {
return nGetWindowMinSizeY();
}
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
public void getWindowMinSize(final ImVec2 dst) {
nGetWindowMinSize(dst);
}
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
public void setWindowMinSize(final ImVec2 value) {
nSetWindowMinSize(value.x, value.y);
}
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
public void setWindowMinSize(final float valueX, final float valueY) {
nSetWindowMinSize(valueX, valueY);
@@ -641,7 +641,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
*/
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
public ImVec2 getCellPadding() {
final ImVec2 dst = new ImVec2();
@@ -650,35 +650,35 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
}
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
public float getCellPaddingX() {
return nGetCellPaddingX();
}
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
public float getCellPaddingY() {
return nGetCellPaddingY();
}
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
public void getCellPadding(final ImVec2 dst) {
nGetCellPadding(dst);
}
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
public void setCellPadding(final ImVec2 value) {
nSetCellPadding(value.x, value.y);
}
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
public void setCellPadding(final float valueX, final float valueY) {
nSetCellPadding(valueX, valueY);
@@ -967,7 +967,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
*/
/**
* Minimum width for close button to appears on an unselected tab when hovered.
* Minimum width for close button to appear on an unselected tab when hovered.
* Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
*/
public float getTabMinWidthForCloseButton() {
@@ -975,7 +975,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
}
/**
* Minimum width for close button to appears on an unselected tab when hovered.
* Minimum width for close button to appear on an unselected tab when hovered.
* Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
*/
public void setTabMinWidthForCloseButton(final float value) {
@@ -1140,6 +1140,150 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
THIS->SelectableTextAlign = value;
*/
/**
* Thickkness of border in SeparatorText()
*/
public float getSeparatorTextBorderSize() {
return nGetSeparatorTextBorderSize();
}
/**
* Thickkness of border in SeparatorText()
*/
public void setSeparatorTextBorderSize(final float value) {
nSetSeparatorTextBorderSize(value);
}
private native float nGetSeparatorTextBorderSize(); /*
return THIS->SeparatorTextBorderSize;
*/
private native void nSetSeparatorTextBorderSize(float value); /*
THIS->SeparatorTextBorderSize = value;
*/
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
public ImVec2 getSeparatorTextAlign() {
final ImVec2 dst = new ImVec2();
nGetSeparatorTextAlign(dst);
return dst;
}
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
public float getSeparatorTextAlignX() {
return nGetSeparatorTextAlignX();
}
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
public float getSeparatorTextAlignY() {
return nGetSeparatorTextAlignY();
}
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
public void getSeparatorTextAlign(final ImVec2 dst) {
nGetSeparatorTextAlign(dst);
}
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
public void setSeparatorTextAlign(final ImVec2 value) {
nSetSeparatorTextAlign(value.x, value.y);
}
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
public void setSeparatorTextAlign(final float valueX, final float valueY) {
nSetSeparatorTextAlign(valueX, valueY);
}
private native void nGetSeparatorTextAlign(ImVec2 dst); /*
Jni::ImVec2Cpy(env, THIS->SeparatorTextAlign, dst);
*/
private native float nGetSeparatorTextAlignX(); /*
return THIS->SeparatorTextAlign.x;
*/
private native float nGetSeparatorTextAlignY(); /*
return THIS->SeparatorTextAlign.y;
*/
private native void nSetSeparatorTextAlign(float valueX, float valueY); /*MANUAL
ImVec2 value = ImVec2(valueX, valueY);
THIS->SeparatorTextAlign = value;
*/
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
public ImVec2 getSeparatorTextPadding() {
final ImVec2 dst = new ImVec2();
nGetSeparatorTextPadding(dst);
return dst;
}
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
public float getSeparatorTextPaddingX() {
return nGetSeparatorTextPaddingX();
}
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
public float getSeparatorTextPaddingY() {
return nGetSeparatorTextPaddingY();
}
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
public void getSeparatorTextPadding(final ImVec2 dst) {
nGetSeparatorTextPadding(dst);
}
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
public void setSeparatorTextPadding(final ImVec2 value) {
nSetSeparatorTextPadding(value.x, value.y);
}
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
public void setSeparatorTextPadding(final float valueX, final float valueY) {
nSetSeparatorTextPadding(valueX, valueY);
}
private native void nGetSeparatorTextPadding(ImVec2 dst); /*
Jni::ImVec2Cpy(env, THIS->SeparatorTextPadding, dst);
*/
private native float nGetSeparatorTextPaddingX(); /*
return THIS->SeparatorTextPadding.x;
*/
private native float nGetSeparatorTextPaddingY(); /*
return THIS->SeparatorTextPadding.y;
*/
private native void nSetSeparatorTextPadding(float valueX, float valueY); /*MANUAL
ImVec2 value = ImVec2(valueX, valueY);
THIS->SeparatorTextPadding = value;
*/
/**
* Window position are clamped to be visible within the display area by at least this amount. Only applies to regular windows.
*/
@@ -1268,6 +1412,28 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
THIS->DisplaySafeAreaPadding = value;
*/
/**
* Thickness of resizing border between docked windows
*/
public float getDockingSeparatorSize() {
return nGetDockingSeparatorSize();
}
/**
* Thickness of resizing border between docked windows
*/
public void setDockingSeparatorSize(final float value) {
nSetDockingSeparatorSize(value);
}
private native float nGetDockingSeparatorSize(); /*
return THIS->DockingSeparatorSize;
*/
private native void nSetDockingSeparatorSize(float value); /*
THIS->DockingSeparatorSize = value;
*/
/**
* Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
*/
@@ -1448,6 +1614,119 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
THIS->Colors[col] = ImColor(value);
*/
// Behaviors
// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO)
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
*/
public float getHoverStationaryDelay() {
return nGetHoverStationaryDelay();
}
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
*/
public void setHoverStationaryDelay(final float value) {
nSetHoverStationaryDelay(value);
}
private native float nGetHoverStationaryDelay(); /*
return THIS->HoverStationaryDelay;
*/
private native void nSetHoverStationaryDelay(float value); /*
THIS->HoverStationaryDelay = value;
*/
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
*/
public float getHoverDelayShort() {
return nGetHoverDelayShort();
}
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
*/
public void setHoverDelayShort(final float value) {
nSetHoverDelayShort(value);
}
private native float nGetHoverDelayShort(); /*
return THIS->HoverDelayShort;
*/
private native void nSetHoverDelayShort(float value); /*
THIS->HoverDelayShort = value;
*/
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
*/
public float getHoverDelayNormal() {
return nGetHoverDelayNormal();
}
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
*/
public void setHoverDelayNormal(final float value) {
nSetHoverDelayNormal(value);
}
private native float nGetHoverDelayNormal(); /*
return THIS->HoverDelayNormal;
*/
private native void nSetHoverDelayNormal(float value); /*
THIS->HoverDelayNormal = value;
*/
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
*/
public int getHoverFlagsForTooltipMouse() {
return nGetHoverFlagsForTooltipMouse();
}
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
*/
public void setHoverFlagsForTooltipMouse(final int value) {
nSetHoverFlagsForTooltipMouse(value);
}
private native int nGetHoverFlagsForTooltipMouse(); /*
return THIS->HoverFlagsForTooltipMouse;
*/
private native void nSetHoverFlagsForTooltipMouse(int value); /*
THIS->HoverFlagsForTooltipMouse = value;
*/
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
*/
public int getHoverFlagsForTooltipNav() {
return nGetHoverFlagsForTooltipNav();
}
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
*/
public void setHoverFlagsForTooltipNav(final int value) {
nSetHoverFlagsForTooltipNav(value);
}
private native int nGetHoverFlagsForTooltipNav(); /*
return THIS->HoverFlagsForTooltipNav;
*/
private native void nSetHoverFlagsForTooltipNav(int value); /*
THIS->HoverFlagsForTooltipNav = value;
*/
public void scaleAllSizes(final float scaleFactor) {
nScaleAllSizes(scaleFactor);
}
@@ -459,6 +459,28 @@ public final class ImGuiViewport extends ImGuiStruct {
return (uintptr_t)THIS->PlatformHandleRaw;
*/
/**
* Platform window has been created (Platform_CreateWindow() has been called). This is false during the first frame where a viewport is being created.
*/
public boolean getPlatformWindowCreated() {
return nGetPlatformWindowCreated();
}
/**
* Platform window has been created (Platform_CreateWindow() has been called). This is false during the first frame where a viewport is being created.
*/
public void setPlatformWindowCreated(final boolean value) {
nSetPlatformWindowCreated(value);
}
private native boolean nGetPlatformWindowCreated(); /*
return THIS->PlatformWindowCreated;
*/
private native void nSetPlatformWindowCreated(boolean value); /*
THIS->PlatformWindowCreated = value;
*/
/**
* Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative position will be OS window position).
*/
@@ -1,5 +0,0 @@
package imgui.extension.imguifiledialog.callback;
public abstract class ImGuiFileDialogPaneFun {
public abstract void accept(String filter, long userDatas, boolean canContinue);
}
@@ -1,59 +0,0 @@
package imgui.extension.imguifiledialog.flag;
public final class ImGuiFileDialogFlags {
private ImGuiFileDialogFlags() {
}
/**
* Definition: {@code 0}
*/
public static final int None = 0;
/**
* show confirm to overwrite dialog
*
* <p>Definition: {@code (1 << 0)}
*/
public static final int ConfirmOverwrite = 1;
/**
* dont show hidden file (file starting with a .)
*
* <p>Definition: {@code (1 << 1)}
*/
public static final int DontShowHiddenFiles = 2;
/**
* disable the create directory button
*
* <p>Definition: {@code (1 << 2)}
*/
public static final int DisableCreateDirectoryButton = 4;
/**
* hide column file type
*
* <p>Definition: {@code (1 << 3)}
*/
public static final int HideColumnType = 8;
/**
* hide column file size
*
* <p>Definition: {@code (1 << 4)}
*/
public static final int HideColumnSize = 16;
/**
* hide column file date
*
* <p>Definition: {@code (1 << 5)}
*/
public static final int HideColumnDate = 32;
/**
* Definition: {@code ImGuiFileDialogFlags_ConfirmOverwrite}
*/
public static final int Default = 1;
}
File diff suppressed because it is too large. Load diff
@@ -923,22 +923,6 @@ public final class ImPlotStyle extends ImGuiStructDestroyable {
THIS->Colormap = value;
*/
public boolean getAntiAliasedLines() {
return nGetAntiAliasedLines();
}
public void setAntiAliasedLines(final boolean value) {
nSetAntiAliasedLines(value);
}
private native boolean nGetAntiAliasedLines(); /*
return THIS->AntiAliasedLines;
*/
private native void nSetAntiAliasedLines(boolean value); /*
THIS->AntiAliasedLines = value;
*/
public boolean getUseLocalTime() {
return nGetUseLocalTime();
}
@@ -13,7 +13,7 @@ public final class ImPlotAxisFlags {
public static final int None = 0;
/**
* the axis label will not be displayed (axis labels also hidden if the supplied string name is NULL)
* the axis label will not be displayed (axis labels are also hidden if the supplied string name is nullptr)
*
* <p>Definition: {@code 1 << 0}
*/
@@ -55,32 +55,32 @@ public final class ImPlotAxisFlags {
public static final int NoMenus = 32;
/**
* axis ticks and labels will be rendered on conventionally opposite side (i.e, right or top)
* the user will not be able to switch the axis side by dragging it
*
* <p>Definition: {@code 1 << 6}
*/
public static final int Opposite = 64;
public static final int NoSideSwitch = 64;
/**
* grid lines will be displayed in the foreground (i.e. on top of data) in stead of the background
* the axis will not have its background highlighted when hovered or held
*
* <p>Definition: {@code 1 << 7}
*/
public static final int Foreground = 128;
public static final int NoHighlight = 128;
/**
* a logartithmic (base 10) axis scale will be used (mutually exclusive with ImPlotAxisFlags_Time)
* axis ticks and labels will be rendered on the conventionally opposite side (i.e, right or top)
*
* <p>Definition: {@code 1 << 8}
*/
public static final int LogScale = 256;
public static final int Opposite = 256;
/**
* axis will display date/time formatted labels (mutually exclusive with ImPlotAxisFlags_LogScale)
* grid lines will be displayed in the foreground (i.e. on top of data) instead of the background
*
* <p>Definition: {@code 1 << 9}
*/
public static final int Time = 512;
public static final int Foreground = 512;
/**
* the axis will be inverted
@@ -104,23 +104,30 @@ public final class ImPlotAxisFlags {
public static final int RangeFit = 4096;
/**
* the axis minimum value will be locked when panning/zooming
* panning in a locked or constrained state will cause the axis to stretch if possible
*
* <p>Definition: {@code 1 << 13}
*/
public static final int LockMin = 8192;
public static final int PanStretch = 8192;
/**
* the axis minimum value will be locked when panning/zooming
*
* <p>Definition: {@code 1 << 14}
*/
public static final int LockMin = 16384;
/**
* the axis maximum value will be locked when panning/zooming
*
* <p>Definition: {@code 1 << 14}
* <p>Definition: {@code 1 << 15}
*/
public static final int LockMax = 16384;
public static final int LockMax = 32768;
/**
* Definition: {@code ImPlotAxisFlags_LockMin | ImPlotAxisFlags_LockMax}
*/
public static final int Lock = 24576;
public static final int Lock = 49152;
/**
* Definition: {@code ImPlotAxisFlags_NoLabel | ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_NoTickMarks | ImPlotAxisFlags_NoTickLabels}
@@ -130,5 +137,5 @@ public final class ImPlotAxisFlags {
/**
* Definition: {@code ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_Opposite}
*/
public static final int AuxDefault = 66;
public static final int AuxDefault = 258;
}
@@ -12,10 +12,17 @@ public final class ImPlotBarGroupsFlags {
*/
public static final int None = 0;
/**
* bar groups will be rendered horizontally on the current y-axis
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Horizontal = 1024;
/**
* items in a group will be stacked on top of each other
*
* <p>Definition: {@code 1 << 0}
* <p>Definition: {@code 1 << 11}
*/
public static final int Stacked = 1;
public static final int Stacked = 2048;
}
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotBarsFlags {
private ImPlotBarsFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* bars will be rendered horizontally on the current y-axis
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Horizontal = 1024;
}
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotErrorBarsFlags {
private ImPlotErrorBarsFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* error bars will be rendered horizontally on the current y-axis
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Horizontal = 1024;
}
@@ -82,13 +82,6 @@ public final class ImPlotFlags {
*/
public static final int Crosshairs = 512;
/**
* plot items will be software anti-aliased (not recommended for high density plots, prefer MSAA)
*
* <p>Definition: {@code 1 << 10}
*/
public static final int AntiAliased = 1024;
/**
* Definition: {@code ImPlotFlags_NoTitle | ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect | ImPlotFlags_NoMouseText}
*/
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotHeatmapFlags {
private ImPlotHeatmapFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* data will be read in column major order
*
* <p>Definition: {@code 1 << 10}
*/
public static final int ColMajor = 1024;
}
@@ -0,0 +1,49 @@
package imgui.extension.implot.flag;
public final class ImPlotHistogramFlags {
private ImPlotHistogramFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* histogram bars will be rendered horizontally (not supported by PlotHistogram2D)
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Horizontal = 1024;
/**
* each bin will contain its count plus the counts of all previous bins (not supported by PlotHistogram2D)
*
* <p>Definition: {@code 1 << 11}
*/
public static final int Cumulative = 2048;
/**
* counts will be normalized, i.e. the PDF will be visualized, or the CDF will be visualized if Cumulative is also set
*
* <p>Definition: {@code 1 << 12}
*/
public static final int Density = 4096;
/**
* exclude values outside the specifed histogram range from the count toward normalizing and cumulative counts
*
* <p>Definition: {@code 1 << 13}
*/
public static final int NoOutliers = 8192;
/**
* data will be read in column major order (not supported by PlotHistogram)
*
* <p>Definition: {@code 1 << 14}
*/
public static final int ColMajor = 16384;
}
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotInfLinesFlags {
private ImPlotInfLinesFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* lines will be rendered horizontally on the current y-axis
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Horizontal = 1024;
}
@@ -0,0 +1,26 @@
package imgui.extension.implot.flag;
public final class ImPlotItemFlags {
private ImPlotItemFlags() {
}
/**
* Definition: {@code 0}
*/
public static final int None = 0;
/**
* the item won't have a legend entry displayed
*
* <p>Definition: {@code 1 << 0}
*/
public static final int NoLegend = 1;
/**
* the item won't be considered for plot fits
*
* <p>Definition: {@code 1 << 1}
*/
public static final int NoFit = 2;
}
@@ -53,4 +53,11 @@ public final class ImPlotLegendFlags {
* <p>Definition: {@code 1 << 5}
*/
public static final int Horizontal = 32;
/**
* legend entries will be displayed in alphabetical order
*
* <p>Definition: {@code 1 << 6}
*/
public static final int Sort = 64;
}
@@ -0,0 +1,49 @@
package imgui.extension.implot.flag;
public final class ImPlotLineFlags {
private ImPlotLineFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* a line segment will be rendered from every two consecutive points
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Segments = 1024;
/**
* the last and first point will be connected to form a closed loop
*
* <p>Definition: {@code 1 << 11}
*/
public static final int Loop = 2048;
/**
* NaNs values will be skipped instead of rendered as missing data
*
* <p>Definition: {@code 1 << 12}
*/
public static final int SkipNaN = 4096;
/**
* markers (if displayed) on the edge of a plot will not be clipped
*
* <p>Definition: {@code 1 << 13}
*/
public static final int NoClip = 8192;
/**
* a filled region between the line and horizontal origin will be rendered; use PlotShaded for more advanced cases
*
* <p>Definition: {@code 1 << 14}
*/
public static final int Shaded = 16384;
}
@@ -13,7 +13,7 @@ public final class ImPlotMarker {
public static final int None = -1;
/**
* a circle marker
* a circle marker (default)
*/
public static final int Circle = 0;
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotPieChartFlags {
private ImPlotPieChartFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* force normalization of pie chart values (i.e. always make a full circle if sum{@code <}0)
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Normalize = 1024;
}
@@ -0,0 +1,29 @@
package imgui.extension.implot.flag;
public final class ImPlotScale {
private ImPlotScale() {
}
/**
* default linear scale
*
* <p>Definition: {@code 0}
*/
public static final int Linear = 0;
/**
* date/time scale
*/
public static final int Time = 1;
/**
* base 10 logartithmic scale
*/
public static final int Log10 = 2;
/**
* symmetric log scale
*/
public static final int SymLog = 3;
}
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotScatterFlags {
private ImPlotScatterFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* markers on the edge of a plot will not be clipped
*
* <p>Definition: {@code 1 << 10}
*/
public static final int NoClip = 1024;
}
@@ -0,0 +1,28 @@
package imgui.extension.implot.flag;
public final class ImPlotStairsFlags {
private ImPlotStairsFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* the y value is continued constantly to the left from every x position, i.e. the interval (x[i-1], x[i]] has the value y[i]
*
* <p>Definition: {@code 1 << 10}
*/
public static final int PreStep = 1024;
/**
* a filled region between the stairs and horizontal origin will be rendered; use PlotShaded for more advanced cases
*
* <p>Definition: {@code 1 << 11}
*/
public static final int Shaded = 2048;
}
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotStemsFlags {
private ImPlotStemsFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* stems will be rendered horizontally on the current y-axis
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Horizontal = 1024;
}
@@ -0,0 +1,21 @@
package imgui.extension.implot.flag;
public final class ImPlotTextFlags {
private ImPlotTextFlags() {
}
/**
* default
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* text will be rendered vertically
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Vertical = 1024;
}
@@ -35,6 +35,22 @@ public final class NodeEditorConfig extends ImGuiStructDestroyable {
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
*/
public int getCanvasSizeMode() {
return nGetCanvasSizeMode();
}
public void setCanvasSizeMode(final int value) {
nSetCanvasSizeMode(value);
}
public native int nGetCanvasSizeMode(); /*
return static_cast<int>(THIS->CanvasSizeMode);
*/
public native void nSetCanvasSizeMode(int value); /*
THIS->CanvasSizeMode = static_cast<ax::NodeEditor::CanvasSizeMode>(value);
*/
public int getDragButtonIndex() {
return nGetDragButtonIndex();
}
@@ -99,6 +115,38 @@ public final class NodeEditorConfig extends ImGuiStructDestroyable {
THIS->ContextMenuButtonIndex = value;
*/
public boolean getEnableSmoothZoom() {
return nGetEnableSmoothZoom();
}
public void setEnableSmoothZoom(final boolean value) {
nSetEnableSmoothZoom(value);
}
private native boolean nGetEnableSmoothZoom(); /*
return THIS->EnableSmoothZoom;
*/
private native void nSetEnableSmoothZoom(boolean value); /*
THIS->EnableSmoothZoom = value;
*/
public float getSmoothZoomPower() {
return nGetSmoothZoomPower();
}
public void setSmoothZoomPower(final float value) {
nSetSmoothZoomPower(value);
}
private native float nGetSmoothZoomPower(); /*
return THIS->SmoothZoomPower;
*/
private native void nSetSmoothZoomPower(float value); /*
THIS->SmoothZoomPower = value;
*/
/*JNI
#undef THIS
*/
@@ -121,6 +121,22 @@ public final class NodeEditorStyle extends ImGuiStruct {
THIS->HoveredNodeBorderWidth = value;
*/
public float getHoverNodeBorderOffset() {
return nGetHoverNodeBorderOffset();
}
public void setHoverNodeBorderOffset(final float value) {
nSetHoverNodeBorderOffset(value);
}
private native float nGetHoverNodeBorderOffset(); /*
return THIS->HoverNodeBorderOffset;
*/
private native void nSetHoverNodeBorderOffset(float value); /*
THIS->HoverNodeBorderOffset = value;
*/
public float getSelectedNodeBorderWidth() {
return nGetSelectedNodeBorderWidth();
}
@@ -137,6 +153,22 @@ public final class NodeEditorStyle extends ImGuiStruct {
THIS->SelectedNodeBorderWidth = value;
*/
public float getSelectedNodeBorderOffset() {
return nGetSelectedNodeBorderOffset();
}
public void setSelectedNodeBorderOffset(final float value) {
nSetSelectedNodeBorderOffset(value);
}
private native float nGetSelectedNodeBorderOffset(); /*
return THIS->SelectedNodeBorderOffset;
*/
private native void nSetSelectedNodeBorderOffset(float value); /*
THIS->SelectedNodeBorderOffset = value;
*/
public float getPinRounding() {
return nGetPinRounding();
}
@@ -560,6 +592,38 @@ public final class NodeEditorStyle extends ImGuiStruct {
THIS->GroupBorderWidth = value;
*/
public float getHighlightConnectedLinks() {
return nGetHighlightConnectedLinks();
}
public void setHighlightConnectedLinks(final float value) {
nSetHighlightConnectedLinks(value);
}
private native float nGetHighlightConnectedLinks(); /*
return THIS->HighlightConnectedLinks;
*/
private native void nSetHighlightConnectedLinks(float value); /*
THIS->HighlightConnectedLinks = value;
*/
public float getSnapLinkToPinDir() {
return nGetSnapLinkToPinDir();
}
public void setSnapLinkToPinDir(final float value) {
nSetSnapLinkToPinDir(value);
}
private native float nGetSnapLinkToPinDir(); /*
return THIS->SnapLinkToPinDir;
*/
private native void nSetSnapLinkToPinDir(float value); /*
THIS->SnapLinkToPinDir = value;
*/
public ImVec4[] getColors() {
return nGetColors();
}
@@ -0,0 +1,22 @@
package imgui.extension.nodeditor.flag;
public final class NodeEditorCanvasSizeMode {
private NodeEditorCanvasSizeMode() {
}
/**
* Previous view will be scaled to fit new view on Y axis
*/
public static final int FitVerticalView = 0;
/**
* Previous view will be scaled to fit new view on X axis
*/
public static final int FitHorizontalView = 1;
/**
* Previous view will be centered on new view
*/
public static final int CenterOnly = 2;
}
@@ -25,21 +25,23 @@ public final class NodeEditorStyleColor {
public static final int SelLinkBorder = 9;
public static final int LinkSelRect = 10;
public static final int HighlightLinkBorder = 10;
public static final int LinkSelRectBorder = 11;
public static final int LinkSelRect = 11;
public static final int PinRect = 12;
public static final int LinkSelRectBorder = 12;
public static final int PinRectBorder = 13;
public static final int PinRect = 13;
public static final int Flow = 14;
public static final int PinRectBorder = 14;
public static final int FlowMarker = 15;
public static final int Flow = 15;
public static final int GroupBg = 16;
public static final int FlowMarker = 16;
public static final int GroupBorder = 17;
public static final int GroupBg = 17;
public static final int Count = 18;
public static final int GroupBorder = 18;
public static final int Count = 19;
}
@@ -51,5 +51,13 @@ public final class NodeEditorStyleVar {
public static final int GroupBorderWidth = 22;
public static final int Count = 23;
public static final int HighlightConnectedLinks = 23;
public static final int SnapLinkToPinDir = 24;
public static final int HoveredNodeBorderOffset = 25;
public static final int SelectedNodeBorderOffset = 26;
public static final int Count = 27;
}
@@ -1,762 +0,0 @@
package imgui.extension.texteditor;
import imgui.ImVec2;
import imgui.binding.ImGuiStructDestroyable;
import java.util.Map;
public final class TextEditor extends ImGuiStructDestroyable {
public TextEditor() {
super();
}
public TextEditor(final long ptr) {
super(ptr);
}
@Override
protected long create() {
return nCreate();
}
/*JNI
#include "_texteditor.h"
#define THIS ((TextEditor*)STRUCT_PTR)
#define TextEditorLanguageDefinition TextEditor::LanguageDefinition
*/
private native long nCreate(); /*
return (uintptr_t)(new TextEditor());
*/
public void setLanguageDefinition(final TextEditorLanguageDefinition aLanguageDef) {
nSetLanguageDefinition(aLanguageDef.ptr);
}
private native void nSetLanguageDefinition(long aLanguageDef); /*
THIS->SetLanguageDefinition(*reinterpret_cast<TextEditorLanguageDefinition*>(aLanguageDef));
*/
public TextEditorLanguageDefinition getLanguageDefinition() {
return new TextEditorLanguageDefinition(nGetLanguageDefinition());
}
private native long nGetLanguageDefinition(); /*
return (uintptr_t)&THIS->GetLanguageDefinition();
*/
public native int[] getPalette(); /*
const auto& palette = THIS->GetPalette();
jintArray res = env->NewIntArray(palette.size());
jint arr[palette.size()];
for (int i = 0; i < palette.size(); i++) {
arr[i] = palette[i];
}
env->SetIntArrayRegion(res, 0, palette.size(), arr);
return res;
*/
public void setPalette(final int[] palette) {
nSetPalette(palette, palette.length);
}
public native void nSetPalette(int[] palette, int length); /*
std::array<ImU32, (unsigned)TextEditor::PaletteIndex::Max> arr;
for (int i = 0; i < length; i++) {
arr[i] = palette[i];
}
THIS->SetPalette(arr);
*/
public void setErrorMarkers(final Map<Integer, String> errorMarkers) {
final int[] keys = errorMarkers.keySet().stream().mapToInt(i -> i).toArray();
final String[] values = errorMarkers.values().toArray(new String[0]);
nSetErrorMarkers(keys, keys.length, values, values.length);
}
private native void nSetErrorMarkers(int[] keys, int keysLen, String[] values, int valuesLen); /*
std::map<int, std::string> markers;
for (int i = 0; i < keysLen; i++) {
int key = keys[i];
jstring string = (jstring)env->GetObjectArrayElement(values, i);
const char* value = env->GetStringUTFChars(string, JNI_FALSE);
markers.emplace(std::pair<int, std::string>(key, std::string(value)));
env->ReleaseStringUTFChars(string, value);
}
THIS->SetErrorMarkers(markers);
*/
public void setBreakpoints(final int[] breakpoints) {
nSetBreakpoints(breakpoints, breakpoints.length);
}
private native void nSetBreakpoints(int[] breakpoints, int length); /*
std::unordered_set<int> set;
for (int i = 0; i < length; i++) {
set.emplace(breakpoints[i]);
}
THIS->SetBreakpoints(set);
*/
public void render(final String title) {
nRender(title);
}
public void render(final String title, final ImVec2 aSize) {
nRender(title, aSize.x, aSize.y);
}
public void render(final String title, final float aSizeX, final float aSizeY) {
nRender(title, aSizeX, aSizeY);
}
public void render(final String title, final ImVec2 aSize, final boolean aBorder) {
nRender(title, aSize.x, aSize.y, aBorder);
}
public void render(final String title, final float aSizeX, final float aSizeY, final boolean aBorder) {
nRender(title, aSizeX, aSizeY, aBorder);
}
public void render(final String title, final boolean aBorder) {
nRender(title, aBorder);
}
private native void nRender(String title); /*MANUAL
auto title = obj_title == NULL ? NULL : (char*)env->GetStringUTFChars(obj_title, JNI_FALSE);
THIS->Render(title);
if (title != NULL) env->ReleaseStringUTFChars(obj_title, title);
*/
private native void nRender(String title, float aSizeX, float aSizeY); /*MANUAL
auto title = obj_title == NULL ? NULL : (char*)env->GetStringUTFChars(obj_title, JNI_FALSE);
ImVec2 aSize = ImVec2(aSizeX, aSizeY);
THIS->Render(title, aSize);
if (title != NULL) env->ReleaseStringUTFChars(obj_title, title);
*/
private native void nRender(String title, float aSizeX, float aSizeY, boolean aBorder); /*MANUAL
auto title = obj_title == NULL ? NULL : (char*)env->GetStringUTFChars(obj_title, JNI_FALSE);
ImVec2 aSize = ImVec2(aSizeX, aSizeY);
THIS->Render(title, aSize, aBorder);
if (title != NULL) env->ReleaseStringUTFChars(obj_title, title);
*/
private native void nRender(String title, boolean aBorder); /*MANUAL
auto title = obj_title == NULL ? NULL : (char*)env->GetStringUTFChars(obj_title, JNI_FALSE);
THIS->Render(title, ImVec2(), aBorder);
if (title != NULL) env->ReleaseStringUTFChars(obj_title, title);
*/
public void setText(final String text) {
nSetText(text);
}
private native void nSetText(String text); /*MANUAL
auto text = obj_text == NULL ? NULL : (char*)env->GetStringUTFChars(obj_text, JNI_FALSE);
THIS->SetText(text);
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
*/
public String getText() {
return nGetText();
}
private native String nGetText(); /*
return env->NewStringUTF(THIS->GetText().c_str());
*/
public void setTextLines(final String[] lines) {
nSetTextLines(lines, lines.length);
}
private native void nSetTextLines(String[] lines, int length); /*
std::vector<std::string> vec;
vec.reserve(length);
for (int i = 0; i < length; i++) {
jstring string = (jstring)env->GetObjectArrayElement(lines, i);
const char* raw = env->GetStringUTFChars(string, JNI_FALSE);
vec.emplace_back(std::string(raw));
env->ReleaseStringUTFChars(string, raw);
}
THIS->SetTextLines(vec);
*/
public native String[] getTextLines(); /*
const auto lines = THIS->GetTextLines();
jobjectArray arr = env->NewObjectArray(
lines.size(),
env->FindClass("java/lang/String"),
env->NewStringUTF("")
);
for (int i = 0; i < lines.size(); i++) {
const auto& str = lines[i];
env->SetObjectArrayElement(arr, i, env->NewStringUTF(str.c_str()));
}
return arr;
*/
public String getSelectedText() {
return nGetSelectedText();
}
private native String nGetSelectedText(); /*
return env->NewStringUTF(THIS->GetSelectedText().c_str());
*/
public String getCurrentLineText() {
return nGetCurrentLineText();
}
private native String nGetCurrentLineText(); /*
return env->NewStringUTF(THIS->GetCurrentLineText().c_str());
*/
public int getTotalLines() {
return nGetTotalLines();
}
private native int nGetTotalLines(); /*
return THIS->GetTotalLines();
*/
public boolean isOverwrite() {
return nIsOverwrite();
}
private native boolean nIsOverwrite(); /*
return THIS->IsOverwrite();
*/
public void setReadOnly(final boolean aValue) {
nSetReadOnly(aValue);
}
private native void nSetReadOnly(boolean aValue); /*
THIS->SetReadOnly(aValue);
*/
public boolean isReadOnly() {
return nIsReadOnly();
}
private native boolean nIsReadOnly(); /*
return THIS->IsReadOnly();
*/
public boolean isTextChanged() {
return nIsTextChanged();
}
private native boolean nIsTextChanged(); /*
return THIS->IsTextChanged();
*/
public boolean isCursorPositionChanged() {
return nIsCursorPositionChanged();
}
private native boolean nIsCursorPositionChanged(); /*
return THIS->IsCursorPositionChanged();
*/
public boolean isColorizerEnabled() {
return nIsColorizerEnabled();
}
private native boolean nIsColorizerEnabled(); /*
return THIS->IsColorizerEnabled();
*/
public void setColorizerEnable(final boolean aValue) {
nSetColorizerEnable(aValue);
}
private native void nSetColorizerEnable(boolean aValue); /*
THIS->SetColorizerEnable(aValue);
*/
public TextEditorCoordinates getCursorPosition() {
final TextEditorCoordinates dst = new TextEditorCoordinates();
nGetCursorPosition(dst);
return dst;
}
public void getCursorPosition(final TextEditorCoordinates dst) {
nGetCursorPosition(dst);
}
private native void nGetCursorPosition(TextEditorCoordinates dst); /*
Jni::TextEditorCoordinatesCpy(env, THIS->GetCursorPosition(), dst);
*/
public void setCursorPosition(final TextEditorCoordinates aPosition) {
nSetCursorPosition(aPosition.mLine, aPosition.mColumn);
}
public void setCursorPosition(final int aPositionLine, final int aPositionColumn) {
nSetCursorPosition(aPositionLine, aPositionColumn);
}
private native void nSetCursorPosition(int aPositionLine, int aPositionColumn); /*
THIS->SetCursorPosition(TextEditor::Coordinates(aPositionLine, aPositionColumn));
*/
public void setHandleMouseInputs(final boolean aValue) {
nSetHandleMouseInputs(aValue);
}
private native void nSetHandleMouseInputs(boolean aValue); /*
THIS->SetHandleMouseInputs(aValue);
*/
public boolean isHandleMouseInputsEnabled() {
return nIsHandleMouseInputsEnabled();
}
private native boolean nIsHandleMouseInputsEnabled(); /*
return THIS->IsHandleMouseInputsEnabled();
*/
public void setHandleKeyboardInputs(final boolean aValue) {
nSetHandleKeyboardInputs(aValue);
}
private native void nSetHandleKeyboardInputs(boolean aValue); /*
THIS->SetHandleKeyboardInputs(aValue);
*/
public boolean isHandleKeyboardInputsEnabled() {
return nIsHandleKeyboardInputsEnabled();
}
private native boolean nIsHandleKeyboardInputsEnabled(); /*
return THIS->IsHandleKeyboardInputsEnabled();
*/
public void setImGuiChildIgnored(final boolean aValue) {
nSetImGuiChildIgnored(aValue);
}
private native void nSetImGuiChildIgnored(boolean aValue); /*
THIS->SetImGuiChildIgnored(aValue);
*/
public boolean isImGuiChildIgnored() {
return nIsImGuiChildIgnored();
}
private native boolean nIsImGuiChildIgnored(); /*
return THIS->IsImGuiChildIgnored();
*/
public void setShowWhitespaces(final boolean aValue) {
nSetShowWhitespaces(aValue);
}
private native void nSetShowWhitespaces(boolean aValue); /*
THIS->SetShowWhitespaces(aValue);
*/
public boolean isShowingWhitespaces() {
return nIsShowingWhitespaces();
}
private native boolean nIsShowingWhitespaces(); /*
return THIS->IsShowingWhitespaces();
*/
public void setTabSize(final int aValue) {
nSetTabSize(aValue);
}
private native void nSetTabSize(int aValue); /*
THIS->SetTabSize(aValue);
*/
public int getTabSize() {
return nGetTabSize();
}
private native int nGetTabSize(); /*
return THIS->GetTabSize();
*/
public void insertText(final String aValue) {
nInsertText(aValue);
}
private native void nInsertText(String aValue); /*MANUAL
auto aValue = obj_aValue == NULL ? NULL : (char*)env->GetStringUTFChars(obj_aValue, JNI_FALSE);
THIS->InsertText(aValue);
if (aValue != NULL) env->ReleaseStringUTFChars(obj_aValue, aValue);
*/
public void moveUp() {
nMoveUp();
}
public void moveUp(final int aAmount) {
nMoveUp(aAmount);
}
public void moveUp(final int aAmount, final boolean aSelect) {
nMoveUp(aAmount, aSelect);
}
private native void nMoveUp(); /*
THIS->MoveUp();
*/
private native void nMoveUp(int aAmount); /*
THIS->MoveUp(aAmount);
*/
private native void nMoveUp(int aAmount, boolean aSelect); /*
THIS->MoveUp(aAmount, aSelect);
*/
public void moveDown() {
nMoveDown();
}
public void moveDown(final int aAmount) {
nMoveDown(aAmount);
}
public void moveDown(final int aAmount, final boolean aSelect) {
nMoveDown(aAmount, aSelect);
}
private native void nMoveDown(); /*
THIS->MoveDown();
*/
private native void nMoveDown(int aAmount); /*
THIS->MoveDown(aAmount);
*/
private native void nMoveDown(int aAmount, boolean aSelect); /*
THIS->MoveDown(aAmount, aSelect);
*/
public void moveLeft() {
nMoveLeft();
}
public void moveLeft(final int aAmount) {
nMoveLeft(aAmount);
}
public void moveLeft(final int aAmount, final boolean aSelect) {
nMoveLeft(aAmount, aSelect);
}
public void moveLeft(final int aAmount, final boolean aSelect, final boolean aWordMode) {
nMoveLeft(aAmount, aSelect, aWordMode);
}
private native void nMoveLeft(); /*
THIS->MoveLeft();
*/
private native void nMoveLeft(int aAmount); /*
THIS->MoveLeft(aAmount);
*/
private native void nMoveLeft(int aAmount, boolean aSelect); /*
THIS->MoveLeft(aAmount, aSelect);
*/
private native void nMoveLeft(int aAmount, boolean aSelect, boolean aWordMode); /*
THIS->MoveLeft(aAmount, aSelect, aWordMode);
*/
public void moveRight() {
nMoveRight();
}
public void moveRight(final int aAmount) {
nMoveRight(aAmount);
}
public void moveRight(final int aAmount, final boolean aSelect) {
nMoveRight(aAmount, aSelect);
}
public void moveRight(final int aAmount, final boolean aSelect, final boolean aWordMode) {
nMoveRight(aAmount, aSelect, aWordMode);
}
private native void nMoveRight(); /*
THIS->MoveRight();
*/
private native void nMoveRight(int aAmount); /*
THIS->MoveRight(aAmount);
*/
private native void nMoveRight(int aAmount, boolean aSelect); /*
THIS->MoveRight(aAmount, aSelect);
*/
private native void nMoveRight(int aAmount, boolean aSelect, boolean aWordMode); /*
THIS->MoveRight(aAmount, aSelect, aWordMode);
*/
public void moveTop() {
nMoveTop();
}
public void moveTop(final boolean aSelect) {
nMoveTop(aSelect);
}
private native void nMoveTop(); /*
THIS->MoveTop();
*/
private native void nMoveTop(boolean aSelect); /*
THIS->MoveTop(aSelect);
*/
public void moveBottom() {
nMoveBottom();
}
public void moveBottom(final boolean aSelect) {
nMoveBottom(aSelect);
}
private native void nMoveBottom(); /*
THIS->MoveBottom();
*/
private native void nMoveBottom(boolean aSelect); /*
THIS->MoveBottom(aSelect);
*/
public void moveHome() {
nMoveHome();
}
public void moveHome(final boolean aSelect) {
nMoveHome(aSelect);
}
private native void nMoveHome(); /*
THIS->MoveHome();
*/
private native void nMoveHome(boolean aSelect); /*
THIS->MoveHome(aSelect);
*/
public void moveEnd() {
nMoveEnd();
}
public void moveEnd(final boolean aSelect) {
nMoveEnd(aSelect);
}
private native void nMoveEnd(); /*
THIS->MoveEnd();
*/
private native void nMoveEnd(boolean aSelect); /*
THIS->MoveEnd(aSelect);
*/
public void setSelectionStart(final TextEditorCoordinates aPosition) {
nSetSelectionStart(aPosition.mLine, aPosition.mColumn);
}
public void setSelectionStart(final int aPositionLine, final int aPositionColumn) {
nSetSelectionStart(aPositionLine, aPositionColumn);
}
private native void nSetSelectionStart(int aPositionLine, int aPositionColumn); /*
THIS->SetSelectionStart(TextEditor::Coordinates(aPositionLine, aPositionColumn));
*/
public void setSelectionEnd(final TextEditorCoordinates aPosition) {
nSetSelectionEnd(aPosition.mLine, aPosition.mColumn);
}
public void setSelectionEnd(final int aPositionLine, final int aPositionColumn) {
nSetSelectionEnd(aPositionLine, aPositionColumn);
}
private native void nSetSelectionEnd(int aPositionLine, int aPositionColumn); /*
THIS->SetSelectionEnd(TextEditor::Coordinates(aPositionLine, aPositionColumn));
*/
public void setSelection(final TextEditorCoordinates aStart, final TextEditorCoordinates aEnd) {
nSetSelection(aStart.mLine, aStart.mColumn, aEnd.mLine, aEnd.mColumn);
}
public void setSelection(final int aStartLine, final int aStartColumn, final int aEndLine, final int aEndColumn) {
nSetSelection(aStartLine, aStartColumn, aEndLine, aEndColumn);
}
public void setSelection(final TextEditorCoordinates aStart, final TextEditorCoordinates aEnd, final int aMode) {
nSetSelection(aStart.mLine, aStart.mColumn, aEnd.mLine, aEnd.mColumn, aMode);
}
public void setSelection(final int aStartLine, final int aStartColumn, final int aEndLine, final int aEndColumn, final int aMode) {
nSetSelection(aStartLine, aStartColumn, aEndLine, aEndColumn, aMode);
}
private native void nSetSelection(int aStartLine, int aStartColumn, int aEndLine, int aEndColumn); /*
THIS->SetSelection(TextEditor::Coordinates(aStartLine, aStartColumn), TextEditor::Coordinates(aEndLine, aEndColumn));
*/
private native void nSetSelection(int aStartLine, int aStartColumn, int aEndLine, int aEndColumn, int aMode); /*
THIS->SetSelection(TextEditor::Coordinates(aStartLine, aStartColumn), TextEditor::Coordinates(aEndLine, aEndColumn), static_cast<TextEditor::SelectionMode>(aMode));
*/
public void selectWordUnderCursor() {
nSelectWordUnderCursor();
}
private native void nSelectWordUnderCursor(); /*
THIS->SelectWordUnderCursor();
*/
public void selectAll() {
nSelectAll();
}
private native void nSelectAll(); /*
THIS->SelectAll();
*/
public boolean hasSelection() {
return nHasSelection();
}
private native boolean nHasSelection(); /*
return THIS->HasSelection();
*/
public void copy() {
nCopy();
}
private native void nCopy(); /*
THIS->Copy();
*/
public void cut() {
nCut();
}
private native void nCut(); /*
THIS->Cut();
*/
public void paste() {
nPaste();
}
private native void nPaste(); /*
THIS->Paste();
*/
public void delete() {
nDelete();
}
private native void nDelete(); /*
THIS->Delete();
*/
public boolean canUndo() {
return nCanUndo();
}
private native boolean nCanUndo(); /*
return THIS->CanUndo();
*/
public boolean canRedo() {
return nCanRedo();
}
private native boolean nCanRedo(); /*
return THIS->CanRedo();
*/
public void undo() {
nUndo();
}
public void undo(final int aSteps) {
nUndo(aSteps);
}
private native void nUndo(); /*
THIS->Undo();
*/
private native void nUndo(int aSteps); /*
THIS->Undo(aSteps);
*/
public void redo() {
nRedo();
}
public void redo(final int aSteps) {
nRedo(aSteps);
}
private native void nRedo(); /*
THIS->Redo();
*/
private native void nRedo(int aSteps); /*
THIS->Redo(aSteps);
*/
public native int[] getDarkPalette(); /*
const auto& palette = THIS->GetDarkPalette();
jintArray res = env->NewIntArray(palette.size());
jint arr[palette.size()];
for (int i = 0; i < palette.size(); i++) {
arr[i] = palette[i];
}
env->SetIntArrayRegion(res, 0, palette.size(), arr);
return res;
*/
public native int[] getLightPalette(); /*
const auto& palette = THIS->GetLightPalette();
jintArray res = env->NewIntArray(palette.size());
jint arr[palette.size()];
for (int i = 0; i < palette.size(); i++) {
arr[i] = palette[i];
}
env->SetIntArrayRegion(res, 0, palette.size(), arr);
return res;
*/
public native int[] getRetroBluePalette(); /*
const auto& palette = THIS->GetRetroBluePalette();
jintArray res = env->NewIntArray(palette.size());
jint arr[palette.size()];
for (int i = 0; i < palette.size(); i++) {
arr[i] = palette[i];
}
env->SetIntArrayRegion(res, 0, palette.size(), arr);
return res;
*/
/*JNI
#undef TextEditorLanguageDefinition
#undef THIS
*/
}
@@ -1,90 +0,0 @@
package imgui.extension.texteditor;
import java.util.Objects;
public final class TextEditorCoordinates implements Cloneable {
public int mLine;
public int mColumn;
public TextEditorCoordinates() {
}
public TextEditorCoordinates(final int mLine, final int mColumn) {
set(mLine, mColumn);
}
public TextEditorCoordinates(final TextEditorCoordinates value) {
set(value.mLine, value.mColumn);
}
public TextEditorCoordinates set(final int mLine, final int mColumn) {
this.mLine = mLine;
this.mColumn = mColumn;
return this;
}
public TextEditorCoordinates set(final TextEditorCoordinates value) {
return set(value.mLine, value.mColumn);
}
public TextEditorCoordinates plus(final int mLine, final int mColumn) {
this.mLine += mLine;
this.mColumn += mColumn;
return this;
}
public TextEditorCoordinates plus(final TextEditorCoordinates value) {
return plus(value.mLine, value.mColumn);
}
public TextEditorCoordinates minus(final int mLine, final int mColumn) {
this.mLine -= mLine;
this.mColumn -= mColumn;
return this;
}
public TextEditorCoordinates minus(final TextEditorCoordinates value) {
return minus(value.mLine, value.mColumn);
}
public TextEditorCoordinates times(final int mLine, final int mColumn) {
this.mLine *= mLine;
this.mColumn *= mColumn;
return this;
}
public TextEditorCoordinates times(final TextEditorCoordinates value) {
return times(value.mLine, value.mColumn);
}
@Override
public String toString() {
return "TextEditorCoordinates{"
+ "mLine=" + mLine
+ ", mColumn=" + mColumn
+ '}';
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final TextEditorCoordinates textEditorCoordinates = (TextEditorCoordinates) o;
return textEditorCoordinates.mLine == mLine && textEditorCoordinates.mColumn == mColumn;
}
@Override
public int hashCode() {
return Objects.hash(mLine, mColumn);
}
@Override
@SuppressWarnings("MethodDoesntCallSuperMethod")
public TextEditorCoordinates clone() {
return new TextEditorCoordinates(this);
}
}
@@ -1,314 +0,0 @@
package imgui.extension.texteditor;
import imgui.binding.ImGuiStructDestroyable;
import java.util.Map;
public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
public TextEditorLanguageDefinition() {
super();
}
public TextEditorLanguageDefinition(final long ptr) {
super(ptr);
}
@Override
protected long create() {
return nCreate();
}
/*JNI
#include "_texteditor.h"
#define THIS ((TextEditor::LanguageDefinition*)STRUCT_PTR)
#define TextEditorLanguageDefinition TextEditor::LanguageDefinition
*/
private native long nCreate(); /*
return (uintptr_t)(new TextEditor::LanguageDefinition());
*/
public String getName() {
return nGetName();
}
public void setName(final String value) {
nSetName(value);
}
private native String nGetName(); /*
return env->NewStringUTF(THIS->mName.c_str());
*/
private native void nSetName(String value); /*MANUAL
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
THIS->mName = value;
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
*/
public void setKeywords(final String[] keywords) {
nSetKeywords(keywords, keywords.length);
}
private native void nSetKeywords(String[] keywords, int length); /*
std::unordered_set<std::string> set;
for (int i = 0; i < length; i++) {
jstring string = (jstring)env->GetObjectArrayElement(keywords, i);
const char* raw = env->GetStringUTFChars(string, JNI_FALSE);
set.emplace(std::string(raw));
env->ReleaseStringUTFChars(string, raw);
}
THIS->mKeywords = set;
*/
public void setIdentifiers(final Map<String, String> identifiers) {
final String[] keys = identifiers.keySet().toArray(new String[0]);
final String[] decl = identifiers.values().toArray(new String[0]);
nSetIdentifiers(keys, keys.length, decl, decl.length);
}
private native void nSetIdentifiers(String[] keys, int keysLen, String[] decl, int declLen); /*
std::unordered_map<std::string, TextEditor::Identifier> identifiers;
for (int i = 0; i < keysLen; i++) {
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
const char* key = env->GetStringUTFChars(string1, JNI_FALSE);
const char* value = env->GetStringUTFChars(string2, JNI_FALSE);
TextEditor::Identifier id;
id.mDeclaration = std::string(value);
identifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
env->ReleaseStringUTFChars(string1, key);
env->ReleaseStringUTFChars(string2, value);
}
THIS->mIdentifiers = identifiers;
*/
public void setPreprocIdentifiers(final Map<String, String> identifiers) {
final String[] keys = identifiers.keySet().toArray(new String[0]);
final String[] decl = identifiers.values().toArray(new String[0]);
nSetPreprocIdentifiers(keys, keys.length, decl, decl.length);
}
private native void nSetPreprocIdentifiers(String[] keys, int keysLen, String[] decl, int declLen); /*
std::unordered_map<std::string, TextEditor::Identifier> preprocIdentifiers;
for (int i = 0; i < keysLen; i++) {
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
const char* key = env->GetStringUTFChars(string1, JNI_FALSE);
const char* value = env->GetStringUTFChars(string2, JNI_FALSE);
TextEditor::Identifier id;
id.mDeclaration = std::string(value);
preprocIdentifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
env->ReleaseStringUTFChars(string1, key);
env->ReleaseStringUTFChars(string2, value);
}
THIS->mPreprocIdentifiers = preprocIdentifiers;
*/
public String getCommentStart() {
return nGetCommentStart();
}
public void setCommentStart(final String value) {
nSetCommentStart(value);
}
private native String nGetCommentStart(); /*
return env->NewStringUTF(THIS->mCommentStart.c_str());
*/
private native void nSetCommentStart(String value); /*MANUAL
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
THIS->mCommentStart = value;
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
*/
public String getCommentEnd() {
return nGetCommentEnd();
}
public void setCommentEnd(final String value) {
nSetCommentEnd(value);
}
private native String nGetCommentEnd(); /*
return env->NewStringUTF(THIS->mCommentEnd.c_str());
*/
private native void nSetCommentEnd(String value); /*MANUAL
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
THIS->mCommentEnd = value;
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
*/
public String getSingleLineComment() {
return nGetSingleLineComment();
}
public void setSingleLineComment(final String value) {
nSetSingleLineComment(value);
}
private native String nGetSingleLineComment(); /*
return env->NewStringUTF(THIS->mSingleLineComment.c_str());
*/
private native void nSetSingleLineComment(String value); /*MANUAL
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
THIS->mSingleLineComment = value;
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
*/
public char getPreprocChar() {
return nGetPreprocChar();
}
public void setPreprocChar(final char value) {
nSetPreprocChar(value);
}
private native char nGetPreprocChar(); /*
return THIS->mPreprocChar;
*/
private native void nSetPreprocChar(char value); /*
THIS->mPreprocChar = value;
*/
public boolean getAutoIndentation() {
return nGetAutoIndentation();
}
public void setAutoIndentation(final boolean value) {
nSetAutoIndentation(value);
}
private native boolean nGetAutoIndentation(); /*
return THIS->mAutoIndentation;
*/
private native void nSetAutoIndentation(boolean value); /*
THIS->mAutoIndentation = value;
*/
public void setTokenRegexStrings(final Map<String, Integer> tokenRegexStrings) {
final String[] keys = tokenRegexStrings.keySet().toArray(new String[0]);
final int[] paletteIndexes = tokenRegexStrings.values().stream().mapToInt(i -> i).toArray();
nSetTokenRegexStrings(keys, keys.length, paletteIndexes, paletteIndexes.length);
}
private native void nSetTokenRegexStrings(String[] keys, int keysLen, int[] paletteIndexes, int paletteIndexesLen); /*
std::vector<std::pair<std::string, TextEditor::PaletteIndex>> tokenRegexStrings;
for (int i = 0; i < keysLen; i++) {
jstring string = (jstring)env->GetObjectArrayElement(keys, i);
const char* key = env->GetStringUTFChars(string, JNI_FALSE);
int value = paletteIndexes[i];
tokenRegexStrings.emplace_back(
std::pair<std::string, TextEditor::PaletteIndex>(
std::string(key),
static_cast<TextEditor::PaletteIndex>(value)
)
);
env->ReleaseStringUTFChars(string, key);
}
THIS->mTokenRegexStrings = tokenRegexStrings;
*/
public boolean getmCaseSensitive() {
return nGetmCaseSensitive();
}
public void setmCaseSensitive(final boolean value) {
nSetmCaseSensitive(value);
}
private native boolean nGetmCaseSensitive(); /*
return THIS->mCaseSensitive;
*/
private native void nSetmCaseSensitive(boolean value); /*
THIS->mCaseSensitive = value;
*/
private static final TextEditorLanguageDefinition _CPLUSPLUS_1 = new TextEditorLanguageDefinition(0);
public static TextEditorLanguageDefinition CPlusPlus() {
_CPLUSPLUS_1.ptr = nCPlusPlus();
return _CPLUSPLUS_1;
}
private static native long nCPlusPlus(); /*
return (uintptr_t)&TextEditorLanguageDefinition::CPlusPlus();
*/
private static final TextEditorLanguageDefinition _HLSL_1 = new TextEditorLanguageDefinition(0);
public static TextEditorLanguageDefinition HLSL() {
_HLSL_1.ptr = nHLSL();
return _HLSL_1;
}
private static native long nHLSL(); /*
return (uintptr_t)&TextEditorLanguageDefinition::HLSL();
*/
private static final TextEditorLanguageDefinition _GLSL_1 = new TextEditorLanguageDefinition(0);
public static TextEditorLanguageDefinition GLSL() {
_GLSL_1.ptr = nGLSL();
return _GLSL_1;
}
private static native long nGLSL(); /*
return (uintptr_t)&TextEditorLanguageDefinition::GLSL();
*/
private static final TextEditorLanguageDefinition _C_1 = new TextEditorLanguageDefinition(0);
public static TextEditorLanguageDefinition C() {
_C_1.ptr = nC();
return _C_1;
}
private static native long nC(); /*
return (uintptr_t)&TextEditorLanguageDefinition::C();
*/
private static final TextEditorLanguageDefinition _SQL_1 = new TextEditorLanguageDefinition(0);
public static TextEditorLanguageDefinition SQL() {
_SQL_1.ptr = nSQL();
return _SQL_1;
}
private static native long nSQL(); /*
return (uintptr_t)&TextEditorLanguageDefinition::SQL();
*/
private static final TextEditorLanguageDefinition _ANGELSCRIPT_1 = new TextEditorLanguageDefinition(0);
public static TextEditorLanguageDefinition AngelScript() {
_ANGELSCRIPT_1.ptr = nAngelScript();
return _ANGELSCRIPT_1;
}
private static native long nAngelScript(); /*
return (uintptr_t)&TextEditorLanguageDefinition::AngelScript();
*/
private static final TextEditorLanguageDefinition _LUA_1 = new TextEditorLanguageDefinition(0);
public static TextEditorLanguageDefinition Lua() {
_LUA_1.ptr = nLua();
return _LUA_1;
}
private static native long nLua(); /*
return (uintptr_t)&TextEditorLanguageDefinition::Lua();
*/
/*JNI
#undef TextEditorLanguageDefinition
#undef THIS
*/
}
@@ -1,51 +0,0 @@
package imgui.extension.texteditor.flag;
public final class TextEditorPaletteIndex {
private TextEditorPaletteIndex() {
}
public static final int Default = 0;
public static final int Keyword = 1;
public static final int Number = 2;
public static final int String = 3;
public static final int CharLiteral = 4;
public static final int Punctuation = 5;
public static final int Preprocessor = 6;
public static final int Identifier = 7;
public static final int KnownIdentifier = 8;
public static final int PreprocIdentifier = 9;
public static final int Comment = 10;
public static final int MultiLineComment = 11;
public static final int Background = 12;
public static final int Cursor = 13;
public static final int Selection = 14;
public static final int ErrorMarker = 15;
public static final int Breakpoint = 16;
public static final int LineNumber = 17;
public static final int CurrentLineFill = 18;
public static final int CurrentLineFillInactive = 19;
public static final int CurrentLineEdge = 20;
public static final int Max = 21;
}
@@ -1,13 +0,0 @@
package imgui.extension.texteditor.flag;
public final class TextEditorSelectionMode {
private TextEditorSelectionMode() {
}
public static final int Normal = 0;
public static final int Word = 1;
public static final int Line = 2;
}
@@ -18,7 +18,7 @@ public final class ImGuiCond {
public static final int None = 0;
/**
* No condition (always set the variable)
* No condition (always set the variable), same as _None
*
* <p>Definition: {@code 1 << 0}
*/
@@ -14,14 +14,14 @@ public final class ImGuiConfigFlags {
public static final int None = 0;
/**
* Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.AddKeyEvent() calls
* Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to activate.
*
* <p>Definition: {@code 1 << 0}
*/
public static final int NavEnableKeyboard = 1;
/**
* Master gamepad navigation enable flag. This is mostly to instruct your imgui backend to fill io.NavInputs[]. Backend also needs to set ImGuiBackendFlags_HasGamepad.
* Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
*
* <p>Definition: {@code 1 << 1}
*/
@@ -14,14 +14,14 @@ public final class ImGuiDragDropFlags {
public static final int None = 0;
/**
* By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior.
* Disable preview tooltip. By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disables this behavior.
*
* <p>Definition: {@code 1 << 0}
*/
public static final int SourceNoPreviewTooltip = 1;
/**
* By default, when dragging we clear data so that IsItemHovered() will return false, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item.
* By default, when dragging we clear data so that IsItemHovered() will return false, to avoid subsequent user code submitting tooltips. This flag disables this behavior so you can still call IsItemHovered() on the source item.
*
* <p>Definition: {@code 1 << 1}
*/
@@ -67,33 +67,87 @@ public final class ImGuiHoveredFlags {
public static final int AllowWhenBlockedByActiveItem = 128;
/**
* IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window
* IsItemHovered() only: Return true even if the item uses AllowOverlap mode and is overlapped by another hoverable item.
*
* <p>Definition: {@code 1 << 8}
*/
public static final int AllowWhenOverlapped = 256;
public static final int AllowWhenOverlappedByItem = 256;
/**
* IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window.
*
* <p>Definition: {@code 1 << 9}
*/
public static final int AllowWhenOverlappedByWindow = 512;
/**
* IsItemHovered() only: Return true even if the item is disabled
*
* <p>Definition: {@code 1 << 9}
*/
public static final int AllowWhenDisabled = 512;
/**
* Disable using gamepad/keyboard navigation state when active, always query mouse.
*
* <p>Definition: {@code 1 << 10}
*/
public static final int NoNavOverride = 1024;
public static final int AllowWhenDisabled = 1024;
/**
* IsItemHovered() only: Disable using gamepad/keyboard navigation state when active, always query mouse
*
* <p>Definition: {@code 1 << 11}
*/
public static final int NoNavOverride = 2048;
/**
* Definition: {@code ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow}
*/
public static final int AllowWhenOverlapped = 768;
/**
* Definition: {@code ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped}
*/
public static final int RectOnly = 416;
public static final int RectOnly = 928;
/**
* Definition: {@code ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows}
*/
public static final int RootAndChildWindows = 3;
/**
* Shortcut for standard flags when using IsItemHovered() + SetTooltip() sequence.
*
* <p>Definition: {@code 1 << 12}
*/
public static final int ForTooltip = 4096;
/**
* Require mouse to be stationary for style.HoverStationaryDelay (~0.15 sec) _at least one time_. After this, can move on same item/window. Using the stationary test tends to reduces the need for a long delay.
*
* <p>Definition: {@code 1 << 13}
*/
public static final int Stationary = 8192;
/**
* IsItemHovered() only: Return true immediately (default). As this is the default you generally ignore this.
*
* <p>Definition: {@code 1 << 14}
*/
public static final int DelayNone = 16384;
/**
* IsItemHovered() only: Return true after style.HoverDelayShort elapsed (~0.15 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
*
* <p>Definition: {@code 1 << 15}
*/
public static final int DelayShort = 32768;
/**
* IsItemHovered() only: Return true after style.HoverDelayNormal elapsed (~0.40 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
*
* <p>Definition: {@code 1 << 16}
*/
public static final int DelayNormal = 65536;
/**
* IsItemHovered() only: Disable shared delay system where moving from one item to the next keeps the previous timer for a short time (standard for tooltips with long delays)
*
* <p>Definition: {@code 1 << 17}
*/
public static final int NoSharedDelay = 131072;
}
@@ -154,9 +154,9 @@ public final class ImGuiInputTextFlags {
public static final int CallbackEdit = 524288;
/**
* [renamed in 1.82] name was not matching behavior
* Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
*
* <p>Definition: {@code ImGuiInputTextFlags_AlwaysOverwrite}
* <p>Definition: {@code 1 << 20}
*/
public static final int AlwaysInsertMode = 8192;
public static final int EscapeClearsAll = 1048576;
}
@@ -2,7 +2,11 @@ package imgui.flag;
/**
* User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
* A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.
* All our named keys are {@code >=} 512. Keys value 0 to 511 are left unused as legacy native/opaque key values ({@code <} 1.87).
* Since {@code >=} 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.
* Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921
* Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
*/
public final class ImGuiKey {
private ImGuiKey() {
@@ -264,185 +268,297 @@ public final class ImGuiKey {
public static final int KeypadEqual = 616;
/**
* Menu (Xbox) + (Switch) Start/Options (PS) // --
* Menu (Xbox) + (Switch) Start/Options (PS)
*/
public static final int GamepadStart = 617;
/**
* View (Xbox) - (Switch) Share (PS) // --
* View (Xbox) - (Switch) Share (PS)
*/
public static final int GamepadBack = 618;
/**
* Y (Xbox) X (Switch) Triangle (PS) // {@code ->} ImGuiNavInput_Input
* X (Xbox) Y (Switch) Square (PS) // Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows)
*/
public static final int GamepadFaceUp = 619;
public static final int GamepadFaceLeft = 619;
/**
* A (Xbox) B (Switch) Cross (PS) // {@code ->} ImGuiNavInput_Activate
* B (Xbox) A (Switch) Circle (PS) // Cancel / Close / Exit
*/
public static final int GamepadFaceDown = 620;
public static final int GamepadFaceRight = 620;
/**
* X (Xbox) Y (Switch) Square (PS) // {@code ->} ImGuiNavInput_Menu
* Y (Xbox) X (Switch) Triangle (PS) // Text Input / On-screen Keyboard
*/
public static final int GamepadFaceLeft = 621;
public static final int GamepadFaceUp = 621;
/**
* B (Xbox) A (Switch) Circle (PS) // {@code ->} ImGuiNavInput_Cancel
* A (Xbox) B (Switch) Cross (PS) // Activate / Open / Toggle / Tweak
*/
public static final int GamepadFaceRight = 622;
public static final int GamepadFaceDown = 622;
/**
* D-pad Up // {@code ->} ImGuiNavInput_DpadUp
* D-pad Left // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadUp = 623;
public static final int GamepadDpadLeft = 623;
/**
* D-pad Down // {@code ->} ImGuiNavInput_DpadDown
* D-pad Right // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadDown = 624;
public static final int GamepadDpadRight = 624;
/**
* D-pad Left // {@code ->} ImGuiNavInput_DpadLeft
* D-pad Up // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadLeft = 625;
public static final int GamepadDpadUp = 625;
/**
* D-pad Right // {@code ->} ImGuiNavInput_DpadRight
* D-pad Down // Move / Tweak / Resize Window (in Windowing mode)
*/
public static final int GamepadDpadRight = 626;
public static final int GamepadDpadDown = 626;
/**
* L Bumper (Xbox) L (Switch) L1 (PS) // {@code ->} ImGuiNavInput_FocusPrev + ImGuiNavInput_TweakSlow
* L Bumper (Xbox) L (Switch) L1 (PS) // Tweak Slower / Focus Previous (in Windowing mode)
*/
public static final int GamepadL1 = 627;
/**
* R Bumper (Xbox) R (Switch) R1 (PS) // {@code ->} ImGuiNavInput_FocusNext + ImGuiNavInput_TweakFast
* R Bumper (Xbox) R (Switch) R1 (PS) // Tweak Faster / Focus Next (in Windowing mode)
*/
public static final int GamepadR1 = 628;
/**
* L Trigger (Xbox) ZL (Switch) L2 (PS) [Analog]
* L Trig. (Xbox) ZL (Switch) L2 (PS) [Analog]
*/
public static final int GamepadL2 = 629;
/**
* R Trigger (Xbox) ZR (Switch) R2 (PS) [Analog]
* R Trig. (Xbox) ZR (Switch) R2 (PS) [Analog]
*/
public static final int GamepadR2 = 630;
/**
* L Thumbstick (Xbox) L3 (Switch) L3 (PS)
* L Stick (Xbox) L3 (Switch) L3 (PS)
*/
public static final int GamepadL3 = 631;
/**
* R Thumbstick (Xbox) R3 (Switch) R3 (PS)
* R Stick (Xbox) R3 (Switch) R3 (PS)
*/
public static final int GamepadR3 = 632;
/**
* [Analog] // {@code ->} ImGuiNavInput_LStickUp
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickUp = 633;
public static final int GamepadLStickLeft = 633;
/**
* [Analog] // {@code ->} ImGuiNavInput_LStickDown
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickDown = 634;
public static final int GamepadLStickRight = 634;
/**
* [Analog] // {@code ->} ImGuiNavInput_LStickLeft
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickLeft = 635;
public static final int GamepadLStickUp = 635;
/**
* [Analog] // {@code ->} ImGuiNavInput_LStickRight
* [Analog] // Move Window (in Windowing mode)
*/
public static final int GamepadLStickRight = 636;
public static final int GamepadLStickDown = 636;
/**
* [Analog]
*/
public static final int GamepadRStickUp = 637;
public static final int GamepadRStickLeft = 637;
/**
* [Analog]
*/
public static final int GamepadRStickDown = 638;
public static final int GamepadRStickRight = 638;
/**
* [Analog]
*/
public static final int GamepadRStickLeft = 639;
public static final int GamepadRStickUp = 639;
/**
* [Analog]
*/
public static final int GamepadRStickRight = 640;
public static final int GamepadRStickDown = 640;
/**
* 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 keys (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 ImGuiKey_ModCtrl). - 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...
* 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 ModCtrl = 641;
public static final int MouseLeft = 641;
/**
* 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 keys (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 ImGuiKey_ModCtrl). - 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...
* 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 ModShift = 642;
public static final int MouseRight = 642;
/**
* 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 keys (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 ImGuiKey_ModCtrl). - 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...
* 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 ModAlt = 643;
public static final int MouseMiddle = 643;
/**
* 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 keys (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 ImGuiKey_ModCtrl). - 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...
* 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 ModSuper = 644;
public static final int MouseX1 = 644;
/**
* No valid ImGuiKey is ever greater than this value
* 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 COUNT = 645;
public static final int MouseX2 = 645;
/**
* [Internal] Prior to 1.87 we required user to fill io.KeysDown[512] using their own native index + a io.KeyMap[] array. We are ditching this method but keeping a legacy path for user code doing e.g. IsKeyPressed(MY_NATIVE_KEY_CODE)
* 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;
/**
* 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;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModCtrl = 648;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModShift = 649;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModAlt = 650;
/**
* [Internal] Reserved for mod storage
*/
public static final int ReservedForModSuper = 651;
/**
* [Internal] Reserved for mod storage
*/
public static final int COUNT = 652;
/**
* 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...
*
* <p>Definition: {@code 0}
*/
public static final int ImGuiMod_None = 0;
/**
* Ctrl
*
* <p>Definition: {@code 1 << 12}
*/
public static final int ImGuiMod_Ctrl = 4096;
/**
* Shift
*
* <p>Definition: {@code 1 << 13}
*/
public static final int ImGuiMod_Shift = 8192;
/**
* Option/Menu
*
* <p>Definition: {@code 1 << 14}
*/
public static final int ImGuiMod_Alt = 16384;
/**
* Cmd/Super/Windows
*
* <p>Definition: {@code 1 << 15}
*/
public static final int ImGuiMod_Super = 32768;
/**
* Alias for Ctrl (non-macOS) _or_ Super (macOS).
*
* <p>Definition: {@code 1 << 11}
*/
public static final int ImGuiMod_Shortcut = 2048;
/**
* 5-bits
*
* <p>Definition: {@code 0xF800}
*/
public static final int ImGuiMod_Mask_ = 63488;
/**
* [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 512}
*/
public static final int NamedKey_BEGIN = 512;
/**
* [Internal] Prior to 1.87 we required user to fill io.KeysDown[512] using their own native index + a io.KeyMap[] array. We are ditching this method but keeping a legacy path for user code doing e.g. IsKeyPressed(MY_NATIVE_KEY_CODE)
* [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_COUNT}
*/
public static final int NamedKey_END = 645;
public static final int NamedKey_END = 652;
/**
* [Internal] Prior to 1.87 we required user to fill io.KeysDown[512] using their own native index + a io.KeyMap[] array. We are ditching this method but keeping a legacy path for user code doing e.g. IsKeyPressed(MY_NATIVE_KEY_CODE)
* [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 = 133;
public static final int NamedKey_COUNT = 140;
/**
* Size of KeysData[]: hold legacy 0..512 keycodes + named keys
*
* <p>Definition: {@code ImGuiKey_COUNT}
*/
public static final int KeysData_SIZE = 645;
public static final int KeysData_SIZE = 652;
/**
* First key stored in io.KeysData[0]. Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET).
* Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
*
* <p>Definition: {@code 0}
*/
public static final int KeysData_OFFSET = 0;
/**
* Renamed in 1.89
*
* <p>Definition: {@code ImGuiMod_Ctrl}
*/
public static final int ModCtrl = 4096;
/**
* Renamed in 1.89
*
* <p>Definition: {@code ImGuiMod_Shift}
*/
public static final int ModShift = 8192;
/**
* Renamed in 1.89
*
* <p>Definition: {@code ImGuiMod_Alt}
*/
public static final int ModAlt = 16384;
/**
* Renamed in 1.89
*
* <p>Definition: {@code ImGuiMod_Super}
*/
public static final int ModSuper = 32768;
/**
* Renamed in 1.87
*
@@ -1,39 +0,0 @@
package imgui.flag;
/**
* To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/backend)
*/
public final class ImGuiModFlags {
private ImGuiModFlags() {
}
/**
* Definition: {@code 0}
*/
public static final int None = 0;
/**
* Definition: {@code 1 << 0}
*/
public static final int Ctrl = 1;
/**
* Definition: {@code 1 << 1}
*/
public static final int Shift = 2;
/**
* Menu
*
* <p>Definition: {@code 1 << 2}
*/
public static final int Alt = 4;
/**
* Cmd/Super/Windows key
*
* <p>Definition: {@code 1 << 3}
*/
public static final int Super = 8;
}
@@ -30,7 +30,7 @@ public final class ImGuiMouseCursor {
public static final int ResizeAll = 2;
/**
* When hovering over an horizontal border
* When hovering over a horizontal border
*/
public static final int ResizeNS = 3;
@@ -0,0 +1,32 @@
package imgui.flag;
/**
* Enumeration for AddMouseSourceEvent() actual source of Mouse Input data.
* Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent()
* But that "Mouse" data can come from different source which occasionally may be useful for application to know about.
* You can submit a change of pointer type using io.AddMouseSourceEvent().
*/
public final class ImGuiMouseSource {
private ImGuiMouseSource() {
}
/**
* Input is coming from an actual mouse.
*
* <p>Definition: {@code 0}
*/
public static final int Mouse = 0;
/**
* Input is coming from a touch screen (no hovering prior to initial press, less precise initial press aiming, dual-axis wheeling possible).
*/
public static final int TouchScreen = 1;
/**
* Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates).
*/
public static final int Pen = 2;
public static final int COUNT = 3;
}
@@ -1,101 +0,0 @@
package imgui.flag;
/**
* Gamepad/Keyboard directional navigation
* Since {@code >=1.87} backends you generally don't need to care about this enum since io.NavInputs[] is setup automatically. This might become private/internal some day.
* Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable.
* NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
* Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
* Backend: set ImGuiBackendFlags_HasGamepad and fill the io.NavInputs[] fields before calling NewFrame().
* Note that io.NavInputs[] is cleared by EndFrame().
* Read instructions in imgui.cpp for more details. Download PNG/PSD at http://dearimgui.org/controls_sheets.
*/
public final class ImGuiNavInput {
private ImGuiNavInput() {
}
/**
* Activate / Open / Toggle / Tweak value // e.g. Cross (PS4), A (Xbox), A (Switch), Space (Keyboard)
*/
public static final int Activate = 0;
/**
* Cancel / Close / Exit // e.g. Circle (PS4), B (Xbox), B (Switch), Escape (Keyboard)
*/
public static final int Cancel = 1;
/**
* Text input / On-Screen keyboard // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)
*/
public static final int Input = 2;
/**
* Tap: Toggle menu / Hold: Focus, Move, Resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)
*/
public static final int Menu = 3;
/**
* Move / Tweak / Resize window (w/ PadMenu) // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard)
*/
public static final int DpadLeft = 4;
public static final int DpadRight = 5;
public static final int DpadUp = 6;
public static final int DpadDown = 7;
/**
* Scroll / Move window (w/ PadMenu) // e.g. Left Analog Stick Left/Right/Up/Down
*/
public static final int LStickLeft = 8;
public static final int LStickRight = 9;
public static final int LStickUp = 10;
public static final int LStickDown = 11;
/**
* Focus Next window (w/ PadMenu) // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
*/
public static final int FocusPrev = 12;
/**
* Focus Prev window (w/ PadMenu) // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
*/
public static final int FocusNext = 13;
/**
* Slower tweaks // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
*/
public static final int TweakSlow = 14;
/**
* Faster tweaks // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
*/
public static final int TweakFast = 15;
/**
* Move left // = Arrow keys
*/
public static final int KeyLeft_ = 16;
/**
* Move right
*/
public static final int KeyRight_ = 17;
/**
* Move up
*/
public static final int KeyUp_ = 18;
/**
* Move down
*/
public static final int KeyDown_ = 19;
public static final int COUNT = 20;
}
@@ -14,7 +14,7 @@ public final class ImGuiSelectableFlags {
public static final int None = 0;
/**
* Clicking this don't close parent popup window
* Clicking this doesn't close parent popup window
*
* <p>Definition: {@code 1 << 0}
*/
@@ -46,5 +46,12 @@ public final class ImGuiSelectableFlags {
*
* <p>Definition: {@code 1 << 4}
*/
public static final int AllowOverlap = 16;
/**
* Renamed in 1.89.7
*
* <p>Definition: {@code ImGuiSelectableFlags_AllowOverlap}
*/
public static final int AllowItemOverlap = 16;
}
@@ -44,11 +44,4 @@ public final class ImGuiSliderFlags {
* <p>Definition: {@code 0x7000000F}
*/
public static final int InvalidMask_ = 1879048207;
/**
* [renamed in 1.79]
*
* <p>Definition: {@code ImGuiSliderFlags_AlwaysClamp}
*/
public static final int ClampOnInput = 16;
}
@@ -139,5 +139,25 @@ public final class ImGuiStyleVar {
*/
public static final int SelectableTextAlign = 24;
public static final int COUNT = 25;
/**
* float SeparatorTextBorderSize
*/
public static final int SeparatorTextBorderSize = 25;
/**
* ImVec2 SeparatorTextAlign
*/
public static final int SeparatorTextAlign = 26;
/**
* ImVec2 SeparatorTextPadding
*/
public static final int SeparatorTextPadding = 27;
/**
* float DockingSeparatorSize
*/
public static final int DockingSeparatorSize = 28;
public static final int COUNT = 29;
}
@@ -150,14 +150,14 @@ public final class ImGuiTableFlags {
public static final int Borders = 1920;
/**
* [ALPHA] Disable vertical borders in columns Body (borders will always appears in Headers). {@code ->} May move to style
* [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). {@code ->} May move to style
*
* <p>Definition: {@code 1 << 11}
*/
public static final int NoBordersInBody = 2048;
/**
* [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers). {@code ->} May move to style
* [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). {@code ->} May move to style
*
* <p>Definition: {@code 1 << 12}
*/
@@ -227,14 +227,14 @@ public final class ImGuiTableFlags {
public static final int NoClip = 1048576;
/**
* Default if BordersOuterV is on. Enable outer-most padding. Generally desirable if you have headers.
* Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.
*
* <p>Definition: {@code 1 << 21}
*/
public static final int PadOuterX = 2097152;
/**
* Default if BordersOuterV is off. Disable outer-most padding.
* Default if BordersOuterV is off. Disable outermost padding.
*
* <p>Definition: {@code 1 << 22}
*/
@@ -248,7 +248,7 @@ public final class ImGuiTableFlags {
public static final int NoPadInnerX = 8388608;
/**
* Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this create a child window, ScrollY is currently generally recommended when using ScrollX.
* Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.
*
* <p>Definition: {@code 1 << 24}
*/
@@ -32,7 +32,7 @@ public final class ImGuiTreeNodeFlags {
*
* <p>Definition: {@code 1 << 2}
*/
public static final int AllowItemOverlap = 4;
public static final int AllowOverlap = 4;
/**
* Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
@@ -77,7 +77,7 @@ public final class ImGuiTreeNodeFlags {
public static final int Leaf = 256;
/**
* Display a bullet instead of arrow
* Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the _Leaf flag!
*
* <p>Definition: {@code 1 << 9}
*/
@@ -117,4 +117,11 @@ public final class ImGuiTreeNodeFlags {
* <p>Definition: {@code ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog}
*/
public static final int CollapsingHeader = 26;
/**
* Renamed in 1.89.7
*
* <p>Definition: {@code ImGuiTreeNodeFlags_AllowOverlap}
*/
public static final int AllowItemOverlap = 4;
}
@@ -28,7 +28,7 @@ public final class ImGuiViewportFlags {
public static final int IsPlatformMonitor = 2;
/**
* Platform Window: is created/managed by the application (rather than a dear imgui backend)
* Platform Window: Was created/managed by the user application? (rather than our backend)
*
* <p>Definition: {@code 1 << 2}
*/
@@ -77,30 +77,37 @@ public final class ImGuiViewportFlags {
public static final int NoRendererClear = 256;
/**
* Platform Window: Display on top (for tooltips only).
* Platform Window: Avoid merging this window into another host window. This can only be set via ImGuiWindowClass viewport flags override (because we need to now ahead if we are going to create a viewport in the first place!).
*
* <p>Definition: {@code 1 << 9}
*/
public static final int TopMost = 512;
public static final int NoAutoMerge = 512;
/**
* Platform Window: Display on top (for tooltips only).
*
* <p>Definition: {@code 1 << 10}
*/
public static final int TopMost = 1024;
/**
* Viewport can host multiple imgui windows (secondary viewports are associated to a single window). // FIXME: In practice there's still probably code making the assumption that this is always and only on the MainViewport. Will fix once we add support for "no main viewport".
*
* <p>Definition: {@code 1 << 11}
*/
public static final int CanHostOtherWindows = 2048;
/**
* Platform Window: Window is minimized, can skip render. When minimized we tend to avoid using the viewport pos/size for clipping window or testing if they are contained in the viewport.
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Minimized = 1024;
/**
* Platform Window: Avoid merging this window into another host window. This can only be set via ImGuiWindowClass viewport flags override (because we need to now ahead if we are going to create a viewport in the first place!).
*
* <p>Definition: {@code 1 << 11}
*/
public static final int NoAutoMerge = 2048;
/**
* Main viewport: can host multiple imgui windows (secondary viewports are associated to a single window).
*
* <p>Definition: {@code 1 << 12}
*/
public static final int CanHostOtherWindows = 4096;
public static final int IsMinimized = 4096;
/**
* Platform Window: Window is focused (last call to Platform_GetWindowFocus() returned true)
*
* <p>Definition: {@code 1 << 13}
*/
public static final int IsFocused = 8192;
}
@@ -275,16 +275,24 @@ public final class ImGui extends imgui.ImGui {
nFocusWindow(window.ptr);
}
public static void focusWindow(final ImGuiWindow window, final int flags) {
nFocusWindow(window.ptr, flags);
}
private static native void nFocusWindow(long window); /*
ImGui::FocusWindow(reinterpret_cast<ImGuiWindow*>(window));
*/
public static void focusTopMostWindowUnderOne(final ImGuiWindow underThisWindow, final ImGuiWindow ignoreWindow) {
nFocusTopMostWindowUnderOne(underThisWindow.ptr, ignoreWindow.ptr);
private static native void nFocusWindow(long window, int flags); /*
ImGui::FocusWindow(reinterpret_cast<ImGuiWindow*>(window), static_cast<ImGuiFocusRequestFlags>(flags));
*/
public static void focusTopMostWindowUnderOne(final ImGuiWindow underThisWindow, final ImGuiWindow ignoreWindow, final ImGuiViewport filterViewport, final int flags) {
nFocusTopMostWindowUnderOne(underThisWindow.ptr, ignoreWindow.ptr, filterViewport.ptr, flags);
}
private static native void nFocusTopMostWindowUnderOne(long underThisWindow, long ignoreWindow); /*
ImGui::FocusTopMostWindowUnderOne(reinterpret_cast<ImGuiWindow*>(underThisWindow), reinterpret_cast<ImGuiWindow*>(ignoreWindow));
private static native void nFocusTopMostWindowUnderOne(long underThisWindow, long ignoreWindow, long filterViewport, int flags); /*
ImGui::FocusTopMostWindowUnderOne(reinterpret_cast<ImGuiWindow*>(underThisWindow), reinterpret_cast<ImGuiWindow*>(ignoreWindow), reinterpret_cast<ImGuiViewport*>(filterViewport), static_cast<ImGuiFocusRequestFlags>(flags));
*/
public static void bringWindowToFocusFront(final ImGuiWindow window) {
@@ -614,14 +622,6 @@ public final class ImGui extends imgui.ImGui {
// Basic Accessors
public static int getItemID() {
return nGetItemID();
}
private static native int nGetItemID(); /*
return ImGui::GetItemID();
*/
public static int getItemStatusFlags() {
return nGetItemStatusFlags();
}
@@ -785,16 +785,24 @@ public final class ImGui extends imgui.ImGui {
// TODO: ItemAdd
public static boolean itemHoverable(final ImRect bb, final int id) {
return nItemHoverable(bb.min.x, bb.min.y, bb.max.x, bb.max.y, id);
public static boolean itemHoverable(final ImRect bb, final int id, final int itemFlags) {
return nItemHoverable(bb.min.x, bb.min.y, bb.max.x, bb.max.y, id, itemFlags);
}
public static boolean itemHoverable(final float bbMinX, final float bbMinY, final float bbMaxX, final float bbMaxY, final int id) {
return nItemHoverable(bbMinX, bbMinY, bbMaxX, bbMaxY, id);
public static boolean itemHoverable(final float bbMinX, final float bbMinY, final float bbMaxX, final float bbMaxY, final int id, final int itemFlags) {
return nItemHoverable(bbMinX, bbMinY, bbMaxX, bbMaxY, id, itemFlags);
}
private static native boolean nItemHoverable(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id); /*
return ImGui::ItemHoverable(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), id);
private static native boolean nItemHoverable(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int itemFlags); /*
return ImGui::ItemHoverable(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), id, static_cast<ImGuiItemFlags>(itemFlags));
*/
public static boolean isWindowContentHoverable(final ImGuiWindow window, final int flags) {
return nIsWindowContentHoverable(window.ptr, flags);
}
private static native boolean nIsWindowContentHoverable(long window, int flags); /*
return ImGui::IsWindowContentHoverable(reinterpret_cast<ImGuiWindow*>(window), static_cast<ImGuiHoveredFlags>(flags));
*/
public static boolean isClippedEx(final ImRect bb, final int id) {
@@ -1119,8 +1127,8 @@ public final class ImGui extends imgui.ImGui {
nTextEx(beginText, endText);
}
public static void textEx(final String beginText, final String endText, final int imGuiTextFlags) {
nTextEx(beginText, endText, imGuiTextFlags);
public static void textEx(final String beginText, final String endText, final int flags) {
nTextEx(beginText, endText, flags);
}
private static native void nTextEx(String beginText); /*MANUAL
@@ -1137,10 +1145,10 @@ public final class ImGui extends imgui.ImGui {
if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText);
*/
private static native void nTextEx(String beginText, String endText, int imGuiTextFlags); /*MANUAL
private static native void nTextEx(String beginText, String endText, int flags); /*MANUAL
auto beginText = obj_beginText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_beginText, JNI_FALSE);
auto endText = obj_endText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_endText, JNI_FALSE);
ImGui::TextEx(beginText, endText, static_cast<ImGuiTextFlags_>(imGuiTextFlags));
ImGui::TextEx(beginText, endText, static_cast<ImGuiTextFlags>(flags));
if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText);
if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText);
*/
@@ -1157,16 +1165,16 @@ public final class ImGui extends imgui.ImGui {
return nButtonEx(label, sizeX, sizeY);
}
public static boolean buttonEx(final String label, final ImVec2 size, final int imGuiButtonFlags) {
return nButtonEx(label, size.x, size.y, imGuiButtonFlags);
public static boolean buttonEx(final String label, final ImVec2 size, final int flags) {
return nButtonEx(label, size.x, size.y, flags);
}
public static boolean buttonEx(final String label, final float sizeX, final float sizeY, final int imGuiButtonFlags) {
return nButtonEx(label, sizeX, sizeY, imGuiButtonFlags);
public static boolean buttonEx(final String label, final float sizeX, final float sizeY, final int flags) {
return nButtonEx(label, sizeX, sizeY, flags);
}
public static boolean buttonEx(final String label, final int imGuiButtonFlags) {
return nButtonEx(label, imGuiButtonFlags);
public static boolean buttonEx(final String label, final int flags) {
return nButtonEx(label, flags);
}
private static native boolean nButtonEx(String obj_label); /*MANUAL
@@ -1184,21 +1192,101 @@ public final class ImGui extends imgui.ImGui {
return _result;
*/
private static native boolean nButtonEx(String obj_label, float sizeX, float sizeY, int imGuiButtonFlags); /*MANUAL
private static native boolean nButtonEx(String obj_label, float sizeX, float sizeY, int flags); /*MANUAL
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
auto _result = ImGui::ButtonEx(label, size, static_cast<ImGuiButtonFlags>(imGuiButtonFlags));
auto _result = ImGui::ButtonEx(label, size, static_cast<ImGuiButtonFlags>(flags));
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
return _result;
*/
private static native boolean nButtonEx(String obj_label, int imGuiButtonFlags); /*MANUAL
private static native boolean nButtonEx(String obj_label, int flags); /*MANUAL
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
auto _result = ImGui::ButtonEx(label, ImVec2(0,0), static_cast<ImGuiButtonFlags>(imGuiButtonFlags));
auto _result = ImGui::ButtonEx(label, ImVec2(0,0), static_cast<ImGuiButtonFlags>(flags));
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
return _result;
*/
public static boolean arrowButtonEx(final String strId, final int dir, final ImVec2 size) {
return nArrowButtonEx(strId, dir, size.x, size.y);
}
public static boolean arrowButtonEx(final String strId, final int dir, final float sizeX, final float sizeY) {
return nArrowButtonEx(strId, dir, sizeX, sizeY);
}
public static boolean arrowButtonEx(final String strId, final int dir, final ImVec2 size, final int flags) {
return nArrowButtonEx(strId, dir, size.x, size.y, flags);
}
public static boolean arrowButtonEx(final String strId, final int dir, final float sizeX, final float sizeY, final int flags) {
return nArrowButtonEx(strId, dir, sizeX, sizeY, flags);
}
private static native boolean nArrowButtonEx(String obj_strId, int dir, float sizeX, float sizeY); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(dir), size);
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
private static native boolean nArrowButtonEx(String obj_strId, int dir, float sizeX, float sizeY, int flags); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(dir), size, static_cast<ImGuiButtonFlags>(flags));
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
public static boolean imageButtonEx(final int id, final long textureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 bgCol, final ImVec4 tintCol, final int flags) {
return nImageButtonEx(id, textureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w, flags);
}
public static boolean imageButtonEx(final int id, final long textureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW, final int flags) {
return nImageButtonEx(id, textureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW, flags);
}
private static native boolean nImageButtonEx(int id, long textureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW, int flags); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
auto _result = ImGui::ImageButtonEx((ImGuiID)id, (ImTextureID)(uintptr_t)textureId, size, uv0, uv1, bgCol, tintCol, static_cast<ImGuiButtonFlags>(flags));
return _result;
*/
public static void separatorEx(final int flags) {
nSeparatorEx(flags);
}
public static void separatorEx(final int flags, final float thickness) {
nSeparatorEx(flags, thickness);
}
private static native void nSeparatorEx(int flags); /*
ImGui::SeparatorEx(static_cast<ImGuiSeparatorFlags>(flags));
*/
private static native void nSeparatorEx(int flags, float thickness); /*
ImGui::SeparatorEx(static_cast<ImGuiSeparatorFlags>(flags), thickness);
*/
public static void separatorTextEx(final int id, final String label, final String labelEnd, final float extraWidth) {
nSeparatorTextEx(id, label, labelEnd, extraWidth);
}
private static native void nSeparatorTextEx(int id, String label, String labelEnd, float extraWidth); /*MANUAL
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
auto labelEnd = obj_labelEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_labelEnd, JNI_FALSE);
ImGui::SeparatorTextEx((ImGuiID)id, label, labelEnd, extraWidth);
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
if (labelEnd != NULL) env->ReleaseStringUTFChars(obj_labelEnd, labelEnd);
*/
// Widgets: Window Decorations
public static boolean closeButton(final int id, final ImVec2 pos) {
return nCloseButton(id, pos.x, pos.y);
}
@@ -1213,35 +1301,17 @@ public final class ImGui extends imgui.ImGui {
return _result;
*/
public static boolean arrowButtonEx(final String strId, final int imGuiDir, final ImVec2 size) {
return nArrowButtonEx(strId, imGuiDir, size.x, size.y);
public static boolean collapseButton(final int id, final ImVec2 pos, final ImGuiDockNode dockNode) {
return nCollapseButton(id, pos.x, pos.y, dockNode.ptr);
}
public static boolean arrowButtonEx(final String strId, final int imGuiDir, final float sizeX, final float sizeY) {
return nArrowButtonEx(strId, imGuiDir, sizeX, sizeY);
public static boolean collapseButton(final int id, final float posX, final float posY, final ImGuiDockNode dockNode) {
return nCollapseButton(id, posX, posY, dockNode.ptr);
}
public static boolean arrowButtonEx(final String strId, final int imGuiDir, final ImVec2 size, final int imGuiButtonFlags) {
return nArrowButtonEx(strId, imGuiDir, size.x, size.y, imGuiButtonFlags);
}
public static boolean arrowButtonEx(final String strId, final int imGuiDir, final float sizeX, final float sizeY, final int imGuiButtonFlags) {
return nArrowButtonEx(strId, imGuiDir, sizeX, sizeY, imGuiButtonFlags);
}
private static native boolean nArrowButtonEx(String obj_strId, int imGuiDir, float sizeX, float sizeY); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(imGuiDir), size);
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
return _result;
*/
private static native boolean nArrowButtonEx(String obj_strId, int imGuiDir, float sizeX, float sizeY, int imGuiButtonFlags); /*MANUAL
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
ImVec2 size = ImVec2(sizeX, sizeY);
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(imGuiDir), size, static_cast<ImGuiButtonFlags>(imGuiButtonFlags));
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
private static native boolean nCollapseButton(int id, float posX, float posY, long dockNode); /*MANUAL
ImVec2 pos = ImVec2(posX, posY);
auto _result = ImGui::CollapseButton((ImGuiID)id, pos, reinterpret_cast<ImGuiDockNode*>(dockNode));
return _result;
*/
@@ -1253,33 +1323,6 @@ public final class ImGui extends imgui.ImGui {
ImGui::Scrollbar(static_cast<ImGuiAxis>(axis));
*/
public static boolean imageButtonEx(final int id, final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec2 padding, final ImVec4 bgCol, final ImVec4 tintCol) {
return nImageButtonEx(id, userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, padding.x, padding.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w);
}
public static boolean imageButtonEx(final int id, final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float paddingX, final float paddingY, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) {
return nImageButtonEx(id, userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, paddingX, paddingY, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW);
}
private static native boolean nImageButtonEx(int id, long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float paddingX, float paddingY, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL
ImVec2 size = ImVec2(sizeX, sizeY);
ImVec2 uv0 = ImVec2(uv0X, uv0Y);
ImVec2 uv1 = ImVec2(uv1X, uv1Y);
ImVec2 padding = ImVec2(paddingX, paddingY);
ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW);
ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW);
auto _result = ImGui::ImageButtonEx((ImGuiID)id, (ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, padding, bgCol, tintCol);
return _result;
*/
public static void separatorEx(final int imGuiSeparatorFlags) {
nSeparatorEx(imGuiSeparatorFlags);
}
private static native void nSeparatorEx(int imGuiSeparatorFlags); /*
ImGui::SeparatorEx(static_cast<ImGuiSeparatorFlags_>(imGuiSeparatorFlags));
*/
public static ImRect getWindowScrollbarRect(final ImGuiWindow imGuiWindow, final int axis) {
final ImRect dst = new ImRect();
nGetWindowScrollbarRect(dst, imGuiWindow.ptr, axis);
@@ -102,11 +102,11 @@ public final class ImGuiButtonFlags {
public static final int FlattenChildren = 2048;
/**
* require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap()
* require previous frame HoveredId to either match id or be null before being usable.
*
* <p>Definition: {@code 1 << 12}
*/
public static final int AllowItemOverlap = 4096;
public static final int AllowOverlap = 4096;
/**
* disable automatically closing parent popup on press // [UNUSED]
@@ -137,7 +137,7 @@ public final class ImGuiButtonFlags {
public static final int NoHoldingActiveId = 131072;
/**
* don't override navigation focus when activated
* 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)
*
* <p>Definition: {@code 1 << 18}
*/
@@ -150,6 +150,20 @@ public final class ImGuiButtonFlags {
*/
public static final int NoHoveredOnFocus = 524288;
/**
* don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
*
* <p>Definition: {@code 1 << 20}
*/
public static final int NoSetKeyOwner = 1048576;
/**
* don't test key/input owner when polling the key (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
*
* <p>Definition: {@code 1 << 21}
*/
public static final int NoTestKeyOwner = 2097152;
/**
* Definition: {@code ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold}
*/
@@ -0,0 +1,26 @@
package imgui.internal.flag;
public final class ImGuiFocusRequestFlags {
private ImGuiFocusRequestFlags() {
}
/**
* Definition: {@code 0}
*/
public static final int None = 0;
/**
* Find last focused child (if any) and focus it instead.
*
* <p>Definition: {@code 1 << 0}
*/
public static final int RestoreFocusedChild = 1;
/**
* Do not set focus if the window is below a modal.
*
* <p>Definition: {@code 1 << 1}
*/
public static final int UnlessBelowModal = 2;
}
@@ -10,12 +10,14 @@ public final class ImGuiItemFlags {
}
/**
* Definition: {@code 0}
* Controlled by user
*
* <p>Definition: {@code 0}
*/
public static final int None = 0;
/**
* false // Disable keyboard tabbing (FIXME: should merge with _NoNav)
* false // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav.
*
* <p>Definition: {@code 1 << 0}
*/
@@ -36,7 +38,7 @@ public final class ImGuiItemFlags {
public static final int Disabled = 4;
/**
* false // Disable keyboard/gamepad directional navigation (FIXME: should merge with _NoTabStop)
* false // Disable any form of focusing (keyboard/gamepad directional navigation and SetKeyboardFocusHere() calls)
*
* <p>Definition: {@code 1 << 3}
*/
@@ -71,9 +73,23 @@ public final class ImGuiItemFlags {
public static final int ReadOnly = 128;
/**
* false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
* false // Disable hoverable check in ItemHoverable()
*
* <p>Definition: {@code 1 << 8}
*/
public static final int Inputable = 256;
public static final int NoWindowHoverableCheck = 256;
/**
* false // Allow being overlapped by another widget. Not-hovered to Hovered transition deferred by a frame.
*
* <p>Definition: {@code 1 << 9}
*/
public static final int AllowOverlap = 512;
/**
* false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
*
* <p>Definition: {@code 1 << 10}
*/
public static final int Inputable = 1024;
}
@@ -72,4 +72,11 @@ public class ImGuiItemStatusFlags {
* <p>Definition: {@code 1 << 8}
*/
public static final int FocusedByTabbing = 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()).
*
* <p>Definition: {@code 1 << 9}
*/
public static final int Visible = 512;
}
@@ -21,7 +21,9 @@ public class ImGuiSeparatorFlags {
public static final int Vertical = 2;
/**
* Definition: {@code 1 << 2}
* Make separator cover all columns of a legacy Columns() set.
*
* <p>Definition: {@code 1 << 2}
*/
public static final int SpanAllColumns = 4;
}
@@ -199,6 +199,15 @@ public final class ImDrawData extends ImGuiStruct {
// Functions
@BindingMethod
public native void Clear();
/**
* Helper to add an external draw list into an existing ImDrawData.
*/
@BindingMethod
public native void AddDrawList(ImDrawList drawList);
/**
* Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources.
* Always prefer indexed rendering!
@@ -74,11 +74,14 @@ public final class ImFont extends ImGuiStructDestroyable {
@BindingField
public short EllipsisChar;
/**
* Character used for ellipsis rendering (if a single '...' character isn't found)
*/
@BindingField
public short DotChar;
public short EllipsisCharCount;
@BindingField
public float EllipsisWidth;
@BindingField
public float EllipsisCharStep;
@BindingField
public boolean DirtyLookupTables;
@@ -271,6 +271,13 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
RETURN_GLYPH_2_SHORT(THIS->GetGlyphRangesDefault());
*/
/**
* Default + Greek and Coptic
*/
public native short[] getGlyphRangesGreek(); /*
RETURN_GLYPH_2_SHORT(THIS->GetGlyphRangesGreek());
*/
/**
* Default + Korean characters
*/
+114 -57
View File
@@ -276,7 +276,7 @@ public class ImGui {
public static native void ShowFontSelector(String label);
/**
* Add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).
* Add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls).
*/
@BindingMethod
public static native void ShowUserGuide();
@@ -381,13 +381,14 @@ public class ImGui {
public static native float GetWindowDpiScale();
/**
* Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
* Get current window position in screen space (note: it is unlikely you need to use this.
* Consider using current layout pos instead, GetScreenCursorPos())
*/
@BindingMethod
public static native ImVec2 GetWindowPos();
/**
* Get current window size
* Get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
*/
@BindingMethod
public static native ImVec2 GetWindowSize();
@@ -449,6 +450,12 @@ public class ImGui {
@BindingMethod
public static native void SetNextWindowFocus();
/**
* Set next window scrolling value (use {@code < 0.0f} to not affect a given axis).
*/
@BindingMethod
public static native void SetNextWindowScroll(ImVec2 scroll);
/**
* Set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg.
* You may also use ImGuiWindowFlags_NoBackground.
@@ -542,12 +549,14 @@ public class ImGui {
public static native ImVec2 GetWindowContentRegionMin();
/**
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
*/
@BindingMethod
public static native ImVec2 GetWindowContentRegionMax();
// Windows Scrolling
// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/**
* Get scrolling amount [0 .. GetScrollMaxX()]
@@ -657,13 +666,13 @@ public class ImGui {
public static native void PopStyleVar(@OptArg int count);
/**
* Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
* Tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
*/
@BindingMethod
public static native void PushAllowKeyboardFocus(boolean allowKeyboardFocus);
public static native void PushTabStop(boolean tabStop);
@BindingMethod
public static native void PopAllowKeyboardFocus();
public static native void PopTabStop();
/**
* In 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting).
@@ -711,6 +720,7 @@ public class ImGui {
public static native void PopTextWrapPos();
// Style read access
// - Use the ShowStyleEditor() function to interactively see/edit the colors.
/**
* Get current font.
@@ -777,7 +787,7 @@ public class ImGui {
public static native void SameLine(@OptArg float offsetFromStartX, @OptArg float spacing);
/**
* Undo a SameLine() or force a new line when in an horizontal-layout context.
* Undo a SameLine() or force a new line when in a horizontal-layout context.
*/
@BindingMethod
public static native void NewLine();
@@ -898,12 +908,16 @@ public class ImGui {
public static native float GetFrameHeightWithSpacing();
// ID stack/scopes
// - Read the FAQ for more details about how ID are handled in dear imgui. If you are creating widgets in a loop you most
// likely want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// - The resulting ID are hashes of the entire stack.
// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
// - Those questions are answered and impacted by understanding of the ID stack system:
// - "Q: Why is my widget not reacting when I click on it?"
// - "Q: How can I have widgets with an empty label?"
// - "Q: How can I have multiple widgets with the same label?"
// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed and used as an ID,
// whereas "strId" denote a string that is only used as an ID and not normally displayed.
// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/**
* Push string into the ID stack (will hash string).
@@ -1015,6 +1029,12 @@ public class ImGui {
@BindingMethod
public static native void BulletText(String text, Void NULL);
/**
* Currently: formatted text with an horizontal line
*/
@BindingMethod
public static native void SeparatorText(String label);
// Widgets: Main
// - Most widgets return true when the value has been changed or when pressed/selected
// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
@@ -1043,15 +1063,6 @@ public class ImGui {
@BindingMethod
public static native boolean ArrowButton(String strId, int dir);
@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);
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
@BindingMethod
public static native boolean ImageButton(@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg(callValue = "-1") int framePadding, @OptArg ImVec4 bgCol, @OptArg ImVec4 tintCol);
public static boolean checkbox(String label, boolean active) {
return nCheckbox(label, active);
}
@@ -1088,7 +1099,17 @@ public class ImGui {
@BindingMethod
public static native void Bullet();
// Widgets: Combo Box
// Widgets: Images
// - 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);
@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);
// Widgets: Combo Box (Dropdown)
// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose.
@@ -1112,7 +1133,7 @@ public class ImGui {
// Widgets: Drag Sliders
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
// - Speed are per-pixel of mouse movement (vSpeed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(vSpeed, minimum_step_at_given_precision).
@@ -1120,7 +1141,7 @@ public class ImGui {
// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
// - Use vMin > vMax to lock edits.
// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/**
@@ -1193,7 +1214,7 @@ public class ImGui {
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/**
@@ -1637,7 +1658,7 @@ public class ImGui {
* ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
*/
@BindingMethod
public static native void TreePush(@OptArg @ArgValue(callPrefix = "(void*)") long ptrId);
public static native void TreePush(@ArgValue(callPrefix = "(void*)") long ptrId);
/**
* ~ Unindent()+PopId()
@@ -1684,8 +1705,8 @@ public class ImGui {
// - 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.
// - 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.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
// - 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
/**
* Open a framed scrolling region.
@@ -1786,23 +1807,44 @@ public class ImGui {
public static native boolean MenuItem(String label, String shortcut, ImBoolean pSelected, @OptArg boolean enabled);
// Tooltips
// - Tooltip are windows following the mouse. They do not take focus away.
// - 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.
/**
* Begin/append a tooltip window. to create full-featured tooltip (with any kind of items).
* Begin/append a tooltip window.
*/
@BindingMethod
public static native void BeginTooltip();
/**
* Only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!
*/
@BindingMethod
public static native void EndTooltip();
/**
* Set a text-only tooltip, typically use with ImGui::IsItemHovered(). override any previous call to SetTooltip().
* Set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to SetTooltip().
*/
@BindingMethod
public static native void SetTooltip(String text, Void NULL);
// Tooltips: helpers for showing a tooltip when hovering an item
// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip) && BeginTooltip())' idiom.
// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip)) { SetTooltip(...); }' idiom.
// - Where 'ImGuiHoveredFlags_Tooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
/**
* Begin/append a tooltip window if preceding item was hovered.
*/
@BindingMethod
public static native boolean BeginItemTooltip();
/**
* Set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
*/
@BindingMethod
public static native void SetItemTooltip(String text, Void NULL);
// Popups, Modals
// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
@@ -1813,7 +1855,7 @@ public class ImGui {
// 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.
// - BeginPopupModal(): block every interactions behind the window, cannot be closed by user, add a dimming background, has a title bar.
// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/**
* Return true if the popup is open, and you can start outputting to it.
@@ -1911,7 +1953,7 @@ public class ImGui {
// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
// - 5. Populate contents:
// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
// - If you are using tables as a sort of grid, where every columns is holding the same type of contents,
// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
// TableNextColumn() will automatically wrap-around into the next row if needed.
// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
@@ -2088,7 +2130,7 @@ public class ImGui {
public static native int GetColumnsCount();
// Tab Bars, Tabs
// Note: Tabs are automatically created by the docking system. Use this to create tab bars/tabs yourself without docking being involved.
// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/**
* Create and append into a TabBar
@@ -2130,11 +2172,16 @@ 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!
// - To dock windows: if io.ConfigDockingWithShift == false (default) drag window from their title bar.
// - To dock windows: if io.ConfigDockingWithShift == true: hold SHIFT anywhere while moving windows.
// About DockSpace:
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking/undocking.
// - 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.
// About dockspaces:
// - Use DockSpaceOverViewport() to create an explicit dock node covering the screen or a specific viewport.
// 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.
// - DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app.
// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
// 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);
@@ -2410,6 +2457,16 @@ public class ImGui {
@BindingMethod
public static native void SetKeyboardFocusHere(@OptArg int offset);
// Overlapping mode
/**
* Allow next item to be overlapped by a subsequent item.
* Useful with invisible buttons, selectable, treenode covering an area where subsequent items may need to be added.
* Note that both Selectable() and TreeNode() have dedicated flags doing this.
*/
@BindingMethod
public static native void SetNextItemAllowOverlap();
// Item/Widgets Utilities
// - Most of the functions are referring to the last/previous item we submitted.
// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions.
@@ -2435,7 +2492,8 @@ public class ImGui {
public static native boolean IsItemFocused();
/**
* Is the last item clicked? (e.g. button/node just clicked on) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Is the last item hovered and mouse clicked on? (**) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in function definition.
*/
@BindingMethod
public static native boolean IsItemClicked(@OptArg int mouseButton);
@@ -2459,14 +2517,14 @@ public class ImGui {
public static native boolean IsItemActivated();
/**
* Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that requires continuous editing.
* Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that require continuous editing.
*/
@BindingMethod
public static native boolean IsItemDeactivated();
/**
* Was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved).
* Useful for Undo/Redo patterns with widgets that requires continuous editing.
* Useful for Undo/Redo patterns with widgets that require continuous editing.
* Note that you may get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even when clicking an already selected item).
*/
@BindingMethod
@@ -2495,6 +2553,12 @@ public class ImGui {
@BindingMethod
public static native boolean IsAnyItemFocused();
/**
* Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
*/
@BindingMethod
public static native int GetItemID();
/**
* Get upper-left bounding rectangle of the last item (screen space)
*/
@@ -2513,12 +2577,6 @@ public class ImGui {
@BindingMethod
public static native ImVec2 GetItemRectSize();
/**
* Allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
*/
@BindingMethod
public static native void SetItemAllowOverlap();
// Viewports
// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
// - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
@@ -2633,12 +2691,11 @@ public class ImGui {
ImGui::ColorConvertHSVtoRGB(hsv[0], hsv[1], hsv[2], rgb[0], rgb[1], rgb[2]);
*/
// Inputs Utilities: Keyboard
// Without IMGUI_DISABLE_OBSOLETE_KEYIO: (legacy support)
// - For 'ImGuiKey key' you can still use your legacy native/user indices according to how your backend/engine stored them in io.KeysDown[].
// With IMGUI_DISABLE_OBSOLETE_KEYIO: (this is the way forward)
// - Any use of 'ImGuiKey' will assert when key < 512 will be passed, previously reserved as native/user keys indices
// - GetKeyIndex() is pass-through and therefore deprecated (gone if IMGUI_DISABLE_OBSOLETE_KEYIO is defined)
// Inputs Utilities: Keyboard/Mouse/Gamepad
// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
// - before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. About use of those legacy ImGuiKey values:
// - 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]
@@ -2686,7 +2743,7 @@ public class ImGui {
@BindingMethod
public static native void SetNextFrameWantCaptureKeyboard(boolean wantCaptureKeyboard);
// Inputs Utilities: Mouse
// 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.
// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
@@ -2768,14 +2825,14 @@ public class ImGui {
public static native void ResetMouseDragDelta(@OptArg int button);
/**
* get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render().
* Get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render().
* If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
*/
@BindingMethod
public static native int GetMouseCursor();
/**
* Set desired cursor type
* Set desired mouse cursor shape
*/
@BindingMethod
public static native void SetMouseCursor(int type);
+121 -58
View File
@@ -10,6 +10,7 @@ import imgui.binding.annotation.ReturnValue;
import imgui.binding.annotation.TypeArray;
import imgui.callback.ImStrConsumer;
import imgui.callback.ImStrSupplier;
import imgui.internal.ImGuiContext;
/**
* Communicate most settings and inputs/outputs to Dear ImGui using this structure.
@@ -72,36 +73,6 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public String LogFilename;
/**
* Time for a double-click, in seconds.
*/
@BindingField
public float MouseDoubleClickTime;
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
@BindingField
public float MouseDoubleClickMaxDist;
/**
* Distance threshold before considering we are dragging.
*/
@BindingField
public float MouseDragThreshold;
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
@BindingField
public float KeyRepeatDelay;
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
@BindingField
public float KeyRepeatRate;
/**
* Font atlas: load, rasterize and pack one or more fonts into a single texture.
*/
@@ -211,6 +182,12 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public boolean ConfigInputTextCursorBlink;
/**
* [BETA] Pressing Enter will keep item active and select contents (single-line only).
*/
@BindingField
public boolean ConfigInputTextEnterKeepActive;
/**
* [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.
*/
@@ -237,6 +214,78 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public boolean ConfigMemoryCompactTimer;
// Inputs Behaviors
// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle)
/**
* Time for a double-click, in seconds.
*/
@BindingField
public float MouseDoubleClickTime;
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
@BindingField
public float MouseDoubleClickMaxDist;
/**
* Distance threshold before considering we are dragging.
*/
@BindingField
public float MouseDragThreshold;
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
@BindingField
public float KeyRepeatDelay;
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
@BindingField
public float KeyRepeatRate;
//------------------------------------------------------------------
// Debug options
//------------------------------------------------------------------
/**
* 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()
* This is inconsistent with other BeginXXX functions and create confusion for many users.
* We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.
* First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
*/
@BindingField
public boolean ConfigDebugBeginReturnValueOnce;
/**
* Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat.
* Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT.
* Windows should be flickering while running.
*/
@BindingField
public boolean ConfigDebugBeginReturnValueLoop;
/**
* Option to deactivate io.AddFocusEvent(false) handling. May facilitate interactions with a debugger when focus loss leads to clearing inputs data.
* Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.
* Consider using e.g. Win32's IsDebuggerPresent() as an additional filter (or see ImOsIsDebuggerPresent() in imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
* Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing.
*/
@BindingField
public boolean ConfigDebugIgnoreFocusLoss;
/**
* Option to audit .ini data
* Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower)
*/
@BindingField
public boolean ConfigDebugIniSettings;
//------------------------------------------------------------------
// Platform Functions
//------------------------------------------------------------------
@@ -284,6 +333,13 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->GetClipboardTextFn = getClipboardTextStub;
*/
/**
* Optional: Platform locale
* [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from {@code *localeconv()->decimal_point}
*/
@BindingField
public short PlatformLocaleDecimalPoint;
//------------------------------------------------------------------
// Input - Call before calling NewFrame()
//------------------------------------------------------------------
@@ -315,11 +371,17 @@ public final class ImGuiIO extends ImGuiStruct {
public native void AddMouseButtonEvent(int button, boolean down);
/**
* Queue a mouse wheel update
* Queue a mouse wheel update.
*/
@BindingMethod
public native void AddMouseWheelEvent(float whX, float whY);
/**
* Queue a mouse source change (Mouse/TouchScreen/Pen)
*/
@BindingMethod
public native void AddMouseSourceEvent(@ArgValue(staticCast = "ImGuiMouseSource") int source);
/**
* Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to call this (for multi-viewport support).
*/
@@ -339,13 +401,13 @@ public final class ImGuiIO extends ImGuiStruct {
public native void AddInputCharacter(@ArgValue(callPrefix = "(unsigned int)") int c);
/**
* Queue new character input from an UTF-16 character, it can be a surrogate
* Queue new character input from a UTF-16 character, it can be a surrogate
*/
@BindingMethod
public native void AddInputCharacterUTF16(@ArgValue(callPrefix = "(ImWchar16)") short c);
/**
* Queue new characters input from an UTF-8 string.
* Queue new characters input from a UTF-8 string.
*/
@BindingMethod
public native void AddInputCharactersUTF8(String str);
@@ -363,16 +425,10 @@ public final class ImGuiIO extends ImGuiStruct {
public native void SetAppAcceptingEvents(boolean acceptingEvents);
/**
* [Internal] Clear the text input buffer manually
* Clear all incoming events.
*/
@BindingMethod
public native void ClearInputCharacters();
/**
* [Internal] Release all keys
*/
@BindingMethod
public native void ClearInputKeys();
public native void ClearEventsQueue();
//------------------------------------------------------------------
// Output - Updated by NewFrame() or EndFrame()/Render()
@@ -430,8 +486,9 @@ public final class ImGuiIO extends ImGuiStruct {
public boolean NavVisible;
/**
* Application framerate estimate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
* Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
* Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second.
* Solely for convenience.
* Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
*/
@BindingField
public float Framerate;
@@ -489,10 +546,24 @@ public final class ImGuiIO extends ImGuiStruct {
@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!
//------------------------------------------------------------------
/**
* Parent UI context (needs to be set explicitly by parent).
*/
@BindingField
@ReturnValue(isStatic = true)
public ImGuiContext Ctx;
/**
* Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
*/
@@ -551,13 +622,6 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public boolean KeySuper;
/**
* 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;
// Other state maintained from data above + IO function calls
/**
@@ -648,6 +712,13 @@ public final class ImGuiIO extends ImGuiStruct {
@TypeArray(type = "boolean", size = "5")
public boolean[] MouseDownOwnedUnlessPopupClose;
/**
* On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event.
* On a Mac system this is already enforced by the system.
*/
@BindingField
public boolean MouseWheelRequestAxisSwap;
/**
* Duration the mouse button has been down (0.0f == just clicked)
*/
@@ -676,14 +747,6 @@ public final class ImGuiIO extends ImGuiStruct {
@TypeArray(type = "float", size = "5")
public float[] MouseDragMaxDistanceSqr;
@BindingField
@TypeArray(type = "float", size = "ImGuiNavInput_COUNT")
public float[] NavInputsDownDuration;
@BindingField
@TypeArray(type = "float", size = "ImGuiNavInput_COUNT")
public float[] NavInputsDownDurationPrev;
/**
* Touch/Pen pressure (0.0f to 1.0f, should be {@code >}0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
*/
@@ -4,6 +4,8 @@ import imgui.binding.ImGuiStruct;
import imgui.binding.annotation.BindingField;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ReturnValue;
import imgui.internal.ImGuiContext;
/**
* Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used.<p>
@@ -27,6 +29,13 @@ public class ImGuiInputTextCallbackData extends ImGuiStruct {
#define THIS ((ImGuiInputTextCallbackData*)STRUCT_PTR)
*/
/**
* Parent UI context
*/
@BindingField
@ReturnValue(isStatic = true)
public ImGuiContext Ctx;
/**
* One ImGuiInputTextFlags_Callback*
*/
@@ -1,62 +1,148 @@
package imgui;
import imgui.binding.ImGuiStructDestroyable;
import imgui.binding.annotation.BindingField;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.OptArg;
import imgui.binding.annotation.ReturnValue;
import imgui.callback.ImListClipperCallback;
import imgui.internal.ImGuiContext;
import java.util.function.Consumer;
/**
* Helper: Manually clip large list of items.
* If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse
* clipping based on visibility to save yourself from processing those items at all.
* If you have lots evenly spaced items and you have random access to the list, you can perform coarse
* clipping based on visibility to only submit items that are in view.
* The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped.
* (Dear ImGui already clip items based on their bounds but it needs to measure text size to do so, whereas manual coarse clipping before submission makes this cost and your own data fetching/submission cost almost null)
* (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally
* fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily
* scale using lists with tens of thousands of items without a problem)
* Usage:
* <pre>
* ImGuiListClipper clipper;
* clipper.Begin(1000); // We have 1000 elements, evenly spaced.
* while (clipper.Step())
* for (int i = clipper.DisplayStart; i {@code <} clipper.DisplayEnd; i++)
* ImGui::Text("line number %d", i);
* ImGuiListClipper clipper;
* clipper.Begin(1000); // We have 1000 elements, evenly spaced.
* while (clipper.Step())
* for (int i = clipper.DisplayStart; i {@code <} clipper.DisplayEnd; i++)
* ImGui::Text("line number %d", i);
* </pre>
* Generally what happens is:
* - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not.
* - User code submit one element.
* - User code submit that one element.
* - Clipper can measure the height of the first element
* - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
* - User code submit visible elements.
* - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
* <p>
* BINDING NOTICE:
* It's impossible to implement the same API like in the original. Method {@link #forEach(int, int, ImListClipperCallback)} could be used instead.
* <pre>
* ImGuiListClipper.forEach(1000, new ImListClipperCallback() {
* public void accept(int index) {
* ImGui.text(String.format("line number %d", index));
* }
* });
* </pre>
*/
public final class ImGuiListClipper {
private ImGuiListClipper() {
@BindingSource
public final class ImGuiListClipper extends ImGuiStructDestroyable {
public ImGuiListClipper() {
super();
}
public ImGuiListClipper(final long ptr) {
super(ptr);
}
@Override
protected long create() {
return nCreate();
}
/*JNI
#include "_common.h"
#define THIS ((ImGuiListClipper*)STRUCT_PTR)
*/
private native long nCreate(); /*
return (uintptr_t)(new ImGuiListClipper());
*/
/**
* Parent UI context
*/
@BindingField
@ReturnValue(isStatic = true)
public ImGuiContext Ctx;
@BindingField
public int DisplayStart;
@BindingField
public int DisplayEnd;
@BindingField(accessors = BindingField.Accessor.GETTER)
public int ItemsCount;
@BindingField(accessors = BindingField.Accessor.GETTER)
public float ItemsHeight;
@BindingField(accessors = BindingField.Accessor.GETTER)
public float StartPosY;
@BindingMethod
public native void Begin(int itemsCount, @OptArg float itemsHeight);
/**
* Automatically called on the last call of Step() that returns false.
*/
@BindingMethod
public native void End();
/**
* Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.
*/
@BindingMethod
public native boolean Step();
/**
* Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility.
* (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
*/
@BindingMethod
public native void IncludeItemByIndex(int itemIndex);
/**
* Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility.
* (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
*
* @param itemEnd is exclusive e.g. use (42, 42+1) to make item 42 never clipped.
*/
@BindingMethod
public native void IncludeItemsByIndex(int itemBegin, int itemEnd);
/**
* Shortcut to use {@link ImGuiListClipper} instance.
*
* @param clipAction action to use inside the {@link ImGuiListClipper} instance
*/
public static void forEach(final Consumer<ImGuiListClipper> clipAction) {
final ImGuiListClipper clipper = new ImGuiListClipper();
clipAction.accept(clipper);
clipper.destroy();
}
/**
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param callback action to do in iterations
* @param callback action to do in iterations
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
*/
@Deprecated
public static void forEach(final int itemsCount, final ImListClipperCallback callback) {
forEach(itemsCount, -1, callback);
}
/**
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param itemsHeight Use -1.0f to be calculated automatically on first step.
* Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
* @param callback action to do in iterations
* Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
* @param callback action to do in iterations
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
*/
@Deprecated
public static native void forEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /*
ImGuiListClipper clipper;
clipper.Begin(itemsCount, itemsHeight);
@@ -66,4 +152,8 @@ public final class ImGuiListClipper {
}
}
*/
/*JNI
#undef THIS
*/
}
@@ -499,7 +499,14 @@ public final class ImGuiPlatformIO extends ImGuiStruct {
return IMGUI_PLATFORM_IO->Monitors.Size;
*/
public native void pushMonitors(float mainPosX, float mainPosY, float mainSizeX, float mainSizeY, float workPosX, float workPosY, float workSizeX, float workSizeY, float dpiScale); /*
public native void pushMonitors(
long platformHandle,
float mainPosX, float mainPosY,
float mainSizeX, float mainSizeY,
float workPosX, float workPosY,
float workSizeX, float workSizeY,
float dpiScale
); /*
ImGuiPlatformMonitor monitor;
monitor.MainPos = ImVec2(mainPosX, mainPosY);
@@ -509,6 +516,7 @@ public final class ImGuiPlatformIO extends ImGuiStruct {
monitor.WorkSize = ImVec2(workSizeX, workSizeY);
monitor.DpiScale = dpiScale;
monitor.PlatformHandle = (void*)platformHandle;
IMGUI_PLATFORM_IO->Monitors.push_back(monitor);
*/
@@ -51,6 +51,20 @@ public final class ImGuiPlatformMonitor extends ImGuiStruct {
@BindingField
public float DpiScale;
/**
* Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
*/
public native void setPlatformHandle(long platformHandle); /*
THIS->PlatformHandle = (void*)platformHandle;
*/
/**
* Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
*/
public native long getPlatformHandle(); /*
return (uintptr_t)THIS->PlatformHandle;
*/
/*JNI
#undef THIS
*/
@@ -67,7 +67,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
public float WindowBorderSize;
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
@BindingField
public ImVec2 WindowMinSize;
@@ -139,7 +139,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
public ImVec2 ItemInnerSpacing;
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
@BindingField
public ImVec2 CellPadding;
@@ -206,7 +206,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
public float TabBorderSize;
/**
* Minimum width for close button to appears on an unselected tab when hovered.
* Minimum width for close button to appear on an unselected tab when hovered.
* Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
*/
@BindingField
@@ -231,6 +231,24 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
@BindingField
public ImVec2 SelectableTextAlign;
/**
* Thickkness of border in SeparatorText()
*/
@BindingField
public float SeparatorTextBorderSize;
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
@BindingField
public ImVec2 SeparatorTextAlign;
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
@BindingField
public ImVec2 SeparatorTextPadding;
/**
* Window position are clamped to be visible within the display area by at least this amount. Only applies to regular windows.
*/
@@ -244,6 +262,12 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
@BindingField
public ImVec2 DisplaySafeAreaPadding;
/**
* Thickness of resizing border between docked windows
*/
@BindingField
public float DockingSeparatorSize;
/**
* Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
*/
@@ -311,6 +335,39 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
THIS->Colors[col] = ImColor(value);
*/
// Behaviors
// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO)
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
*/
@BindingField
public float HoverStationaryDelay;
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
*/
@BindingField
public float HoverDelayShort;
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
*/
@BindingField
public float HoverDelayNormal;
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
*/
@BindingField
public int HoverFlagsForTooltipMouse;
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
*/
@BindingField
public int HoverFlagsForTooltipNav;
@BindingMethod
public native void ScaleAllSizes(float scaleFactor);
@@ -143,6 +143,12 @@ public final class ImGuiViewport extends ImGuiStruct {
return (uintptr_t)THIS->PlatformHandleRaw;
*/
/**
* Platform window has been created (Platform_CreateWindow() has been called). This is false during the first frame where a viewport is being created.
*/
@BindingField
public boolean PlatformWindowCreated;
/**
* Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative position will be OS window position).
*/
@@ -4,6 +4,7 @@ import imgui.ImVec2;
import imgui.binding.annotation.ArgValue;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
import imgui.binding.annotation.OptArg;
import imgui.binding.annotation.ReturnValue;
import imgui.extension.imguifiledialog.callback.ImGuiFileDialogPaneFun;
@@ -14,6 +15,7 @@ import java.util.HashMap;
* ImGuiFileDialog extension for ImGui
* Repo: <a href="https://github.com/aiekick/ImGuiFileDialog">https://github.com/aiekick/ImGuiFileDialog</a>
*/
@ExcludedSource
@BindingSource(callPtr = "ImGuiFileDialog::Instance()", callOperator = "->")
public final class ImGuiFileDialog {
private ImGuiFileDialog() {
@@ -1,5 +1,8 @@
package imgui.extension.imguifiledialog.callback;
import imgui.binding.annotation.ExcludedSource;
@ExcludedSource
public abstract class ImGuiFileDialogPaneFun {
public abstract void accept(String filter, long userDatas, boolean canContinue);
}
@@ -2,7 +2,9 @@ package imgui.extension.imguifiledialog.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
@ExcludedSource
@BindingSource
public final class ImGuiFileDialogFlags {
private ImGuiFileDialogFlags() {
@@ -189,6 +189,7 @@ public final class ImPlot {
/**
* Sets an axis range limits. If ImPlotCond_Always is used, the axes limits will be locked.
* Inversion with {@code v_min > v_max} is not supported; use SetupAxisLimits instead.
*/
@BindingMethod
public static native void SetupAxisLimits(int axis, double vMin, double vMax, @OptArg int cond);
@@ -223,6 +224,24 @@ public final class ImPlot {
@BindingMethod
public static native void SetupAxisTicks(int axis, double vMin, double vMax, int nTicks, @OptArg(callValue = "NULL") String[] labels, @OptArg boolean keepDefault);
/**
* Sets an axis' scale using built-in options.
*/
@BindingMethod
public static native void SetupAxisScale(int axis, int scale);
/**
* Sets an axis' limits constraints.
*/
@BindingMethod
public static native void SetupAxisLimitsConstraints(int axis, double vMin, double vMax);
/**
* Sets an axis' zoom constraints.
*/
@BindingMethod
public static native void SetupAxisZoomConstraints(int axis, double vMin, double vMax);
/**
* Sets the label and/or flags for primary X and Y axes (shorthand for two calls to SetupAxis).
*/
@@ -379,19 +398,21 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a standard 2D line plot.
*/
@BindingMethod
public static native void PlotLine(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotLine")
public static native void PlotLineV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
@@ -402,17 +423,19 @@ public final class ImPlot {
public static native void PlotLine(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a standard 2D line plot.
*/
@BindingMethod
public static native void PlotLine(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int offset);
@BindingMethod(callName = "PlotLine")
public static native void PlotLineV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
// values
@@ -424,88 +447,96 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
*/
@BindingMethod(callName = "PlotScatter")
public static native void PlotScatterV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
*/
@BindingMethod
public static native void PlotScatter(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
*/
@BindingMethod(callName = "PlotScatter")
public static native void PlotScatterV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
// values
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod(callName = "PlotStairs")
public static native void PlotStairsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotScatter(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotScatter(String labelId,
@BindingMethod(callName = "PlotStairs")
public static native void PlotStairsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
// values
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
// xs,ys
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int offset);
// values
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@@ -515,20 +546,22 @@ public final class ImPlot {
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@BindingMethod
public static native void PlotShaded(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotShaded")
public static native void PlotShadedV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
@@ -541,18 +574,20 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg double yRef,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@BindingMethod
public static native void PlotShaded(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int offset);
@BindingMethod(callName = "PlotShaded")
public static native void PlotShadedV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int flags,
@OptArg int offset);
// xs,ys1,ys2
@@ -564,47 +599,51 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys1,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys2,
@ArgValue(callValue = "LEN(xs)") Void count);
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@BindingMethod
public static native void PlotShaded(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys1,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys2,
int count,
@OptArg int offset);
@BindingMethod(callName = "PlotShaded")
public static native void PlotShadedV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys1,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys2,
int count,
@OptArg int flags,
@OptArg int offset);
// values
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double barWidth,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double barWidth,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotBars")
public static native void PlotBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double barWidth,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@@ -612,87 +651,31 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@ArgValue(callValue = "0.67") Void barWidth,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
double barWidth,
@OptArg int offset);
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
double barWidth,
@OptArg int offset);
// values
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double barHeight,
@OptArg double y0,
@OptArg int offset);
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double barHeight,
@OptArg double y0,
@OptArg int offset);
// xs,ys
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@BindingMethod(callName = "PlotBars")
public static native void PlotBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@ArgValue(callValue = "0.67") Void barHeight,
double barWidth,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
double barHeight,
@OptArg int offset);
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@BindingMethod(callName = "PlotBars")
public static native void PlotBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
double barHeight,
double barWidth,
@OptArg int flags,
@OptArg int offset);
/**
@@ -701,22 +684,22 @@ public final class ImPlot {
@BindingMethod
public static native void PlotBarGroups(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int itemCount,
@ArgValue(callValue = "LEN(values)") Void itemCount,
int groupCount,
@OptArg double groupWidth,
@OptArg double x0,
@OptArg double groupSize,
@OptArg double shift,
@OptArg int flags);
/**
* Plots a group of horizontal bars. #values is a row-major matrix with #item_count rows and #group_count cols. #label_ids should have #item_count elements.
* Plots a group of vertical bars. #values is a row-major matrix with #item_count rows and #group_count cols. #label_ids should have #item_count elements.
*/
@BindingMethod
public static native void PlotBarGroupsH(String[] labelIds,
@BindingMethod(callName = "PlotBarGroups")
public static native void PlotBarGroupsV(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int itemCount,
int groupCount,
@OptArg double groupHeight,
@OptArg double y0,
@OptArg double groupSize,
@OptArg double shift,
@OptArg int flags);
/**
@@ -727,73 +710,46 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
int count,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
int count,
@OptArg int offset);
/**
* Plots horizontal error bars. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots horizontal error bars. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBarsH(String labelId,
@BindingMethod(callName = "PlotErrorBars")
public static native void PlotErrorBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots horizontal error bars. The label_id should be the same as the label_id of the associated line or bar plot.
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBarsH(String labelId,
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod(callName = "PlotErrorBars")
public static native void PlotErrorBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
int count,
@OptArg int flags,
@OptArg int offset);
// values
@@ -807,20 +763,22 @@ public final class ImPlot {
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical stems.
*/
@BindingMethod
public static native void PlotStems(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotStems")
public static native void PlotStemsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double scale,
@OptArg double start,
@OptArg int flags,
@OptArg int offset);
// xs,ys
@@ -832,53 +790,41 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg double yRef,
@OptArg double ref,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical stems.
*/
@BindingMethod
public static native void PlotStems(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int offset);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotVLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotVLines(String labelId,
@BindingMethod(callName = "PlotStems")
public static native void PlotStemsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int flags,
@OptArg int offset);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotHLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(ys)") Void count);
public static native void PlotInfLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotHLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int offset);
@BindingMethod(callName = "PlotInfLines")
public static native void PlotInfLinesV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a pie chart. If the sum of values{@code >}1 or normalize is true, each value will be normalized. Center and radius are in plot units. #label_fmt can be set to NULL for no labels.
@@ -890,23 +836,23 @@ public final class ImPlot {
double x,
double y,
double radius,
@OptArg(callValue = "false") boolean normalize,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg double angle0);
@OptArg double angle0,
@OptArg int flags);
/**
* Plots a pie chart. If the sum of values{@code >}1 or normalize is true, each value will be normalized. Center and radius are in plot units. #label_fmt can be set to NULL for no labels.
*/
@BindingMethod
public static native void PlotPieChart(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
double x,
double y,
double radius,
@OptArg(callValue = "false") boolean normalize,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg double angle0);
@BindingMethod(callName = "PlotPieChart")
public static native void PlotPieChartV(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
double x,
double y,
double radius,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg double angle0,
@OptArg int flags);
/**
* Plots a 2D heatmap chart. Values are expected to be in row-major order. Leave #scale_min and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be set to NULL for no labels.
@@ -920,7 +866,8 @@ public final class ImPlot {
@OptArg double scaleMax,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg ImPlotPoint boundsMin,
@OptArg ImPlotPoint boundsMax);
@OptArg ImPlotPoint boundsMax,
@OptArg int flags);
/**
* Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #cumulative is true, each bin contains its count plus the counts of all previous bins.
@@ -932,27 +879,23 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg(callValue = "ImPlotBin_Sturges") int bins,
@OptArg boolean cumulative,
@OptArg boolean density,
@OptArg double barScale,
@OptArg(callValue = "ImPlotRange()") ImPlotRange range,
@OptArg(callValue = "true") boolean outliers,
@OptArg double barScale);
@OptArg int flags);
/**
* Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #cumulative is true, each bin contains its count plus the counts of all previous bins.
* If #density is true, the PDF is visualized. If both are true, the CDF is visualized. If #range is left unspecified, the min/max of #values will be used as the range.
* If #range is specified, outlier values outside of the range are not binned. However, outliers still count toward normalizing and cumulative counts unless #outliers is false. The largest bin count or density is returned.
*/
@BindingMethod
public static native double PlotHistogram(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
int bins,
@OptArg boolean cumulative,
@OptArg boolean density,
@OptArg(callValue = "ImPlotRange()") ImPlotRange range,
@OptArg(callValue = "true") boolean outliers,
@OptArg double barScale);
@BindingMethod(callName = "PlotHistogram")
public static native double PlotHistogramV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg int bins,
@OptArg double barScale,
@OptArg(callValue = "ImPlotRange()") ImPlotRange range,
@OptArg int flags);
/**
* Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #density is true, the PDF is visualized.
@@ -966,25 +909,23 @@ public final class ImPlot {
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int xBins,
@OptArg int yBins,
@OptArg(callValue = "false") boolean density,
@OptArg(callValue = "ImPlotRect()") ImPlotRect range,
@OptArg boolean outliers);
@OptArg int flags);
/**
* Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #density is true, the PDF is visualized.
* If #range is left unspecified, the min/max of #xs an #ys will be used as the ranges. If #range is specified, outlier values outside of range are not binned.
* However, outliers still count toward the normalizing count for density plots unless #outliers is false. The largest bin count or density is returned.
*/
@BindingMethod
public static native double PlotHistogram2D(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
int xBins,
int yBins,
@OptArg(callValue = "false") boolean density,
@OptArg(callValue = "ImPlotRect()") ImPlotRect range,
@OptArg boolean outliers);
@BindingMethod(callName = "PlotHistogram2D")
public static native double PlotHistogram2DV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int xBins,
@OptArg int yBins,
@OptArg(callValue = "ImPlotRect()") ImPlotRect range,
@OptArg int flags);
/**
* Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
@@ -993,18 +934,21 @@ public final class ImPlot {
public static native void PlotDigital(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
*/
@BindingMethod
public static native void PlotDigital(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
*/
@BindingMethod(callName = "PlotDigital")
public static native void PlotDigitalV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots an axis-aligned image. #bounds_min/bounds_max are in plot coordinates (y-up) and #uv0/uv1 are in texture coordinates (y-down).
*/
@@ -1015,7 +959,8 @@ public final class ImPlot {
ImPlotPoint boundsMax,
@OptArg ImVec2 uv0,
@OptArg ImVec2 uv1,
@OptArg ImVec4 tintCol);
@OptArg ImVec4 tintCol,
@OptArg int flags);
/**
* Plots a centered text label at point x,y with an optional pixel offset. Text color can be changed with ImPlot::PushStyleColor(ImPlotCol_InlayText, ...).
@@ -1024,14 +969,14 @@ public final class ImPlot {
public static native void PlotText(String text,
double x,
double y,
@OptArg(callValue = "false") boolean vertical,
@OptArg ImVec2 pixOffset);
@OptArg(callValue = "ImVec2(0,0)") ImVec2 pixOffset,
@OptArg int flags);
/**
* Plots a dummy item (i.e. adds a legend entry colored by ImPlotCol_Line)
*/
@BindingMethod
public static native void PlotDummy(String labelID);
public static native void PlotDummy(String labelID, @OptArg int flags);
/*JNI
#undef LEN
@@ -1075,38 +1020,38 @@ public final class ImPlot {
* Annotations are always rendered on top.
*/
@BindingMethod
public static native void Annotation(double x, double y, ImVec4 color, ImVec2 pixOffset, boolean clamp, @OptArg boolean round);
public static native void Annotation(double x, double y, ImVec4 col, ImVec2 pixOffset, boolean clamp, @OptArg boolean round);
/**
* Shows an annotation callout at a chosen point with formatted text.
* Clamping keeps annotations in the plot area. Annotations are always rendered on top.
*/
@BindingMethod
public static native void Annotation(double x, double y, ImVec4 color, ImVec2 pixOffset, boolean clamp, String fmt, Void NULL);
public static native void Annotation(double x, double y, ImVec4 col, ImVec2 pixOffset, boolean clamp, String fmt, Void NULL);
/**
* Shows a x-axis tag at the specified coordinate value.
*/
@BindingMethod
public static native void TagX(double x, ImVec4 color, @OptArg boolean round);
public static native void TagX(double x, ImVec4 col, @OptArg boolean round);
/**
* Shows a x-axis tag at the specified coordinate value with formatted text.
*/
@BindingMethod
public static native void TagX(double x, ImVec4 color, String fmt, Void NULL);
public static native void TagX(double x, ImVec4 col, String fmt, Void NULL);
/**
* Shows a y-axis tag at the specified coordinate value.
*/
@BindingMethod
public static native void TagY(double y, ImVec4 color, @OptArg boolean round);
public static native void TagY(double y, ImVec4 col, @OptArg boolean round);
/**
* Shows a y-axis tag at the specified coordinate value with formatted text.
*/
@BindingMethod
public static native void TagY(double y, ImVec4 color, String fmt, Void NULL);
public static native void TagY(double y, ImVec4 col, String fmt, Void NULL);
//-----------------------------------------------------------------------------
// [SECTION] Plot Utils
@@ -1415,6 +1360,7 @@ public final class ImPlot {
*/
@BindingMethod
public static native void PushStyleVar(int idx, ImVec2 val);
/**
* Undo temporary style variable modification(s). Undo multiple pushes at once by increasing count.
*/
@@ -1554,7 +1500,13 @@ public final class ImPlot {
* Shows a vertical color scale with linear spaced ticks using the specified color map. Use double hashes to hide label (e.g. "##NoLabel").
*/
@BindingMethod
public static native void ColormapScale(String label, double scaleMin, double scaleMax, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "IMPLOT_AUTO") int cmap, @OptArg String format);
public static native void ColormapScale(String label,
double scaleMin,
double scaleMax,
@OptArg(callValue = "ImVec2(0,0)") ImVec2 size,
@OptArg(callValue = "\"%g\"") String format,
@OptArg int flags,
@OptArg int cmap);
/**
* Shows a horizontal slider with a colormap gradient background.
@@ -119,9 +119,6 @@ public final class ImPlotStyle extends ImGuiStructDestroyable {
@BindingField
public int Colormap;
@BindingField
public boolean AntiAliasedLines;
@BindingField
public boolean UseLocalTime;
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotBarsFlags {
private ImPlotBarsFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotBarsFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotErrorBarsFlags {
private ImPlotErrorBarsFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotErrorBarsFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotHeatmapFlags {
private ImPlotHeatmapFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotHeatmapFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotHistogramFlags {
private ImPlotHistogramFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotHistogramFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotInfLinesFlags {
private ImPlotInfLinesFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotInfLinesFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotItemFlags {
private ImPlotItemFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotItemFlags_")
public Void __;
}
Loaded 100 of 133 files, more files were not shown because too many files have changed in this diff. Show more